From 183ee8124bdbeece4c0564a44158a09b5d63672e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 15 May 2003 00:19:07 +0000 Subject: [PATCH 01/75] report everything except "func" and "placeholder" when checking for pullups. report differences in messages to catch spelling/numbering corrections. --- util/check-pullups.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/util/check-pullups.pl b/util/check-pullups.pl index 24ecb6c067..a63f60b5b5 100644 --- a/util/check-pullups.pl +++ b/util/check-pullups.pl @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: check-pullups.pl,v 1.8 2002/08/06 02:26:11 marka Exp $ +# $Id: check-pullups.pl,v 1.9 2003/05/15 00:19:07 marka Exp $ # Given two CHANGES files, list [bug] entries present in the # first one but not in the second one. @@ -74,11 +74,25 @@ if (@ARGV == 3) { my $c3 = { }; } +my $msg = ""; foreach my $c (sort {$a <=> $b} keys %$c1) { my $category = $c1->{$c}->{category}; - if (($category eq "bug" || $category eq "port" || - $category eq "tuning") && + my $text = $c1->{$c}->{text}; + if ($category ne "func" && $category ne "placeholder" && !exists($c2->{$c}) && !exists($c3->{$c})) { + if ($msg ne "MISSING\n") { + $msg = "MISSING\n"; + print $msg; + } + print $c1->{$c}->{text}; + } + if (exists($c2->{$c}) && $category ne "placeholder" && + $c2->{$c}->{text} ne $text) { + if ($msg ne "TEXT\n") { + $msg = "TEXT\n"; + print $msg; + } + print $c2->{$c}->{text}; print $c1->{$c}->{text}; } } From 5098d1b204fef12c2475235cd73728233857f98f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 16 May 2003 01:37:57 +0000 Subject: [PATCH 02/75] new draft --- ...f-dnsext-dnssec-2535typecode-change-00.txt | 289 ++++++++++++++++++ 1 file changed, 289 insertions(+) create mode 100644 doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt diff --git a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt new file mode 100644 index 0000000000..aa014d876d --- /dev/null +++ b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt @@ -0,0 +1,289 @@ + + + +INTERNET-DRAFT Samuel Weiler +Expires: November 2003 May 12, 2003 + + + Legacy Resolver Compatibility for Delegation Signer + draft-ietf-dnsext-dnssec-2535typecode-change-00.txt + +Status of this Memo + + This document is an Internet-Draft and is subject to all provisions + of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as + Internet-Drafts. + + Internet-Drafts are draft documents valid for a maximum of six + months and may be updated, replaced, or obsoleted by other + documents at any time. It is inappropriate to use Internet- Drafts + as reference material or to cite them other than as "work in + progress." + + The list of current Internet-Drafts can be accessed at + http://www.ietf.org/1id-abstracts.html + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html + + Comments should be sent to the author or to the DNSEXT WG mailing + list: namedroppers@ops.ietf.org + +Abstract + + As the DNS Security (DNSSEC) specifications have evolved, the + syntax and semantics of the DNSSEC resource records (RRs) have + changed. Many deployed nameservers understand variants of these + semantics. Dangerous interactions can occur when a resolver that + understands an earlier version of these semantics queries an + authoritative server that understands the new delegation signer + semantics, including at least one failure scenario that will cause + an unsecured zone to be unresolvable. This document proposes that + these interactions be avoided by changing the type codes and + mnemonics of the DNSSEC RRs (SIG, KEY, and NXT). + +1. Introduction + + The DNSSEC protocol has been through many iterations whose syntax + and semantics are not completely compatible. This has occurred as + part of the ordinary process of proposing a protocol, implementing + it, testing it in the increasingly complex and diverse environment + of the Internet, and refining the definitions of the initial + Proposed Standard. In the case of DNSSEC, the process has been + complicated by DNS's criticality and wide deployment and the need + to add security while minimizing daily operational complexity. + + A weak area for previous DNS specifications has been lack of detail + in specifying resolver behavior, leaving implementors largely on + their own to determine many details of resolver function. This, + combined with the number of iterations the DNSSEC spec has been + through, has resulted in fielded code with a wide variety of + behaviors. This variety makes it difficult to predict how a + protocol change will be handled by all deployed resolvers. The + risk that a change will cause unacceptable or even catastrophic + failures makes it difficult to design and deploy a protocol change. + One strategy for managing that risk is to structure protocol + changes so that existing resolvers can completely ignore input that + might confuse them or trigger undesirable failure modes. + + This document addresses a specific problem caused by Delegation + Signer's [DS] introduction of new semantics for the NXT RR that are + incompatible with the semantics in [RFC2535]. Answers provided by + DS-aware servers can trigger an unacceptable failure mode in some + resolvers that implement RFC 2535, which provides a great + disincentive to sign zones with DS. The proposed solution allows + for the incremental deployment of DS. + +1.1 The Problem + + Delegation signer [DS] introduces new semantics for the NXT RR that + are incompatible with the semantics in [RFC2535]. In [RFC2535], + NXT records were only required to be returned as part of a + non-existence proof. In [DS], an unsecure referral returns, in + addition to the NS, a proof of non-existence of a DS RR in the form + of an NXT and SIG(NXT). RFC 2535 didn't specify how a resolver was + to interpret a response with both an NS and an NXT in the authority + section and with NOERROR or NODATA set. Some widely deployed + 2535-aware resolvers interpret any answer with an NXT as a proof of + non-existence of the requested record. This results in unsecure + delegations being invisible to 2535-aware resolvers and violates + the basic architectural principle that DNSSEC must do no harm -- + the signing of zones must not prevent the resolution of unsecured + names. + +2. Possible Solutions + + This section presents several possible solutions. Section 3 + recommends one and describes it in more detail. + +2.1. Change SIG, KEY, and NXT + + To avoid the problem described above, legacy (RFC2535-aware) + resolvers need to be kept from seeing unsecure referrals that + include NXT records in the authority section. The simplest way to + do that is to change the type codes for SIG, KEY, and NXT. + + The obvious drawback to this is that new resolvers will not be able + to validate zones signed with the old RRs. This problem already + exists, however, because of the changes made by DS, and resolvers + that understand the old RRs (and have compatibility issues with DS) + are far more prevalent than 2535-signed zones. + +2.2. Change a subset of type codes + + The observed problem with unsecure referrals could be addressed by + changing only the NXT type code or another subset of the type codes + that includes NXT. This has the virtue of apparent simplicity, but + it risks introducing new problems or not going far enough. It's + quite possible that more incompatibilities exist between DS and + earlier semantics. Legacy resolvers may also be confused by seeing + records they recognize (SIG and KEY) while being unable to find + NXTs. Although it may seem unnecessary to fix that which is not + obviously broken, it's far cleaner to change all of the type codes + at once. This will leave legacy resolvers and tools completely + blinded to DNSSEC -- they will see only unknown RRs. + +2.3. Replace the DO bit + + Another way to keep legacy resolvers from ever seeing DNSSEC + records with DS semantics is to have authoritative servers only + send that data to DS-aware resolvers. It's been proposed that + assigning a new EDNS0 flag bit to signal DS-awareness (tentatively + called "DA"), and having authoritative servers send DNSSEC data + only in response to queries with the DA bit set, would accomplish + this. This bit would presumably supplant the DO bit described in + [RFC3225]. + + This solution is sufficient only if all 2535-aware resolvers zero + out EDNS0 flags that they don't understand. If one passed through + the DA bit unchanged, it would still see the new semantics, and it + would probably fail to see unsecure delegations. Since it's + impractical to know how every DNS implementation handles unknown + EDNS0 flags, this is not a universal solution. It could, though, + be considered in addition to changing the RR type codes. + +2.4. Increment the EDNS version + + Another proposed solution is to increment the EDNS version number + as defined in [RFC2671], on the assumption that all existing + implementations will reject higher versions than they support, + and retain the DO bit as the signal for DNSSEC awareness. This + approach has not been tested. + +2.5. Do nothing + + There is a large deployed base of DNS resolvers that understand + DNSSEC as defined by the standards track [RFC2535] and [RFC2065] + and, due to underspecification in those documents, interpret any + answer with an NXT as a non-existence proof. So long as that is + the case, zone owners will have a strong incentive to not sign any + zones that contain unsecure delegations, lest those delegations be + invisible to such a large installed base. This will dramatically + slow DNSSEC adoption. + + Unfortunately, without signed zones there's no clear incentive for + operators of resolvers to upgrade their software to support the new + version of DNSSEC, as defined in [DS]. Historical data suggests + that resolvers are rarely upgraded, and that old nameserver code + never dies. + + Rather than wait years for resolvers to be upgraded through natural + processes before signing zones with unsecure delegations, + addressing this problem with a protocol change will immediately + remove the disincentive for signing zones and allow widespread + deployment of DNSSEC. + +3. Protocol changes + + This document proposes changing the type codes of SIG, KEY, and + NXT. This solution is the cleanest and safest, largely because the + behavior of resolvers that receive unknown type codes is well + understood. This approach has also received the most testing. + + To avoid operational confusion, it's also necessary to change the + mnemonics for these RRs. DNSKEY will be the replacement for KEY, + with the mnemonic indicating that these keys are not for + application use, per [RFC3445]. RRSIG (Resource Record SIGnature) + will replace SIG, and NSEC (Next SECure) will replace NXT. + + The new types will have exactly the same syntax and semantics as + specified for SIG, KEY, and NXT in [RFC2535] and [DS], and they + completely replace the old types. A resolver, if it receives the + old types, SHOULD treat them as unknown RRs, and SHOULD NOT assign + any special semantic value to them. It MUST NOT use them for + DNSSEC validations or other DNS operational decision making. For + example, a resolver MUST NOT use DNSKEYs to validate SIGs or use + KEYs to validate RRSIGs. Authoritative servers SHOULD NOT serve + SIG, KEY, or NXT records. If those records are included, they MUST + NOT receive special treatment. As an example, if a SIG is included + in a signed zone, there MUST be an RRSIG for it. + + As a clarification to previous documents, NSEC can appear in the + authority section of an answer at any time, not just in negative + answers. The mere presence of an NSEC record in the answer or + authority section of an answer with RCODE=NOERROR, MUST NOT be + interpreted as a negative answer. The NSEC must be validated. + +4. IANA Considerations + + This document updates the IANA registry for DNS Resource Record + Types by assigning types 46, 47, and 48 to the DNSKEY, RRSIG, and + NSEC RRs, respectively. + + Types 24, 25, and 30 (SIG, KEY, and NXT) should be marked as + Obsolete. + +5. Security Considerations + + The change proposed here does not materially effect security. The + implications of trying to use both new and legacy types together + are not well understood, and attempts to do so would probably lead + to unintended and dangerous results. + + Changing type codes will leave code paths in legacy resolvers that + are never exercised. Unexercised code paths are a frequent source + of security holes, largely because those code paths do not get + frequent scrutiny. + + Doing nothing, as described in 3.1, will slow DNSSEC deployment. + While this does not decrease security, it also fails to increase + it. + +6. Normative references + + [RFC2065] Eastlake, D. and C. Kaufman, "Domain Name System Security + Extensions", RFC 2065, January 1997. + + [RFC2535] Eastlake, D., "Domain Name System Security Extensions", + RFC 2535, March 1999. + + [DS] Gudmundsson, O., "Delegation Signer Resource Record", + draft-ietf-dnsext-delegation-signer-14.txt, work in + progress, May 2003. + +7. Informative References + + [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC + 2671, August 1999. + + [RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", RFC + 3225, December 2001. + + [RFC2929] Eastlake, D., E. Brunner-Williams, and B. Manning. + Domain Name System (DNS) IANA Considerations. BCP 42, + RFC 2929, September 2000. + + [RFC3445] Massey, D., and S. Rose. Limiting the Scope of the KEY + Resource Record (RR). RFC 3445, December 2002. + +8. Acknowledgments + + The proposed solution and the analysis of alternatives had many + contributors. With apologies to anyone overlooked, those include: + Micheal Graff, John Ihren, Olaf Kolkman, Mark Kosters, Ed Lewis, + Bill Manning, and Suzanne Woolf. + + Thanks to Jakob Schlyter and Mark Andrews for identifying the + incompatibility described in section 1.1. + + In addition to the above, the author would like to thank Scott + Rose, Olafur Gudmundsson, and Sandra Murphy for their substantive + comments. + +9. Author's Address + + Samuel Weiler + Network Associates Laboratories + 15204 Omega Dr., Suite 300 + Rockville, MD 20850 + USA + weiler@tislabs.com + + + + + From dd3f0d86f8f0def6bdb7abb5774aa4b9bb0e4a96 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 21 May 2003 02:35:54 +0000 Subject: [PATCH 03/75] spelling --- CHANGES | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index c3811afe3c..9b500b3685 100644 --- a/CHANGES +++ b/CHANGES @@ -24,7 +24,7 @@ 1462. [bug] parse_sizeval() failed to check the token type. [RT #5586] -1461. [bug] Remove deadlock from rbtdb code. [RT #5999] +1461. [bug] Remove deadlock from rbtdb code. [RT #5599] 1460. [bug] inet_pton() failed to reject certain malformed IPv6 literals. @@ -1459,7 +1459,7 @@ a nonzero IP address rather than based on the IFF_UP flag. [RT #1160] - 984. [bug] Multi-threaded should be enabled by default on + 984. [bug] Multi-threading should be enabled by default on Solaris 2.7 and newer, but it wasn't. 983. [func] The server now supports generating IXFR difference @@ -1857,7 +1857,7 @@ "severity debug 0;" like it did in BIND 9.1. [RT #1367] - 864. [cleanup] Multi-threaded is now enabled by default on + 864. [cleanup] Multi-threading is now enabled by default on OSF1, Solaris 2.7 and newer, AIX, IRIX, and HP-UX. 863. [bug] If an error occurred while an outgoing zone transfer @@ -1958,7 +1958,7 @@ 838. [port] UnixWare 7.x.x is now suported by bin/tests/system/ifconfig.sh. - 837. [cleanup] Multi-threaded is now enabled by default only on + 837. [cleanup] Multi-threading is now enabled by default only on OSF1, Solaris 2.7 and newer, and AIX. 836. [func] Upgraded libtool to 1.4. From 7767c2a7aa11ad10cafe876a9d1af6a3fccd33c1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 21 May 2003 14:15:32 +0000 Subject: [PATCH 04/75] try tcp axfr/ixfr even if refresh fails/refused. --- lib/dns/zone.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 54fd1fd738..c08ba48dc4 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.389 2003/05/14 02:41:17 marka Exp $ */ +/* $Id: zone.c,v 1.390 2003/05/21 14:15:32 marka Exp $ */ #include @@ -3402,6 +3402,8 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { "refresh: retry limit for " "master %s exceeded (source %s)", master, source); + /* Try with TCP. */ + goto tcp_transfer; } else dns_zone_log(zone, ISC_LOG_INFO, "refresh: failure trying master " @@ -3449,6 +3451,11 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { "refresh: unexpected rcode (%.*s) from " "master %s (source %s)", (int)rb.used, rcode, master, source); + /* + * Perhaps AXFR/IXFR is allowed even if SOA queries arn't. + */ + if (msg->rcode == dns_rcode_refused) + goto tcp_transfer; goto next_master; } From a3c5866412af704fb5324f9c90465805592d4f4e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 21 May 2003 23:23:30 +0000 Subject: [PATCH 05/75] new draft --- ...s-19.txt => draft-ietf-dnsext-mdns-20.txt} | 492 +++++++++--------- 1 file changed, 246 insertions(+), 246 deletions(-) rename doc/draft/{draft-ietf-dnsext-mdns-19.txt => draft-ietf-dnsext-mdns-20.txt} (89%) diff --git a/doc/draft/draft-ietf-dnsext-mdns-19.txt b/doc/draft/draft-ietf-dnsext-mdns-20.txt similarity index 89% rename from doc/draft/draft-ietf-dnsext-mdns-19.txt rename to doc/draft/draft-ietf-dnsext-mdns-20.txt index f87df7cde9..42cec61dac 100644 --- a/doc/draft/draft-ietf-dnsext-mdns-19.txt +++ b/doc/draft/draft-ietf-dnsext-mdns-20.txt @@ -7,8 +7,8 @@ DNSEXT Working Group Levon Esibov INTERNET-DRAFT Bernard Aboba Category: Standards Track Dave Thaler - Microsoft -12 May 2003 + Microsoft +21 May 2003 Linklocal Multicast Name Resolution (LLMNR) @@ -61,20 +61,20 @@ Esibov, Aboba & Thaler Standards Track [Page 1] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 Table of Contents 1. Introduction .......................................... 3 - 1.1 Requirements .................................... 4 + 1.1 Requirements .................................... 3 1.2 Terminology ..................................... 4 2. Name resolution using LLMNR ........................... 4 - 2.1 Sender behavior ................................. 5 + 2.1 Sender behavior ................................. 4 2.2 Responder behavior .............................. 5 2.3 Unicast queries ................................. 6 2.4 Addressing ...................................... 7 - 2.5 Off-link detection .............................. 8 + 2.5 Off-link detection .............................. 7 2.6 Retransmissions ................................. 8 2.7 DNS TTL ......................................... 9 3. Usage model ........................................... 9 @@ -86,7 +86,7 @@ Table of Contents 5. Security considerations ............................... 15 5.1 Scope restriction ............................... 15 5.2 Usage restriction ............................... 16 - 5.3 Cache and port separation ....................... 17 + 5.3 Cache and port separation ....................... 16 5.4 Authentication .................................. 17 6. IANA considerations ................................... 17 7. Normative References .................................. 17 @@ -121,7 +121,7 @@ Esibov, Aboba & Thaler Standards Track [Page 2] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 1. Introduction @@ -147,19 +147,10 @@ described in Section 2.3. Propagation of LLMNR packets on the local link is considered sufficient to enable name resolution in small networks. The assumption is that if -a network has a home gateway, then the network either has DNS and DHCPv4 -servers or the home gateway provides DHCPv4 and DNS server -functionality. By providing Dynamic Host Configuration Service for -IPv4 (DHCPv4), as well as a DNS server with support for dynamic DNS, -which is also authoritative for the A RRs of local hosts, it is possible -to support resolution of local host names over IPv4. - -For small IPv6 networks, equivalent functionality can be provided by -implementing Dynamic Host Configuration Service for IPv6 (DHCPv6) for -DNS configuration [DHCPv6DNS], as well providing a DNS server with -support for dynamic DNS, which is also authoritative for the AAAA RRs of -local hosts, it is possible to support the resolution of local host -names over IPv6 as well as IPv4. +a network has a home gateway, then the network is able to provide DNS +server configuration and a DNS server is available that is authoritative +for the names of local hosts and can support dynamic DNS. Configuration +issues are discussed in Section 3.2. In the future, LLMNR may be defined to support greater than link-scope multicast. This would occur if LLMNR deployment is successful, the @@ -172,18 +163,6 @@ issues, usability and impact on the network it will be possible to reevaluate which multicast scopes are appropriate for use with multicast name resolution mechanisms. - - - -Esibov, Aboba & Thaler Standards Track [Page 3] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - Service discovery in general, as well as discovery of DNS servers using LLMNR in particular, is outside of the scope of this document, as is name resolution over non-multicast capable media. @@ -193,6 +172,18 @@ name resolution over non-multicast capable media. In this document, several words are used to signify the requirements of the specification. These words are often capitalized. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD + + + +Esibov, Aboba & Thaler Standards Track [Page 3] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. @@ -230,20 +221,6 @@ A typical sequence of events for LLMNR usage is as follows: Further details of sender and responder behavior are provided in the sections that follow. - - - - - -Esibov, Aboba & Thaler Standards Track [Page 4] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - 2.1. Sender behavior A sender sends an LLMNR query for any legal resource record type (e.g. @@ -255,6 +232,18 @@ The RD (Recursion Desired) bit MUST NOT be set in a query. If a responder receives a query with the header containing RD set bit, the responder MUST ignore the RD bit. + + + +Esibov, Aboba & Thaler Standards Track [Page 4] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + The sender MUST anticipate receiving no replies to some LLMNR queries, in the event that no responders are available within the link-scope or in the event no positive non-null responses exist for the transmitted @@ -272,10 +261,9 @@ the LLMNR query. A host configured as a responder MUST act as a sender to verify the uniqueness of names as described in Section 4. Responders MUST NOT respond to LLMNR queries for names they are not -authoritative for, except in the event of a discovered conflict, as -described in Section 4. Responders SHOULD respond to LLMNR queries for -names and addresses they are authoritative for. This applies to both -forward and reverse lookups. +authoritative for. Responders SHOULD respond to LLMNR queries for names +and addresses they are authoritative for. This applies to both forward +and reverse lookups. As an example, a computer "host.example.com." configured to respond to LLMNR queries is authoritative for the name "host.example.com.". On @@ -292,18 +280,6 @@ and an empty answer section. If a DNS server is running on a host that supports LLMNR, the DNS server MUST respond to LLMNR queries only for the RRSets owned by the host on - - - -Esibov, Aboba & Thaler Standards Track [Page 5] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - which the server is running, but MUST NOT respond for other records for which the server is authoritative. @@ -316,6 +292,18 @@ root. For example the host "host.example.com." is not authoritative for the name "child.host.example.com." unless the host is configured with multiple names, including "host.example.com." and + + + +Esibov, Aboba & Thaler Standards Track [Page 5] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + "child.host.example.com.". As a result, "host" cannot reply to a query for "child" with NXDOMAIN. The purpose of limiting the name authority scope of a responder is to prevent complications that could be caused by @@ -352,18 +340,6 @@ Unicast queries SHOULD be sent when: with the TC bit set to the previous LLMNR multicast query, or b. The sender's LLMNR cache contains an NS resource record that - - - -Esibov, Aboba & Thaler Standards Track [Page 6] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - enables the sender to send a query directly to the hosts authoritative for the name in the query, or @@ -376,6 +352,18 @@ address of the responder. The RA (Recursion Available) bit in the header of the response MUST NOT be set. If the RA bit is set in the response header, the sender MUST ignore the RA bit. + + + +Esibov, Aboba & Thaler Standards Track [Page 6] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + Unicast LLMNR queries SHOULD be sent using TCP. Responses to TCP unicast LLMNR queries MUST be sent using TCP, using the same connection as the query. If the sender of a TCP query receives a response not @@ -383,9 +371,9 @@ using TCP, the response MUST be silently discarded. Unicast UDP queries MAY be responded to with an empty answer section and the TC bit set, so as to require the sender to resend the query using TCP. Senders MUST support sending TCP queries, and Responders MUST support listening for -TCP queries. The Responder SHOULD set the TTL or Hop Limit settings on +TCP queries. The Responder SHOULD set the TTL or Hop Limit settings on the TCP listen socket to one (1) so that SYN-ACK packets will have TTL -(IPv4) or Hop Limit (IPv6) set to one (1). This prevents an incoming +(IPv4) or Hop Limit (IPv6) set to one (1). This prevents an incoming connection from off-link since the Sender will not receive a SYN-ACK from the Responder. @@ -394,10 +382,10 @@ UDP query, or if TCP connection setup cannot be completed in order to send a unicast TCP query, this is treated as a response that no records of the specified type and class exist for the specified name (it is treated the same as a response with RCODE=0 and an empty answer -section). The UDP sender receiving an ICMP "Time Exceeded" message +section). The UDP sender receiving an ICMP "Time Exceeded" message SHOULD verify that the ICMP error payload contains a valid LLMNR query packet, which matches a query that is currently in progress, so as to -guard against a potential Denial of Service (DoS) attack. If a match +guard against a potential Denial of Service (DoS) attack. If a match cannot be made, then the sender relies on the retransmission and timeout behavior described in Section 2.6. @@ -410,20 +398,6 @@ sends queries, is 224.0.0.251. The IPv6 link-scope multicast address a given responder listens to, and to which a sender sends all queries, is TBD. - - - - - -Esibov, Aboba & Thaler Standards Track [Page 7] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - 2.5. Off-link detection The source address of LLMNR queries and responses MUST be "on link". @@ -438,6 +412,18 @@ For IPv4, an "on link" address is defined as a link-local address or an address whose prefix belongs to a subnet on the local link; for IPv6 [RFC2460] an "on link" address is either a link-local address, defined in [RFC2373], or an address whose prefix belongs to a subnet on the + + + +Esibov, Aboba & Thaler Standards Track [Page 7] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + local link. A sender SHOULD prefer RRs including reachable addresses where RRs involving both reachable and unreachable addresses are returned in response to a query. @@ -472,18 +458,6 @@ delayed by a time uniformly distributed between 0 and 200 ms. If an LLMNR query sent over UDP is not resolved within the timeout interval (LLMNR_TIMEOUT), then a sender MAY repeat the transmission of - - - -Esibov, Aboba & Thaler Standards Track [Page 8] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - the query in order to assure that it was received by a host capable of responding to it. Since a multicast query sender cannot know beforehand whether it will receive no response, one response, or more than one @@ -495,10 +469,22 @@ waits for LLMNR_TIMEOUT if no response has been received. LLMNR implementations SHOULD dynamically estimate the timeout value (LLMNR_TIMEOUT) based on the last response received, on a per-interface -basis, using the algorithms described in [RFC2988], with a minimum -timeout value of 300 ms. Retransmission of UDP queries SHOULD NOT be -attempted more than 3 times. Where LLMNR queries are sent using TCP, -retransmission is handled by the transport layer. +basis. The algorithms described in [RFC2988] are suggested, with a +minimum timeout value of 300 ms. Retransmission of UDP queries SHOULD +NOT be attempted more than 3 times. Where LLMNR queries are sent using + + + +Esibov, Aboba & Thaler Standards Track [Page 8] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + +TCP, retransmission is handled by the transport layer. 2.7. DNS TTL @@ -532,18 +518,6 @@ additional restrictions: [2] Where a DNS server is configured, by default a sender SHOULD send LLMNR queries only for names that are either unqualified or exist within the default domain. Where no - - - -Esibov, Aboba & Thaler Standards Track [Page 9] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - DNS server is configured, an LLMNR query MAY be sent for any name. @@ -558,6 +532,18 @@ INTERNET-DRAFT LLMNR 12 May 2003 RRs returned in LLMNR responses MUST only include values that are valid on the local interface, such as IPv4 or IPv6 addresses valid on the local link or names defended using the mechanism described in Section 4. + + + +Esibov, Aboba & Thaler Standards Track [Page 9] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + In particular: [1] If a link-scope IPv6 address is returned in a AAAA RR, that @@ -588,9 +574,23 @@ to resolve unqualified host names. 3.2. LLMNR configuration LLMNR usage MAY be configured manually or automatically on a per -interface basis. By default, LLMNR responders SHOULD be enabled on all +interface basis. By default, LLMNR Responders SHOULD be enabled on all interfaces, at all times. +Since IPv4 and IPv6 utilize distinct configuration mechanisms, it is +possible for a dual stack host to be configured with the address of a +DNS server over IPv4, while remaining unconfigured with a DNS server +suitable for use over IPv6. + +In these situations, a dual stack host will send AAAA queries to the +configured DNS server over IPv4. However, an IPv6-only host +unconfigured with a DNS server suitable for use over IPv6 will be unable +to resolve names using DNS. Automatic IPv6 DNS configuration mechanisms +(such as [DHCPv6DNS] and [DNSDisc]) are not yet widely deployed, and not +all DNS servers support IPv6. Therefore lack of IPv6 DNS configuration +may be a common problem in the short term, and LLMNR may prove useful in +enabling linklocal name resolution over IPv6. + @@ -601,35 +601,30 @@ Esibov, Aboba & Thaler Standards Track [Page 10] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 -Since IPv4 and IPv6 utilize distinct configuration mechanisms, it is -possible for a dual stack host to be configured with the address of a -DNS server over IPv4, while remaining unconfigured with a DNS server -suitable for use over IPv6. In these situations, a dual stack host will -send AAAA queries to the configured DNS server over IPv4. - -However, an IPv6-only host unconfigured with a DNS server suitable for -use over IPv6 will be unable to resolve names using DNS. Since -automatic IPv6 DNS configuration mechanisms (such as [DHCPv6DNS] and -[DNSDisc]) are not yet widely deployed, and not all DNS servers support -IPv6, lack of IPv6 DNS configuration may be a common problem in the -short term, and LLMNR may prove useful in enabling linklocal name -resolution over IPv6. - -For example, a home network may provide a DHCPv4 server but may not -support DHCPv6 for DNS configuration [DHCPv6DNS]. In such a -circumstance, IPv6-only hosts will not be configured with a DNS server. -Where a DNS server is configured but does not support dynamic client -update over IPv6 or DHCPv6-based dynamic update, hosts on the home -network will not be able to dynamically register or resolve the names of -local IPv6 hosts. If the configured DNS server responds to AAAA RR +Where a DHCPv4 server is available but not a DHCPv6 server [DHCPv6DNS], +IPv6-only hosts may not be configured with a DNS server. Where there is +no DNS server authoritative for the names of hosts on the local network +or the authoritative DNS server does not support dynamic client update +over IPv6 or DHCPv6-based dynamic update, hosts on the home network will +not be able to dynamically register or resolve the names of local IPv6 +hosts. For example, if the configured DNS server responds to AAAA RR queries sent over IPv4 or IPv6 with an authoritative name error (RCODE=3), then it will not be possible to resolve the names of IPv6-only hosts. In this situation, LLMNR over IPv6 can be used for local name resolution. +Similarly, if a DHCPv4 server is available providing DNS server +configuration, and the DNS server authoritative for the A RRs of local +hosts also supports either dynamic client update over IPv4 or +DHCPv4-based dynamic update, then resolution of the names of local IPv4 +hosts can be provided over IPv4 without LLMNR. However, if there is no +DNS server authoritative for the names of local hosts, or the +authoritative DNS server does not support dynamic update, then LLMNR may +prove useful in enabling linklocal name resoltion over IPv4. + Where DHCPv4 or DHCPv6 is implemented, DHCP options can be used to configure LLMNR on an interface. The LLMNR Enable Option, described in [LLMNREnable], can be used to explicitly enable or disable use of LLMNR @@ -638,19 +633,24 @@ in which order DNS itself is used for name resolution. The order in which various name resolution mechanisms should be used can be specified using the Name Service Search Option for DHCP [RFC2937]. -3.2.1. Configuration consistency - It is possible that DNS configuration mechanisms will go in and out of service. In these circumstances, it is possible for hosts within an administrative domain to be inconsistent in their DNS configuration. For example, where DHCP is used for configuring DNS servers, one or more -DHCP servers can go down. As a result, hosts configured prior to the +DHCP servers can fail. As a result, hosts configured prior to the outage will be configured with a DNS server, while hosts configured after the outage will not. Alternatively, it is possible for the DNS configuration mechanism to continue functioning while configured DNS servers fail. +Unless unconfigured hosts periodically retry configuration, an outage in +the DNS configuration mechanism will result in hosts continuing to use +LLMNR even once the outage is repaired. Since LLMNR only enables +linklocal name resolution, this represents an unnecessary degradation in +capabilities. As a result, it is recommended that hosts without a +configured DNS server periodically attempt to obtain DNS configuration. +A default retry interval of two (2) minutes is RECOMMENDED. @@ -661,17 +661,9 @@ Esibov, Aboba & Thaler Standards Track [Page 11] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 -Unless unconfigured hosts periodically retry configuration, an outage in -the DNS configuration mechanism will result in hosts continuing to -prefer LLMNR even once the outage is repaired. Since LLMNR only enables -linklocal name resolution, this represents an unnecessary degradation in -capabilities. As a result, it is recommended that hosts without a -configured DNS server periodically attempt to obtain DNS configuration. -A default retry interval of two (2) minutes is RECOMMENDED. - 4. Conflict resolution The sender MUST anticipate receiving multiple replies to the same LLMNR @@ -713,6 +705,14 @@ resource record. By default, a host SHOULD be configured to behave as though all RRs are UNIQUE. Uniqueness verification is carried out when the host: + - starts up or + - is configured to respond to the LLMNR queries on an interface or + - is configured to respond to the LLMNR queries using additional + UNIQUE resource records. + +When a host that owns a UNIQUE record receives an LLMNR query for that +record, the host MUST respond. After the client receives a response, it + Esibov, Aboba & Thaler Standards Track [Page 12] @@ -721,32 +721,21 @@ Esibov, Aboba & Thaler Standards Track [Page 12] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 - - starts up or - - is configured to respond to the LLMNR queries on an interface or - - is configured to respond to the LLMNR queries using additional - UNIQUE resource records. - -When a host that owns a UNIQUE record receives an LLMNR query for that -record, the host MUST respond. After the client receives a response, it MUST check whether the response arrived on another interface. If this is the case, then the client can use the UNIQUE resource record in response to LLMNR queries. If not, then it MUST NOT use the UNIQUE resource record in response to LLMNR queries. The name conflict detection mechanism doesn't prevent name conflicts -when previously partitioned segments are connected by a bridge. In such -a situation, name conflicts are detected when a sender receives more -than one response to its LLMNR multicast query. In this case, the -sender sends the first response that it received to all responders that -responded to this query except the first one, using UDP unicast. A host -that receives a query response containing a UNIQUE resource record that -it owns, even if it didn't send such a query, MUST verify that no other -host within the LLMNR scope is authoritative for the same name, using -the mechanism described above. Based on the result, the host detects -whether there is a name conflict and acts accordingly. +when previously partitioned segments are connected by a bridge. In order +to minimize the chance of conflicts in such a situation, it is +recommended that steps be taken to ensure hostname uniqueness. For +example, the hostname could be chosen randomly from a large pool of +potential names, or the hostname could be assigned via a process +designed to guarantee uniqueness. 4.1. Considerations for Multiple Interfaces @@ -773,6 +762,17 @@ to respond with a host RR for "myhost" on the interface on the right (see Figure 1). The multi-homed host may, however, be configured to use the "myhost" name on the interface on the left. +Since names are only unique per-link, hosts on different links could be +using the same name. If an LLMNR client sends requests over multiple +interfaces, and receives replies from more than one, the result returned +to the client is defined by the implementation. The situation is +illustrated in figure 2. + + + + + + Esibov, Aboba & Thaler Standards Track [Page 13] @@ -781,15 +781,9 @@ Esibov, Aboba & Thaler Standards Track [Page 13] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 -Since names are only unique per-link, hosts on different links could be -using the same name. If an LLMNR client sends requests over multiple -interfaces, and receives replies from more than one, the result returned -to the client is defined by the implementation. The situation is -illustrated in figure 2. - ---------- ---------- | | | | [A] [myhost] [A] @@ -802,11 +796,6 @@ send LLMNR queries on both interfaces. When host myhost sends a query for the host RR for name "A" it will receive a response from hosts on both interfaces. -Host myhost will then send the first responder's response to the second -responder, who will attempt to verify the uniqueness of host RR for its -name, but will not discover a conflict, since the conflicting host -resides on a different link. Therefore it will continue using its name. - Host myhost cannot distinguish between the situation shown in Figure 2, and that shown in Figure 3 where no conflict exists. @@ -833,17 +822,6 @@ structure exposes the scope within which each scoped address exists, and this structure can be used for both IPv4 (using v4-mapped IPv6 addresses) and IPv6 addresses. - - -Esibov, Aboba & Thaler Standards Track [Page 14] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - Following the example in Figure 2, an application on 'myhost' issues the request getaddrinfo("A", ...) with ai_family=AF_INET6 and ai_flags=AI_ALL|AI_V4MAPPED. LLMNR requests will be sent from both @@ -854,6 +832,18 @@ both hosts responding to the name 'A'. Link-local addresses will have a sin6_scope_id value that disambiguates which interface is used to reach the address. Of course, to the application, Figures 2 and 3 are still indistinguishable, but this API allows the application to communicate + + + +Esibov, Aboba & Thaler Standards Track [Page 14] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + successfully with any address in the list. 5. Security Considerations @@ -891,19 +881,6 @@ exposure to such threats by utilizing queries sent to a link-scope multicast address, as well as setting the TTL (IPv4) or Hop Limit (IPv6) fields to one (1) on both queries and responses. - - - - -Esibov, Aboba & Thaler Standards Track [Page 15] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - While this limits the ability of off-link attackers to spoof LLMNR queries and responses, it does not eliminate it. For example, it is possible for an attacker to spoof a response to a frequent query (such @@ -915,6 +892,18 @@ attackers can be present on the same link. These threats are most serious in wireless networks such as 802.11, since attackers on a wired network will require physical access to the home network, while wireless attackers may reside outside the home. + + + +Esibov, Aboba & Thaler Standards Track [Page 15] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + Link-layer security can be of assistance against these threats if it is available. @@ -952,18 +941,6 @@ cache, once poisoned, would take precedence over the DNS cache, eliminating the benefits of cache separation. As a result, LLMNR is best thought of as a name resolution mechanism of last resort. - - - -Esibov, Aboba & Thaler Standards Track [Page 16] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - 5.3. Cache and port separation In order to prevent responses to LLMNR queries from polluting the DNS @@ -976,6 +953,17 @@ decreases reliance on it. LLMNR operates on a separate port from DNS, reducing the likelihood that a DNS server will unintentionally respond to an LLMNR query. + + +Esibov, Aboba & Thaler Standards Track [Page 16] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + 5.4. Authentication LLMNR does not require use of DNSSEC, and as a result, responses to @@ -1012,18 +1000,6 @@ allocation of a link-scope multicast IPv6 address. [RFC2365] Meyer, D., "Administratively Scoped IP Multicast", BCP 23, RFC 2365, July 1998. - - - -Esibov, Aboba & Thaler Standards Track [Page 17] - - - - - -INTERNET-DRAFT LLMNR 12 May 2003 - - [RFC2373] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 2373, July 1998. @@ -1036,6 +1012,18 @@ INTERNET-DRAFT LLMNR 12 May 2003 [RFC2988] Paxson, V. and M. Allman, "Computing TCP's Retransmission Timer", RFC 2988, November 2000. + + + +Esibov, Aboba & Thaler Standards Track [Page 17] + + + + + +INTERNET-DRAFT LLMNR 21 May 2003 + + 8. Informative References [RFC1536] Kumar, A., et. al., "DNS Implementation Errors and @@ -1073,6 +1061,18 @@ INTERNET-DRAFT LLMNR 12 May 2003 draft (work in progress), draft-ietf-zeroconf- ipv4-linklocal-07.txt, August 2002. +[LLMNREnable] Guttman, E., "DHCP LLMNR Enable Option", Internet draft + (work in progress), draft-guttman-mdns-enable-02.txt, + April 2002. + +[NodeInfo] Crawford, M., "IPv6 Node Information Queries", Internet + draft (work in progress), draft-ietf-ipn-gwg-icmp-name- + lookups-09.txt, May 2002. + + + + + Esibov, Aboba & Thaler Standards Track [Page 18] @@ -1081,17 +1081,9 @@ Esibov, Aboba & Thaler Standards Track [Page 18] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 -[LLMNREnable] Guttman, E., "DHCP LLMNR Enable Option", Internet draft - (work in progress), draft-guttman-mdns-enable-02.txt, - April 2002. - -[NodeInfo] Crawford, M., "IPv6 Node Information Queries", Internet - draft (work in progress), draft-ietf-ipn-gwg-icmp-name- - lookups-09.txt, May 2002. - Acknowledgments This work builds upon original work done on multicast DNS by Bill @@ -1135,13 +1127,21 @@ EMail: dthaler@microsoft.com + + + + + + + + Esibov, Aboba & Thaler Standards Track [Page 19] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 Intellectual Property Statement @@ -1201,7 +1201,7 @@ Esibov, Aboba & Thaler Standards Track [Page 20] -INTERNET-DRAFT LLMNR 12 May 2003 +INTERNET-DRAFT LLMNR 21 May 2003 Open Issues @@ -1213,7 +1213,7 @@ http://www.drizzle.com/~aboba/DNSEXT/llmnrissues.html Expiration Date -This memo is filed as , and expires +This memo is filed as , and expires November 22, 2003. From 2ea15c5bd21d09b023f8e4971a4208c37f3d35cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatuya=20JINMEI=20=E7=A5=9E=E6=98=8E=E9=81=94=E5=93=89?= Date: Wed, 28 May 2003 02:36:16 +0000 Subject: [PATCH 06/75] s/"localnet"/"localnets"/ --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 9b500b3685..95942d4d67 100644 --- a/CHANGES +++ b/CHANGES @@ -306,7 +306,7 @@ 1366. [contrib] queryperf usage was incomplete. Add '-h' for help. -1365. [func] "localhost" and "localnet" acls now include IPv6 +1365. [func] "localhost" and "localnets" acls now include IPv6 addresses / prefixes. 1364. [func] Log file name when unable to open memory statistics From f09ee013d265cbe7a0e8093ab525d58310d29bb8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 29 May 2003 01:56:22 +0000 Subject: [PATCH 07/75] new draft --- ...-dnsext-dnssec-2535typecode-change-01.txt} | 23 ++++----- ...xt => draft-ietf-dnsext-rfc1886bis-03.txt} | 48 +++++++++---------- 2 files changed, 34 insertions(+), 37 deletions(-) rename doc/draft/{draft-ietf-dnsext-dnssec-2535typecode-change-00.txt => draft-ietf-dnsext-dnssec-2535typecode-change-01.txt} (95%) rename doc/draft/{draft-ietf-dnsext-rfc1886bis-02.txt => draft-ietf-dnsext-rfc1886bis-03.txt} (89%) diff --git a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt similarity index 95% rename from doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt rename to doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt index aa014d876d..a28552912b 100644 --- a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-00.txt +++ b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt @@ -1,12 +1,9 @@ - - - INTERNET-DRAFT Samuel Weiler -Expires: November 2003 May 12, 2003 +Expires: November 2003 May 22, 2003 Legacy Resolver Compatibility for Delegation Signer - draft-ietf-dnsext-dnssec-2535typecode-change-00.txt + draft-ietf-dnsext-dnssec-2535typecode-change-01.txt Status of this Memo @@ -202,11 +199,14 @@ Abstract NOT receive special treatment. As an example, if a SIG is included in a signed zone, there MUST be an RRSIG for it. - As a clarification to previous documents, NSEC can appear in the - authority section of an answer at any time, not just in negative - answers. The mere presence of an NSEC record in the answer or - authority section of an answer with RCODE=NOERROR, MUST NOT be - interpreted as a negative answer. The NSEC must be validated. + As a clarification to previous documents, many positive responses, + including wildcard proofs and insecure referrals, will contain NSEC + RRs. As a result, resolvers MUST NOT treat answers with NSEC RRs + as negative answers merely because they contain an NSEC. A + resolver SHOULD either ignore the NSEC, as a DNSSEC-unaware (or + 2535-aware) resolver would, or validate the NSEC and check its + applicability and interpretation as described in [RFC2535] and + [DS]. 4. IANA Considerations @@ -284,6 +284,3 @@ Abstract weiler@tislabs.com - - - diff --git a/doc/draft/draft-ietf-dnsext-rfc1886bis-02.txt b/doc/draft/draft-ietf-dnsext-rfc1886bis-03.txt similarity index 89% rename from doc/draft/draft-ietf-dnsext-rfc1886bis-02.txt rename to doc/draft/draft-ietf-dnsext-rfc1886bis-03.txt index 52c8333ce0..f1cccf241c 100644 --- a/doc/draft/draft-ietf-dnsext-rfc1886bis-02.txt +++ b/doc/draft/draft-ietf-dnsext-rfc1886bis-03.txt @@ -1,14 +1,14 @@ Internet Engineering Task Force S. Thomson, Cisco INTERNET-DRAFT C. Huitema, Microsoft -February 28, 2003 V. Ksinant, 6WIND -Expires August 28, 2003 M. Souissi, AFNIC +May 12, 2003 V. Ksinant, 6WIND +Expires November 12, 2003 M. Souissi, AFNIC DNS Extensions to support IP version 6 - + Status of this Memo @@ -30,7 +30,7 @@ Status of this Memo To view the list Internet-Draft Shadow Directories, see http://www.ietf.org/shadow.html. - This Internet Draft expires August 28, 2003. + This Internet Draft expires November 12, 2003. @@ -54,9 +54,9 @@ Abstract -draft-ietf-dnsext-rfc1886bis-02.txt [Page 1] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 1] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 Table of Contents @@ -109,9 +109,9 @@ Table of Contents that has more than one IPv6 address must have more than one such record. -draft-ietf-dnsext-rfc1886bis-02.txt [Page 2] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 2] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 2.1 AAAA record type @@ -165,9 +165,9 @@ INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6. ARPA. -draft-ietf-dnsext-rfc1886bis-02.txt [Page 3] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 3] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 3. MODIFICATIONS TO EXISTING QUERY TYPES @@ -204,7 +204,7 @@ APPENDIX A: Changes from RFC 1886 EXISTING QUERY TYPES" - Added security considerations. - Updated references : - * From RFC 1884 to RFC 2373 (IP Version 6 Addressing + * From RFC 1884 to RFC 3513 (IP Version 6 Addressing Architecture). * From "work in progress" to RFC 2893 (Transition Mechanisms for IPv6 Hosts and Routers). @@ -219,9 +219,9 @@ APPENDIX A: Changes from RFC 1886 -draft-ietf-dnsext-rfc1886bis-02.txt [Page 4] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 4] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 Acknowledgements @@ -244,16 +244,13 @@ Normative References tion", STD 13, RFC 1035, USC/Information Sciences Institute, November 1987. - [3] Hinden, R., and S. Deering, "IP Version 6 Addressing - Architecture", RFC 2373, Nokia, Cisco, July 1998. - This RFC is being updated. The current draft is - "draft-ietf-ipngwg-addr-arch-v3-11.txt", Hinden, R., and - S. Deering, October 25, 2002 - Informative References + [3] Hinden, R., and S. Deering, "Internet Protocol Version 6 (IPv6) + Addressing Architecture", RFC 3513, Nokia, Cisco, April 2003. + [4] Gilligan, R., and E. Nordmark, "Transition Mechanisms for IPv6 Hosts and Routers", RFC 2893, FreeGate Corp., Sun Microsystems Inc., August 2000. @@ -275,9 +272,12 @@ Informative References RFC 2845, ISC, NAI Labs, Motorola, Nominum, May 2000. -draft-ietf-dnsext-rfc1886bis-02.txt [Page 5] + + + +draft-ietf-dnsext-rfc1886bis-03.txt [Page 5] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 Authors' Addresses @@ -329,9 +329,9 @@ Authors' Addresses -draft-ietf-dnsext-rfc1886bis-02.txt [Page 6] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 6] -INTERNET-DRAFT DNS Extensions to support IP version 6 February 2003 +INTERNET-DRAFT DNS Extensions to support IP version 6 May 2003 Full Copyright Statement @@ -387,4 +387,4 @@ Full Copyright Statement information to the IETF Executive Director. -draft-ietf-dnsext-rfc1886bis-02.txt [Page 7] +draft-ietf-dnsext-rfc1886bis-03.txt [Page 7] From 7ba2d9d567a61b351c0b28dbbdb2d4a87e156438 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 29 May 2003 22:03:38 +0000 Subject: [PATCH 08/75] new draft --- ...-ietf-dnsext-keyrr-key-signing-flag-06.txt | 560 ----------------- ...-ietf-dnsext-keyrr-key-signing-flag-07.txt | 562 ++++++++++++++++++ 2 files changed, 562 insertions(+), 560 deletions(-) delete mode 100644 doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-06.txt create mode 100644 doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt diff --git a/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-06.txt b/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-06.txt deleted file mode 100644 index dba5f909f8..0000000000 --- a/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-06.txt +++ /dev/null @@ -1,560 +0,0 @@ - - -DNS Extensions O. Kolkman -Internet-Draft RIPE NCC -Expires: August 18, 2003 J. Schlyter - Carlstedt Research & - Technology - E. Lewis - ARIN - February 17, 2003 - - - KEY RR Key-Signing Key (KSK) Flag - draft-ietf-dnsext-keyrr-key-signing-flag-06 - -Status of this Memo - - This document is an Internet-Draft and is in full conformance with - all provisions of Section 10 of RFC2026. - - Internet-Drafts are working documents of the Internet Engineering - Task Force (IETF), its areas, and its working groups. Note that other - groups may also distribute working documents as Internet-Drafts. - - Internet-Drafts are draft documents valid for a maximum of six months - and may be updated, replaced, or obsoleted by other documents at any - time. It is inappropriate to use Internet-Drafts as reference - material or to cite them other than as "work in progress." - - The list of current Internet-Drafts can be accessed at http:// - www.ietf.org/ietf/1id-abstracts.txt. - - The list of Internet-Draft Shadow Directories can be accessed at - http://www.ietf.org/shadow.html. - - This Internet-Draft will expire on August 18, 2003. - -Copyright Notice - - Copyright (C) The Internet Society (2003). All Rights Reserved. - -Abstract - - With the DS resource record the concept of key-signing and - zone-signing keys has been introduced. During key-exchanges with the - parent there is a need to differentiate between these zone- and - key-signing keys. We propose a flag to indicate which key is used as - key-signing key. - - - - - - -Kolkman, et al. Expires August 18, 2003 [Page 1] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - -Table of Contents - - 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 2. The Key-Signing Key (KSK) Flag . . . . . . . . . . . . . . . . 4 - 3. DNSSEC Protocol Changes . . . . . . . . . . . . . . . . . . . 4 - 4. Operational Guidelines . . . . . . . . . . . . . . . . . . . . 4 - 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 - 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 - 7. Internationalization Considerations . . . . . . . . . . . . . 5 - 8. Document Changes . . . . . . . . . . . . . . . . . . . . . . . 6 - 8.1 draft version 00 -> 01 . . . . . . . . . . . . . . . . . . . . 6 - 8.2 draft version 01 -> 02 . . . . . . . . . . . . . . . . . . . . 6 - 8.3 draft version 02 -> 03 . . . . . . . . . . . . . . . . . . . . 6 - 8.4 draft version 03 -> 04 . . . . . . . . . . . . . . . . . . . . 6 - 8.5 draft version 04 -> 05 . . . . . . . . . . . . . . . . . . . . 6 - 8.6 draft version 05 -> 06 . . . . . . . . . . . . . . . . . . . . 7 - 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 - Normative References . . . . . . . . . . . . . . . . . . . . . 7 - Informative References . . . . . . . . . . . . . . . . . . . . 8 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 8 - Intellectual Property and Copyright Statements . . . . . . . . 9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kolkman, et al. Expires August 18, 2003 [Page 2] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - -1. Introduction - - "All keys are equal but some keys are more equal than others" [6] - - With the definition of the DS Resource Record [5] the concept of a - key being either a key-signing key (KSK) or zone-signing key(ZSK) has - been introduced into DNSSEC[3]. A KSK is one that signs the zone's - KEY RR set, and is a key that is either used to generate a DS RR or - is distributed to resolvers that use the key as the root of a trusted - subtree[4]. - - In early deployment tests, the use of two keys has been prevalent, - one key for exchange with delegating zone and the other key to sign - the zone. These dual roles were defined to allow a zone to more - rapidly change the ZSK without a high volume of traffic needed to - make new DS RRs. Because of this, participants have had to manage - two keys at all times, one acting as a KSK and the other ZSK (per - cryptographic algorithm). In practice, participants used a longer - key for the KSK or resorted to writing the footprints on paper. - - There is a need to differentiate between a KSK and a ZSK by the zone - administrator. This need is driven by knowing which keys are to be - sent for DS RRs, which keys are to be distributed to resolvers, and - which keys are fed to the signer application at the appropriate time. - - While addressing this need it is important that the distinction is - made in a way compatible with single key zone, those whose KSK and - ZSK is one in the same. The best way to address this is to define a - bit setting in the KEY RR flags field that is ignored in the - resolver. This allows for both dual key and single key management to - be workable. - - The key words "MAY","MAY NOT", "MUST", "MUST NOT", "REQUIRED", - "RECOMMENDED", "SHOULD", and "SHOULD NOT" in this document are to be - interpreted as described in RFC2119. - - - - - - - - - - - - - - - - -Kolkman, et al. Expires August 18, 2003 [Page 3] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - -2. The Key-Signing Key (KSK) Flag - - 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | flags |K| protocol | algorithm | - | |S| | | - | |K| | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | / - / public key / - / / - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - - KEY RR Format - - The KSK bit (TBD) in the flags field is assigned to be the - key-signing key flag. If the the bit is set to 1 the key is intended - to be used as key-signing key. One SHOULD NOT assign special meaning - to the key if the bit is set to 0. The document proposes using the - current 15th bit [1] as the KSK bit. This way operators can recognize - the key-signing by the even or odd-ness of the decimal representation - of the flag field. - -3. DNSSEC Protocol Changes - - The bit MUST NOT be used during the resolving and verification - process. The KSK flag is only used to provide a hint about the - different administrative properties of the key and therefore the use - of the KSK flag does not change the DNS resolution and resolution - protocol. - -4. Operational Guidelines - - The KSK bit is set by the key-generator and used by the zone signer: - - The KSK bit is used to indicate that the key represented in the KEY - RR is intended to sign the KEY RR set of the zone. As the KSK bit is - within the data that is used to compute a KEY RR's footprint, - changing the KSK bit will change the identity of the key within DNS. - - When a key pair is created, the operator needs to indicate whether - the KSK bit is to be set in the KEY RR. The KSK bit is recommended - whenever the public key of the key pair will be distributed to the - parent zone to build the authentication chain or if the public key is - to be distributed for static configuration in verifiers. - - When signing a zone, it is intended that the key(s) with the KSK bit - - - -Kolkman, et al. Expires August 18, 2003 [Page 4] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - - set (if such keys exist) are used to sign the KEY RR set of the zone. - The same key can be used to sign the rest of the zone data too. It - is conceivable that not all keys with a KSK bit set will sign the KEY - RR set, such keys might be pending retirement or not yet in use. - - When verifying a RR set, the KSK bit is not intended to play a role. - How the key is used by the verifier is not intended to be a - consideration at key creation time. - - Although the KSK flag provides a hint on which key to be used as - trusted root, administrators can choose to ignore the flag when - configuring a trusted root for their resolvers. - - Using the flag a key roll over can be automated. The parent can use - an existing trust relation to verify key sets in which a new key with - the KSK flag appears. - -5. Security Considerations - - As stated in Section 3 the flag is not to used in the resolution - protocol or to determine the security status of a key. The flag is to - be used for administrative purposes only. - - No trust in a key should be inferred from this flag - trust MUST be - inferred from an existing chain of trust or an out-of-band exchange. - - Since this flag might be used for automating key exchanges, we think - the following consideration is in place. - - Automated mechanisms for roll over of the DS RR might be vulnerable - to a class of replay attacks. This might happen after a key exchange - where a key set, containing two keys with the KSK flag set, is sent - to the parent. The parent verifies the key set with the existing - trust relation and creates the new DS RR from the key that the - current DS is not pointing to. This key exchange might be replayed. - Parents are encouraged to implement a replay defence. A simple - defence can be based on a registry of keys that have been used to - generate DS RRs during the most recent roll over. - -6. IANA Considerations - - draft-ietf-dnsext-restrict-key-for-dnssec [1] eliminates all flags - field except for the zone key flag in the KEY RR. We propose to use - the 15'th bit as the KSK bit; the decimal representation of the - flagfield will then be odd for key-signing keys. - -7. Internationalization Considerations - - - - -Kolkman, et al. Expires August 18, 2003 [Page 5] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - - There are no internationalization considerations. - -8. Document Changes - -8.1 draft version 00 -> 01 - - Clean up of references and correction of typos; - - modified Abstract text a little; - - Added explicit warning for replay attacks to the security section; - - Removed the text that hinted on a distinction between a - key-signing key configured in resolvers and in parent zones. - - -8.2 draft version 01 -> 02 - - Added IANA and Internationalization section. - - Split references into informational and normative. - - Spelling and style corrections. - - -8.3 draft version 02 -> 03 - - Changed the name from KS to KSK, this to prevent confusion with - NS, DS and other acronyms in DNS. - - In the security section: Rewrote the section so that it does not - suggest to use a particular type of registry and that it is clear - that a key registry is only one of the defences possible. - - Spelling and style corrections. - - -8.4 draft version 03 -> 04 - - Text has been made consistent with the statement: 'No special - meaning should be assigned to the bit not being set.' - - Made explicit that the keytag changes in SIG RR. - - -8.5 draft version 04 -> 05 - - One occurrence of must and one occurrence of should uppercased - - - -Kolkman, et al. Expires August 18, 2003 [Page 6] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - - (RFC2119). - - Reordering of sentences in section 3, so that the point of the bit - NOT being used in resolving is made directly. - - To make explicit that the KSK is used at key generation and at - signing time I added the first sentence to section 4. - - Some minor style and spelling corrections. - - -8.6 draft version 05 -> 06 - - References and acronyms where stripped from the Abstract. the - Introduction and the the Operational Guideline section were - rewritten in such a way that the draft does not suggest any use of - the bit in the verification process and that the draft does not - enforce, but suggests, the use of a key- and zone-signing key. - - Added 'and verification' in the sentence "MUST NOT be used during - the resolving and verification process" (protocol changes - section). - - -9. Acknowledgements - - The ideas documented in this document are inspired by communications - we had with numerous people and ideas published by other folk. Among - others Mark Andrews, Olafur Gudmundsson, Daniel Karrenberg, Dan - Massey, Marcos Sanz and Sam Weiler have contributed ideas and - provided feedback. - - This document saw the light during a workshop on DNSSEC operations - hosted by USC/ISI. - -Normative References - - [1] Massey, D. and S. Rose, "Limiting the Scope of the KEY Resource - Record out", draft-ietf-dnsext-restrict-key-for-dnssec-04 (work - in progress), September 2002. - - [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement - Levels", BCP 14, RFC 2119, March 1997. - - [3] Eastlake, D., "Domain Name System Security Extensions", RFC - 2535, March 1999. - - [4] Lewis, E., "DNS Security Extension Clarification on Zone - - - -Kolkman, et al. Expires August 18, 2003 [Page 7] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - - Status", RFC 3090, March 2001. - -Informative References - - [5] Gudmundsson, O., "Delegation Signer Resource Record", - draft-ietf-dnsext-delegation-signer-12 (work in progress), - December 2002. - - [6] Orwell, G. and R. Steadman (illustrator), "Animal Farm; a Fairy - Story"", ISBN 0151002177 (50th anniversery edition), April 1996. - - -Authors' Addresses - - Olaf M. Kolkman - RIPE NCC - Singel 256 - Amsterdam 1016 AB - NL - - Phone: +31 20 535 4444 - EMail: olaf@ripe.net - URI: http://www.ripe.net/ - - - Jakob Schlyter - Carlstedt Research & Technology - Stora Badhusgatan 18-20 - Goteborg SE-411 21 - Sweden - - EMail: jakob@crt.se - URI: http://www.crt.se/~jakob/ - - - Edward P. Lewis - ARIN - 3635 Concorde Parkway Suite 200 - Chantilly, VA 20151 - US - - Phone: +1 703 227 9854 - EMail: edlewis@arin.net - URI: http://www.arin.net/ - - - - - - - -Kolkman, et al. Expires August 18, 2003 [Page 8] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - -Intellectual Property Statement - - The IETF takes no position regarding the validity or scope of any - intellectual property or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; neither does it represent that it - has made any effort to identify any such rights. Information on the - IETF's procedures with respect to rights in standards-track and - standards-related documentation can be found in BCP-11. Copies of - claims of rights made available for publication and any assurances of - licenses to be made available, or the result of an attempt made to - obtain a general license or permission for the use of such - proprietary rights by implementors or users of this specification can - be obtained from the IETF Secretariat. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights which may cover technology that may be required to practice - this standard. Please address the information to the IETF Executive - Director. - - -Full Copyright Statement - - Copyright (C) The Internet Society (2003). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assignees. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - - - -Kolkman, et al. Expires August 18, 2003 [Page 9] - -Internet-Draft KEY RR Key-Signing Key (KSK) Flag February 2003 - - - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kolkman, et al. Expires August 18, 2003 [Page 10] - diff --git a/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt b/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt new file mode 100644 index 0000000000..c360faf9dc --- /dev/null +++ b/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt @@ -0,0 +1,562 @@ + + + + +DNS Extensions O. Kolkman +Internet-Draft RIPE NCC +Expires: July 2, 2003 J. Schlyter + Carlstedt Research & + Technology + E. Lewis + ARIN + January 2003 + + + KEY RR Secure Entry Point (SEP) Flag + draft-ietf-dnsext-keyrr-key-signing-flag-07 + +Status of this Memo + + This document is an Internet-Draft and is in full conformance with + all provisions of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as Internet- + Drafts. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + The list of current Internet-Drafts can be accessed at http:// + www.ietf.org/ietf/1id-abstracts.txt. + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + + This Internet-Draft will expire on July 2, 2003. + +Copyright Notice + + Copyright (C) The Internet Society (2003). All Rights Reserved. + +Abstract + + With the DS resource record the concept of a key acting as a secure + entry point has been introduced. During key-exchanges with the + parent there is a need to differentiate secure entry point keys from + other keys in the KEY resource record set. A flag bit in the KEY RR + is defined to indicate that KEY is to be used as a secure entry + point. + + + + +Kolkman, et al. Expires July 2, 2003 [Page 1] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 2. The Secure Entry Point (SEP) Flag . . . . . . . . . . . . . . 4 + 3. DNSSEC Protocol Changes . . . . . . . . . . . . . . . . . . . 4 + 4. Operational Guidelines . . . . . . . . . . . . . . . . . . . . 4 + 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 + 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 + 7. Internationalization Considerations . . . . . . . . . . . . . 6 + 8. Document Changes . . . . . . . . . . . . . . . . . . . . . . . 6 + 8.1 draft version 00 -> 01 . . . . . . . . . . . . . . . . . . . . 6 + 8.2 draft version 01 -> 02 . . . . . . . . . . . . . . . . . . . . 6 + 8.3 draft version 02 -> 03 . . . . . . . . . . . . . . . . . . . . 6 + 8.4 draft version 03 -> 04 . . . . . . . . . . . . . . . . . . . . 6 + 8.5 draft version 04 -> 05 . . . . . . . . . . . . . . . . . . . . 7 + 8.6 draft version 05 -> 06 . . . . . . . . . . . . . . . . . . . . 7 + 8.7 draft version 06 -> 07 . . . . . . . . . . . . . . . . . . . . 7 + 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 + Normative References . . . . . . . . . . . . . . . . . . . . . 7 + Informative References . . . . . . . . . . . . . . . . . . . . 8 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 8 + Full Copyright Statement . . . . . . . . . . . . . . . . . . . 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 2] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +1. Introduction + + "All keys are equal but some keys are more equal than others" [6] + + With the definition of the DS Resource Record [5] it has become + important to differentiate between the zone keys that are (to be) + pointed to by parental DS RRs and other keys in the zone. We refer + to these keys as Secure Entry Point (SEP) keys. A SEP key is either + used to generate a DS RR or is distributed to resolvers that use the + key as the root of a trusted subtree[3]. + + In early deployment tests, the use of two (kinds of) keys in each + zone has been prevalent. One key is used to sign just the zone's KEY + RR set and is the key referenced by a DS RR at the parent or + configured statically in a resolver. Another key is used to sign the + rest of the zone's data sets. The former key is called a key-signing + key (KSK) and the latter is called a zone-signing key (ZSK). In + practice there have been usually one of each kind of key, but there + will be multiples of each at times. + + It should be noted that division of zone keys into KSK's and ZSK's is + not mandatory in any definition of DNSSEC, not even with the + introduction of the DS RR. But, in testing, this distinction has + been helpful when designing key roll over (key super-cession) + schemes. Given that the distinction has proven helpful, the labels + KSK and ZSK have begun to stick. + + The reason for the term "SEP" is a result of the observation that the + distinction between KSK and ZSK is only significant to the signer + element of the DNS. Servers, resolvers and verifiers do not need to + make the distinction. Further, distinguishing between a KSK and ZSK + requires more than one bit, as a key could be fulfilling both roles. + Hence, there is no definition for a ZSK bit and another for a KSK + bit, just a single bit to assist operational procedures to correctly + generate DS RRs, or to indicate what keys are intended for static + configuration. + + The key words "MAY","MAY NOT", "MUST", "MUST NOT", "REQUIRED", + "RECOMMENDED", "SHOULD", and "SHOULD NOT" in this document are to be + interpreted as described in RFC2119. + + + + + + + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 3] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +2. The Secure Entry Point (SEP) Flag + + + 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | flags |S| protocol | algorithm | + | |E| | | + | |P| | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | / + / public key / + / / + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + KEY RR Format + + + + The SEP bit (TBD) in the flags field is assigned to be the secure + entry point flag. If the the bit is set to 1 the key is intended to + be used as secure entry point key. One SHOULD NOT assign special + meaning to the key if the bit is set to 0. The document proposes + using the current 15th bit [4] as the SEP bit. This way operators + can recognize the secure entry point key by the even or odd-ness of + the decimal representation of the flag field. + +3. DNSSEC Protocol Changes + + The bit MUST NOT be used during the resolving and verification + process. The SEP flag is only used to provide a hint about the + different administrative properties of the key and therefore the use + of the SEP flag does not change the DNS resolution and resolution + protocol. + +4. Operational Guidelines + + The SEP bit is set by the key-generator and MAY be used by the zone + signer to decide whether the key is to be prepared for input to a DS + RR generation function. As the SEP bit is within the data that is + used to compute a KEY RR's footprint, changing the SEP bit will + change the identity of the key within DNS. + + When a key pair is created, the operator needs to indicate whether + the SEP bit is to be set in the KEY RR. The SEP bit is recommended + whenever the public key of the key pair will be distributed to the + parent zone to build the authentication chain or if the public key is + to be distributed for static configuration in verifiers. + + + +Kolkman, et al. Expires July 2, 2003 [Page 4] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + + When signing a zone, it is intended that the key(s) with the SEP bit + set (if such keys exist) are used to sign the KEY RR set of the zone. + The same key can be used to sign the rest of the zone data too. It + is conceivable that not all keys with a SEP bit set will sign the KEY + RR set, such keys might be pending retirement or not yet in use. + + When verifying a RR set, the SEP bit is not intended to play a role. + How the key is used by the verifier is not intended to be a + consideration at key creation time. + + Although the SEP flag provides a hint on which key to be used as + trusted root, administrators can choose to ignore the fact that a KEY + has its SEP bit set or not when configuring a trusted root for their + resolvers. + + Using the flag a key roll over can be automated. The parent can use + an existing trust relation to verify key sets in which a new key with + the SEP flag appears. + +5. Security Considerations + + As stated in Section 3 the flag is not to used in the resolution + protocol or to determine the security status of a key. The flag is + to be used for administrative purposes only. + + No trust in a key should be inferred from this flag - trust MUST be + inferred from an existing chain of trust or an out-of-band exchange. + + Since this flag might be used for automating key exchanges, we think + the following consideration is in place. + + Automated mechanisms for roll over of the DS RR might be vulnerable + to a class of replay attacks. This might happen after a key exchange + where a key set, containing two keys with the SEP flag set, is sent + to the parent. The parent verifies the key set with the existing + trust relation and creates the new DS RR from the key that the + current DS is not pointing to. This key exchange might be replayed. + Parents are encouraged to implement a replay defense. A simple + defense can be based on a registry of keys that have been used to + generate DS RRs during the most recent roll over. These same + considerations apply to entities that configure keys in resolvers. + +6. IANA Considerations + + draft-ietf-dnsext-restrict-key-for-dnssec [4] eliminates all flags + field except for the zone key flag in the KEY RR. We propose to use + the 15'th bit as the SEP bit; the decimal representation of the + flagfield will then be odd for key-signing keys. + + + +Kolkman, et al. Expires July 2, 2003 [Page 5] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +7. Internationalization Considerations + + Although SEP is a popular acronym in many different languages, there + are no internationalization considerations. + +8. Document Changes + +8.1 draft version 00 -> 01 + + Clean up of references and correction of typos; + + modified Abstract text a little; + + Added explicit warning for replay attacks to the security section; + + Removed the text that hinted on a distinction between a key- + signing key configured in resolvers and in parent zones. + + +8.2 draft version 01 -> 02 + + Added IANA and Internationalization section. + + Split references into informational and normative. + + Spelling and style corrections. + + +8.3 draft version 02 -> 03 + + Changed the name from KS to KSK, this to prevent confusion with + NS, DS and other acronyms in DNS. + + In the security section: Rewrote the section so that it does not + suggest to use a particular type of registry and that it is clear + that a key registry is only one of the defenses possible. + + Spelling and style corrections. + + +8.4 draft version 03 -> 04 + + Text has been made consistent with the statement: ' No special + meaning should be assigned to the bit not being set.' + + Made explicit that the key tag changes in SIG RR. + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 6] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +8.5 draft version 04 -> 05 + + One occurrence of must and one occurrence of should uppercased + (RFC2119). + + Reordering of sentences in section 3, so that the point of the bit + NOT being used in resolving is made directly. + + To make explicit that the KSK is used at key generation and at + signing time I added the first sentence to section 4. + + Some minor style and spelling corrections. + + +8.6 draft version 05 -> 06 + + References and acronyms where stripped from the Abstract. the + Introduction and the the Operational Guideline section were + rewritten in such a way that the draft does not suggest any use of + the bit in the verification process and that the draft does not + enforce, but suggests, the use of a key- and zone-signing key. + + Added 'and verification' in the sentence "MUST NOT be used during + the resolving and verification process" (protocol changes + section). + + +8.7 draft version 06 -> 07 + + Based on comments during the last call we changed the name from + KSK-flag to SEP flag. The introduction was rewritten to reflect + the motivations of this name change and to stress that the SEP key + is not relevant to the signer process. + + +9. Acknowledgments + + The ideas documented in this document are inspired by communications + we had with numerous people and ideas published by other folk. Among + others Mark Andrews, Miek Gieben, Olafur Gudmundsson, Daniel + Karrenberg, Dan Massey, Marcos Sanz and Sam Weiler have contributed + ideas and provided feedback. + + This document saw the light during a workshop on DNSSEC operations + hosted by USC/ISI. + +Normative References + + + + +Kolkman, et al. Expires July 2, 2003 [Page 7] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + + [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement + Levels", BCP 14, RFC 2119, March 1997. + + [2] Eastlake, D., "Domain Name System Security Extensions", RFC + 2535, March 1999. + + [3] Lewis, E., "DNS Security Extension Clarification on Zone + Status", RFC 3090, March 2001. + + [4] Massey, D. and S. Rose, "Limiting the Scope of the KEY Resource + Record (RR)", RFC 3445, December 2002. + +Informative References + + [5] Gudmundsson, O., "Delegation Signer Resource Record", draft- + ietf-dnsext-delegation-signer-14 (work in progress), May 2003. + + [6] Orwell, G. and R. Steadman (illustrator), "Animal Farm; a Fairy + Story"", ISBN 0151002177 (50th anniversery edition), April 1996. + + +Authors' Addresses + + Olaf M. Kolkman + RIPE NCC + Singel 256 + Amsterdam 1016 AB + NL + + Phone: +31 20 535 4444 + EMail: olaf@ripe.net + URI: http://www.ripe.net/ + + + Jakob Schlyter + Carlstedt Research & Technology + Stora Badhusgatan 18-20 + Goteborg SE-411 21 + Sweden + + EMail: jakob@crt.se + URI: http://www.crt.se/~jakob/ + + + + + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 8] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + + Edward P. Lewis + ARIN + 3635 Concorde Parkway Suite 200 + Chantilly, VA 20151 + US + + Phone: +1 703 227 9854 + EMail: edlewis@arin.net + URI: http://www.arin.net/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 9] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + + +Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. + + + + + + + + + + + + + + + + + + + +Kolkman, et al. Expires July 2, 2003 [Page 10] + From ad8ee059a0dedacaeef5afad437bf6c98777d611 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Jun 2003 03:27:13 +0000 Subject: [PATCH 09/75] Q: Why are my logs in GMT (UTC). --- FAQ | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FAQ b/FAQ index 23ad88ec46..d83bdeffa6 100644 --- a/FAQ +++ b/FAQ @@ -401,3 +401,15 @@ white space (tab/space) but the is no current record owner name to inherit the name from. Usually this is the result of putting white space before a comment. Forgeting the "@" for the SOA record or indenting the master file. + + +Q: Why are my logs in GMT (UTC). + +A: You are running chrooted (-t) and have not supplied local timzone +information in the chroot area. + + FreeBSD: /etc/localtime + Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo + OSF: /etc/zoneinfo/localtime + + See also tzset(3) and zic(8). From 7a857bdb6828e75eec5a7080e4670ce199875922 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Jun 2003 04:39:35 +0000 Subject: [PATCH 10/75] 1471. [bug] libbind: updated to BIND 8.4.0. --- CHANGES | 2 + lib/bind/bsd/strtoul.c | 6 +- lib/bind/bsd/writev.c | 3 +- lib/bind/config.h.in | 1 + lib/bind/configure.in | 70 ++- lib/bind/dst/hmac_link.c | 11 +- lib/bind/include/arpa/nameser.h | 8 +- lib/bind/include/arpa/nameser_compat.h | 3 +- lib/bind/include/hesiod.h | 18 +- lib/bind/include/irp.h | 28 +- lib/bind/include/irs.h | 194 ++++---- lib/bind/include/isc/ctl.h | 8 +- lib/bind/include/isc/dst.h | 130 ++++-- lib/bind/include/isc/eventlib.h | 83 ++-- lib/bind/include/isc/irpmarshall.h | 37 +- lib/bind/include/isc/logging.h | 7 +- lib/bind/include/isc/misc.h | 4 +- lib/bind/include/isc/tree.h | 12 +- lib/bind/include/netdb.h | 3 +- lib/bind/include/resolv.h | 97 ++-- lib/bind/irs/dns_gr.c | 4 +- lib/bind/irs/dns_ho.c | 598 +++---------------------- lib/bind/irs/dns_nw.c | 21 +- lib/bind/irs/gen_gr.c | 17 +- lib/bind/irs/getaddrinfo.c | 63 +-- lib/bind/irs/gethostent.c | 59 ++- lib/bind/irs/getnameinfo.c | 1 + lib/bind/irs/getnetgrent.c | 27 +- lib/bind/irs/getnetgrent_r.c | 14 +- lib/bind/irs/hesiod.c | 26 +- lib/bind/irs/irp_p.h | 4 +- lib/bind/irs/irs_data.c | 25 +- lib/bind/irs/nis_gr.c | 4 +- lib/bind/irs/nis_ho.c | 107 ++++- lib/bind/isc/ctl_clnt.c | 4 +- lib/bind/isc/ctl_srvr.c | 4 +- lib/bind/isc/ev_files.c | 4 +- lib/bind/isc/ev_timers.c | 14 +- lib/bind/isc/ev_waits.c | 8 +- lib/bind/isc/eventlib.c | 16 +- lib/bind/isc/eventlib_p.h | 5 +- lib/bind/isc/logging.c | 11 +- lib/bind/nameser/ns_name.c | 32 +- lib/bind/nameser/ns_parse.c | 5 +- lib/bind/nameser/ns_print.c | 14 +- lib/bind/nameser/ns_samedomain.c | 10 +- lib/bind/nameser/ns_sign.c | 27 +- lib/bind/port_after.h.in | 5 +- lib/bind/resolv/res_comp.c | 8 +- lib/bind/resolv/res_debug.c | 38 +- lib/bind/resolv/res_findzonecut.c | 113 +++-- lib/bind/resolv/res_init.c | 51 ++- lib/bind/resolv/res_mkquery.c | 72 ++- lib/bind/resolv/res_mkupdate.c | 68 ++- lib/bind/resolv/res_private.h | 1 - lib/bind/resolv/res_query.c | 9 +- lib/bind/resolv/res_send.c | 9 +- lib/bind/resolv/res_update.c | 15 +- 58 files changed, 1112 insertions(+), 1126 deletions(-) diff --git a/CHANGES b/CHANGES index 95942d4d67..2cd1b5d0b4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1471. [bug] libbind: updated to BIND 8.4.0. + 1470. [bug] Incorrect length passed to snprintf. [RT #5966] 1469. [func] Log end of outgoing zone transfer at same level diff --git a/lib/bind/bsd/strtoul.c b/lib/bind/bsd/strtoul.c index ab3d5a479e..87bf166218 100644 --- a/lib/bind/bsd/strtoul.c +++ b/lib/bind/bsd/strtoul.c @@ -1,6 +1,6 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: strtoul.c,v 1.1 2001/03/29 06:30:36 marka Exp $"; +static const char rcsid[] = "$Id: strtoul.c,v 1.2 2003/06/03 04:39:27 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -70,7 +70,7 @@ strtoul(const char *nptr, char **endptr, int base) { * See strtol for comments as to the logic used. */ do { - c = *s++; + c = *(unsigned char *)s++; } while (isspace(c)); if (c == '-') { neg = 1; @@ -87,7 +87,7 @@ strtoul(const char *nptr, char **endptr, int base) { base = c == '0' ? 8 : 10; cutoff = (u_long)ULONG_MAX / (u_long)base; cutlim = (u_long)ULONG_MAX % (u_long)base; - for (acc = 0, any = 0;; c = *s++) { + for (acc = 0, any = 0;; c = *(unsigned char*)s++) { if (isdigit(c)) c -= '0'; else if (isalpha(c)) diff --git a/lib/bind/bsd/writev.c b/lib/bind/bsd/writev.c index 37392880fa..5e12302b09 100644 --- a/lib/bind/bsd/writev.c +++ b/lib/bind/bsd/writev.c @@ -1,5 +1,5 @@ #ifndef LINT -static const char rcsid[] = "$Id: writev.c,v 1.1 2001/03/29 06:30:37 marka Exp $"; +static const char rcsid[] = "$Id: writev.c,v 1.2 2003/06/03 04:39:27 marka Exp $"; #endif #include "port_before.h" @@ -31,6 +31,7 @@ __writev(int fd, struct iovec *iov, int iovlen) if (statbuf.st_mode & S_IFSOCK) { struct msghdr mesg; + memset(&mesg, 0, sizeof(mesg)); mesg.msg_name = 0; mesg.msg_namelen = 0; mesg.msg_iov = iov; diff --git a/lib/bind/config.h.in b/lib/bind/config.h.in index c1c9399b91..46de822b7e 100644 --- a/lib/bind/config.h.in +++ b/lib/bind/config.h.in @@ -42,3 +42,4 @@ struct __sFILE; extern __inline int __sputaux(int _c, struct __sFILE *_p); #endif #undef BROKEN_IN6ADDR_INIT_MACROS +#undef HAVE_STRLCAT diff --git a/lib/bind/configure.in b/lib/bind/configure.in index 25c8287344..7f471425e3 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -AC_REVISION($Revision: 1.86 $) +AC_REVISION($Revision: 1.87 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -518,6 +518,8 @@ else thread_dir=nothreads fi +AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT)) + AC_SUBST(ALWAYS_DEFINES) AC_SUBST(DO_PTHREADS) AC_SUBST(WANT_IRS_THREADSGR_OBJS) @@ -2214,6 +2216,72 @@ SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void" AC_SUBST(SERV_R_SET_RESULT) AC_SUBST(SERV_R_SET_RETURN) +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +int innetgr(const char *netgroup, const char *host, const char *user, const char *domain); +] +,, +[ +INNETGR_ARGS="#undef INNETGR_ARGS" +] +, +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +int innetgr(char *netgroup, char *host, char *user, char *domain); +] +,, +[ +INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain" +] +, +)) + +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +void setnetgrent(const char *); +] +,, +[ +SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS" +] +, +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +void setnetgrent(char *); +] +,, +[ +SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup" +] +, +)) +AC_SUBST(SETNETGRENT_ARGS) +AC_SUBST(INNETGR_ARGS) + # # Random remaining OS-specific issues involving compiler warnings. # XXXDCL print messages to indicate some compensation is being done? diff --git a/lib/bind/dst/hmac_link.c b/lib/bind/dst/hmac_link.c index cc19d02736..4f042b44a8 100644 --- a/lib/bind/dst/hmac_link.c +++ b/lib/bind/dst/hmac_link.c @@ -1,6 +1,6 @@ #ifdef HMAC_MD5 #ifndef LINT -static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/hmac_link.c,v 1.2 2001/04/03 00:28:14 bwelling Exp $"; +static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/hmac_link.c,v 1.3 2003/06/03 04:39:27 marka Exp $"; #endif /* * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc. @@ -459,15 +459,10 @@ dst_hmac_md5_init() } #else +#define dst_hmac_md5_init __dst_hmac_md5_init + int dst_hmac_md5_init(){ return (0); } #endif - - - - - - - diff --git a/lib/bind/include/arpa/nameser.h b/lib/bind/include/arpa/nameser.h index e876c44790..e8c0d867bc 100644 --- a/lib/bind/include/arpa/nameser.h +++ b/lib/bind/include/arpa/nameser.h @@ -49,7 +49,7 @@ */ /* - * $Id: nameser.h,v 1.5 2002/06/28 05:41:56 marka Exp $ + * $Id: nameser.h,v 1.6 2003/06/03 04:39:28 marka Exp $ */ #ifndef _ARPA_NAMESER_H_ @@ -78,8 +78,9 @@ /* * Define constants based on RFC 883, RFC 1034, RFC 1035 */ -#define NS_PACKETSZ 512 /* maximum packet size */ +#define NS_PACKETSZ 512 /* default UDP packet size */ #define NS_MAXDNAME 1025 /* maximum domain name */ +#define NS_MAXMSG 65535 /* maximum message size */ #define NS_MAXCDNAME 255 /* maximum compressed domain name */ #define NS_MAXLABEL 63 /* maximum length of domain label */ #define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */ @@ -294,6 +295,7 @@ typedef enum __ns_type { ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ ns_t_sink = 40, /* Kitchen sink (experimentatl) */ ns_t_opt = 41, /* EDNS0 option (meta-RR) */ + ns_t_apl = 42, /* Address prefix list (RFC 3123) */ ns_t_tkey = 249, /* Transaction key */ ns_t_tsig = 250, /* Transaction signature. */ ns_t_ixfr = 251, /* Incremental zone transfer. */ @@ -398,7 +400,7 @@ typedef enum __ns_cert_types { /* Signatures */ #define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */ -#define NS_MD5RSA_MAX_BITS 2552 +#define NS_MD5RSA_MAX_BITS 4096 /* Total of binary mod and exp */ #define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3) /* Max length of text sig block */ diff --git a/lib/bind/include/arpa/nameser_compat.h b/lib/bind/include/arpa/nameser_compat.h index 19cd5f0fe0..28b43d12e8 100644 --- a/lib/bind/include/arpa/nameser_compat.h +++ b/lib/bind/include/arpa/nameser_compat.h @@ -32,7 +32,7 @@ /* * from nameser.h 8.1 (Berkeley) 6/2/93 - * $Id: nameser_compat.h,v 1.3 2002/05/20 04:29:29 marka Exp $ + * $Id: nameser_compat.h,v 1.4 2003/06/03 04:39:29 marka Exp $ */ #ifndef _ARPA_NAMESER_COMPAT_ @@ -138,6 +138,7 @@ typedef struct { #define RRFIXEDSZ NS_RRFIXEDSZ #define INT32SZ NS_INT32SZ #define INT16SZ NS_INT16SZ +#define INT8SZ NS_INT8SZ #define INADDRSZ NS_INADDRSZ #define IN6ADDRSZ NS_IN6ADDRSZ #define INDIR_MASK NS_CMPRSFLGS diff --git a/lib/bind/include/hesiod.h b/lib/bind/include/hesiod.h index b49f5e3de6..1ca33cd432 100644 --- a/lib/bind/include/hesiod.h +++ b/lib/bind/include/hesiod.h @@ -20,21 +20,19 @@ */ /* - * $Id: hesiod.h,v 1.1 2001/03/29 06:31:33 marka Exp $ + * $Id: hesiod.h,v 1.2 2003/06/03 04:39:28 marka Exp $ */ #ifndef _HESIOD_H_INCLUDED #define _HESIOD_H_INCLUDED -int hesiod_init __P((void **context)); -void hesiod_end __P((void *context)); -char * hesiod_to_bind __P((void *context, const char *name, - const char *type)); -char ** hesiod_resolve __P((void *context, const char *name, - const char *type)); -void hesiod_free_list __P((void *context, char **list)); -struct __res_state * __hesiod_res_get __P((void *context)); -void __hesiod_res_set __P((void *context, struct __res_state *, +int hesiod_init __P((void **)); +void hesiod_end __P((void *)); +char * hesiod_to_bind __P((void *, const char *, const char *)); +char ** hesiod_resolve __P((void *, const char *, const char *)); +void hesiod_free_list __P((void *, char **)); +struct __res_state * __hesiod_res_get __P((void *)); +void __hesiod_res_set __P((void *, struct __res_state *, void (*)(void *))); #endif /*_HESIOD_H_INCLUDED*/ diff --git a/lib/bind/include/irp.h b/lib/bind/include/irp.h index e56cfbc688..6234a6d43b 100644 --- a/lib/bind/include/irp.h +++ b/lib/bind/include/irp.h @@ -16,7 +16,7 @@ */ /* - * $Id: irp.h,v 1.1 2001/03/29 06:31:34 marka Exp $ + * $Id: irp.h,v 1.2 2003/06/03 04:39:28 marka Exp $ */ #ifndef _IRP_H_INCLUDED @@ -84,16 +84,20 @@ struct irp_p; -char *irs_irp_read_body(struct irp_p *pvt, size_t *size); -int irs_irp_read_response(struct irp_p *pvt, char *text, size_t len); -void irs_irp_disconnect(struct irp_p *pvt); -int irs_irp_connect(struct irp_p *pvt); -int irs_irp_is_connected(struct irp_p *pvt); -int irs_irp_connection_setup(struct irp_p *cxndata, int *warned); -int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...); -int irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text, - size_t textlen, char **body, - size_t *bodylen); -int irs_irp_read_line(struct irp_p *pvt, char *buffer, int len); +char *irs_irp_read_body(struct irp_p *, size_t *); +int irs_irp_read_response(struct irp_p *, char *, size_t); +void irs_irp_disconnect(struct irp_p *); +int irs_irp_connect(struct irp_p *); +int irs_irp_is_connected(struct irp_p *); +int irs_irp_connection_setup(struct irp_p *, int *); +#ifdef __GNUC__ +int irs_irp_send_command(struct irp_p *, const char *, ...) + __attribute__((__format__(__printf__, 2, 3))); +#else +int irs_irp_send_command(struct irp_p *, const char *, ...); +#endif +int irs_irp_get_full_response(struct irp_p *, int *, char *, size_t, + char **, size_t *); +int irs_irp_read_line(struct irp_p *, char *, int); #endif diff --git a/lib/bind/include/irs.h b/lib/bind/include/irs.h index d7fc7b4d5f..f417e3acbd 100644 --- a/lib/bind/include/irs.h +++ b/lib/bind/include/irs.h @@ -16,7 +16,7 @@ */ /* - * $Id: irs.h,v 1.2 2001/06/22 05:10:58 marka Exp $ + * $Id: irs.h,v 1.3 2003/06/03 04:39:28 marka Exp $ */ #ifndef _IRS_H_INCLUDED @@ -198,18 +198,58 @@ struct nwent { #define irs_dns_acc __irs_dns_acc #define irs_nis_acc __irs_nis_acc #define irs_irp_acc __irs_irp_acc +#define irs_destroy __irs_destroy +#define irs_dns_gr __irs_dns_gr +#define irs_dns_ho __irs_dns_ho +#define irs_dns_nw __irs_dns_nw +#define irs_dns_pr __irs_dns_pr +#define irs_dns_pw __irs_dns_pw +#define irs_dns_sv __irs_dns_sv +#define irs_gen_gr __irs_gen_gr +#define irs_gen_ho __irs_gen_ho +#define irs_gen_ng __irs_gen_ng +#define irs_gen_nw __irs_gen_nw +#define irs_gen_pr __irs_gen_pr +#define irs_gen_pw __irs_gen_pw +#define irs_gen_sv __irs_gen_sv +#define irs_irp_get_full_response __irs_irp_get_full_response +#define irs_irp_gr __irs_irp_gr +#define irs_irp_ho __irs_irp_ho +#define irs_irp_is_connected __irs_irp_is_connected +#define irs_irp_ng __irs_irp_ng +#define irs_irp_nw __irs_irp_nw +#define irs_irp_pr __irs_irp_pr +#define irs_irp_pw __irs_irp_pw +#define irs_irp_read_line __irs_irp_read_line +#define irs_irp_sv __irs_irp_sv +#define irs_lcl_gr __irs_lcl_gr +#define irs_lcl_ho __irs_lcl_ho +#define irs_lcl_ng __irs_lcl_ng +#define irs_lcl_nw __irs_lcl_nw +#define irs_lcl_pr __irs_lcl_pr +#define irs_lcl_pw __irs_lcl_pw +#define irs_lcl_sv __irs_lcl_sv +#define irs_nis_gr __irs_nis_gr +#define irs_nis_ho __irs_nis_ho +#define irs_nis_ng __irs_nis_ng +#define irs_nis_nw __irs_nis_nw +#define irs_nis_pr __irs_nis_pr +#define irs_nis_pw __irs_nis_pw +#define irs_nis_sv __irs_nis_sv +#define net_data_create __net_data_create +#define net_data_destroy __net_data_destroy +#define net_data_minimize __net_data_minimize /* * Externs. */ -extern struct irs_acc * irs_gen_acc __P((const char *options, - const char *conf_file)); -extern struct irs_acc * irs_lcl_acc __P((const char *options)); -extern struct irs_acc * irs_dns_acc __P((const char *options)); -extern struct irs_acc * irs_nis_acc __P((const char *options)); -extern struct irs_acc * irs_irp_acc __P((const char *options)); +extern struct irs_acc * irs_gen_acc __P((const char *, const char *)); +extern struct irs_acc * irs_lcl_acc __P((const char *)); +extern struct irs_acc * irs_dns_acc __P((const char *)); +extern struct irs_acc * irs_nis_acc __P((const char *)); +extern struct irs_acc * irs_irp_acc __P((const char *)); -extern void irs_destroy(void); +extern void irs_destroy __P((void)); /* * These forward declarations are for the semi-private functions in @@ -228,102 +268,78 @@ struct net_data; /* forward */ * the default interface will use net_data_create by default. Servers will * probably want net_data_init (one call per client) */ -struct net_data *net_data_create(const char *conf_file); -struct net_data *net_data_init(const char *conf_file); -void net_data_destroy(void *p); +struct net_data *net_data_create __P((const char *)); +struct net_data *net_data_init __P((const char *)); +void net_data_destroy __P((void *)); -extern struct group *getgrent_p __P((struct net_data *net_data)); -extern struct group *getgrnam_p __P((const char *name, - struct net_data *net_data)); -extern struct group *getgrgid_p __P((gid_t gid, - struct net_data *net_data)); -extern int setgroupent_p __P((int stayopen, - struct net_data *net_data)); -extern void endgrent_p __P((struct net_data *net_data)); -extern int getgrouplist_p __P((const char *name, - gid_t basegid, - gid_t *groups, - int *ngroups, - struct net_data *net_data)); +extern struct group *getgrent_p __P((struct net_data *)); +extern struct group *getgrnam_p __P((const char *, struct net_data *)); +extern struct group *getgrgid_p __P((gid_t, struct net_data *)); +extern int setgroupent_p __P((int, struct net_data *)); +extern void endgrent_p __P((struct net_data *)); +extern int getgrouplist_p __P((const char *, gid_t, gid_t *, int *, + struct net_data *)); #ifdef SETGRENT_VOID -extern void setgrent_p __P((struct net_data *net_data)); +extern void setgrent_p __P((struct net_data *)); #else -extern int setgrent_p __P((struct net_data *net_data)); +extern int setgrent_p __P((struct net_data *)); #endif -extern struct hostent *gethostbyname_p __P((const char *name, - struct net_data *net_data)); -extern struct hostent *gethostbyname2_p __P((const char *name, int af, - struct net_data *net_data)); -extern struct hostent *gethostbyaddr_p __P((const char *addr, int len, - int af, - struct net_data *net_data)); -extern struct hostent *gethostent_p __P((struct net_data *net_data)); -extern void sethostent_p __P((int stayopen, - struct net_data *net_data)); -extern void endhostent_p __P((struct net_data *net_data)); -extern struct hostent *getipnodebyname_p __P((const char *name, int af, - int flags, int *errp, - struct net_data *net_data)); -extern struct hostent *getipnodebyaddr_p __P((const void *addr, size_t len, - int af, int *errp, - struct net_data *net_data)); +extern struct hostent *gethostbyname_p __P((const char *, + struct net_data *)); +extern struct hostent *gethostbyname2_p __P((const char *, int, + struct net_data *)); +extern struct hostent *gethostbyaddr_p __P((const char *, int, int, + struct net_data *)); +extern struct hostent *gethostent_p __P((struct net_data *)); +extern void sethostent_p __P((int, struct net_data *)); +extern void endhostent_p __P((struct net_data *)); +extern struct hostent *getipnodebyname_p __P((const char *, int, int, int *, + struct net_data *)); +extern struct hostent *getipnodebyaddr_p __P((const void *, size_t, + int, int *, struct net_data *)); -extern struct netent *getnetent_p __P((struct net_data *net_data)); -extern struct netent *getnetbyname_p __P((const char *name, - struct net_data *net_data)); -extern struct netent *getnetbyaddr_p __P((unsigned long net, int type, - struct net_data *net_data)); -extern void setnetent_p __P((int stayopen, - struct net_data *net_data)); -extern void endnetent_p __P((struct net_data *net_data)); +extern struct netent *getnetent_p __P((struct net_data *)); +extern struct netent *getnetbyname_p __P((const char *, struct net_data *)); +extern struct netent *getnetbyaddr_p __P((unsigned long, int, + struct net_data *)); +extern void setnetent_p __P((int, struct net_data *)); +extern void endnetent_p __P((struct net_data *)); -extern void setnetgrent_p __P((const char *netgroup, - struct net_data *net_data)); -extern void endnetgrent_p __P((struct net_data *net_data)); -extern int innetgr_p __P((const char *netgroup, - const char *host, - const char *user, - const char *domain, - struct net_data *net_data)); -extern int getnetgrent_p __P((const char **host, const char **user, - const char **domain, - struct net_data *net_data)); +extern void setnetgrent_p __P((const char *, struct net_data *)); +extern void endnetgrent_p __P((struct net_data *)); +extern int innetgr_p __P((const char *, const char *, const char *, + const char *, struct net_data *)); +extern int getnetgrent_p __P((const char **, const char **, + const char **, struct net_data *)); -extern struct protoent *getprotoent_p __P((struct net_data *net_data)); -extern struct protoent *getprotobyname_p __P((const char *name, - struct net_data *net_data)); -extern struct protoent *getprotobynumber_p __P((int proto, - struct net_data *net_data)); -extern void setprotoent_p __P((int stayopen, - struct net_data *net_data)); -extern void endprotoent_p __P((struct net_data *net_data)); +extern struct protoent *getprotoent_p __P((struct net_data *)); +extern struct protoent *getprotobyname_p __P((const char *, + struct net_data *)); +extern struct protoent *getprotobynumber_p __P((int, struct net_data *)); +extern void setprotoent_p __P((int, struct net_data *)); +extern void endprotoent_p __P((struct net_data *)); -extern struct passwd *getpwent_p __P((struct net_data *net_data)); -extern struct passwd *getpwnam_p __P((const char *name, - struct net_data *net_data)); -extern struct passwd *getpwuid_p __P((uid_t uid, - struct net_data *net_data)); -extern int setpassent_p __P((int stayopen, - struct net_data *net_data)); -extern void endpwent_p __P((struct net_data *net_data)); +extern struct passwd *getpwent_p __P((struct net_data *)); +extern struct passwd *getpwnam_p __P((const char *, struct net_data *)); +extern struct passwd *getpwuid_p __P((uid_t, struct net_data *)); +extern int setpassent_p __P((int, struct net_data *)); +extern void endpwent_p __P((struct net_data *)); #ifdef SETPWENT_VOID -extern void setpwent_p __P((struct net_data *net_data)); +extern void setpwent_p __P((struct net_data *)); #else -extern int setpwent_p __P((struct net_data *net_data)); +extern int setpwent_p __P((struct net_data *)); #endif -extern struct servent *getservent_p __P((struct net_data *net_data)); -extern struct servent *getservbyname_p __P((const char *name, - const char *proto, - struct net_data *net_data)); -extern struct servent *getservbyport_p __P((int port, const char *proto, - struct net_data *net_data)); -extern void setservent_p __P((int stayopen, - struct net_data *net_data)); -extern void endservent_p __P((struct net_data *net_data)); +extern struct servent *getservent_p __P((struct net_data *)); +extern struct servent *getservbyname_p __P((const char *, const char *, + struct net_data *)); +extern struct servent *getservbyport_p __P((int, const char *, + struct net_data *)); +extern void setservent_p __P((int, struct net_data *)); +extern void endservent_p __P((struct net_data *)); #endif /*_IRS_H_INCLUDED*/ diff --git a/lib/bind/include/isc/ctl.h b/lib/bind/include/isc/ctl.h index cc7ae0d801..c2b8a31776 100644 --- a/lib/bind/include/isc/ctl.h +++ b/lib/bind/include/isc/ctl.h @@ -19,7 +19,7 @@ */ /* - * $Id: ctl.h,v 1.2 2001/11/01 04:21:13 marka Exp $ + * $Id: ctl.h,v 1.3 2003/06/03 04:39:29 marka Exp $ */ #include @@ -42,11 +42,11 @@ struct ctl_verb; enum ctl_severity { ctl_debug, ctl_warning, ctl_error }; -typedef void (*ctl_logfunc)(enum ctl_severity, const char *fmt, ...); +typedef void (*ctl_logfunc)(enum ctl_severity, const char *, ...); typedef void (*ctl_verbfunc)(struct ctl_sctx *, struct ctl_sess *, - const struct ctl_verb *, const char *rest, - u_int respflags, const void *respctx, void *uctx); + const struct ctl_verb *, const char *, + u_int, const void *, void *); typedef void (*ctl_srvrdone)(struct ctl_sctx *, struct ctl_sess *, void *); diff --git a/lib/bind/include/isc/dst.h b/lib/bind/include/isc/dst.h index 4509f27250..fe9229725a 100644 --- a/lib/bind/include/isc/dst.h +++ b/lib/bind/include/isc/dst.h @@ -12,72 +12,114 @@ typedef struct dst_key { } DST_KEY; #endif /* HAS_DST_KEY */ +/* + * do not taint namespace + */ +#define dst_bsafe_init __dst_bsafe_init +#define dst_buffer_to_key __dst_buffer_to_key +#define dst_check_algorithm __dst_check_algorithm +#define dst_compare_keys __dst_compare_keys +#define dst_cylink_init __dst_cylink_init +#define dst_dnskey_to_key __dst_dnskey_to_key +#define dst_eay_dss_init __dst_eay_dss_init +#define dst_free_key __dst_free_key +#define dst_generate_key __dst_generate_key +#define dst_hmac_md5_init __dst_hmac_md5_init +#define dst_init __dst_init +#define dst_key_to_buffer __dst_key_to_buffer +#define dst_key_to_dnskey __dst_key_to_dnskey +#define dst_read_key __dst_read_key +#define dst_rsaref_init __dst_rsaref_init +#define dst_s_build_filename __dst_s_build_filename +#define dst_s_calculate_bits __dst_s_calculate_bits +#define dst_s_conv_bignum_b64_to_u8 __dst_s_conv_bignum_b64_to_u8 +#define dst_s_conv_bignum_u8_to_b64 __dst_s_conv_bignum_u8_to_b64 +#define dst_s_dns_key_id __dst_s_dns_key_id +#define dst_s_dump __dst_s_dump +#define dst_s_filename_length __dst_s_filename_length +#define dst_s_fopen __dst_s_fopen +#define dst_s_get_int16 __dst_s_get_int16 +#define dst_s_get_int32 __dst_s_get_int32 +#define dst_s_id_calc __dst_s_id_calc +#define dst_s_put_int16 __dst_s_put_int16 +#define dst_s_put_int32 __dst_s_put_int32 +#define dst_s_quick_random __dst_s_quick_random +#define dst_s_quick_random_set __dst_s_quick_random_set +#define dst_s_random __dst_s_random +#define dst_s_semi_random __dst_s_semi_random +#define dst_s_verify_str __dst_s_verify_str +#define dst_sig_size __dst_sig_size +#define dst_sign_data __dst_sign_data +#define dst_verify_data __dst_verify_data +#define dst_write_key __dst_write_key + /* * DST Crypto API defintions */ void dst_init(void); int dst_check_algorithm(const int); -int dst_sign_data(const int mode, /* specifies INIT/UPDATE/FINAL/ALL */ - DST_KEY *in_key, /* the key to use */ - void **context, /* pointer to state structure */ - const u_char *data, /* data to be signed */ - const int len, /* length of input data */ - u_char *signature, /* buffer to write signature to */ - const int sig_len); /* size of output buffer */ +int dst_sign_data(const int, /* specifies INIT/UPDATE/FINAL/ALL */ + DST_KEY *, /* the key to use */ + void **, /* pointer to state structure */ + const u_char *, /* data to be signed */ + const int, /* length of input data */ + u_char *, /* buffer to write signature to */ + const int); /* size of output buffer */ -int dst_verify_data(const int mode, /* specifies INIT/UPDATE/FINAL/ALL */ - DST_KEY *in_key, /* the key to use */ - void **context, /* pointer to state structure */ - const u_char *data, /* data to be verified */ - const int len, /* length of input data */ - const u_char *signature,/* buffer containing signature */ - const int sig_len); /* length of signature */ +int dst_verify_data(const int, /* specifies INIT/UPDATE/FINAL/ALL */ + DST_KEY *, /* the key to use */ + void **, /* pointer to state structure */ + const u_char *, /* data to be verified */ + const int, /* length of input data */ + const u_char *, /* buffer containing signature */ + const int); /* length of signature */ -DST_KEY *dst_read_key(const char *in_name, /* name of key */ - const u_int16_t in_id, /* key tag identifier */ - const int in_alg, /* key algorithm */ - const int key_type); /* Private/PublicKey wanted*/ +DST_KEY *dst_read_key(const char *, /* name of key */ + const u_int16_t, /* key tag identifier */ + const int, /* key algorithm */ + const int); /* Private/PublicKey wanted*/ -int dst_write_key(const DST_KEY *key, /* key to write out */ - const int key_type); /* Public/Private */ +int dst_write_key(const DST_KEY *, /* key to write out */ + const int); /* Public/Private */ -DST_KEY *dst_dnskey_to_key(const char *in_name, /* KEY record name */ - const u_char *key, /* KEY RDATA */ - const int len); /* size of input buffer*/ +DST_KEY *dst_dnskey_to_key(const char *, /* KEY record name */ + const u_char *, /* KEY RDATA */ + const int); /* size of input buffer*/ -int dst_key_to_dnskey(const DST_KEY *key, /* key to translate */ - u_char *out_storage, /* output buffer */ - const int out_len); /* size of out_storage*/ +int dst_key_to_dnskey(const DST_KEY *, /* key to translate */ + u_char *, /* output buffer */ + const int); /* size of out_storage*/ -DST_KEY *dst_buffer_to_key(const char *key_name, /* name of the key */ - const int alg, /* algorithm */ - const int flags, /* dns flags */ - const int protocol, /* dns protocol */ - const u_char *key_buf, /* key in dns wire fmt */ - const int key_len); /* size of key */ +DST_KEY *dst_buffer_to_key(const char *, /* name of the key */ + const int, /* algorithm */ + const int, /* dns flags */ + const int, /* dns protocol */ + const u_char *, /* key in dns wire fmt */ + const int); /* size of key */ -int dst_key_to_buffer(DST_KEY *key, u_char *out_buff, int buf_len); +int dst_key_to_buffer(DST_KEY *, u_char *, int); -DST_KEY *dst_generate_key(const char *name, /* name of new key */ - const int alg, /* key algorithm to generate */ - const int bits, /* size of new key */ - const int exp, /* alg dependent parameter*/ - const int flags, /* key DNS flags */ - const int protocol); /* key DNS protocol */ +DST_KEY *dst_generate_key(const char *, /* name of new key */ + const int, /* key algorithm to generate */ + const int, /* size of new key */ + const int, /* alg dependent parameter*/ + const int, /* key DNS flags */ + const int); /* key DNS protocol */ -DST_KEY *dst_free_key(DST_KEY *f_key); -int dst_compare_keys(const DST_KEY *key1, const DST_KEY *key2); +DST_KEY *dst_free_key(DST_KEY *); +int dst_compare_keys(const DST_KEY *, const DST_KEY *); + +int dst_sig_size(DST_KEY *); -int dst_sig_size(DST_KEY *key); /* support for dns key tags/ids */ -u_int16_t dst_s_dns_key_id(const u_char *dns_key_rdata, const int rdata_len); -u_int16_t dst_s_id_calc(const u_char *key_data, const int key_len); +u_int16_t dst_s_dns_key_id(const u_char *, const int); +u_int16_t dst_s_id_calc(const u_char *, const int); /* Used by callers as well as by the library. */ #define RAW_KEY_SIZE 8192 /* large enough to store any key */ diff --git a/lib/bind/include/isc/eventlib.h b/lib/bind/include/isc/eventlib.h index 4a3dc4b9f8..c0d99a22b2 100644 --- a/lib/bind/include/isc/eventlib.h +++ b/lib/bind/include/isc/eventlib.h @@ -18,7 +18,7 @@ /* eventlib.h - exported interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib.h,v 1.1 2001/03/29 06:31:36 marka Exp $ + * $Id: eventlib.h,v 1.2 2003/06/03 04:39:30 marka Exp $ */ #ifndef _EVENTLIB_H @@ -50,14 +50,13 @@ typedef struct { void *opaque; } evEvent; #define evInitID(id) ((id)->opaque = NULL) #define evTestID(id) ((id).opaque != NULL) -typedef void (*evConnFunc)__P((evContext ctx, void *uap, int fd, - const void *la, int lalen, - const void *ra, int ralen)); -typedef void (*evFileFunc)__P((evContext ctx, void *uap, int fd, int evmask)); -typedef void (*evStreamFunc)__P((evContext ctx, void *uap, int fd, int bytes)); -typedef void (*evTimerFunc)__P((evContext ctx, void *uap, - struct timespec due, struct timespec inter)); -typedef void (*evWaitFunc)__P((evContext ctx, void *uap, const void *tag)); +typedef void (*evConnFunc)__P((evContext, void *, int, const void *, int, + const void *, int)); +typedef void (*evFileFunc)__P((evContext, void *, int, int)); +typedef void (*evStreamFunc)__P((evContext, void *, int, int)); +typedef void (*evTimerFunc)__P((evContext, void *, + struct timespec, struct timespec)); +typedef void (*evWaitFunc)__P((evContext, void *, const void *)); typedef struct { unsigned char mask[256/8]; } evByteMask; #define EV_BYTEMASK_BYTE(b) ((b) / 8) @@ -87,14 +86,14 @@ typedef struct { unsigned char mask[256/8]; } evByteMask; #define evMainLoop __evMainLoop #define evHighestFD __evHighestFD -int evCreate __P((evContext *ctx)); -void evSetDebug __P((evContext ctx, int lev, FILE *out)); -int evDestroy __P((evContext ctx)); -int evGetNext __P((evContext ctx, evEvent *ev, int options)); -int evDispatch __P((evContext ctx, evEvent ev)); -void evDrop __P((evContext ctx, evEvent ev)); -int evMainLoop __P((evContext ctx)); -int evHighestFD __P((evContext ctx)); +int evCreate __P((evContext *)); +void evSetDebug __P((evContext, int, FILE *)); +int evDestroy __P((evContext)); +int evGetNext __P((evContext, evEvent *, int)); +int evDispatch __P((evContext, evEvent)); +void evDrop __P((evContext, evEvent)); +int evMainLoop __P((evContext)); +int evHighestFD __P((evContext)); /* ev_connects.c */ #define evListen __evListen @@ -104,11 +103,10 @@ int evHighestFD __P((evContext ctx)); #define evUnhold __evUnhold #define evTryAccept __evTryAccept -int evListen __P((evContext ctx, int fd, int maxconn, - evConnFunc func, void *uap, evConnID *id)); -int evConnect __P((evContext ctx, int fd, const void *ra, int ralen, - evConnFunc func, void *uap, evConnID *id)); -int evCancelConn __P((evContext ctx, evConnID id)); +int evListen __P((evContext, int, int, evConnFunc, void *, evConnID *)); +int evConnect __P((evContext, int, const void *, int, + evConnFunc, void *, evConnID *)); +int evCancelConn __P((evContext, evConnID)); int evHold __P((evContext, evConnID)); int evUnhold __P((evContext, evConnID)); int evTryAccept __P((evContext, evConnID, int *)); @@ -117,9 +115,8 @@ int evTryAccept __P((evContext, evConnID, int *)); #define evSelectFD __evSelectFD #define evDeselectFD __evDeselectFD -int evSelectFD __P((evContext ctx, int fd, int eventmask, - evFileFunc func, void *uap, evFileID *id)); -int evDeselectFD __P((evContext ctx, evFileID id)); +int evSelectFD __P((evContext, int, int, evFileFunc, void *, evFileID *)); +int evDeselectFD __P((evContext, evFileID)); /* ev_streams.c */ #define evConsIovec __evConsIovec @@ -129,14 +126,14 @@ int evDeselectFD __P((evContext ctx, evFileID id)); #define evUntimeRW __evUntimeRW #define evCancelRW __evCancelRW -struct iovec evConsIovec __P((void *buf, size_t cnt)); -int evWrite __P((evContext ctx, int fd, const struct iovec *iov, int cnt, - evStreamFunc func, void *uap, evStreamID *id)); -int evRead __P((evContext ctx, int fd, const struct iovec *iov, int cnt, - evStreamFunc func, void *uap, evStreamID *id)); -int evTimeRW __P((evContext ctx, evStreamID id, evTimerID timer)); -int evUntimeRW __P((evContext ctx, evStreamID id)); -int evCancelRW __P((evContext ctx, evStreamID id)); +struct iovec evConsIovec __P((void *, size_t)); +int evWrite __P((evContext, int, const struct iovec *, int, + evStreamFunc func, void *, evStreamID *)); +int evRead __P((evContext, int, const struct iovec *, int, + evStreamFunc func, void *, evStreamID *)); +int evTimeRW __P((evContext, evStreamID, evTimerID timer)); +int evUntimeRW __P((evContext, evStreamID)); +int evCancelRW __P((evContext, evStreamID)); /* ev_timers.c */ #define evConsTime __evConsTime @@ -157,17 +154,16 @@ int evCancelRW __P((evContext ctx, evStreamID id)); #define evTouchIdleTimer __evTouchIdleTimer struct timespec evConsTime __P((time_t sec, long nsec)); -struct timespec evAddTime __P((struct timespec add1, struct timespec add2)); -struct timespec evSubTime __P((struct timespec minu, struct timespec subtra)); +struct timespec evAddTime __P((struct timespec, struct timespec)); +struct timespec evSubTime __P((struct timespec, struct timespec)); struct timespec evNowTime __P((void)); struct timespec evLastEventTime __P((evContext)); struct timespec evTimeSpec __P((struct timeval)); struct timeval evTimeVal __P((struct timespec)); -int evCmpTime __P((struct timespec a, struct timespec b)); -int evSetTimer __P((evContext ctx, evTimerFunc func, void *uap, - struct timespec due, struct timespec inter, - evTimerID *id)); -int evClearTimer __P((evContext ctx, evTimerID id)); +int evCmpTime __P((struct timespec, struct timespec)); +int evSetTimer __P((evContext, evTimerFunc, void *, struct timespec, + struct timespec, evTimerID *)); +int evClearTimer __P((evContext, evTimerID)); int evResetTimer __P((evContext, evTimerID, evTimerFunc, void *, struct timespec, struct timespec)); int evSetIdleTimer __P((evContext, evTimerFunc, void *, struct timespec, @@ -183,10 +179,9 @@ int evTouchIdleTimer __P((evContext, evTimerID)); #define evUnwait __evUnwait #define evDefer __evDefer -int evWaitFor __P((evContext ctx, const void *tag, evWaitFunc func, void *uap, - evWaitID *id)); -int evDo __P((evContext ctx, const void *tag)); -int evUnwait __P((evContext ctx, evWaitID id)); +int evWaitFor __P((evContext, const void *, evWaitFunc, void *, evWaitID *)); +int evDo __P((evContext, const void *)); +int evUnwait __P((evContext, evWaitID)); int evDefer __P((evContext, evWaitFunc, void *)); #ifdef __EVENTLIB_P_DEFINED diff --git a/lib/bind/include/isc/irpmarshall.h b/lib/bind/include/isc/irpmarshall.h index d851ecacd4..4746fd51d1 100644 --- a/lib/bind/include/isc/irpmarshall.h +++ b/lib/bind/include/isc/irpmarshall.h @@ -16,7 +16,7 @@ */ /* - * $Id: irpmarshall.h,v 1.1 2001/03/29 06:31:36 marka Exp $ + * $Id: irpmarshall.h,v 1.2 2003/06/03 04:39:30 marka Exp $ */ #ifndef _IRPMARSHALL_H_INCLUDED @@ -45,24 +45,23 @@ (x == AF_INET6 ? "AF_INET6" : "UNKNOWN")) /* See comment below on usage */ -int irp_marshall_pw(const struct passwd *pw, char **buffer, size_t *len); -int irp_unmarshall_pw(struct passwd *pw, char *buffer); -int irp_marshall_gr(const struct group *gr, char **buffer, size_t *len); -int irp_unmarshall_gr(struct group *gr, char *buffer); -int irp_marshall_sv(const struct servent *sv, char **buffer, size_t *len); -int irp_unmarshall_sv(struct servent *sv, char *buffer); -int irp_marshall_pr(struct protoent *pr, char **buffer, size_t *len); -int irp_unmarshall_pr(struct protoent *pr, char *buffer); -int irp_marshall_ho(struct hostent *ho, char **buffer, size_t *len); -int irp_unmarshall_ho(struct hostent *ho, char *buffer); -int irp_marshall_ng(const char *host, const char *user, const char *domain, - char **buffer, size_t *len); -int irp_unmarshall_ng(const char **host, const char **user, - const char **domain, char *buffer); -int irp_marshall_nw(struct nwent *ne, char **buffer, size_t *len); -int irp_unmarshall_nw(struct nwent *ne, char *buffer); -int irp_marshall_ne(struct netent *ne, char **buffer, size_t *len); -int irp_unmarshall_ne(struct netent *ne, char *buffer); +int irp_marshall_pw(const struct passwd *, char **, size_t *); +int irp_unmarshall_pw(struct passwd *, char *); +int irp_marshall_gr(const struct group *, char **, size_t *); +int irp_unmarshall_gr(struct group *, char *); +int irp_marshall_sv(const struct servent *, char **, size_t *); +int irp_unmarshall_sv(struct servent *, char *); +int irp_marshall_pr(struct protoent *, char **, size_t *); +int irp_unmarshall_pr(struct protoent *, char *); +int irp_marshall_ho(struct hostent *, char **, size_t *); +int irp_unmarshall_ho(struct hostent *, char *); +int irp_marshall_ng(const char *, const char *, const char *, + char **, size_t *); +int irp_unmarshall_ng(const char **, const char **, const char **, char *); +int irp_marshall_nw(struct nwent *, char **, size_t *); +int irp_unmarshall_nw(struct nwent *, char *); +int irp_marshall_ne(struct netent *, char **, size_t *); +int irp_unmarshall_ne(struct netent *, char *); /* * Functions to marshall and unmarshall various system data structures. We diff --git a/lib/bind/include/isc/logging.h b/lib/bind/include/isc/logging.h index 6d6976f1a8..dc491dc095 100644 --- a/lib/bind/include/isc/logging.h +++ b/lib/bind/include/isc/logging.h @@ -80,12 +80,15 @@ FILE * log_get_stream(log_channel); char * log_get_filename(log_channel); int log_check_channel(log_context, int, log_channel); int log_check(log_context, int, int); -void log_vwrite(log_context, int, int, const char *, - va_list args); #ifdef __GNUC__ +void log_vwrite(log_context, int, int, const char *, + va_list args) + __attribute__((__format__(__printf__, 4, 0))); void log_write(log_context, int, int, const char *, ...) __attribute__((__format__(__printf__, 4, 5))); #else +void log_vwrite(log_context, int, int, const char *, + va_list args); void log_write(log_context, int, int, const char *, ...); #endif int log_new_context(int, char **, log_context *); diff --git a/lib/bind/include/isc/misc.h b/lib/bind/include/isc/misc.h index b75121d4d2..e9b177fda9 100644 --- a/lib/bind/include/isc/misc.h +++ b/lib/bind/include/isc/misc.h @@ -16,7 +16,7 @@ */ /* - * $Id: misc.h,v 1.2 2001/06/21 08:26:05 marka Exp $ + * $Id: misc.h,v 1.3 2003/06/03 04:39:30 marka Exp $ */ #ifndef _ISC_MISC_H @@ -27,7 +27,7 @@ #define bitncmp __bitncmp /*#define isc_movefile __isc_movefile */ -extern int bitncmp(const void *l, const void *r, int n); +extern int bitncmp(const void *, const void *, int); extern int isc_movefile(const char *, const char *); extern int isc_gethexstring(unsigned char *, size_t, int, FILE *, diff --git a/lib/bind/include/isc/tree.h b/lib/bind/include/isc/tree.h index f383489e17..80df6cfa12 100644 --- a/lib/bind/include/isc/tree.h +++ b/lib/bind/include/isc/tree.h @@ -3,7 +3,7 @@ * vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes] * vix 27jun86 [broken out of tree.c] * - * $Id: tree.h,v 1.1 2001/03/29 06:31:37 marka Exp $ + * $Id: tree.h,v 1.2 2003/06/03 04:39:30 marka Exp $ */ @@ -28,6 +28,16 @@ typedef void *tree_t; typedef char *tree_t; #endif +/* + * Do not taint namespace + */ +#define tree_add __tree_add +#define tree_delete __tree_delete +#define tree_init __tree_init +#define tree_mung __tree_mung +#define tree_srch __tree_srch +#define tree_trav __tree_trav + typedef struct tree_s { tree_t data; diff --git a/lib/bind/include/netdb.h b/lib/bind/include/netdb.h index d992ad7b7b..7ef4c47cbe 100644 --- a/lib/bind/include/netdb.h +++ b/lib/bind/include/netdb.h @@ -86,7 +86,7 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * $Id: netdb.h,v 1.12 2001/07/23 00:48:51 marka Exp $ + * $Id: netdb.h,v 1.13 2003/06/03 04:39:28 marka Exp $ */ #ifndef _NETDB_H_ @@ -192,7 +192,6 @@ struct addrinfo { /* * Error return codes from getaddrinfo() */ - #define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ #define EAI_AGAIN 2 /* temporary failure in name resolution */ #define EAI_BADFLAGS 3 /* invalid value for ai_flags */ diff --git a/lib/bind/include/resolv.h b/lib/bind/include/resolv.h index 9579a2f010..be1c644ff4 100644 --- a/lib/bind/include/resolv.h +++ b/lib/bind/include/resolv.h @@ -50,7 +50,7 @@ /* * @(#)resolv.h 8.1 (Berkeley) 6/2/93 - * $Id: resolv.h,v 1.17 2002/06/28 05:46:10 marka Exp $ + * $Id: resolv.h,v 1.18 2003/06/03 04:39:28 marka Exp $ */ #ifndef _RESOLV_H_ @@ -75,7 +75,7 @@ * is new enough to contain a certain feature. */ -#define __RES 19991006 +#define __RES 20030124 /* * This used to be defined in res_query.c, now it's in herror.c. @@ -105,7 +105,7 @@ __END_DECLS /* * Resolver configuration file. * Normally not present, but may contain the address of the - * inital name server(s) to query and the domain search list. + * initial name server(s) to query and the domain search list. */ #ifndef _PATH_RESCONF @@ -115,19 +115,13 @@ __END_DECLS typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; -typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr * const *ns, - const u_char **query, - int *querylen, - u_char *ans, - int anssiz, - int *resplen)); +typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr * const *, + const u_char **, int *, + u_char *, int, int *)); -typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr *ns, - const u_char *query, - int querylen, - u_char *ans, - int anssiz, - int *resplen)); +typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr *, + const u_char *, int, u_char *, + int, int *)); struct res_sym { int number; /* Identifying number, like T_MX */ @@ -154,7 +148,7 @@ struct res_sym { struct __res_state_ext; struct __res_state { - int retrans; /* retransmition time interval */ + int retrans; /* retransmission time interval */ int retry; /* number of times to retransmit */ #ifdef sun u_int options; /* option flags - see below. */ @@ -219,6 +213,10 @@ union res_sockaddr_union { #define RES_F_VC 0x00000001 /* socket is TCP */ #define RES_F_CONN 0x00000002 /* socket is connected */ #define RES_F_EDNS0ERR 0x00000004 /* EDNS0 caused errors */ +#define RES_F__UNUSED 0x00000008 /* (unused) */ +#define RES_F_LASTMASK 0x000000F0 /* ordinal server of last res_nsend */ +#define RES_F_LASTSHIFT 4 /* bit position of LASTMASK "flag" */ +#define RES_GETLAST(res) (((res)._flags & RES_F_LASTMASK) >> RES_F_LASTSHIFT) /* res_findzonecut2() options */ #define RES_EXHAUSTIVE 0x00000001 /* always do all queries */ @@ -246,13 +244,10 @@ union res_sockaddr_union { #define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */ #define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */ #define RES_BLAST 0x00020000 /* blast all recursive servers */ -#define RES_NO_NIBBLE 0x00040000 /* disable IPv6 nibble mode reverse */ -#define RES_NO_BITSTRING 0x00080000 /* disable IPv6 bitstring mode reverse */ #define RES_NOTLDQUERY 0x00100000 /* don't unqualified name as a tld */ #define RES_USE_DNSSEC 0x00200000 /* use DNSSEC using OK bit in OPT */ /* KAME extensions: use higher bit to avoid conflict with ISC use */ #define RES_USE_DNAME 0x10000000 /* use DNAME */ -#define RES_USE_A6 0x20000000 /* use A6 */ #define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */ #define RES_NO_NIBBLE2 0x80000000 /* disable alternate nibble lookup */ @@ -361,6 +356,7 @@ extern const struct res_sym __p_rcode_syms[]; #define p_time __p_time #define p_type __p_type #define p_rcode __p_rcode +#define p_sockun __p_sockun #define putlong __putlong #define putshort __putshort #define res_dnok __res_dnok @@ -392,6 +388,18 @@ extern const struct res_sym __p_rcode_syms[]; #define res_nametotype __res_nametotype #define res_setservers __res_setservers #define res_getservers __res_getservers +#define res_buildprotolist __res_buildprotolist +#define res_destroyprotolist __res_destroyprotolist +#define res_destroyservicelist __res_destroyservicelist +#define res_get_nibblesuffix __res_get_nibblesuffix +#define res_get_nibblesuffix2 __res_get_nibblesuffix2 +#define res_ourserver_p __res_ourserver_p +#define res_protocolname __res_protocolname +#define res_protocolnumber __res_protocolnumber +#define res_send_setqhook __res_send_setqhook +#define res_send_setrhook __res_send_setrhook +#define res_servicename __res_servicename +#define res_servicenumber __res_servicenumber __BEGIN_DECLS int res_hnok __P((const char *)); int res_ownok __P((const char *)); @@ -402,25 +410,26 @@ const char * sym_ntos __P((const struct res_sym *, int, int *)); const char * sym_ntop __P((const struct res_sym *, int, int *)); int b64_ntop __P((u_char const *, size_t, char *, size_t)); int b64_pton __P((char const *, u_char *, size_t)); -int loc_aton __P((const char *ascii, u_char *binary)); -const char * loc_ntoa __P((const u_char *binary, char *ascii)); +int loc_aton __P((const char *, u_char *)); +const char * loc_ntoa __P((const u_char *, char *)); int dn_skipname __P((const u_char *, const u_char *)); void putlong __P((u_int32_t, u_char *)); void putshort __P((u_int16_t, u_char *)); #ifndef __ultrix__ -u_int16_t _getshort __P((const u_char *src)); -u_int32_t _getlong __P((const u_char *src)); +u_int16_t _getshort __P((const u_char *)); +u_int32_t _getlong __P((const u_char *)); #endif const char * p_class __P((int)); const char * p_time __P((u_int32_t)); const char * p_type __P((int)); const char * p_rcode __P((int)); +const char * p_sockun __P((union res_sockaddr_union, char *, size_t)); const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *)); const u_char * p_cdname __P((const u_char *, const u_char *, FILE *)); -const u_char * p_fqnname __P((const u_char *cp, const u_char *msg, +const u_char * p_fqnname __P((const u_char *, const u_char *, int, char *, int)); const u_char * p_fqname __P((const u_char *, const u_char *, FILE *)); -const char * p_option __P((u_long option)); +const char * p_option __P((u_long)); char * p_secstodate __P((u_long)); int dn_count_labels __P((const char *)); int dn_comp __P((const char *, u_char *, int, @@ -428,11 +437,11 @@ int dn_comp __P((const char *, u_char *, int, int dn_expand __P((const u_char *, const u_char *, const u_char *, char *, int)); u_int res_randomid __P((void)); -int res_nameinquery __P((const char *, int, int, - const u_char *, const u_char *)); +int res_nameinquery __P((const char *, int, int, const u_char *, + const u_char *)); int res_queriesmatch __P((const u_char *, const u_char *, const u_char *, const u_char *)); -const char * p_section __P((int section, int opcode)); +const char * p_section __P((int, int)); /* Things involving a resolver context. */ int res_ninit __P((res_state)); int res_nisourserver __P((const res_state, @@ -441,16 +450,15 @@ void fp_resstat __P((const res_state, FILE *)); void res_pquery __P((const res_state, const u_char *, int, FILE *)); const char * res_hostalias __P((const res_state, const char *, char *, size_t)); -int res_nquery __P((res_state, - const char *, int, int, u_char *, int)); -int res_nsearch __P((res_state, const char *, int, - int, u_char *, int)); -int res_nquerydomain __P((res_state, - const char *, const char *, int, int, - u_char *, int)); -int res_nmkquery __P((res_state, - int, const char *, int, int, const u_char *, - int, const u_char *, u_char *, int)); +int res_nquery __P((res_state, const char *, int, int, + u_char *, int)); +int res_nsearch __P((res_state, const char *, int, int, u_char *, + int)); +int res_nquerydomain __P((res_state, const char *, const char *, + int, int, u_char *, int)); +int res_nmkquery __P((res_state, int, const char *, int, int, + const u_char *, int, const u_char *, + u_char *, int)); int res_nsend __P((res_state, const u_char *, int, u_char *, int)); int res_nsendsigned __P((res_state, const u_char *, int, ns_tsig_key *, u_char *, int)); @@ -461,20 +469,19 @@ int res_findzonecut2 __P((res_state, const char *, ns_class, int, union res_sockaddr_union *, int)); void res_nclose __P((res_state)); int res_nopt __P((res_state, int, u_char *, int, int)); -void res_send_setqhook __P((res_send_qhook hook)); -void res_send_setrhook __P((res_send_rhook hook)); +void res_send_setqhook __P((res_send_qhook)); +void res_send_setrhook __P((res_send_rhook)); int __res_vinit __P((res_state, int)); void res_destroyservicelist __P((void)); -const char * res_servicename __P((u_int16_t port, const char *proto)); -const char * res_protocolname __P((int num)); +const char * res_servicename __P((u_int16_t, const char *)); +const char * res_protocolname __P((int)); void res_destroyprotolist __P((void)); void res_buildprotolist __P((void)); const char * res_get_nibblesuffix __P((res_state)); const char * res_get_nibblesuffix2 __P((res_state)); -const char * res_get_bitstringsuffix __P((res_state)); void res_ndestroy __P((res_state)); -u_int16_t res_nametoclass __P((const char *buf, int *success)); -u_int16_t res_nametotype __P((const char *buf, int *success)); +u_int16_t res_nametoclass __P((const char *, int *)); +u_int16_t res_nametotype __P((const char *, int *)); void res_setservers __P((res_state, const union res_sockaddr_union *, int)); int res_getservers __P((res_state, diff --git a/lib/bind/irs/dns_gr.c b/lib/bind/irs/dns_gr.c index a47ba1e412..d0190e72e4 100644 --- a/lib/bind/irs/dns_gr.c +++ b/lib/bind/irs/dns_gr.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: dns_gr.c,v 1.1 2001/03/29 06:31:42 marka Exp $"; +static const char rcsid[] = "$Id: dns_gr.c,v 1.2 2003/06/03 04:39:30 marka Exp $"; #endif /* @@ -226,7 +226,7 @@ get_hes_group(struct irs_gr *this, const char *name, const char *type) { goto cleanup; *cp++ = '\0'; - errno = -1; + errno = 0; t = strtoul(cp, NULL, 10); if (errno == ERANGE) goto cleanup; diff --git a/lib/bind/irs/dns_ho.c b/lib/bind/irs/dns_ho.c index bb7b512bcd..79c3bddb4d 100644 --- a/lib/bind/irs/dns_ho.c +++ b/lib/bind/irs/dns_ho.c @@ -52,7 +52,7 @@ /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: dns_ho.c,v 1.11 2002/06/28 06:12:42 marka Exp $"; +static const char rcsid[] = "$Id: dns_ho.c,v 1.12 2003/06/03 04:39:30 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports. */ @@ -95,7 +95,7 @@ static const char rcsid[] = "$Id: dns_ho.c,v 1.11 2002/06/28 06:12:42 marka Exp #define MAXALIASES 35 #define MAXADDRS 35 -#define MAXPACKET (1024*64) +#define MAXPACKET (65535) /* Maximum TCP message size */ #define BOUNDS_CHECK(ptr, count) \ if ((ptr) + (count) > eom) { \ @@ -172,15 +172,6 @@ static struct hostent * gethostans(struct irs_ho *this, const struct addrinfo *pai); static int add_hostent(struct pvt *pvt, char *bp, char **hap, struct addrinfo *ai); -static const u_char * ar_head(const u_char *, int, const u_char *, - const u_char *, struct pvt *, - int (*)(const char *)); -static struct addrinfo * a6_expand(const u_char *, const u_char *, int, - const u_char *, const u_char *, - const struct in6_addr *, int, - const struct addrinfo *, - struct pvt *, int (*)(const char *), int *); -static const char *dname_subst(const char *, const char *, const char *); static int init(struct irs_ho *this); /* Exports. */ @@ -257,21 +248,19 @@ ho_byname2(struct irs_ho *this, const char *name, int af) char tmp[NS_MAXDNAME]; const char *cp; struct addrinfo ai; - struct dns_res_target *q, *q2, *p; + struct dns_res_target *q, *p; int querystate = RESQRY_FAIL; if (init(this) == -1) return (NULL); q = memget(sizeof(*q)); - q2 = memget(sizeof(*q2)); - if (q == NULL || q2 == NULL) { + if (q == NULL) { RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); errno = ENOMEM; goto cleanup; } memset(q, 0, sizeof(q)); - memset(q2, 0, sizeof(q2)); switch (af) { case AF_INET: @@ -285,21 +274,10 @@ ho_byname2(struct irs_ho *this, const char *name, int af) case AF_INET6: size = IN6ADDRSZ; q->qclass = C_IN; - q->qtype = ns_t_a6; + q->qtype = T_AAAA; q->answer = q->qbuf.buf; q->anslen = sizeof(q->qbuf); - q->next = q2; -#ifdef RES_USE_A6 - if ((pvt->res->options & RES_USE_A6) == 0) - q->action = RESTGT_IGNORE; - else -#endif - q->action = RESTGT_DOALWAYS; - q2->qclass = C_IN; - q2->qtype = T_AAAA; - q2->answer = q2->qbuf.buf; - q2->anslen = sizeof(q2->qbuf); - q2->action = RESTGT_AFTERFAILURE; + q->action = RESTGT_DOALWAYS; break; default: RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); @@ -349,8 +327,6 @@ ho_byname2(struct irs_ho *this, const char *name, int af) cleanup: if (q != NULL) memput(q, sizeof(*q)); - if (q2 != NULL) - memput(q2, sizeof(*q2)); return(hp); } @@ -363,7 +339,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) struct hostent *hp = NULL; struct addrinfo ai; struct dns_res_target *q, *q2, *p; - int n, size; + int n, size, i; int querystate = RESQRY_FAIL; if (init(this) == -1) @@ -440,20 +416,36 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) if (q->action != RESTGT_IGNORE) { qp = q->qname; for (n = IN6ADDRSZ - 1; n >= 0; n--) { - qp += SPRINTF((qp, "%x.%x.", + i = SPRINTF((qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf)); + if (i < 0) + abort(); + qp += i; } +#ifdef HAVE_STRLCAT + strlcat(q->qname, res_get_nibblesuffix(pvt->res), + sizeof(q->qname)); +#else strcpy(qp, res_get_nibblesuffix(pvt->res)); +#endif } if (q2->action != RESTGT_IGNORE) { qp = q2->qname; for (n = IN6ADDRSZ - 1; n >= 0; n--) { - qp += SPRINTF((qp, "%x.%x.", + i = SPRINTF((qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf)); + if (i < 0) + abort(); + qp += i; } +#ifdef HAVE_STRLCAT + strlcat(q->qname, res_get_nibblesuffix2(pvt->res), + sizeof(q->qname)); +#else strcpy(qp, res_get_nibblesuffix2(pvt->res)); +#endif } break; default: @@ -563,7 +555,7 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) int n; char tmp[NS_MAXDNAME]; const char *cp; - struct dns_res_target *q, *q2, *q3, *p; + struct dns_res_target *q, *q2, *p; struct addrinfo sentinel, *cur; int querystate = RESQRY_FAIL; @@ -575,42 +567,28 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) q = memget(sizeof(*q)); q2 = memget(sizeof(*q2)); - q3 = memget(sizeof(*q3)); - if (q == NULL || q2 == NULL || q3 == NULL) { + if (q == NULL || q2 == NULL) { RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL); errno = ENOMEM; goto cleanup; } memset(q, 0, sizeof(q2)); memset(q2, 0, sizeof(q2)); - memset(q3, 0, sizeof(q3)); switch (pai->ai_family) { case AF_UNSPEC: /* prefer IPv6 */ q->qclass = C_IN; - q->qtype = ns_t_a6; + q->qtype = T_AAAA; q->answer = q->qbuf.buf; q->anslen = sizeof(q->qbuf); q->next = q2; -#ifdef RES_USE_A6 - if ((pvt->res->options & RES_USE_A6) == 0) - q->action = RESTGT_IGNORE; - else -#endif - q->action = RESTGT_DOALWAYS; + q->action = RESTGT_DOALWAYS; q2->qclass = C_IN; - q2->qtype = T_AAAA; + q2->qtype = T_A; q2->answer = q2->qbuf.buf; q2->anslen = sizeof(q2->qbuf); - q2->next = q3; - /* try AAAA only when A6 query fails */ - q2->action = RESTGT_AFTERFAILURE; - q3->qclass = C_IN; - q3->qtype = T_A; - q3->answer = q3->qbuf.buf; - q3->anslen = sizeof(q3->qbuf); - q3->action = RESTGT_DOALWAYS; + q2->action = RESTGT_DOALWAYS; break; case AF_INET: q->qclass = C_IN; @@ -621,21 +599,10 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) break; case AF_INET6: q->qclass = C_IN; - q->qtype = ns_t_a6; + q->qtype = T_AAAA; q->answer = q->qbuf.buf; q->anslen = sizeof(q->qbuf); - q->next = q2; -#ifdef RES_USE_A6 - if ((pvt->res->options & RES_USE_A6) == 0) - q->action = RESTGT_IGNORE; - else -#endif - q->action = RESTGT_DOALWAYS; - q2->qclass = C_IN; - q2->qtype = T_AAAA; - q2->answer = q2->qbuf.buf; - q2->anslen = sizeof(q2->qbuf); - q2->action = RESTGT_AFTERFAILURE; + q->action = RESTGT_DOALWAYS; break; default: RES_SET_H_ERRNO(pvt->res, NO_RECOVERY); /* better error? */ @@ -688,375 +655,9 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) memput(q, sizeof(*q)); if (q2 != NULL) memput(q2, sizeof(*q2)); - if (q3 != NULL) - memput(q3, sizeof(*q3)); return(sentinel.ai_next); } -static const u_char * -ar_head(cp, count, msg, eom, pvt, name_ok) - const u_char *cp, *msg, *eom; - int count; - struct pvt *pvt; - int (*name_ok)(const char *); -{ - int n; - char buf[1024]; /* XXX */ - - while (count-- > 0 && cp < eom) { - n = dn_expand(msg, eom, cp, buf, sizeof(buf)); - if (n < 0 || !maybe_ok(pvt->res, buf, name_ok)) - goto end; - cp += n; /* name */ - if (cp + 3 * INT16SZ + INT32SZ >= eom) - goto end; - cp += INT16SZ; /* type */ - cp += INT16SZ + INT32SZ; /* class, TTL */ - n = ns_get16(cp); - cp += n + INT16SZ; /* len */ - } - return(cp); - - end: - return(eom); /* XXX */ -} - -/* XXX: too many arguments */ -static struct addrinfo * -a6_expand(const u_char *ansbuf, const u_char *a6p, - int a6len, const u_char *arp, const u_char *eom, - const struct in6_addr *in6, int plen, const struct addrinfo *pai, - struct pvt *pvt, int (*name_ok)(const char *), int *errorp) -{ - struct in6_addr a; - int n, pbyte, plen1, pbyte1, error = 0; - const u_char *cp; - struct addrinfo sentinel, *cur; - char pname[1024], buf[1024]; /* XXX */ - - *errorp = NETDB_SUCCESS; - memset(&sentinel, 0, sizeof(sentinel)); - cur = &sentinel; - - /* - * Validate A6 parameters. - */ - if (a6len == 0) { /* an A6 record must contain at least 1 byte. */ - error = NO_RECOVERY; - goto bad; - } - /* prefix length check. */ - if ((plen1 = *a6p) > 128) { - error = NO_RECOVERY; - goto bad; - } - if (plen1 > plen) { - /* - * New length must not be greater than old one. - * Ignore the record as specified in RFC 2874 - * Section 3.1.2. - */ - return(NULL); /* just ignore. */ - } - /* boundary check for new plen and prefix addr */ - pbyte1 = (plen1 & ~7) / 8; - if ((int)sizeof(struct in6_addr) - pbyte1 > a6len - 1) { - error = NO_RECOVERY; - goto bad; - } - - /* - * merge the new prefix portion. - * <--- plen(bits) ---> - * <--- pbyte ---><-b-> - * 000000000000000pppppxxxxxxxxxxx(= in6, 0: unknown, x: known, p: pad) - * PP++++++++(+ should be merged. P: padding, must be 0) - * <-- plen1--> - * <-pbyte1-> - * ^a6p+1 - * The result should be: - * 0000000000PP++++++++xxxxxxxxxxx(= a) - */ - pbyte = (plen & ~7) / 8; - a = *in6; - if (pbyte > pbyte1) { - /* N.B. the case of "pbyte1 == 128" is implicitly excluded. */ - int b = plen % 8; /* = the length of "pp..." above */ - u_char c_hi, c_lo; - - memcpy(&a.s6_addr[pbyte1], a6p + 1, pbyte - pbyte1); - if (b > 0) { - c_hi = a6p[pbyte - pbyte1 + 1]; - c_lo = in6->s6_addr[pbyte]; - a.s6_addr[pbyte] = - (c_hi & (0xff << (8 - b))) | - ((0x00ff >> b) & c_lo); - } - } - -#if 0 /* for debug */ - if ((pvt->res->options & RES_DEBUG) != 0) { - u_char ntopbuf[INET6_ADDRSTRLEN]; - - inet_ntop(AF_INET6, &a, ntopbuf, sizeof(ntopbuf)); - printf("a6_expand: %s\\%d\n", ntopbuf, plen1); - } -#endif - - if (plen1 == 0) { - /* Here is the end of A6 chain. make addrinfo, then return. */ - return(addr2addrinfo(pai, (const char *)&a)); - } - - /* - * Expand the new prefix name. Since the prefix name must not be - * compressed (RFC 2874 Section 3.1.1), we could use ns_name_ntop() - * here if it had a stricter boundary check. - */ - cp = a6p + 1 + (sizeof(*in6) - pbyte1); - n = dn_expand(ansbuf, eom, cp, pname, sizeof(pname)); - if (n < 0 || !maybe_ok(pvt->res, pname, name_ok)) { - error = NO_RECOVERY; - goto bad; - } - if (cp + n != a6p + a6len) { /* length mismatch */ - error = NO_RECOVERY; - goto bad; - } - - /* - * we need (more) additional section records, but no one is - * available, which possibly means a malformed answer. - */ - if (arp == NULL) { - error = NO_RECOVERY; /* we can't resolve the chain. */ - goto bad; - } - - /* - * Loop thru the rest of the buffer, searching for the next A6 record - * that has the same owner name as the prefix name. If found, then - * recursively call this function to expand the whole A6 chain. - */ - plen = plen1; - for (cp = arp; cp != NULL && cp < eom; cp += n) { - int class, type; - - n = dn_expand(ansbuf, eom, cp, buf, sizeof(buf)); - if (n < 0 || !maybe_ok(pvt->res, buf, name_ok)) { - error = NO_RECOVERY; - goto bad; - } - cp += n; /* name */ - if (cp + 3 * INT16SZ + INT32SZ > eom) { - error = NO_RECOVERY; - goto bad; - } - type = ns_get16(cp); - cp += INT16SZ; /* type */ - class = ns_get16(cp); - cp += INT16SZ + INT32SZ; /* class, TTL */ - n = ns_get16(cp); - cp += INT16SZ; /* len */ - if (cp + n > eom) { - error = NO_RECOVERY; - goto bad; - } - if (class != C_IN || type != ns_t_a6) { - /* we are only interested in A6 records. skip others */ - continue; - } - - if (ns_samename(buf, pname) != 1) { - continue; - } - - /* Proceed to the next record in the chain. */ - cur->ai_next = a6_expand(ansbuf, cp, n, cp + n, eom, - (const struct in6_addr *)&a, - plen, pai, pvt, name_ok, &error); - if (error != NETDB_SUCCESS) - goto bad; - while (cur && cur->ai_next) - cur = cur->ai_next; - } - - return(sentinel.ai_next); - - bad: - *errorp = error; - if (sentinel.ai_next) - freeaddrinfo(sentinel.ai_next); - return(NULL); -} - -static const char * -dname_subst(const char *qname0, const char *owner0, const char *target) { - char owner[MAXDNAME]; - static char qname[MAXDNAME]; - const char blabelhead[] = "\\[x"; /* we can assume hex strings */ - int qlen, olen; - int bufsiz = sizeof(qname); - - /* make local copies, which are canonicalized. */ - if (ns_makecanon(qname0, qname, sizeof(qname)) < 0 || - ns_makecanon(owner0, owner, sizeof(owner)) < 0) - return(NULL); - qlen = strlen(qname); - olen = strlen(owner); - /* from now on, do not refer to qname0 nor owner0. */ - - /* - * check if QNAME is a subdomain of OWNER. - * XXX: currently, we only handle the following two cases: - * (A) none of the labels are bitlabels, or - * (B) both of the head labels are bitlabels (and the following - * labels are NOT bitlabels). - * If we pass the check, then subtract the remaining part from QNAME. - * ex. (A) qname=www.foo.com,owner=foo.com => new qname=www. - * (B) qname=\[x3ffe0501/32].foo.com,owner=\[x3ffe/16].foo.com - * => new qname=\[x0501/16]. - */ - if (ns_samedomain(qname, owner)) { /* check (A) */ - /* at this point, qlen must not be smaller than olen */ - qname[qlen - olen] = 0; - bufsiz -= (qlen - olen); - } else { /* check (B) */ - char *parent0, *parent1; - /* the following 3 have enough size to store 1 bitlabel */ - u_char qlabel[64], olabel[64], newlabel[64]; - int qlabellen, olabellen; - - if (strncmp(qname, blabelhead, 3) != 0 || - strncmp(owner, blabelhead, 3) != 0) - return(NULL); - /* - * Both two begin with bitlabels. The succeeding parts - * must exact match. - */ - if ((parent0 = strchr(qname, '.')) == NULL || - (parent1 = strchr(owner, '.')) == NULL) - return(NULL); - - /* ns_samename allows names to begin with '.' */ - if (ns_samename(parent0, parent1) != 1) - return(NULL); - - /* cut the upper domain parts off. */ - *(parent0 + 1) = 0; - *(parent1 + 1) = 0; - /* convert the textual form into binary one. */ - if (ns_name_pton(qname, qlabel, sizeof(qlabel)) < 0 || - ns_name_pton(owner, olabel, sizeof(olabel)) < 0) - return(NULL); - if ((qlabellen = *(qlabel + 1)) == 0) - qlabellen = 256; - if ((olabellen = *(olabel + 1)) == 0) - olabellen = 256; - if (olabellen > qlabellen) - return(NULL); /* owner does not contain qname. */ - else { - int qplen = (qlabellen + 7) / 8; - int oplen = (olabellen + 7) / 8; - int sft = olabellen % 8; - int nllen, n; - u_char *qp, *op, *np; - - /* skip ELT and Count. */ - qp = qlabel + 2; - op = olabel + 2; - - /* check if olabel is a "subdomain" of qlabel. */ - if (memcmp(qp, op, oplen - 1) != 0) - return(NULL); - if (sft > 0) { - /* compare trailing bits (between 1 and 7) */ - if ((qp[qplen - 1] & (0xff << sft)) != - op[qplen - 1]) - return(NULL); - } - - /* OK, get remaining bits from qlabel. */ - np = newlabel; - if (olabellen == qlabellen) { - /* - * Two names (including bitlabels) are exactly - * same. Discard the whole names. - * XXX: ns_samename() above should exclude - * this case... - */ - qname[0] = 0; - goto maketarget; - } - *np++ = 0x41; /* XXX hardcoding */ - *np++ = nllen = (qlabellen - olabellen); - if (sft == 0) { - /* - * No alignment issue. can just use memcpy. - * Note that the "else" part below contains - * this case. We separate the two cases just - * for efficiency. - * We assume that ns_name_pton above ensures - * QP does not contain trailing garbages. - */ - memcpy(np, qp + oplen, qplen - oplen); - np += qplen - oplen; - *np = 0; - } else { - /* - * copy the lower (8-SFT) bits of QP to the - * upper (8-SFT) bits of NP, then copy the - * upper SFT bits of QP+1 to the lower SFT bits - * of NP, and so on... - * if QP is xxxyyyyy zzzwww..., then - * NP would be yyyyyzzz ... - * Again, we assume QP does not contain - * trailing garbages. - */ - qp += (oplen - 1); - while (nllen > 0) { - *np = (*qp << sft) & 0xff; - if ((nllen -= (8 - sft)) <= 0) - break; /* done */ - qp++; - *np |= ((*qp >> sft) & 0xff); - np++; - nllen -= sft; - } - *++np = 0; - } - - /* - * make a new bitlabel with the remaining bits. - * Note that there's no buffer boundary issue, since - * qlabel, olabel, and newlabel all have the same size. - * ns_name_ntop() must not return 0, since we have - * a non-empty bitlabel. - */ - if ((n = ns_name_ntop(newlabel, qname, sizeof(qname))) - <= 0) - return(NULL); - bufsiz -= n; - if (qname[n - 1] != '.') { /* XXX no trailing dot */ - qname[n - 1] = '.'; - qname[n] = 0; - bufsiz--; - } - - } - } - - maketarget: - /* - * Finally, append the remaining part (maybe empty) to the new target. - */ - if (bufsiz < (int)strlen(target)) /* bufsiz takes care of the \0. */ - return(NULL); - strcat(qname, target); - - return((const char *)qname); -} - static void ho_res_set(struct irs_ho *this, struct __res_state *res, void (*free_res)(void *)) { @@ -1092,7 +693,6 @@ gethostans(struct irs_ho *this, char *bp, *ep, **ap, **hap; char tbuf[MAXDNAME+1]; struct addrinfo sentinel, *cur, ai; - const u_char *arp = NULL; if (pai == NULL) abort(); if (ret_aip != NULL) @@ -1103,7 +703,6 @@ gethostans(struct irs_ho *this, tname = qname; eom = ansbuf + anslen; switch (qtype) { - case ns_t_a6: case T_A: case T_AAAA: case T_ANY: /* use T_ANY only for T_A/T_AAAA lookup */ @@ -1148,8 +747,7 @@ gethostans(struct irs_ho *this, RES_SET_H_ERRNO(pvt->res, NO_RECOVERY); return (NULL); } - if (qtype == T_A || qtype == T_AAAA || - qtype == ns_t_a6 || qtype == T_ANY) { + if (qtype == T_A || qtype == T_AAAA || qtype == T_ANY) { /* res_nsend() has already verified that the query name is the * same as the one we sent; this just gets the expanded name * (i.e., with the succeeding search-domain tacked on). @@ -1193,8 +791,8 @@ gethostans(struct irs_ho *this, continue; } eor = cp + n; - if ((qtype == T_A || qtype == T_AAAA || qtype == ns_t_a6 || - qtype == T_ANY) && type == T_CNAME) { + if ((qtype == T_A || qtype == T_AAAA || qtype == T_ANY) && + type == T_CNAME) { if (haveanswer) { int level = LOG_CRIT; #ifdef LOG_SECURITY @@ -1222,58 +820,16 @@ gethostans(struct irs_ho *this, had_error++; continue; } +#ifdef HAVE_STRLCPY + strlcpy(bp, tbuf, ep - bp); +#else strcpy(bp, tbuf); +#endif pvt->host.h_name = bp; hname = bp; bp += n; continue; } - if (type == ns_t_dname) { - const char *t0, *t; - - /* - * just replace the query target; do not update the - * alias list. (Or should we?) - */ - t0 = (qtype == T_PTR) ? tname : hname; - - n = dn_expand(ansbuf, eor, cp, tbuf, sizeof(tbuf)); - if (n < 0 || !maybe_dnok(pvt->res, tbuf)) { - had_error++; - continue; - } -#ifdef RES_USE_DNAME - if ((pvt ->res->options & RES_USE_DNAME) == 0) { - cp += n; - continue; - } -#endif - if ((t = dname_subst(t0, bp, tbuf)) == NULL) { - cp += n; - continue; - } -#if 0 /* for debug */ - if ((pvt->res->options & RES_DEBUG) != 0) { - printf("DNAME owner=%s, target=%s, next=%s\n", - bp, tbuf, t); - } -#endif - cp += n; - - n = strlen(t) + 1; /* for the \0 */ - if (n > (ep - bp)) { - had_error++; - continue; - } - strcpy(bp, t); - if (qtype == T_PTR) - tname = bp; - else - hname = bp; - bp += n; - - continue; - } if (qtype == T_PTR && type == T_CNAME) { n = dn_expand(ansbuf, eor, cp, tbuf, sizeof tbuf); if (n < 0 || !maybe_dnok(pvt->res, tbuf)) { @@ -1300,14 +856,17 @@ gethostans(struct irs_ho *this, had_error++; continue; } +#ifdef HAVE_STRLCPY + strlcpy(bp, tbuf, ep - bp); +#else strcpy(bp, tbuf); +#endif tname = bp; bp += n; continue; } if (qtype == T_ANY) { - if (!(type == T_A || type == T_AAAA || - type == ns_t_a6)) { + if (!(type == T_A || type == T_AAAA)) { cp += n; continue; } @@ -1346,66 +905,6 @@ gethostans(struct irs_ho *this, bp += n; } break; - case ns_t_a6: { - struct in6_addr in6; - struct addrinfo ai; - -#ifdef RES_USE_A6 - if ((pvt->res->options & RES_USE_A6) == 0) { - cp += n; - continue; - } -#endif - - if (ns_samename(hname, bp) != 1) { - cp += n; - continue; - } - - /* - * search for the top of the additional section. - * once found, keep it for the case where we have - * more than one A6 record. - * XXX: however, we may not need this part. - */ - if (arp == NULL && arcount > 0) { - int nscount = ntohs(hp->nscount); - - arp = ar_head(cp + n, nscount + ancount - 1, - ansbuf, eom, pvt, name_ok); - } - - /* recursively collect the whole A6 chain */ - ai = *pai; /* XXX: we can't override constant pai */ - ai.ai_family = AF_INET6; - memset(&in6, 0, sizeof(in6)); /* just for safety */ - cur->ai_next = a6_expand(ansbuf, cp, n, arp, eom, - &in6, 128, - (const struct addrinfo *)&ai, - pvt, name_ok, &error); - if (error != NETDB_SUCCESS) { -#ifdef DEBUG - /* in this case, cur->ai_next must be NULL. */ - if (cur->ai_next != NULL) - abort(); -#endif - had_error++; - continue; - } - - /* - * We don't bother even if cur->ai_next is NULL unless - * the expansion failed by a fatal error. The list - * can be NULL if the given A6 is incomplete, but we - * may have another complete A6 chain in this answer. - * See the last paragraph of RFC 2874 Section 3.1.4. - */ - if (cur->ai_next == NULL) { - cp += n; - continue; /* no error, no answer */ - } - goto convertinfo; - } /* FALLTHROUGH */ case T_A: case T_AAAA: if (ns_samename(hname, bp) != 1) { @@ -1430,7 +929,6 @@ gethostans(struct irs_ho *this, if (cur->ai_next == NULL) had_error++; - convertinfo: /* convert addrinfo into hostent form */ if (!haveanswer) { int nn; @@ -1471,7 +969,7 @@ gethostans(struct irs_ho *this, continue; if (hap < &pvt->h_addr_ptrs[MAXADDRS-1]) hap++; - + *hap = NULL; bp += m; } @@ -1498,7 +996,11 @@ gethostans(struct irs_ho *this, n = strlen(qname) + 1; /* for the \0 */ if (n > (ep - bp) || n >= MAXHOSTNAMELEN) goto no_recovery; +#ifdef HAVE_STRLCPY + strlcpy(bp, qname, ep - bp); +#else strcpy(bp, qname); +#endif pvt->host.h_name = bp; bp += n; } diff --git a/lib/bind/irs/dns_nw.c b/lib/bind/irs/dns_nw.c index cb80d443c4..0d23473686 100644 --- a/lib/bind/irs/dns_nw.c +++ b/lib/bind/irs/dns_nw.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: dns_nw.c,v 1.6 2002/06/28 06:06:24 marka Exp $"; +static const char rcsid[] = "$Id: dns_nw.c,v 1.7 2003/06/03 04:39:30 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports. */ @@ -349,7 +349,12 @@ get1101answer(struct irs_nw *this, RES_SET_H_ERRNO(pvt->res, NO_RECOVERY); return (NULL); } +#ifdef HAVE_STRLCPY + strlcpy(bp, name, ep - bp); + pvt->net.n_name = bp; +#else pvt->net.n_name = strcpy(bp, name); +#endif bp += n; } break; @@ -522,37 +527,37 @@ get1101mask(struct irs_nw *this, struct nwent *nwent) { static int make1101inaddr(const u_char *net, int bits, char *name, int size) { int n, m; + char *ep; + + ep = name + size; /* Zero fill any whole bytes left out of the prefix. */ for (n = (32 - bits) / 8; n > 0; n--) { - if (size < (int)(sizeof "0.")) + if (ep - name < (int)(sizeof "0.")) goto emsgsize; m = SPRINTF((name, "0.")); name += m; - size -= m; } /* Format the partial byte, if any, within the prefix. */ if ((n = bits % 8) != 0) { - if (size < (int)(sizeof "255.")) + if (ep - name < (int)(sizeof "255.")) goto emsgsize; m = SPRINTF((name, "%u.", net[bits / 8] & ~((1 << (8 - n)) - 1))); name += m; - size -= m; } /* Format the whole bytes within the prefix. */ for (n = bits / 8; n > 0; n--) { - if (size < (int)(sizeof "255.")) + if (ep - name < (int)(sizeof "255.")) goto emsgsize; m = SPRINTF((name, "%u.", net[n - 1])); name += m; - size -= m; } /* Add the static text. */ - if (size < (int)(sizeof "in-addr.arpa")) + if (ep - name < (int)(sizeof "in-addr.arpa")) goto emsgsize; (void) SPRINTF((name, "in-addr.arpa")); return (0); diff --git a/lib/bind/irs/gen_gr.c b/lib/bind/irs/gen_gr.c index cb1c926c86..40891eb1a8 100644 --- a/lib/bind/irs/gen_gr.c +++ b/lib/bind/irs/gen_gr.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: gen_gr.c,v 1.4 2001/06/07 02:14:52 marka Exp $"; +static const char rcsid[] = "$Id: gen_gr.c,v 1.5 2003/06/03 04:39:30 marka Exp $"; #endif /* Imports */ @@ -324,7 +324,7 @@ gr_res_set(struct irs_gr *this, struct __res_state *res, static void grmerge(struct irs_gr *this, const struct group *src, int preserve) { struct pvt *pvt = (struct pvt *)this->private; - char *cp, **m, **p, *oldmembuf; + char *cp, **m, **p, *oldmembuf, *ep; int n, ndst, nnew; size_t used; @@ -379,6 +379,7 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) { /* No harm done, no work done. */ return; } + ep = cp + used + n; if (used != 0) memcpy(cp, pvt->membuf, used); oldmembuf = pvt->membuf; @@ -400,7 +401,11 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) { if (isnew(pvt->group.gr_mem, *m)) { *p++ = cp; *p = NULL; +#ifdef HAVE_STRLCPY + strlcpy(cp, *m, ep - cp); +#else strcpy(cp, *m); +#endif cp += strlen(cp) + 1; } if (preserve) { @@ -410,10 +415,18 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) { (pvt->group.gr_passwd - oldmembuf); } else { pvt->group.gr_name = cp; +#ifdef HAVE_STRLCPY + strlcpy(cp, src->gr_name, ep - cp); +#else strcpy(cp, src->gr_name); +#endif cp += strlen(src->gr_name) + 1; pvt->group.gr_passwd = cp; +#ifdef HAVE_STRLCPY + strlcpy(cp, src->gr_passwd, ep - cp); +#else strcpy(cp, src->gr_passwd); +#endif cp += strlen(src->gr_passwd) + 1; } if (oldmembuf != NULL) diff --git a/lib/bind/irs/getaddrinfo.c b/lib/bind/irs/getaddrinfo.c index 243f10656c..89db519fcf 100644 --- a/lib/bind/irs/getaddrinfo.c +++ b/lib/bind/irs/getaddrinfo.c @@ -101,17 +101,12 @@ #include #include +#include #include "port_after.h" #include "irs_data.h" -/* - * if we enable it, we will see duplicated addrinfo entries on reply if both - * AAAA and A6 records are found. disable it for default installation. - */ -#undef T_A6 - #define SUCCESS 0 #define ANY 0 #define YES 1 @@ -192,7 +187,8 @@ static int get_portmatch __P((const struct addrinfo *, const char *)); static int get_port __P((const struct addrinfo *, const char *, int)); static const struct afd *find_afd __P((int)); static int addrconfig __P((int)); -static int ip6_str2scopeid __P((char *, struct sockaddr_in6 *)); +static int ip6_str2scopeid __P((char *, struct sockaddr_in6 *, + u_int32_t *scopeidp)); static struct net_data *init __P((void)); struct addrinfo *hostent2addrinfo __P((struct hostent *, @@ -297,8 +293,9 @@ str_isnumber(p) if (*p == '\0') return NO; ep = NULL; + errno = 0; (void)strtoul(p, &ep, 10); - if (ep && *ep == '\0') + if (errno == 0 && ep && *ep == '\0') return YES; else return NO; @@ -595,7 +592,7 @@ explore_fqdn(pai, hostname, servname, res) char tmp[NS_MAXDNAME]; const char *cp; - result = NULL; + INSIST(res != NULL && *res == NULL); /* * if the servname does not match socktype/protocol, ignore it. @@ -854,13 +851,13 @@ explore_numeric_scope(pai, hostname, servname, res) error = explore_numeric(pai, addr, servname, res); if (error == 0) { - int scopeid; + u_int32_t scopeid = 0; for (cur = *res; cur; cur = cur->ai_next) { if (cur->ai_family != AF_INET6) continue; sin6 = (struct sockaddr_in6 *)(void *)cur->ai_addr; - if ((scopeid = ip6_str2scopeid(scope, sin6)) == -1) { + if (!ip6_str2scopeid(scope, sin6, &scopeid)) { free(hostname2); return(EAI_NONAME); /* XXX: is return OK? */ } @@ -990,7 +987,17 @@ get_port(const struct addrinfo *ai, const char *servname, int matchonly) { allownumeric = 1; break; case ANY: - allownumeric = 0; + switch (ai->ai_family) { + case AF_INET: +#ifdef AF_INET6 + case AF_INET6: +#endif + allownumeric = 1; + break; + default: + allownumeric = 0; + break; + } break; default: return EAI_SOCKTYPE; @@ -999,9 +1006,10 @@ get_port(const struct addrinfo *ai, const char *servname, int matchonly) { if (str_isnumber(servname)) { if (!allownumeric) return EAI_SERVICE; - port = htons(atoi(servname)); + port = atoi(servname); if (port < 0 || port > 65535) return EAI_SERVICE; + port = htons(port); } else { switch (ai->ai_socktype) { case SOCK_DGRAM: @@ -1075,17 +1083,17 @@ addrconfig(af) /* convert a string to a scope identifier. XXX: IPv6 specific */ static int -ip6_str2scopeid(scope, sin6) - char *scope; - struct sockaddr_in6 *sin6; +ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6, + u_int32_t *scopeidp) { - int scopeid; + u_int32_t scopeid; + u_long lscopeid; struct in6_addr *a6 = &sin6->sin6_addr; char *ep; - + /* empty scopeid portion is invalid */ if (*scope == '\0') - return -1; + return (0); #ifdef USE_IFNAMELINKID if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { @@ -1096,8 +1104,8 @@ ip6_str2scopeid(scope, sin6) */ scopeid = if_nametoindex(scope); if (scopeid == 0) - goto trynumeric; - return(scopeid); + *scopeidp = scopeid; + return (1); } #endif @@ -1111,11 +1119,14 @@ ip6_str2scopeid(scope, sin6) /* try to convert to a numeric id as a last resort */ trynumeric: - scopeid = (int)strtoul(scope, &ep, 10); - if (*ep == '\0') - return scopeid; - else - return -1; + errno = 0; + lscopeid = strtoul(scope, &ep, 10); + scopeid = lscopeid & 0xffffffff; + if (errno == 0 && ep && *ep == '\0' && scopeid == lscopeid) { + *scopeidp = scopeid; + return (1); + } else + return (0); } struct addrinfo * diff --git a/lib/bind/irs/gethostent.c b/lib/bind/irs/gethostent.c index 3a137ea487..014d6af44c 100644 --- a/lib/bind/irs/gethostent.c +++ b/lib/bind/irs/gethostent.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: gethostent.c,v 1.3 2002/05/27 07:54:35 marka Exp $"; +static const char rcsid[] = "$Id: gethostent.c,v 1.4 2003/06/03 04:39:30 marka Exp $"; #endif /* Imports */ @@ -482,7 +482,7 @@ freehostent(struct hostent *he) { #define LIFREQ lifreq #endif -static int +static void scan_interfaces6(int *have_v4, int *have_v6) { struct LIFCONF lifc; struct LIFREQ lifreq; @@ -492,12 +492,9 @@ scan_interfaces6(int *have_v4, int *have_v6) { static unsigned int bufsiz = 4095; int s, cpsize, n; - /* Set to zero. Used as loop terminators below. */ - *have_v4 = *have_v6 = 0; - /* Get interface list from system. */ if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) - goto err_ret; + goto cleanup; /* * Grow buffer until large enough to contain all interface @@ -506,7 +503,7 @@ scan_interfaces6(int *have_v4, int *have_v6) { for (;;) { buf = memget(bufsiz); if (buf == NULL) - goto err_ret; + goto cleanup; #ifdef SETFAMILYFLAGS lifc.lifc_family = AF_UNSPEC; /* request all families */ lifc.lifc_flags = 0; @@ -526,10 +523,10 @@ scan_interfaces6(int *have_v4, int *have_v6) { break; } if ((n == -1) && errno != EINVAL) - goto err_ret; + goto cleanup; if (bufsiz > 1000000) - goto err_ret; + goto cleanup; memput(buf, bufsiz); bufsiz += 4096; @@ -600,16 +597,42 @@ scan_interfaces6(int *have_v4, int *have_v6) { memput(buf, bufsiz); close(s); /* printf("scan interface -> 4=%d 6=%d\n", *have_v4, *have_v6); */ - return (0); - err_ret: + return; + cleanup: if (buf != NULL) memput(buf, bufsiz); if (s != -1) close(s); /* printf("scan interface -> 4=%d 6=%d\n", *have_v4, *have_v6); */ - return (-1); + return; } +#endif +#ifdef __linux +#ifndef IF_NAMESIZE +# ifdef IFNAMSIZ +# define IF_NAMESIZE IFNAMSIZ +# else +# define IF_NAMESIZE 16 +# endif +#endif +static void +scan_linux6(int *have_v6) { + FILE *proc = NULL; + char address[33]; + char name[IF_NAMESIZE+1]; + int ifindex, prefix, flag3, flag4; + + proc = fopen("/proc/net/if_inet6", "r"); + if (proc == NULL) + return; + + if (fscanf(proc, "%32[a-f0-9] %x %x %x %x %16s\n", + address, &ifindex, &prefix, &flag3, &flag4, name) == 6) + *have_v6 = 1; + fclose(proc); + return; +} #endif static int @@ -626,17 +649,21 @@ scan_interfaces(int *have_v4, int *have_v6) { int s, n; size_t cpsize; + /* Set to zero. Used as loop terminators below. */ + *have_v4 = *have_v6 = 0; + #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR) && \ !defined(IRIX_EMUL_IOCTL_SIOCGIFCONF) /* * Try to scan the interfaces using IPv6 ioctls(). */ - if (!scan_interfaces6(have_v4, have_v6)) + scan_interfaces6(have_v4, have_v6); + if (*have_v4 != 0 && *have_v6 != 0) return (0); #endif - - /* Set to zero. Used as loop terminators below. */ - *have_v4 = *have_v6 = 0; +#ifdef __linux + scan_linux6(have_v6); +#endif /* Get interface list from system. */ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) diff --git a/lib/bind/irs/getnameinfo.c b/lib/bind/irs/getnameinfo.c index 9b26c641ff..702b932bf3 100644 --- a/lib/bind/irs/getnameinfo.c +++ b/lib/bind/irs/getnameinfo.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/lib/bind/irs/getnetgrent.c b/lib/bind/irs/getnetgrent.c index 07f39a7508..201873464f 100644 --- a/lib/bind/irs/getnetgrent.c +++ b/lib/bind/irs/getnetgrent.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: getnetgrent.c,v 1.1 2001/03/29 06:31:46 marka Exp $"; +static const char rcsid[] = "$Id: getnetgrent.c,v 1.2 2003/06/03 04:39:31 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports */ @@ -47,8 +47,11 @@ static struct net_data *init(void); /* Public */ +#ifndef SETNETGRENT_ARGS +#define SETNETGRENT_ARGS const char *netgroup +#endif void -setnetgrent(const char *netgroup) { +setnetgrent(SETNETGRENT_ARGS) { struct net_data *net_data = init(); setnetgrent_p(netgroup, net_data); @@ -61,19 +64,31 @@ endnetgrent(void) { endnetgrent_p(net_data); } +#ifndef INNETGR_ARGS +#define INNETGR_ARGS const char *netgroup, const char *host, \ + const char *user, const char *domain +#endif int -innetgr(const char *netgroup, const char *host, - const char *user, const char *domain) { +innetgr(INNETGR_ARGS) { struct net_data *net_data = init(); return (innetgr_p(netgroup, host, user, domain, net_data)); } int -getnetgrent(const char **host, const char **user, const char **domain) { +getnetgrent(char **host, char **user, char **domain) { struct net_data *net_data = init(); + const char *ch, *cu, *cd; + int ret; - return (getnetgrent_p(host, user, domain, net_data)); + ret = getnetgrent_p(&ch, &cu, &cd, net_data); + if (ret != 1) + return (ret); + + DE_CONST(ch, *host); + DE_CONST(cu, *user); + DE_CONST(cd, *domain); + return (ret); } /* Shared private. */ diff --git a/lib/bind/irs/getnetgrent_r.c b/lib/bind/irs/getnetgrent_r.c index d3130e7589..ef1de36023 100644 --- a/lib/bind/irs/getnetgrent_r.c +++ b/lib/bind/irs/getnetgrent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.5 2001/07/04 04:51:05 marka Exp $"; +static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.6 2003/06/03 04:39:31 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -40,9 +40,15 @@ copy_protoent(char **, char **, char **, const char *, const char *, NGR_R_RETURN innetgr_r(const char *netgroup, const char *host, const char *user, - const char *domain) { + const char *domain) { + char *ng, *ho, *us, *dom; - return (innetgr(netgroup, host, user, domain)); + DE_CONST(netgroup, ng); + DE_CONST(host, ho); + DE_CONST(user, us); + DE_CONST(domain, dom); + + return (innetgr(ng, ho, us, dom)); } /* @@ -53,7 +59,7 @@ innetgr_r(const char *netgroup, const char *host, const char *user, NGR_R_RETURN getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS) { - const char *mp, *up, *dp; + char *mp, *up, *dp; int res = getnetgrent(&mp, &up, &dp); if (res != 1) diff --git a/lib/bind/irs/hesiod.c b/lib/bind/irs/hesiod.c index 242e875f13..71856e7bf2 100644 --- a/lib/bind/irs/hesiod.c +++ b/lib/bind/irs/hesiod.c @@ -1,5 +1,5 @@ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: hesiod.c,v 1.1 2001/03/29 06:31:48 marka Exp $"; +static const char rcsid[] = "$Id: hesiod.c,v 1.2 2003/06/03 04:39:31 marka Exp $"; #endif /* @@ -98,8 +98,13 @@ hesiod_init(void **context) { errno = ENOMEM; goto cleanup; } +#ifdef HAVE_STRLCPY + strlcpy(ctx->LHS, DEF_LHS, strlen(DEF_LHS) + 1); + strlcpy(ctx->RHS, DEF_RHS, strlen(DEF_RHS) + 1); +#else strcpy(ctx->LHS, DEF_LHS); strcpy(ctx->RHS, DEF_RHS); +#endif #else goto cleanup; #endif @@ -109,18 +114,31 @@ hesiod_init(void **context) { * variable. */ if ((cp = getenv("HES_DOMAIN")) != NULL) { + size_t RHSlen = strlen(cp) + 2; if (ctx->RHS) free(ctx->RHS); - ctx->RHS = malloc(strlen(cp)+2); + ctx->RHS = malloc(RHSlen); if (!ctx->RHS) { errno = ENOMEM; goto cleanup; } - if (cp[0] == '.') + if (cp[0] == '.') { +#ifdef HAVE_STRLCPY + strlcpy(ctx->RHS, cp, RHSlen); +#else strcpy(ctx->RHS, cp); - else { +#endif + } else { +#ifdef HAVE_STRLCPY + strlcpy(ctx->RHS, ".", RHSlen); +#else strcpy(ctx->RHS, "."); +#endif +#ifdef HAVE_STRLCAT + strlcat(ctx->RHS, cp, RHSlen); +#else strcat(ctx->RHS, cp); +#endif } } diff --git a/lib/bind/irs/irp_p.h b/lib/bind/irs/irp_p.h index 444cb0931a..862ac15114 100644 --- a/lib/bind/irs/irp_p.h +++ b/lib/bind/irs/irp_p.h @@ -16,7 +16,7 @@ */ /* - * $Id: irp_p.h,v 1.2 2001/11/01 04:21:15 marka Exp $ + * $Id: irp_p.h,v 1.3 2003/06/03 04:39:31 marka Exp $ */ #ifndef _IRP_P_H_INCLUDED @@ -53,8 +53,6 @@ char *irs_irp_read_body(struct irp_p *pvt, size_t *size); int irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text, size_t textlen, char **body, size_t *bodylen); -int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3); - extern int irp_log_errors; diff --git a/lib/bind/irs/irs_data.c b/lib/bind/irs/irs_data.c index 46aa548da3..a68569cadd 100644 --- a/lib/bind/irs/irs_data.c +++ b/lib/bind/irs/irs_data.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: irs_data.c,v 1.4 2001/11/01 04:03:40 marka Exp $"; +static const char rcsid[] = "$Id: irs_data.c,v 1.5 2003/06/03 04:39:31 marka Exp $"; #endif #include "port_before.h" @@ -38,6 +38,7 @@ static const char rcsid[] = "$Id: irs_data.c,v 1.4 2001/11/01 04:03:40 marka Exp #endif #include +#include #include "port_after.h" @@ -97,6 +98,14 @@ net_data_destroy(void *p) { (*net_data->ng->close)(net_data->ng); net_data->ng = NULL; } + if (net_data->ho_data != NULL) { + free(net_data->ho_data); + net_data->ho_data = NULL; + } + if (net_data->nw_data != NULL) { + free(net_data->nw_data); + net_data->nw_data = NULL; + } (*net_data->irs->close)(net_data->irs); memput(net_data, sizeof *net_data); @@ -143,19 +152,27 @@ net_data_create(const char *conf_file) { return (NULL); memset(net_data, 0, sizeof (struct net_data)); - if ((net_data->irs = irs_gen_acc("", conf_file)) == NULL) + if ((net_data->irs = irs_gen_acc("", conf_file)) == NULL) { + memput(net_data, sizeof (struct net_data)); return (NULL); + } #ifndef DO_PTHREADS (*net_data->irs->res_set)(net_data->irs, &_res, NULL); #endif net_data->res = (*net_data->irs->res_get)(net_data->irs); - if (net_data->res == NULL) + if (net_data->res == NULL) { + (*net_data->irs->close)(net_data->irs); + memput(net_data, sizeof (struct net_data)); return (NULL); + } if ((net_data->res->options & RES_INIT) == 0 && - res_ninit(net_data->res) == -1) + res_ninit(net_data->res) == -1) { + (*net_data->irs->close)(net_data->irs); + memput(net_data, sizeof (struct net_data)); return (NULL); + } return (net_data); } diff --git a/lib/bind/irs/nis_gr.c b/lib/bind/irs/nis_gr.c index a617fd3ee0..3ecc41b35a 100644 --- a/lib/bind/irs/nis_gr.c +++ b/lib/bind/irs/nis_gr.c @@ -49,7 +49,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: nis_gr.c,v 1.1 2001/03/29 06:31:51 marka Exp $"; +static const char rcsid[] = "$Id: nis_gr.c,v 1.2 2003/06/03 04:39:31 marka Exp $"; /* from getgrent.c 8.2 (Berkeley) 3/21/94"; */ /* from BSDI Id: getgrent.c,v 2.8 1996/05/28 18:15:14 bostic Exp $ */ #endif /* LIBC_SCCS and not lint */ @@ -286,7 +286,7 @@ makegroupent(struct irs_gr *this) { goto cleanup; *cp++ = '\0'; - errno = -1; + errno = 0; t = strtoul(cp, NULL, 10); if (errno == ERANGE) goto cleanup; diff --git a/lib/bind/irs/nis_ho.c b/lib/bind/irs/nis_ho.c index 5d7c44c6ad..1a21b370c3 100644 --- a/lib/bind/irs/nis_ho.c +++ b/lib/bind/irs/nis_ho.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: nis_ho.c,v 1.2 2001/04/04 05:32:23 marka Exp $"; +static const char rcsid[] = "$Id: nis_ho.c,v 1.3 2003/06/03 04:39:31 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports */ @@ -87,6 +87,9 @@ static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff }; static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 }; static /*const*/ char hosts_byname[] = "hosts.byname"; static /*const*/ char hosts_byaddr[] = "hosts.byaddr"; +static /*const*/ char ipnode_byname[] = "ipnode.byname"; +static /*const*/ char ipnode_byaddr[] = "ipnode.byaddr"; +static /*const*/ char yp_multi[] = "YP_MULTI_"; /* Forwards */ @@ -186,9 +189,32 @@ ho_byname2(struct irs_ho *this, const char *name, int af) { return (NULL); nisfree(pvt, do_val); - DE_CONST(name, tmp); - r = yp_match(pvt->nis_domain, hosts_byname, tmp, + + strcpy(pvt->hostbuf, yp_multi); + strncat(pvt->hostbuf, name, sizeof(pvt->hostbuf) - sizeof(yp_multi)); + pvt->hostbuf[sizeof(pvt->hostbuf) - 1] = '\0'; + for (r = sizeof(yp_multi) - 1; pvt->hostbuf[r] != '\0'; r++) + if (isupper((unsigned char)pvt->hostbuf[r])) + tolower(pvt->hostbuf[r]); + + tmp = pvt->hostbuf; + r = yp_match(pvt->nis_domain, ipnode_byname, tmp, strlen(tmp), &pvt->curval_data, &pvt->curval_len); + if (r != 0) { + tmp = pvt->hostbuf + sizeof(yp_multi) - 1; + r = yp_match(pvt->nis_domain, ipnode_byname, tmp, + strlen(tmp), &pvt->curval_data, &pvt->curval_len); + } + if (r != 0) { + tmp = pvt->hostbuf; + r = yp_match(pvt->nis_domain, hosts_byname, tmp, + strlen(tmp), &pvt->curval_data, &pvt->curval_len); + } + if (r != 0) { + tmp = pvt->hostbuf + sizeof(yp_multi) - 1; + r = yp_match(pvt->nis_domain, hosts_byname, tmp, + strlen(tmp), &pvt->curval_data, &pvt->curval_len); + } if (r != 0) { RES_SET_H_ERRNO(pvt->res, HOST_NOT_FOUND); return (NULL); @@ -220,8 +246,11 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) { return (NULL); } nisfree(pvt, do_val); - r = yp_match(pvt->nis_domain, hosts_byaddr, tmp, strlen(tmp), + r = yp_match(pvt->nis_domain, ipnode_byaddr, tmp, strlen(tmp), &pvt->curval_data, &pvt->curval_len); + if (r != 0) + r = yp_match(pvt->nis_domain, hosts_byaddr, tmp, strlen(tmp), + &pvt->curval_data, &pvt->curval_len); if (r != 0) { RES_SET_H_ERRNO(pvt->res, HOST_NOT_FOUND); return (NULL); @@ -382,12 +411,35 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) /* Private */ +/* +ipnodes: +::1 localhost +127.0.0.1 localhost +1.2.3.4 FOO bar +1.2.6.4 FOO bar +1.2.6.5 host + +ipnodes.byname: +YP_MULTI_localhost ::1,127.0.0.1 localhost +YP_MULTI_foo 1.2.3.4,1.2.6.4 FOO bar +YP_MULTI_bar 1.2.3.4,1.2.6.4 FOO bar +host 1.2.6.5 host + +hosts.byname: +localhost 127.0.0.1 localhost +host 1.2.6.5 host +YP_MULTI_foo 1.2.3.4,1.2.6.4 FOO bar +YP_MULTI_bar 1.2.3.4,1.2.6.4 FOO bar +*/ + static struct hostent * makehostent(struct irs_ho *this) { struct pvt *pvt = (struct pvt *)this->private; static const char spaces[] = " \t"; - char *cp, **q, *p; - int af, len; + char *cp, **q, *p, *comma, *ap; + int af = 0, len = 0; + int multi = 0; + int addr = 0; p = pvt->curval_data; if ((cp = strpbrk(p, "#\n")) != NULL) @@ -395,25 +447,40 @@ makehostent(struct irs_ho *this) { if (!(cp = strpbrk(p, spaces))) return (NULL); *cp++ = '\0'; - if ((pvt->res->options & RES_USE_INET6) && - inet_pton(AF_INET6, p, pvt->host_addr) > 0) { - af = AF_INET6; - len = IN6ADDRSZ; - } else if (inet_pton(AF_INET, p, pvt->host_addr) > 0) { - if (pvt->res->options & RES_USE_INET6) { - map_v4v6_address((char*)pvt->host_addr, - (char*)pvt->host_addr); + ap = pvt->hostbuf; + do { + if ((comma = strchr(p, ',')) != NULL) { + *comma++ = '\0'; + multi = 1; + } + if ((ap + IN6ADDRSZ) > (pvt->hostbuf + sizeof(pvt->hostbuf))) + break; + if ((pvt->res->options & RES_USE_INET6) && + inet_pton(AF_INET6, p, ap) > 0) { af = AF_INET6; len = IN6ADDRSZ; + } else if (inet_pton(AF_INET, p, pvt->host_addr) > 0) { + if (pvt->res->options & RES_USE_INET6) { + map_v4v6_address((char*)pvt->host_addr, ap); + af = AF_INET6; + len = IN6ADDRSZ; + } else { + af = AF_INET; + len = INADDRSZ; + } } else { - af = AF_INET; - len = INADDRSZ; + if (!multi) + return (NULL); + continue; } - } else { + if (addr < MAXADDRS) { + pvt->h_addr_ptrs[addr++] = ap; + pvt->h_addr_ptrs[addr] = NULL; + ap += len; + } + } while ((p = comma) != NULL); + if (ap == pvt->hostbuf) return (NULL); - } - pvt->h_addr_ptrs[0] = (char *)pvt->host_addr; - pvt->h_addr_ptrs[1] = NULL; pvt->host.h_addr_list = pvt->h_addr_ptrs; pvt->host.h_length = len; pvt->host.h_addrtype = af; diff --git a/lib/bind/isc/ctl_clnt.c b/lib/bind/isc/ctl_clnt.c index cfe0d7e0ee..704fb5c18a 100644 --- a/lib/bind/isc/ctl_clnt.c +++ b/lib/bind/isc/ctl_clnt.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4 2001/06/06 01:56:32 marka Exp $"; +static const char rcsid[] = "$Id: ctl_clnt.c,v 1.5 2003/06/03 04:39:32 marka Exp $"; #endif /* not lint */ /* @@ -185,7 +185,7 @@ ctl_client(evContext lev, const struct sockaddr *cap, size_t cap_len, if (evConnect(lev, ctx->sock, (const struct sockaddr *)sap, sap_len, conn_done, ctx, &ctx->coID) < 0) { (*ctx->logger)(ctl_error, "%s: evConnect(fd %d): %s", - me, (void *)ctx->sock, strerror(errno)); + me, ctx->sock, strerror(errno)); fatal: if (ctx != NULL) { if (ctx->sock >= 0) diff --git a/lib/bind/isc/ctl_srvr.c b/lib/bind/isc/ctl_srvr.c index 1d2f449e47..835c0c55c5 100644 --- a/lib/bind/isc/ctl_srvr.c +++ b/lib/bind/isc/ctl_srvr.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3 2001/04/03 06:42:30 marka Exp $"; +static const char rcsid[] = "$Id: ctl_srvr.c,v 1.4 2003/06/03 04:39:32 marka Exp $"; #endif /* not lint */ /* @@ -252,7 +252,7 @@ ctl_server(evContext lev, const struct sockaddr *sap, size_t sap_len, &ctx->acID) < 0) { save_errno = errno; (*ctx->logger)(ctl_error, "%s: evListen(fd %d): %s", - me, (void *)ctx->sock, strerror(errno)); + me, ctx->sock, strerror(errno)); close(ctx->sock); memput(ctx, sizeof *ctx); errno = save_errno; diff --git a/lib/bind/isc/ev_files.c b/lib/bind/isc/ev_files.c index 5280264970..7890ed330b 100644 --- a/lib/bind/isc/ev_files.c +++ b/lib/bind/isc/ev_files.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_files.c,v 1.3 2001/07/02 02:02:27 marka Exp $"; +static const char rcsid[] = "$Id: ev_files.c,v 1.4 2003/06/03 04:39:32 marka Exp $"; #endif #include "port_before.h" @@ -54,7 +54,7 @@ evSelectFD(evContext opaqueCtx, int mode; evPrintf(ctx, 1, - "evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n", + "evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n", ctx, fd, eventmask, func, uap); if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0) EV_ERR(EINVAL); diff --git a/lib/bind/isc/ev_timers.c b/lib/bind/isc/ev_timers.c index 0a59ad1e5b..000cfb7584 100644 --- a/lib/bind/isc/ev_timers.c +++ b/lib/bind/isc/ev_timers.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_timers.c,v 1.2 2001/06/27 03:55:46 marka Exp $"; +static const char rcsid[] = "$Id: ev_timers.c,v 1.3 2003/06/03 04:39:32 marka Exp $"; #endif /* Import. */ @@ -152,10 +152,10 @@ evSetTimer(evContext opaqueCtx, evTimer *id; evPrintf(ctx, 1, -"evSetTimer(ctx %#x, func %#x, uap %#x, due %d.%09ld, inter %d.%09ld)\n", +"evSetTimer(ctx %p, func %p, uap %p, due %ld.%09ld, inter %ld.%09ld)\n", ctx, func, uap, - due.tv_sec, due.tv_nsec, - inter.tv_sec, inter.tv_nsec); + (long)due.tv_sec, due.tv_nsec, + (long)inter.tv_sec, inter.tv_nsec); /* due={0,0} is a magic cookie meaning "now." */ if (due.tv_sec == 0 && due.tv_nsec == 0L) @@ -379,10 +379,10 @@ print_timer(void *what, void *uap) { cur = what; evPrintf(ctx, 7, - " func %p, uap %p, due %d.%09ld, inter %d.%09ld\n", + " func %p, uap %p, due %ld.%09ld, inter %ld.%09ld\n", cur->func, cur->uap, - cur->due.tv_sec, cur->due.tv_nsec, - cur->inter.tv_sec, cur->inter.tv_nsec); + (long)cur->due.tv_sec, cur->due.tv_nsec, + (long)cur->inter.tv_sec, cur->inter.tv_nsec); } static void diff --git a/lib/bind/isc/ev_waits.c b/lib/bind/isc/ev_waits.c index d6b15fa6c8..c77461edf8 100644 --- a/lib/bind/isc/ev_waits.c +++ b/lib/bind/isc/ev_waits.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_waits.c,v 1.1 2001/03/29 06:31:54 marka Exp $"; +static const char rcsid[] = "$Id: ev_waits.c,v 1.2 2003/06/03 04:39:32 marka Exp $"; #endif #include "port_before.h" @@ -190,14 +190,14 @@ print_waits(evContext_p *ctx) { evPrintf(ctx, 9, "wait waiting:\n"); for (wl = ctx->waitLists; wl != NULL; wl = wl->next) { INSIST(wl->first != NULL); - evPrintf(ctx, 9, " tag %#x:", wl->first->tag); + evPrintf(ctx, 9, " tag %p:", wl->first->tag); for (this = wl->first; this != NULL; this = this->next) - evPrintf(ctx, 9, " %#x", this); + evPrintf(ctx, 9, " %p", this); evPrintf(ctx, 9, "\n"); } evPrintf(ctx, 9, "wait done:"); for (this = ctx->waitDone.first; this != NULL; this = this->next) - evPrintf(ctx, 9, " %#x", this); + evPrintf(ctx, 9, " %p", this); evPrintf(ctx, 9, "\n"); } diff --git a/lib/bind/isc/eventlib.c b/lib/bind/isc/eventlib.c index 96337e387f..8ba6038869 100644 --- a/lib/bind/isc/eventlib.c +++ b/lib/bind/isc/eventlib.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: eventlib.c,v 1.2 2001/06/27 03:55:47 marka Exp $"; +static const char rcsid[] = "$Id: eventlib.c,v 1.3 2003/06/03 04:39:32 marka Exp $"; #endif #include "port_before.h" @@ -291,12 +291,12 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) { } evPrintf(ctx, 4, - "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n", + "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %ld.%09ld)\n", ctx->fdMax+1, (u_long)ctx->rdLast.fds_bits[0], (u_long)ctx->wrLast.fds_bits[0], (u_long)ctx->exLast.fds_bits[0], - tp ? tp->tv_sec : -1, + tp ? (long)tp->tv_sec : -1L, tp ? tp->tv_nsec : -1); /* XXX should predict system's earliness and adjust. */ @@ -463,7 +463,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) { evAccept *this = ev->u.accept.this; evPrintf(ctx, 5, - "Dispatch.Accept: fd %d -> %d, func %#x, uap %#x\n", + "Dispatch.Accept: fd %d -> %d, func %p, uap %p\n", this->conn->fd, this->fd, this->conn->func, this->conn->uap); errno = this->ioErrno; @@ -480,7 +480,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) { int eventmask = ev->u.file.eventmask; evPrintf(ctx, 5, - "Dispatch.File: fd %d, mask 0x%x, func %#x, uap %#x\n", + "Dispatch.File: fd %d, mask 0x%x, func %p, uap %p\n", this->fd, this->eventmask, this->func, this->uap); (this->func)(opaqueCtx, this->uap, this->fd, eventmask); #ifdef EVENTLIB_TIME_CHECKS @@ -492,7 +492,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) { evStream *this = ev->u.stream.this; evPrintf(ctx, 5, - "Dispatch.Stream: fd %d, func %#x, uap %#x\n", + "Dispatch.Stream: fd %d, func %p, uap %p\n", this->fd, this->func, this->uap); errno = this->ioErrno; (this->func)(opaqueCtx, this->uap, this->fd, this->ioDone); @@ -504,7 +504,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) { case Timer: { evTimer *this = ev->u.timer.this; - evPrintf(ctx, 5, "Dispatch.Timer: func %#x, uap %#x\n", + evPrintf(ctx, 5, "Dispatch.Timer: func %p, uap %p\n", this->func, this->uap); (this->func)(opaqueCtx, this->uap, this->due, this->inter); #ifdef EVENTLIB_TIME_CHECKS @@ -516,7 +516,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) { evWait *this = ev->u.wait.this; evPrintf(ctx, 5, - "Dispatch.Wait: tag %#x, func %#x, uap %#x\n", + "Dispatch.Wait: tag %p, func %p, uap %p\n", this->tag, this->func, this->uap); (this->func)(opaqueCtx, this->uap, this->tag); #ifdef EVENTLIB_TIME_CHECKS diff --git a/lib/bind/isc/eventlib_p.h b/lib/bind/isc/eventlib_p.h index ea4b21c3b4..0590fb032c 100644 --- a/lib/bind/isc/eventlib_p.h +++ b/lib/bind/isc/eventlib_p.h @@ -18,7 +18,7 @@ /* eventlib_p.h - private interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib_p.h,v 1.3 2001/07/03 06:49:54 marka Exp $ + * $Id: eventlib_p.h,v 1.4 2003/06/03 04:39:32 marka Exp $ */ #ifndef _EVENTLIB_P_H @@ -198,7 +198,8 @@ typedef struct { /* eventlib.c */ #define evPrintf __evPrintf -void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...); +void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...) + ISC_FORMAT_PRINTF(3, 4); /* ev_timers.c */ #define evCreateTimers __evCreateTimers diff --git a/lib/bind/isc/logging.c b/lib/bind/isc/logging.c index cf1911410e..3d86c70b22 100644 --- a/lib/bind/isc/logging.c +++ b/lib/bind/isc/logging.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: logging.c,v 1.3 2001/06/21 08:26:15 marka Exp $"; +static const char rcsid[] = "$Id: logging.c,v 1.4 2003/06/03 04:39:32 marka Exp $"; #endif /* not lint */ #include "port_before.h" @@ -282,6 +282,10 @@ log_vwrite(log_context lc, int category, int level, const char *format, log_channel chan; struct timeval tv; struct tm *local_tm; +#ifdef HAVE_TIME_R + struct tm tm_tmp; +#endif + time_t tt; const char *category_name; const char *level_str; char time_buf[256]; @@ -313,10 +317,11 @@ log_vwrite(log_context lc, int category, int level, const char *format, if (gettimeofday(&tv, NULL) < 0) { syslog(LOG_INFO, "gettimeofday failed in log_vwrite()"); } else { + tt = tv.tv_sec; #ifdef HAVE_TIME_R - localtime_r((time_t *)&tv.tv_sec, &local_tm); + local_tm = localtime_r(&tt, &tm_tmp); #else - local_tm = localtime((time_t *)&tv.tv_sec); + local_tm = localtime(&tt); #endif if (local_tm != NULL) { sprintf(time_buf, "%02d-%s-%4d %02d:%02d:%02d.%03ld ", diff --git a/lib/bind/nameser/ns_name.c b/lib/bind/nameser/ns_name.c index c6a67422f3..4d5c9fb291 100644 --- a/lib/bind/nameser/ns_name.c +++ b/lib/bind/nameser/ns_name.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_name.c,v 1.6 2002/12/03 05:39:10 marka Exp $"; +static const char rcsid[] = "$Id: ns_name.c,v 1.7 2003/06/03 04:39:33 marka Exp $"; #endif #include "port_before.h" @@ -792,7 +792,7 @@ decode_bitstring(const char **cpp, char *dn, const char *eom) { const char *cp = *cpp; char *beg = dn, tc; - int b, blen, plen; + int b, blen, plen, i; if ((blen = (*cp & 0xff)) == 0) blen = 256; @@ -802,18 +802,34 @@ decode_bitstring(const char **cpp, char *dn, const char *eom) return(-1); cp++; - dn += SPRINTF((dn, "\\[x")); - for (b = blen; b > 7; b -= 8, cp++) - dn += SPRINTF((dn, "%02x", *cp & 0xff)); + i = SPRINTF((dn, "\\[x")); + if (i < 0) + return (-1); + dn += i; + for (b = blen; b > 7; b -= 8, cp++) { + i = SPRINTF((dn, "%02x", *cp & 0xff)); + if (i < 0) + return (-1); + dn += i; + } if (b > 4) { tc = *cp++; - dn += SPRINTF((dn, "%02x", tc & (0xff << (8 - b)))); + i = SPRINTF((dn, "%02x", tc & (0xff << (8 - b)))); + if (i < 0) + return (-1); + dn += i; } else if (b > 0) { tc = *cp++; - dn += SPRINTF((dn, "%1x", + i = SPRINTF((dn, "%1x", ((tc >> 4) & 0x0f) & (0x0f << (4 - b)))); + if (i < 0) + return (-1); + dn += i; } - dn += SPRINTF((dn, "/%d]", blen)); + i = SPRINTF((dn, "/%d]", blen)); + if (i < 0) + return (-1); + dn += i; *cpp = cp; return(dn - beg); diff --git a/lib/bind/nameser/ns_parse.c b/lib/bind/nameser/ns_parse.c index 6b591d1453..1ea881aedf 100644 --- a/lib/bind/nameser/ns_parse.c +++ b/lib/bind/nameser/ns_parse.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_parse.c,v 1.3 2001/06/21 08:26:18 marka Exp $"; +static const char rcsid[] = "$Id: ns_parse.c,v 1.4 2003/06/03 04:39:33 marka Exp $"; #endif /* Import. */ @@ -132,9 +132,10 @@ ns_initparse(const u_char *msg, int msglen, ns_msg *handle) { int ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { int b; + int tmp; /* Make section right. */ - if (section >= ns_s_max) + if ((tmp = section) < 0 || section >= ns_s_max) RETERR(ENODEV); if (section != handle->_sect) setsection(handle, section); diff --git a/lib/bind/nameser/ns_print.c b/lib/bind/nameser/ns_print.c index 0eaf2b98e9..cdf8e311fc 100644 --- a/lib/bind/nameser/ns_print.c +++ b/lib/bind/nameser/ns_print.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_print.c,v 1.3 2001/06/21 08:26:19 marka Exp $"; +static const char rcsid[] = "$Id: ns_print.c,v 1.4 2003/06/03 04:39:33 marka Exp $"; #endif /* Import. */ @@ -31,6 +31,7 @@ static const char rcsid[] = "$Id: ns_print.c,v 1.3 2001/06/21 08:26:19 marka Exp #include #include +#include #include #include #include @@ -58,10 +59,6 @@ static int addstr(const char *src, size_t len, static int addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen); -/* Proto. */ - -u_int16_t dst_s_dns_key_id(const u_char *, const int); - /* Macros. */ #define T(x) \ @@ -640,9 +637,10 @@ ns_sprintrrf(const u_char *msg, size_t msglen, len = SPRINTF((tmp, "%u %u %u ", mode, err, keysize)); T(addstr(tmp, len, &buf, &buflen)); - /* needs to dump key, print otherdata length & other data */ + /* XXX need to dump key, print otherdata length & other data */ break; } + case ns_t_tsig: { /* BEW - need to complete this */ int n; @@ -690,13 +688,13 @@ ns_sprintrrf(const u_char *msg, size_t msglen, T(addname(msg, msglen, &rdata, origin, &buf, &buflen)); break; - } + } case ns_t_opt: { len = SPRINTF((tmp, "%u bytes", class)); T(addstr(tmp, len, &buf, &buflen)); break; - } + } default: comment = "unknown RR type"; diff --git a/lib/bind/nameser/ns_samedomain.c b/lib/bind/nameser/ns_samedomain.c index 24f5f2102c..9a71e19c45 100644 --- a/lib/bind/nameser/ns_samedomain.c +++ b/lib/bind/nameser/ns_samedomain.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_samedomain.c,v 1.2 2001/11/27 22:53:55 marka Exp $"; +static const char rcsid[] = "$Id: ns_samedomain.c,v 1.3 2003/06/03 04:39:33 marka Exp $"; #endif #include "port_before.h" @@ -166,14 +166,14 @@ int ns_makecanon(const char *src, char *dst, size_t dstsize) { size_t n = strlen(src); - if (n + sizeof "." > dstsize) { + if (n + sizeof "." > dstsize) { /* Note: sizeof == 2 */ errno = EMSGSIZE; return (-1); } strcpy(dst, src); - while (n > 0 && dst[n - 1] == '.') /* Ends in "." */ - if (n > 1 && dst[n - 2] == '\\' && /* Ends in "\." */ - (n < 2 || dst[n - 3] != '\\')) /* But not "\\." */ + while (n >= 1 && dst[n - 1] == '.') /* Ends in "." */ + if (n >= 2 && dst[n - 2] == '\\' && /* Ends in "\." */ + (n < 3 || dst[n - 3] != '\\')) /* But not "\\." */ break; else dst[--n] = '\0'; diff --git a/lib/bind/nameser/ns_sign.c b/lib/bind/nameser/ns_sign.c index 273d33cc91..2622eba258 100644 --- a/lib/bind/nameser/ns_sign.c +++ b/lib/bind/nameser/ns_sign.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_sign.c,v 1.2 2002/05/06 06:29:41 marka Exp $"; +static const char rcsid[] = "$Id: ns_sign.c,v 1.3 2003/06/03 04:39:33 marka Exp $"; #endif /* Import. */ @@ -41,6 +41,7 @@ static const char rcsid[] = "$Id: ns_sign.c,v 1.2 2002/05/06 06:29:41 marka Exp #include #include +#include #include "port_after.h" @@ -90,22 +91,30 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, DST_KEY *key = (DST_KEY *)k; u_char *cp = msg + *msglen, *eob = msg + msgsize; u_char *lenp; - u_char *name, *alg; + u_char *alg; int n; time_t timesigned; + u_char name[NS_MAXCDNAME]; dst_init(); if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL) return (-1); /* Name. */ - if (key != NULL && error != ns_r_badsig && error != ns_r_badkey) - n = dn_comp(key->dk_key_name, cp, eob - cp, dnptrs, lastdnptr); - else - n = dn_comp("", cp, eob - cp, NULL, NULL); + if (key != NULL && error != ns_r_badsig && error != ns_r_badkey) { + n = ns_name_pton(key->dk_key_name, name, sizeof name); + if (n != -1) + n = ns_name_pack(name, cp, eob - cp, + (const u_char **)dnptrs, + (const u_char **)lastdnptr); + + } else { + n = ns_name_pton("", name, sizeof name); + if (n != -1) + n = ns_name_pack(name, cp, eob - cp, NULL, NULL); + } if (n < 0) return (NS_TSIG_ERROR_NO_SPACE); - name = cp; cp += n; /* Type, class, ttl, length (not filled in yet). */ @@ -142,7 +151,7 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, /* Compute the signature. */ if (key != NULL && error != ns_r_badsig && error != ns_r_badkey) { void *ctx; - u_char buf[MAXDNAME], *cp2; + u_char buf[NS_MAXCDNAME], *cp2; int n; dst_sign_data(SIG_MODE_INIT, key, &ctx, NULL, 0, NULL, 0); @@ -162,6 +171,7 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, /* Digest the key name. */ n = ns_name_ntol(name, buf, sizeof(buf)); + INSIST(n > 0); dst_sign_data(SIG_MODE_UPDATE, key, &ctx, buf, n, NULL, 0); /* Digest the class and TTL. */ @@ -173,6 +183,7 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, /* Digest the algorithm. */ n = ns_name_ntol(alg, buf, sizeof(buf)); + INSIST(n > 0); dst_sign_data(SIG_MODE_UPDATE, key, &ctx, buf, n, NULL, 0); /* Digest the time signed, fudge, error, and other data */ diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index fcbc99c9d3..547fb7eac9 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -24,6 +24,8 @@ @HAVE_STRNDUP@ @USE_FIONBIO_IOCTL@ @USE_SYSERROR_LIST@ +@INNETGR_ARGS@ +@SETNETGRENT_ARGS@ /* XXX sunos and cygwin needs O_NDELAY */ #define PORT_NONBLOCK O_NONBLOCK @@ -363,8 +365,7 @@ int isc__gettimeofday(struct timeval *tvp, struct _TIMEZONE *tzp); int isc__gettimeofday(struct timeval *tp, struct timezone *tzp); #endif -int getnetgrent(const char **machinep, const char **userp, - const char **domainp); +int getnetgrent(char **machinep, char **userp, char **domainp); int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS); diff --git a/lib/bind/resolv/res_comp.c b/lib/bind/resolv/res_comp.c index cb86b3f5bb..ae430a5f8d 100644 --- a/lib/bind/resolv/res_comp.c +++ b/lib/bind/resolv/res_comp.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_comp.c,v 1.1 2001/03/29 06:31:58 marka Exp $"; +static const char rcsid[] = "$Id: res_comp.c,v 1.2 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -86,10 +86,10 @@ static const char rcsid[] = "$Id: res_comp.c,v 1.1 2001/03/29 06:31:58 marka Exp #include "port_after.h" /* - * Expand compressed domain name 'comp_dn' to full domain name. + * Expand compressed domain name 'src' to full domain name. * 'msg' is a pointer to the begining of the message, - * 'eomorig' points to the first location after the message, - * 'exp_dn' is a pointer to a buffer of size 'length' for the result. + * 'eom' points to the first location after the message, + * 'dst' is a pointer to a buffer of size 'dstsiz' for the result. * Return size of compressed name or -1 if there was an error. */ int diff --git a/lib/bind/resolv/res_debug.c b/lib/bind/resolv/res_debug.c index a541cf8e4f..d0ef95af93 100644 --- a/lib/bind/resolv/res_debug.c +++ b/lib/bind/resolv/res_debug.c @@ -95,7 +95,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_debug.c,v 1.7 2002/05/21 02:07:50 marka Exp $"; +static const char rcsid[] = "$Id: res_debug.c,v 1.8 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -615,9 +615,6 @@ p_option(u_long option) { #ifdef RES_USE_EDNS0 /* KAME extension */ case RES_USE_EDNS0: return "edns0"; #endif -#ifdef RES_USE_A6 - case RES_USE_A6: return "a6"; -#endif #ifdef RES_USE_DNAME case RES_USE_DNAME: return "dname"; #endif @@ -654,6 +651,33 @@ p_rcode(int rcode) { return (sym_ntos(__p_rcode_syms, rcode, (int *)0)); } +/* + * Return a string for a res_sockaddr_union. + */ +const char * +p_sockun(union res_sockaddr_union u, char *buf, size_t size) { + char ret[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:123.123.123.123"]; + + switch (u.sin.sin_family) { + case AF_INET: + inet_ntop(AF_INET, &u.sin.sin_addr, ret, sizeof ret); + break; +#ifdef HAS_INET6_STRUCTS + case AF_INET6: + inet_ntop(AF_INET6, &u.sin6.sin6_addr, ret, sizeof ret); + break; +#endif + default: + sprintf(ret, "[af%d]", u.sin.sin_family); + break; + } + if (size > 0) { + strncpy(buf, ret, size - 1); + buf[size - 1] = '0'; + } + return (buf); +} + /* * routines to convert between on-the-wire RR format and zone file format. * Does not contain conversion to/from decimal degrees; divide or multiply @@ -1101,8 +1125,9 @@ res_nametoclass(const char *buf, int *successp) { if (strncasecmp(buf, "CLASS", 5) != 0 || !isdigit((unsigned char)buf[5])) goto done; + errno = 0; result = strtoul(buf + 5, &endptr, 10); - if (*endptr == '\0' && result <= 0xffff) + if (errno == 0 && *endptr == '\0' && result <= 0xffff) success = 1; done: if (successp) @@ -1123,8 +1148,9 @@ res_nametotype(const char *buf, int *successp) { if (strncasecmp(buf, "type", 4) != 0 || !isdigit((unsigned char)buf[4])) goto done; + errno = 0; result = strtoul(buf + 4, &endptr, 10); - if (*endptr == '\0' && result <= 0xffff) + if (errno == 0 && *endptr == '\0' && result <= 0xffff) success = 1; done: if (successp) diff --git a/lib/bind/resolv/res_findzonecut.c b/lib/bind/resolv/res_findzonecut.c index 68a40499dc..b141307945 100644 --- a/lib/bind/resolv/res_findzonecut.c +++ b/lib/bind/resolv/res_findzonecut.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_findzonecut.c,v 1.4 2002/05/06 04:12:55 marka Exp $"; +static const char rcsid[] = "$Id: res_findzonecut.c,v 1.5 2003/06/03 04:39:34 marka Exp $"; #endif /* not lint */ /* @@ -49,19 +49,21 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.4 2002/05/06 04:12:55 ma typedef struct rr_a { LINK(struct rr_a) link; - union res_sockaddr_union addr; + union res_sockaddr_union addr; } rr_a; typedef LIST(rr_a) rrset_a; typedef struct rr_ns { LINK(struct rr_ns) link; const char * name; - int have_v4; - int have_v6; + unsigned int flags; rrset_a addrs; } rr_ns; typedef LIST(rr_ns) rrset_ns; +#define RR_NS_HAVE_V4 0x01 +#define RR_NS_HAVE_V6 0x02 + /* Forward. */ static int satisfy(res_state, const char *, rrset_ns *, @@ -149,7 +151,8 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2); int res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, - char *zname, size_t zsize, struct in_addr *addrs, int naddrs) { + char *zname, size_t zsize, struct in_addr *addrs, int naddrs) +{ int result, i; union res_sockaddr_union *u; @@ -267,7 +270,7 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, rrset_ns *nsrrsp) { char tname[NS_MAXDNAME]; - u_char resp[NS_PACKETSZ]; + u_char *resp = NULL; int n, i, ancount, nscount; ns_sect sect; ns_msg msg; @@ -279,9 +282,13 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, /* First canonicalize dname (exactly one unescaped trailing "."). */ if (ns_makecanon(dname, tname, sizeof tname) < 0) - return (-1); + goto cleanup; dname = tname; + resp = malloc(NS_MAXMSG); + if (resp == NULL) + goto cleanup; + /* Now grovel the subdomains, hunting for an SOA answer or auth. */ for (;;) { /* Leading or inter-label '.' are skipped here. */ @@ -293,7 +300,7 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, if (n < 0) { DPRINTF(("get_soa: do_query('%s', %s) failed (%d)", dname, p_class(class), n)); - return (-1); + goto cleanup; } if (n > 0) { DPRINTF(("get_soa: CNAME or DNAME found")); @@ -318,7 +325,7 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, if (ns_parserr(&msg, sect, i, &rr) < 0) { DPRINTF(("get_soa: ns_parserr(%s, %d) failed", p_section(sect, ns_o_query), i)); - return (-1); + goto cleanup; } if (ns_rr_type(rr) == ns_t_cname || ns_rr_type(rr) == ns_t_dname) @@ -330,19 +337,23 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, switch (sect) { case ns_s_an: if (ns_samedomain(dname, t) == 0) { - DPRINTF(("get_soa: ns_samedomain('%s', '%s') == 0", - dname, t)); + DPRINTF( + ("get_soa: ns_samedomain('%s', '%s') == 0", + dname, t) + ); errno = EPROTOTYPE; - return (-1); + goto cleanup; } break; case ns_s_ns: if (ns_samename(dname, t) == 1 || ns_samedomain(dname, t) == 0) { - DPRINTF(("get_soa: ns_samename() || !ns_samedomain('%s', '%s')", - dname, t)); + DPRINTF( + ("get_soa: ns_samename() || !ns_samedomain('%s', '%s')", + dname, t) + ); errno = EPROTOTYPE; - return (-1); + goto cleanup; } break; default: @@ -352,21 +363,23 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, DPRINTF(("get_soa: zname(%d) too small (%d)", zsize, strlen(t) + 1)); errno = EMSGSIZE; - return (-1); + goto cleanup; } strcpy(zname, t); rdata = ns_rr_rdata(rr); rdlen = ns_rr_rdlen(rr); if (ns_name_uncompress(resp, ns_msg_end(msg), rdata, mname, msize) < 0) { - DPRINTF(("get_soa: ns_name_uncompress failed")); - return (-1); + DPRINTF(("get_soa: ns_name_uncompress failed") + ); + goto cleanup; } if (save_ns(statp, &msg, ns_s_ns, zname, class, opts, nsrrsp) < 0) { DPRINTF(("get_soa: save_ns failed")); - return (-1); + goto cleanup; } + free(resp); return (0); } @@ -379,13 +392,16 @@ get_soa(res_state statp, const char *dname, ns_class class, int opts, if (*dname == '\\') if (*++dname == '\0') { errno = EMSGSIZE; - return (-1); + goto cleanup; } dname++; } } DPRINTF(("get_soa: out of labels")); errno = EDESTADDRREQ; + cleanup: + if (resp != NULL) + free(resp); return (-1); } @@ -393,15 +409,20 @@ static int get_ns(res_state statp, const char *zname, ns_class class, int opts, rrset_ns *nsrrsp) { - u_char resp[NS_PACKETSZ]; + u_char *resp; ns_msg msg; int n; + resp = malloc(NS_MAXMSG); + if (resp == NULL) + return (-1); + /* Go and get the NS RRs for this zone. */ n = do_query(statp, zname, class, ns_t_ns, resp, &msg); if (n != 0) { DPRINTF(("get_ns: do_query('%s', %s) failed (%d)", zname, p_class(class), n)); + free(resp); return (-1); } @@ -409,31 +430,38 @@ get_ns(res_state statp, const char *zname, ns_class class, int opts, if (save_ns(statp, &msg, ns_s_an, zname, class, opts, nsrrsp) < 0) { DPRINTF(("get_ns save_ns('%s', %s) failed", zname, p_class(class))); + free(resp); return (-1); } + free(resp); return (0); } static int get_glue(res_state statp, ns_class class, int opts, rrset_ns *nsrrsp) { rr_ns *nsrr, *nsrr_n; + u_char *resp; + + resp = malloc(NS_MAXMSG); + if (resp == NULL) + return(-1); /* Go and get the A RRs for each empty NS RR on our list. */ for (nsrr = HEAD(*nsrrsp); nsrr != NULL; nsrr = nsrr_n) { - u_char resp[NS_PACKETSZ]; ns_msg msg; int n; nsrr_n = NEXT(nsrr, link); - if (!nsrr->have_v4) { + if ((nsrr->flags & RR_NS_HAVE_V4) == 0) { n = do_query(statp, nsrr->name, class, ns_t_a, resp, &msg); if (n < 0) { - DPRINTF(("get_glue: do_query('%s', %s') failed", - nsrr->name, p_class(class))); - return (-1); + DPRINTF( + ("get_glue: do_query('%s', %s') failed", + nsrr->name, p_class(class))); + goto cleanup; } if (n > 0) { DPRINTF(( @@ -444,17 +472,18 @@ get_glue(res_state statp, ns_class class, int opts, rrset_ns *nsrrsp) { opts, nsrr) < 0) { DPRINTF(("get_glue: save_r('%s', %s) failed", nsrr->name, p_class(class))); - return (-1); + goto cleanup; } } - if (!nsrr->have_v6) { + if ((nsrr->flags & RR_NS_HAVE_V6) == 0) { n = do_query(statp, nsrr->name, class, ns_t_aaaa, resp, &msg); if (n < 0) { - DPRINTF(("get_glue: do_query('%s', %s') failed", - nsrr->name, p_class(class))); - return (-1); + DPRINTF( + ("get_glue: do_query('%s', %s') failed", + nsrr->name, p_class(class))); + goto cleanup; } if (n > 0) { DPRINTF(( @@ -465,7 +494,7 @@ get_glue(res_state statp, ns_class class, int opts, rrset_ns *nsrrsp) { opts, nsrr) < 0) { DPRINTF(("get_glue: save_r('%s', %s) failed", nsrr->name, p_class(class))); - return (-1); + goto cleanup; } } @@ -476,7 +505,12 @@ get_glue(res_state statp, ns_class class, int opts, rrset_ns *nsrrsp) { free_nsrr(nsrrsp, nsrr); } } + free(resp); return (0); + + cleanup: + free(resp); + return (-1); } static int @@ -514,7 +548,8 @@ save_ns(res_state statp, ns_msg *msg, ns_sect sect, if (ns_name_uncompress(ns_msg_base(*msg), ns_msg_end(*msg), rdata, tname, sizeof tname) < 0) { - DPRINTF(("save_ns: ns_name_uncompress failed")); + DPRINTF(("save_ns: ns_name_uncompress failed") + ); free(nsrr); return (-1); } @@ -526,8 +561,7 @@ save_ns(res_state statp, ns_msg *msg, ns_sect sect, } INIT_LINK(nsrr, link); INIT_LIST(nsrr->addrs); - nsrr->have_v4 = 0; - nsrr->have_v6 = 0; + nsrr->flags = 0; APPEND(*nsrrsp, nsrr, link); } if (save_a(statp, msg, ns_s_ar, @@ -556,7 +590,8 @@ save_a(res_state statp, ns_msg *msg, ns_sect sect, p_section(sect, ns_o_query), i)); return (-1); } - if ((ns_rr_type(rr) != ns_t_a && ns_rr_type(rr) != ns_t_aaaa) || + if ((ns_rr_type(rr) != ns_t_a && + ns_rr_type(rr) != ns_t_aaaa) || ns_rr_class(rr) != class || ns_samename(ns_rr_name(rr), owner) != 1 || ns_rr_rdlen(rr) != NS_INADDRSZ) @@ -581,7 +616,7 @@ save_a(res_state statp, ns_msg *msg, ns_sect sect, memcpy(&arr->addr.sin.sin_addr, ns_rr_rdata(rr), NS_INADDRSZ); arr->addr.sin.sin_port = htons(NAMESERVER_PORT); - nsrr->have_v4 = 1; + nsrr->flags |= RR_NS_HAVE_V4; break; case ns_t_aaaa: arr->addr.sin6.sin6_family = AF_INET6; @@ -590,7 +625,7 @@ save_a(res_state statp, ns_msg *msg, ns_sect sect, #endif memcpy(&arr->addr.sin6.sin6_addr, ns_rr_rdata(rr), 16); arr->addr.sin.sin_port = htons(NAMESERVER_PORT); - nsrr->have_v6 = 1; + nsrr->flags |= RR_NS_HAVE_V6; break; default: abort(); @@ -646,7 +681,7 @@ do_query(res_state statp, const char *dname, ns_class class, ns_type qtype, DPRINTF(("do_query: res_nmkquery failed")); return (-1); } - n = res_nsend(statp, req, n, resp, NS_PACKETSZ); + n = res_nsend(statp, req, n, resp, NS_MAXMSG); if (n < 0) { DPRINTF(("do_query: res_nsend failed")); return (-1); diff --git a/lib/bind/resolv/res_init.c b/lib/bind/resolv/res_init.c index c7fdd477e6..703eb4db4d 100644 --- a/lib/bind/resolv/res_init.c +++ b/lib/bind/resolv/res_init.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.12 2002/06/03 00:34:57 marka Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.13 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -161,6 +161,7 @@ __res_vinit(res_state statp, int preinit) { char *net; #endif int dots; + union res_sockaddr_union u[2]; if (!preinit) { statp->retrans = RES_TIMEOUT; @@ -172,17 +173,32 @@ __res_vinit(res_state statp, int preinit) { if ((statp->options & RES_INIT) != 0) res_ndestroy(statp); + memset(u, 0, sizeof(u)); #ifdef USELOOPBACK - statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); + u[nserv].sin.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); #else - statp->nsaddr.sin_addr.s_addr = INADDR_ANY; + u[nserv].sin.sin_addr.s_addr = INADDR_ANY; #endif - statp->nsaddr.sin_family = AF_INET; - statp->nsaddr.sin_port = htons(NAMESERVER_PORT); + u[nserv].sin.sin_family = AF_INET; + u[nserv].sin.sin_port = htons(NAMESERVER_PORT); #ifdef HAVE_SA_LEN - statp->nsaddr.sin_len = sizeof(struct sockaddr_in); + u[nserv].sin.sin_len = sizeof(struct sockaddr_in); #endif - statp->nscount = 1; + nserv++; +#ifdef HAS_INET6_STRUCTS +#ifdef USELOOPBACK + u[nserv].sin6.sin6_addr = in6addr_loopback; +#else + u[nserv].sin6.sin6_addr = in6addr_any; +#endif + u[nserv].sin6.sin6_family = AF_INET6; + u[nserv].sin6.sin6_port = htons(NAMESERVER_PORT); +#ifdef HAVE_SA_LEN + u[nserv].sin6.sin6_len = sizeof(struct sockaddr_in6); +#endif + nserv++; +#endif + statp->nscount = 0; statp->ndots = 1; statp->pfcode = 0; statp->_vcsock = -1; @@ -196,11 +212,11 @@ __res_vinit(res_state statp, int preinit) { statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr; strcpy(statp->_u._ext.ext->nsuffix, "ip6.arpa"); strcpy(statp->_u._ext.ext->nsuffix2, "ip6.int"); - strcpy(statp->_u._ext.ext->bsuffix, "ip6.arpa"); } #ifdef RESOLVSORT statp->nsort = 0; #endif + res_setservers(statp, u, nserv); /* Allow user to override the local domain definition */ if ((cp = getenv("LOCALDOMAIN")) != NULL) { @@ -242,6 +258,7 @@ __res_vinit(res_state statp, int preinit) { (line[sizeof(name) - 1] == ' ' || \ line[sizeof(name) - 1] == '\t')) + nserv = 0; if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) { /* read the config file */ while (fgets(buf, sizeof(buf), fp) != NULL) { @@ -507,9 +524,6 @@ res_setoptions(res_state statp, const char *options, const char *source) statp->options |= RES_USE_EDNS0; } #endif - else if (!strncmp(cp, "a6", sizeof("a6") - 1)) { - statp->options |= RES_USE_A6; - } else if (!strncmp(cp, "dname", sizeof("dname") - 1)) { statp->options |= RES_USE_DNAME; } @@ -529,14 +543,6 @@ res_setoptions(res_state statp, const char *options, const char *source) strncpy(ext->nsuffix2, cp, i); ext->nsuffix2[i] = '\0'; } - else if (!strncmp(cp, "bitstring:", sizeof("bitstring:") - 1)) { - if (ext == NULL) - goto skip; - cp += sizeof("bitstring:") - 1; - i = MIN(strcspn(cp, " \t"), sizeof(ext->bsuffix) - 1); - strncpy(ext->bsuffix, cp, i); - ext->bsuffix[i] = '\0'; - } else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) { cp += sizeof("v6revmode:") - 1; /* "nibble" and "bitstring" used to be valid */ @@ -628,13 +634,6 @@ res_get_nibblesuffix2(res_state statp) { return ("ip6.int"); } -const char * -res_get_bitstringsuffix(res_state statp) { - if (statp->_u._ext.ext) - return (statp->_u._ext.ext->bsuffix); - return ("ip6.arpa"); -} - void res_setservers(res_state statp, const union res_sockaddr_union *set, int cnt) { int i, nserv; diff --git a/lib/bind/resolv/res_mkquery.c b/lib/bind/resolv/res_mkquery.c index 474128fd09..af1a1d5387 100644 --- a/lib/bind/resolv/res_mkquery.c +++ b/lib/bind/resolv/res_mkquery.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_mkquery.c,v 1.2 2001/11/01 04:59:17 marka Exp $"; +static const char rcsid[] = "$Id: res_mkquery.c,v 1.3 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -105,7 +105,7 @@ res_nmkquery(res_state statp, int buflen) /* size of buffer */ { register HEADER *hp; - register u_char *cp; + register u_char *cp, *ep; register int n; u_char *dnptrs[20], **dpp, **lastdnptr; @@ -128,7 +128,7 @@ res_nmkquery(res_state statp, hp->rd = (statp->options & RES_RECURSE) != 0; hp->rcode = NOERROR; cp = buf + HFIXEDSZ; - buflen -= HFIXEDSZ; + ep = buf + buflen; dpp = dnptrs; *dpp++ = buf; *dpp++ = NULL; @@ -139,15 +139,15 @@ res_nmkquery(res_state statp, switch (op) { case QUERY: /*FALLTHROUGH*/ case NS_NOTIFY_OP: - if ((buflen -= QFIXEDSZ) < 0) + if (ep - cp < QFIXEDSZ) return (-1); - if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0) + if ((n = dn_comp(dname, cp, ep - cp - QFIXEDSZ, dnptrs, + lastdnptr)) < 0) return (-1); cp += n; - buflen -= n; - __putshort(type, cp); + ns_put16(type, cp); cp += INT16SZ; - __putshort(class, cp); + ns_put16(class, cp); cp += INT16SZ; hp->qdcount = htons(1); if (op == QUERY || data == NULL) @@ -155,19 +155,20 @@ res_nmkquery(res_state statp, /* * Make an additional record for completion domain. */ - buflen -= RRFIXEDSZ; - n = dn_comp((const char *)data, cp, buflen, dnptrs, lastdnptr); + if ((ep - cp) < RRFIXEDSZ) + return (-1); + n = dn_comp((const char *)data, cp, ep - cp - RRFIXEDSZ, + dnptrs, lastdnptr); if (n < 0) return (-1); cp += n; - buflen -= n; - __putshort(T_NULL, cp); + ns_put16(T_NULL, cp); cp += INT16SZ; - __putshort(class, cp); + ns_put16(class, cp); cp += INT16SZ; - __putlong(0, cp); + ns_put32(0, cp); cp += INT32SZ; - __putshort(0, cp); + ns_put16(0, cp); cp += INT16SZ; hp->arcount = htons(1); break; @@ -176,16 +177,16 @@ res_nmkquery(res_state statp, /* * Initialize answer section */ - if (buflen < 1 + RRFIXEDSZ + datalen) + if (ep - cp < 1 + RRFIXEDSZ + datalen) return (-1); *cp++ = '\0'; /* no domain name */ - __putshort(type, cp); + ns_put16(type, cp); cp += INT16SZ; - __putshort(class, cp); + ns_put16(class, cp); cp += INT16SZ; - __putlong(0, cp); + ns_put32(0, cp); cp += INT32SZ; - __putshort(datalen, cp); + ns_put16(datalen, cp); cp += INT16SZ; if (datalen) { memcpy(cp, data, datalen); @@ -207,15 +208,14 @@ res_nmkquery(res_state statp, #endif int -res_nopt(statp, n0, buf, buflen, anslen) - res_state statp; - int n0; - u_char *buf; /* buffer to put query */ - int buflen; /* size of buffer */ - int anslen; /* answer buffer length */ +res_nopt(res_state statp, + int n0, /* current offset in buffer */ + u_char *buf, /* buffer to put query */ + int buflen, /* size of buffer */ + int anslen) /* UDP answer buffer size */ { register HEADER *hp; - register u_char *cp; + register u_char *cp, *ep; u_int16_t flags = 0; #ifdef DEBUG @@ -225,17 +225,16 @@ res_nopt(statp, n0, buf, buflen, anslen) hp = (HEADER *) buf; cp = buf + n0; - buflen -= n0; + ep = buf + buflen; - if (buflen < 1 + RRFIXEDSZ) - return -1; + if ((ep - cp) < 1 + RRFIXEDSZ) + return (-1); *cp++ = 0; /* "." */ - buflen--; - __putshort(T_OPT, cp); /* TYPE */ + ns_put16(T_OPT, cp); /* TYPE */ cp += INT16SZ; - __putshort(anslen & 0xffff, cp); /* CLASS = UDP payload size */ + ns_put16(anslen & 0xffff, cp); /* CLASS = UDP payload size */ cp += INT16SZ; *cp++ = NOERROR; /* extended RCODE */ *cp++ = 0; /* EDNS version */ @@ -246,13 +245,12 @@ res_nopt(statp, n0, buf, buflen, anslen) #endif flags |= NS_OPT_DNSSEC_OK; } - __putshort(flags, cp); + ns_put16(flags, cp); cp += INT16SZ; - __putshort(0, cp); /* RDLEN */ + ns_put16(0, cp); /* RDLEN */ cp += INT16SZ; hp->arcount = htons(ntohs(hp->arcount) + 1); - buflen -= RRFIXEDSZ; - return cp - buf; + return (cp - buf); } #endif diff --git a/lib/bind/resolv/res_mkupdate.c b/lib/bind/resolv/res_mkupdate.c index 3eea590e75..bb79f26d5a 100644 --- a/lib/bind/resolv/res_mkupdate.c +++ b/lib/bind/resolv/res_mkupdate.c @@ -21,7 +21,7 @@ */ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1 2001/03/29 06:31:59 marka Exp $"; +static const char rcsid[] = "$Id: res_mkupdate.c,v 1.2 2003/06/03 04:39:34 marka Exp $"; #endif /* not lint */ #include "port_before.h" @@ -302,7 +302,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { if (!getword_str(buf2, sizeof buf2, &startp, endp)) return (-1); - n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); + n = dn_comp(buf2, cp, buflen, NULL, NULL); if (n < 0) return (-1); cp += n; @@ -482,8 +482,10 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { char *ulendp; u_int32_t ottl; + errno = 0; ottl = strtoul(buf2, &ulendp, 10); - if (ulendp != NULL && *ulendp != '\0') + if (errno != 0 || + (ulendp != NULL && *ulendp != '\0')) return (-1); ShrinkBuffer(INT32SZ); PUTLONG(ottl, cp); @@ -572,7 +574,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { /* next name */ if (!getword_str(buf2, sizeof buf2, &startp, endp)) return (-1); - n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr); + n = dn_comp(buf2, cp, buflen, NULL, NULL); if (n < 0) return (-1); cp += n; @@ -636,6 +638,62 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { memcpy(cp, &in6a, NS_IN6ADDRSZ); cp += NS_IN6ADDRSZ; break; + case ns_t_naptr: + /* Order Preference Flags Service Replacement Regexp */ + /* Order */ + n = getnum_str(&startp, endp); + if (n < 0 || n > 65535) + return (-1); + ShrinkBuffer(INT16SZ); + PUTSHORT(n, cp); + /* Preference */ + n = getnum_str(&startp, endp); + if (n < 0 || n > 65535) + return (-1); + ShrinkBuffer(INT16SZ); + PUTSHORT(n, cp); + /* Flags */ + if ((n = getstr_str(buf2, sizeof buf2, + &startp, endp)) < 0) { + return (-1); + } + if (n > 255) + return (-1); + ShrinkBuffer(n+1); + *cp++ = n; + memcpy(cp, buf2, n); + cp += n; + /* Service Classes */ + if ((n = getstr_str(buf2, sizeof buf2, + &startp, endp)) < 0) { + return (-1); + } + if (n > 255) + return (-1); + ShrinkBuffer(n+1); + *cp++ = n; + memcpy(cp, buf2, n); + cp += n; + /* Pattern */ + if ((n = getstr_str(buf2, sizeof buf2, + &startp, endp)) < 0) { + return (-1); + } + if (n > 255) + return (-1); + ShrinkBuffer(n+1); + *cp++ = n; + memcpy(cp, buf2, n); + cp += n; + /* Replacement */ + if (!getword_str(buf2, sizeof buf2, &startp, endp)) + return (-1); + n = dn_comp(buf2, cp, buflen, NULL, NULL); + if (n < 0) + return (-1); + cp += n; + ShrinkBuffer(n); + break; default: return (-1); } /*switch*/ @@ -807,7 +865,7 @@ gethexnum_str(u_char **startpp, u_char *endp) { } /* - * Get a whitespace delimited base 16 number from a string (not file) into buf + * Get a whitespace delimited base 10 number from a string (not file) into buf * update the start pointer to point after the number in the string. */ static int diff --git a/lib/bind/resolv/res_private.h b/lib/bind/resolv/res_private.h index ec9b384b91..d7b66cd691 100644 --- a/lib/bind/resolv/res_private.h +++ b/lib/bind/resolv/res_private.h @@ -11,7 +11,6 @@ struct __res_state_ext { } addr, mask; } sort_list[MAXRESOLVSORT]; char nsuffix[64]; - char bsuffix[64]; char nsuffix2[64]; }; diff --git a/lib/bind/resolv/res_query.c b/lib/bind/resolv/res_query.c index ee928cfe27..783893fb0b 100644 --- a/lib/bind/resolv/res_query.c +++ b/lib/bind/resolv/res_query.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_query.c,v 1.4 2001/11/01 04:59:18 marka Exp $"; +static const char rcsid[] = "$Id: res_query.c,v 1.5 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -167,8 +167,11 @@ again: if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) { #ifdef DEBUG if (statp->options & RES_DEBUG) - printf(";; rcode = %d, ancount=%d\n", hp->rcode, - ntohs(hp->ancount)); + printf(";; rcode = (%s), counts = an:%d ns:%d ar:%d\n", + p_rcode(hp->rcode), + ntohs(hp->ancount), + ntohs(hp->nscount), + ntohs(hp->arcount)); #endif switch (hp->rcode) { case NXDOMAIN: diff --git a/lib/bind/resolv/res_send.c b/lib/bind/resolv/res_send.c index c58dddbf12..4065c53f79 100644 --- a/lib/bind/resolv/res_send.c +++ b/lib/bind/resolv/res_send.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.6 2002/05/03 06:13:27 marka Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.7 2003/06/03 04:39:34 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -171,6 +171,9 @@ res_ourserver_p(const res_state statp, const struct sockaddr *sa) { srv6 = (struct sockaddr_in6 *)get_nsaddr(statp, ns); if (srv6->sin6_family == in6p->sin6_family && srv6->sin6_port == in6p->sin6_port && +#ifdef HAVE_SIN6_SCOPE_ID + srv6->sin6_scope_id == in6p->sin6_scope_id && +#endif (IN6_IS_ADDR_UNSPECIFIED(&srv6->sin6_addr) || IN6_ARE_ADDR_EQUAL(&srv6->sin6_addr, &in6p->sin6_addr))) return (1); @@ -386,6 +389,8 @@ res_nsend(res_state statp, int nsaplen; nsap = get_nsaddr(statp, ns); nsaplen = get_salen(nsap); + statp->_flags &= ~RES_F_LASTMASK; + statp->_flags |= (ns << RES_F_LASTSHIFT); same_ns: if (statp->qhook) { int done = 0, loops = 0; @@ -623,7 +628,7 @@ send_vc(res_state statp, /* * Send length & message */ - putshort((u_short)buflen, (u_char*)&len); + ns_put16((u_short)buflen, (u_char*)&len); iov[0] = evConsIovec(&len, INT16SZ); DE_CONST(buf, tmp); iov[1] = evConsIovec(tmp, buflen); diff --git a/lib/bind/resolv/res_update.c b/lib/bind/resolv/res_update.c index 221f62e09b..6019fe59fa 100644 --- a/lib/bind/resolv/res_update.c +++ b/lib/bind/resolv/res_update.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_update.c,v 1.9 2002/05/06 04:12:54 marka Exp $"; +static const char rcsid[] = "$Id: res_update.c,v 1.10 2003/06/03 04:39:35 marka Exp $"; #endif /* not lint */ /* @@ -77,7 +77,7 @@ struct zonegrp { /* Forward. */ -static void res_dprintf(const char *, ...); +static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2); /* Macros. */ @@ -92,12 +92,18 @@ static void res_dprintf(const char *, ...); int res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { ns_updrec *rrecp; - u_char answer[PACKETSZ], packet[2*PACKETSZ]; + u_char answer[PACKETSZ]; + u_char *packet; struct zonegrp *zptr, tgrp; LIST(struct zonegrp) zgrps; int nzones = 0, nscount = 0, n; union res_sockaddr_union nsaddrs[MAXNS]; + packet = malloc(NS_MAXMSG); + if (packet == NULL) { + DPRINTF(("malloc failed")); + return (0); + } /* Thread all of the updates onto a list of groups. */ INIT_LIST(zgrps); memset(&tgrp, 0, sizeof (tgrp)); @@ -150,7 +156,7 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { /* Marshall the update message. */ n = res_nmkupdate(statp, HEAD(zptr->z_rrlist), - packet, sizeof packet); + packet, NS_MAXMSG); DPRINTF(("res_mkupdate -> %d", n)); if (n < 0) goto done; @@ -188,6 +194,7 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { if (nscount != 0) res_setservers(statp, nsaddrs, nscount); + free(packet); return (nzones); } From 68e6e43c2bb77b6b41d3db490050c3d859263c0c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Jun 2003 04:40:51 +0000 Subject: [PATCH 11/75] regen: 1471. [bug] libbind: updated to BIND 8.4.0. --- lib/bind/configure | 298 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 293 insertions(+), 5 deletions(-) diff --git a/lib/bind/configure b/lib/bind/configure index 604a637411..d73f0923fb 100644 --- a/lib/bind/configure +++ b/lib/bind/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.86 . +# From configure.in Revision: 1.87 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -5086,6 +5086,96 @@ else thread_dir=nothreads fi +echo "$as_me:$LINENO: checking for strlcat" >&5 +echo $ECHO_N "checking for strlcat... $ECHO_C" >&6 +if test "${ac_cv_func_strlcat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* From autoconf 2.57 */ +/* Define strlcat to an innocuous variant, in case declares strlcat. + For example, HP-UX 11i declares gettimeofday. */ +#define strlcat innocuous_strlcat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strlcat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strlcat + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strlcat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strlcat) || defined (__stub___strlcat) +choke me +#else +char (*f) () = strlcat; +#endif +#ifdef __cplusplus +} +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f != strlcat; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strlcat=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_strlcat=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strlcat" >&5 +echo "${ECHO_T}$ac_cv_func_strlcat" >&6 +if test $ac_cv_func_strlcat = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRLCAT 1 +_ACEOF + +fi + + @@ -6996,7 +7086,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 6999 "configure"' > conftest.$ac_ext + echo '#line 7089 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7539,7 +7629,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:7542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:7632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -9224,7 +9314,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +int innetgr(const char *netgroup, const char *host, const char *user, const char *domain); + + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +INNETGR_ARGS="#undef INNETGR_ARGS" + + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +int innetgr(char *netgroup, char *host, char *user, char *domain); + + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain" + + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +void setnetgrent(const char *); + + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS" + + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include +#include +void setnetgrent(char *); + + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup" + + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + + # # Random remaining OS-specific issues involving compiler warnings. # XXXDCL print messages to indicate some compensation is being done? @@ -18122,6 +18408,8 @@ s,@SERV_R_END_RETURN@,$SERV_R_END_RETURN,;t t s,@SERV_R_ENT_ARGS@,$SERV_R_ENT_ARGS,;t t s,@SERV_R_SET_RESULT@,$SERV_R_SET_RESULT,;t t s,@SERV_R_SET_RETURN@,$SERV_R_SET_RETURN,;t t +s,@SETNETGRENT_ARGS@,$SETNETGRENT_ARGS,;t t +s,@INNETGR_ARGS@,$INNETGR_ARGS,;t t s,@ISC_PLATFORM_BRACEPTHREADONCEINIT@,$ISC_PLATFORM_BRACEPTHREADONCEINIT,;t t s,@BIND9_TOP_BUILDDIR@,$BIND9_TOP_BUILDDIR,;t t /@BIND9_INCLUDES@/r $BIND9_INCLUDES From 395b4b3e6d0087a542413a4b1f4e9f6158ff4a81 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Jun 2003 05:45:27 +0000 Subject: [PATCH 12/75] new draft --- doc/draft/draft-hall-dns-data-00.txt | 579 +++++++++++++++++++++++++++ 1 file changed, 579 insertions(+) create mode 100644 doc/draft/draft-hall-dns-data-00.txt diff --git a/doc/draft/draft-hall-dns-data-00.txt b/doc/draft/draft-hall-dns-data-00.txt new file mode 100644 index 0000000000..427ba34d5e --- /dev/null +++ b/doc/draft/draft-hall-dns-data-00.txt @@ -0,0 +1,579 @@ + + + INTERNET-DRAFT Eric A. Hall + Document: draft-hall-dns-data-00.txt May 2003 + Expires: December, 2003 + Category: Informational + + Considerations for DNS Resource Records + + + Status of this Memo + + This document is an Internet-Draft and is in full conformance with + all provisions of Section 10 of RFC 2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as Internet- + Drafts. + + Internet-Drafts are draft documents valid for a maximum of six + months and may be updated, replaced, or obsoleted by other + documents at any time. It is inappropriate to use Internet-Drafts + as reference material or to cite them other than as "work in + progress." + + The list of current Internet-Drafts can be accessed at + http://www.ietf.org/ietf/1id-abstracts.txt + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + + + Copyright Notice + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + + Abstract + + This document discusses some common issues which should be taken + into consideration whenever any new service proposes to extend the + Domain Name Service. + + + + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + + Table of Contents + + 1. Introduction...............................................2 + 2. Prerequisites and Terminology..............................3 + 3. DNS Architectural Principles...............................3 + 3.1. Resource Records........................................3 + 3.2. Hierarchical Partitioning...............................4 + 3.3. Minimalist Messages.....................................4 + 3.4. Built-In Record Caching.................................5 + 4. Inherent Design Limitations................................5 + 4.1. Domain Name Length......................................5 + 4.2. Ambiguity...............................................5 + 4.3. Incomplete Answer Sets..................................6 + 4.4. Lookups Only............................................6 + 4.5. UDP and TCP Restriction.................................7 + 4.6. Compression.............................................7 + 4.7. Cache Overflow..........................................8 + 4.8. Cache Lag...............................................8 + 4.9. World-Readable Data.....................................9 + 5. Design Conclusion.........................................10 + 6. Going Standards-Track.....................................10 + 7. Security Considerations...................................11 + 8. IANA Considerations.......................................11 + 9. Author's Address..........................................11 + 10. Normative References......................................11 + 11. Acknowledgments...........................................11 + 12. Full Copyright Statement..................................11 + + 1. Introduction + + In terms of deployment, the Domain Name System (DNS) [STD13] is an + extremely successful network service, having perhaps the widest + installed base and usage of any Internet service. Unfortunately, + this omnipresence makes DNS a favorite target for well-intentioned + but often-misguided efforts to extend the service into roles it is + unsuited for, particularly due to its specialized nature. This + document attempts to itemize the issues which prevent this + expansion so that future developers and planners can be made aware + of the limitations early in the development cycles. + + Note that this document does not define any formal rules or + restrictions of any kind. Instead, the sole purpose of this + document is to itemize the common reasons why various extension + efforts have been rejected by the DNS community in the past, and + why other efforts may be rejected in the future. It is entirely + + Hall I-D Expires: December 2003 [page 2] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + possible for a usage model to be embraced by the DNS community + even though all of the principles listed within this document are + violated (although it is extremely unlikely), and as such, this + document should not be considered as a governing device of any + kind. Instead, this document should only be viewed as a planning + aid for developers and planners to use when considering the + creation of new uses for the DNS. + + 2. Prerequisites and Terminology + + Readers of this document are expected to be familiar with the + following specifications: + + [RFC1034] Mockapetris, P. "Domain names - concepts and + facilities", STD 13, RFC 1034, November 1987. + + [RFC1035] Mockapetris, P. "Domain names - implementation + and specification", STD 13, RFC 1035, November + 1987. + + [RFC1123] Braden, R. "Requirements for Internet Hosts - + Application and Support", STD 3, RFC 1123, + October 1989. + + [RFC2181] Elz, R., and Bush, R. "Clarifications to the + DNS Specification", RFC 2181, July 1997. + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL + NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" + in this document are to be interpreted as described in RFC 2119. + + + 3. DNS Architectural Principles + + The current collection of DNS specifications define a lightweight + lookup service which provides anonymous access to structured + information about named entries from distributed database + partitions ("zones"). The service is specifically optimized for + "lookup by name" datagram transactions, distributed caches of + previous lookup answer sets, and non-authenticated access. + + 3.1. Resource Records + + All data stored in DNS uses a common record format, consisting of + six common fields (although one of these fields is a generic + "data" field which varies in size and shape according to the type + of data being provided). Four of these fields ("domain name", + + Hall I-D Expires: December 2003 [page 3] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + "type", "class" and "data") provide attributes which collectively + form a unique identifier for a piece of data. Any three of these + four fields may be identical across multiple resource records; for + example, multiple resource records may exist with the same domain + name, type and class, but they must have different data values in + order to represent unique records within the global DNS. + + For the purposes of this document, the most important of these + fields is the domain name field, which provides a non-unique + identifier for every record in the database. All queries must + explicitly identify the domain name of the entry they are looking + for, and may optionally specify the desired type and/or class + values. If a query results in multiple matches, then all of the + matching records must be returned. + + 3.2. Hierarchical Partitioning + + From a high-level perspective, the DNS database is distributed + across multiple partitions called "zones", each of which have + ownership for a specific subset of domain names. Zones are linked + in a hierarchical tree, with the top-level zones having zones + directly beneath them, and with some of those having additional + subordinate zones, and so forth. Although the zones are structured + in a hierarchical tree, each zone acts as an independent entity, + and is only concerned with the records that it controls directly. + + The hierarchical partitioning structure is traversed whenever the + DNS protocol needs to locate the zone which is authoritative for a + named resource record. When a resolver asks for the resource + records associated with a specific domain name, the zone hierarchy + is followed until either an answer or an error is returned. In + this regard, the domain name of a resource record provides a + lookup key which is used by the protocol to navigate the zone + structure itself. + + 3.3. Minimalist Messages + + The DNS protocol uses a binary message format which is designed + specifically for lookup transactions. There are very few spurious + bits or fields in the DNS message (there is no "version" field, + for example). Among these optimizations are protocol-specific + compression techniques which reduce message sizes, and the + preferential use of UDP datagrams for the lookup transactions. + + + Hall I-D Expires: December 2003 [page 4] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + + 3.4. Built-In Record Caching + + Further contributing to the lookup-centric design objective, DNS + resolvers and servers are allowed to cache resource records that + they have discovered, so that subsequent queries for duplicate + data may be retrieved without having to reissue a complex query. + + 4. Inherent Design Limitations + + As a result of the highly-optimized lookup model, DNS has several + critical built-in limitations. For example, DNS does not provide + any functions to "search by value", nor does it provide any sort + of mechanisms for cache-overrides, user authentication, access + control services, nor most of the other mechanisms that are + typically associated with richer (and slower) distributed + directory or database services. + + Although DNS could be extended to accommodate some of these + usages, such an effort would require a significant amount of + design effort, and would likely require a complete redeployment of + the associated software agents. Furthermore, there is a + significant danger of overloading DNS with excessive features and + data such that the service itself would be incapable of performing + lightweight lookups for named entries quickly and efficiently. + + 4.1. Domain Name Length + + Domain names are restricted to a maximum length of 255 characters. + Since a domain name is the primary identifier for a resource + record -- and since the domain name of a record also identifies + the zone where a record is stored -- the length of a domain name + is can be a significant restriction. + + For example, a resource record in a zone that is nested several + layers deep may have to be significantly shorter than a domain + name for the same kind of resource record in a top-level hierarchy + to comply with the length restriction. As a result, data models + which require application-specific labels or sequences can be + problematic for some users and should generally be avoided. + + 4.2. Ambiguity + + Although resource records provide six common fields, only three of + these fields can be specified in a lookup query (domain name, + record type, and network class). However, if multiple resource + + Hall I-D Expires: December 2003 [page 5] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + records exist with identical values for these fields (but with + different values in the data field), then all of those records + will be returned. As such, it is not possible to explicitly + request an exact resource record from among a set, unless only one + instance of that record type exists at that domain name. + + However, it is not possible to guarantee that a particular + resource record type will only exist in the singular form at any + given time. Although it is possible to demand that administrators + "MUST NOT" enter a particular resource record more than once for + any domain name, such demands are at the whims of the systems in + the query path, and are generally unenforceable. + + In short, it is not possible to guarantee that a newly-defined + resource record will only exist in the singular form. Data models + which depend on singular instances of a particular record should + be designed with this issue in mind. + + 4.3. Incomplete Answer Sets + + Just as it is not possible to extract a single resource record + from a set, it is not always possible to be sure that you will + receive all of the resource records in a set. Specifically, the + original DNS specifications allowed each resource record in a set + to have different time-to-live values, and this allowed (in + theory) each record in the set to be aged out of a cache at + different times. Furthermore, there have been some bugs in some + implementations which resulted in incomplete answer sets being + sent and subsequently cached by other nodes. + + Although these problems have mostly been addressed over time, it + is still not possible to guarantee with absolute certainty that + all of the records in a set will always be returned. Data models + which depend on spreading answer data over multiple resource + records in a set should be designed with this in mind. + + 4.4. Lookups Only + + DNS currently only provides a lookup query, using the domain name + of the query as an index value. DNS does not provide any queries + which would allow a resolver to search all of the resource records + in the entire distributed database for a data value, but instead + only provides lookup queries which match against the three + qualifier fields. Although the original DNS specifications did + provide a mechanism to search a specific server for matching data- + + Hall I-D Expires: December 2003 [page 6] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + values, this feature has never been widely deployed, and the + capability has since been deprecated. + + In theory, it would be possible to create a super-index of all + zones in the entire distributed database and search against that + index, although nobody has built such an index so as-of-yet. + + Regardless, applications must be aware that all queries use the + domain name as a lookup key, and it is not possible to search for + resource records by their data-values. + + 4.5. UDP and TCP Restriction + + DNS messages which are sent over UDP have a maximum message size + of 512 bytes. If a lookup results in an response message that + exceeds this size, then the query process must be restarted using + TCP. However, a DNS header restriction limits DNS message which + are sent over TCP to a maximum message size of 65,535 bytes. + Answer data that exceeds this threshold cannot be retrieved using + DNS at all. In short, UDP overflows penalize performance, while + TCP overflows cause the lookup process to fail entirely. + Furthermore, not all servers support TCP, and in those cases, UDP + messages which overflow the 512 byte limit will also be fatal. + + In those cases where falling back to TCP works as expected, there + can be additional penalties apart from the longer setup time. For + example, TCP session management typically consumes more resources + than UDP datagrams, significantly limiting the number of queries + which a server can process at any given time. + + For all of these reasons, planners and developers are strongly + encouraged to limit resource record data to sizes that will not + cause UDP overflow. In those cases where this is unavoidable, they + should be prepared for a variety of problems, including + performance issues and outright failure. + + 4.6. Compression + + The DNS specifications provide a compression mechanism which can + be used to substitute label sequences with pointers to previous + occurrences of those sequences. However, this mechanism only works + with well-known resource records. New resource record types cannot + make use of the pointer mechanism, since caches will not be aware + of the resource record's data-structure, and therefore will not be + able to tell that the data value is a domain name pointer which is + supposed to reference some other sequence of labels. + + Hall I-D Expires: December 2003 [page 7] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + + This is an especially important consideration to keep in mind when + considering large data structures; while it is tempting to believe + that the domain name can be compressed, this simply is not true. + + 4.7. Cache Overflow + + Another issue related to data size is the amount of memory + available to a particular cache. All caches have fixed amounts of + available memory, and when that memory is consumed, some data will + have to be expired from the cache. In these cases, the cache will + have to query for the data again (causing performance penalties), + and will then have to bump some other data from the memory pool in + order to make room for the data again. In heavily loaded + environments (such as a very busy ISP), this can result in a + constant churning of the memory pool. + + This is obviously a good reason to limit the size of the resource + records in use, but it is also a good reason for limiting the + total number of resource records in use with a particular + application. Since each entry will have to consume memory in a + cache somewhere, excess records or excessively large records will + both contribute to the potential for cache churning. + + 4.8. Cache Lag + + Since DNS is optimized for lookups, the use of intermediary and + end-node caches allows lookups to be held in memory at a location + that is "closer" to the user, which generally improves performance + over having to follow a complex delegation chain for every query. + However, caching can be somewhat hostile towards general-purpose + database models, particularly in light of the fact that DNS + provides no mechanisms for forcing a system to flush its cache of + previously discovered records. + + In particular, caches prevent data from being validated against an + authoritative source. While this is normally beneficial for lookup + activities, it can be a devastating feature for data models that + require data-integrity at all times. For example, a resource + record which recorded the user who was currently logged on at a + terminal might seem to be a useful feature, while cache lag would + tend to make the data inaccurate more often than accurate, thereby + making it useless for its intended purpose. + + Although DNS servers can dictate the length of time that a + resource record is to be held in a cache, this feature depends on + + Hall I-D Expires: December 2003 [page 8] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + several additional requirements. Furthermore, data models which + require the use of low time-to-live settings are generally frowned + upon by the DNS community, as these resource records place a + disproportionate burden on the lookup infrastructure. For these + reasons, DNS is inappropriate for data models which require full- + time and instantaneous data integrity. + + 4.9. World-Readable Data + + DNS does not provide any mechanisms for authenticating users + during the lookup process, nor does it provide any standardized + mechanisms for linking access controls to a resource record. + Without these features, DNS is unsuitable for queries which + require authenticated access on a per-user basis. + + For example, if an application wanted to store contact information + for employees in DNS, access to the data would likely be + restricted to certain people (perhaps allowing the general public + to see some level of anonymous data, while allowing internal + personnel to see greater levels of detail, while allowing the + supervisor to see all of the data). However, this model requires + user-specific authentication for each lookup process, and it also + requires that each resource record have an attribute list that + determined who was allowed to see the data. + + However, DNS does not provide any mechanisms for providing + authentication within the lookup process. Furthermore, such an + effort would require a massive undertaking, which is not very + likely given that there are many other protocols already in place + which already provide similar mechanisms. Similarly, the DNS + protocol does not provide any mechanisms for storing and + exchanging access lists along with resource records. Adding this + information to the standardized resource record structure is not a + simple task, and would likely result in a substantial increase in + message overflow. + + Although some DNS servers currently provide mechanisms for + restricting access based on qualifiers such as the IP address of + the client, it is important to point out that once the resource + records get into a cache outside of the protected scope, the + information is only as secure as that cache. In this regard, a + caching server that resides outside of a firewall can be just as + informative as the DNS servers inside the firewall. In the end, + there is no such thing as "private" information with DNS. All data + which is stored in DNS should be treated as if it were public + data, visible to all users. + + Hall I-D Expires: December 2003 [page 9] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + + 5. Design Conclusion + + Due to the architectural tradeoffs inherent in the DNS lookup + model, some usage models are better suited to DNS than others. In + particular, DNS is highly efficient at lookups of compact, public + and relatively stable data. Conversely, DNS is unsuitable for + value-based queries or searches, restricted-access data, highly- + dynamic data, or large records and arrays. + + For usage models which require access to those kinds of data, + application protocols such as LDAP or HTTP would be more + appropriate, and would provide greater rewards. + + 6. Going Standards-Track + + Generally speaking, planners and developers can usually define + their own resource record types as part of another standards-track + specification without interference from the DNS community as long + as the functional scope is limited to defining data-structures for + those resource record types. However, there are some cases where + it may be useful or necessary for the DNS community to be involved + with the standardization process. + + In particular, if a DNS resource record type requires a server to + perform some kind of extra processing beyond echoing resource + record data from a database into a message, then the DNS community + should be consulted. For example, requiring that servers provide + additional data outside the answer section of the response message + should be vented with the community. + + Similarly, if a specification requires special structuring of the + message for the benefit of a single service, then the DNS + community should definitely be involved in the discussion, since + any changes to the highly-optimized (binary) message format could + be disastrous in non-obvious ways. + + Requests to reserve portions of the namespace for the use of a + single network service should also be brought to the DNS community + for discussion. + + Finally, if a resource record goes against more than two of the + good-use guidelines put forth throughout this document, then it + would probably be a good idea to consult with the DNS community + over any alternatives which may be available. + + + Hall I-D Expires: December 2003 [page 10] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + In all cases, IANA must be involved in delegating resource record + type codes and mnemonics. + + 7. Security Considerations + + This document does not create any security considerations. + + 8. IANA Considerations + + This document does not create any IANA considerations. + + 9. Author's Address + + Eric A. Hall + ehall@ehsco.com + + 10. Normative References + + [RFC1123] Braden, R. "Requirements for Internet Hosts - + Application and Support", STD 3, RFC 1123, + October 1989. + + [RFC2181] Elz, R., and Bush, R. "Clarifications to the + DNS Specification", RFC 2181, July 1997. + + [STD13] Mockapetris, P. "Domain names - concepts and + facilities", STD 13, RFC 1034 and "Domain + names - implementation and specification", STD + 13, RFC 1035, November 1987. + + 11. Acknowledgments + + Funding for the RFC editor function is currently provided by the + Internet Society. + + Edward Lewis provided valuable feedback during the development of + this document. + + 12. Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished + to others, and derivative works that comment on or otherwise + explain it or assist in its implementation may be prepared, + copied, published and distributed, in whole or in part, without + restriction of any kind, provided that the above copyright notice + + Hall I-D Expires: December 2003 [page 11] + Internet Draft draft-hall-dns-data-00.txt May 2003 + + + and this paragraph are included on all such copies and derivative + works. However, this document itself may not be modified in any + way, such as by removing the copyright notice or references to the + Internet Society or other Internet organizations, except as needed + for the purpose of developing Internet standards in which case the + procedures for copyrights defined in the Internet Standards + process must be followed, or as required to translate it into + languages other than English. + + The limited permissions granted above are perpetual and will not + be revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on + an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET + ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF + THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED + WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + + + Hall I-D Expires: December 2003 [page 12] From 90df33887f9b68b898a6d388a0ad2807ff9a4bbb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 3 Jun 2003 06:40:22 +0000 Subject: [PATCH 13/75] 1471. [bug] libbind: updated to BIND 8.4.0. --- lib/bind/port_after.h.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index 547fb7eac9..9095982ec8 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -369,12 +369,20 @@ int getnetgrent(char **machinep, char **userp, char **domainp); int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS); +#ifdef SETNETGRENT_ARGS +void setnetgrent(SETNETGRENT_ARGS); +#else void setnetgrent(const char *netgroup); +#endif void endnetgrent(void); +#ifdef INNETGR_ARGS +int innetgr(INNETGR_ARGS); +#else int innetgr(const char *netgroup, const char *machine, const char *user, const char *domain); +#endif #ifdef NGR_R_ENT_ARGS NGR_R_SET_RETURN From 5c526acb82c882e41b655c31f5fa4425c87b671c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 4 Jun 2003 00:27:55 +0000 Subject: [PATCH 14/75] import of idnkit 1.0 from JPNIC see http://www.nic.ad.jp/en/idn/index.html --- contrib/idn/idnkit-1.0-src/ChangeLog | 856 ++ contrib/idn/idnkit-1.0-src/DISTFILES | 191 + contrib/idn/idnkit-1.0-src/INSTALL | 309 + contrib/idn/idnkit-1.0-src/INSTALL.ja | 310 + contrib/idn/idnkit-1.0-src/LICENSE.txt | 39 + contrib/idn/idnkit-1.0-src/Makefile.in | 79 + contrib/idn/idnkit-1.0-src/NEWS | 186 + contrib/idn/idnkit-1.0-src/README | 159 + contrib/idn/idnkit-1.0-src/README.ja | 151 + contrib/idn/idnkit-1.0-src/acconfig.h | 53 + contrib/idn/idnkit-1.0-src/aclocal.m4 | 472 + contrib/idn/idnkit-1.0-src/config.guess | 1317 +++ contrib/idn/idnkit-1.0-src/config.sub | 1411 +++ contrib/idn/idnkit-1.0-src/configure | 3517 ++++++++ contrib/idn/idnkit-1.0-src/configure.in | 711 ++ .../idn/idnkit-1.0-src/include/Makefile.in | 65 + .../idn/idnkit-1.0-src/include/config.h.in | 181 + .../idn/idnkit-1.0-src/include/config.h.win | 45 + .../idnkit-1.0-src/include/idn/Makefile.in | 103 + .../idnkit-1.0-src/include/idn/aliaslist.h | 114 + contrib/idn/idnkit-1.0-src/include/idn/api.h | 298 + .../idn/idnkit-1.0-src/include/idn/assert.h | 61 + .../idn/idnkit-1.0-src/include/idn/checker.h | 171 + .../idnkit-1.0-src/include/idn/converter.h | 258 + .../idn/idnkit-1.0-src/include/idn/debug.h | 69 + .../idnkit-1.0-src/include/idn/delimitermap.h | 123 + .../idn/idnkit-1.0-src/include/idn/export.h | 58 + .../idnkit-1.0-src/include/idn/filechecker.h | 136 + .../idnkit-1.0-src/include/idn/filemapper.h | 137 + .../include/idn/localencoding.h | 79 + contrib/idn/idnkit-1.0-src/include/idn/log.h | 107 + .../idn/idnkit-1.0-src/include/idn/logmacro.h | 72 + .../idn/idnkit-1.0-src/include/idn/mapper.h | 159 + .../idnkit-1.0-src/include/idn/mapselector.h | 165 + .../idn/idnkit-1.0-src/include/idn/nameprep.h | 185 + .../idnkit-1.0-src/include/idn/normalizer.h | 155 + .../idn/idnkit-1.0-src/include/idn/punycode.h | 70 + contrib/idn/idnkit-1.0-src/include/idn/race.h | 72 + contrib/idn/idnkit-1.0-src/include/idn/res.h | 309 + .../idn/idnkit-1.0-src/include/idn/resconf.h | 323 + .../idn/idnkit-1.0-src/include/idn/result.h | 86 + .../idn/idnkit-1.0-src/include/idn/strhash.h | 123 + contrib/idn/idnkit-1.0-src/include/idn/ucs4.h | 103 + .../idn/idnkit-1.0-src/include/idn/ucsmap.h | 131 + .../idn/idnkit-1.0-src/include/idn/ucsset.h | 145 + .../idn/idnkit-1.0-src/include/idn/unicode.h | 164 + .../idnkit-1.0-src/include/idn/unormalize.h | 86 + contrib/idn/idnkit-1.0-src/include/idn/utf8.h | 137 + contrib/idn/idnkit-1.0-src/include/idn/util.h | 98 + .../idn/idnkit-1.0-src/include/idn/version.h | 70 + .../idnkit-1.0-src/include/mdn/Makefile.in | 83 + contrib/idn/idnkit-1.0-src/include/mdn/api.h | 91 + .../include/mdn/localencoding.h | 49 + contrib/idn/idnkit-1.0-src/include/mdn/log.h | 92 + contrib/idn/idnkit-1.0-src/include/mdn/res.h | 121 + .../idn/idnkit-1.0-src/include/mdn/resconf.h | 150 + .../idn/idnkit-1.0-src/include/mdn/result.h | 97 + contrib/idn/idnkit-1.0-src/include/mdn/utf8.h | 70 + .../idn/idnkit-1.0-src/include/mdn/version.h | 66 + contrib/idn/idnkit-1.0-src/install-sh | 250 + contrib/idn/idnkit-1.0-src/lib/Makefile.in | 309 + contrib/idn/idnkit-1.0-src/lib/aliaslist.c | 355 + contrib/idn/idnkit-1.0-src/lib/aliaslist.sh | 35 + contrib/idn/idnkit-1.0-src/lib/api.c | 257 + contrib/idn/idnkit-1.0-src/lib/checker.c | 446 + contrib/idn/idnkit-1.0-src/lib/converter.c | 1244 +++ contrib/idn/idnkit-1.0-src/lib/debug.c | 267 + contrib/idn/idnkit-1.0-src/lib/delimitermap.c | 268 + contrib/idn/idnkit-1.0-src/lib/filechecker.c | 261 + contrib/idn/idnkit-1.0-src/lib/filemapper.c | 347 + .../idn/idnkit-1.0-src/lib/idn.conf.sample.in | 61 + .../idn/idnkit-1.0-src/lib/localencoding.c | 123 + contrib/idn/idnkit-1.0-src/lib/log.c | 215 + contrib/idn/idnkit-1.0-src/lib/make.wnt | 279 + contrib/idn/idnkit-1.0-src/lib/mapper.c | 482 + contrib/idn/idnkit-1.0-src/lib/mapselector.c | 375 + contrib/idn/idnkit-1.0-src/lib/nameprep.c | 357 + .../idnkit-1.0-src/lib/nameprep_template.c | 137 + contrib/idn/idnkit-1.0-src/lib/nameprepdata.c | 2546 ++++++ contrib/idn/idnkit-1.0-src/lib/normalizer.c | 439 + contrib/idn/idnkit-1.0-src/lib/punycode.c | 434 + contrib/idn/idnkit-1.0-src/lib/race.c | 427 + contrib/idn/idnkit-1.0-src/lib/res.c | 1726 ++++ contrib/idn/idnkit-1.0-src/lib/resconf.c | 1477 +++ contrib/idn/idnkit-1.0-src/lib/result.c | 76 + contrib/idn/idnkit-1.0-src/lib/strhash.c | 283 + .../idn/idnkit-1.0-src/lib/tests/Makefile.in | 304 + .../idnkit-1.0-src/lib/tests/api-init1.tsy | 113 + .../idnkit-1.0-src/lib/tests/api-init2.tsy | 113 + .../idnkit-1.0-src/lib/tests/api-init3.tsy | 117 + .../idnkit-1.0-src/lib/tests/api-init4-1.tsy | 96 + .../idnkit-1.0-src/lib/tests/api-init4-2.tsy | 96 + .../idnkit-1.0-src/lib/tests/api-init4-3.tsy | 102 + .../idnkit-1.0-src/lib/tests/api-init5-1.tsy | 102 + .../idnkit-1.0-src/lib/tests/api-init5-2.tsy | 102 + .../idnkit-1.0-src/lib/tests/api-init5-3.tsy | 109 + contrib/idn/idnkit-1.0-src/lib/tests/api.tsy | 1009 +++ .../idn/idnkit-1.0-src/lib/tests/checker.tsy | 610 ++ .../idn/idnkit-1.0-src/lib/tests/codeset.h | 71 + .../idnkit-1.0-src/lib/tests/converter.tsy | 822 ++ .../idnkit-1.0-src/lib/tests/delimitermap.tsy | 257 + .../idn/idnkit-1.0-src/lib/tests/iconvchk.c | 132 + .../idn/idnkit-1.0-src/lib/tests/mapper.tsy | 497 ++ .../idnkit-1.0-src/lib/tests/mapselector.tsy | 592 ++ .../idn/idnkit-1.0-src/lib/tests/nameprep.tsy | 340 + .../idnkit-1.0-src/lib/tests/normalizer.tsy | 346 + contrib/idn/idnkit-1.0-src/lib/tests/res.tsy | 1026 +++ .../idn/idnkit-1.0-src/lib/tests/resconf.tsy | 1026 +++ contrib/idn/idnkit-1.0-src/lib/tests/setenv.c | 134 + contrib/idn/idnkit-1.0-src/lib/tests/setenv.h | 61 + .../idn/idnkit-1.0-src/lib/tests/testsuite.c | 578 ++ .../idn/idnkit-1.0-src/lib/tests/testsuite.h | 276 + .../idn/idnkit-1.0-src/lib/tests/testutil.c | 83 + .../idn/idnkit-1.0-src/lib/tests/testutil.h | 71 + contrib/idn/idnkit-1.0-src/lib/tests/testygen | 557 ++ contrib/idn/idnkit-1.0-src/lib/tests/ucs4.tsy | 257 + .../idn/idnkit-1.0-src/lib/tests/utffilter | 82 + contrib/idn/idnkit-1.0-src/lib/ucs4.c | 461 + contrib/idn/idnkit-1.0-src/lib/ucsmap.c | 380 + contrib/idn/idnkit-1.0-src/lib/ucsset.c | 368 + contrib/idn/idnkit-1.0-src/lib/unicode.c | 309 + .../idn/idnkit-1.0-src/lib/unicode_template.c | 101 + .../idn/idnkit-1.0-src/lib/unicodedata_320.c | 7916 +++++++++++++++++ contrib/idn/idnkit-1.0-src/lib/unormalize.c | 413 + contrib/idn/idnkit-1.0-src/lib/utf8.c | 276 + contrib/idn/idnkit-1.0-src/lib/util.c | 162 + contrib/idn/idnkit-1.0-src/lib/version.c | 54 + contrib/idn/idnkit-1.0-src/ltconfig | 3114 +++++++ contrib/idn/idnkit-1.0-src/ltmain.sh | 4024 +++++++++ contrib/idn/idnkit-1.0-src/make.wnt | 76 + contrib/idn/idnkit-1.0-src/man/Makefile.in | 116 + contrib/idn/idnkit-1.0-src/man/idn.conf.5.in | 312 + contrib/idn/idnkit-1.0-src/man/libidnkit.3.in | 480 + contrib/idn/idnkit-1.0-src/map/Makefile.in | 75 + contrib/idn/idnkit-1.0-src/map/jp.map | 50 + contrib/idn/idnkit-1.0-src/mkinstalldirs | 40 + .../patch/bind9/bind-9.2.1-patch | 5900 ++++++++++++ .../patch/bind9/bind-9.2.2-patch | 1169 +++ contrib/idn/idnkit-1.0-src/tools/Makefile.in | 65 + .../idnkit-1.0-src/tools/idnconv/Makefile.in | 116 + .../idnkit-1.0-src/tools/idnconv/idnconv.1 | 373 + .../idnkit-1.0-src/tools/idnconv/idnconv.c | 803 ++ .../tools/idnconv/idnslookup.in | 116 + .../idn/idnkit-1.0-src/tools/idnconv/make.wnt | 72 + .../tools/idnconv/selectiveencode.c | 127 + .../tools/idnconv/selectiveencode.h | 70 + .../idn/idnkit-1.0-src/tools/idnconv/util.c | 554 ++ .../idn/idnkit-1.0-src/tools/idnconv/util.h | 96 + contrib/idn/idnkit-1.0-src/tools/make.wnt | 57 + .../idn/idnkit-1.0-src/tools/rpm/idnkit.spec | 142 + .../idnkit-1.0-src/tools/runidn/Makefile.in | 167 + .../idnkit-1.0-src/tools/runidn/resolver.c | 1056 +++ .../idnkit-1.0-src/tools/runidn/resolver.h | 70 + .../idn/idnkit-1.0-src/tools/runidn/runidn.1 | 151 + .../idn/idnkit-1.0-src/tools/runidn/runidn.in | 109 + .../idn/idnkit-1.0-src/tools/runidn/stub.c | 387 + .../idn/idnkit-1.0-src/tools/runidn/stub.h | 94 + contrib/idn/idnkit-1.0-src/util/Makefile | 43 + contrib/idn/idnkit-1.0-src/util/SparseMap.pm | 575 ++ contrib/idn/idnkit-1.0-src/util/UCD.pm | 194 + .../util/generate_nameprep_data.pl | 405 + .../util/generate_normalize_data.pl | 586 ++ contrib/idn/idnkit-1.0-src/win/README.WIN | 17 + contrib/idn/idnkit-1.0-src/wsock/README.txt | 665 ++ contrib/idn/idnkit-1.0-src/wsock/README_j.txt | 717 ++ .../idnkit-1.0-src/wsock/common/checkdll.c | 242 + .../idn/idnkit-1.0-src/wsock/common/convert.c | 180 + .../idn/idnkit-1.0-src/wsock/common/dump.c | 118 + .../idnkit-1.0-src/wsock/common/encoding.c | 271 + .../idn/idnkit-1.0-src/wsock/common/hook.c | 224 + .../idn/idnkit-1.0-src/wsock/common/make.wnt | 102 + .../idn/idnkit-1.0-src/wsock/common/printf.c | 138 + .../idnkit-1.0-src/wsock/common/wrapcommon.h | 109 + .../idnkit-1.0-src/wsock/config/idnconf.tcl | 1123 +++ .../idn/idnkit-1.0-src/wsock/config/make.wnt | 58 + contrib/idn/idnkit-1.0-src/wsock/make.wnt | 97 + .../idn/idnkit-1.0-src/wsock/wsock11/dlldef.h | 86 + .../idnkit-1.0-src/wsock/wsock11/dllfunc.c | 212 + .../idnkit-1.0-src/wsock/wsock11/dllload.c | 63 + .../idnkit-1.0-src/wsock/wsock11/dllmain.c | 96 + .../idnkit-1.0-src/wsock/wsock11/dllstub.c | 1541 ++++ .../idn/idnkit-1.0-src/wsock/wsock11/make.wnt | 98 + .../idnkit-1.0-src/wsock/wsock11/wsock32.def | 87 + .../idn/idnkit-1.0-src/wsock/wsock20/dlldef.h | 123 + .../idnkit-1.0-src/wsock/wsock20/dllfunc.c | 592 ++ .../idnkit-1.0-src/wsock/wsock20/dllload.c | 62 + .../idnkit-1.0-src/wsock/wsock20/dllmain.c | 94 + .../idnkit-1.0-src/wsock/wsock20/dllstub.c | 2168 +++++ .../idn/idnkit-1.0-src/wsock/wsock20/make.wnt | 97 + .../idnkit-1.0-src/wsock/wsock20/ws2_32.def | 120 + 190 files changed, 80519 insertions(+) create mode 100644 contrib/idn/idnkit-1.0-src/ChangeLog create mode 100644 contrib/idn/idnkit-1.0-src/DISTFILES create mode 100644 contrib/idn/idnkit-1.0-src/INSTALL create mode 100644 contrib/idn/idnkit-1.0-src/INSTALL.ja create mode 100644 contrib/idn/idnkit-1.0-src/LICENSE.txt create mode 100644 contrib/idn/idnkit-1.0-src/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/NEWS create mode 100644 contrib/idn/idnkit-1.0-src/README create mode 100644 contrib/idn/idnkit-1.0-src/README.ja create mode 100644 contrib/idn/idnkit-1.0-src/acconfig.h create mode 100644 contrib/idn/idnkit-1.0-src/aclocal.m4 create mode 100755 contrib/idn/idnkit-1.0-src/config.guess create mode 100755 contrib/idn/idnkit-1.0-src/config.sub create mode 100755 contrib/idn/idnkit-1.0-src/configure create mode 100644 contrib/idn/idnkit-1.0-src/configure.in create mode 100644 contrib/idn/idnkit-1.0-src/include/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/include/config.h.in create mode 100644 contrib/idn/idnkit-1.0-src/include/config.h.win create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/aliaslist.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/api.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/assert.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/checker.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/converter.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/debug.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/delimitermap.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/export.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/filechecker.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/filemapper.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/localencoding.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/log.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/logmacro.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/mapper.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/mapselector.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/nameprep.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/normalizer.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/punycode.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/race.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/res.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/resconf.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/result.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/strhash.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/ucs4.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/ucsmap.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/ucsset.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/unicode.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/unormalize.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/utf8.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/util.h create mode 100644 contrib/idn/idnkit-1.0-src/include/idn/version.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/api.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/localencoding.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/log.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/res.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/resconf.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/result.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/utf8.h create mode 100644 contrib/idn/idnkit-1.0-src/include/mdn/version.h create mode 100755 contrib/idn/idnkit-1.0-src/install-sh create mode 100644 contrib/idn/idnkit-1.0-src/lib/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/lib/aliaslist.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/aliaslist.sh create mode 100644 contrib/idn/idnkit-1.0-src/lib/api.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/checker.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/converter.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/debug.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/delimitermap.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/filechecker.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/filemapper.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/idn.conf.sample.in create mode 100644 contrib/idn/idnkit-1.0-src/lib/localencoding.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/log.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/lib/mapper.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/mapselector.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/nameprep.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/nameprep_template.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/nameprepdata.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/normalizer.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/punycode.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/race.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/res.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/resconf.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/result.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/strhash.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init1.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init2.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init3.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init4-1.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init4-2.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init4-3.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init5-1.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init5-2.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api-init5-3.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/api.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/checker.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/codeset.h create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/converter.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/delimitermap.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/iconvchk.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/mapper.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/mapselector.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/nameprep.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/normalizer.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/res.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/resconf.tsy create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/setenv.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/setenv.h create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/testsuite.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/testsuite.h create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/testutil.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/testutil.h create mode 100755 contrib/idn/idnkit-1.0-src/lib/tests/testygen create mode 100644 contrib/idn/idnkit-1.0-src/lib/tests/ucs4.tsy create mode 100755 contrib/idn/idnkit-1.0-src/lib/tests/utffilter create mode 100644 contrib/idn/idnkit-1.0-src/lib/ucs4.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/ucsmap.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/ucsset.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/unicode.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/unicode_template.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/unicodedata_320.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/unormalize.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/utf8.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/util.c create mode 100644 contrib/idn/idnkit-1.0-src/lib/version.c create mode 100755 contrib/idn/idnkit-1.0-src/ltconfig create mode 100644 contrib/idn/idnkit-1.0-src/ltmain.sh create mode 100644 contrib/idn/idnkit-1.0-src/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/man/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/man/idn.conf.5.in create mode 100644 contrib/idn/idnkit-1.0-src/man/libidnkit.3.in create mode 100644 contrib/idn/idnkit-1.0-src/map/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/map/jp.map create mode 100755 contrib/idn/idnkit-1.0-src/mkinstalldirs create mode 100644 contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.1-patch create mode 100644 contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.2-patch create mode 100644 contrib/idn/idnkit-1.0-src/tools/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.1 create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.c create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/idnslookup.in create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.c create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.h create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/util.c create mode 100644 contrib/idn/idnkit-1.0-src/tools/idnconv/util.h create mode 100644 contrib/idn/idnkit-1.0-src/tools/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/tools/rpm/idnkit.spec create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/Makefile.in create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/resolver.c create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/resolver.h create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/runidn.1 create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/stub.c create mode 100644 contrib/idn/idnkit-1.0-src/tools/runidn/stub.h create mode 100644 contrib/idn/idnkit-1.0-src/util/Makefile create mode 100644 contrib/idn/idnkit-1.0-src/util/SparseMap.pm create mode 100644 contrib/idn/idnkit-1.0-src/util/UCD.pm create mode 100755 contrib/idn/idnkit-1.0-src/util/generate_nameprep_data.pl create mode 100755 contrib/idn/idnkit-1.0-src/util/generate_normalize_data.pl create mode 100644 contrib/idn/idnkit-1.0-src/win/README.WIN create mode 100644 contrib/idn/idnkit-1.0-src/wsock/README.txt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/README_j.txt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/checkdll.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/convert.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/dump.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/encoding.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/hook.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/printf.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/common/wrapcommon.h create mode 100644 contrib/idn/idnkit-1.0-src/wsock/config/idnconf.tcl create mode 100644 contrib/idn/idnkit-1.0-src/wsock/config/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/dlldef.h create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/dllfunc.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/dllload.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/dllmain.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/dllstub.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock11/wsock32.def create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/dlldef.h create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/dllfunc.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/dllload.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/dllmain.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/dllstub.c create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/make.wnt create mode 100644 contrib/idn/idnkit-1.0-src/wsock/wsock20/ws2_32.def diff --git a/contrib/idn/idnkit-1.0-src/ChangeLog b/contrib/idn/idnkit-1.0-src/ChangeLog new file mode 100644 index 0000000000..085e3bdaf6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/ChangeLog @@ -0,0 +1,856 @@ +2003-03-16 + * idnkit 1.0 release. + + * DISTFILES, README, README.ja, INSTALL, INSTALL.ja: delete BIND8, + Squid and libiconv patches. + +2003-03-13 + * wsock/config/idnconf.tcl: change the version number to '1.0'. + +2003-03-12 + * Makefile.in, lib/Makefile.in: Add 'make install-config' to + Makefile target. + +2003-03-11 + * patch/bind9/bind-9.2.2-patch: created. + +2003-03-06 + * lib/punycode.c: idn__punycode_encode() outputs an error message + if the input string is over PUNYCODE_MAXINPUT (the value is 3800). + +2003-03-05 + * include/idn/api.h, include/idn/checker.h, + include/idn/nameprep.h, include/idn/res.h, include/idn/version.h, + lib/Makefile.in, lib/checker.c, lib/idn.conf.sample.in, + lib/mapper.c, lib/nameprep.c, lib/nameprepdata.c, + lib/normalizer.c, lib/tests/checker.tsy, lib/tests/mapper.tsy, + lib/tests/nameprep.tsy, lib/tests/normalizer.tsy, + man/idn.conf.5.in, tools/idnconv/idnconv.1, wsock/bin/idn.conf: + Add NAMEPREP version 'RFC3491', and remove 'nameprep-11'. + +2003-02-18 + * lib/tests/api-init1.tsy, lib/tests/api-init2.tsy, + lib/tests/api-init3.tsy, lib/tests/api-init4-1.tsy, + lib/tests/api-init4-2.tsy, lib/tests/api-init4-3.tsy, + lib/tests/api-init5-1.tsy, lib/tests/api-init5-2.tsy, + lib/tests/api-init5-3.tsy, lib/tests/api.tsy, lib/tests/converter.tsy, + lib/tests/res.tsy, lib/tests/punycode.c: Change ACE prefix of Punycode + from `zq--' to `xn--'. + +2003-02-13 + * lib/make.wnt: remove dependencies on obsolete files. + + * INSTALL, INSTALL.ja, configure.in, aclocal.m4: Delete configure's + --with-punycode-prefix option. + +2003-02-05 + * lib/res.c: improve performance when encoding/decoding + loooooooong domain names. + +2003-01-22 + * lib/res.c: idn_res_encodename() and idn_res_decodename() in + libidnkit returns `idn_invalid_name' if local converter is not + available. + +2003-01-20 + * lib/normalize.c, lib/unormalize.c, include/idn/unormalize.h, + lib/tests/normalizer.tsy: unicode-form-c or unicode-form-c/3.2.0 is + no longer supported. + + * lib/mapselector.c, lib/tests/mapselector.tsy: + idn_mapselector_add() outputs an error message if invalid scheme + name or TLD is given. + + * lib/checker.c, lib/normalizer.c, lib/mapselector.c, lib/res.c: + modify error messages. + + * lib/result.c: modify an error message for `idn_invalid_length'. + +2003-01-16 + * lib/checker.c, lib/idn.conf.sample.in, lib/mapper.c, lib/nameprep.c, + lib/normalizer.c, lib/unicode.c, lib/tests/checker.tsy, + lib/tests/mapper.tsy, lib/tests/nameprep.tsy, lib/tests/normalizer.tsy, + man/idn.conf.5.in, tools/idnconv/idnconv.1: + delete support for nameprep-03 and nameprep-09. + + * lib/unicodedata_301.c, lib/unicodedata_310.c, DISTFILES: + unicodedata_301.c and unicodedata_310.c are removed. + +2003-01-14 + * tools/idnconv/idnconv.c, tools/idnconv/util.c, tools/idnconv/util.h: + remove the restriction on the length of input lines. idnconv can + now handle very long lines. + +2003-01-10 + * lib/converter.c: fix a bug in extending intermediate buffer + in converter_iconv_convtoucs4(), which causes incorrect + codeset conversion when the input string is very long. + +2002-12-06 + * idnkit 1.0pr2 release (preview release). + +2002-12-03 + * lib/mapper.c, lib/normalize.c: Don't check whether an input string + is STD3 ASCII label. + lib/res.c: Skip localmap if the string is STD3 ASCII label. + +2002-12-02 + * lib/tests/iconvchk.c, lib/tests/Makefile.in: enable to check + whether codeset names "eucJP" and "SJIS" are available in iconv. + +2002-12-01 + * tools/runidn/stub.c: use RTLD_NEXT for dlsym() if it is available. + +2002-11-29 + * almost all files: change the license terms. + +2002-11-25 + * lib/tests/codeset.h: define character encoding names here. + * lib/tests/api-init1.tsy, lib/tests/api-init2.tsy, + lib/tests/api-init3.tsy, lib/tests/api-init4-3.tsy, + lib/tests/api-init5-3.tsy, lib/tests/converter.tsy, + lib/tests/mapselector.tsy, lib/tests/resconf.tsy: include `codeset.h'. + lib/tests/api-init4-1.tsy, lib/tests/api-init4-2.tsy, + lib/tests/api-init5-1.tsy, lib/tests/api-init5-2.tsy, + lib/tests/mapselector.tsy, lib/tests/resconf.tsy: + Delete the unused cpp macro EUCJP_ENCODING_NAME. + * INSTALL, INSTALL.ja: describe `lib/tests/codeset.h'. + + * lib/converter.c: Fix bugs in converter_uescape_convfromucs4() + and converter_uescape_convtoucs4() that libidnkit might crash + when `from' is very long. + +2002-11-15 + * Makefile.in: `make distclean' also removes `libtool'. + +2002-10-25 + * lib/resconf.c: enable the IDN_CONVERTER_RTCHECK flag when it + calls idn_converter_create(). + * tools/idnconv/util.c: enable the IDN_CONVERTER_RTCHECK flag + when it calls idn_converter_setlocalconvertername() or + idn_converter_setidnconvertername(). + +2002-09-20 + * wsock/README.txt, wsock/README_j.txt: add description on + "Force local DLL reference" button. + +2002-09-19 + * idnkit 1.0pr1 release (preview release). + +2002-09-13 + * README, README.ja: update URIs. + + * lib/Makefile.in, lib/tests/Makefile.in: generate libidntest and + libidntestlite for test programs. + +2002-09-09 + * wsock/wsock11/dlldef.h, wsock/wsock11/dllfunc.c, + wsock/wsock11/dllload.c, wsock/wsock11/dllmain.c, + wsock/wsock20/dlldef.h, wsock/wsock20/dllfunc.c, + wsock/wsock20/dllload.c, wsock/wsock20/dllmain.c: take out + DLL load/unload from DllMain(). load/unload is delayed until + it is really necessary. + * wsock/common/checkdll.c, wsock/common/wrapcommon.h: move DLL + load/unload functions from wsock/{ws11,ws20}/dllmain.c. + * wsock/printf.c: make logging more effective. + + * DISTFILES: remove wsock/common/dllmain.c, which is no longer used. + +2002-09-05 + * lib/mapper.c: fix a bug that idn_mapper_add(ctx, "filemap") aborts. + +2002-09-04 + * lib/nameprep.c: GCC says that a variable declared in + idn_nameprep_isvalidbidi() might be used uninitialized. Fixed. + + * wsock/common/convert.c, wsock/common/printf.c, + wsock/common/wrapcommon.h: always reset log output callback procedure + before calling idnkit library functions. + * wsock/wsock11/dllmain.c, wsock/wsock20/dllmain.c: reset + log output callback before unloading. + +2002-09-03 + * lib/tests/testygen, lib/tests/testsuite.c, lib/tests/testsuite.h: + add verbose and partial exec modes. + +2002-08-29 + * idnkit 020829 snapshot release. + +2002-08-28 + * lib/tests/testygen: fix generation of main(). It didn't destroy + a testsuite context. + * lib/tests/testsuite.c: fix a double free bug in + idn_testsuite_destroy(). + + * lib/filemapper.c: fix one memory leak in read_file(). + * lib/filemapper.c: fix buffer expansion bug in ucsbuf_grow(). + * lib/res.c: plug up memory leak in idn_res_decodename(). + + * lib/tests/setenv.c: fix memory leak bug. + + * lib/filemapper.c, lib/ucsmap.c, lib/ucsset.c: fix misuse of + realloc(). + + * lib/converter.c: plug up memory leak in + converter_iconv_openfromucs4() and converter_iconv_opentoucs4(). + +2002-08-27 + * lib/tests/Makefile.in: support the case where the build directory + is different from the source directory. + + * lib/tests/Makefile.in: perform tests for lite library only if + `--enable-liteonly' has been specified at configuration. + + * lib/tests/setenv.c, lib/tests/setenv.h, lib/tests/Makefile.in, + configure.in: support systems which lack setenv() and/or unsetenv(). + + * configure.in, lib/Makefile.in, lib/idn.conf.sample, INSTALL, + INSTALL.ja: delete `--with-preference'. + +2002-08-26 + * lib/tests/testygen: new option `-L', which suppresses `#line' + cpp lines on output. + + * DISTFILES: Add files for tests. + * INSTALL, INSTALL.ja: add the `Test' section. + + * lib/resconf.c: fix trace message of idn_resconf_create(). + + * win/README.WIN: update the contents. + + * wsock/config/idnconf.tcl: do not display `force local DLL + reference' button on Windows 95 and NT, since it is meaningless + for these old OSes. + +2002-08-22 + * lib/mapper.c, lib/normalizer.c: add the procedure for the case + that ctx->nschems is 0 to idn_mapper_map() and + idn_normalizer_normalize(). + + * lib/delimitermap.c: idn_delimitermap_add() and + idn_delimitermap_addall() reject a request to add an invalid + codepoint. + +2002-08-21 + * lib/api.c: fix a bug that api_nameinit() didn't call + idn_resconf_initialize(). + * lib/api.c: don't set the `ininitialized' flag if idn_nameinit() + returns with an error. + * lib/api.c, include/idn/api.h: add idn__setconffile(). + + * lib/mapselector.c: idn_mapselector_map() and idn_mapselector_map2() + now accept `tld' beginning with a dot. + +2002-08-20 + * wsock/common/checkdll.c: back out 0812 change because the check + method doesn't seem to work correctly on WinMe. + * wsock/wsock11/dllload.c, wsock/wsock20/dllload.c: add some trace + statements. + * wsock/config/idnconf.tcl: do not install winsock2 wrapper on + Win98/Me. + + * lib/tests/testsuite.c, lib/tests/testsuite.h, lib/tests/testygen: + exit the testcase if ASSERT fails. + + * lib/tests/testsuite.c, lib/tests/testsuite.h: + replace ASSERT_PTRNOTNULL with ASSERT_PTR_NE. + + * lib/tests/testutil.c, lib/testuil.h: new file. + It provides create_conf_file(). + +2002-08-19 + * lib/resconf.c: if application calls idn_resconf_create() before + idn_resconf_initialize(), idnkit returns `idn_failure'. + +2002-08-15 + * lib/tests/testsuite.c, lib/tests/testsuite.h, lib/tests/testygen: + add two assertion macros: ASSERT_PTR and ASSERT_PTRNOTNULL. + + * lib/converter.c: fix some warning messages. + +2002-08-14 + * lib/resconf.c: fix a but that idnkit aborts if a line in config + file lacks an argument. + + * wsock/common/hook.c, wsock/wsock11/dllfunc.c, wsock/wsock20/dllfunc.c + : make name resolver APIs return the domain name verbatim (instead + of returning error) when name decoding fails. + +2002-08-13 + * lib/Makefile.in, lib/checker.c, lib/converter.c, lib/delimitermap.c, + lib/filechecker.c, lib/filemapper.c, lib/mapper.c, lib/mapselector.c, + lib/nameprep.c, lib/normalizer.c, lib/punycode.c, lib/race.c, + lib/resconf.c, lib/unormalize.c: delete main routines for test. + + * lib/tests/: new directory. + * configure.in: Check for path of perl command. + + * wsock/config/idnconf.tcl: correct OS version check routine. + +2002-08-12 + * lib/make.wnt: change amcacez.* to punycode.*. + * wsock/common/encoding.c, wsock/common/dump.c, wsock/common/convert.c, + wsock/commn/hook.c, wsock/common/printf.c, wsock/common/wrapcommon.h, + wsock/wsock11/dllfunc.c, wsock/wsock11/dllload.c, + wsock/wsock20/dllfunc.c, wsock/wsock20/dllload.c: add extra argument + (specifying buffer length) to some interface functions, in order to + prevent possible buffer overflow. + * wsock/common/printf.c: increase message buffer size. + * wsock/wsock11/dllmain.c, wsock/wsock20/dllmain.c: call initialize + routine before first log output. + * wsock/common/checkdll.c: use light-weight DLL checking using + LoadLibraryEx. + + * lib/res.c: fix bugs in idn_res_encodename(), idn_res_decodename() + and idn_res_decodename2(). They fell into infinite loops when + given `tolen' is 0. + +2002-08-08 + * lib/resconf.c, lib/res.c: remove unused functions and variables. + + * lib/Makefile.in tools/idnconv/Makefile.in, + tools/runidn/Makefile.in: add @CPPFLAGS@ to $(CFLAGS). + + * lib/res.c: idn_res_decodename2() copies `from' to `to' and + returns immediately when the `actions' argument is 0. + +2002-08-07 + * lib/resconf.c: fix a bug in parse_conf() that if `nameprep' or + `idn-encoding' directive is defined twice, default value is set + to the directive. + * lib/resconf.c: cosmetic changes. + delete parse_map(), parse_normalize(), parse_prohibit(), + parse_unassigned() and parse_bidi(). + + * lib/amcacez.c, include/idn/amcacez.h: renamed to lib/punycode.c + and include/idn/punycode.h. + + * include/idn/converter.h, lib/converter.h: define + idn_converter_getrealname() externally instead of statically + defined get_realname(). + +2002-08-06 + * lib/resconf.c: arrange processes of obsolete commands in + idn_res_loadfile(). + + * INSTALL, INSTALL.ja, man/idn.conf.5.in, tools/idnconv/idnconv.1: + remove description of RACE and AMC-ACE-Z. + + * lib/resconf.c: fix a bug in handling of local-converter. + + * lib/converter.c: add initialization check in + idn_converter_aliasfile() and idn_converter_resetalias(). + + * lib/converter.c: free context memory at some right places in + idn_converter_create(). + +2002-08-05 + * configure.in, lib/Makefile.in, lib/aliaslist.sh: also add the + "UTF-8" entry if --with-utf8=NAME option of configure is specified, + and NAME is not "UTF-8". + + * tools/idnconv/idnconv.c: call idn_converter_destroy() after + idn_resconf_getidnconverter() and idn_resconf_getlocalconverter() + in main(). + + * lib/res.c: fix a bug in idn_res_decodename2(). + When the function called idn_res_decodename(), assertion check in + idn_res_decodename() may have failed. + + * lib/res.c: call idn_delimitermap_destroy() after + idn_resconf_getdelimitermap() in idn_res_encodename() and + idn_res_decodename(). + +2002-08-02 + * lib/res.c: fix mismatched pointer type in idn_res_decodename2(). + * lib/res.c: fix a bug in handling of `auxencoding', in + idn_res_decodename2(). + +2002-08-01 + * lib/resconf.c: fix two memory leaks in parse_conf(). + + * lib/aliaslist.c: fix an error of size measurement in + create_item(). + +2002-07-31 + * lib/converter.c: AMC-ACE-Z and RACE are now extra ACE. + +2002-07-30 + * idnkit 020730 snapshot release. + + * lib/resconf.c: fix a bug in idn_resconf_create() that it + misses initializing `ctx->bidi_checker'. + +2002-07-29 + * tools/idnconv/idnconv.1: describe bidi character check. + +2002-07-24 + * lib/resconf.c: force to add bidi checker at parsing nameprep + entry in config file. + +2002-07-19 + * include/idn/checker.h, include/idn/nameprep.h, + include/idn/res.h, include/idn/resconf.h, man/idn.conf.5.in, + man/libidnkit.3.in, lib/checker.c, lib/nameprep.c, lib/res.c, + lib/resconf.c, tools/idnconv/idnconv.c: add bidirectional label + check routine. + + * include/idn/api.h, include/idn/res.h, lib/api.c, lib/res.c, + tools/idnconv/idnconv.c, tools/idnconv/util.c, + tools/idnconv/util.h: change the type of action flag at conversion + functions and define it as ``idn_action_t''. + +2002-07-18 + * wsock/config/idnconf.tcl: implement .exe.local file + creation/deletion feature. + * lib/make.wnt: update list of files according to the recent + changes of the library. + +2002-07-12 + * include/idn/nameprpe.h: define idn_biditype_t. + * lib/nameprep_template.c, lib/nameprep.c: support for bidi type + check is added. + +2002-07-11 + * idnkit 020711 snapshot release. + +2002-07-09 + * man/Makefile.in, man/idn.conf.5.in: force to make and install + manpage of idnalias.conf (merely a copy of idn.conf's manpage). + +2002-07-08 + * DISTFILES: `lib/dude.c' and `include/idn/dude.h' are removed. + * DISTFILES: `util/Makefile' is added. + + * tools/idnconv/idnconv.c: fix typo in decode_file(). + + * tools/idnconv/idnconv.c: Support "-reverse -out ACE". + + * lib/res.c: fix bugs in label_idndecode() and label_idnencode_ace(). + If UCS4 to UTF-8 conversion is failed with idn_buffer_overflow, + we must extends the size of local buffer and try the conversion + again. + +2002-07-05 + * tools/idnconv/idnconv.c: treat input as the string of the local + encoding specified by "-out" option at reverse conversion. + + * include/idn/api.h, lib/api.c: add idn_decodename2() function. + + * include/idn/res.h, lib/res.c: add idn_res_decodename2() + function. + + * include/idn/res.h, lib/res.c: restore IDN_DELIMMAP flag. + +2002-07-02 + * lib/unicodedata_320.c, lib/checker.c, lib/idn.conf.sample.in, + lib/mapper.c, lib/nameprep.c, lib/nameprepdata.c, lib/normalizer.c, + lib/unicode.c, unicodedata_320.c, include/idn/nameprep.c, DISTFILES, + man/idn.conf.5.in: Support NAMEPREP-11 which adopts Unicode-3.2. + Support for NAMEPREP-06, -08, -09 are removed. + +2002-07-01 + * tools/idnconv/idnconv.1: added `-A' option. + + * include/idn/res.h, lib/res.c: redefine IDN_ENCODE_QUERY, + IDN_DECODE_QUERY, IDN_ENCODE_STORED, IDN_DECODE_STORED, IDN_ENCODE_APP + and IDN_DECODE_APP. + +2002-06-26 + * lib/resconf.c, include/idn/resconf.h: define + idn_resconf_getauxidnconverter(), idn_resconf_setauxidnconverter() + and idn_resconf_setauxidnconvertername(). + +2002-06-20 + * lib/res.c: use action flags at round trip check. + +2002-06-19 + * include/idn/res.h, lib/res.c: remove IDN_UNASCHECK flag from + IDN_NAMEPREP. + + * include/idn/res.h, lib/res.c: add IDN_ENCODE_QUERY, + IDN_DECODE_QUERY, IDN_ENCODE_STORED, and IDN_DECODE_STORED flags. + + * include/idn/res.h, lib/res.c: IDN_ENCODE_APP and IDN_DECODE_APP + have same value as flags for conversion of the query string + (IDN_ENCODE_QUERY and IDN_DECODE_QUERY) now. + +2002-06-17 + * include/idn/Makefile.in, lib/Makefile.in, lib/converter.c, + tools/runidn/Makefile.in, configure, INSTALL, INSTALL.ja: + delete DUDE support. + * include/idn/dude.h, lib/dude.c: deleted. + + * README, README.ja: update URL of mdnkit FAQ. + + * include/idn/res.h, lib/res.c, lib/idn.conf.sample.in, + lib/delimitermap.c, man/libidnkit.3.in: add default delimiters + defined in IDNA specification and always forced to do delimiter + mapping. + + * lib/resconf.c, man/idn.conf.5.in: remove "delimiter-map" entry + support of configuration file. + + * tools/idnconv/idnconv.c, tools/idnconv/idnconv.1: remove + "-delimiter-map" and "-d" options. + +2002-06-13 + * wsock/common/encoding.c: fix registry key setting so that + it matches what documents say. + +2002-06-11 + * include/idn/delimitermap.h: remove idn_delimitermap_fix() + declaration. + +2002-06-10 + * wsock/wsock2/dllfunc.c: fix a bug which makes wrapping of + getaddrinfo()/getnameinfo() always fail. + +2002-06-05 + * wsock/wsock2/dllfunc.c, wsock/wsock2/dllstub.c, + wsock/wsock2/ws2_32.def: add new APIs introduced by WinXP. + +2002-05-22 + * tools/idnconv/util.c: reset alias information before loading + alias information file. + +2002-05-20 + * idnkit 1.0rc1 release. + + * include/idn/res.h: fix typo in a comment. + +2002-05-17 + * include/idn/version.h: set IDNKIT_VERSION to "1.0rc1". + +2002-05-13 + * tools/rpm/mdnkit.spec: renamed to idnkit.spec, and revised + for idnkit-1.0. + +2002-05-09 + * tools/idnconv/idnconv.c: now `idnconv -r' can convert a file + from ACE to ACE. + +2002-05-08 + * lib/idn.conf.sample.in: delete "encoding-alias-file" entry + because idnkit does not support it any longer. + + * lib/nameprepdata.c lib/nameprep.c, lib/mapper.c, lib/normalizer.c, + lib/checker.c, lib/idn.conf.sample.in, man/idn.conf.5.in, + tools/idnconv/idnconv.1: support NAMEPREP-09. + + * lib/mapper.c, lib/normalizer.c, lib/checker.c, lib/mapselector.c, + * lib/res.c, lib/race.c: spmplify local buffer managements. + + * tools/idnconv/idnconv.c, tools/idnconv/util.c, tools/idnconv/util.h: + fix a bug that wrong local encoding is set to a resconf context. + +2002-05-07 + * tools/idnconv/util.c: delete set_reverse_context(). + * tools/idnconv/idnconv.c: fix a serious bug in -reverse conversion. + +2002-05-04 + * include/idn/util.h, lib/converter.c, lib/resconf.c, lib/util.c: + simplify Windows registry retrieval function interface. + * wsock/common/convert.c, wsock/common/dump.c, + wsock/common/encoding.c, wsock/common/wrapcommon.h: fix type + conflicts. + * wsock/wsock11/dlldef.h, wsock/wsock11/dllmain.c, + wsock/wsock20/dlldef.h, wsock/wsock20/dllmain.c: fix typo. + * wsock/common/jpnicmdn.def, wsock/common/jpnicmdn.h, + wsock/config/mdnconf.tcl: removed. + * DISTFILES: add new files, remove obsolete files. + +2002-05-02 + * tools/idnconv/util.c: create a new function set_reverse_context(). + * tools/idnconv/idnconv.c: fix a bug in handing of reference count + of idn_resconf_t contexts. + + * lib/amcacez.c, lib/race.c, lib/dude.c, lib/delimitermap.c, + lib/checker.c, lib/mapper.c, lib/mapselector.c, lib/converter.c, + lib/normalizer.c, lib/res.c, lib/ucs4.c, lib/debug.c, + include/idn/debug.h: output valuable trace logs for developpers. + + * lib/res.c: fix double free bugs. + + * lib/checker.c, include/idn/checker.h: for symbols of the checker + module, use `idn_' prefix instead of `idn__' by default. + + * wsock/common/checkdll.c, wsock/common/convert.c, + wsock/common/dump.c, wsock/common/encoding.c, wsock/common/hook.c, + wsock/common/printf.c, wsock/common/make.wnt, + wsock/wsock11/dlldef.h, wsock/wsock11/dllfunc.c, + wsock/wsock11/dllload.c , wsock/wsock11/dllmain.c, + wsock/wsock11/dllstub.c, wsock/wsock11/make.wnt, + wsock/wsock20/dlldef.h, wsock/wsock20/dllfunc.c, + wsock/wsock20/dllload.c , wsock/wsock20/dllmain.c, + wsock/wsock20/dllstub.c, wsock/wsock20/make.wnt: adapt idnkit + interface, change name from `mDN Wrapper' to `idn wrapper'. + * wsock/common/wrapcommon.h: created. + * wsock/config/idnconf.tcl: created. + +2002-05-01 + * include/idn/util.h, lib/converter.c, lib/resonf.c, lib/util.c: + Move alias information initialization scheme from the resconf + context initialization to the converter module initialization. + + * tools/idnconv/idnconv.c: fix a bug in main(). + Wrong localconverer/idnconverter may be set to resconf2. + +2002-04-30 + * lib/res.c, tools/idnconv/idnconv.c: accept non-ace encoding as + idn-encoding and ace encoding as local-encoding at normal conversion. + +2002-04-23 + * man/idn.conf.5.in: use the term "unassigned codepoint", not + "unassigned character". + +2002-04-19 + * include/idn/api.h, include/idn/res.h: + delete cpp macros for backward compatibility, since they are defined + in include/mdn/api.h and include/mdn/res.h. + + * include/idn/checker.h, include/idn/converter.h, + include/idn/delimitermap.h, include/idn/filechecker.h, + include/idn/filemapper.h, include/idn/mapper.h, + include/idn/mapselector.h, include/idn/nameprep.h, + include/idn/normalizer.h, include/idn/unormalize.h: + fix obsolete descriptions. + +2002-04-17 + * idnkit 1.0beta2 release. + +2002-04-16 + * configure.in: check AC_FIND_SYSTEM_SHOBJ(libnsl), + AC_CHECK_LIB(socket, socket) and AC_CHECK_LIB(nsl, inet_addr) + in case of --enable-runidn. + +2002-04-15 + * tools/idnconv/idnconv.1: fix the "REVERSE CONVERSION MECHANISM" + section. + +2002-04-12 + * lib/res.c, include/idn/res.h: rename `idn_res_actionstostring()' + to `idn__res_actionstostring()'. + * lib/mapper.c, lib/checker.c, lib/converter.c: output trace log + which shows scheme a name the module is going to perform. + +2002-04-10 + * man/idn.conf.5.in: delete the "SETFILE SECTION". + +2002-04-09 + * tools/runidn/resolver.c: call idn_nameinit() and then call + idn_encodename() or idn_decodename(). + +2002-04-08 + * include/idn/export.h: created. + * include/idn/Makefile.h, DISTFILES: add export.h. + * include/idn/api.h, include/idn/converter.h, include/idn/debug.h, + include/idn/delimitermap.h, include/idn/localencoding.h, + include/idn/log.h, include/idn/mapper.h, include/idn/mapselector.h, + include/idn/nameprep.h, include/idn/normalizer.h, include/idn/res.h, + include/idn/resconf.h, include/idn/result.h, include/idn/ucs4.h, + include/idn/ucsmap.h, include/idn/ucsset.h, include/idn/unormalize.h, + include/idn/utf8.h, include/idn/version.h: include export.h. mark + exportable functions with IDN_EXPORT macro. + * lib/make.wnt: modify to create DLLs. + * configure.in: add existance check for pwd.h. + * configure, include/config.h.in: rebuilt. + * lib/resconf.c, lib/localencoding.c: port to Win32. + * include/mdn/version.h: include for the declaration + of idn_version_getstring(). + * tools/make.wnt, tools/idnconv/make.wnt: created. + * make.wnt: add tools subdirectory. + * DISTFILES: add tools/make.wnt and tools/idnconv/make.wnt. + + * include/idn/mapselector.h, lib/mapselector.c: + add idn_mapselector_getnotld() and idn_mapselector_getdefaulttld(). + Instead delete idn_mapselector_no_tld and idn_mapselector_default. + + * lib/api.c, include/mdn/api.h: define mdn_nameinit(), + mdn_encodename() and mdn_decodename(). + + * DISTFILES: delete `patch/bind8/bind-8.2.3-patch' and + `tools/rpm/mdnsproxy.init'. + + * include/idn/aliaslist.h, include/idn/converter.h, + lib/aliaslist.c, lib/converter.c: enable to add an alias + information item to either top or bottom of the alias information + list. + +2002-04-05 + * include/idn/resconf.h, lib/resconf.c: add + idn_resconf_setdefaults(). + * lib/resconf.c: call idn_converter_aliasfile() at parsing the + default alias information file automatically. + * include/idn/api.h, lib/api.c: modify api_nameinit() to enable to + choose initialization scheme. + + * tools/idnconv/idnconv.c, tools/idnconv/idnconv.1: delete `-map', + `-normalize', `-prohibit' and `-unassigned' options. + * tools/idnconv/idnconv.c: use default configuration if `-noconf' + is specified. + +2002-04-04 + * tools/idnconv/idnconv.1: fix obsolete description. + * tools/runidn/runidn.1: likewise. + +2002-04-02 + * configure.in: add --enable-mdnkit-compat option. + * include/mdn/Makefile.in, include/mdn/api.h, + include/mdn/localencoding.h, include/mdn/log.h, include/mdn/res.h, + include/mdn/resconf.h, include/mdn/result.h, include/mdn/utf8.h, + include/mdn/version.h: re-added. + * include/Makefile.in: add `idn' to SUBDIRS. + * lib/Makefile.in, tools/idnconv/Makefile.in, tools/runidn/Makefile.in, + man/Makefile.in: support --enable-mdnkit-compat. + * lib/localencoding.c, lib/resconf.c: ditto. + * INSTALL: ditto. + + * Makefile.in, include/Makefile.in, include/idn/Makefile.in, + include/mdn/Makefile, lib/Makefile.in, tools/Makefile.in, + tools/idnconv/Makefile.in, tools/runidn/Makefile.in, + man/Makefile.in, map/Makefile.in: support DESTDIR and distclean. + +2002-03-28 + * include/idn/api.h: enclose the contents with `extern "C" {...}' + if C++ compiler is used. + +2002-03-27 + * man/Makefile.in: generate and install idnrc.5. + * man/idn.conf.5.in: describe the user configuration file ~/.idnrc. + + * tools/idnconv/idnconv.1: add missing description of -nolengthcheck, + -noasciicheck and -noroundtrip options. + + * lib/checker.c, lib/mapper.c, lib/normalizer.c, + lib/idn.conf.sample.in, tools/idnconv/idnconv.1, man/idn.conf.5.in: + Add nameprep-08 support, and delete -05 and -07 instead. + +2002-03-26 + * idnkit 1.0beta1 release. + + * NEWS: add description about Major changes in mDNkit 2.3, 2.3.1, + 2.4. + * NEWS: add description about Major changes in idnkit + version1.0beta1. + +2002-03-25 + * DISTFILES: add bind-8.3.1-patch and bind-9.2.0-patch. + delete bind-9.1.3-patch. + +2002-03-22 + * lib/mapselector.c: fix a bug in handling of the special TLD `-'. + +2002-03-20 + * lib/converter.c: fix a bug in idn_converter_convtoucs4(). + + * lib/res.c: fix a bug that IDN_LENCHECK overlook an empty label + generated by nameprep-map or localmap (e.g. "XXX.\u{200b}"). + * lib/res.c: fix a bug that libidnkit aborts when it decodes "." + + * lib/Makefile.in, tools/runidn/Makefile.in: change library + version. + * include/idn/version.h: set version `1.0beta1'. + + * configure, configure.in: modify some error messages. + +2002-03-19 + * man/idn.conf.5.in, lib/idn.conf.sample.in, tools/idnconv/idnconv.1: + delete DUDE from a list of supported encodings. + + * lib/aliaslist.c, lib/debug.c, lib/strhash.c, lib/ucs4.c: they are + private modules. + + * include/idn/resolver.h: moved to tools/runidn/resolver.h. + + * tools/runidn/Makefile.in, tools/idnconv/Makefile.in: + insert `-I$(srcdir)' into INCS. + +2002-03-18 + * aclocal.m4, configure, configure.in, include/config.h.in, + Makefile.in, map/Makefile.in, src/lib/idn.conf.sample.in, + tools/idnconv/selectiveencode.h: replace `MDN' with `IDN'. + + * lib/aliaslist.c: change WARNING message into INFO message when + idn_aliaslist_aliasfile() finds an error in alias information + file. + * lib/resconf.c: change user configuration file name. + * lib/resconf.c: add procedure to check the existence of default + alias information file before letting converter parse the file. + * lib/resconf.c: call idn_converter_aliasfile() even when basic + configuration files are not found at all. + + * tools/idnconv/idnconv.c: use hexadecimal numbers for values + associated with FLAGS_ macros. + + * include/idn/result.h, lib/result.c: rename `idn_too_long' to + `idn_invalid_length'. + * lib/res.c: In IDN_LENCHECK, return `idn_invalid_length' for an + empty label, but return `idn_success'' for the "." domain name. + + * lib/converter.c: DUDE is now extra ACE. + + * lib/mapselector.c, include/idn/mapselector.h: change types of + `idn_mapselector_no_tld' and `idn_mapselector_default' from + (const unsigned long []) to (const unsigned long *). + + * DISTFILES: syncronize current source structure. + +2002-03-14 + * configure, configure.in, include/config.h.in: add + `--enable-runidn' option to configure script. Unless the value + for this option is set to `yes', runidn command will not be + complied and installed. + +2002-03-13 + * man/libidnkit.3.in: describe new idnkit API. + * man/idn.conf.5.in: use the term `internationalized' rather than + `multilingual'. + * lib/Makefile.in: create idnalias.conf.sample correctly even if + the object directory is different from the source directory. + +2002-03-12 + * configure, configure.in, lib/Makefile.in: add + `--enable-liteonly' option to configure script and change + description of lib/Makefile.in for designating compilation and + installation of libidnkitlite alone. + +2002-03-08 + * mDNkit is now renamed to idnkit. Also files, directories, + commands and function names are renamed (e.g. mdnconv -> idnconv). + +2002-03-07 + * include/mdn/nameprep.h, lib/nameprep.c, lib/resconf.c: enable + libmdn(lite) to run without configuration file and alias file, and + also enable to support user configuration file. + +2002-03-05 + * include/mdn/aliaslist.h, lib/aliaslist.c: change year + description to `2002' in copyright notice. + * lib/aliaslist.c: fix the initialization scheme of structure's + members at creation of both list item and list itself. + * lib/aliaslist.c: fix the order of function free() call when + an error occurs at list item creation. + * make.wnt: remove descriptions related to mdnsproxy. + +2002-03-04 + * include/mdn/aliaslist.h, include/mdn/amcacez.h, include/mdn/assert.h, + include/mdn/checker.h, include/mdn/converter.h, include/mdn/debug.h, + include/mdn/delimitermap.h, include/mdn/dude.h, + include/mdn/filechecker.h, include/mdn/filemapper.h, + include/mdn/localencoding.h, include/mdn/log.h, include/mdn/logmacro.h, + include/mdn/mapper.h, include/mdn/mapselector.h, + include/mdn/nameprep.h, include/mdn/normalizer.h, include/mdn/race.h, + include/mdn/res.h, include/mdn/resconf.h, include/mdn/resolver.h, + include/mdn/result.h, include/mdn/strhash.h, include/mdn/ucs4.h, + include/mdn/ucsmap.h, include/mdn/ucsset.h, include/mdn/unicode.h, + include/mdn/unormalize.h, include/mdn/utf8.h, include/mdn/util.h, + include/mdn/version.h: enclose the contents with `extern "C" {...}' + if C++ compiler is used. + * DISTFILES, Makefile.in, configure, configure.in: + remove descriptions related to mdnsproxy. + +2002-03-01 + * include/mdn/result.h, lib/result.h: define new error code + `mdn_too_long'. + * lib/res.c: return `mdn_too_long' if MDN_LENCHECK is failed. diff --git a/contrib/idn/idnkit-1.0-src/DISTFILES b/contrib/idn/idnkit-1.0-src/DISTFILES new file mode 100644 index 0000000000..b81eef2e70 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/DISTFILES @@ -0,0 +1,191 @@ +# $Id: DISTFILES,v 1.1 2003/06/04 00:25:02 marka Exp $ +README +README.ja +INSTALL +INSTALL.ja +ChangeLog +DISTFILES +LICENSE.txt +Makefile.in +NEWS +make.wnt +acconfig.h +aclocal.m4 +config.guess +config.sub +ltconfig +ltmain.sh +configure.in +configure +install-sh +mkinstalldirs +include/Makefile.in +include/config.h.in +include/config.h.win +include/idn/Makefile.in +include/idn/aliaslist.h +include/idn/api.h +include/idn/assert.h +include/idn/checker.h +include/idn/converter.h +include/idn/debug.h +include/idn/delimitermap.h +include/idn/export.h +include/idn/filechecker.h +include/idn/filemapper.h +include/idn/localencoding.h +include/idn/log.h +include/idn/logmacro.h +include/idn/mapper.h +include/idn/mapselector.h +include/idn/nameprep.h +include/idn/normalizer.h +include/idn/punycode.h +include/idn/race.h +include/idn/res.h +include/idn/resconf.h +include/idn/result.h +include/idn/strhash.h +include/idn/ucs4.h +include/idn/ucsmap.h +include/idn/ucsset.h +include/idn/unicode.h +include/idn/unormalize.h +include/idn/utf8.h +include/idn/util.h +include/idn/version.h +include/mdn/Makefile.in +include/mdn/api.h +include/mdn/localencoding.h +include/mdn/log.h +include/mdn/res.h +include/mdn/resconf.h +include/mdn/result.h +include/mdn/utf8.h +include/mdn/version.h +lib/Makefile.in +lib/aliaslist.c +lib/api.c +lib/checker.c +lib/converter.c +lib/debug.c +lib/delimitermap.c +lib/filechecker.c +lib/filemapper.c +lib/localencoding.c +lib/log.c +lib/make.wnt +lib/mapper.c +lib/mapselector.c +lib/nameprep.c +lib/nameprep_template.c +lib/nameprepdata.c +lib/normalizer.c +lib/punycode.c +lib/race.c +lib/res.c +lib/resconf.c +lib/result.c +lib/strhash.c +lib/ucs4.c +lib/ucsmap.c +lib/ucsset.c +lib/unicode.c +lib/unicode_template.c +lib/unicodedata_320.c +lib/unormalize.c +lib/utf8.c +lib/util.c +lib/version.c +lib/idn.conf.sample.in +lib/aliaslist.sh +lib/tests/Makefile.in +lib/tests/api-init1.tsy +lib/tests/api-init2.tsy +lib/tests/api-init3.tsy +lib/tests/api-init4-1.tsy +lib/tests/api-init4-2.tsy +lib/tests/api-init4-3.tsy +lib/tests/api-init5-1.tsy +lib/tests/api-init5-2.tsy +lib/tests/api-init5-3.tsy +lib/tests/api.tsy +lib/tests/checker.tsy +lib/tests/codeset.h +lib/tests/converter.tsy +lib/tests/delimitermap.tsy +lib/tests/iconvchk.c +lib/tests/mapper.tsy +lib/tests/mapselector.tsy +lib/tests/nameprep.tsy +lib/tests/normalizer.tsy +lib/tests/res.tsy +lib/tests/resconf.tsy +lib/tests/setenv.c +lib/tests/setenv.h +lib/tests/testsuite.c +lib/tests/testsuite.h +lib/tests/testutil.c +lib/tests/testutil.h +lib/tests/testygen +lib/tests/ucs4.tsy +lib/tests/utffilter +tools/Makefile.in +tools/idnconv/Makefile.in +tools/idnconv/make.wnt +tools/idnconv/idnconv.c +tools/idnconv/selectiveencode.c +tools/idnconv/selectiveencode.h +tools/idnconv/util.c +tools/idnconv/util.h +tools/idnconv/idnconv.1 +tools/idnconv/idnslookup.in +tools/make.wnt +tools/rpm/idnkit.spec +tools/runidn/Makefile.in +tools/runidn/resolver.c +tools/runidn/resolver.h +tools/runidn/stub.c +tools/runidn/stub.h +tools/runidn/runidn.1 +tools/runidn/runidn.in +man/Makefile.in +man/libidnkit.3.in +man/idn.conf.5.in +patch/bind9/bind-9.2.1-patch +patch/bind9/bind-9.2.2-patch +win/README.WIN +wsock/README.txt +wsock/README_j.txt +wsock/make.wnt +wsock/common/checkdll.c +wsock/common/convert.c +wsock/common/dump.c +wsock/common/encoding.c +wsock/common/hook.c +wsock/common/make.wnt +wsock/common/printf.c +wsock/common/wrapcommon.h +wsock/config/make.wnt +wsock/config/idnconf.tcl +wsock/wsock11/dlldef.h +wsock/wsock11/dllfunc.c +wsock/wsock11/dllload.c +wsock/wsock11/dllmain.c +wsock/wsock11/dllstub.c +wsock/wsock11/make.wnt +wsock/wsock11/wsock32.def +wsock/wsock20/dlldef.h +wsock/wsock20/dllfunc.c +wsock/wsock20/dllload.c +wsock/wsock20/dllmain.c +wsock/wsock20/dllstub.c +wsock/wsock20/make.wnt +wsock/wsock20/ws2_32.def +util/Makefile +util/SparseMap.pm +util/UCD.pm +util/generate_nameprep_data.pl +util/generate_normalize_data.pl +map/Makefile.in +map/jp.map diff --git a/contrib/idn/idnkit-1.0-src/INSTALL b/contrib/idn/idnkit-1.0-src/INSTALL new file mode 100644 index 0000000000..64341850cf --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/INSTALL @@ -0,0 +1,309 @@ + + idnkit + Compilation and Installation + Japan Network Information Center (JPNIC) + + +This file explains how to compile and install the source package. +These procedures take the following steps: + + + Prerequisite: making iconv() available + + System Configuration: running `configure' script + + Compilation: running `make' + + Test: running `make test' (optional) + + Installation: running `make install' + + Site Configuration: tailoring `idn.conf' + + Configuration Check (optional) + + Clean up (optional) + +See also the following section if you'd like to apply patch and install +BIND9. + + + Applying patches + +0. Prerequisite + +If you want to install generic idnkit library with code conversion +support, and also if your system's library does not have iconv() +function, which is a general codeset conversion utility, install iconv +as an external library. You also need external library if the +system's implementation cannot handle UTF-8 encoding, or it doesn't +support some encodings which your client applications uses. + +You can get a free version of iconv() implementation (under LGPL +license, aka GNU libiconv) from: + + ftp://ftp.gnu.org/gnu/libiconv/ + and mirrors of that site. + +But if you don't want code conversion support and you want to install +idnkitlite library without iconv support alone, you have not install +external library. Instead, set `--enable-liteonly' value to "yes" at +configure script execution. + + +1. Running configure script + +Run `configure' script in the top directory. This checks various +characteristics of your system and it will create Makefiles and +config.h appropriate for your system. + + % ./configure + +`configure' accepts many options. Here is a list of some important +options. + + --prefix=PREFIX + Specifies the prefix of install directories of idnkit. The + default is /usr/local. + + --enable-runidn + Build `runidn' command. The default is "no". + + You cannot set this option "yes" when `--enable-liteonly' is + also set "yes". + + --with-libiconv=LIBICONV_PREFIX + If you have installed GNU libiconv and would like to link it + to idnkit, specify this option. The argument LIBICONV_PREFIX + is install prefix of GNU libiconv. If the argument is omitted, + PREFIX (derived from --prefix=PREFIX option) is assumed. + + --with-libiconv is shorthand option for GNU libiconv. + + --with-libiconv=/usr/local + + This is equivalent to: + + --with-iconv-include='-I/usr/local/include' + --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' + + If both the shorthand option (--with-libiconv) and longhand + options (--with-iconv-include and/or --with-iconv) are specified, + the longhand options have priority. + + You cannot set this option when --enable-liteonly is set + "yes", because libidnkitlite library doesn't need iconv + support. + + --with-iconv-include=ICONV_INCDIR + If the header file "iconv.h" resides in a directory where your + C compiler doesn't search by default, specify the directory as + DIR like this: + + --with-iconv-include=/usr/local/include + + You cannot set this option when `--enable-liteonly' is set + "yes", because libidnkitlite library doesn't need iconv + support. + + --with-iconv=ICONV_LIB + If your libc doesn't contain iconv(), specify the library + that contains iconv(). For example, if iconv() is libiconv + in /usr/local/lib, you should specify: + + --with-iconv="-L/usr/local/lib -liconv" + + Note that if the library is a shared one, you might also want + to specify -R option, like: + + --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv" + + You cannot set this option when `--enable-liteonly' is set + "yes", because libidnkitlite library doesn't need iconv + support. + + --with-iconv-sofile=SOFILE_PATH + The runidn command in this kit needs to know the pathname of + shared library file that contains iconv(), if iconv() is not + part of libc. idnkit tries to find out the pathname from the + informaiton provided by `--with-iconv' option described above. + But when it fails, you have to specify it with this option, + like: + + --with-iconv-sofile=/usr/local/lib/libiconv.so.2.0 + + You cannot set this option when `--enable-liteonly' is set + "yes", because libidnkitlite library doesn't need iconv + support. + + --with-utf8=UTF8_NAME + If your iconv() (precisely, iconv_open()) does not accept + "UTF-8" as the name of UTF-8 encoding, specify the name for + it. For example if your iconv() uses "utf8" instead, you + should specify: + + --with-utf8=utf8 + + +2. Other configure options + +The configure script has many other options though they are not widely +used: + + --exec-prefix=EXEC_PREFIX + Specifies the prefix of install directories for machine-specific + files. The default is PREFIX (derived from `--prefix=PREFIX' + and its default is /usr/local). + + --bindir=BINDIR + Specifies the install directory for idnconv and runidn. + The default is EXEC_PREFIX/bin. + + --libdir=LIBDIR + Specifies the install directory for the libraries (libidnkit + and libidnkitlite). The default is EXEC_PREFIX/lib. + + --includedir=INCDIR + Specifies the install directory for the header files of the + libraries. The default is PREFIX/include. + + --sysconfdir=SYSCONFDIR + Specifies the install directory for sample configuration files + of the libraries. The default is PREFIX/etc. + + --mandir=MANDIR + Specifies the base install directory for online manuals. + The default is PREFIX/man. + + --datadir=DATADIR + Specifies the base install directory for machine independent + data files. The default is PREFIX/share. Some data files for + idnkit will be put under the DATADIR/idnkit directory. + + --enable-debug + Enable debugging codes. The fault is "no". + + --enable-shared + Build shared library. The fault is "yes". + + --enable-static + Build static library. The fault is "yes". + + --enable-liteonly + Build the `libidnlkitite' library only. Do not build the + `libidnkit' library, idnconv and runidn. The fault is "no". + + If you want to set "yes" to this option, you cannot specify it + together with `--enable-runidn', `--with-libiconv', + `--with-iconv-include', `--with-iconv' or `--with-iconv-sofile'. + +To see the list of available options, you should run it with --help +option. + + % ./configure --help + + +3. Compiling + +Run `make' for compilation. + + % make + + +4. Test + +Optionally, type `make test' to compile and run test programs. +Note that Perl 5 is required for comipilation of the test programs. + + % make test + +The test programs assume that iconv() on the system recognizes the +encoding name "EUC-JP" as Japanese EUC, and "SJIS" as Japanese Shift +JIS. If iconv() on the system doesn't support the encoding name, +please edit `lib/tests/codeset.h' before `make test'. + +*Note* + If you use standard iconv which is attached as default on Solaris, + converter's test "idn_converter_convfromucs4()" may fail. But it's + not the problem because the result is derived from the difference of + specification of iconv. So please ignore it if you run the test on + Solaris. + + +5. Installation + +Run `make install' to install binaries and manuals. Don't forget to +become a super-user before the installation. + + % su + # make install + +*Note* + If you have installed pre-release versions of idnkit (such as 1.0pr1), + idnkit-1.0 may not work correctly because of the old configuration + file 'idn.conf'. If this is the case, you should overwrite existing + configuration files with the new ones by executing the following command + after 'make install'. + + # make install-config + + +6. Configuration and usage + +Edit the `idn.conf' configuation file if you'd like to cosutomize +conversion/normalization rules of idnkit. Please refer the manual +for `idn.conf' for details. A sample configuration (`idn.conf.sample') +is also provided for your convenience. + +The sample configuration file has also been installed as `idn.conf' +if it has not exist on your system. + +Also online manuals for `idnconv' and `runidn' commands are available. +Please refer them for the usage and configuration of these commands. + + % man idn.conf + % man idnconv + % man runidn + + +7. Check your configuration + +A simple shell script `idnslookup' is available in the directory +`tools/idnconv', with which you can make queries for internationalized +domain names. It may help you check your configuration. + +The usage of `idnslookup' is: + + % tools/idnconv/idnslookup + +Suppose that is an internationalized domain name written +in the local codeset (see ``LOCAL CODESET'' in the `idn.conf' man page +for details), and is a hostname or IP address of DNS +server. + +`idnslookup' inquires from , using +`idnconv' and `nslookup' commands. If something is wrong, you will +see an error message output by `idnconv', `nslookup' or `idnslookup' +itself. + + +8. Clean up + +Run `make clean' to delete files generated by `make' and `make test' +from the idnkit source directory. (Files installed by `make install' +are not removed.) + + % make clean + +Run `make distclean' instead to also delete files generated by +`configure'. + + % make distclean + +After `make distclean', you can run `configure' and compile idnkit for +another system using the source directory. + + +Appendix A. Applying patches + +This distribution also contains patches for BIND9. +The top of these patch files describe how to apply the patch and +(re)install. + +Note that on Solaris, "patch" command that comes with the system +sometimes doesn't work correctly. You may want to install the GNU +version of the command (http://www.gnu.org/software/patch/) and use +it. + +; $Id: INSTALL,v 1.1 2003/06/04 00:24:59 marka Exp $ diff --git a/contrib/idn/idnkit-1.0-src/INSTALL.ja b/contrib/idn/idnkit-1.0-src/INSTALL.ja new file mode 100644 index 0000000000..2bc3faeb0c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/INSTALL.ja @@ -0,0 +1,310 @@ + + idnkit + $B%3%s%Q%$%k$H%$%s%9%H!<%k$NJ}K!(B + ($BJN,2D(B) + + $B%$%s%9%H!<%k(B: `make install' $B$NJN,2D(B) + + $B8eJRIU$1(B ($B>JN,2D(B) + +BIND9 $B$K%Q%C%A$rEv$F$F%$%s%9%H!<%k$7$?$$>l9g$O!"H$7$F2<$5$$!#(B + + + $B%Q%C%A$NEv$FJ}(B + +0. $BA0=`Hw(B + +$B$b$7$"$J$?$,%3!<%IJQ495!G=$r%5%]!<%H$7$?DL>o$N(B idnkit $B%i%$%V%i%j$r%$%s%9(B +$B%H!<%k$9$k$D$b$j$G$"$j!"$^$?$"$J$?$,;HMQ$7$F$$$k%7%9%F%`$N%i%$%V%i%j$K(B +iconv() $B$,$J$$>l9g!"$"$k$$$O$"$C$F$b(B UTF-8 $B$r07$&$3$H$,$G$-$J$$>l9g$K$O(B +$B$"$i$+$8$a(B iconv() $B$r%$%s%9%H!<%k$7$F$*$$$F$/$@$5$$!#(Biconv() $B$O!"Nc$($P(B +GNU libiconv $B$H8F$P$l$k%U%j!<(B (LGPL) $B$Nl9g!"(B +configure $B%9%/%j%W%H$Nl9g$O!"(B + $B$3$N%*%W%7%g%s$r;XDj$7$F2<$5$$!#0z?t(B LIBICONV_PREFIX $B$K$O!"(BGNU + libiconv $B$,%$%s%9%H!<%k$5$l$F$$$k0LCV$r;XDj$7$^$9!#0z?t$r>JN,(B + $B$9$k$H!"(BPREFIX (PREFIX $B$NCM$O(B --prefix=PREFIX $B$+$iF3=P$5$l$^$9(B) + $B$r;XDj$7$?$b$N$H8+$J$5$l$^$9!#(B + + --with-libiconv $B$O(B GNU libiconv $BMQ$NC;=L7A$N%*%W%7%g%s$G(B + + --with-libiconv=/usr/local + + $B$3$l$OoMQ$N%*%W%7%g%s(B + (--with-iconv-include, --with-iconv) $B$rN>J}$H$b;XDj$7$?>l9g$O!"(B + $BDL>oMQ$N%*%W%7%g%s$[$&$,M%@h$5$l$^$9!#(B + + $B$3$N%*%W%7%g%s$O(B --enable-liteonly $B$r(B "yes" $B$K$7$?>l9g$O;XDj$9$k(B + $B$3$H$O$G$-$^$;$s!#$3$l$O!"(Blibidnkitlite $B%i%$%V%i%j$,(B iconv $B%5%]!<(B + $B%H$rI,MW$H$7$J$$$?$a$G$9!#(B + + --with-iconv-include=ICONV_INCDIR + C $B%3%s%Q%$%i$,DL>o$G$O8!:w$7$J$$%G%#%l%/%H%j$K(B "iconv.h" $B$,CV(B + $B$+$l$F$$$k>l9g!"l9g$O;XDj$9$k(B + $B$3$H$O$G$-$^$;$s!#$3$l$O!"(Blibidnkitlite $B%i%$%V%i%j$,(B iconv $B%5%]!<(B + $B%H$rI,MW$H$7$J$$$?$a$G$9!#(B + + --with-iconv=ICONV_LIB + libc $B$K(B iconv $B$,F~$C$F$$$J$$>l9g(B ($B>e5-$N%Q%C%1!<%8$rF~$l$?(B + $B>l9g$J$I(B) $B$K!"(Biconv $B$N%i%$%V%i%j$r;XDj$7$^$9!#Nc$($P(B + + --with-iconv="-L/usr/local/lib -liconv" + + $B$N$h$&$K;XDj$7$^$9!#$b$7(B iconv $B$,6&M-%i%$%V%i%j$K$J$C$F$$$k(B + $B>l9g$K$O!"(B-R $B%*%W%7%g%s$b;XDj$7$F(B + + --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv" + + $B$H$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#(B + + $B$3$N%*%W%7%g%s$O(B --enable-liteonly $B$r(B "yes" $B$K$7$?>l9g$O;XDj$9$k(B + $B$3$H$O$G$-$^$;$s!#$3$l$O!"(Blibidnkitlite $B%i%$%V%i%j$,(B iconv $B%5%]!<(B + $B%H$rI,MW$H$7$J$$$?$a$G$9!#(B + + --with-iconv-sofile=SOFILE_PATH + idnkit $B$K4^$^$l$F$$$k(B runidn $B%3%^%s%I$O!"(Biconv() $B$,(B libc $B$N0l(B + $BIt$H$7$FDs6!$5$l$J$$$H$-$K!"(Biconv() $B$r4^$`6&M-%i%$%V%i%j$X$N%Q(B + $B%9L>$rCN$kI,MW$,$"$j$^$9!#(Bidnkit $B$O!"(B--with-iconv $B%*%W%7%g%s$N(B + $B5-=R$r4p$K%Q%9L>$r8!:w$7$^$9$,!"$3$l$K<:GT$7$?$H$-$K!"0J2<$N$h(B + $B$&$K6&M-%i%$%V%i%j$r;XDj$9$k$3$H$,$G$-$^$9!#(B + + --with-iconv-sofile=/usr/local/lib/libiconv.so.2.0 + + $B$3$N%*%W%7%g%s$O(B --enable-liteonly $B$r(B "yes" $B$K$7$?>l9g$O;XDj$9$k(B + $B$3$H$O$G$-$^$;$s!#$3$l$O!"(Blibidnkitlite $B%i%$%V%i%j$,(B iconv $B%5%]!<(B + $B%H$rI,MW$H$7$J$$$?$a$G$9!#(B + + --with-utf8=UTF8_NAME + iconv $B$K(B utf-8 $B%(%s%3!<%G%#%s%0$r;XDj$9$k>l9g!"K\%i%$%V%i%j$O(B + $B%G%U%)%k%H$G$O(B "UTF-8" $B$H$$$&L>A0$r;XDj$7$^$9!#$b$7$"$J$?$N(B + $B%7%9%F%`$N(B iconv $B$,(B "UTF-8" $B$H$$$&L>A0$rl9g$K$O!"(B + $BBe$j$NL>A0$r;XDj$7$^$9!#Nc$($P(B "UTF-8" $B$G$O$J$/(B "utf8" $B$N(B + $B>l9g$K$O$N(B configure $B$N%*%W%7%g%s(B + +$B$=$l$[$I$h$/;H$&$o$1$G$O$"$j$^$;$s$,!"(Bconfigure $B$K$OA09`$N$b$N0J30$K(B +$B$bMM!9$J%*%W%7%g%s$,MQ0U$5$l$F$$$^$9!#(B + + --exec-prefix=EXEC_PREFIX + $B%^%7%s8GM-$N%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$N%Q%9$r;XDj(B + $B$7$^$9!#%G%U%)%k%H$O(B PREFIX (``--prefix=PREFIX'' $B$K$h$C$F;XDj(B + $B2DG=!"(BPREFIX $B$N%G%U%)%k%H$O(B /usr/local) $B$K$J$j$^$9!#(B + + --bindir=BINDIR + idnconv $B$H(B runidn $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B + $B%G%U%)%k%H$G$O(B EXEC_PREFIX/bin $B$G$9!#(B + + --libdir=LIBDIR + $B%i%$%V%i%j(B (libidnkit $B$*$h$S(B libidnkitlite) $B$r%$%s%9%H!<%k$9$k(B + $B%G%#%l%/%H%j$r;XDj$7$^$9!#%G%U%)%k%H$G$O(B EXEC_PREFIX/lib $B$G$9!#(B + + --includedir=INCDIR + $B%i%$%V%i%j$N%X%C%@%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj(B + $B$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/include $B$G$9!#(B + + --sysconfdir=SYSCONFDIR + $B%i%$%V%i%j$N@_Dj%U%!%$%k$N%5%s%W%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H(B + $B%j$r;XDj$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/etc $B$G$9!#(B + + --mandir=MANDIR + $B%*%s%i%$%s%^%K%e%"%k$N%$%s%9%H!<%k%G%#%l%/%H%j$r;XDj$7$^$9!#(B + $B%G%U%)%k%H$G$O(B PREFIX/man $B$G$9!#(B + + --datadir=DATADIR + $B0[$J$k%^%7%s$G6&M-2DG=$J%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j(B + $B$r;XDj$7$^$9!#%G%U%)%k%H$O(B PREFIX/share $B$G$9!#(BDATADIR/idnkit + $B$N2<$K!"(Bidnkit $B$G;HMQ$9$k4v$D$+$N%G!<%?%U%!%$%k$,%$%s%9%H!<%k(B + $B$5$l$^$9!#(B + + --enable-debug + $B%G%P%C%0MQ$N%3!<%I$rM-8z$K$7$^$9!#%G%U%)%k%H$O(B "no" ($BL58z(B) $B$G$9!#(B + + --enable-shared + $B6&M-%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B + + --enable-static + $B@EE*%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B + + --enable-liteonly + libidnkitlite $B%i%$%V%i%j$N$_$r:n@.$7$^$9!#(Blibidnkit $B%i%$%V%i%j!"(B + idnconv, runidn $B$O:n@.$7$^$;$s!#%G%U%)%k%H$O(B "no" ($B$=$l0J30$N(B + $B$b$N$b:n@.$9$k(B) $B$G$9!#(B + + $B$3$N%*%W%7%g%s$NCM$r(B "yes" $B$K$9$k>l9g!"(B `--enable-runidn' + `--with-libiconv' `--with-iconv-include' `--with-iconv' + `--with-iconv-sofile' $B$OF1;~$K;XDj$9$k$3$H$O$G$-$^$;$s!#(B + +configure $B$K$OB>$K$bB?$/$N%*%W%7%g%s$,$"$j$^$9$,!";D$j$O0lHLE*$J%*%W%7%g(B +$B%s$J$N$G@bL@$O>J$-$^$9!#(B + + % ./configure --help + +$B$rJN,$7$F$b9=$$$^$;$s(B)$B!#%F%9%H%W%m%0%i%`$N%3%s%Q%$%k$K$O!"(BPerl 5 $B$,I,(B +$BMW$G$9!#(B + + % make test + +$B$J$*!"(Biconv() $B$,(B "EUC-JP" $B$rF|K\8l(B EUC $B$N%(%s%3!<%G%#%s%0L>>N$H$7$FG'(B +$B<1$7!"(B"SJIS" $B$rF|K\8l%7%U%H(B JIS $B$N%(%s%3!<%G%#%s%0L>>N$H$7$FG'<1$9$k$3(B +$B$H$r!"%F%9%H%W%m%0%i%`$G$OA0Ds$H$7$F$$$^$9!#$b$7!"G'<1$7$J$$$h$&$G$"$l(B +$B$P!"(B`make test' $Bl9g!"(Bconverter $B$N(B + idn_converter_convfromucs4() $B$N%F%9%H$,<:GT$9$k$3$H$,$"$j$^$9!#$3$l(B + $B$O(B iconv $B$N;EMM$N0c$$$K$h$k$b$N$J$N$G!">e5-4D6-$K$*$$$F%$%s%9%H!<%k(B + $B$r9T$C$F$$$k>l9g$OL5;k$7$F$/$@$5$$!#(B + + +5. $B%$%s%9%H!<%k(B + +$B%9!<%Q%f!<%6$K$J$C$F%$%s%9%H!<%k$7$^$9!#(B + + % su + # make install + +*$BCm0U(B* + idnkit $B$N(B 1.0 $B0JA0$N%P!<%8%g%s(B (1.0pr1 $B$J$I(B) $B$,$9$G$K%$%s%9%H!<%k$5(B + $B$l$F$$$k>l9g!"%$%s%9%H!<%k$5$l$?@_Dj%U%!%$%k(B 'idn.conf' $B$NFbMF$,8E$$(B + $B$?$a!"(Bidnkit-1.0$B$,@5$7$/F0:n$7$^$;$s!#$3$N$?$a!"(Bidnkit-1.0 $BMQ$N@_Dj(B + $B%U%!%$%k$r>e=q$-%$%s%9%H!<%k$9$kI,MW$,$"$j$^$9!#(Bmake install $B\:Y$K$D$$$F$O(B idn.conf $B$N(B +$B%*%s%i%$%s%^%K%e%"%k$r$4Mw$/$@$5$$!#$^$?@_DjNc$,=q$+$l$?%5%s%W%k%U%!%$(B +$B%k(B (idn.conf.sample) $B$b%$%s%9%H!<%k$5$l$^$9$N$G$4MxMQ$/$@$5$$!#(B + +$B%7%9%F%`$K@_Dj%U%!%$%k$,B8:_$7$J$+$C$?>l9g!"$3$N%5%s%W%k$N@_Dj%U%!%$%k(B +$B$O(B `idn.conf' $B$H$7$F$b%$%s%9%H!<%k$5$l$^$9!#(B + +$B$^$?!"(Bidnconv$B!"(Brunidn $B$H$$$C$?%D!<%k$N%*%s%i%$%s%^%K%e%"%k$bDs6!$5$l$F(B +$B$$$^$9!#$3$l$i$N%3%^%s%I$N;H$$J}!"@_DjJ}K!$K4X$7$F$O$=$A$i$r;2>H$7$F$/(B +$B$@$5$$!#(B + + % man idn.conf + % man idnconv + % man runidn + + +7. $B@_Dj$N3NG'(B + +`idnslookup' $B$H$$$&4JC1$J%7%'%k%9%/%j%W%H$,(B tools/idnconv $B%G%#%l%/%H%j(B +$B$KMQ0U$5$l$F$$$^$9!#$3$N%9%/%j%W%H$r;H$&$H(B DNS $B%5!<%P$KBP$7$F9q:]2=%I(B +$B%a%$%sL>$rLd$$9g$o$;$k$3$H$,$G$-$^$9!#@_Dj%U%!%$%k$N3NG'$KLrN)$D$+$bCN(B +$B$l$^$;$s!#(B + +`idnslookup' $B$N;HMQJ}K!$O!" + +$B$3$3$G(B $B$O%m!<%+%k%3!<%I%;%C%H(B ($B>\$7$/$O(B idn.conf $B$N%^%K%e(B +$B%"%k$N(B ``LOCAL CODESET'' $B$r;2>H$N$3$H(B) $B$G=q$+$l$?9q:]2=%I%a%$%sL>$G!"(B + $B$O(B DNS $B%5!<%P$N%[%9%HL>$b$7$/$O(B IP $B%"%I%l%9$G$9!#(B + +`idnslookup' $B$O(B `idnconv' $B$*$h$S(B `nslookup' $B%3%^%s%I$rMQ$$$F!"(B + $B$KBP$7$F(B $B$r0z$-$K9T$-$^$9!#@_Dj$K2?$+4V0c$$(B +$B$,$"$l$P!"(B`idnconv', `nslookup', $B$"$k$$$O(B `idnslookup' $B<+?H$K$h$k%(%i!<(B +$B%a%C%;!<%8$,=PNO$5$l$^$9!#(B + + +8. $B8eJRIU$1(B + +`make' $B$*$h$S(B `make test' $B$K$h$C$F@8@.$5$l$?%U%!%$%k$r(B idnkit $B$N%=!<(B +$B%9%G%#%l%/%H%j$+$i:o=|$9$k$K$O!"(B`make clean' $B$rH(B +$B$7$F$/$@$5$$!#(B + +Solaris $B$G$O!"%7%9%F%`IUB0$N(B patch $B%3%^%s%I$,@5>o$KF0:n$7$J$$$3$H$,$"(B +$B$j$^$9!#$=$N$h$&$J>l9g$K$O!"(BGNU $B%P!<%8%g%s$N(B patch +(http://www.gnu.org/software/patch/) $B$r%$%s%9%H!<%k$7$F!"$3$l$r;HMQ$7(B +$B$F$/$@$5$$!#(B + + +; $Id: INSTALL.ja,v 1.1 2003/06/04 00:25:00 marka Exp $ diff --git a/contrib/idn/idnkit-1.0-src/LICENSE.txt b/contrib/idn/idnkit-1.0-src/LICENSE.txt new file mode 100644 index 0000000000..1f1e0a06e5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/LICENSE.txt @@ -0,0 +1,39 @@ +Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved. + +By using this file, you agree to the terms and conditions set forth bellow. + + LICENSE TERMS AND CONDITIONS + +The following License Terms and Conditions apply, unless a different +license is obtained from Japan Network Information Center ("JPNIC"), +a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +Chiyoda-ku, Tokyo 101-0047, Japan. + +1. Use, Modification and Redistribution (including distribution of any + modified or derived work) in source and/or binary forms is permitted + under this License Terms and Conditions. + +2. Redistribution of source code must retain the copyright notices as they + appear in each source code file, this License Terms and Conditions. + +3. Redistribution in binary form must reproduce the Copyright Notice, + this License Terms and Conditions, in the documentation and/or other + materials provided with the distribution. For the purposes of binary + distribution the "Copyright Notice" refers to the following language: + "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + +4. The name of JPNIC may not be used to endorse or promote products + derived from this Software without specific prior written approval of + JPNIC. + +5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/contrib/idn/idnkit-1.0-src/Makefile.in b/contrib/idn/idnkit-1.0-src/Makefile.in new file mode 100644 index 0000000000..247ca7f7e5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/Makefile.in @@ -0,0 +1,79 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:25:03 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +PERL = perl +MKTARPKG = ../util/mktarpkg +SHELL = @SHELL@ + +SUBDIRS = include lib man tools map + +all: force all-subdirs +test check: force test-subdirs +install: force install-subdirs +clean: force clean-subdirs +distclean: force distclean-localdir distclean-subdirs + +distclean-localdir: + rm -f config.status config.cache config.log libtool Makefile + +all-subdirs install-subdirs clean-subdirs distclean-subdirs test-subdirs: + @target=`echo $@ | sed 's/-subdirs$$//'`; \ + for d in $(SUBDIRS); do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) $$target); \ + done + +install-config: + (cd lib; $(MAKE) install-config); + +dist: force + @v=`sed -ne '/^# *define *IDNKIT_VERSION/s/^.*"\([^"]*\)".*$$/\1/p' \ + $(srcdir)/include/idn/version.h`; \ + echo generate idnkit-$$v-src.tar.gz; \ + cd $(srcdir); \ + $(PERL) $(MKTARPKG) --gzip=9 idnkit-$$v-src + +force: diff --git a/contrib/idn/idnkit-1.0-src/NEWS b/contrib/idn/idnkit-1.0-src/NEWS new file mode 100644 index 0000000000..81c7c02120 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/NEWS @@ -0,0 +1,186 @@ +; $Id: NEWS,v 1.1 2003/06/04 00:25:03 marka Exp $ + +Major changes in idnkit version 1.0: + +* Change ACE prefix of Punycode from 'zq--' to 'xn--'. And delete + configure's --with-punycode-prefix option. + +* Add NAMEPREP version RFC3491. Other versions of NAMEPREP are + removed. + +* Enable idnconv to handle a input line as long as memory permitted + when encoding/decoding. + +* unicode-form-c and unicode-form-c/3.2.0 are not supported. + +* Unicode 3.0.1 and Unicode 3.1.0 are not supported. + +* Delete BIND8, Squid and GNU libiconv patches. + +Major changes in idnkit version 1.0-pr2: + +* The license of idnkit is changed to a less restrictive one. See + LICENSE.txt for the new license. + +* The local codeset name used in the test suite, which is hard-coded + in the previous version, can be specified by a separate header file. + +* IDN encoding and decoding now always check the validity of the + result by performing roundtrip conversion check. + +Major changes in idnkit version 1.0-pr1: + +* Some test cases are added to the testsuite. + +* The testsuite can run on OpenBSD. + +Major changes in idnkit version 020829: + +* Testsuit is added for the library behavior check. + Testsuit and testcases are in lib/tests. Read INSTALL (INSTALL.ja) + for details. Tests aim at api, checker, converter, delimitermap, + mapper, mapselecter, normalizer, res, resconf, and ucs4 at the + moment. + +* "amcacez" module is renamed to "punycode". + +* AMC-ACE-Z and RACE are now treated as extra ACE. + +* Add "--with-utf8=NAME" option to configure script. + +Major changes in idnkit version 020730: + +* Complete bidi check support for NAMEPREP draft -11. + +* Type definitions of action flags for conversion APIs are changed + from int to idn_action_t. + +* Add -nobidicheck option to idnconv command. + +Major changes in idnkit version 020711: + +* Default delimiters are added according to IDNA-10. + +* ``delimiter-map'' entry in config file is removed. + +* Add Unicode version 3.2 support. + +* Add preliminary support of NAMEPREP draft -11. + This version supports NAMEPREP draft -11 without bidirectional label + check. + +* Supported NAMEPREP versions are changed. + idnkit supports NAMEPREP draft version -03, -10, and -11. Others + are removed. + +* IDN encoding DUDE is removed. + +* New action flags are available for conversion APIs. + IDN_ENCODE_QUERY, IDN_DECODE_QUERY, IDN_ENCODE_STORED, and + IDN_DECODE_STORED are newly created according to IDNA specification. + See include/idn/res.h for precise description. + +* Action flags IDN_ENCODE_APP, IDN_DECODE_APP and IDN_NAMEPREP change + those behavior. + See include/idn/res.h for precise description. + +* New decode APIs are created. + idn_decodename2() and idn_res_decodename2() are defined to add + conversion process from "IDN string encoded in local encoding" to + UTF-8 before actual decode process of IDN. + +* idnconv with -reverse option treats input as IDN string(s) encoded + in local encoding specified by -out option. + +* idnconv recognizes `-A' option which is synonym for `-noasciicheck'. + +* (Windows) idn Wrapper can run on Windows XP. + +* BIND-8 patch for BIND-8.3.3 is available and other patches of BIND-8 + are removed. + +Major changes in idnkit version 1.0-rc1: + +* NAMEPREP draft -09 is supported. + +* idnconv now accepts any encodings specified as argument for `-in' + or `-out' option. `-out' accepts non-ACE, and `-in' accepts ACE. + +* In configuration file, `encoding-alias-file' entry is not supported + any longer. It is simply ignored. + +Major changes in idnkit version 1.0-beta2: + +* Supported nameprep version is changed. + Now idnkit supports nameprep-03, nameprep-06, and nameprep-08. + Nameprep-05 and nameprep-07 are not supported any more. + +* Compatibility with mDNkit is added. + This feature provides applications formerly written using mDNkit + library with some source level compatibilities. If you want to use + this feature, set `--enable-mdnkit-compat' option at execution time + of configure script. + +* Now idnkit can set up easily without configuration file. + As this feature is added, initialization function and some behavior + of top level API are changed. + +* BIND-8 patch supports IDN conversion in itself. + +* (Windows) idnkit library looks for configuration files with registry + information. + +* (Windows) idnkit library returns "CP" as local + encoding name when the environment variable "IDN_LOCAL_CODESET" is + not set. + +* (Windows) libidnkit/libidnkitlite are now installed as DLL. + +* (Windows) idnconv can be executed as a console application. + +Major changes in idnkit version 1.0-beta1: + +* mDNkit has been renamed idnkit. + This means all symbols with "mdn" are renamed with "idn". For + example, a function `mdn_encodename()' is now `idn_encodename()', an + environment variable "MDN_DISABLE" is "IDN_DISABLE", system + configuretion file is "idn.conf", `runmdn' command is `runidn', and + so forth. + +* Also, library name has been changed to "libidnkit(lite)". + +* `mdnsproxy' command has been removed. + +* `runidn' (formerly known as `runmdn') command is not installed by + default. + If you want to install it, set "yes" to `--enable-runidn' option + when you run configure script. + +* idnkitlite library only instalation is supported. + Set "yes" to `--enable-liteonly' option at execution of configure + script to use this feature. + +* BIND-9.1.3 patch has been removed. + +* User configuration file is supported. + idnkit now uses ".idnrc" in user's home directory for configuration + of whole scheme. If there is no user configuration file, then it + tries to load the system configuration file "idn.conf". + +* idnkit is now able to run without configuration file. + If there are no configuration files (both of user's and system's), + it sets normal configurations (the latest nameprep scheme it + supports and the IDN encoding "Punycode") automatically at runtime. + +* Encoding alias information file is supported. (by generic libidnkit) + Its name is "idnalias.conf" by default and it should be located in + same directory where the system configuration file is. Example + alias information file "idnalias.conf.sample" is installed + automatically. + +* APIs are renewed. See manpage. + +* Now idnkit has full support of IDNA-07. + +* Internal representation of domain name is changed to UCS4 in place + of UTF-8. diff --git a/contrib/idn/idnkit-1.0-src/README b/contrib/idn/idnkit-1.0-src/README new file mode 100644 index 0000000000..83230828b0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/README @@ -0,0 +1,159 @@ + + idnkit + -- internationalized domain name toolkit -- + version 1.0 + Japan Network Information Center (JPNIC) + + +Table of contents of this file: + + 1. Overview + 2. Directory structure of this distribution + 3. Supported systems + 4. Contact information + +See the file INSTALL for compilation and installation instructions. +See the file NEWS for a list of major changes in the current release. + + +1. Overview + +idnkit, which was originally known as mDNkit, is a toolkit for handling +internationalized domain names. To handle such names, the following +features are required: + + + Encoding conversion + Multilingualized domain names have to be converted from + the encoding application uses (local encoding) to + the encoding used for name resolution (IDN encoding), and + vice versa. Since domain names in IDN encoding just look + like good old ASCII domain names, the encoding is also known + as ASCII-compatible encoding (ACE). + + + NAMEPREP + Name preparation of domain names before converting to + IDN encoding. Basically this is a normalization process + of the domain names. + +These conversion/nameprep processes to domain names have to be +performed before they are sent to DNS servers. And since the +processed domain names (in IDN encoding) consist of only legal ASCII +characters, no changes are required to DNS servers. + +idnkit provides several ways for adding these features. + +This kit consists of following components. + + + library for handling internationalized domain names + (libidnkit, libidnkitlite) + Those libraries implement encoding conversion and nameprep. + They provide easy-to-use APIs for handling internationalized + domain name in your applications. + + Both libraries provide almost the same API. The difference + between them is that libidnkit internally uses iconv() function + to provide encoding conversion from UTF-8 to the local encoding + (such as iso-8859-1, usually determined by the current locale), + and vise versa. The idnconv and runidn commands in this toolkit + use libidnkit. + + libidnkitlite is lightweight version of libidnkit. It assumes + local encoding is UTF-8 so that it never uses iconv(). + + + codeset conversion utility (idnconv) + This command can convert internationalized domain name written + in local encoding (e.g. EUC-JP) to ACE or the opposite direction. + It can also convert named.conf and zone master files for BIND. + + + command which adds IDN feature dynamically to unix applications + (runidn) + This command enables normal applications to handle + internationalized domain names by dynamically attaching special + library to them. See ``2. using runidn'' below. + + Note that this command is not installed unless you specify the + `--enable-runidn' option to `configure'. See the file `INSTALL' + for more information about installation. + + + patch for BIND9 that adds IDN capability + This patch adds IDN capability to BIND9. It adds encoding + conversion and nameprep features to `dig', `host' and + `nslookup'. With the patch, those commands become capable of + internationalized domain names. + + + IDN wrapper for Windows applications + On windows, name resolving request is passed to WINSOCK DLL. So, + replacing WINSOCK DLL with multi-lingual domain name version + makes legacy windows applications compatible with IDN. This is + wrapper DLL for WINSOCK's name resolving functions. See + ``3. using IDN wrapper'' below. + + +2. Directory structure of this distribution + +Below is a directory structure of this distribution with some +important files and their brief description. + + +README this file + +README.ja .. in Japanese + +INSTALL compilation and installation instructions. + +INSTALL.ja .. in Japanese + +DISTFILES list of files in this distribution + +NEWS what's new in this version + +ChangeLog list of changes + +Makefile.in toplevel makefile template + +configure a `configure' script + +include/ + | +config.h.in template header file for configuration + | +idn/ header files for libidnkit and libindkitlite + | +mdn/ header files for backward compatibility + +lib/ source for libidnkit and libidnkitlite + +patch/ + | +bind9/ BIND9 patch + +tools/ + | +idnconv/ source for idnconv command + | +runidn/ source for runidn command + +util/ utilities + +wsock/ source for IDN wrapper + + +3. Supported systems + +We've had successful builds on the following systems: + + ------------------------------------------------------------------- + OS iconv library configure options + =================================================================== + FreeBSD 4.7-RELEASE GNU libiconv --with-libiconv + for Intel 1.8 + ------------------------------------------------------------------- + Red Hat Linux 7.3 standard library none + for Intel (glibc) + ------------------------------------------------------------------- + Solaris 9 standard library none + for Sparc (libc) + ------------------------------------------------------------------- + +The latest information about supported/unsupported systems will be +found at the mdnkit FAQ page linked from: + + http://www.nic.ad.jp/en/idn/ + + +4. Contact information + +Please see + + http://www.nic.ad.jp/en/idn/ + +for the latest news about this kit. +Bug reports and comments on this kit should be sent to + + mdnkit-bugs@nic.ad.jp +and + idn-cmt@nic.ad.jp + +respectively. + + +; $Id: README,v 1.1 2003/06/04 00:24:58 marka Exp $ diff --git a/contrib/idn/idnkit-1.0-src/README.ja b/contrib/idn/idnkit-1.0-src/README.ja new file mode 100644 index 0000000000..8663e3adf4 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/README.ja @@ -0,0 +1,151 @@ + + idnkit + -- $B9q:]2=%I%a%$%sL>%D!<%k%-%C%H(B -- + $B%P!<%8%g%s(B 1.0 + ($BpJs!"Ld$$9g$o$;$K$D$$$F(B + +$B%3%s%Q%$%k$*$h$S%$%s%9%H!<%kJ}K!$K$D$$$F$O!"(BINSTALL.ja $B$H$$$&%U%!%$%k$r(B +$B$4Mw2<$5$$!#$3$N%P!<%8%g%s$G$NN(B mDNkit) $B$H$O9q:]2=%I%a%$%sL>$r07$&$?$a$N%D!<%k%-%C%H$G$9!#(B +$B9q:]2=%I%a%$%sL>$r07$&$?$a$K$O!"$KBP$7$F!"$=$N%(%s%3!<%G%#%s%0$r%"%W%j%1!<%7%g%s$,;H(B + $BMQ$7$F$$$k$b$N(B ($B%m!<%+%k%(%s%3!<%G%#%s%0(B) $B$+$iL>A02r7h$KMQ$$$i$l$k$b(B + $B$N(B (IDN $B%(%s%3!<%G%#%s%0(B) $B$X$NJQ49!"$^$?$=$N5UJ}8~$NJQ49$r9T$$$^$9!#(B + $B%I%a%$%sL>$r(B IDN $B%(%s%3!<%G%#%s%0$K$7$?7k2L$O!"=>Mh$N%I%a%$%sL>$HF1(B + $B$8$/(B ASCII $BJ8;z$N$_$G9=@.$5$l$k$N$G!"(BIDN $B%(%s%3!<%G%#%s%0$O(BASCII $B8_(B + $B49%(%s%3!<%G%#%s%0(B (ACE) $B$H$b8F$P$l$^$9!#(B + +$B!&(BNAMEPREP + $B%I%a%$%sL>$r(B IDN $B%(%s%3!<%G%#%s%0$KJQ49$9$kA0$K!"L>A0$N@55,2=$r9T$$(B + $B$^$9!#$3$l$r(B NAMEPREP $B$H8F$S$^$9!#(B + +$B>e5-$N=hM}$O%I%a%$%sL>$r(B DNS $B%5!<%P$KAw$kA0$K$O(B ASCII $BJ8;z$+$i9=@.$5$l!"=>Mh$N(B ASCII $B%I%a%$%sL>$H(B +$B$7$F$b@5$7$$7A<0$K$J$C$F$$$k$N$G!"(BDNS $B%5!<%PB&$K$O$J$s$NJQ99$bI,MW$"$j(B +$B$^$;$s!#(B + +$B$3$NG[I[%-%C%H$K$O$r=hM}$9$k$?$a$N%i%$%V%i%j(B (libidnkit, libidnkitlite) + $B$3$l$i$N%i%$%V%i%j$G$O!"%(%s%3!<%G%#%s%0JQ49$d(B NAMEPREP $B$N5!G=$r$r4JC1$K07$($k$h$&$K(B + $B$9$k$?$a$N(B API $B$rHw$($F$$$^$9!#(B + + $B$I$A$i$N%i%$%V%i%j$b$[$H$s$IF1$8(B API $B$rDs6!$7$^$9!#N>o$O(B locale $B$+$i7hDj$5$l$^$9(B) $B$H$N4V$N(B + $BJQ495!G=$rDs6!$7$F$$$^$9!#K\%D!<%k%-%C%HIUB0$N(B idnconv $B$*$h$S(B runidn + $B$O(B libidnkit $B$r;HMQ$7$F$$$^$9!#(B + + libidnkitlite $B$O(B libidnkit $B$N7ZNLHG$G$9!#%m!<%+%k%(%s%3!<%G%#%s%0$O(B + $B>o$K(B UTF-8 $B$@$H2>Dj$7$F$*$j!"(Biconv() $B$O;HMQ$7$^$;$s!#(B + +$B!&%3!<%I%;%C%H%3%s%P!<%?(B (idnconv) + $B%m!<%+%k%(%s%3!<%G%#%s%0(B ($B$?$H$($P(B EUC-JP) $B$G=q$+$l$?9q:]2=%I%a%$%s(B + $BL>$+$i(B ACE $B$X$NJQ49$d!"$=$N5UJQ49$r9T$($k%3%^%s%I$G$9!#(BBIND $BMQ$N(B + named.conf $B$d%>!<%s%^%9%?%U%!%$%k$rJQ49$9$k$3$H$b2DG=$G$9!#(B + +$B!&(BUNIX $B%"%W%j%1!<%7%g%s$K(B IDN $B5!G=$rF0E*$KDI2C$9$k%3%^%s%I(B (runidn) + UNIX $B$NDL>o$N%"%W%j%1!<%7%g%s$G9q:]2=%I%a%$%sL>$r\$7$/$O!"8e=R$N(B + $B!V(B2. runidn $B$r;H$&!W$r8fMw$/$@$5$$!#(B + + $B$J$*!"(Bconfigure $B\$7$/$O(B INSTALL.ja $B$H(B + $B$$$&%U%!%$%k$r$4Mw$/$@$5$$!#(B + +$B!&(BBIND9 $B$K(B IDN $B5!G=$rDI2C$9$k%Q%C%A(B + BIND $B$K(B IDN $B$N5!G=$rDI2C$9$k%Q%C%A$G$9!#(B`dig'$B!"(B`host'$B!"(B`nslookup' $B$K(B + $B%(%s%3!<%G%#%s%0JQ49$H(B NAMEPREP $B$N5!G=$rDI2C$7!"9q:]2=%I%a%$%sL>$,07(B + $B$($k$h$&$K$7$^$9!#(B + +$B!&(BWindows $B%"%W%j%1!<%7%g%sMQ$N(B IDN $B%i%C%Q!<(B + WINSOCK $B$NL>A02r7h5!G=$KBP$9$k%i%C%Q!<(B DLL $B$G$9!#(BWindows $B>e$G$O!"L>(B + $BA02r7h$NMW5a$O!"(BWINSOCK DLL $B$rDL$7$F9T$o$l$^$9!#$=$3$G!"$3$l$r9q:]2=(B + $B%I%a%$%sMQ$N(B WINSOCK DLL $B$KCV$-49$($k$3$H$G!"=>Mh$N(B Windows $B%"%W%j%1!<(B + $B%7%g%s$G$b(B IDN $B5!G=$r;HMQ$G$-$k$h$&$K$7$^$9!#>\$7$/$O!"8e=R$N(B + $B!V(B3. IDN $B%i%C%Q!<$r;H$&!W$r8fMw$/$@$5$$!#(B + + +2. $B%G%#%l%/%H%j9=@.(B + +$BG[I[%-%C%H$N%G%#%l%/%H%j9=@.$H!"\:Y(B + +configure configure $B%9%/%j%W%H(B + +Makefile.in $B%H%C%W%l%Y%k$N(B Makefile $B$N%F%s%W%l!<%H(B + +include/ + | +config.h.in config.h $B$N%F%s%W%l!<%H(B + | +idn/ libidnkit, libidnkitlite $B$N%X%C%@%U%!%$%k(B + | +mdn/ $B5l%P!<%8%g%s$H$N8_49MQ%X%C%@%U%!%$%k(B + +lib/ libidnkit, libidnkitlite $B$N%=!<%9(B + +patch/ + | +bind9/ BIND9 $BMQ%Q%C%A(B + +tools/ + | +idnconv/ idnconv $B%3%^%s%I$N%=!<%9(B + | +runidn/ runidn $B%3%^%s%I$N%=!<%9(B + +util/ $B%f!<%F%#%j%F%#(B + +wsock/ IDN $B%i%C%Q!<$N%=!<%9(B + + +3. $BK\%-%C%H$,BP1~$7$F$$$k%7%9%F%`(B + +$B@5>o$K%$%s%9%H!<%k$G$-$k$3$H$,3NG'$G$-$F$$$k$N$O!"pJs$O!"pJs!"Ld$$9g$o$;$K$D$$$F(B + +$BK\%-%C%H$K4X$9$k:G?7>pJs$K$D$$$F$O!"(B + + http://www.nic.ad.jp/ja/idn/ + +$B$r;2>H$7$F$/$@$5$$(B +$BK\%-%C%H$K4X$9$k%P%0%l%]!<%H$*$h$S%3%a%s%H$O!"$=$l$>$l(B + + mdnkit-bugs@nic.ad.jp +$B$*$h$S(B + idn-cmt@nic.ad.jp + +$B$X$*4j$$$7$^$9!#(B + + +; $Id: README.ja,v 1.1 2003/06/04 00:24:59 marka Exp $ diff --git a/contrib/idn/idnkit-1.0-src/acconfig.h b/contrib/idn/idnkit-1.0-src/acconfig.h new file mode 100644 index 0000000000..0da81f2fd3 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/acconfig.h @@ -0,0 +1,53 @@ +/* $Id: acconfig.h,v 1.1 2003/06/04 00:25:03 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ +@TOP@ + +/* Define as an appropriate type (ex. int) if your system doesn't have. */ +#undef BOOL + +@BOTTOM@ +/* Define as the pathname of the shared libc object if your system has one. */ +#undef SOPATH_LIBC + +/* Define as the pathname of the shared libnsl object if your system has one. */ +#undef SOPATH_LIBNSL diff --git a/contrib/idn/idnkit-1.0-src/aclocal.m4 b/contrib/idn/idnkit-1.0-src/aclocal.m4 new file mode 100644 index 0000000000..b165a9a96b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/aclocal.m4 @@ -0,0 +1,472 @@ +## +## $Id: aclocal.m4,v 1.1 2003/06/04 00:25:05 marka Exp $ +## +AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[ +AC_MSG_CHECKING(for $1 shared object) +shobj_name=$1 +shobj_path= +case "$host" in +*-hpux*) + SOEXT=sl + ;; +*) + SOEXT=so + ;; +esac +for shobj_libdir in /lib /usr/lib; do + if test -f $shobj_libdir/$shobj_name.$SOEXT; then + shobj_path=$shobj_libdir/$shobj_name.$SOEXT + else + shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` + if test "$shobj_path" != "" -a -f "$shobj_path"; then + : + else + shobj_path= + fi + fi + if test "$shobj_path" != ""; then + AC_MSG_RESULT($shobj_path) + shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path") + break + fi +done +if test "$shobj_path" = ""; then + AC_MSG_RESULT(no) +fi +])dnl + +## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- +## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. +## Originally by Gordon Matzigkeit , 1996 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## +## As a special exception to the GNU General Public License, if you +## distribute this file as part of a program that contains a +## configuration script generated by Autoconf, you may include it under +## the same distribution terms that you use for the rest of that program. + +# serial 40 AC_PROG_LIBTOOL +AC_DEFUN(AC_PROG_LIBTOOL, +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl + +# Save cache, so that ltconfig can load it +AC_CACHE_SAVE + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| AC_MSG_ERROR([libtool configure failed]) + +# Reload cache, that may have been modified by ltconfig +AC_CACHE_LOAD + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log +]) + +AC_DEFUN(AC_LIBTOOL_SETUP, +[AC_PREREQ(2.13)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_RANLIB])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_NM])dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +dnl + +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + +# Check for any special flags to pass to ltconfig. +libtool_flags="--cache-file=$cache_file" +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], +[libtool_flags="$libtool_flags --enable-dlopen"]) +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[libtool_flags="$libtool_flags --enable-win32-dll"]) +AC_ARG_ENABLE(libtool-lock, + [ --disable-libtool-lock avoid locking (might break parallel builds)]) +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$lt_target" in +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +]) +esac +]) + +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) + +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) + +# AC_ENABLE_SHARED - implement the --enable-shared flag +# Usage: AC_ENABLE_SHARED[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_SHARED, [dnl +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(shared, +changequote(<<, >>)dnl +<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl +]) + +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no)]) + +# AC_ENABLE_STATIC - implement the --enable-static flag +# Usage: AC_ENABLE_STATIC[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_STATIC, [dnl +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(static, +changequote(<<, >>)dnl +<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl +]) + +# AC_DISABLE_STATIC - set the default static flag to --disable-static +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no)]) + + +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(fast-install, +changequote(<<, >>)dnl +<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_fast_install=yes ;; +no) enable_fast_install=no ;; +*) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl +]) + +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no)]) + +# AC_PROG_LD - find the path to the GNU or non-GNU linker +AC_DEFUN(AC_PROG_LD, +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +changequote(,)dnl + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' +changequote([,])dnl + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(ac_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$ac_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_PROG_LD_GNU +]) + +AC_DEFUN(AC_PROG_LD_GNU, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi]) +]) + +# AC_PROG_NM - find the path to a BSD-compatible name lister +AC_DEFUN(AC_PROG_NM, +[AC_MSG_CHECKING([for BSD-compatible nm]) +AC_CACHE_VAL(ac_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi]) +NM="$ac_cv_path_NM" +AC_MSG_RESULT([$NM]) +]) + +# AC_CHECK_LIBM - check for math library +AC_DEFUN(AC_CHECK_LIBM, +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case "$lt_target" in +*-*-beos* | *-*-cygwin*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, main, LIBM="-lm") + ;; +esac +]) + +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl convenience library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-convenience to the +# configure arguments. Note that LIBLTDL and INCLTDL are not +# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not +# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed +# with '${top_builddir}/' and INCLTDL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case "$enable_ltdl_convenience" in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) +]) + +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl installable library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-install to the configure +# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is +# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed +# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed +# with '${top_srcdir}/' (note the single quotes!). If your package is +# not flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, main, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + INCLTDL= + fi +]) + +dnl old names +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl + +dnl This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL])dnl diff --git a/contrib/idn/idnkit-1.0-src/config.guess b/contrib/idn/idnkit-1.0-src/config.guess new file mode 100755 index 0000000000..dff9e481b7 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/config.guess @@ -0,0 +1,1317 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-04' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + sparc*:NetBSD:*) + echo `uname -p`-unknown-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-pc-linux-gnu\n", argv[1]); +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-pc-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/contrib/idn/idnkit-1.0-src/config.sub b/contrib/idn/idnkit-1.0-src/config.sub new file mode 100755 index 0000000000..393f13d373 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/config.sub @@ -0,0 +1,1411 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-07' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dsp16xx \ + | fr30 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el | mips64vr4300 \ + | mips64vr4300el | mips64vr5000 | mips64vr5000el \ + | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ + | mipsisa32 \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[34] | sh[34]eb | shbe | shle \ + | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | stormy16 | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 \ + | we32k \ + | x86 | xscale \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alphapca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armv*-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | clipper-* | cray2-* | cydra-* \ + | d10v-* | d30v-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | m32r-* \ + | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ + | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ + | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ + | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | v850-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh3eb | sh4eb) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/contrib/idn/idnkit-1.0-src/configure b/contrib/idn/idnkit-1.0-src/configure new file mode 100755 index 0000000000..1d22dacdf6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/configure @@ -0,0 +1,3517 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-debug enable debug codes [default=no]" +ac_help="$ac_help + --enable-mdnkit-compat enable mDNkit compatibility mode [default=no]" +ac_help="$ac_help + --enable-extra-ace enable additional ACE converters. [default=no]" +ac_help="$ac_help + --with-utf8=NAME codeset name for UTF-8 encoding [UTF-8]" +ac_help="$ac_help + --enable-liteonly compile and install lite library only [default=no]" +ac_help="$ac_help + --enable-runidn compile and install runidn [default=no]" +ac_help="$ac_help + --with-libiconv=IPREFIX GNU libiconv are installed in IPREFIX [PREFIX]" +ac_help="$ac_help + --with-iconv-include=DIR iconv include files are in DIR []" +ac_help="$ac_help + --with-iconv=LIB special library for iconv []" +ac_help="$ac_help + --with-iconv-sofile=PATH shared library file for libiconv []" +ac_help="$ac_help + --enable-shared[=PKGS] build shared libraries [default=yes]" +ac_help="$ac_help + --enable-static[=PKGS] build static libraries [default=yes]" +ac_help="$ac_help + --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" +ac_help="$ac_help + --disable-libtool-lock avoid locking (might break parallel builds)" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=include/idn/converter.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:582: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + + +debug=no +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + debug=$enableval +fi + +case "$debug" in +yes) + CFLAGS="$CFLAGS -DDEBUG" + ;; +esac + +mdnkit_compat=no +COMPAT_TRUE="#" +COMPAT_FALSE= +# Check whether --enable-mdnkit-compat or --disable-mdnkit-compat was given. +if test "${enable_mdnkit_compat+set}" = set; then + enableval="$enable_mdnkit_compat" + mdnkit_compat=$enableval +fi + +case "$mdnkit_compat" in +yes) + COMPAT_TRUE= + COMPAT_FALSE="#" + cat >> confdefs.h <<\EOF +#define ENABLE_MDNKIT_COMPAT 1 +EOF + + ;; +no) + ;; +*) + { echo "configure: error: You must specify yes or no to --enable-runidn option." 1>&2; exit 1; } + ;; +esac + + + +extraace=no +# Check whether --enable-extra-ace or --disable-extra-ace was given. +if test "${enable_extra_ace+set}" = set; then + enableval="$enable_extra_ace" + extraace=$enableval +fi + +case "$extraace" in +no) + ;; +yes) + cat >> confdefs.h <<\EOF +#define IDN_EXTRA_ACE 1 +EOF + + ;; +*) + { echo "configure: error: You must specify yes or no to --enable-extra-ace option." 1>&2; exit 1; } + ;; +esac + +UTF8_NAME=no +# Check whether --with-utf8 or --without-utf8 was given. +if test "${with_utf8+set}" = set; then + withval="$with_utf8" + UTF8_NAME=$withval +fi + +case "$UTF8_NAME" in +no) + UTF8_NAME=UTF-8 + ;; +yes) + { echo "configure: error: You must specify NAME to --with-utf8 option." 1>&2; exit 1; } + ;; +*) + cat >> confdefs.h <&2; exit 1; } + fi + LITEONLY_TRUE= + LITEONLY_FALSE="#" + ;; +*) + { echo "configure: error: You must specify yes or no to --enable-liteonly option." 1>&2; exit 1; } + ;; +esac + + + +install_runidn=no +RUNIDN_TRUE="#" +RUNIDN_FALSE= +# Check whether --enable-runidn or --disable-runidn was given. +if test "${enable_runidn+set}" = set; then + enableval="$enable_runidn" + install_runidn=$enableval +fi + +case "$install_runidn" in +no) + ;; +yes) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set value \"yes\" to --enable-runidn and --enable-liteonly simultaneously, because runidn requires iconv support of generic libidnkit." 1>&2; exit 1; } + fi + RUNIDN_TRUE= + RUNIDN_FALSE="#" + ;; +*) + { echo "configure: error: You must specify yes or no to --enable-runidn option." 1>&2; exit 1; } + ;; +esac + + + +ICONVINC= +ICONVLIB= + +libiconv=unspec +# Check whether --with-libiconv or --without-libiconv was given. +if test "${with_libiconv+set}" = set; then + withval="$with_libiconv" + libiconv=$withval +fi + +case "$libiconv" in +unspec) + ;; +no) + ICONVINC= + ICONVLIB= + ;; +yes) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + if test X$prefix = XNONE ; then + libiconv=$ac_default_prefix + else + libiconv=$prefix + fi + ICONVINC="-I$libiconv/include" + ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" + ;; +*) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + ICONVINC="-I$libiconv/include" + ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" + ;; +esac + +iconv_include=unspec +# Check whether --with-iconv-include or --without-iconv-include was given. +if test "${with_iconv_include+set}" = set; then + withval="$with_iconv_include" + iconv_include=$withval +fi + +case "$iconv_include" in +unspec) + ;; +no) + ICONVINC= + ;; +yes) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + echo "configure: warning: You must supply DIR to --with-iconv-include option. + Ignored." 1>&2 + ICONVINC= + ;; +*) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + ICONVINC="-I$iconv_include" + ;; +esac + +if test "X$ICONVINC" != X ; then + iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`" + if test ! -f "$iconv_include/iconv.h" ; then + { echo "configure: error: iconv.h doesn't exist in $iconv_include" 1>&2; exit 1; } + fi +fi + + + +iconv=unspec +# Check whether --with-iconv or --without-iconv was given. +if test "${with_iconv+set}" = set; then + withval="$with_iconv" + iconv=$withval +fi + +case "$iconv" in +unspec) + ;; +no) + ICONVLIB= + ;; +yes) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + echo "configure: warning: You must supply LIB to --with-iconv option. + -liconv is assumed." 1>&2 + ICONVLIB=-liconv + ;; +*) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + ICONVLIB=$iconv + ;; +esac + + +# Check whether --with-iconv-sofile or --without-iconv-sofile was given. +if test "${with_iconv_sofile+set}" = set; then + withval="$with_iconv_sofile" + iconv_file=$withval +else + iconv_file=guess +fi + +ICONVSOFILE= +case "$iconv_file" in +no) + ICONVSOFILE=none + ;; +yes) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + { echo "configure: error: You must supply PATH to --with-iconv-sofile option." 1>&2; exit 1; } + ;; +guess) + if test "$liteonly" != yes ; then + if test "$ICONVLIB" = ""; then + ICONVSOFILE=none + else + echo $ac_n "checking pathname of iconv shared library""... $ac_c" 1>&6 +echo "configure:870: checking pathname of iconv shared library" >&5 + ic_libdir= + ic_libname= + case "$host" in + *-hpux*) + SO=sl + ;; + *) + SO=so + ;; + esac + for arg in $ICONVLIB; do + case "$arg" in + -L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;; + -l*) ic_libname=`echo $arg | sed s/-l//` ;; + /*.$SO*) ICONVSOFILE=$arg ;; + esac + done + if test "$ICONVSOFILE" = ""; then + if test "$ic_libname" = ""; then + echo "$ac_t""unknown" 1>&6 + echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2 + ICONVSOFILE=none + else + if test "$ic_libdir" = ""; then + # Standard (and semi-standard) library directories + ic_libdir="/lib /usr/lib /usr/local/lib" + fi + for dir in $ic_libdir; do + ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1` + if test "$ICONVSOFILE" != ""; then + break + fi + done + if test "$ICONVSOFILE" != ""; then + echo "$ac_t""$ICONVSOFILE" 1>&6 + else + echo "$ac_t""unknown" 1>&6 + echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2 + ICONVSOFILE=none + fi + fi + fi + fi + else + ICONVSOFILE=none + fi + ;; +*) + if test "$liteonly" = yes ; then + { echo "configure: error: you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support." 1>&2; exit 1; } + fi + ICONVSOFILE=$iconv_file + ;; +esac + + +PRELOAD_VAR="LD_PRELOAD" +PRELOAD_SEP=":" +PRELOAD_LAST="" +case "$host" in +*-solaris*) + PRELOAD_SEP=" " + ;; +*-linux*) + PRELOAD_SEP=" " + ;; +*-osf*) + PRELOAD_VAR="_RLD_LIST" + PRELOAD_LAST=":DEFAULT" + ;; +*-netbsd*) + if test -x /usr/bin/file -a -x /usr/bin/grep ; then + case "`/usr/bin/file /usr/bin/grep`" in + *ELF*) + PRELOAD_SEP=" " + ;; + esac + fi + ;; +esac + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:959: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:989: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1040: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 1083 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1114: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1119: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1147: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1190: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_shared=yes +fi + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=yes +fi + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_fast_install=yes ;; +no) enable_fast_install=no ;; +*) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_fast_install=yes +fi + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:1312: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1332: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1371: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:1395: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1398: checking for non-GNU ld" >&5 +fi +if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$ac_cv_path_LD" +if test -n "$LD"; then + echo "$ac_t""$LD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1433: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1449: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi +fi + +NM="$ac_cv_path_NM" +echo "$ac_t""$NM" 1>&6 + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1485: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + +# Check for any special flags to pass to ltconfig. +libtool_flags="--cache-file=$cache_file" +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" + + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + : +fi + +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$lt_target" in +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 1534 "configure"' > conftest.$ac_ext + if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +echo "configure:1556: checking whether the C compiler needs -belf" >&5 +if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_needs_belf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + lt_cv_cc_needs_belf=no +fi +rm -f conftest* +fi + +echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + + +esac + + +# Save cache, so that ltconfig can load it +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + +# Reload cache, that may have been modified by ltconfig +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log + + +for ac_prog in perl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1675: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PERL" in + /*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PERL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +PERL="$ac_cv_path_PERL" +if test -n "$PERL"; then + echo "$ac_t""$PERL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PERL" && break +done +test -n "$PERL" || PERL="perl" + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1713: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +for ac_hdr in unistd.h locale.h langinfo.h pwd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1796: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +if test "$install_runidn" = yes ; then + for ac_hdr in dlfcn.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1837: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +fi + +saved_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $ICONVINC" +if test "$liteonly" != yes ; then + ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for iconv.h""... $ac_c" 1>&6 +echo "configure:1880: checking for iconv.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +{ echo "configure: error: iconv.h doesn't exist" 1>&2; exit 1; } +fi + +fi +CPPFLAGS=$saved_CPPFLAGS + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:1916: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1950: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for BOOL""... $ac_c" 1>&6 +echo "configure:2054: checking for BOOL" >&5 +if eval "test \"`echo '$''{'ac_cv_type_BOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])BOOL[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_BOOL=yes +else + rm -rf conftest* + ac_cv_type_BOOL=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_BOOL" 1>&6 +if test $ac_cv_type_BOOL = no; then + cat >> confdefs.h <<\EOF +#define BOOL int +EOF + +fi + + +if test "$install_runidn" = yes ; then + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:2089: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 +echo "configure:2136: checking for inet_addr in -lnsl" >&5 +ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:2183: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + LIBS="-ldl $LIBS" + LIBDL="-ldl" + cat >> confdefs.h <<\EOF +#define HAVE_LIBDL 1 +EOF + + + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +for ac_func in vsnprintf setvbuf setlocale nl_langinfo memmove bcopy setenv \ + unsetenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2236: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test "$install_runidn" = yes ; then + for ac_func in gethostbyname gethostbyname2 gethostbyaddr +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2292: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in gethostbyname_r gethostbyname2_r gethostbyaddr_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2347: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in getipnodebyname getipnodebyaddr freehostent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2402: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in getaddrinfo freeaddrinfo getnameinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2457: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in dlopen dlsym +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2512: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +fi + +if test "$install_runidn" = yes ; then + echo $ac_n "checking flavor of gethostbyaddr""... $ac_c" 1>&6 +echo "configure:2568: checking flavor of gethostbyaddr" >&5 +if eval "test \"`echo '$''{'ac_cv_flavor_gethostbyaddr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_flavor_gethostbyaddr=unknown + if test "$cross_compiling" = yes; then + ac_cv_flavor_gethostbyaddr=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_gethostbyaddr=glibc2_2 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$cross_compiling" = yes; then + ac_cv_flavor_gethostbyaddr=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + struct hostent *gethostbyaddr(const char *addr, size_t len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_gethostbyaddr=glibc +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$cross_compiling" = yes; then + ac_cv_flavor_gethostbyaddr=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + struct hostent *gethostbyaddr(const char *addr, int len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_gethostbyaddr=traditional +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$ac_cv_func_gethostbyaddr" = no ; then + ac_cv_flavor_gethostbyaddr=none + fi +fi + +echo "$ac_t""$ac_cv_flavor_gethostbyaddr" 1>&6 + + case "$ac_cv_flavor_gethostbyaddr" in + glibc2_2) + ac_cv_type_ghba_addr_t='const void *' + ac_cv_type_ghba_addrlen_t='socklen_t' + ;; + glibc) + ac_cv_type_ghba_addr_t='const char *' + ac_cv_type_ghba_addrlen_t='size_t' + ;; + traditional | none) + ac_cv_type_ghba_addr_t='const char *' + ac_cv_type_ghba_addrlen_t='int' + ;; + *) + { echo "configure: error: can't build runidn, since parameter type list of gethostbyaddr() is unknown to configure." 1>&2; exit 1; } + ;; + esac + cat >> confdefs.h <> confdefs.h <&6 +echo "configure:2697: checking flavor of getnameinfo" >&5 +if eval "test \"`echo '$''{'ac_cv_flavor_getnameinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_flavor_getnameinfo=unknown + if test "$cross_compiling" = yes; then + ac_cv_flavor_getnameinfo=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + socklen_t hostlen, char *serv, socklen_t servlen, + unsigned int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_getnameinfo=glibc2_2_2 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$cross_compiling" = yes; then + ac_cv_flavor_getnameinfo=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + socklen_t hostlen, char *serv, socklen_t servlen, + int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_getnameinfo=rfc2553bis_03 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$cross_compiling" = yes; then + ac_cv_flavor_getnameinfo=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_getnameinfo=rfc2553 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$cross_compiling" = yes; then + ac_cv_flavor_getnameinfo=unknown +else + cat > conftest.$ac_ext < + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + +EOF +if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_getnameinfo=rfc2133 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + if test "$ac_cv_func_getnameinfo" = no ; then + ac_cv_flavor_getnameinfo=none + fi +fi + +echo "$ac_t""$ac_cv_flavor_getnameinfo" 1>&6 + + case "$ac_cv_flavor_getnameinfo" in + glibc2_2_2) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='socklen_t' + ac_cv_type_gni_servlen_t='socklen_t' + ac_cv_type_gni_flags_t='unsigned int' + ;; + rfc2553bis_03) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='socklen_t' + ac_cv_type_gni_servlen_t='socklen_t' + ac_cv_type_gni_flags_t='int' + ;; + rfc2553) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='size_t' + ac_cv_type_gni_servlen_t='size_t' + ac_cv_type_gni_flags_t='int' + ;; + rfc2133 | none) + ac_cv_type_gni_salen_t='size_t' + ac_cv_type_gni_hostlen_t='size_t' + ac_cv_type_gni_servlen_t='size_t' + ac_cv_type_gni_flags_t='int' + ;; + *) + { echo "configure: error: can't build runidn, since parameter type list of getnameinfo() is unknown to configure." 1>&2; exit 1; } + esac + cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 +echo "configure:2883: checking flavor of gethostbyname_r" >&5 +if eval "test \"`echo '$''{'ac_cv_flavor_gethost_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_flavor_gethost_r=sun +else + cat > conftest.$ac_ext < +#include +#include +#include +#include +int main() +{ + int err = 0; + struct hostent hebuf, *hp; + char buf[10]; + /* Try resolving a invalid name using glibc flavor. */ + (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err); + if (err != 0) + return 0; /* glibc flavor */ + else + return 1; /* Sun flavor */ +} + +EOF +if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_flavor_gethost_r=glibc +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_flavor_gethost_r=sun +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_flavor_gethost_r" 1>&6 + if test "$ac_cv_flavor_gethost_r" = "glibc"; then + cat >> confdefs.h <<\EOF +#define GETHOST_R_GLIBC_FLAVOR 1 +EOF + + fi +fi + + +echo $ac_n "checking for libc shared object""... $ac_c" 1>&6 +echo "configure:2938: checking for libc shared object" >&5 +shobj_name=libc +shobj_path= +case "$host" in +*-hpux*) + SOEXT=sl + ;; +*) + SOEXT=so + ;; +esac +for shobj_libdir in /lib /usr/lib; do + if test -f $shobj_libdir/$shobj_name.$SOEXT; then + shobj_path=$shobj_libdir/$shobj_name.$SOEXT + else + shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` + if test "$shobj_path" != "" -a -f "$shobj_path"; then + : + else + shobj_path= + fi + fi + if test "$shobj_path" != ""; then + echo "$ac_t""$shobj_path" 1>&6 + shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +if test "$install_runidn" = yes ; then + +echo $ac_n "checking for libnsl shared object""... $ac_c" 1>&6 +echo "configure:2977: checking for libnsl shared object" >&5 +shobj_name=libnsl +shobj_path= +case "$host" in +*-hpux*) + SOEXT=sl + ;; +*) + SOEXT=so + ;; +esac +for shobj_libdir in /lib /usr/lib; do + if test -f $shobj_libdir/$shobj_name.$SOEXT; then + shobj_path=$shobj_libdir/$shobj_name.$SOEXT + else + shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` + if test "$shobj_path" != "" -a -f "$shobj_path"; then + : + else + shobj_path= + fi + fi + if test "$shobj_path" != ""; then + echo "$ac_t""$shobj_path" 1>&6 + shobj_pathsymbol=SOPATH_`echo $shobj_name | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + +if test "$liteonly" != yes ; then + echo $ac_n "checking for iconv""... $ac_c" 1>&6 +echo "configure:3017: checking for iconv" >&5 + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $ICONVINC" + LIBS="$LIBS $ICONVLIB" + cat > conftest.$ac_ext < + +int main() { + + iconv_t i; + i = iconv_open("ISO-8859-1", "UTF-8"); + +; return 0; } +EOF +if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + iconv_try_link=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + iconv_try_link=no +fi +rm -f conftest* + LIBS=$saved_LIBS + CPPFLAGS=$saved_CPPFLAGS + echo "$ac_t""$iconv_try_link" 1>&6 + if test "$iconv_try_link" = no ; then + { echo "configure: error: iconv function not available" 1>&2; exit 1; } + fi +fi + +if test "$liteonly" != yes ; then + echo $ac_n "checking for codeset name $UTF8_NAME""... $ac_c" 1>&6 +echo "configure:3055: checking for codeset name $UTF8_NAME" >&5 + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $ICONVINC" + LIBS="$LIBS $ICONVLIB" + if test "$cross_compiling" = yes; then + utf8_name_valid=unknown +else + cat > conftest.$ac_ext < + #include + #include + #define UTF8_NAME "$UTF8_NAME" + #define ICONV_FAIL ((iconv_t)(-1)) + /* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */ + int main() { + int i; + /* list of codeset names likely to exist */ + static char *codeset[] = { + "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1", + "Shift_JIS", "SJIS", "sjis", NULL, + }; + + /* First try null conversion. */ + if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0; + + /* Unfortunately, above check fails on certain systems, such as Solaris. */ + for (i = 0; codeset[i] != NULL; i++) { + if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0; + } + return 1; + } + +EOF +if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + utf8_name_valid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + utf8_name_valid=no +fi +rm -fr conftest* +fi + + LIBS=$saved_LIBS + CPPFLAGS=$saved_CPPFLAGS + echo "$ac_t""$utf8_name_valid" 1>&6 +fi + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile + include/Makefile + include/idn/Makefile + include/mdn/Makefile + lib/Makefile + man/Makefile + tools/Makefile + tools/idnconv/Makefile + tools/runidn/Makefile + tools/runidn/runidn + map/Makefile + lib/tests/Makefile + include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@COMPAT_TRUE@%$COMPAT_TRUE%g +s%@COMPAT_FALSE@%$COMPAT_FALSE%g +s%@UTF8_NAME@%$UTF8_NAME%g +s%@LITEONLY_TRUE@%$LITEONLY_TRUE%g +s%@LITEONLY_FALSE@%$LITEONLY_FALSE%g +s%@RUNIDN_TRUE@%$RUNIDN_TRUE%g +s%@RUNIDN_FALSE@%$RUNIDN_FALSE%g +s%@ICONVINC@%$ICONVINC%g +s%@ICONVLIB@%$ICONVLIB%g +s%@ICONVSOFILE@%$ICONVSOFILE%g +s%@PRELOAD_VAR@%$PRELOAD_VAR%g +s%@PRELOAD_SEP@%$PRELOAD_SEP%g +s%@PRELOAD_LAST@%$PRELOAD_LAST%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@RANLIB@%$RANLIB%g +s%@LN_S@%$LN_S%g +s%@LIBTOOL@%$LIBTOOL%g +s%@PERL@%$PERL%g +s%@CPP@%$CPP%g +s%@LIBDL@%$LIBDL%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/contrib/idn/idnkit-1.0-src/configure.in b/contrib/idn/idnkit-1.0-src/configure.in new file mode 100644 index 0000000000..5d46c70c76 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/configure.in @@ -0,0 +1,711 @@ +dnl $Id: configure.in,v 1.1 2003/06/04 00:25:25 marka Exp $ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (c) 2000 Japan Network Information Center. All rights reserved. +dnl +dnl By using this file, you agree to the terms and conditions set forth bellow. +dnl +dnl LICENSE TERMS AND CONDITIONS +dnl +dnl The following License Terms and Conditions apply, unless a different +dnl license is obtained from Japan Network Information Center ("JPNIC"), +dnl a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +dnl Chiyoda-ku, Tokyo 101-0047, Japan. +dnl +dnl 1. Use, Modification and Redistribution (including distribution of any +dnl modified or derived work) in source and/or binary forms is permitted +dnl under this License Terms and Conditions. +dnl +dnl 2. Redistribution of source code must retain the copyright notices as they +dnl appear in each source code file, this License Terms and Conditions. +dnl +dnl 3. Redistribution in binary form must reproduce the Copyright Notice, +dnl this License Terms and Conditions, in the documentation and/or other +dnl materials provided with the distribution. For the purposes of binary +dnl distribution the "Copyright Notice" refers to the following language: +dnl "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +dnl +dnl 4. The name of JPNIC may not be used to endorse or promote products +dnl derived from this Software without specific prior written approval of +dnl JPNIC. +dnl +dnl 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +dnl BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +dnl ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +AC_INIT(include/idn/converter.h) + +AC_CANONICAL_HOST + +debug=no +AC_ARG_ENABLE(debug, +[ --enable-debug enable debug codes [default=no]], + debug=$enableval) +case "$debug" in +yes) + CFLAGS="$CFLAGS -DDEBUG" + ;; +esac + +mdnkit_compat=no +COMPAT_TRUE="#" +COMPAT_FALSE= +AC_ARG_ENABLE(mdnkit-compat, +[ --enable-mdnkit-compat enable mDNkit compatibility mode [default=no]], + mdnkit_compat=$enableval) +case "$mdnkit_compat" in +yes) + COMPAT_TRUE= + COMPAT_FALSE="#" + AC_DEFINE(ENABLE_MDNKIT_COMPAT, 1, + [Define if --enable-mdnkit-compat is specified]) + ;; +no) + ;; +*) + AC_MSG_ERROR([You must specify yes or no to --enable-runidn option.]) + ;; +esac +AC_SUBST(COMPAT_TRUE) +AC_SUBST(COMPAT_FALSE) + +extraace=no +AC_ARG_ENABLE(extra-ace, +[ --enable-extra-ace enable additional ACE converters. [default=no]], + extraace=$enableval) +case "$extraace" in +no) + ;; +yes) + AC_DEFINE(IDN_EXTRA_ACE, 1, + [Define if you want additional ACE converters compiled in.]) + ;; +*) + AC_MSG_ERROR([You must specify yes or no to --enable-extra-ace option.]) + ;; +esac + +UTF8_NAME=no +AC_ARG_WITH(utf8, +[ --with-utf8=NAME codeset name for UTF-8 encoding [UTF-8]], + UTF8_NAME=$withval) +case "$UTF8_NAME" in +no) + UTF8_NAME=UTF-8 + ;; +yes) + AC_MSG_ERROR([You must specify NAME to --with-utf8 option.]) + ;; +*) + AC_DEFINE_UNQUOTED(IDN_UTF8_ENCODING_NAME, "$UTF8_NAME", + [Define if your iconv() does not accept "UTF-8" as the codeset name for utf-8.]) + ;; +esac +AC_SUBST(UTF8_NAME) + +liteonly=no +LITEONLY_TRUE="#" +LITEONLY_FALSE= +AC_ARG_ENABLE(liteonly, +[ --enable-liteonly compile and install lite library only [default=no]], + liteonly=$enableval) +case "$liteonly" in +no) + ;; +yes) + if test "$install_runidn" = yes ; then + AC_MSG_ERROR([you can't set value \"yes\" to --enable-runidn and --enable-liteonly simultaneously, because runidn requires iconv support of generic libidnkit.]) + fi + LITEONLY_TRUE= + LITEONLY_FALSE="#" + ;; +*) + AC_MSG_ERROR([You must specify yes or no to --enable-liteonly option.]) + ;; +esac +AC_SUBST(LITEONLY_TRUE) +AC_SUBST(LITEONLY_FALSE) + +install_runidn=no +RUNIDN_TRUE="#" +RUNIDN_FALSE= +AC_ARG_ENABLE(runidn, +[ --enable-runidn compile and install runidn [default=no]], + install_runidn=$enableval) +case "$install_runidn" in +no) + ;; +yes) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set value \"yes\" to --enable-runidn and --enable-liteonly simultaneously, because runidn requires iconv support of generic libidnkit.]) + fi + RUNIDN_TRUE= + RUNIDN_FALSE="#" + ;; +*) + AC_MSG_ERROR([You must specify yes or no to --enable-runidn option.]) + ;; +esac +AC_SUBST(RUNIDN_TRUE) +AC_SUBST(RUNIDN_FALSE) + +ICONVINC= +ICONVLIB= + +libiconv=unspec +AC_ARG_WITH(libiconv, +[ --with-libiconv=IPREFIX GNU libiconv are installed in IPREFIX [PREFIX]], + libiconv=$withval) +case "$libiconv" in +unspec) + ;; +no) + ICONVINC= + ICONVLIB= + ;; +yes) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + if test X$prefix = XNONE ; then + libiconv=$ac_default_prefix + else + libiconv=$prefix + fi + ICONVINC="-I$libiconv/include" + ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" + ;; +*) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + ICONVINC="-I$libiconv/include" + ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" + ;; +esac + +iconv_include=unspec +AC_ARG_WITH(iconv-include, +[ --with-iconv-include=DIR iconv include files are in DIR []], + iconv_include=$withval) +case "$iconv_include" in +unspec) + ;; +no) + ICONVINC= + ;; +yes) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + AC_MSG_WARN([You must supply DIR to --with-iconv-include option. + Ignored.]) + ICONVINC= + ;; +*) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + ICONVINC="-I$iconv_include" + ;; +esac + +if test "X$ICONVINC" != X ; then + iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`" + if test ! -f "$iconv_include/iconv.h" ; then + AC_MSG_ERROR([iconv.h doesn't exist in $iconv_include]) + fi +fi + +AC_SUBST(ICONVINC) + +iconv=unspec +AC_ARG_WITH(iconv, +[ --with-iconv=LIB special library for iconv []], + iconv=$withval) +case "$iconv" in +unspec) + ;; +no) + ICONVLIB= + ;; +yes) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + AC_MSG_WARN([You must supply LIB to --with-iconv option. + -liconv is assumed.]) + ICONVLIB=-liconv + ;; +*) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + ICONVLIB=$iconv + ;; +esac +AC_SUBST(ICONVLIB) + +AC_ARG_WITH(iconv-sofile, +[ --with-iconv-sofile=PATH shared library file for libiconv []], + iconv_file=$withval, iconv_file=guess) +ICONVSOFILE= +case "$iconv_file" in +no) + ICONVSOFILE=none + ;; +yes) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + AC_MSG_ERROR([You must supply PATH to --with-iconv-sofile option.]) + ;; +guess) + if test "$liteonly" != yes ; then + if test "$ICONVLIB" = ""; then + ICONVSOFILE=none + else + AC_MSG_CHECKING(pathname of iconv shared library) + ic_libdir= + ic_libname= + case "$host" in + *-hpux*) + SO=sl + ;; + *) + SO=so + ;; + esac + for arg in $ICONVLIB; do + case "$arg" in + -L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;; + -l*) ic_libname=`echo $arg | sed s/-l//` ;; + /*.$SO*) ICONVSOFILE=$arg ;; + esac + done + if test "$ICONVSOFILE" = ""; then + if test "$ic_libname" = ""; then + AC_MSG_RESULT(unknown) + AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file]) + ICONVSOFILE=none + else + if test "$ic_libdir" = ""; then + # Standard (and semi-standard) library directories + ic_libdir="/lib /usr/lib /usr/local/lib" + fi + for dir in $ic_libdir; do + ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1` + if test "$ICONVSOFILE" != ""; then + break + fi + done + if test "$ICONVSOFILE" != ""; then + AC_MSG_RESULT($ICONVSOFILE) + else + AC_MSG_RESULT(unknown) + AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file]) + ICONVSOFILE=none + fi + fi + fi + fi + else + ICONVSOFILE=none + fi + ;; +*) + if test "$liteonly" = yes ; then + AC_MSG_ERROR([you can't set iconv options at all when you set value \"yes\" to --enable-liteonly, because lite library does not have iconv support.]) + fi + ICONVSOFILE=$iconv_file + ;; +esac +AC_SUBST(ICONVSOFILE) + +dnl Figure out preload stuff. +PRELOAD_VAR="LD_PRELOAD" +PRELOAD_SEP=":" +PRELOAD_LAST="" +case "$host" in +*-solaris*) + PRELOAD_SEP=" " + ;; +*-linux*) + PRELOAD_SEP=" " + ;; +*-osf*) + PRELOAD_VAR="_RLD_LIST" + PRELOAD_LAST=":DEFAULT" + ;; +*-netbsd*) + if test -x /usr/bin/file -a -x /usr/bin/grep ; then + case "`/usr/bin/file /usr/bin/grep`" in + *ELF*) + PRELOAD_SEP=" " + ;; + esac + fi + ;; +esac + +AC_SUBST(PRELOAD_VAR) +AC_SUBST(PRELOAD_SEP) +AC_SUBST(PRELOAD_LAST) + +dnl Checks for standard tools. +AC_PROG_CC +AC_PROG_INSTALL +AM_PROG_LIBTOOL + +AC_PATH_PROGS(PERL, perl, perl) + +dnl Checks for header files. +AC_CHECK_HEADERS(unistd.h locale.h langinfo.h pwd.h) +if test "$install_runidn" = yes ; then + AC_CHECK_HEADERS(dlfcn.h) +fi + +saved_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $ICONVINC" +if test "$liteonly" != yes ; then + AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR([iconv.h doesn't exist])]) +fi +CPPFLAGS=$saved_CPPFLAGS + +dnl Checks for data types. +AC_TYPE_UID_T +dnl for dnsproxy. +AC_CHECK_TYPE(BOOL, int) + +dnl Checks for libraries. +if test "$install_runidn" = yes ; then + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(nsl, inet_addr) + AC_CHECK_LIB(dl, dlopen, [ + LIBS="-ldl $LIBS" + LIBDL="-ldl" + AC_DEFINE(HAVE_LIBDL, 1, [Define if you have the dl library (-ldl).]) + AC_SUBST(LIBDL) + ]) +fi + +dnl Checks for library functions. +AC_CHECK_FUNCS(vsnprintf setvbuf setlocale nl_langinfo memmove bcopy setenv \ + unsetenv) +if test "$install_runidn" = yes ; then + AC_CHECK_FUNCS(gethostbyname gethostbyname2 gethostbyaddr) + AC_CHECK_FUNCS(gethostbyname_r gethostbyname2_r gethostbyaddr_r, find_gethost_r=yes) + AC_CHECK_FUNCS(getipnodebyname getipnodebyaddr freehostent) + AC_CHECK_FUNCS(getaddrinfo freeaddrinfo getnameinfo) + AC_CHECK_FUNCS(dlopen dlsym) +fi + +if test "$install_runidn" = yes ; then +dnl Checks the flavor of gethostbyaddr* functions. + AC_CACHE_CHECK(flavor of gethostbyaddr, ac_cv_flavor_gethostbyaddr, + [ac_cv_flavor_gethostbyaddr=unknown + AC_TRY_RUN( + [ + #include + #include + #include + #include + struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_gethostbyaddr=glibc2_2,, + ac_cv_flavor_gethostbyaddr=unknown) + AC_TRY_RUN( + [ + #include + #include + #include + #include + struct hostent *gethostbyaddr(const char *addr, size_t len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_gethostbyaddr=glibc,, + ac_cv_flavor_gethostbyaddr=unknown) + AC_TRY_RUN( + [ + #include + #include + #include + #include + struct hostent *gethostbyaddr(const char *addr, int len, int type) { + return NULL; + } + int main() { + (void)gethostbyaddr(NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_gethostbyaddr=traditional,, + ac_cv_flavor_gethostbyaddr=unknown) + if test "$ac_cv_func_gethostbyaddr" = no ; then + ac_cv_flavor_gethostbyaddr=none + fi]) + + case "$ac_cv_flavor_gethostbyaddr" in + glibc2_2) + ac_cv_type_ghba_addr_t='const void *' + ac_cv_type_ghba_addrlen_t='socklen_t' + ;; + glibc) + ac_cv_type_ghba_addr_t='const char *' + ac_cv_type_ghba_addrlen_t='size_t' + ;; + traditional | none) + ac_cv_type_ghba_addr_t='const char *' + ac_cv_type_ghba_addrlen_t='int' + ;; + *) + AC_MSG_ERROR([can't build runidn, since parameter type list of gethostbyaddr() is unknown to configure.]) + ;; + esac + AC_DEFINE_UNQUOTED(GHBA_ADDR_T, $ac_cv_type_ghba_addr_t, + [Define as the type of the 1st argument of gethostbyaddr.]) + AC_DEFINE_UNQUOTED(GHBA_ADDRLEN_T, $ac_cv_type_ghba_addrlen_t, + [Define as the type of the 2nd argument of gethostbyaddr.]) + +dnl Checks the flavor of getnameinfo functions. + AC_CACHE_CHECK(flavor of getnameinfo, ac_cv_flavor_getnameinfo, + [ac_cv_flavor_getnameinfo=unknown + AC_TRY_RUN( + [ + #include + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + socklen_t hostlen, char *serv, socklen_t servlen, + unsigned int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_getnameinfo=glibc2_2_2,, + ac_cv_flavor_getnameinfo=unknown) + AC_TRY_RUN( + [ + #include + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + socklen_t hostlen, char *serv, socklen_t servlen, + int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_getnameinfo=rfc2553bis_03,, + ac_cv_flavor_getnameinfo=unknown) + AC_TRY_RUN( + [ + #include + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_getnameinfo=rfc2553,, + ac_cv_flavor_getnameinfo=unknown) + AC_TRY_RUN( + [ + #include + #include + #include + #include + int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags) { + return NULL; + } + int main() { + (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); + return 0; + } + ], ac_cv_flavor_getnameinfo=rfc2133,, + ac_cv_flavor_getnameinfo=unknown) + if test "$ac_cv_func_getnameinfo" = no ; then + ac_cv_flavor_getnameinfo=none + fi]) + + case "$ac_cv_flavor_getnameinfo" in + glibc2_2_2) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='socklen_t' + ac_cv_type_gni_servlen_t='socklen_t' + ac_cv_type_gni_flags_t='unsigned int' + ;; + rfc2553bis_03) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='socklen_t' + ac_cv_type_gni_servlen_t='socklen_t' + ac_cv_type_gni_flags_t='int' + ;; + rfc2553) + ac_cv_type_gni_salen_t='socklen_t' + ac_cv_type_gni_hostlen_t='size_t' + ac_cv_type_gni_servlen_t='size_t' + ac_cv_type_gni_flags_t='int' + ;; + rfc2133 | none) + ac_cv_type_gni_salen_t='size_t' + ac_cv_type_gni_hostlen_t='size_t' + ac_cv_type_gni_servlen_t='size_t' + ac_cv_type_gni_flags_t='int' + ;; + *) + AC_MSG_ERROR([can't build runidn, since parameter type list of getnameinfo() is unknown to configure.]) + esac + AC_DEFINE_UNQUOTED(GNI_SALEN_T, $ac_cv_type_gni_salen_t, + [Define as the type of the 2nd argument of getnameinfo.]) + AC_DEFINE_UNQUOTED(GNI_HOSTLEN_T, $ac_cv_type_gni_hostlen_t, + [Define as the type of the 4th argument of getnameinfo.]) + AC_DEFINE_UNQUOTED(GNI_SERVLEN_T, $ac_cv_type_gni_servlen_t, + [Define as the type of the 6th argument of getnameinfo.]) + AC_DEFINE_UNQUOTED(GNI_FLAGS_T, $ac_cv_type_gni_flags_t, + [Define as the type of the 7th argument of getnameinfo.]) +fi + +dnl resume here. +dnl Checks the flavor of gethost*_r functions. +if test "$find_gethost_r" = yes; then + AC_CACHE_CHECK(flavor of gethostbyname_r, ac_cv_flavor_gethost_r, + [AC_TRY_RUN( +changequote(<<, >>)dnl +<< +#include +#include +#include +#include +#include +int main() +{ + int err = 0; + struct hostent hebuf, *hp; + char buf[10]; + /* Try resolving a invalid name using glibc flavor. */ + (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err); + if (err != 0) + return 0; /* glibc flavor */ + else + return 1; /* Sun flavor */ +} +>>, +changequote([, ])dnl + ac_cv_flavor_gethost_r=glibc, + ac_cv_flavor_gethost_r=sun, + ac_cv_flavor_gethost_r=sun)]) + if test "$ac_cv_flavor_gethost_r" = "glibc"; then + AC_DEFINE(GETHOST_R_GLIBC_FLAVOR, 1, + [Define if the prototype of gethost*_r is glibc flavor.]) + fi +fi + +dnl Find system shared object paths. +AC_FIND_SYSTEM_SHOBJ(libc) +if test "$install_runidn" = yes ; then + AC_FIND_SYSTEM_SHOBJ(libnsl) +fi + +dnl Checks for iconv library. +if test "$liteonly" != yes ; then + AC_MSG_CHECKING(for iconv) + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $ICONVINC" + LIBS="$LIBS $ICONVLIB" + AC_TRY_LINK([ + #include + ], [ + iconv_t i; + i = iconv_open("ISO-8859-1", "UTF-8"); + ], [iconv_try_link=yes], [iconv_try_link=no]) + LIBS=$saved_LIBS + CPPFLAGS=$saved_CPPFLAGS + AC_MSG_RESULT($iconv_try_link) + if test "$iconv_try_link" = no ; then + AC_MSG_ERROR(iconv function not available) + fi +fi + +dnl Check for codeset name for UTF-8. +if test "$liteonly" != yes ; then + AC_MSG_CHECKING([for codeset name $UTF8_NAME]) + saved_CPPFLAGS=$CPPFLAGS + saved_LIBS=$LIBS + CPPFLAGS="$CPPFLAGS $ICONVINC" + LIBS="$LIBS $ICONVLIB" + AC_TRY_RUN([ + #include + #include + #include + #define UTF8_NAME "$UTF8_NAME" + #define ICONV_FAIL ((iconv_t)(-1)) + /* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */ + int main() { + int i; + /* list of codeset names likely to exist */ + static char *codeset[] = { + "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1", + "Shift_JIS", "SJIS", "sjis", NULL, + }; + + /* First try null conversion. */ + if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0; + + /* Unfortunately, above check fails on certain systems, such as Solaris. */ + for (i = 0; codeset[i] != NULL; i++) { + if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0; + } + return 1; + } + ], utf8_name_valid=yes, utf8_name_valid=no, utf8_name_valid=unknown) + LIBS=$saved_LIBS + CPPFLAGS=$saved_CPPFLAGS + AC_MSG_RESULT($utf8_name_valid) +fi + +dnl Output. +AC_CONFIG_HEADER(include/config.h) +AC_OUTPUT( + Makefile + include/Makefile + include/idn/Makefile + include/mdn/Makefile + lib/Makefile + man/Makefile + tools/Makefile + tools/idnconv/Makefile + tools/runidn/Makefile + tools/runidn/runidn + map/Makefile + lib/tests/Makefile +) diff --git a/contrib/idn/idnkit-1.0-src/include/Makefile.in b/contrib/idn/idnkit-1.0-src/include/Makefile.in new file mode 100644 index 0000000000..8e76d39710 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/Makefile.in @@ -0,0 +1,65 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:25:33 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +SHELL = @SHELL@ + +SUBDIRS = idn mdn + +all: all-subdirs +install: install-subdirs +clean: clean-subdirs +distclean: distclean-localdir distclean-subdirs +check test: test-subdirs + +all-subdirs install-subdirs clean-subdirs distclean-subdirs test-subdirs: + @target=`echo $@ | sed 's/-subdirs$$//'`; \ + for d in $(SUBDIRS); do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) $$target); \ + done + +distclean-localdir: + rm -f config.h Makefile diff --git a/contrib/idn/idnkit-1.0-src/include/config.h.in b/contrib/idn/idnkit-1.0-src/include/config.h.in new file mode 100644 index 0000000000..ea4ae74512 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/config.h.in @@ -0,0 +1,181 @@ +/* include/config.h.in. Generated automatically from configure.in by autoheader. */ +/* $Id: config.h.in,v 1.1 2003/06/04 00:25:34 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define as an appropriate type (ex. int) if your system doesn't have. */ +#undef BOOL + +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + +/* Define if you have the dlopen function. */ +#undef HAVE_DLOPEN + +/* Define if you have the dlsym function. */ +#undef HAVE_DLSYM + +/* Define if you have the freeaddrinfo function. */ +#undef HAVE_FREEADDRINFO + +/* Define if you have the freehostent function. */ +#undef HAVE_FREEHOSTENT + +/* Define if you have the getaddrinfo function. */ +#undef HAVE_GETADDRINFO + +/* Define if you have the gethostbyaddr function. */ +#undef HAVE_GETHOSTBYADDR + +/* Define if you have the gethostbyaddr_r function. */ +#undef HAVE_GETHOSTBYADDR_R + +/* Define if you have the gethostbyname function. */ +#undef HAVE_GETHOSTBYNAME + +/* Define if you have the gethostbyname2 function. */ +#undef HAVE_GETHOSTBYNAME2 + +/* Define if you have the gethostbyname2_r function. */ +#undef HAVE_GETHOSTBYNAME2_R + +/* Define if you have the gethostbyname_r function. */ +#undef HAVE_GETHOSTBYNAME_R + +/* Define if you have the getipnodebyaddr function. */ +#undef HAVE_GETIPNODEBYADDR + +/* Define if you have the getipnodebyname function. */ +#undef HAVE_GETIPNODEBYNAME + +/* Define if you have the getnameinfo function. */ +#undef HAVE_GETNAMEINFO + +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the nl_langinfo function. */ +#undef HAVE_NL_LANGINFO + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the setvbuf function. */ +#undef HAVE_SETVBUF + +/* Define if you have the unsetenv function. */ +#undef HAVE_UNSETENV + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + +/* Define if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if you have the header file. */ +#undef HAVE_LANGINFO_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_PWD_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define if --enable-mdnkit-compat is specified */ +#undef ENABLE_MDNKIT_COMPAT + +/* Define if you want additional ACE converters compiled in. */ +#undef IDN_EXTRA_ACE + +/* Define if your iconv() does not accept UTF-8 as the codeset name for utf-8. */ +#undef IDN_UTF8_ENCODING_NAME + +/* Define if you have the dl library (-ldl). */ +#undef HAVE_LIBDL + +/* Define as the type of the 1st argument of gethostbyaddr. */ +#undef GHBA_ADDR_T + +/* Define as the type of the 2nd argument of gethostbyaddr. */ +#undef GHBA_ADDRLEN_T + +/* Define as the type of the 2nd argument of getnameinfo. */ +#undef GNI_SALEN_T + +/* Define as the type of the 4th argument of getnameinfo. */ +#undef GNI_HOSTLEN_T + +/* Define as the type of the 6th argument of getnameinfo. */ +#undef GNI_SERVLEN_T + +/* Define as the type of the 7th argument of getnameinfo. */ +#undef GNI_FLAGS_T + +/* Define if the prototype of gethost*_r is glibc flavor. */ +#undef GETHOST_R_GLIBC_FLAVOR + +/* Define as the pathname of the shared libc object if your system has one. */ +#undef SOPATH_LIBC + +/* Define as the pathname of the shared libnsl object if your system has one. */ +#undef SOPATH_LIBNSL diff --git a/contrib/idn/idnkit-1.0-src/include/config.h.win b/contrib/idn/idnkit-1.0-src/include/config.h.win new file mode 100644 index 0000000000..bd7f00f481 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/config.h.win @@ -0,0 +1,45 @@ +/* $Id: config.h.win,v 1.1 2003/06/04 00:25:34 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +/* for enabling RACE */ +#define IDN_EXTRA_ACE diff --git a/contrib/idn/idnkit-1.0-src/include/idn/Makefile.in b/contrib/idn/idnkit-1.0-src/include/idn/Makefile.in new file mode 100644 index 0000000000..8e20de8609 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/Makefile.in @@ -0,0 +1,103 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:25:34 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +includedir = @includedir@ +idnincludedir = $(includedir)/idn + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ + +HDRS = \ + api.h \ + assert.h \ + checker.h \ + converter.h \ + debug.h \ + delimitermap.h \ + export.h \ + filechecker.h \ + filemapper.h \ + localencoding.h \ + log.h \ + logmacro.h \ + mapper.h \ + mapselector.h \ + nameprep.h \ + normalizer.h \ + punycode.h \ + race.h \ + res.h \ + resconf.h \ + result.h \ + strhash.h \ + ucsmap.h \ + ucsset.h \ + unicode.h \ + unormalize.h \ + ucs4.h \ + utf8.h \ + util.h \ + version.h + +all: + +install: + $(MKINSTALLDIRS) $(DESTDIR)$(idnincludedir) + for hdr in $(HDRS); do \ + $(INSTALL_DATA) $(srcdir)/$$hdr $(DESTDIR)$(idnincludedir)/$$hdr; \ + done + +clean: + rm -f *~ + +distclean: clean + rm -f Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/include/idn/aliaslist.h b/contrib/idn/idnkit-1.0-src/include/idn/aliaslist.h new file mode 100644 index 0000000000..4551ea0661 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/aliaslist.h @@ -0,0 +1,114 @@ +/* $Id: aliaslist.h,v 1.1 2003/06/04 00:25:34 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_ALIASLIST_H +#define IDN_ALIASLIST_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct idn__aliaslist *idn__aliaslist_t; + +/* + * Create a list. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn__aliaslist_create(idn__aliaslist_t *listp); + +/* + * Delete a list created by 'idn__aliaslist_create'. + */ +extern void +idn__aliaslist_destroy(idn__aliaslist_t list); + +/* + * Parse alias information file and set items to the list. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- no such file. + * idn_invalid_syntax -- file is malformed. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn__aliaslist_aliasfile(idn__aliaslist_t list, const char *path); + +/* + * Add an item to the list. + * + * If top is 0, item is placed as the last item of the alias list. + * Otherwise, it is done as the first item. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn__aliaslist_additem(idn__aliaslist_t list, + const char *pattern, const char *encoding, + int first_item); + +/* + * Find the encoding name with the specified pattern by wildcard + * match. + * + * Returns: + * idn_success -- ok. found. + * idn_noentry -- not found. + */ +extern idn_result_t +idn__aliaslist_find(idn__aliaslist_t list, + const char *pattern, char **encodingp); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_ALIASLIST_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/api.h b/contrib/idn/idnkit-1.0-src/include/idn/api.h new file mode 100644 index 0000000000..3adf06ed49 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/api.h @@ -0,0 +1,298 @@ +/* $Id: api.h,v 1.1 2003/06/04 00:25:35 marka Exp $ */ +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_API_H +#define IDN_API_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +/* + * Application Programming Interface for Internationalized Domain Name + * Handling. This module provides high-level APIs for ordinary applications. + * Low-level APIs are also available. See "res.h" for details. + */ + +/* + * Enable or disable IDN conversion scheme. + * + * If on_off is 0, IDN conversion scheme is disabled. Otherwise, IDN + * conversion is enabled even when IDN_DISABLE is defined. + */ +IDN_EXPORT void +idn_enable(int on_off); + +/* + * Set configuration file name. + * This function is for private use only. + * + * When idn_nameinit(1) is called, this module loads `file'. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_failure -- idn_nameinit() has already been + * called. + */ +extern idn_result_t +idn__setconffile(const char *file); + +/* + * Initialize this module, and load configuration from the default + * configuration file (idn.conf). + * + * The initialization will be done only once when this function is + * called first, while either loading of the configuration file or + * setting the defaults behavior without the configuration file will + * be done every time it is called. + * + * If load_file is 0, this will set the defaults behavior without the + * configuration file. Otherwise, loading of the configuration file + * occurs. + * + * If 'idn_encodename' or 'idn_decodename' is called without calling + * this function, implicit initialization without the configuration + * file will be done prior to encoding/decoding process. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- cannot open the configuration file. + * idn_invalid_syntax -- syntax error found in the file. + * idn_invalid_name -- there are invalid names (encoding, + * normalization etc.). + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_nameinit(int load_file); + +/* + * Encode internationalized domain name. + * + * The encoding process consists of the following 7 steps. + * + * 1. Local encoding to UTF-8 conversion + * Converts a domain name written with local encoding (e.g. ISO- + * 8859-1) to UTF-8. + * 2. Delimiter mapping, + * Maps certain characters to period (U+002E, FULL STOP). + * 3. Local mapping + * Apply character mappings according with the TLD of the domain + * name. + * 4. NAMEPREP + * Perform NAME preparation described in RFC3491. + * This step consists of the following 4 steps: + * 4.1. Mapping + * 4.2. Normalization + * 4.3. Prohibited character check + * 4.4. Unassigned check + * 5. ASCII range character check + * Checks if the domain name contains non-LDH ASCII character (not + * alpha-numeric or hypen), or it begins or end with hypen. + * 6. UTF-8 to IDN encoding conversion. + * Converts the domain name from UTF-8 to ACE (e.g. Punycode). + * 7. Length check + * Checks the length of each label. + * + * 'actions' specifies actions and options of the encoding procedure. + * Its value is a bitwise-or of the following flags: + * + * IDN_LOCALCONV -- perform local encoding to UTF-8 conversion (step 1) + * IDN_DELIMMAP -- perform delimiter mapping (step 2) + * IDN_LOCALMAP -- perform local mapping (step 3) + * IDN_MAP -- perform mapping (step 4.1) + * IDN_NORMALIZE -- perform normalization (step 4.2) + * IDN_PROHCHECK -- perform prohibited character check (step 4.3) + * IDN_UNASCHECK -- perform unassigned codepoint check (step 4.4) + * IDN_ASCCHECK -- perform ASCII range character check (step 5) + * IDN_IDNCONV -- perform UTF-8 to IDN encoding conversion (step 6) + * IDN_LENCHECK -- perform length check (step 7) + * + * Also the following flags are provided for convinience: + * + * IDN_ENCODE_QUERY -- On libidnkit, perform step 1..7, except for step + * 4.4 and 5. + * On libidnkitlite, perform step 2..7, except for + * step 4.4 and 5. + * IDN_ENCODE_STORED -- On libidnkit, perform step 1..7, except for step + * 5. + * On libidnkitlite, perform step 2..7, except for + * step 5. + * IDN_ENCODE_APP -- Same as IDN_ENCODE_QUERY. + * IDN_NAMEPREP -- perform NAMEPREP (step 4) without unassigned + * codepoint check (step 4.4). + * + * The following flag does not corresponding to a particular action, + * but an option of conversion process: + * + * IDN_UNDOIFERR -- If any step fails, the original input name is + * returned. + * + * Note that if no flags are specified, 'idn_encodename' does nothing + * fancy, just copies the given name verbatim. + * + * Returns: + * idn_success -- ok. + * idn_invalid_action -- invalid action flag specified. + * idn_invalid_encoding -- the given string has invalid/illegal + * byte sequence. + * idn_invalid_length -- invalid length of a label. + * idn_prohibited -- prohibited/unassigned code point found. + * idn_buffer_overflow -- 'tolen' is too small. + * idn_nomemory -- malloc failed. + * + * Also, if this function is called without calling 'idn_nameinit', + * the following error codes might be returned. + * idn_nofile -- cannot open the configuration file. + * idn_invalid_syntax -- syntax error found in the file. + * idn_invalid_name -- there are invalid names (encoding, + * normalization etc.). + */ +IDN_EXPORT idn_result_t +idn_encodename(idn_action_t actions, const char *from, char *to, size_t tolen); + +/* + * Decode internationalized domain name. + * + * The decoding process consists of the following 5 steps. + * + * 1. delimiter mapping + * Maps certain characters to period (U+002E, FULL STOP). + * 2. NAMEPREP + * Perform NAME preparation described in RFC3491. + * This step consists of the following 4 steps: + * 2.1. Mapping + * 2.2. Normalization + * 2.3. Prohibited character check + * 2.4. Unassigned check + * 3. IDN encoding to UTF-8 conversion. + * Converts the domain name from ACE (e.g. Punycode) to UCS4. + * 4. Perform round-trip check. + * Encode the result of step 3, and then compare it with the result + * of the step 2. If they are different, the check is failed. + * 5. Convert UTF-8 to local encoding. + * If a character in the domain name cannot be converted to local + * encoding, the conversion is failed. + * + * 'actions' specifies actions of the decoding procedure. + * Its value is a bitwise-or of the following flags: + * + * IDN_DELIMMAP -- perform delimiter mapping (step 1) + * IDN_MAP -- perform mapping (step 2.1) + * IDN_NORMALIZE -- perform normalization (step 2.2) + * IDN_PROHCHECK -- perform prohibited character check (step 2.3) + * IDN_UNASCHECK -- perform unassigned codepoint check (step 2.4) + * IDN_IDNCONV -- perform IDN encoding to UTF-8 conversion (step 3) + * IDN_RTCHECK -- perform round-trip check (step 4) + * IDN_ASCCHECK -- perform ASCII range character check while + * round-trip check (step 4.1) + * IDN_LOCALCONV -- perform UTF-8 to local encoding conversion (step 5) + * + * Also the following flags are provided for the convenience: + * + * IDN_DECODE_QUERY -- On libidnkit, perform step 1..5, except for step + * 2.4 and 4.1. + * On libidnkitlite, perform step 1..3, except for + * step 2.4 and 4.1. + * IDN_DECODE_STORED -- On libidnkit, perform step 1..5, except for step + * 4.1. + * On libidnkitlite, perform step 1..3, except for + * step 4.1. + * IDN_DECODE_APP -- Same as IDN_DECODE_QUERY. + * IDN_NAMEPREP -- perform NAMEPREP (step 2) without unassigned + * codepoint check (step 2.4). + * + * If any step fails, the original input name is returned. + * 'actions' specifies what actions to take when decoding, and is + * a bitwise-or of the following flags: + * + * Note that if no flags are specified, 'idn_decodename' does nothing + * but copying the given name verbatim. + * + * Returns: + * idn_success -- ok. + * idn_invalid_action -- invalid action flag specified. + * idn_invalid_encoding -- the given string has invalid/illegal + * byte sequence. + * idn_buffer_overflow -- 'tolen' is too small. + * idn_invalid_length -- length of a label is not 1..63 characters. + * idn_nomemory -- malloc failed. + * + * Also, if this function is called without calling 'idn_nameinit', + * the following error codes might be returned. + * idn_nofile -- cannot open the configuration file. + * idn_invalid_syntax -- syntax error found in the file. + * idn_invalid_name -- there are invalid names (encoding, + * normalization etc.). + */ +IDN_EXPORT idn_result_t +idn_decodename(idn_action_t actions, const char *from, char *to, size_t tolen); + +/* + * Decode internationalized domain name with auxiliary encoding + * support. + * + * This is another API for IDN string decode. The difference between + * two is whether the encoding conversion from auxiliary encoding to + * UTF-8 occurs prior to the actual decode process (read description + * of idn_res_decodename() above) or not. + * + * If auxencoding is NULL, from is treated as UTF-8 encoded string. + * + * Other arguments serve exactly same role as those of + * idn_res_decodename(). + */ +idn_result_t +idn_decodename2(idn_action_t actions, const char *from, char *to, size_t tolen, + const char *auxencoding); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_API_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/assert.h b/contrib/idn/idnkit-1.0-src/include/idn/assert.h new file mode 100644 index 0000000000..060caca546 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/assert.h @@ -0,0 +1,61 @@ +/* $Id: assert.h,v 1.1 2003/06/04 00:25:35 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_ASSERT_H +#define IDN_ASSERT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifndef DEBUG +#define NDEBUG +#endif + +#ifdef __cplusplus +} +#endif + +# endif /* IDN_ASSERT_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/checker.h b/contrib/idn/idnkit-1.0-src/include/idn/checker.h new file mode 100644 index 0000000000..0d4e6d0465 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/checker.h @@ -0,0 +1,171 @@ +/* $Id: checker.h,v 1.1 2003/06/04 00:25:36 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_CHECKER_H +#define IDN_CHECKER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Character Checker. + * + * Perfom checking characters in the specified domain name. + */ + +#include +#include +#include + +/* + * Schems name prefixes for the standard nameprep prohibit/unassigned + * checks. + * + * If you'd like to add the unassigned check scheme of "RFC3491" + * to a checker context, IDN_CHECKER_UNASSIGNED_PREFIX + "RFC3491" + * (i.e. "unassigned#RFC3491") is the scheme name passed to + * idn_checker_add(). + */ +#define IDN_CHECKER_PROHIBIT_PREFIX "prohibit#" +#define IDN_CHECKER_UNASSIGNED_PREFIX "unassigned#" +#define IDN_CHECKER_BIDI_PREFIX "bidi#" + +/* + * Checker object type. + */ +typedef struct idn_checker *idn_checker_t; + +/* + * Initialize module. Must be called before any other calls of + * the functions of this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn_checker_initialize(void); + +/* + * Create a checker context. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn_checker_create(idn_checker_t *ctxp); + +/* + * Decrement reference count of the checker `ctx' created by + * 'idn_checker_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the checker. + */ +extern void +idn_checker_destroy(idn_checker_t ctx); + +/* + * Increment reference count of the checker `ctx' created by + * 'idn_checker_create'. + */ +extern void +idn_checker_incrref(idn_checker_t ctx); + +/* + * Add checking scheme `name' to the checker to `ctx'. + * + * Returns: + * idn_success -- ok. + * idn_invalid_name -- the given name is not valid. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn_checker_add(idn_checker_t ctx, const char *name); + +extern idn_result_t +idn_checker_addall(idn_checker_t ctx, const char **names, int nnames); + +/* + * Check a domain name. All checking schemes regsitered in `ctx' are + * applied in the regisration order. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_buffer_overflow -- output buffer is too small. + */ +extern idn_result_t +idn_checker_lookup(idn_checker_t ctx, const unsigned long *ucs4, + const unsigned long **found); + +/* + * Checking procedure type. + */ +typedef idn_result_t (*idn_checker_createproc_t)(const char *parameter, + void **ctxp); +typedef void (*idn_checker_destroyproc_t)(void *ctx); +typedef idn_result_t (*idn_checker_lookupproc_t)(void *ctx, + const unsigned long *ucs4, + const unsigned long **found); + +/* + * Register a new checking scheme. + * + * You can override the default normalization schemes, if you want. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn_checker_register(const char *prefix, + idn_checker_createproc_t create, + idn_checker_destroyproc_t destroy, + idn_checker_lookupproc_t lookup); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_CHECKER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/converter.h b/contrib/idn/idnkit-1.0-src/include/idn/converter.h new file mode 100644 index 0000000000..0c4e03dde1 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/converter.h @@ -0,0 +1,258 @@ +/* $Id: converter.h,v 1.1 2003/06/04 00:25:36 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_CONVERTER_H +#define IDN_CONVERTER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Codeset converter. + * + * This module provides conversions from some local codeset to UCS4 + * and vice versa. + */ + +#include +#include + +/* + * Converter context type (opaque). + */ +typedef struct idn_converter *idn_converter_t; + +/* + * Conversion flags. + */ +#define IDN_CONVERTER_DELAYEDOPEN 1 +#define IDN_CONVERTER_RTCHECK 2 + +/* + * Encoding types. + */ +#define IDN_NONACE 0 +#define IDN_ACE_STRICTCASE 1 +#define IDN_ACE_LOOSECASE 2 + +/* + * Initialize module. Must be called before any other calls of + * the functions of this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_converter_initialize(void); + +/* + * Create a conversion context. + * + * Returns: + * idn_success -- ok. + * idn_invalid_name -- specified codeset is not supported. + * idn_nomemory -- malloc failed. + * idn_failure -- other failure (unknown cause). + */ +IDN_EXPORT idn_result_t +idn_converter_create(const char *name, idn_converter_t *ctxp, + int flags); + +/* + * Decrement reference count of the converter `ctx' created by + * 'idn_converter_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the converter. + */ +IDN_EXPORT void +idn_converter_destroy(idn_converter_t ctx); + +/* + * Increment reference count of the converter `ctx' created by + * 'idn_converter_create'. + */ +IDN_EXPORT void +idn_converter_incrref(idn_converter_t ctx); + +/* + * Convert between local codeset and UCS4. Note that each conversion + * is started with initial state. + * + * Returns: + * idn_success -- ok. + * idn_buffer_overflow -- output buffer is too small. + * idn_invalid_encoding -- the input string has invalid/illegal + * byte sequence. + * idn_invalid_name -- codeset is not supported (this error + * should happen only if 'delayedopen' + * flag was set when idn_converter_create + * was called) + * idn_failure -- other failure. + */ +IDN_EXPORT idn_result_t +idn_converter_convfromucs4(idn_converter_t ctx, + const unsigned long *from, char *to, size_t tolen); + +IDN_EXPORT idn_result_t +idn_converter_convtoucs4(idn_converter_t ctx, + const char *from, unsigned long *to, size_t tolen); + +/* + * Get the name of local codeset. The returned name may be different from + * the one specified to idn_converter_create, if the specified one was an + * alias. + * + * Returns: + * the local codeset name. + */ +IDN_EXPORT char * +idn_converter_localencoding(idn_converter_t ctx); + +/* + * Return the encoding type of this local encoding. + * + * Returns: + * IDN_NONACE -- encoding is not ACE. + * IDN_ACE_STRICTCASE -- encoding is ACE. + * decoder of this ACE preserve letter case. + * IDN_ACE_LOOSECASE -- encoding type is ACE. + * decoder cannot preserve letter case. + */ +IDN_EXPORT int +idn_converter_encodingtype(idn_converter_t ctx); + +/* + * Return if this local encoding is ACE (Ascii Compatible Encoding). + * + * Returns: + * 1 -- yes, it is ACE. + * 0 -- no. + */ +IDN_EXPORT int +idn_converter_isasciicompatible(idn_converter_t ctx); + +/* + * Register an alias for a codeset name. + * + * If first_item is 0, alias pattern is placed as the last item of the + * alias list. Otherwise, it is done as the first item. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_converter_addalias(const char *alias_name, const char *real_name, + int first_item); + +/* + * Register aliases defined by the specified file. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- no such file. + * idn_invalid_syntax -- file is malformed. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_converter_aliasfile(const char *path); + +/* + * Unregister all the aliases. + */ +IDN_EXPORT idn_result_t +idn_converter_resetalias(void); + +/* + * resolve real encoding name from alias information. + */ +IDN_EXPORT const char * +idn_converter_getrealname(const char *name); + + +/* + * New converter registration. + */ + +/* + * Conversion operation functions. + */ +typedef idn_result_t (*idn_converter_openproc_t)(idn_converter_t ctx, + void **privdata); +typedef idn_result_t (*idn_converter_closeproc_t)(idn_converter_t ctx, + void *privdata); +typedef idn_result_t + (*idn_converter_convfromucs4proc_t)(idn_converter_t ctx, + void *privdata, + const unsigned long *from, + char *to, size_t tolen); +typedef idn_result_t + (*idn_converter_convtoucs4proc_t)(idn_converter_t ctx, + void *privdata, + const char *from, + unsigned long *to, + size_t tolen); + +/* + * Register a new converter. + * 'encoding_type' is a value which idn_converter_encodingtype() returns. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_converter_register(const char *name, + idn_converter_openproc_t openfromucs4, + idn_converter_openproc_t opentoucs4, + idn_converter_convfromucs4proc_t convfromucs4, + idn_converter_convtoucs4proc_t convtoucs4, + idn_converter_closeproc_t close, + int encoding_type); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_CONVERTER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/debug.h b/contrib/idn/idnkit-1.0-src/include/idn/debug.h new file mode 100644 index 0000000000..fad444c94b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/debug.h @@ -0,0 +1,69 @@ +/* $Id: debug.h,v 1.1 2003/06/04 00:25:36 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_DEBUG_H +#define IDN_DEBUG_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Debug utility + */ + +#include + +IDN_EXPORT char *idn__debug_hexstring(const char *s, int maxbytes); +IDN_EXPORT char *idn__debug_xstring(const char *s, int maxbytes); +IDN_EXPORT char *idn__debug_ucs4xstring(const unsigned long *s, int maxbytes); +IDN_EXPORT char *idn__debug_utf16xstring(const unsigned short *s, + int maxbytes); +IDN_EXPORT char *idn__debug_hexdata(const char *s, int length, int maxbytes); +IDN_EXPORT void idn__debug_hexdump(const char *s, int maxbytes); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_DEBUG_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/delimitermap.h b/contrib/idn/idnkit-1.0-src/include/idn/delimitermap.h new file mode 100644 index 0000000000..d9aa33abec --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/delimitermap.h @@ -0,0 +1,123 @@ +/* $Id: delimitermap.h,v 1.1 2003/06/04 00:25:37 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_DELIMITERMAP_H +#define IDN_DELIMITERMAP_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Mapper. + * + * Perfom mapping local delimiters to `.'. + */ + +#include +#include + +/* + * Map object type. + */ +typedef struct idn_delimitermap *idn_delimitermap_t; + +/* + * Create a delimitermap context. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_delimitermap_create(idn_delimitermap_t *ctxp); + +/* + * Decrement reference count of the delimitermap `ctx' created by + * 'idn_delimitermap_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the delimitermap. + */ +IDN_EXPORT void +idn_delimitermap_destroy(idn_delimitermap_t ctx); + +/* + * Increment reference count of the delimitermap `ctx' created by + * 'idn_delimitermap_create'. + */ +IDN_EXPORT void +idn_delimitermap_incrref(idn_delimitermap_t ctx); + +/* + * Add a local delimiter. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_invalid_codepoint -- delimiter is not valid UCS4 character. + */ +IDN_EXPORT idn_result_t +idn_delimitermap_add(idn_delimitermap_t ctx, unsigned long delimiter); + +IDN_EXPORT idn_result_t +idn_delimitermap_addall(idn_delimitermap_t ctx, unsigned long *delimiters, + int ndelimiters); + +/* + * Map local delimiters in `from' to `.'. + * + * Note that if no delimiter is added to the context, the function copies + * the string. + * + * Returns: + * idn_success -- ok. + * idn_buffer_overflow -- output buffer is too small. + */ +IDN_EXPORT idn_result_t +idn_delimitermap_map(idn_delimitermap_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_DELIMITERMAP_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/export.h b/contrib/idn/idnkit-1.0-src/include/idn/export.h new file mode 100644 index 0000000000..71e931482a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/export.h @@ -0,0 +1,58 @@ +/* $Id: export.h,v 1.1 2003/06/04 00:25:37 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_EXPORT_H +#define IDN_EXPORT_H 1 + +/* + * Macro for exporting functions. + * + * When creating a Windows DLL, define IDN_EXPORT something as + * "extern __declspec(dllexport)". + */ + +#ifndef IDN_EXPORT +#define IDN_EXPORT extern +#endif + +# endif /* IDN_EXPORT_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/filechecker.h b/contrib/idn/idnkit-1.0-src/include/idn/filechecker.h new file mode 100644 index 0000000000..c69c2b1e6f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/filechecker.h @@ -0,0 +1,136 @@ +/* $Id: filechecker.h,v 1.1 2003/06/04 00:25:37 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_FILECHECKER_H +#define IDN_FILECHECKER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Character checker -- check if there are any characters specified + * by a file in the given string. + */ + +#include + +/* + * Check object type. + */ +typedef struct idn__filechecker *idn__filechecker_t; + +/* + * Read the contents of the given file and create a context for + * checking. + * + * 'file' is the pathname of the file, which specifies the set of + * characters to be checked. The file is a simple text file, and + * each line must be of the form either + * + * or + * - + * (or comment, see below) where is a UCS code point + * represented as hexadecimal string with optional prefix `U+' + * (ex. `0041' or `U+FEDC'). + * + * The former specifies just one character (a code point, to be precise), + * while the latter specified a range of characters. In the case of + * a character range, the first code point (before hyphen) must not be + * greater than the second code point (after hyphen). + * + * Lines starting with `#' are comments. + * + * If file is read with no errors, the created context is stored in + * '*ctxp', and 'idn_success' is returned. Otherwise, the contents + * of '*ctxp' is undefined. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- cannot open the specified file. + * idn_nomemory -- malloc failed. + * idn_invalid_syntax -- file format is not valid. + */ +extern idn_result_t +idn__filechecker_create(const char *file, idn__filechecker_t *ctxp); + +/* + * Release memory for the specified context. + */ +extern void +idn__filechecker_destroy(idn__filechecker_t ctx); + +/* + * See if the given string contains any specified characters. + * + * Check if there is any characters pecified by the context 'ctx' in + * the UCS4 string 'str'. If there are none, NULL is stored in '*found'. + * Otherwise, the pointer to the first occurence of such character is + * stored in '*found'. + * + * Returns: + * idn_success -- ok. + */ +extern idn_result_t +idn__filechecker_lookup(idn__filechecker_t ctx, const unsigned long *str, + const unsigned long **found); + +/* + * The following functions are for internal use. + * They are used for this module to be add to the checker module. + */ +extern idn_result_t +idn__filechecker_createproc(const char *parameter, void **ctxp); + +extern void +idn__filechecker_destroyproc(void *ctxp); + +extern idn_result_t +idn__filechecker_lookupproc(void *ctx, const unsigned long *str, + const unsigned long **found); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_FILECHECKER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/filemapper.h b/contrib/idn/idnkit-1.0-src/include/idn/filemapper.h new file mode 100644 index 0000000000..1f8e6b94de --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/filemapper.h @@ -0,0 +1,137 @@ +/* $Id: filemapper.h,v 1.1 2003/06/04 00:25:38 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_FILEMAPPER_H +#define IDN_FILEMAPPER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Perform character mapping (substitution) according to a + * map file. + */ + +#include + +/* + * Mapping object type. + */ +typedef struct idn__filemapper *idn__filemapper_t; + +/* + * Read the contents of the given map file and create a context for mapping. + * + * 'file' is the pathname of the file, which specifies the character + * mapping. The file is a simple text file, and each line specifies + * a mapping of a single character. The format of each line is + * + * ; [..][;] + * + * where is a UCS code point represented as a hexadecimal + * string with optional prefix `U+' (ex. `0041' or `U+FEDC'). + * The code point before the first semicolon will be mapped to the + * sequence of code points separated by space characters after the + * first semicolon. The sequence may be empty, denoting wiping out + * the character. + * + * For example, + * U+0041; U+0061 -- maps 'A' to 'a' + * 20;; -- wipes out ' ' + * + * Anything after the second semicolon is ignored. Also lines beginning + * with '#' are treated as comments. + * + * If there is no error, the created context is stored in '*ctxp'. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- cannot open the specified file. + * idn_nomemory -- malloc failed. + * idn_invalid_syntax -- file format is not valid. + */ +extern idn_result_t +idn__filemapper_create(const char *file, idn__filemapper_t *ctxp); + +/* + * Release memory for the given context. + */ +extern void +idn__filemapper_destroy(idn__filemapper_t ctx); + +/* + * Perform character substitution. + * + * Each character in the string 'from' is examined and if it + * has a mapping, it is substituted to the corresponding + * character sequence. The substituted string is stored in 'to', + * whose length is specified by 'tolen'. + * + * Returns: + * idn_success -- ok. + * idn_buffer_overflow -- result buffer is too small. + */ +extern idn_result_t +idn__filemapper_map(idn__filemapper_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen); + +/* + * The following functions are for internal use. + * They are used for this module to be add to the mapper module. + */ +extern idn_result_t +idn__filemapper_createproc(const char *parameter, void **ctxp); + +extern void +idn__filemapper_destroyproc(void *ctxp); + +extern idn_result_t +idn__filemapper_mapproc(void *ctx, const unsigned long *from, + unsigned long *to, size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_FILEMAPPER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/localencoding.h b/contrib/idn/idnkit-1.0-src/include/idn/localencoding.h new file mode 100644 index 0000000000..012c08ab20 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/localencoding.h @@ -0,0 +1,79 @@ +/* $Id: localencoding.h,v 1.1 2003/06/04 00:25:38 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_LOCALENCODING_H +#define IDN_LOCALENCODING_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Local codeset detection. + * + * Determine the local codeset (the codeset used by the current application), + * based on the locale information. + */ + +#include + +#define IDN_LOCALCS_ENV "IDN_LOCAL_CODESET" + +/* + * Get the codeset name corresponding to the current locale, + * suitable for passing to 'idn_converter_create'. + * + * If the codeset cannot be determined, the locale name itself + * will be returned in the hope that codeset alias file translates it + * to the right name. + * + * If it cannot retrieve the current locale name, NULL will be + * returned. + */ +IDN_EXPORT const char *idn_localencoding_name(void); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_LOCALENCODING_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/log.h b/contrib/idn/idnkit-1.0-src/include/idn/log.h new file mode 100644 index 0000000000..52ea82d3ab --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/log.h @@ -0,0 +1,107 @@ +/* $Id: log.h,v 1.1 2003/06/04 00:25:38 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_LOG_H +#define IDN_LOG_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * libidnkit logging facility. + */ + +#include + +/* + * Log level definition. + */ +enum { + idn_log_level_fatal = 0, + idn_log_level_error = 1, + idn_log_level_warning = 2, + idn_log_level_info = 3, + idn_log_level_trace = 4, + idn_log_level_dump = 5 +}; + +/* + * Log handler type. + */ +typedef void (*idn_log_proc_t)(int level, const char *msg); + +/* + * Log routines. + */ +IDN_EXPORT void idn_log_fatal(const char *fmt, ...); +IDN_EXPORT void idn_log_error(const char *fmt, ...); +IDN_EXPORT void idn_log_warning(const char *fmt, ...); +IDN_EXPORT void idn_log_info(const char *fmt, ...); +IDN_EXPORT void idn_log_trace(const char *fmt, ...); +IDN_EXPORT void idn_log_dump(const char *fmt, ...); + +/* + * Set/get log level. + * + * If log level has not been explicitly defined by 'idn_log_setlevel', + * the default level is determined by the value of enrironment + * variable 'IDN_LOG_LEVEL'. + */ +IDN_EXPORT void idn_log_setlevel(int level); +IDN_EXPORT int idn_log_getlevel(void); + +/* + * Set log handler. + * + * If no log handler is set, log goes to stderr by default. + * You can reset the handler to the default one by specifying + * NULL. + */ +IDN_EXPORT void idn_log_setproc(idn_log_proc_t proc); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_LOG_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/logmacro.h b/contrib/idn/idnkit-1.0-src/include/idn/logmacro.h new file mode 100644 index 0000000000..22b26deedd --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/logmacro.h @@ -0,0 +1,72 @@ +/* $Id: logmacro.h,v 1.1 2003/06/04 00:25:38 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_LOGMACRO_H +#define IDN_LOGMACRO_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define FATAL(x) idn_log_fatal x +#define ERROR(x) idn_log_error x +#define WARNING(x) idn_log_warning x +#define INFO(x) LOG_AT_LEVEL(idn_log_level_info, idn_log_info, x) +#define TRACE(x) LOG_AT_LEVEL(idn_log_level_trace, idn_log_trace, x) + +#ifdef DEBUG +#define DUMP(x) LOG_AT_LEVEL(idn_log_level_dump, idn_log_dump, x) +#else +#define DUMP(x) +#endif /* DEBUG */ + +#define LOG_AT_LEVEL(lv, fun, x) do {if (LOGLEVEL >= (lv)) fun x; } while (0) +#define LOGLEVEL idn_log_getlevel() + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_LOGMACRO_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/mapper.h b/contrib/idn/idnkit-1.0-src/include/idn/mapper.h new file mode 100644 index 0000000000..4375b74ccb --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/mapper.h @@ -0,0 +1,159 @@ +/* $Id: mapper.h,v 1.1 2003/06/04 00:25:38 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_MAPPER_H +#define IDN_MAPPER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Mapper. + * + * Perfom mapping the specified domain name. + */ + +#include +#include +#include +#include + +/* + * Map object type. + */ +typedef struct idn_mapper *idn_mapper_t; + +/* + * Initialize module. Must be called before any other calls of + * the functions of this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapper_initialize(void); + +/* + * Create a mapper context. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapper_create(idn_mapper_t *ctxp); + +/* + * Decrement reference count of the mapper `ctx' created by + * 'idn_mapper_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the mapper. + */ +IDN_EXPORT void +idn_mapper_destroy(idn_mapper_t ctx); + +/* + * Increment reference count of the mapper `ctx' created by + * 'idn_mapper_create'. + */ +IDN_EXPORT void +idn_mapper_incrref(idn_mapper_t ctx); + +/* + * Add mapping scheme `name' to the mapper to `ctx'. + * + * Returns: + * idn_success -- ok. + * idn_invalid_name -- the given name is not valid. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapper_add(idn_mapper_t ctx, const char *name); + +IDN_EXPORT idn_result_t +idn_mapper_addall(idn_mapper_t ctx, const char **names, int nnames); + +/* + * Map an UCS4 string. All mapping schemes regsitered in `ctx' + * are applied in the regisration order. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_buffer_overflow -- output buffer is too small. + */ +IDN_EXPORT idn_result_t +idn_mapper_map(idn_mapper_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen); + +/* + * Mapping procedure type. + */ +typedef idn_result_t (*idn_mapper_createproc_t)(const char *parameter, + void **ctxp); +typedef void (*idn_mapper_destroyproc_t)(void *ctxp); +typedef idn_result_t (*idn_mapper_mapproc_t)(void *ctx, + const unsigned long *from, + unsigned long *, size_t); + +/* + * Register a new mapping scheme. + * + * You can override the default normalization schemes, if you want. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapper_register(const char *prefix, + idn_mapper_createproc_t create, + idn_mapper_destroyproc_t destroy, + idn_mapper_mapproc_t map); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_MAPPER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/mapselector.h b/contrib/idn/idnkit-1.0-src/include/idn/mapselector.h new file mode 100644 index 0000000000..24485cad75 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/mapselector.h @@ -0,0 +1,165 @@ +/* $Id: mapselector.h,v 1.1 2003/06/04 00:25:39 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_MAPSELECTOR_H +#define IDN_MAPSELECTOR_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Map selector. + * + * Perfom mapping the specified domain name according with the TLD + * of the donmain name. + */ + +#include +#include +#include + +/* + * Special TLDs for map selection. + */ +#define IDN_MAPSELECTOR_NOTLD "-" +#define IDN_MAPSELECTOR_DEFAULTTLD "." + +IDN_EXPORT const unsigned long * +idn_mapselector_getnotld(void); + +IDN_EXPORT const unsigned long * +idn_mapselector_getdefaulttld(void); + +/* + * Mapselector object type. + */ +typedef struct idn_mapselector *idn_mapselector_t; + +/* + * Initialize module. Must be called before any other calls of + * the functions of this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapselector_initialize(void); + +/* + * Create a mapselector context. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapselector_create(idn_mapselector_t *ctxp); + +/* + * Decrement reference count of the mapselector `ctx' created by + * 'idn_mapselector_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the mapselector. + */ +IDN_EXPORT void +idn_mapselector_destroy(idn_mapselector_t ctx); + +/* + * Increment reference count of the mapselector `ctx' created by + * 'idn_mapselector_create'. + */ +IDN_EXPORT void +idn_mapselector_incrref(idn_mapselector_t ctx); + +/* + * Return the mapper for `tld' registered in `ctx', or return NULL if + * mapper for `tld' is not registered. + */ +IDN_EXPORT idn_mapper_t +idn_mapselector_mapper(idn_mapselector_t ctx, const char *tld); + +/* + * Add mapping scheme `name' to the mapper for `tld' to the mapselector + * context `ctx'. If no mapper for `TLD' has not been registered, the + * function creates a new mapper for `tld', and then adds the given mapping + * scheme to the mapper. Otherwise, it adds the scheme to the mapper for + * TLD registered in `ctx'. + * + * Returns: + * idn_success -- ok. + * idn_invalid_name -- the given tld or name is not valid. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_mapselector_add(idn_mapselector_t ctx, const char *tld, const char *name); + +IDN_EXPORT idn_result_t +idn_mapselector_addall(idn_mapselector_t ctx, const char *tld, + const char **names, int nnames); + +/* + * Map an UCS4 string with the mapper for TLD of the domain name. + * If there is no mapper suitable for the domain name, the function + * simply copies the doman name. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_buffer_overflow -- output buffer is too small. + * idn_invalid_name -- the given tld is not valid. + */ +IDN_EXPORT idn_result_t +idn_mapselector_map(idn_mapselector_t ctx, const unsigned long *from, + const char *tld, unsigned long *to, size_t tolen); + +IDN_EXPORT idn_result_t +idn_mapselector_map2(idn_mapselector_t ctx, const unsigned long *from, + const unsigned long *tld, unsigned long *to, + size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_MAPSELECTOR_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/nameprep.h b/contrib/idn/idnkit-1.0-src/include/idn/nameprep.h new file mode 100644 index 0000000000..57f6fe52b3 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/nameprep.h @@ -0,0 +1,185 @@ +/* $Id: nameprep.h,v 1.1 2003/06/04 00:25:39 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_NAMEPREP_H +#define IDN_NAMEPREP_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Perform NAMEPREP (mapping, prohibited/unassigned checking). + */ + +#include +#include + +/* + * BIDI type codes. + */ +typedef enum { + idn_biditype_r_al, + idn_biditype_l, + idn_biditype_others +} idn_biditype_t; + +/* + * A Handle for nameprep operations. + */ +typedef struct idn_nameprep *idn_nameprep_t; + + +/* + * The latest version of nameprep. + */ +#define IDN_NAMEPREP_CURRENT "RFC3491" + +/* + * Create a handle for nameprep operations. + * The handle is stored in '*handlep', which is used other functions + * in this module. + * The version of the NAMEPREP specification can be specified with + * 'version' parameter. If 'version' is NULL, the latest version + * is used. + * + * Returns: + * idn_success -- ok. + * idn_notfound -- specified version not found. + */ +IDN_EXPORT idn_result_t +idn_nameprep_create(const char *version, idn_nameprep_t *handlep); + +/* + * Close a handle, which was created by 'idn_nameprep_create'. + */ +IDN_EXPORT void +idn_nameprep_destroy(idn_nameprep_t handle); + +/* + * Perform character mapping on an UCS4 string specified by 'from', and + * store the result into 'to', whose length is specified by 'tolen'. + * + * Returns: + * idn_success -- ok. + * idn_buffer_overflow -- result buffer is too small. + */ +IDN_EXPORT idn_result_t +idn_nameprep_map(idn_nameprep_t handle, const unsigned long *from, + unsigned long *to, size_t tolen); + +/* + * Check if an UCS4 string 'str' contains any prohibited characters specified + * by the draft. If found, the pointer to the first such character is stored + * into '*found'. Otherwise '*found' will be NULL. + * + * Returns: + * idn_success -- check has been done properly. (But this + * does not mean that no prohibited character + * was found. Check '*found' to see the + * result.) + */ +IDN_EXPORT idn_result_t +idn_nameprep_isprohibited(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found); + +/* + * Check if an UCS4 string 'str' contains any unassigned characters specified + * by the draft. If found, the pointer to the first such character is stored + * into '*found'. Otherwise '*found' will be NULL. + * + * Returns: + * idn_success -- check has been done properly. (But this + * does not mean that no unassinged character + * was found. Check '*found' to see the + * result.) + */ +IDN_EXPORT idn_result_t +idn_nameprep_isunassigned(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found); + +/* + * Check if an UCS4 string 'str' is valid string specified by ``bidi check'' + * of the draft. If it is not valid, the pointer to the first invalid + * character is stored into '*found'. Otherwise '*found' will be NULL. + * + * Returns: + * idn_success -- check has been done properly. (But this + * does not mean that the string was valid. + * Check '*found' to see the result.) + */ +IDN_EXPORT idn_result_t +idn_nameprep_isvalidbidi(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found); + +/* + * The following functions are for internal use. + * They are used for this module to be add to the checker and mapper modules. + */ +IDN_EXPORT idn_result_t +idn_nameprep_createproc(const char *parameter, void **handlep); + +IDN_EXPORT void +idn_nameprep_destroyproc(void *handle); + +IDN_EXPORT idn_result_t +idn_nameprep_mapproc(void *handle, const unsigned long *from, + unsigned long *to, size_t tolen); + +IDN_EXPORT idn_result_t +idn_nameprep_prohibitproc(void *handle, const unsigned long *str, + const unsigned long **found); + +IDN_EXPORT idn_result_t +idn_nameprep_unassignedproc(void *handle, const unsigned long *str, + const unsigned long **found); + +IDN_EXPORT idn_result_t +idn_nameprep_bidiproc(void *handle, const unsigned long *str, + const unsigned long **found); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_NAMEPREP_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/normalizer.h b/contrib/idn/idnkit-1.0-src/include/idn/normalizer.h new file mode 100644 index 0000000000..85a1103c21 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/normalizer.h @@ -0,0 +1,155 @@ +/* $Id: normalizer.h,v 1.1 2003/06/04 00:25:40 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_NORMALIZER_H +#define IDN_NORMALIZER_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Domain name normalizer. + * + * Perform normalization on the specified strings. String must be + * in UCS4 encoding. + */ + +#include +#include + +/* + * Normalizer type (opaque). + */ +typedef struct idn_normalizer *idn_normalizer_t; + +/* + * Normalizer procedure type. + */ +typedef idn_result_t (*idn_normalizer_proc_t)(const unsigned long *from, + unsigned long *to, size_t tolen); + +/* + * Initialize this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_normalizer_initialize(void); + +/* + * Create a empty normalizer. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_normalizer_create(idn_normalizer_t *ctxp); + +/* + * Decrement reference count of the normalizer `ctx' created by + * 'idn_normalizer_create', if it is still refered by another object. + * Otherwise, release all the memory allocated to the normalizer. + */ +IDN_EXPORT void +idn_normalizer_destroy(idn_normalizer_t ctx); + +/* + * Increment reference count of the normalizer `ctx' created by + * 'idn_normalizer_create'. + */ +IDN_EXPORT void +idn_normalizer_incrref(idn_normalizer_t ctx); + +/* + * Add a normalization scheme to a normalizer. + * + * Multiple shemes can be added to a normalizer, and they will be + * applied in order. + * + * Returns: + * idn_success -- ok. + * idn_invalid_name -- unknown scheme was specified. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_normalizer_add(idn_normalizer_t ctx, const char *scheme_name); + +IDN_EXPORT idn_result_t +idn_normalizer_addall(idn_normalizer_t ctx, const char **scheme_names, + int nschemes); + +/* + * Perform normalization(s) defined by a normalizer to the specified string, + * If the normalizer has two or more normalization schemes, they are + * applied in order. + * + * Returns: + * idn_success -- ok. + * idn_buffer_overflow -- output buffer is too small. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_normalizer_normalize(idn_normalizer_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen); + +/* + * Register a new normalization scheme. + * + * You can override the default normalization schemes, if you want. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_normalizer_register(const char *scheme_name, idn_normalizer_proc_t proc); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_NORMALIZER_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/punycode.h b/contrib/idn/idnkit-1.0-src/include/idn/punycode.h new file mode 100644 index 0000000000..32cf147997 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/punycode.h @@ -0,0 +1,70 @@ +/* $Id: punycode.h,v 1.1 2003/06/04 00:25:40 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_PUNYCODE_H +#define IDN_PUNYCODE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Punycode Converter. + */ + +#include +#include + +extern idn_result_t +idn__punycode_decode(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen); + +extern idn_result_t +idn__punycode_encode(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_PUNYCODE_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/race.h b/contrib/idn/idnkit-1.0-src/include/idn/race.h new file mode 100644 index 0000000000..bb713a2330 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/race.h @@ -0,0 +1,72 @@ +/* $Id: race.h,v 1.1 2003/06/04 00:25:40 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_RACE_H +#define IDN_RACE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * RACE Converter. + * + * See Internet Draft draft-ietf-idn-race-03.txt for details. + */ + +#include +#include + +extern idn_result_t +idn__race_encode(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen); + +extern idn_result_t +idn__race_decode(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_RACE_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/res.h b/contrib/idn/idnkit-1.0-src/include/idn/res.h new file mode 100644 index 0000000000..7502543a33 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/res.h @@ -0,0 +1,309 @@ +/* $Id: res.h,v 1.1 2003/06/04 00:25:41 marka Exp $ */ +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_RES_H +#define IDN_RES_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Resolver library support. + * + * All the functions provided by this module requires IDN resolver + * configuration context of type 'idn_resconf_t' as an argument. + * This context holds information described in the configuration file + * (idn.conf). See idn_resconf module for details. + * + * All functions also accept NULL as the context, but since + * no conversion/normalization will be done in this case, it is + * pretty useless. + */ + +#include +#include +#include + +typedef unsigned long idn_action_t; + +/* + * Actions + */ +#define IDN_LOCALCONV 0x00000001 /* Local encoding <-> UTF-8 conversion */ +#define IDN_DELIMMAP 0x00000002 /* Delimiter mapping */ +#define IDN_LOCALMAP 0x00000004 /* Local mapping */ +#define IDN_MAP 0x00000008 /* NAMEPREP map */ +#define IDN_NORMALIZE 0x00000010 /* NAMEPREP normalize */ +#define IDN_PROHCHECK 0x00000020 /* NAMEPREP prohibited character check */ +#define IDN_UNASCHECK 0x00000040 /* Unassigned code point check */ +#define IDN_BIDICHECK 0x00000080 /* bidirectional string check */ +#define IDN_ASCCHECK 0x00000100 /* Non-LDH ASCII check */ +#define IDN_IDNCONV 0x00000200 /* UTF-8 <-> IDN encoding conversion */ +#define IDN_LENCHECK 0x00000400 /* Label length check */ +#define IDN_RTCHECK 0x00000800 /* Round trip check */ +#define IDN_UNDOIFERR 0x00001000 /* Option: undo if error occurs */ + +#define IDN_ENCODE_QUERY 0x00002000 /* Encode query string */ +#define IDN_DECODE_QUERY 0x00004000 /* Decode query string */ + +#define IDN_ENCODE_APP \ +(IDN_ENCODE_QUERY | IDN_ASCCHECK) /* Standard encode */ +#define IDN_DECODE_APP \ +(IDN_DECODE_QUERY | IDN_ASCCHECK) /* Standard decode */ + +#define IDN_ENCODE_STORED \ +(IDN_ENCODE_QUERY | IDN_ASCCHECK | IDN_UNASCHECK) /* Encode query string */ +#define IDN_DECODE_STORED \ +(IDN_DECODE_QUERY | IDN_ASCCHECK | IDN_UNASCHECK) /* Decode query string */ + + +#define IDN_NAMEPREP \ +(IDN_MAP | IDN_NORMALIZE | IDN_PROHCHECK | IDN_BIDICHECK) + +/* + * Enable or disable IDN conversion scheme. + * + * If on_off is 0, IDN conversion scheme is disabled. Otherwise, IDN + * conversion is enabled even when IDN_DISABLE is defined. + */ +IDN_EXPORT void +idn_res_enable(int on_off); + +/* + * Encode internationalized domain name. + * + * The encoding process consists of the following 7 steps. + * + * 1. Local encoding to UTF-8 conversion + * Converts a domain name written with local encoding (e.g. ISO- + * 8859-1) to UTF-8. + * 2. Delimiter mapping, + * Maps certain characters to period (U+002E, FULL STOP). + * 3. Local mapping + * Apply character mappings according with the TLD of the domain + * name. + * 4. NAMEPREP + * Perform NAME preparation described in RFC3491. + * This step consists of the following 4 steps: + * 4.1. Mapping + * 4.2. Normalization + * 4.3. Prohibited character check + * 4.4. Unassigned check + * 5. ASCII range character check + * Checks if the domain name contains non-LDH ASCII character (not + * alpha-numeric or hypen), or it begins or end with hypen. + * 6. UTF-8 to IDN encoding conversion. + * Converts the domain name from UTF-8 to ACE (e.g. Punycode). + * 7. Length check + * Checks the length of each label. + * + * 'actions' specifies actions and options of the encoding procedure. + * Its value is a bitwise-or of the following flags: + * + * IDN_LOCALCONV -- perform local encoding to UTF-8 conversion (step 1) + * IDN_DELIMMAP -- perform delimiter mapping (step 2) + * IDN_LOCALMAP -- perform local mapping (step 3) + * IDN_MAP -- perform mapping (step 4.1) + * IDN_NORMALIZE -- perform normalization (step 4.2) + * IDN_PROHCHECK -- perform prohibited character check (step 4.3) + * IDN_UNASCHECK -- perform unassigned codepoint check (step 4.4) + * IDN_ASCCHECK -- perform ASCII range character check (step 5) + * IDN_IDNCONV -- perform UTF-8 to IDN encoding conversion (step 6) + * IDN_LENCHECK -- perform length check (step 7) + * + * Also the following flags are provided for convinience: + * + * IDN_ENCODE_QUERY -- On libidnkit, perform step 1..7, except for step + * 4.4 and 5. + * On libidnkitlite, perform step 2..7, except for + * step 4.4 and 5. + * IDN_ENCODE_STORED -- On libidnkit, perform step 1..7, except for step + * 5. + * On libidnkitlite, perform step 2..7, except for + * step 5. + * IDN_ENCODE_APP -- Same as IDN_ENCODE_QUERY. + * IDN_NAMEPREP -- perform NAMEPREP (step 4) without unassigned + * codepoint check (step 4.4). + * + * The following flag does not corresponding to a particular action, + * but an option of conversion process: + * + * IDN_UNDOIFERR -- If any step fails, the original input name is + * returned. + * + * Note that if no flags are specified, 'idn_encodename' does nothing + * fancy, just copies the given name verbatim. + * + * Returns: + * idn_success -- ok. + * idn_invalid_action -- invalid action flag specified. + * idn_invalid_encoding -- the given string has invalid/illegal + * byte sequence. + * idn_invalid_length -- invalid length of a label. + * idn_prohibited -- prohibited/unassigned code point found. + * idn_buffer_overflow -- 'tolen' is too small. + * idn_nomemory -- malloc failed. + * + * Also, if this function is called without calling 'idn_nameinit', + * the following error codes might be returned. + * idn_nofile -- cannot open the configuration file. + * idn_invalid_syntax -- syntax error found in the file. + * idn_invalid_name -- there are invalid names (encoding, + * normalization etc.). + */ +IDN_EXPORT idn_result_t +idn_res_encodename(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen); + +/* + * Decode internationalized domain name. + * + * The decoding process consists of the following 5 steps. + * + * 1. delimiter mapping + * Maps certain characters to period (U+002E, FULL STOP). + * 2. NAMEPREP + * Perform NAME preparation described in RFC3491. + * This step consists of the following 4 steps: + * 2.1. Mapping + * 2.2. Normalization + * 2.3. Prohibited character check + * 2.4. Unassigned check + * 3. IDN encoding to UTF-8 conversion. + * Converts the domain name from ACE (e.g. Punycode) to UCS4. + * 4. Perform round-trip check. + * Encode the result of step 3, and then compare it with the result + * of the step 2. If they are different, the check is failed. + * 5. Convert UTF-8 to local encoding. + * If a character in the domain name cannot be converted to local + * encoding, the conversion is failed. + * + * 'actions' specifies actions of the decoding procedure. + * Its value is a bitwise-or of the following flags: + * + * IDN_DELIMMAP -- perform delimiter mapping (step 1) + * IDN_MAP -- perform mapping (step 2.1) + * IDN_NORMALIZE -- perform normalization (step 2.2) + * IDN_PROHCHECK -- perform prohibited character check (step 2.3) + * IDN_UNASCHECK -- perform unassigned codepoint check (step 2.4) + * IDN_IDNCONV -- perform IDN encoding to UTF-8 conversion (step 3) + * IDN_RTCHECK -- perform round-trip check (step 4) + * IDN_ASCCHECK -- perform ASCII range character check while + * round-trip check (step 4.1) + * IDN_LOCALCONV -- perform UTF-8 to local encoding conversion (step 5) + * + * Also the following flags are provided for the convenience: + * + * IDN_DECODE_QUERY -- On libidnkit, perform step 1..5, except for step + * 2.4 and 4.1. + * On libidnkitlite, perform step 1..3, except for + * step 2.4 and 4.1. + * IDN_DECODE_STORED -- On libidnkit, perform step 1..5, except for step + * 4.1. + * On libidnkitlite, perform step 1..3, except for + * step 4.1. + * IDN_DECODE_APP -- Same as IDN_DECODE_QUERY. + * IDN_NAMEPREP -- perform NAMEPREP (step 2) without unassigned + * codepoint check (step 2.4). + * + * If any step fails, the original input name is returned. + * 'actions' specifies what actions to take when decoding, and is + * a bitwise-or of the following flags: + * + * Note that if no flags are specified, 'idn_decodename' does nothing + * but copying the given name verbatim. + * + * Returns: + * idn_success -- ok. + * idn_invalid_action -- invalid action flag specified. + * idn_invalid_encoding -- the given string has invalid/illegal + * byte sequence. + * idn_buffer_overflow -- 'tolen' is too small. + * idn_invalid_action -- length of a label is not 1..63 characters. + * idn_nomemory -- malloc failed. + * + * Also, if this function is called without calling 'idn_nameinit', + * the following error codes might be returned. + * idn_nofile -- cannot open the configuration file. + * idn_invalid_syntax -- syntax error found in the file. + * idn_invalid_name -- there are invalid names (encoding, + * normalization etc.). + */ +IDN_EXPORT idn_result_t +idn_res_decodename(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen); + +/* + * Decode internationalized domain name with auxiliary encoding + * support. + * + * This is another API for IDN string decode. The difference between + * two is whether the encoding conversion from auxiliary encoding to + * UTF-8 occurs prior to the actual decode process (read description + * of idn_res_decodename() above) or not. + * + * If auxencoding is NULL, from is treated as UTF-8 encoded string. + * + * Other arguments serve exactly same role as those of + * idn_res_decodename(). + */ +idn_result_t +idn_res_decodename2(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen, const char *auxencoding); + +/* + * Convert `actions' to a string, and then return the string. + * This function is for internal use only. + * + * Note that this function returns a pointer to static buffer. + */ +extern const char * +idn__res_actionstostring(idn_action_t actions); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_RES_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/resconf.h b/contrib/idn/idnkit-1.0-src/include/idn/resconf.h new file mode 100644 index 0000000000..876b31b93f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/resconf.h @@ -0,0 +1,323 @@ +/* $Id: resconf.h,v 1.1 2003/06/04 00:25:41 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_RESCONF_H +#define IDN_RESCONF_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * IDN resolver configuration. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Configuration type (opaque). + */ +typedef struct idn_resconf *idn_resconf_t; + +/* + * Initialize. + * + * Initialize this module and underlying ones. Must be called before + * any other functions of this module. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_resconf_initialize(void); + +/* + * Create a configuration context. + * + * Create an empty context and store it in '*ctxp'. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_resconf_create(idn_resconf_t *ctxp); + +/* + * Destroy the configuration context. + * + * Destroy the configuration context created by 'idn_resconf_create', + * and release memory for it. + */ +IDN_EXPORT void +idn_resconf_destroy(idn_resconf_t ctx); + +/* + * Increment reference count of the context created by 'idn_resconf_create'. + */ +IDN_EXPORT void +idn_resconf_incrref(idn_resconf_t ctx); + +/* + * Set default configurations to resconf context. + * + * "default configurations" means current nameprep and IDN encoding + * which IDN standard document suggests. + * + * Warning: configurations set previously are removed. + * + * Returns: + * idn_success -- ok. + * idn_invalid_syntax -- syntax error found. + * idn_invalid_name -- invalid encoding/nomalization name is + * specified. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_resconf_setdefaults(idn_resconf_t ctx); + +/* + * Load configuration file. + * + * Parse a configuration file whose name is specified by 'file', + * store the result in 'ctx'. If 'file' is NULL, the default file is + * loaded. + * + * Returns: + * idn_success -- ok. + * idn_nofile -- couldn't open specified file. + * idn_invalid_syntax -- syntax error found. + * idn_invalid_name -- invalid encoding/nomalization name is + * specified. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_resconf_loadfile(idn_resconf_t ctx, const char *file); + +/* + * Get the pathname of the default configuration file. + * + * Returns: + * the pathname of the default configuration file. + */ +IDN_EXPORT char * +idn_resconf_defaultfile(void); + +/* + * Get an object of lower module that `ctx' holds. + */ +IDN_EXPORT idn_delimitermap_t +idn_resconf_getdelimitermap(idn_resconf_t ctx); + +IDN_EXPORT idn_converter_t +idn_resconf_getidnconverter(idn_resconf_t ctx); + +IDN_EXPORT idn_converter_t +idn_resconf_getauxidnconverter(idn_resconf_t ctx); + +IDN_EXPORT idn_converter_t +idn_resconf_getlocalconverter(idn_resconf_t ctx); + +IDN_EXPORT idn_mapselector_t +idn_resconf_getlocalmapselector(idn_resconf_t ctx); + +IDN_EXPORT idn_mapper_t +idn_resconf_getmapper(idn_resconf_t ctx); + +IDN_EXPORT idn_normalizer_t +idn_resconf_getnormalizer(idn_resconf_t ctx); + +IDN_EXPORT idn_checker_t +idn_resconf_getprohibitchecker(idn_resconf_t ctx); + +IDN_EXPORT idn_checker_t +idn_resconf_getunassignedchecker(idn_resconf_t ctx); + +IDN_EXPORT idn_checker_t +idn_resconf_getbidichecker(idn_resconf_t ctx); + +/* + * Set an object of lower module to `ctx'. + */ +IDN_EXPORT void +idn_resconf_setdelimitermap(idn_resconf_t ctx, + idn_delimitermap_t delimiter_mapper); + +IDN_EXPORT void +idn_resconf_setidnconverter(idn_resconf_t ctx, + idn_converter_t idn_coverter); + +IDN_EXPORT void +idn_resconf_setauxidnconverter(idn_resconf_t ctx, + idn_converter_t aux_idn_coverter); + +IDN_EXPORT void +idn_resconf_setlocalconverter(idn_resconf_t ctx, + idn_converter_t local_converter); + +IDN_EXPORT void +idn_resconf_setlocalmapselector(idn_resconf_t ctx, + idn_mapselector_t map_selector); + +IDN_EXPORT void +idn_resconf_setmapper(idn_resconf_t ctx, idn_mapper_t mapper); + +IDN_EXPORT void +idn_resconf_setnormalizer(idn_resconf_t ctx, idn_normalizer_t normalizer); + +IDN_EXPORT void +idn_resconf_setprohibitchecker(idn_resconf_t ctx, + idn_checker_t prohibit_checker); + +IDN_EXPORT void +idn_resconf_setunassignedchecker(idn_resconf_t ctx, + idn_checker_t unassigned_checker); + +IDN_EXPORT void +idn_resconf_setbidichecker(idn_resconf_t ctx, + idn_checker_t bidi_checker); + +/* + * Set name or add names to an object of lower module that `ctx' holds. + */ +IDN_EXPORT idn_result_t +idn_resconf_setidnconvertername(idn_resconf_t ctx, const char *name, + int flags); + +IDN_EXPORT idn_result_t +idn_resconf_setauxidnconvertername(idn_resconf_t ctx, const char *name, + int flags); + +IDN_EXPORT idn_result_t +idn_resconf_addalldelimitermapucs(idn_resconf_t ctx, unsigned long *v, int nv); + +IDN_EXPORT idn_result_t +idn_resconf_setlocalconvertername(idn_resconf_t ctx, const char *name, + int flags); + +IDN_EXPORT idn_result_t +idn_resconf_addalllocalmapselectornames(idn_resconf_t ctx, const char *tld, + const char **names, int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_addallmappernames(idn_resconf_t ctx, const char **names, + int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_addallnormalizernames(idn_resconf_t ctx, const char **names, + int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_addallprohibitcheckernames(idn_resconf_t ctx, const char **names, + int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_addallunassignedcheckernames(idn_resconf_t ctx, const char **names, + int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_addallbidicheckernames(idn_resconf_t ctx, const char **names, + int nnames); + +IDN_EXPORT idn_result_t +idn_resconf_setnameprepversion(idn_resconf_t ctx, const char *version); + +/* + * These macros are provided for backward compatibility to mDNkit 2.1 + * and older. + */ +IDN_EXPORT void +idn_resconf_setalternateconverter(idn_resconf_t ctx, + idn_converter_t alternate_converter); + +IDN_EXPORT idn_result_t +idn_resconf_setalternateconvertername(idn_resconf_t ctx, const char *name, + int flags); + +IDN_EXPORT idn_converter_t +idn_resconf_getalternateconverter(idn_resconf_t ctx); + + +/* + * These macros are provided for backward compatibility to idnkit 1.x. + */ +#define idn_resconf_localconverter(ctx) \ + idn_resconf_getlocalconverter(ctx) + +#define idn_resconf_idnconverter(ctx) \ + idn_resconf_getidnconverter(ctx) + +#define idn_resconf_alternateconverter(ctx) \ + idn_resconf_getalternateconverter(ctx) + +#define idn_resconf_normalizer(ctx) \ + idn_resconf_getnormalizer(ctx) + +#define idn_resconf_mapper(ctx) \ + idn_resconf_getmapper(ctx) + +#define idn_resconf_delimitermap(ctx) \ + idn_resconf_getdelimitermap(ctx) + +#define idn_resconf_localmapselector(ctx) \ + idn_resconf_getlocalmapselector(ctx) + +#define idn_resconf_prohibitchecker(ctx) \ + idn_resconf_getprohibitchecker(ctx) + +#define idn_resconf_unassignedchecker(ctx) \ + idn_resconf_getunassignedchecker(ctx) + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_RESCONF_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/result.h b/contrib/idn/idnkit-1.0-src/include/idn/result.h new file mode 100644 index 0000000000..968f9a9869 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/result.h @@ -0,0 +1,86 @@ +/* $Id: result.h,v 1.1 2003/06/04 00:25:42 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_RESULT_H +#define IDN_RESULT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* + * libidnkit result code. + */ +typedef enum { + idn_success, + idn_notfound, + idn_invalid_encoding, + idn_invalid_syntax, + idn_invalid_name, + idn_invalid_message, + idn_invalid_action, + idn_invalid_codepoint, + idn_invalid_length, + idn_buffer_overflow, + idn_noentry, + idn_nomemory, + idn_nofile, + idn_nomapping, + idn_context_required, + idn_prohibited, + idn_failure /* !!This must be the last one!! */ +} idn_result_t; + +/* + * Get the string description of a result code. + */ +IDN_EXPORT char * +idn_result_tostring(idn_result_t result); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_RESULT_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/strhash.h b/contrib/idn/idnkit-1.0-src/include/idn/strhash.h new file mode 100644 index 0000000000..88154c731f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/strhash.h @@ -0,0 +1,123 @@ +/* $Id: strhash.h,v 1.1 2003/06/04 00:25:42 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_STRHASH_H +#define IDN_STRHASH_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * String-keyed hash table + * + * Just a hash table. Nothing special. Number of hash buckets + * grows automatically. + */ + +#include + +/* + * Hash table type, which is opaque. + */ +typedef struct idn__strhash *idn__strhash_t; + +/* + * Hash value free proc. + */ +typedef void (*idn__strhash_freeproc_t)(void *value); + +/* + * Create a hash table. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn__strhash_create(idn__strhash_t *hashp); + +/* + * Delete a hash table created by 'idn__strhash_create'. + * If 'proc' is not NULL, it is called for each value in the + * hash to release memory for them. + */ +extern void +idn__strhash_destroy(idn__strhash_t hash, idn__strhash_freeproc_t proc); + +/* + * Register an item to the hash table. This function makes a + * private copy of the key string. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +extern idn_result_t +idn__strhash_put(idn__strhash_t hash, const char *key, void *value); + +/* + * Find an item with the specified key. + * + * Returns: + * idn_success -- ok. found. + * idn_noentry -- not found. + */ +extern idn_result_t +idn__strhash_get(idn__strhash_t hash, const char *key, void **valuep); + +/* + * Check if an item with the specified key exists. + * + * Returns: + * 1 -- yes. + * 0 -- no. + */ +extern int +idn__strhash_exists(idn__strhash_t hash, const char *key); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_STRHASH_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/ucs4.h b/contrib/idn/idnkit-1.0-src/include/idn/ucs4.h new file mode 100644 index 0000000000..d984be848c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/ucs4.h @@ -0,0 +1,103 @@ +/* $Id: ucs4.h,v 1.1 2003/06/04 00:25:42 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UCS4_H +#define IDN_UCS4_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * UCS4 encoded string facility. + */ + +#include +#include + +/* + * UCS4 to UTF-16 conversion and vice versa. + */ +IDN_EXPORT idn_result_t +idn_ucs4_ucs4toutf16(const unsigned long *ucs4, unsigned short *utf16, + size_t tolen); + +IDN_EXPORT idn_result_t +idn_ucs4_utf16toucs4(const unsigned short *utf16, unsigned long *ucs4, + size_t tolen); + +/* + * UCS4 to UTF-8 conversion and vice versa. + */ +IDN_EXPORT idn_result_t +idn_ucs4_utf8toucs4(const char *utf8, unsigned long *ucs4, size_t tolen); + +IDN_EXPORT idn_result_t +idn_ucs4_ucs4toutf8(const unsigned long *ucs4, char *utf8, size_t tolen); + +/* + * UCS4 version of string operation functions. + */ +IDN_EXPORT size_t +idn_ucs4_strlen(const unsigned long *ucs4); + +IDN_EXPORT unsigned long * +idn_ucs4_strcpy(unsigned long *to, const unsigned long *from); + +IDN_EXPORT unsigned long * +idn_ucs4_strcat(unsigned long *to, const unsigned long *from); + +IDN_EXPORT int +idn_ucs4_strcmp(const unsigned long *str1, const unsigned long *str2); + +IDN_EXPORT int +idn_ucs4_strcasecmp(const unsigned long *str1, const unsigned long *str2); + +IDN_EXPORT unsigned long * +idn_ucs4_strdup(const unsigned long *str); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UCS4_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/ucsmap.h b/contrib/idn/idnkit-1.0-src/include/idn/ucsmap.h new file mode 100644 index 0000000000..fe5f9f76cf --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/ucsmap.h @@ -0,0 +1,131 @@ +/* $Id: ucsmap.h,v 1.1 2003/06/04 00:25:42 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UCSMAP_H +#define IDN_UCSMAP_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Perform UCS character mapping. + * This module support one-to-N mapping (N may be zero, one or more). + */ + +#include +#include + +/* + * Mapper type (opaque). + */ +typedef struct idn_ucsmap *idn_ucsmap_t; + +/* + * Create an empty mapping. The reference count is set to 1. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_ucsmap_create(idn_ucsmap_t *ctxp); + +/* + * Decrement the reference count of the given set, and if it reaches zero, + * release all the memory allocated for it. + */ +IDN_EXPORT void +idn_ucsmap_destroy(idn_ucsmap_t ctx); + +/* + * Increment the reference count of the given set by one, so that + * the map can be shared. + */ +IDN_EXPORT void +idn_ucsmap_incrref(idn_ucsmap_t ctx); + +/* + * Add a mapping. + * 'ucs' is the character to be mapped, 'map' points an array of mapped + * characters of length 'maplen'. 'map' may be NULL if 'maplen' is zero, + * meaning one-to-none mapping. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_failure -- already fixed by 'idn_ucsmap_fix', + * or too large maplen. + */ +IDN_EXPORT idn_result_t +idn_ucsmap_add(idn_ucsmap_t ctx, unsigned long ucs, unsigned long *map, + size_t maplen); + +/* + * Perform internal arrangement of the map for lookup. + * Once it is fixed, 'idn_ucsmap_add' cannot be permitted to the map. + */ +IDN_EXPORT void +idn_ucsmap_fix(idn_ucsmap_t ctx); + +/* + * Find the mapping for the given character. + * 'idn_ucsmap_fix' must be performed before calling this function. + * Find the mapping for 'v' and store the result to 'to'. The length + * of the mapped sequence is stored in '*maplenp'. 'tolen' specifies + * the length allocated for 'to'. + * + * Returns: + * idn_success -- ok. + * idn_nomapping -- specified character has no mapping. + * idn_failure -- not fixed by 'idn_ucsmap_fix' yet. + */ +IDN_EXPORT idn_result_t +idn_ucsmap_map(idn_ucsmap_t ctx, unsigned long v, unsigned long *to, + size_t tolen, size_t *maplenp); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UCSMAP_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/ucsset.h b/contrib/idn/idnkit-1.0-src/include/idn/ucsset.h new file mode 100644 index 0000000000..ab8144d6e8 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/ucsset.h @@ -0,0 +1,145 @@ +/* $Id: ucsset.h,v 1.1 2003/06/04 00:25:43 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UCSSET_H +#define IDN_UCSSET_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * A 'set' of UCS codepoints. + */ + +#include +#include + +/* + * Type representing a set (opaque). + */ +typedef struct idn_ucsset *idn_ucsset_t; + + +/* + * Create an empty set. The reference count is set to 1. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + */ +IDN_EXPORT idn_result_t +idn_ucsset_create(idn_ucsset_t *ctxp); + +/* + * Decrement the reference count of the given set, and if it reaches zero, + * release all the memory allocated for it. + */ +IDN_EXPORT void +idn_ucsset_destroy(idn_ucsset_t ctx); + +/* + * Increments the reference count by one. + */ +IDN_EXPORT void +idn_ucsset_incrref(idn_ucsset_t ctx); + +/* + * Add a UCS code point to the set. + * The set must be in the building phase -- that is, before 'idn_ucsset_fix' + * is called for the set. + * + * Returns: + * idn_success -- ok. + * idn_invalid_code -- code point out of range. + * idn_nomemory -- malloc failed. + * idn_failure -- already fixed by 'idn_ucsset_fix'. + */ +IDN_EXPORT idn_result_t +idn_ucsset_add(idn_ucsset_t ctx, unsigned long v); + +/* + * Add a range of code points (from 'from' to 'to', inclusive) to the set. + * 'from' must not be greater than 'to'. + * This function is similar to 'idn_ucsset_add' except that it accepts + * range of code points. + * + * Returns: + * idn_success -- ok. + * idn_invalid_code -- code point out of range, or the range + * specification is invalid. + * idn_nomemory -- malloc failed. + * idn_failure -- already fixed by 'idn_ucsset_fix'. + */ +IDN_EXPORT idn_result_t +idn_ucsset_addrange(idn_ucsset_t ctx, unsigned long from, unsigned long to); + +/* + * Perform internal arrangement of the set for lookup. + * Before calling this function, a set is in 'building' phase, and code + * points can be added freely by 'idn_ucsset_add' or 'idn_ucsset_addrange'. + * But once it is fixed by this function, the set becomes immutable, and + * it shifts into 'lookup' phase. + */ +IDN_EXPORT void +idn_ucsset_fix(idn_ucsset_t ctx); + +/* + * Find if the given code point is in the set. + * The set must be in the lookup phase -- in other words, 'idn_ucsset_fix' + * must be called for the set before calling this function. + * '*found' is set to 1 if the specified code point is in the set, 0 otherwise. + * + * Returns: + * idn_success -- ok. + * idn_invalid_code -- specified code point is out of range. + * idn_failure -- not fixed by 'idn_ucsset_fix' yet. + */ +IDN_EXPORT idn_result_t +idn_ucsset_lookup(idn_ucsset_t ctx, unsigned long v, int *found); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UCSSET_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/unicode.h b/contrib/idn/idnkit-1.0-src/include/idn/unicode.h new file mode 100644 index 0000000000..6a0f5d41d6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/unicode.h @@ -0,0 +1,164 @@ +/* $Id: unicode.h,v 1.1 2003/06/04 00:25:43 marka Exp $ */ +/* + * Copyright (c) 2000,2001 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UNICODE_H +#define IDN_UNICODE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Unicode attributes retriever. + * + * All the information this module provides is based on UnicodeData.txt, + * CompositionExclusions-1.txt and SpecialCasing.txt, all of which can be + * obtained from unicode.org. + * + * Unicode characters are represented as 'unsigned long'. + */ + +#include + +/* + * A Handle for Unicode versions. + */ +typedef struct idn__unicode_ops *idn__unicode_version_t; + +/* + * Context information for case conversion. + */ +typedef enum { + idn__unicode_context_unknown, + idn__unicode_context_final, + idn__unicode_context_nonfinal +} idn__unicode_context_t; + +/* + * Create a handle for a specific Unicode version. + * The version number (such as "3.0.1") is specified by 'version' parameter. + * If it is NULL, the latest version is used. + * The handle is stored in '*versionp', which is used various functions + * in this and unormalize modules. + * + * Returns: + * idn_success -- ok. + * idn_notfound -- specified version not found. + */ +extern idn_result_t +idn__unicode_create(const char *version, idn__unicode_version_t *versionp); + +/* + * Close a handle which was created by 'idn__unicode_create'. + */ +extern void +idn__unicode_destroy(idn__unicode_version_t version); + +/* + * Get canonical class. + * + * For characters out of unicode range (i.e. above 0xffff), 0 will + * be returned. + */ +extern int +idn__unicode_canonicalclass(idn__unicode_version_t version, unsigned long c); + +/* + * Decompose a character. + * + * Decompose character given by 'c', and put the result into 'v', + * which can hold 'vlen' characters. The number of decomposed characters + * will be stored in '*decomp_lenp'. + * + * If 'compat' is true, compatibility decomposition is performed. + * Otherwise canonical decomposition is done. + * + * Since decomposition is done recursively, no further decomposition + * will be needed. + * + * Returns: + * idn_success -- ok, decomposed. + * idn_notfound -- no decomposition possible. + * idn_buffer_overflow -- 'vlen' is too small. + */ +extern idn_result_t +idn__unicode_decompose(idn__unicode_version_t version, + int compat, unsigned long *v, size_t vlen, + unsigned long c, int *decomp_lenp); + +/* + * Perform canonical composition. + * + * Do canonical composition to the character sequence 'c1' and 'c2', put the + * result into '*compp'. + * + * Since Unicode Nomalization Froms requires only canonical composition, + * compatibility composition is not supported. + * + * Returns: + * idn_success -- ok, composed. + * idn_notfound -- no composition possible. + */ +extern idn_result_t +idn__unicode_compose(idn__unicode_version_t version, + unsigned long c1, unsigned long c2, unsigned long *compp); + +/* + * Returns if there may be a canonical composition sequence which starts + * with the given character. + * + * Returns: + * 1 -- there may be a composition sequence + * (maybe not). + * 0 -- no, there is definitely no such sequences. + */ +extern int +idn__unicode_iscompositecandidate(idn__unicode_version_t version, + unsigned long c); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UNICODE_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/unormalize.h b/contrib/idn/idnkit-1.0-src/include/idn/unormalize.h new file mode 100644 index 0000000000..d06d2f5cc0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/unormalize.h @@ -0,0 +1,86 @@ +/* $Id: unormalize.h,v 1.1 2003/06/04 00:25:44 marka Exp $ */ +/* + * Copyright (c) 2000,2001 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UNORMALIZE_H +#define IDN_UNORMALIZE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Unicode Normalizations. + * + * Perform 4 normalizations defined by 'Unicode Normalization Forms' + * (http://www.unicode.org/unicode/reports/tr15) + * + * All of the functions use UCS4 encoding for input/output. + */ + +#include +#include + +/* + * Perform Unicode Normalication Form C and KC. + * + * They take NUL-terminated UCS4 encoded string 'from', perform + * the normalization specified by 'version', put the result + * (also a NUL-terminated UCS4 encoded string) to 'to', which must be + * able to hold at least 'tolen' bytes. + * + * Returns: + * idn_success -- ok. + * idn_nomemory -- malloc failed. + * idn_buffer_overflow -- 'tolen' is too small. + */ +extern idn_result_t +idn__unormalize_formkc(idn__unicode_version_t version, + const unsigned long *from, unsigned long *to, + size_t tolen); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UNORMALIZE_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/utf8.h b/contrib/idn/idnkit-1.0-src/include/idn/utf8.h new file mode 100644 index 0000000000..b639c205be --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/utf8.h @@ -0,0 +1,137 @@ +/* $Id: utf8.h,v 1.1 2003/06/04 00:25:44 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UTF8_H +#define IDN_UTF8_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * UTF-8 encoded string facility. + */ + +#include + +/* + * Get the length of a character. + * + * Get the length (in bytes) of a character whose first byte is pointed + * by 's'. Since this function only looks one first byte to determine the + * length, it is possible some of the following bytes are invalid. + */ +IDN_EXPORT int +idn_utf8_mblen(const char *s); + +/* + * Get one character. + * + * Get the first character of the string pointed by 's', and copy it + * to 'buf', whose length is 'len'. Returns the number of bytes copied, + * or zero if the encoding is invalid or len is too small. + * + * The area pointed by 'buf' must be large enough to store any UTF-8 encoded + * character. + * + * Note that the copied string is not NUL-terminated. + */ +IDN_EXPORT int +idn_utf8_getmb(const char *s, size_t len, char *buf); + +/* + * Get one character in UCS-4. + * + * Similar to 'idn_utf8_getmb', except that the result is not in UTF-8 + * encoding, but in UCS-4 format (plain 32bit integer value). + */ +IDN_EXPORT int +idn_utf8_getwc(const char *s, size_t len, unsigned long *vp); + +/* + * Put one character. + * + * This function is an opposite of 'idn_utf8_getwc'. It takes a UCS-4 + * value 'v', convert it to UTF-8 encoded sequence, and store it to 's', + * whose length is 'len'. It returns the number of bytes written, or + * zero 'v' is out of range or 'len' is too small. + */ +IDN_EXPORT int +idn_utf8_putwc(char *s, size_t len, unsigned long v); + +/* + * Check the validity of UTF-8 encoded character. + * + * Check if the character pointed by 's' is a valid UTF-8 encoded + * character. Return the length of the character (in bytes) if it is valid, + * 0 otherwise. + */ +IDN_EXPORT int +idn_utf8_isvalidchar(const char *s); + +/* + * Check the validity of UTF-8 encoded string. + * + * Check if the NUL-terminated string 's' is valid as a UTF-8 encoded + * string. Return 1 if it is valid, 0 otherwise. + */ +IDN_EXPORT int +idn_utf8_isvalidstring(const char *s); + +/* + * Find first byte of a character. + * + * Find the first byte of a character 's' points to. 's' may point + * the 2nd or later byte of a character. 'known_top' is a pointer to + * a string which contains 's', and is known to be the first byte of + * a character. If it couldn't find the first byte between 'known_top' + * and 's', NULL will be returned. + */ +IDN_EXPORT char * +idn_utf8_findfirstbyte(const char *s, const char *known_top); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UTF8_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/util.h b/contrib/idn/idnkit-1.0-src/include/idn/util.h new file mode 100644 index 0000000000..ddafe1749e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/util.h @@ -0,0 +1,98 @@ +/* $Id: util.h,v 1.1 2003/06/04 00:25:44 marka Exp $ */ +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_UTIL_H +#define IDN_UTIL_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Utility functions. + */ + +/* + * Check ACE prefix. + * + * These functions examine whether `str' begins with `prefix'. + * They disregard the case difference of ASCII letters ([A-Za-z]). + * They return 1 if `str' has the ACE prefix, 0 otherwise. + */ +extern int +idn__util_asciihaveaceprefix(const char *str, const char *prefix); +extern int +idn__util_ucs4haveaceprefix(const unsigned long *str, const char *prefix); + +/* + * Check if all codepoints in the UCS4 string `str' are in the ASCII + * range (i.e. U+0000...U+007F). + * + * The function return 1 if it is, 0 otherwise. + */ +extern int +idn__util_ucs4isasciirange(const unsigned long *str); + +/* + * Get registry information from the system. (Windows only) + */ +#ifdef WIN32 +/* + * registry top type. + */ +typedef enum { + idn__util_hkey_currentuser, + idn__util_hkey_localmachine +} idn__util_hkey_t; + +extern int +idn__util_getregistrystring(idn__util_hkey_t topkey, const char *name, + char *str, size_t length); +#endif /* WIN32 */ + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_UTIL_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/idn/version.h b/contrib/idn/idnkit-1.0-src/include/idn/version.h new file mode 100644 index 0000000000..88d876d146 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/idn/version.h @@ -0,0 +1,70 @@ +/* $Id: version.h,v 1.1 2003/06/04 00:25:44 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_VERSION_H +#define IDN_VERSION_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* + * Version number of this package. + */ +#define IDNKIT_VERSION "1.0" +#define IDNKIT_MAJOR_VERSION 1 +#define IDNKIT_MINOR_VERSION 0 + +/* + * Get the version of the library (libidnkit). + */ +IDN_EXPORT const char * +idn_version_getstring(void); + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_VERSION_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/Makefile.in b/contrib/idn/idnkit-1.0-src/include/mdn/Makefile.in new file mode 100644 index 0000000000..48344c99c0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/Makefile.in @@ -0,0 +1,83 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:25:45 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +includedir = @includedir@ +mdnincludedir = $(includedir)/mdn + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ + +HDRS = \ + api.h \ + log.h \ + res.h \ + resconf.h \ + result.h \ + utf8.h \ + version.h + +all: + +@COMPAT_TRUE@install: all install-compat +@COMPAT_FALSE@install: + +install-compat: + $(MKINSTALLDIRS) $(DESTDIR)$(mdnincludedir) + for hdr in $(HDRS); do \ + $(INSTALL_DATA) $(srcdir)/$$hdr $(DESTDIR)$(mdnincludedir)/$$hdr; \ + done + +clean: + rm -f *~ + +distclean: + rm -f Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/api.h b/contrib/idn/idnkit-1.0-src/include/mdn/api.h new file mode 100644 index 0000000000..01c425cbd5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/api.h @@ -0,0 +1,91 @@ +/* $Id: api.h,v 1.1 2003/06/04 00:25:45 marka Exp $ */ +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_API_H +#define MDN_API_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define mdn_enable idn_enable + +extern idn_result_t +mdn_nameinit(void); + +extern idn_result_t +mdn_encodename(int actions, const char *from, char *to, size_t tolen); + +extern idn_result_t +mdn_decodename(int actions, const char *from, char *to, size_t tolen); + +#define mdn_localtoutf8(from, to, tolen) \ + mdn_encodename(IDN_LOCALCONV, from, to, len) +#define mdn_delimitermap(from, to, tolen) \ + mdn_encodename(IDN_DELIMMAP, from, to, len) +#define mdn_localmap(from, to, tolen) \ + mdn_encodename(IDN_LOCALMAP, from, to, len) +#define mdn_nameprep(from, to, tolen) \ + mdn_encodename(IDN_NAMEPREP, from, to, len) +#define mdn_utf8toidn(from, to, tolen) \ + mdn_encodename(IDN_IDNCONV, from, to, len) +#define mdn_idntoutf8(from, to, tolen) \ + mdn_decodename(IDN_IDNCONV, from, to, tolen) +#define mdn_utf8tolocal(from, to, tolen) \ + mdn_decodename(IDN_LOCALCONV, from, to, tolen) + +#define mdn_localtoidn(from, to, tolen) \ + mdn_encodename(IDN_ENCODE_APP, from, to, tolen) +#define mdn_idntolocal(from, to, tolen) \ + mdn_decodename(IDN_DECODE_APP, from, to, tolen) + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_API_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/localencoding.h b/contrib/idn/idnkit-1.0-src/include/mdn/localencoding.h new file mode 100644 index 0000000000..79cb9980da --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/localencoding.h @@ -0,0 +1,49 @@ +/* $Id: localencoding.h,v 1.1 2003/06/04 00:25:45 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_LOCALENCODING_H +#define MDN_LOCALENCODING_H 1 + +#define MDN_LOCALCS_ENV "MDN_LOCAL_CODESET" + +#endif /* MDN_LOCALENCODING_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/log.h b/contrib/idn/idnkit-1.0-src/include/mdn/log.h new file mode 100644 index 0000000000..d17bd5216a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/log.h @@ -0,0 +1,92 @@ +/* $Id: log.h,v 1.1 2003/06/04 00:25:45 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_LOG_H +#define MDN_LOG_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define mdn_log_proc_t \ + idn_log_proc_t + +#define mdn_log_level_fatal \ + idn_log_level_fatal +#define mdn_log_level_error \ + idn_log_level_error +#define mdn_log_level_warning \ + idn_log_level_warning +#define mdn_log_level_info \ + idn_log_level_info +#define mdn_log_level_trace \ + idn_log_level_trace +#define mdn_log_level_dump \ + idn_log_level_dump + +#define mdn_log_fatal \ + idn_log_fatal +#define mdn_log_error \ + idn_log_error +#define mdn_log_warning \ + idn_log_warning +#define mdn_log_info \ + idn_log_info +#define mdn_log_trace \ + idn_log_trace +#define mdn_log_dump \ + idn_log_dump +#define mdn_log_setlevel \ + idn_log_setlevel +#define mdn_log_getlevel \ + idn_log_getlevel +#define mdn_log_setproc \ + idn_log_setproc + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_LOG_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/res.h b/contrib/idn/idnkit-1.0-src/include/mdn/res.h new file mode 100644 index 0000000000..7b60838d2f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/res.h @@ -0,0 +1,121 @@ +/* $Id: res.h,v 1.1 2003/06/04 00:25:45 marka Exp $ */ +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_RES_H +#define MDN_RES_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define MDN_LOCALCONV \ + IDN_LOCALCONV +#define MDN_DELIMMAP \ + IDN_DELIMMAP +#define MDN_LOCALMAP \ + IDN_LOCALMAP +#define MDN_MAP \ + IDN_MAP +#define MDN_NORMALIZE \ + IDN_NORMALIZE +#define MDN_PROHCHECK \ + IDN_PROHCHECK +#define MDN_UNASCHECK \ + IDN_UNASCHECK +#define MDN_ASCCHECK \ + IDN_ASCCHECK +#define MDN_IDNCONV \ + IDN_IDNCONV +#define MDN_LENCHECK \ + IDN_LENCHECK +#define MDN_RTCHECK \ + IDN_RTCHECK +#define MDN_UNDOIFERR \ + IDN_UNDOIFERR +#define MDN_ENCODE_APP \ + IDN_ENCODE_APP +#define MDN_DECODE_APP \ + IDN_DECODE_APP +#define MDN_NAMEPREP \ + IDN_NAMEPREP + +#define mdn_res_enable \ + idn_res_enable +#define mdn_res_encodename \ + idn_res_encodename +#define mdn_res_decodename \ + idn_res_decodename +#define mdn_res_actiontostring \ + idn_res_actiontostring + +#define mdn_res_localtoutf8 \ + idn_res_localtoutf8 +#define mdn_res_delimitermap \ + idn_res_delimitermap +#define mdn_res_localmap \ + idn_res_localmap +#define mdn_res_nameprep \ + idn_res_nameprep +#define mdn_res_utf8toidn \ + idn_res_utf8toidn +#define mdn_res_idntoutf8 \ + idn_res_idntoutf8 +#define mdn_res_utf8tolocal \ + idn_res_utf8tolocal +#define mdn_res_nameprepcheck \ + idn_res_nameprepcheck +#define mdn_res_localtoidn \ + idn_res_localtoidn +#define mdn_res_idntolocal \ + idn_res_idntolocal + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_RES_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/resconf.h b/contrib/idn/idnkit-1.0-src/include/mdn/resconf.h new file mode 100644 index 0000000000..bd408105a5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/resconf.h @@ -0,0 +1,150 @@ +/* $Id: resconf.h,v 1.1 2003/06/04 00:25:46 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_RESCONF_H +#define MDN_RESCONF_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#define mdn_resconf_t \ + idn_resconf_t + +#define mdn_resconf_initialize \ + idn_resconf_initialize +#define mdn_resconf_create \ + idn_resconf_create +#define mdn_resconf_destroy \ + idn_resconf_destroy + +#define mdn_resconf_incrref \ + idn_resconf_incrref +#define mdn_resconf_loadfile \ + idn_resconf_loadfile +#define mdn_resconf_defaultfile \ + idn_resconf_defaultfile +#define mdn_resconf_getdelimitermap \ + idn_resconf_getdelimitermap +#define mdn_resconf_getidnconverter \ + idn_resconf_getidnconverter +#define mdn_resconf_getlocalconverter \ + idn_resconf_getlocalconverter +#define mdn_resconf_getlocalmapselector \ + idn_resconf_getlocalmapselector +#define mdn_resconf_getmapper \ + idn_resconf_getmapper +#define mdn_resconf_getnormalizer \ + idn_resconf_getnormalizer +#define mdn_resconf_getprohibitchecker \ + idn_resconf_getprohibitchecker +#define mdn_resconf_getunassignedchecker \ + idn_resconf_getunassignedchecker +#define mdn_resconf_setdelimitermap \ + idn_resconf_setdelimitermap +#define mdn_resconf_setidnconverter \ + idn_resconf_setidnconverter +#define mdn_resconf_setlocalconverter \ + idn_resconf_setlocalconverter +#define mdn_resconf_setlocalmapselector \ + idn_resconf_setlocalmapselector +#define mdn_resconf_setmapper \ + idn_resconf_setmapper +#define mdn_resconf_setnormalizer \ + idn_resconf_setnormalizer +#define mdn_resconf_setprohibitchecker \ + idn_resconf_setprohibitchecker +#define mdn_resconf_setunassignedchecker \ + idn_resconf_setunassignedchecker +#define mdn_resconf_setidnconvertername \ + idn_resconf_setidnconvertername +#define mdn_resconf_addalldelimitermapucs \ + idn_resconf_addalldelimitermapucs +#define mdn_resconf_setlocalconvertername \ + idn_resconf_setlocalconvertername +#define mdn_resconf_addalllocalmapselectornames \ + idn_resconf_addalllocalmapselectornames +#define mdn_resconf_addallmappernames \ + idn_resconf_addallmappernames +#define mdn_resconf_addallnormalizernames \ + idn_resconf_addallnormalizernames +#define mdn_resconf_addallprohibitcheckernames \ + idn_resconf_addallprohibitcheckernames +#define mdn_resconf_addallunassignedcheckernames \ + idn_resconf_addallunassignedcheckernames +#define mdn_resconf_setnameprepversion \ + idn_resconf_setnameprepversion +#define mdn_resconf_setalternateconverter \ + idn_resconf_setalternateconverter +#define mdn_resconf_setalternateconvertername \ + idn_resconf_setalternateconvertername +#define mdn_resconf_getalternateconverter \ + idn_resconf_getalternateconverter + +#define mdn_resconf_localconverter \ + idn_resconf_localconverter +#define mdn_resconf_idnconverter \ + idn_resconf_idnconverter +#define mdn_resconf_alternateconverter \ + idn_resconf_alternateconverter +#define mdn_resconf_normalizer \ + idn_resconf_normalizer +#define mdn_resconf_mapper \ + idn_resconf_mapper +#define mdn_resconf_delimitermap \ + idn_resconf_delimitermap +#define mdn_resconf_localmapselector \ + idn_resconf_localmapselector +#define mdn_resconf_prohibitchecker \ + idn_resconf_prohibitchecker +#define mdn_resconf_unassignedchecker \ + idn_resconf_unassignedchecker + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_RESCONF_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/result.h b/contrib/idn/idnkit-1.0-src/include/mdn/result.h new file mode 100644 index 0000000000..54d0d5e653 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/result.h @@ -0,0 +1,97 @@ +/* $Id: result.h,v 1.1 2003/06/04 00:25:46 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_RESULT_H +#define MDN_RESULT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define mdn_result_t \ + idn_result_t + +#define mdn_success \ + idn_success +#define mdn_notfound \ + idn_notfound +#define mdn_invalid_encoding \ + idn_invalid_encoding +#define mdn_invalid_syntax \ + idn_invalid_syntax +#define mdn_invalid_name \ + idn_invalid_name +#define mdn_invalid_message \ + idn_invalid_message +#define mdn_invalid_action \ + idn_invalid_action +#define mdn_invalid_codepoint \ + idn_invalid_codepoint +#define mdn_invalid_length \ + idn_invalid_length +#define mdn_buffer_overflow \ + idn_buffer_overflow +#define mdn_noentry \ + idn_noentry +#define mdn_nomemory \ + idn_nomemory +#define mdn_nofile \ + idn_nofile +#define mdn_nomapping \ + idn_nomapping +#define mdn_context_required \ + idn_context_required +#define mdn_prohibited \ + idn_prohibited +#define mdn_failure \ + idn_failure +#define mdn_result_tostring \ + idn_result_tostring + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_RESULT_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/utf8.h b/contrib/idn/idnkit-1.0-src/include/mdn/utf8.h new file mode 100644 index 0000000000..2c2af87987 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/utf8.h @@ -0,0 +1,70 @@ +/* $Id: utf8.h,v 1.1 2003/06/04 00:25:46 marka Exp $ */ +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_UTF8_H +#define MDN_UTF8_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#define mdn_utf8_mblen \ + idn_utf8_mblen +#define mdn_utf8_getmb \ + idn_utf8_getmb +#define mdn_utf8_getwc \ + idn_utf8_getwc +#define mdn_utf8_putwc \ + idn_utf8_putwc +#define mdn_utf8_isvalidchar \ + idn_utf8_isvalidchar +#define mdn_utf8_isvalidstring \ + idn_utf8_isvalidstring +#define mdn_utf8_findfirstbyte \ + idn_utf8_findfirstbyte + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_UTF8_H */ diff --git a/contrib/idn/idnkit-1.0-src/include/mdn/version.h b/contrib/idn/idnkit-1.0-src/include/mdn/version.h new file mode 100644 index 0000000000..0e525a2250 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/include/mdn/version.h @@ -0,0 +1,66 @@ +/* $Id: version.h,v 1.1 2003/06/04 00:25:46 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef MDN_VERSION_H +#define MDN_VERSION_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* + * Version number of this package. + */ +#define MDNKIT_VERSION "idnkit " IDNKIT_VERSION +#define MDNKIT_MAJOR_VERSION (IDNKIT_MAJOR_VERSION + 4) +#define MDNKIT_MINOR_VERSION IDNKIT_MINOR_VERSION + +#define mdn_version_getstring idn_version_getstring + +#ifdef __cplusplus +} +#endif + +#endif /* MDN_VERSION_H */ diff --git a/contrib/idn/idnkit-1.0-src/install-sh b/contrib/idn/idnkit-1.0-src/install-sh new file mode 100755 index 0000000000..ebc66913e9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/install-sh @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/contrib/idn/idnkit-1.0-src/lib/Makefile.in b/contrib/idn/idnkit-1.0-src/lib/Makefile.in new file mode 100644 index 0000000000..2c1c55bc68 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/Makefile.in @@ -0,0 +1,309 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:25:47 marka Exp $ +# Copyright (c) 2000, 2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +build = @build@ + +LIB_CURRENT = 1 +LIB_REVISION = 2 +LIB_AGE = 0 + +.SUFFIXES: +.SUFFIXES: .c .lo .to + +top_builddir = .. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +libdir = @libdir@ +sysconfdir = @sysconfdir@ +datadir = @datadir@ +mapdir = $(datadir)/idnkit +utf8_name = @UTF8_NAME@ + +SUBDIRS = tests + +SHELL = @SHELL@ +CC = @CC@ +RANLIB = @RANLIB@ +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +LIBTOOL = @LIBTOOL@ + +ICONVINC = @ICONVINC@ +ICONVLIB = @ICONVLIB@ + +INCS = -I$(srcdir)/../include -I../include $(ICONVINC) +DEFS = -DIDN_RESCONF_DIR="\"$(sysconfdir)\"" + +CFLAGS = $(OPTS) $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +SRCS = \ + aliaslist.c \ + api.c \ + checker.c \ + converter.c \ + debug.c \ + delimitermap.c \ + filechecker.c \ + filemapper.c \ + localencoding.c \ + log.c \ + mapper.c \ + mapselector.c \ + nameprep.c \ + nameprep_template.c \ + nameprepdata.c \ + normalizer.c \ + punycode.c \ + race.c \ + res.c \ + resconf.c \ + result.c \ + strhash.c \ + ucs4.c \ + ucsmap.c \ + ucsset.c \ + unicode.c \ + unicode_template.c \ + unicodedata_320.c \ + unormalize.c \ + util.c \ + utf8.c \ + version.c + +OBJS = \ + aliaslist.lo \ + api.lo \ + checker.lo \ + converter.lo \ + debug.lo \ + delimitermap.lo \ + filechecker.lo \ + filemapper.lo \ + localencoding.lo \ + log.lo \ + mapper.lo \ + mapselector.lo \ + nameprep.lo \ + normalizer.lo \ + punycode.lo \ + race.lo \ + res.lo \ + resconf.lo \ + result.lo \ + strhash.lo \ + ucs4.lo \ + ucsmap.lo \ + ucsset.lo \ + unicode.lo \ + unormalize.lo \ + utf8.lo \ + util.lo \ + version.lo + +LIB = libidnkit +TESTLIB = libidntest + +LITELIBCFLAGS = $(CFLAGS) -DWITHOUT_ICONV +LITELIB_OBJS = \ + apilite.lo \ + converterlite.lo \ + reslite.lo \ + resconflite.lo \ + aliaslist.lo \ + checker.lo \ + debug.lo \ + delimitermap.lo \ + filechecker.lo \ + filemapper.lo \ + log.lo \ + mapper.lo \ + mapselector.lo \ + nameprep.lo \ + normalizer.lo \ + punycode.lo \ + race.lo \ + result.lo \ + strhash.lo \ + ucsmap.lo \ + ucsset.lo \ + unicode.lo \ + unormalize.lo \ + ucs4.lo \ + utf8.lo \ + util.lo \ + version.lo + +LITELIB = libidnkitlite +TESTLITELIB = libidntestlite + +SAMPLES = idn.conf.sample idnalias.conf.sample + +.c.lo: + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< + +.c.to: + $(CC) -o $@ -DTEST $(CFLAGS) -c $< + +all: all-localdir all-subdirs +@LITEONLY_TRUE@all-localdir: $(LITELIB).la $(SAMPLES) +@LITEONLY_FALSE@all-localdir: $(LIB).la $(LITELIB).la $(SAMPLES) + +$(LIB).la: $(OBJS) + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ + -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ + -rpath $(libdir) $(OBJS) + +$(TESTLIB).la: $(OBJS) + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ + -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ + -rpath $(libdir) $(OBJS) + +apilite.lo: api.c + $(LIBTOOL) --mode=compile $(CC) $(LITELIBCFLAGS) -o $@ \ + -c $(srcdir)/api.c +converterlite.lo: converter.c + $(LIBTOOL) --mode=compile $(CC) $(LITELIBCFLAGS) -o $@ \ + -c $(srcdir)/converter.c +reslite.lo: res.c + $(LIBTOOL) --mode=compile $(CC) $(LITELIBCFLAGS) -o $@ \ + -c $(srcdir)/res.c +resconflite.lo: resconf.c + $(LIBTOOL) --mode=compile $(CC) $(LITELIBCFLAGS) -o $@ \ + -c $(srcdir)/resconf.c + +$(LITELIB).la: $(LITELIB_OBJS) + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ + -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ + -rpath $(libdir) $(LITELIB_OBJS) + +$(TESTLITELIB).la: $(LITELIB_OBJS) + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ + -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ + -rpath $(libdir) $(LITELIB_OBJS) + +idn.conf.sample: idn.conf.sample.in + sed -e 's%[@]mapdir[@]%$(mapdir)%' \ + < $(srcdir)/idn.conf.sample.in > $@ + +idnalias.conf.sample: Makefile + $(SHELL) $(srcdir)/aliaslist.sh $(build) $(utf8_name) > $@ + +install: install-localdir install-subdirs +@LITEONLY_TRUE@install-localdir: all install-common +@LITEONLY_FALSE@install-localdir: all install-common install-nolite + +install-common: + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) + $(LIBTOOL) $(INSTALL_DATA) $(LITELIB).la \ + $(DESTDIR)$(libdir)/$(LITELIB).la + -[ -f $(DESTDIR)$(libdir)/$(LITELIB).a ] \ + && $(RANLIB) $(DESTDIR)$(libdir)/$(LITELIB).a + $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) + $(INSTALL_DATA) idn.conf.sample \ + $(DESTDIR)$(sysconfdir)/idn.conf.sample + $(INSTALL_DATA) idnalias.conf.sample \ + $(DESTDIR)$(sysconfdir)/idnalias.conf.sample + @if [ ! -f $(DESTDIR)$(sysconfdir)/idn.conf ]; then \ + echo "** installing default idn.conf"; \ + $(INSTALL_DATA) idn.conf.sample $(DESTDIR)$(sysconfdir)/idn.conf; \ + fi + @if [ ! -f $(DESTDIR)$(sysconfdir)/idnalias.conf ]; then \ + echo "** installing default idnalias.conf"; \ + $(INSTALL_DATA) idnalias.conf.sample \ + $(DESTDIR)$(sysconfdir)/idnalias.conf; \ + fi + +install-nolite: + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) + $(LIBTOOL) $(INSTALL_DATA) $(LIB).la \ + $(DESTDIR)$(libdir)/$(LIB).la + -[ -f $(DESTDIR)$(libdir)/$(LIB).a ] \ + && $(RANLIB) $(DESTDIR)$(libdir)/$(LIB).a + +install-config: + @if [ -f $(DESTDIR)$(sysconfdir)/idn.conf ]; then \ + echo "** backing up old idn.conf as idn.conf.old"; \ + mv -f $(DESTDIR)$(sysconfdir)/idn.conf \ + $(DESTDIR)$(sysconfdir)/idn.conf.old; \ + fi + @echo "** installing default idn.conf forcibly" + $(INSTALL_DATA) idn.conf.sample $(DESTDIR)$(sysconfdir)/idn.conf + @if [ -f $(DESTDIR)$(sysconfdir)/idnalias.conf ]; then \ + echo "** backing up old idnalias.conf as idnalias.conf.old"; \ + mv -f $(DESTDIR)$(sysconfdir)/idnalias.conf \ + $(DESTDIR)$(sysconfdir)/idnalias.conf.old; \ + fi + @echo "** installing default idnalias.conf forcibly" + $(INSTALL_DATA) idnalias.conf.sample \ + $(DESTDIR)$(sysconfdir)/idnalias.conf + +clean: clean-localdir clean-subdirs +clean-localdir: force + rm -f *.o *.lo *.la *.a core *.core *~ + rm -f *.to *_test.c *_test + rm -f idn.conf.sample idnalias.conf.sample + rm -fr .libs/ + +distclean: distclean-localdir distclean-subdirs +distclean-localdir: force clean-localdir + rm -f Makefile + +test check: test-localdir test-subdirs + +@LITEONLY_TRUE@test-localdir: $(TESTLITELIB).la $(SAMPLES) +@LITEONLY_FALSE@test-localdir: $(TESTLIB).la $(TESTLITELIB).la $(SAMPLES) + +all-subdirs install-subdirs clean-subdirs distclean-subdirs test-subdirs: + @target=`echo $@ | sed 's/-subdirs$$//'`; \ + for d in $(SUBDIRS) ; do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) $$target); \ + done + +force: diff --git a/contrib/idn/idnkit-1.0-src/lib/aliaslist.c b/contrib/idn/idnkit-1.0-src/lib/aliaslist.c new file mode 100644 index 0000000000..f893dccf32 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/aliaslist.c @@ -0,0 +1,355 @@ +#ifndef lint +static char *rcsid = "$Id: aliaslist.c,v 1.1 2003/06/04 00:25:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +struct aliasitem { + char *pattern; /* name pattern */ + char *encoding; /* MIME-preferred charset name */ + struct aliasitem *next; +}; +typedef struct aliasitem *aliasitem_t; + +struct idn__aliaslist { + aliasitem_t first_item; /* first item of the list */ +}; + +static idn_result_t +additem_to_top(idn__aliaslist_t list, + const char *pattern, const char *encoding); + +static idn_result_t +additem_to_bottom(idn__aliaslist_t list, + const char *pattern, const char *encoding); + +static int match(const char *pattern, const char *str); + +static idn_result_t create_item(const char *pattern, const char *encoding, + aliasitem_t *itemp); + +#ifdef DEBUG +static void dump_list(idn__aliaslist_t list); +#endif + +idn_result_t +idn__aliaslist_create(idn__aliaslist_t *listp) { + static int size = sizeof(struct idn__aliaslist); + + TRACE(("idn__aliaslist_create()\n")); + + assert(listp != NULL); + + if ((*listp = malloc(size)) == NULL) { + return (idn_nomemory); + } + (*listp)->first_item = NULL; + + return (idn_success); +} + +void +idn__aliaslist_destroy(idn__aliaslist_t list) { + aliasitem_t current; + aliasitem_t next; + + TRACE(("idn__aliaslist_destroy()\n")); + + assert(list != NULL); + + current = list->first_item; + while (current != NULL) { + if (current->pattern != NULL) { + free(current->pattern); + } + if (current->encoding != NULL) { + free(current->encoding); + } + next = current->next; + free(current); + current = next; + } + free(list); +} + +idn_result_t +idn__aliaslist_aliasfile(idn__aliaslist_t list, const char *path) { + FILE *fp; + int line_no; + idn_result_t r = idn_success; + char line[200], alias[200], real[200]; + + assert(path != NULL); + + TRACE(("idn__aliaslist_aliasfile(path=%s)\n", path)); + + if ((fp = fopen(path, "r")) == NULL) { + return (idn_nofile); + } + for (line_no = 1; fgets(line, sizeof(line), fp) != NULL; line_no++) { + unsigned char *p = (unsigned char *)line; + + while (isascii(*p) && isspace(*p)) + p++; + if (*p == '#' || *p == '\n') + continue; + if (sscanf((char *)p, "%s %s", alias, real) == 2) { + r = additem_to_bottom(list, alias, real); + if (r != idn_success) + break; + } else { + INFO(("idn__aliaslist_aliasfile: file %s has " + "invalid contents at line %d\n", + path, line_no)); + r = idn_invalid_syntax; + break; + } + } + fclose(fp); + +#ifdef DEBUG + dump_list(list); +#endif + + return (r); +} + +idn_result_t +idn__aliaslist_additem(idn__aliaslist_t list, + const char *pattern, const char *encoding, + int first_item) { + if (first_item) { + return additem_to_top(list, pattern, encoding); + } else { + return additem_to_bottom(list, pattern, encoding); + } +} + +static idn_result_t +additem_to_top(idn__aliaslist_t list, + const char *pattern, const char *encoding) { + aliasitem_t new_item; + idn_result_t r; + + TRACE(("additem_to_top()\n")); + + assert(list != NULL); + assert(pattern != NULL); + assert(encoding != NULL); + + if ((r = create_item(pattern, encoding, &new_item)) + != idn_success) { + WARNING(("additem_to_top: malloc failed\n")); + return (r); + } + + new_item->next = list->first_item; + list->first_item = new_item; + +#ifdef DEBUG + dump_list(list); +#endif + + return (idn_success); +} + +static idn_result_t +additem_to_bottom(idn__aliaslist_t list, + const char *pattern, const char *encoding) { + aliasitem_t new_item; + idn_result_t r; + + TRACE(("additem_to_bottom()\n")); + + assert(list != NULL); + assert(pattern != NULL); + assert(encoding != NULL); + + r = create_item(pattern, encoding, &new_item); + if (r != idn_success) { + WARNING(("additem_to_bottom: malloc failed\n")); + return r; + } + + if (list->first_item == NULL) { + list->first_item = new_item; + } else { + aliasitem_t cur_item = list->first_item; + for (;;) { + if (cur_item->next == NULL) { + break; + } + cur_item = cur_item->next; + } + cur_item->next = new_item; + } + + return (idn_success); +} + +idn_result_t +idn__aliaslist_find(idn__aliaslist_t list, + const char *pattern, char **encodingp) { + aliasitem_t current; + + TRACE(("idn__aliaslist_find()\n")); + + assert(list != NULL); + assert(pattern != NULL); + +#ifdef DEBUG + DUMP(("target pattern: %s\n", pattern)); +#endif + current = list->first_item; + while (current != NULL) { +#ifdef DEBUG + DUMP(("current pattern: %s, encoding: %s\n", + current->pattern, current->encoding)); +#endif + if (match(current->pattern, pattern)) { + *encodingp = current->encoding; + return (idn_success); + } + current = current->next; + } + + TRACE(("idn__aliaslist_find(): not found\n")); + *encodingp = (char *)pattern; + return (idn_notfound); +} + +/* + * Wild card matching function that supports only '*'. + */ +static int +match(const char *pattern, const char *str) { + for (;;) { + int c; + + switch (c = *pattern++) { + case '\0': + return (*str == '\0'); + case '*': + while (!match(pattern, str)) { + if (*str == '\0') + return (0); + str++; + } + return (1); + break; + default: + if (*str++ != c) + return (0); + break; + } + } +} + +/* + * List item creation. + * pattern and encoding must not be NULL. + */ +static idn_result_t +create_item(const char *pattern, const char *encoding, + aliasitem_t *itemp) { + static size_t size = sizeof(struct aliasitem); + + assert(pattern != NULL); + assert(encoding != NULL); + + if ((*itemp = malloc(size)) == NULL) + return (idn_nomemory); + + if (((*itemp)->pattern = malloc(strlen(pattern) + 1)) == NULL) { + free(*itemp); + *itemp = NULL; + return (idn_nomemory); + } + + if (((*itemp)->encoding = malloc(strlen(encoding) + 1)) == NULL) { + free((*itemp)->pattern); + free(*itemp); + *itemp = NULL; + return (idn_nomemory); + } + + (void)strcpy((*itemp)->pattern, pattern); + (void)strcpy((*itemp)->encoding, encoding); + (*itemp)->next = NULL; + + return (idn_success); +} + +#ifdef DEBUG +static void +dump_list(idn__aliaslist_t list) { + aliasitem_t item; + int i; + + TRACE(("dump_list()\n")); + if (list == NULL) { + TRACE(("list is NULL\n")); + return; + } + item = list->first_item; + i = 0; + while (item != NULL) { + DUMP(("%d: %s\t%s\n", i, item->pattern, item->encoding)); + item = item->next; + i++; + } +} +#endif diff --git a/contrib/idn/idnkit-1.0-src/lib/aliaslist.sh b/contrib/idn/idnkit-1.0-src/lib/aliaslist.sh new file mode 100644 index 0000000000..47c3d4f919 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/aliaslist.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# aliaslist.sh -- Generate `idnalias.conf.sample' file. +# + +cpu_company_system="$1" +utf8_name="$2" + +cat < + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static int initialized; +static idn_resconf_t default_conf; + +static char *conf_file; + +void +idn_enable(int on_off) { + idn_res_enable(on_off); +} + +idn_result_t +idn__setconffile(const char *file) { + idn_result_t r; + char *s; + + TRACE(("idn__setconffile(%s)\n", (file == NULL) ? "" : file)); + + if (initialized) { + r = idn_failure; + goto ret; + } + + if (file == NULL) + s = NULL; + else { + s = (char *)malloc(strlen(file) + 1); + if (s == NULL) { + r = idn_nomemory; + goto ret; + } + strcpy(s, file); + } + free(conf_file); + conf_file = s; + + r = idn_success; +ret: + TRACE(("idn__setconffile(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_nameinit(int load_file) { + idn_result_t r; + + TRACE(("idn_nameinit()\n")); + + if (initialized) { + r = idn_success; + goto ret; + } + + idn_resconf_initialize(); + + r = idn_resconf_create(&default_conf); + if (r != idn_success) + goto ret; + + if (load_file) + r = idn_resconf_loadfile(default_conf, conf_file); + else + r = idn_resconf_setdefaults(default_conf); + if (r != idn_success) + goto ret; + + initialized = 1; + +ret: + if (r != idn_success && default_conf != NULL) { + idn_resconf_destroy(default_conf); + default_conf = NULL; + } + TRACE(("idn_nameinit(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_encodename(idn_action_t actions, const char *from, char *to, size_t tolen) { + idn_result_t r; + + assert(from != NULL && to != NULL); + + TRACE(("idn_encodename(actions=%s, from=\"%s\")\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50))); + + if (!initialized && ((r = idn_nameinit(0)) != idn_success)) + goto ret; + + r = idn_res_encodename(default_conf, actions, from, to, tolen); + +ret: + if (r == idn_success) { + TRACE(("idn_encodename(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_encodename(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_decodename(idn_action_t actions, const char *from, char *to, size_t tolen) { + idn_result_t r; + + assert(from != NULL && to != NULL); + + TRACE(("idn_decodename(actions=%s, from=\"%s\", tolen=%d)\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen)); + + if (!initialized && ((r = idn_nameinit(0)) != idn_success)) + goto ret; + + r = idn_res_decodename(default_conf, actions, from, to, tolen); + +ret: + if (r == idn_success) { + TRACE(("idn_decodename(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_decodename(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_decodename2(idn_action_t actions, const char *from, char *to, size_t tolen, + const char *auxencoding) { + idn_result_t r; + + assert(from != NULL && to != NULL); + + TRACE(("idn_decodename2(actions=%s, from=\"%s\", tolen=%d)\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen)); + + if (!initialized && ((r = idn_nameinit(0)) != idn_success)) + goto ret; + + r = idn_res_decodename2(default_conf, actions, from, to, tolen, + auxencoding); + +ret: + if (r == idn_success) { + TRACE(("idn_decodename2(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_decodename2(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +/* + * These functions are for backward compatibility. + */ +#ifdef ENABLE_MDNKIT_COMPAT + +idn_result_t +mdn_nameinit(void) { + return idn_nameinit(1); +} + +idn_result_t +mdn_encodename(int actions, const char *from, char *to, size_t tolen) { + idn_result_t r; + + assert(from != NULL && to != NULL); + + TRACE(("mdn_encodename(actions=%s, from=\"%s\")\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50))); + + if (!initialized && ((r = idn_nameinit(1)) != idn_success)) + return (r); + + return (idn_res_encodename(default_conf, actions, from, to, tolen)); +} + +idn_result_t +mdn_decodename(int actions, const char *from, char *to, size_t tolen) { + idn_result_t r; + + assert(from != NULL && to != NULL); + + TRACE(("idn_decodename(actions=%s, from=\"%s\", tolen=%d)\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen)); + + if (!initialized && ((r = idn_nameinit(1)) != idn_success)) + return (r); + + return (idn_res_decodename(default_conf, actions, from, to, tolen)); +} + +#endif /* ENABLE_MDNKIT_COMPAT */ diff --git a/contrib/idn/idnkit-1.0-src/lib/checker.c b/contrib/idn/idnkit-1.0-src/lib/checker.c new file mode 100644 index 0000000000..52e5b11848 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/checker.c @@ -0,0 +1,446 @@ +#ifndef lint +static char *rcsid = "$Id: checker.c,v 1.1 2003/06/04 00:25:49 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* + * Type for checking scheme. + */ +typedef struct { + char *prefix; + char *parameter; + idn_checker_createproc_t create; + idn_checker_destroyproc_t destroy; + idn_checker_lookupproc_t lookup; + void *context; +} check_scheme_t; + +/* + * Standard checking schemes. + */ +static const check_scheme_t rfc3491_prohibit_scheme = { + "prohibit#RFC3491", + "RFC3491", + idn_nameprep_createproc, + idn_nameprep_destroyproc, + idn_nameprep_prohibitproc, + NULL, +}; + +static const check_scheme_t rfc3491_unasigned_scheme = { + "unassigned#RFC3491", + "RFC3491", + idn_nameprep_createproc, + idn_nameprep_destroyproc, + idn_nameprep_unassignedproc, + NULL, +}; + +static const check_scheme_t rfc3491_bidi_scheme = { + "bidi#RFC3491", + "RFC3491", + idn_nameprep_createproc, + idn_nameprep_destroyproc, + idn_nameprep_bidiproc, + NULL, +}; + +static const check_scheme_t filecheck_prohibit_scheme = { + "prohibit#fileset", + NULL, + idn__filechecker_createproc, + idn__filechecker_destroyproc, + idn__filechecker_lookupproc, + NULL, +}; + +static const check_scheme_t filecheck_unassigned_scheme = { + "unassigned#fileset", + NULL, + idn__filechecker_createproc, + idn__filechecker_destroyproc, + idn__filechecker_lookupproc, + NULL, +}; + +static const check_scheme_t *standard_check_schemes[] = { + &rfc3491_unasigned_scheme, + &rfc3491_prohibit_scheme, + &rfc3491_bidi_scheme, + &filecheck_prohibit_scheme, + &filecheck_unassigned_scheme, + NULL, +}; + +/* + * Hash table for checking schemes. + */ +static idn__strhash_t scheme_hash = NULL; + +/* + * Mapper object type. + */ +struct idn_checker { + int nschemes; + int scheme_size; + check_scheme_t *schemes; + int reference_count; +}; + +#define MAPPER_INITIAL_SCHEME_SIZE 1 + +idn_result_t +idn_checker_initialize(void) { + idn_result_t r; + check_scheme_t **scheme; + + TRACE(("idn_checker_initialize()\n")); + + if (scheme_hash != NULL) { + r = idn_success; /* already initialized */ + goto ret; + } + + r = idn__strhash_create(&scheme_hash); + if (r != idn_success) { + goto ret; + } + + for (scheme = (check_scheme_t **)standard_check_schemes; + *scheme != NULL; scheme++) { + r = idn__strhash_put(scheme_hash, (*scheme)->prefix, *scheme); + if (r != idn_success) + goto ret; + } + + r = idn_success; +ret: + if (r != idn_success) { + if (scheme_hash != NULL) { + idn__strhash_destroy(scheme_hash, NULL); + scheme_hash = NULL; + } + } + TRACE(("idn_checker_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_checker_create(idn_checker_t *ctxp) { + idn_checker_t ctx = NULL; + idn_result_t r; + + assert(scheme_hash != NULL); + assert(ctxp != NULL); + + TRACE(("idn_checker_create()\n")); + + ctx = (idn_checker_t) malloc(sizeof(struct idn_checker)); + if (ctx == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->schemes = (check_scheme_t *) malloc(sizeof(check_scheme_t) + * MAPPER_INITIAL_SCHEME_SIZE); + if (ctx->schemes == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->nschemes = 0; + ctx->scheme_size = MAPPER_INITIAL_SCHEME_SIZE; + ctx->reference_count = 1; + *ctxp = ctx; + r = idn_success; +ret: + if (r != idn_success) { + if (ctx != NULL) + free(ctx->schemes); + free(ctx); + } + TRACE(("idn_checker_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_checker_destroy(idn_checker_t ctx) { + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL); + + TRACE(("idn_checker_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_checker_destroy(): the object is destroyed\n")); + for (i = 0; i < ctx->nschemes; i++) + ctx->schemes[i].destroy(ctx->schemes[i].context); + free(ctx->schemes); + free(ctx); + } else { + TRACE(("idn_checker_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_checker_incrref(idn_checker_t ctx) { + assert(ctx != NULL && scheme_hash != NULL); + + TRACE(("idn_checker_incrref()\n")); + TRACE(("idn_checker_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_result_t +idn_checker_add(idn_checker_t ctx, const char *scheme_name) { + idn_result_t r; + check_scheme_t *scheme; + const char *scheme_prefix; + const char *scheme_parameter; + void *scheme_context = NULL; + char *buffer = NULL; + + assert(scheme_hash != NULL); + assert(ctx != NULL); + + TRACE(("idn_checker_add(scheme_name=%s)\n", + idn__debug_xstring(scheme_name, 50))); + + /* + * Split `scheme_name' into `scheme_prefix' and `scheme_parameter'. + */ + scheme_parameter = strchr(scheme_name, ':'); + if (scheme_parameter == NULL) { + scheme_prefix = scheme_name; + scheme_parameter = NULL; + } else { + ptrdiff_t scheme_prefixlen; + + scheme_prefixlen = scheme_parameter - scheme_name; + buffer = (char *) malloc(scheme_prefixlen + 1); + if (buffer == NULL) { + r = idn_nomemory; + goto ret; + } + memcpy(buffer, scheme_name, scheme_prefixlen); + *(buffer + scheme_prefixlen) = '\0'; + scheme_prefix = buffer; + scheme_parameter++; + } + + /* + * Find a scheme. + */ + if (idn__strhash_get(scheme_hash, scheme_prefix, (void **)&scheme) + != idn_success) { + ERROR(("idn_checker_add(): invalid scheme \"%-.30s\"\n", + scheme_name)); + r = idn_invalid_name; + goto ret; + } + if (scheme_parameter == NULL && scheme->parameter != NULL) + scheme_parameter = scheme->parameter; + + /* + * Add the scheme. + */ + assert(ctx->nschemes <= ctx->scheme_size); + + if (ctx->nschemes == ctx->scheme_size) { + check_scheme_t *new_schemes; + + new_schemes = (check_scheme_t *) realloc(ctx->schemes, + sizeof(check_scheme_t) * ctx->scheme_size * 2); + if (new_schemes == NULL) { + r = idn_nomemory; + goto ret; + } + ctx->schemes = new_schemes; + ctx->scheme_size *= 2; + } + + r = scheme->create(scheme_parameter, &scheme_context); + if (r != idn_success) + goto ret; + + memcpy(ctx->schemes + ctx->nschemes, scheme, sizeof(check_scheme_t)); + ctx->schemes[ctx->nschemes].context = scheme_context; + ctx->nschemes++; + r = idn_success; + +ret: + free(buffer); + if (r != idn_success) + free(scheme_context); + TRACE(("idn_checker_add(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_checker_addall(idn_checker_t ctx, const char **scheme_names, + int nschemes) { + idn_result_t r; + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL && scheme_names != NULL); + + TRACE(("idn_checker_addall(nschemes=%d)\n", nschemes)); + + for (i = 0; i < nschemes; i++) { + r = idn_checker_add(ctx, (const char *)*scheme_names); + if (r != idn_success) + goto ret; + scheme_names++; + } + + r = idn_success; +ret: + TRACE(("idn_checker_addall(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_checker_lookup(idn_checker_t ctx, const unsigned long *ucs4, + const unsigned long **found) { + idn_result_t r; + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL && ucs4 != NULL && found != NULL); + + TRACE(("idn_checker_lookup(ucs4=\"%s\")\n", + idn__debug_ucs4xstring(ucs4, 50))); + + /* + * Lookup. + */ + *found = NULL; + + for (i = 0; i < ctx->nschemes; i++) { + TRACE(("idn_checker_lookup(): lookup %s\n", + ctx->schemes[i].prefix)); + + r = (ctx->schemes[i].lookup)(ctx->schemes[i].context, ucs4, + found); + if (r != idn_success) + goto ret; + if (*found != NULL) + break; + } + + r = idn_success; +ret: + if (*found == NULL) { + TRACE(("idn_checker_lookup(): %s (not found)\n", + idn_result_tostring(r))); + } else { + TRACE(("idn_checker_lookup(): %s (found \\x%04lx)\n", + idn_result_tostring(r), **found)); + } + return (r); +} + +idn_result_t +idn_checker_register(const char *prefix, + idn_checker_createproc_t create, + idn_checker_destroyproc_t destroy, + idn_checker_lookupproc_t lookup) { + idn_result_t r; + check_scheme_t *scheme = NULL; + + assert(scheme_hash != NULL); + assert(prefix != NULL && create != NULL && destroy != NULL && + lookup != NULL); + + TRACE(("idn_checker_register(prefix=%s)\n", prefix)); + + scheme = (check_scheme_t *) malloc(sizeof(check_scheme_t)); + if (scheme == NULL) { + r = idn_nomemory; + goto ret; + } + + scheme->prefix = (char *) malloc(strlen(prefix) + 1); + if (scheme->prefix == NULL) { + r = idn_nomemory; + goto ret; + } + + strcpy(scheme->prefix, prefix); + scheme->parameter = NULL; + scheme->create = create; + scheme->destroy = destroy; + scheme->lookup = lookup; + + r = idn__strhash_put(scheme_hash, prefix, scheme); +ret: + if (r != idn_success) { + if (scheme != NULL) + free(scheme->prefix); + free(scheme); + } + TRACE(("idn_checker_register(): %s\n", idn_result_tostring(r))); + return (r); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/converter.c b/contrib/idn/idnkit-1.0-src/lib/converter.c new file mode 100644 index 0000000000..b08984c36a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/converter.c @@ -0,0 +1,1244 @@ +#ifndef lint +static char *rcsid = "$Id: converter.c,v 1.1 2003/06/04 00:25:51 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include +#include +#ifndef WITHOUT_ICONV +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef IDN_UTF8_ENCODING_NAME +#define IDN_UTF8_ENCODING_NAME "UTF-8" /* by IANA */ +#endif +#ifndef IDN_RACE_ENCODING_NAME +#define IDN_RACE_ENCODING_NAME "RACE" +#endif +#ifndef IDN_AMCACEZ_ENCODING_NAME +#define IDN_AMCACEZ_ENCODING_NAME "AMC-ACE-Z" +#endif +#ifndef IDN_PUNYCODE_ENCODING_NAME +#define IDN_PUNYCODE_ENCODING_NAME "Punycode" +#endif + +#define MAX_RECURSE 20 + +#ifdef WIN32 + +#define IDNKEY_IDNKIT "Software\\JPNIC\\IDN" +#define IDNVAL_ALIASFILE "AliasFile" + +#else /* WIN32 */ + +#ifndef IDN_RESCONF_DIR +#define IDN_RESCONF_DIR "/etc" +#endif +#define IDN_ALIAS_FILE IDN_RESCONF_DIR "/idnalias.conf" + +#endif /* WIN32 */ + +typedef struct { + idn_converter_openproc_t openfromucs4; + idn_converter_openproc_t opentoucs4; + idn_converter_convfromucs4proc_t convfromucs4; + idn_converter_convtoucs4proc_t convtoucs4; + idn_converter_closeproc_t close; + int encoding_type; +} converter_ops_t; + +struct idn_converter { + char *local_encoding_name; + converter_ops_t *ops; + int flags; + int opened_convfromucs4; + int opened_convtoucs4; + int reference_count; + void *private_data; +}; + +static idn__strhash_t encoding_name_hash; +static idn__aliaslist_t encoding_alias_list; + +static idn_result_t register_standard_encoding(void); +static idn_result_t roundtrip_check(idn_converter_t ctx, + const unsigned long *from, + const char *to); + +static idn_result_t + converter_none_open(idn_converter_t ctx, void **privdata); +static idn_result_t + converter_none_close(idn_converter_t ctx, void *privdata); +static idn_result_t + converter_none_convfromucs4(idn_converter_t ctx, + void *privdata, + const unsigned long *from, + char *to, size_t tolen); +static idn_result_t + converter_none_convtoucs4(idn_converter_t ctx, + void *privdata, const char *from, + unsigned long *to, size_t tolen); + +#ifndef WITHOUT_ICONV +static idn_result_t + converter_iconv_openfromucs4(idn_converter_t ctx, void **privdata); +static idn_result_t + converter_iconv_opentoucs4(idn_converter_t ctx, void **privdata); +static idn_result_t + converter_iconv_close(idn_converter_t ctx, void *privdata); +static idn_result_t + converter_iconv_convfromucs4(idn_converter_t ctx, + void *privdata, + const unsigned long *from, + char *to, size_t tolen); +static idn_result_t + converter_iconv_convtoucs4(idn_converter_t ctx, + void *privdata, + const char *from, + unsigned long *to, size_t tolen); + +static idn_result_t +iconv_initialize_privdata(void **privdata); +static void +iconv_finalize_privdata(void *privdata); + +static char * get_system_aliasfile(void); +static int file_exist(const char *filename); + +#endif /* !WITHOUT_ICONV */ + +#ifdef DEBUG +static idn_result_t + converter_uescape_convfromucs4(idn_converter_t ctx, + void *privdata, + const unsigned long *from, + char *to, size_t tolen); +static idn_result_t + converter_uescape_convtoucs4(idn_converter_t ctx, + void *privdata, + const char *from, + unsigned long *to, + size_t tolen); +#endif /* DEBUG */ + +static converter_ops_t none_converter_ops = { + converter_none_open, + converter_none_open, + converter_none_convfromucs4, + converter_none_convtoucs4, + converter_none_close, + IDN_NONACE, +}; + +#ifndef WITHOUT_ICONV +static converter_ops_t iconv_converter_ops = { + converter_iconv_openfromucs4, + converter_iconv_opentoucs4, + converter_iconv_convfromucs4, + converter_iconv_convtoucs4, + converter_iconv_close, + IDN_NONACE, +}; +#endif + +/* + * Initialize. + */ + +idn_result_t +idn_converter_initialize(void) { + idn_result_t r; + idn__strhash_t hash; + idn__aliaslist_t list; +#ifndef WITHOUT_ICONV + const char *fname; +#endif + + TRACE(("idn_converter_initialize()\n")); + + if (encoding_name_hash == NULL) { + if ((r = idn__strhash_create(&hash)) != idn_success) + goto ret; + encoding_name_hash = hash; + r = register_standard_encoding(); + } + if (encoding_alias_list == NULL) { + if ((r = idn__aliaslist_create(&list)) != idn_success) + goto ret; + encoding_alias_list = list; +#ifndef WITHOUT_ICONV + fname = get_system_aliasfile(); + if (fname != NULL && file_exist(fname)) + idn_converter_aliasfile(fname); +#endif + } + + r = idn_success; +ret: + TRACE(("idn_converter_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +#ifndef WITHOUT_ICONV +static char * +get_system_aliasfile() { +#ifdef WIN32 + static char alias_path[500]; /* a good longer than MAX_PATH */ + + if (idn__util_getregistrystring(idn__util_hkey_localmachine, + IDNVAL_ALIASFILE, + alias_path, sizeof(alias_path))) { + return (alias_path); + } else { + return (NULL); + } +#else + return (IDN_ALIAS_FILE); +#endif +} + +static int +file_exist(const char *filename) { + FILE *fp; + + if ((fp = fopen(filename, "r")) == NULL) + return (0); + fclose(fp); + return (1); +} +#endif + +idn_result_t +idn_converter_create(const char *name, idn_converter_t *ctxp, int flags) { + const char *realname; + idn_converter_t ctx; + idn_result_t r; + void *v; + + assert(name != NULL && ctxp != NULL); + + TRACE(("idn_converter_create(%s)\n", name)); + + realname = idn_converter_getrealname(name); +#ifdef DEBUG + if (strcmp(name, realname) != 0) { + TRACE(("idn_converter_create: realname=%s\n", realname)); + } +#endif + + *ctxp = NULL; + + /* Allocate memory for a converter context and the name. */ + ctx = malloc(sizeof(struct idn_converter) + strlen(realname) + 1); + if (ctx == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->local_encoding_name = (char *)(ctx + 1); + (void)strcpy(ctx->local_encoding_name, realname); + ctx->flags = flags; + ctx->reference_count = 1; + ctx->opened_convfromucs4 = 0; + ctx->opened_convtoucs4 = 0; + ctx->private_data = NULL; + + assert(encoding_name_hash != NULL); + + if (strcmp(realname, IDN_UTF8_ENCODING_NAME) == 0) { + /* No conversion needed */ + ctx->ops = &none_converter_ops; + } else if ((r = idn__strhash_get(encoding_name_hash, realname, &v)) + == idn_success) { + /* Special converter found */ + ctx->ops = (converter_ops_t *)v; + } else { + /* General case */ +#ifdef WITHOUT_ICONV + free(ctx); + *ctxp = NULL; + r = idn_invalid_name; + goto ret; +#else + ctx->ops = &iconv_converter_ops; +#endif + } + + if ((flags & IDN_CONVERTER_DELAYEDOPEN) == 0) { + r = (ctx->ops->openfromucs4)(ctx, &(ctx->private_data)); + if (r != idn_success) { + WARNING(("idn_converter_create(): open failed " + "(ucs4->local)\n")); + free(ctx); + *ctxp = NULL; + goto ret; + } + ctx->opened_convfromucs4 = 1; + + r = (*ctx->ops->opentoucs4)(ctx, &(ctx->private_data)); + if (r != idn_success) { + WARNING(("idn_converter_create(): open failed " + "(local->ucs4)\n")); + free(ctx); + *ctxp = NULL; + goto ret; + } + ctx->opened_convtoucs4 = 1; + } + + *ctxp = ctx; + r = idn_success; +ret: + TRACE(("idn_converter_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_converter_destroy(idn_converter_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_converter_destroy(ctx=%s)\n", ctx->local_encoding_name)); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_converter_destroy(): the object is destroyed\n")); + (void)(*ctx->ops->close)(ctx, ctx->private_data); + free(ctx); + } else { + TRACE(("idn_converter_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_converter_incrref(idn_converter_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_converter_incrref(ctx=%s)\n", ctx->local_encoding_name)); + TRACE(("idn_converter_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +char * +idn_converter_localencoding(idn_converter_t ctx) { + assert(ctx != NULL); + TRACE(("idn_converter_localencoding(ctx=%s)\n", + ctx->local_encoding_name)); + return (ctx->local_encoding_name); +} + +int +idn_converter_encodingtype(idn_converter_t ctx) { + int encoding_type; + + assert(ctx != NULL); + TRACE(("idn_converter_encodingtype(ctx=%s)\n", + ctx->local_encoding_name)); + + encoding_type = ctx->ops->encoding_type; + TRACE(("idn_converter_encodingtype(): %d\n", encoding_type)); + return (encoding_type); +} + +int +idn_converter_isasciicompatible(idn_converter_t ctx) { + int iscompat; + + assert(ctx != NULL); + TRACE(("idn_converter_isasciicompatible(ctx=%s)\n", + ctx->local_encoding_name)); + + iscompat = (ctx->ops->encoding_type != IDN_NONACE); + TRACE(("idn_converter_isasciicompatible(): %d\n", iscompat)); + return (iscompat); +} + +idn_result_t +idn_converter_convfromucs4(idn_converter_t ctx, const unsigned long *from, + char *to, size_t tolen) { + idn_result_t r; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_converter_convfromucs4(ctx=%s, from=\"%s\", tolen=%d)\n", + ctx->local_encoding_name, idn__debug_ucs4xstring(from, 50), + (int)tolen)); + + if (!ctx->opened_convfromucs4) { + r = (*ctx->ops->openfromucs4)(ctx, &(ctx->private_data)); + if (r != idn_success) + goto ret; + ctx->opened_convfromucs4 = 1; + } + + r = (*ctx->ops->convfromucs4)(ctx, ctx->private_data, from, to, tolen); + if (r != idn_success) + goto ret; + if ((ctx->flags & IDN_CONVERTER_RTCHECK) != 0) { + r = roundtrip_check(ctx, from, to); + if (r != idn_success) + goto ret; + } + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_converter_convfromucs4(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_converter_convfromucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_converter_convtoucs4(idn_converter_t ctx, const char *from, + unsigned long *to, size_t tolen) { + idn_result_t r; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_converter_convtoucs4(ctx=%s, from=\"%s\", tolen=%d)\n", + ctx->local_encoding_name, idn__debug_xstring(from, 50), + (int)tolen)); + + if (!ctx->opened_convtoucs4) { + r = (*ctx->ops->opentoucs4)(ctx, &(ctx->private_data)); + if (r != idn_success) + goto ret; + ctx->opened_convtoucs4 = 1; + } + + r = (*ctx->ops->convtoucs4)(ctx, ctx->private_data, from, to, tolen); +ret: + if (r == idn_success) { + TRACE(("idn_converter_convtoucs4(): success (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn_converter_convtoucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +/* + * Encoding registration. + */ + +idn_result_t +idn_converter_register(const char *name, + idn_converter_openproc_t openfromucs4, + idn_converter_openproc_t opentoucs4, + idn_converter_convfromucs4proc_t convfromucs4, + idn_converter_convtoucs4proc_t convtoucs4, + idn_converter_closeproc_t close, + int encoding_type) { + converter_ops_t *ops; + idn_result_t r; + + assert(name != NULL && convfromucs4 != NULL && convtoucs4 != NULL); + + TRACE(("idn_converter_register(name=%s)\n", name)); + + if ((ops = malloc(sizeof(*ops))) == NULL) { + r = idn_nomemory; + goto ret; + } + + if (openfromucs4 == NULL) + openfromucs4 = converter_none_open; + if (opentoucs4 == NULL) + opentoucs4 = converter_none_open; + if (close == NULL) + close = converter_none_close; + + ops->openfromucs4 = openfromucs4; + ops->opentoucs4 = opentoucs4; + ops->convfromucs4 = convfromucs4; + ops->convtoucs4 = convtoucs4; + ops->close = close; + ops->encoding_type = encoding_type; + + r = idn__strhash_put(encoding_name_hash, name, ops); + if (r != idn_success) { + free(ops); + goto ret; + } + + r = idn_success; +ret: + TRACE(("idn_converter_register(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +register_standard_encoding(void) { + idn_result_t r; + + r = idn_converter_register(IDN_PUNYCODE_ENCODING_NAME, + NULL, + NULL, + idn__punycode_encode, + idn__punycode_decode, + converter_none_close, + IDN_ACE_STRICTCASE); + if (r != idn_success) + return (r); + +#ifdef IDN_EXTRA_ACE + r = idn_converter_register(IDN_AMCACEZ_ENCODING_NAME, + NULL, + NULL, + idn__punycode_encode, + idn__punycode_decode, + converter_none_close, + IDN_ACE_STRICTCASE); + if (r != idn_success) + return (r); + + r = idn_converter_register(IDN_RACE_ENCODING_NAME, + NULL, + NULL, + idn__race_encode, + idn__race_decode, + converter_none_close, + IDN_ACE_LOOSECASE); + if (r != idn_success) + return (r); +#endif /* IDN_EXTRA_ACE */ + +#ifdef DEBUG + /* This is convenient for debug. Not useful for other purposes. */ + r = idn_converter_register("U-escape", + NULL, + NULL, + converter_uescape_convfromucs4, + converter_uescape_convtoucs4, + NULL, + IDN_NONACE); + if (r != idn_success) + return (r); +#endif /* DEBUG */ + + return (r); +} + +/* + * Encoding alias support. + */ +idn_result_t +idn_converter_addalias(const char *alias_name, const char *real_name, + int first_item) { + idn_result_t r; + + assert(alias_name != NULL && real_name != NULL); + + TRACE(("idn_converter_addalias(alias_name=%s,real_name=%s)\n", + alias_name, real_name)); + + if (strlen(alias_name) == 0 || strlen(real_name) == 0) { + return idn_invalid_syntax; + } + + if (strcmp(alias_name, real_name) == 0) { + r = idn_success; + goto ret; + } + + if (encoding_alias_list == NULL) { + WARNING(("idn_converter_addalias(): the module is not " + "initialized\n")); + r = idn_failure; + goto ret; + } + + r = idn__aliaslist_additem(encoding_alias_list, alias_name, real_name, + first_item); +ret: + TRACE(("idn_converter_addalias(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_converter_aliasfile(const char *path) { + idn_result_t r; + + assert(path != NULL); + + TRACE(("idn_converter_aliasfile(path=%s)\n", path)); + + if (encoding_alias_list == NULL) { + WARNING(("idn_converter_aliasfile(): the module is not " + "initialized\n")); + return (idn_failure); + } + + r = idn__aliaslist_aliasfile(encoding_alias_list, path); + + TRACE(("idn_converter_aliasfile(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_converter_resetalias(void) { + idn__aliaslist_t list; + idn_result_t r; + + TRACE(("idn_converter_resetalias()\n")); + + if (encoding_alias_list == NULL) { + WARNING(("idn_converter_resetalias(): the module is not " + "initialized\n")); + return (idn_failure); + } + + list = encoding_alias_list; + encoding_alias_list = NULL; + idn__aliaslist_destroy(list); + list = NULL; + r = idn__aliaslist_create(&list); + encoding_alias_list = list; + + TRACE(("idn_converter_resetalias(): %s\n", idn_result_tostring(r))); + return (r); +} + +const char * +idn_converter_getrealname(const char *name) { + char *realname; + idn_result_t r; + + TRACE(("idn_converter_getrealname()\n")); + + assert(name != NULL); + + if (encoding_alias_list == NULL) { + WARNING(("idn_converter_getrealname(): the module is not " + "initialized\n")); + return (name); + } + + r = idn__aliaslist_find(encoding_alias_list, name, &realname); + if (r != idn_success) { + return (name); + } + return (realname); +} + +/* + * Round trip check. + */ + +static idn_result_t +roundtrip_check(idn_converter_t ctx, const unsigned long *from, const char *to) +{ + /* + * One problem with iconv() convertion is that + * iconv() doesn't signal an error if the input + * string contains characters which are valid but + * do not have mapping to the output codeset. + * (the behavior of iconv() for that case is defined as + * `implementation dependent') + * One way to check this case is to perform round-trip + * conversion and see if it is same as the original string. + */ + idn_result_t r; + unsigned long *back; + unsigned long backbuf[256]; + size_t fromlen; + size_t backlen; + + TRACE(("idn_converter_convert: round-trip checking (from=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + /* Allocate enough buffer. */ + fromlen = idn_ucs4_strlen(from) + 1; + if (fromlen * sizeof(*back) <= sizeof(backbuf)) { + backlen = sizeof(backbuf); + back = backbuf; + } else { + backlen = fromlen; + back = (unsigned long *)malloc(backlen * sizeof(*back)); + if (back == NULL) + return (idn_nomemory); + } + + /* + * Perform backward conversion. + */ + r = idn_converter_convtoucs4(ctx, to, back, backlen); + switch (r) { + case idn_success: + if (memcmp(back, from, sizeof(*from) * fromlen) != 0) + r = idn_nomapping; + break; + case idn_invalid_encoding: + case idn_buffer_overflow: + r = idn_nomapping; + break; + default: + break; + } + + if (back != backbuf) + free(back); + + if (r != idn_success) { + TRACE(("round-trip check failed: %s\n", + idn_result_tostring(r))); + } + + return (r); +} + +/* + * Identity conversion (or, no conversion at all). + */ + +static idn_result_t +converter_none_open(idn_converter_t ctx, void **privdata) { + assert(ctx != NULL); + + return (idn_success); +} + +static idn_result_t +converter_none_close(idn_converter_t ctx, void *privdata) { + assert(ctx != NULL); + + return (idn_success); +} + +static idn_result_t +converter_none_convfromucs4(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen) { + assert(ctx != NULL && from != NULL && to != NULL); + + return idn_ucs4_ucs4toutf8(from, to, tolen); +} + +static idn_result_t +converter_none_convtoucs4(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) { + assert(ctx != NULL && from != NULL && to != NULL); + + return idn_ucs4_utf8toucs4(from, to, tolen); +} + +#ifndef WITHOUT_ICONV + +/* + * Conversion using iconv() interface. + */ + +static idn_result_t +converter_iconv_openfromucs4(idn_converter_t ctx, void **privdata) { + iconv_t *ictxp; + idn_result_t r; + + assert(ctx != NULL); + + r = iconv_initialize_privdata(privdata); + if (r != idn_success) + return (r); + + ictxp = (iconv_t *)*privdata; + *ictxp = iconv_open(ctx->local_encoding_name, IDN_UTF8_ENCODING_NAME); + if (*ictxp == (iconv_t)(-1)) { + free(*privdata); + *privdata = NULL; + switch (errno) { + case ENOMEM: + return (idn_nomemory); + case EINVAL: + return (idn_invalid_name); + default: + WARNING(("iconv_open failed with errno %d\n", errno)); + return (idn_failure); + } + } + + return (idn_success); +} + +static idn_result_t +converter_iconv_opentoucs4(idn_converter_t ctx, void **privdata) { + iconv_t *ictxp; + idn_result_t r; + + assert(ctx != NULL); + + r = iconv_initialize_privdata(privdata); + if (r != idn_success) + return (r); + + ictxp = (iconv_t *)*privdata + 1; + *ictxp = iconv_open(IDN_UTF8_ENCODING_NAME, ctx->local_encoding_name); + if (*ictxp == (iconv_t)(-1)) { + free(*privdata); + *privdata = NULL; + switch (errno) { + case ENOMEM: + return (idn_nomemory); + case EINVAL: + return (idn_invalid_name); + default: + WARNING(("iconv_open failed with errno %d\n", errno)); + return (idn_failure); + } + } + + return (idn_success); +} + +static idn_result_t +iconv_initialize_privdata(void **privdata) { + if (*privdata == NULL) { + *privdata = malloc(sizeof(iconv_t) * 2); + if (*privdata == NULL) + return (idn_nomemory); + *((iconv_t *)*privdata) = (iconv_t)(-1); + *((iconv_t *)*privdata + 1) = (iconv_t)(-1); + } + + return (idn_success); +} + +static void +iconv_finalize_privdata(void *privdata) { + iconv_t *ictxp; + + if (privdata != NULL) { + ictxp = (iconv_t *)privdata; + if (*ictxp != (iconv_t)(-1)) + iconv_close(*ictxp); + + ictxp++; + if (*ictxp != (iconv_t)(-1)) + iconv_close(*ictxp); + free(privdata); + } +} + +static idn_result_t +converter_iconv_close(idn_converter_t ctx, void *privdata) { + assert(ctx != NULL); + + iconv_finalize_privdata(privdata); + + return (idn_success); +} + +static idn_result_t +converter_iconv_convfromucs4(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, + size_t tolen) { + iconv_t ictx; + char *utf8 = NULL; + size_t utf8size = 256; /* large enough */ + idn_result_t r; + size_t sz; + size_t inleft; + size_t outleft; + char *inbuf, *outbuf; + + assert(ctx != NULL && from != NULL && to != NULL); + + if (tolen <= 0) { + r = idn_buffer_overflow; /* need space for NUL */ + goto ret; + } + + /* + * UCS4 -> UTF-8 conversion. + */ + utf8 = (char *)malloc(utf8size); + if (utf8 == NULL) { + r = idn_nomemory; + goto ret; + } + +try_again: + r = idn_ucs4_ucs4toutf8(from, utf8, utf8size); + if (r == idn_buffer_overflow) { + char *new_utf8; + + utf8size *= 2; + new_utf8 = (char *)realloc(utf8, utf8size); + if (new_utf8 == NULL) { + r = idn_nomemory; + goto ret; + } + utf8 = new_utf8; + goto try_again; + } else if (r != idn_success) { + goto ret; + } + + ictx = ((iconv_t *)privdata)[0]; + + /* + * Reset internal state. + * + * The following code should work according to the SUSv2 spec, + * but causes segmentation fault with Solaris 2.6. + * So.. a work-around. + * + * (void)iconv(ictx, (const char **)NULL, (size_t *)NULL, + * (char **)NULL, (size_t *)NULL); + */ + inleft = 0; + outbuf = NULL; + outleft = 0; + (void)iconv(ictx, (const char **)NULL, &inleft, &outbuf, &outleft); + + inleft = strlen(utf8); + inbuf = utf8; + outleft = tolen - 1; /* reserve space for terminating NUL */ + sz = iconv(ictx, (const char **)&inbuf, &inleft, &to, &outleft); + + if (sz == (size_t)(-1) || inleft > 0) { + switch (errno) { + case EILSEQ: + case EINVAL: + /* + * We already checked the validity of the input + * string. So we assume a mapping error. + */ + r = idn_nomapping; + goto ret; + case E2BIG: + r = idn_buffer_overflow; + goto ret; + default: + WARNING(("iconv failed with errno %d\n", errno)); + r = idn_failure; + goto ret; + } + } + + /* + * For UTF-8 -> local conversion, append a sequence of + * state reset. + */ + inleft = 0; + sz = iconv(ictx, (const char **)NULL, &inleft, &to, &outleft); + if (sz == (size_t)(-1)) { + switch (errno) { + case EILSEQ: + case EINVAL: + r = idn_invalid_encoding; + goto ret; + case E2BIG: + r = idn_buffer_overflow; + goto ret; + default: + WARNING(("iconv failed with errno %d\n", errno)); + r = idn_failure; + goto ret; + } + } + *to = '\0'; + r = idn_success; + +ret: + free(utf8); + return (r); + +} + +static idn_result_t +converter_iconv_convtoucs4(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) { + iconv_t ictx; + char *utf8 = NULL; + size_t utf8size = 256; /* large enough */ + idn_result_t r; + size_t sz; + size_t inleft; + size_t outleft; + const char *from_ptr; + char *outbuf; + + assert(ctx != NULL && from != NULL && to != NULL); + + if (tolen <= 0) { + r = idn_buffer_overflow; /* need space for NUL */ + goto ret; + } + ictx = ((iconv_t *)privdata)[1]; + utf8 = (char *)malloc(utf8size); + if (utf8 == NULL) { + r = idn_nomemory; + goto ret; + } + +try_again: + /* + * Reset internal state. + */ + inleft = 0; + outbuf = NULL; + outleft = 0; + (void)iconv(ictx, (const char **)NULL, &inleft, &outbuf, &outleft); + + from_ptr = from; + inleft = strlen(from); + outbuf = utf8; + outleft = utf8size - 1; /* reserve space for terminating NUL */ + sz = iconv(ictx, (const char **)&from_ptr, &inleft, &outbuf, &outleft); + + if (sz == (size_t)(-1) || inleft > 0) { + char *new_utf8; + + switch (errno) { + case EILSEQ: + case EINVAL: + /* + * We assume all the characters in the local + * codeset are included in UCS. This means mapping + * error is not possible, so the input string must + * have some problem. + */ + r = idn_invalid_encoding; + goto ret; + case E2BIG: + utf8size *= 2; + new_utf8 = (char *)realloc(utf8, utf8size); + if (new_utf8 == NULL) { + r = idn_nomemory; + goto ret; + } + utf8 = new_utf8; + goto try_again; + default: + WARNING(("iconv failed with errno %d\n", errno)); + r = idn_failure; + goto ret; + } + } + *outbuf = '\0'; + + /* + * UTF-8 -> UCS4 conversion. + */ + r = idn_ucs4_utf8toucs4(utf8, to, tolen); + +ret: + free(utf8); + return (r); +} + +#endif /* !WITHOUT_ICONV */ + +#ifdef DEBUG +/* + * Conversion to/from unicode escape string. + * Arbitrary UCS-4 character can be specified by a special sequence + * \u{XXXXXX} + * where XXXXX denotes any hexadecimal string up to FFFFFFFF. + * This is designed for debugging. + */ + +static idn_result_t +converter_uescape_convfromucs4(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, + size_t tolen) { + idn_result_t r; + unsigned long v; + + while (*from != '\0') { + v = *from++; + + if (v <= 0x7f) { + if (tolen < 1) { + r = idn_buffer_overflow; + goto failure; + } + *to++ = v; + tolen--; + } else if (v <= 0xffffffff) { + char tmp[20]; + int len; + + (void)sprintf(tmp, "\\u{%lx}", v); + len = strlen(tmp); + if (tolen < len) { + r = idn_buffer_overflow; + goto failure; + } + (void)memcpy(to, tmp, len); + to += len; + tolen -= len; + } else { + r = idn_invalid_encoding; + goto failure; + } + } + + if (tolen <= 0) { + r = idn_buffer_overflow; + goto failure; + } + *to = '\0'; + + return (idn_success); + +failure: + if (r != idn_buffer_overflow) { + WARNING(("idn_uescape_convfromucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +static idn_result_t +converter_uescape_convtoucs4(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) +{ + idn_result_t r; + size_t fromlen = strlen(from); + + while (*from != '\0') { + if (tolen <= 0) { + r = idn_buffer_overflow; + goto failure; + } + if (strncmp(from, "\\u{", 3) == 0 || + strncmp(from, "\\U{", 3) == 0) { + size_t ullen; + unsigned long v; + char *end; + + v = strtoul(from + 3, &end, 16); + ullen = end - (from + 3); + if (*end == '}' && ullen > 1 && ullen < 8) { + *to = v; + from = end + 1; + fromlen -= ullen; + } else { + *to = '\\'; + from++; + fromlen--; + } + } else { + int c = *(unsigned char *)from; + size_t width; + char buf[8]; + + if (c < 0x80) + width = 1; + else if (c < 0xc0) + width = 0; + else if (c < 0xe0) + width = 2; + else if (c < 0xf0) + width = 3; + else if (c < 0xf8) + width = 4; + else if (c < 0xfc) + width = 5; + else if (c < 0xfe) + width = 6; + else + width = 0; + if (width == 0 || width > fromlen) { + r = idn_invalid_encoding; + goto failure; + } + + memcpy(buf, from, width); + buf[width] = '\0'; + r = idn_ucs4_utf8toucs4(buf, to, tolen); + if (r != idn_success) { + r = idn_invalid_encoding; + goto failure; + } + from += width; + fromlen -= width; + } + to++; + tolen--; + } + + if (tolen <= 0) { + r = idn_buffer_overflow; + goto failure; + } + *to = '\0'; + + return (idn_success); + +failure: + if (r != idn_buffer_overflow) { + WARNING(("idn_uescape_convtoucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +#endif diff --git a/contrib/idn/idnkit-1.0-src/lib/debug.c b/contrib/idn/idnkit-1.0-src/lib/debug.c new file mode 100644 index 0000000000..51037e9d3c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/debug.c @@ -0,0 +1,267 @@ +#ifndef lint +static char *rcsid = "$Id: debug.c,v 1.1 2003/06/04 00:25:51 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include + +#include + +static char *hex = "0123456789abcdef"; + +#define STRING_MAXBYTES 200 +#define STRING_NBUFS 4 +static char bufs[STRING_NBUFS][STRING_MAXBYTES + 16]; /* +16 for margin */ +static int bufno = 0; + +char * +idn__debug_hexstring(const char *s, int maxbytes) { + char *buf = bufs[bufno]; + char *p; + int i; + + if (maxbytes > STRING_MAXBYTES) + maxbytes = STRING_MAXBYTES; + + for (i = 0, p = buf; i < maxbytes; i += 3, s++) { + int c = *(unsigned char *)s; + + if (c == '\0') + break; + *p++ = hex[c >> 4]; + *p++ = hex[c & 15]; + *p++ = ' '; + } + + if (i >= maxbytes) + strcpy(p, "..."); + else + *p = '\0'; + + bufno = (bufno + 1) % STRING_NBUFS; + return (buf); +} + +char * +idn__debug_xstring(const char *s, int maxbytes) { + char *buf = bufs[bufno]; + char *p; + int i; + + if (maxbytes > STRING_MAXBYTES) + maxbytes = STRING_MAXBYTES; + + i = 0; + p = buf; + while (i < maxbytes) { + int c = *(unsigned char *)s; + + if (c == '\0') { + break; + } else if (0x20 <= c && c <= 0x7e) { + *p++ = c; + i++; + } else { + *p++ = '\\'; + *p++ = 'x'; + *p++ = hex[c >> 4]; + *p++ = hex[c & 15]; + i += 4; + } + s++; + } + + if (i >= maxbytes) + strcpy(p, "..."); + else + *p = '\0'; + + bufno = (bufno + 1) % STRING_NBUFS; + return (buf); +} + +char * +idn__debug_ucs4xstring(const unsigned long *s, int maxbytes) { + char *buf = bufs[bufno]; + char *p; + int i; + + if (maxbytes > STRING_MAXBYTES) + maxbytes = STRING_MAXBYTES; + + i = 0; + p = buf; + while (i < maxbytes) { + if (*s == '\0') { + break; + } else if (0x20 <= *s && *s <= 0x7e) { + *p++ = *s; + i++; + } else { + *p++ = '\\'; + *p++ = 'x'; + i += 2; + if (*s >= 0x1000000UL) { + *p++ = hex[(*s >> 28) & 0x0f]; + *p++ = hex[(*s >> 24) & 0x0f]; + i += 2; + } + if (*s >= 0x10000UL) { + *p++ = hex[(*s >> 20) & 0x0f]; + *p++ = hex[(*s >> 16) & 0x0f]; + i += 2; + } + if (*s >= 0x100UL) { + *p++ = hex[(*s >> 12) & 0x0f]; + *p++ = hex[(*s >> 8) & 0x0f]; + i += 2; + } + *p++ = hex[(*s >> 4) & 0x0f]; + *p++ = hex[ *s & 0x0f]; + i += 2; + } + s++; + } + + if (i >= maxbytes) + strcpy(p, "..."); + else + *p = '\0'; + + bufno = (bufno + 1) % STRING_NBUFS; + return (buf); +} + +char * +idn__debug_utf16xstring(const unsigned short *s, int maxbytes) { + char *buf = bufs[bufno]; + char *p; + int i; + + if (maxbytes > STRING_MAXBYTES) + maxbytes = STRING_MAXBYTES; + + i = 0; + p = buf; + while (i < maxbytes) { + if (*s == '\0') { + break; + } else if (0x20 <= *s && *s <= 0x7e) { + *p++ = *s; + i++; + } else { + *p++ = '\\'; + *p++ = 'x'; + *p++ = hex[(*s >> 12) & 0x0f]; + *p++ = hex[(*s >> 8) & 0x0f]; + *p++ = hex[(*s >> 4) & 0x0f]; + *p++ = hex[ *s & 0x0f]; + i += 6; + } + s++; + } + + if (i >= maxbytes) + strcpy(p, "..."); + else + *p = '\0'; + + bufno = (bufno + 1) % STRING_NBUFS; + return (buf); +} + +char * +idn__debug_hexdata(const char *s, int length, int maxbytes) { + char *buf = bufs[bufno]; + char *p; + int i; + + if (maxbytes > STRING_MAXBYTES) + maxbytes = STRING_MAXBYTES; + + i = 0; + p = buf; + while (length > 0 && i < maxbytes) { + int c = *(const unsigned char *)s; + + *p++ = hex[c >> 4]; + *p++ = hex[c & 15]; + *p++ = ' '; + i += 3; + length--; + s++; + } + + if (i >= maxbytes) + strcpy(p, "..."); + else + *p = '\0'; + + bufno = (bufno + 1) % STRING_NBUFS; + return (buf); +} + +void +idn__debug_hexdump(const char *s, int length) { + int i; + const unsigned char *p = (const unsigned char *)s; + + i = 0; + while (length-- > 0) { + if (i % 16 == 0) { + if (i > 0) + fprintf(stderr, "\n"); + fprintf(stderr, "%4x:", i); + } + fprintf(stderr, " %02x", p[i]); + i++; + } + fprintf(stderr, "\n"); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/delimitermap.c b/contrib/idn/idnkit-1.0-src/lib/delimitermap.c new file mode 100644 index 0000000000..a54142b0fa --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/delimitermap.c @@ -0,0 +1,268 @@ +#ifndef lint +static char *rcsid = "$Id: delimitermap.c,v 1.1 2003/06/04 00:25:52 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* + * Mapper object type. + */ +struct idn_delimitermap { + int ndelimiters; + int delimiter_size; + unsigned long *delimiters; + int reference_count; +}; + +#define DELIMITERMAP_INITIAL_DELIMITER_SIZE 4 +#define UNICODE_MAX 0x10ffff +#define IS_SURROGATE_HIGH(v) (0xd800 <= (v) && (v) <= 0xdbff) +#define IS_SURROGATE_LOW(v) (0xdc00 <= (v) && (v) <= 0xdfff) + +idn_result_t +idn_delimitermap_create(idn_delimitermap_t *ctxp) { + idn_delimitermap_t ctx = NULL; + idn_result_t r; + + assert(ctxp != NULL); + TRACE(("idn_delimitermap_create()\n")); + + ctx = (idn_delimitermap_t) malloc(sizeof(struct idn_delimitermap)); + if (ctx == NULL) { + WARNING(("idn_mapper_create: malloc failed\n")); + r = idn_nomemory; + goto ret; + } + + ctx->delimiters = (unsigned long *) malloc(sizeof(unsigned long) + * DELIMITERMAP_INITIAL_DELIMITER_SIZE); + if (ctx->delimiters == NULL) { + r = idn_nomemory; + goto ret; + } + ctx->ndelimiters = 0; + ctx->delimiter_size = DELIMITERMAP_INITIAL_DELIMITER_SIZE; + ctx->reference_count = 1; + *ctxp = ctx; + r = idn_success; + +ret: + if (r != idn_success) + free(ctx); + TRACE(("idn_delimitermap_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_delimitermap_destroy(idn_delimitermap_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_delimitermap_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_mapper_destroy(): the object is destroyed\n")); + free(ctx->delimiters); + free(ctx); + } else { + TRACE(("idn_delimitermap_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_delimitermap_incrref(idn_delimitermap_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_delimitermap_incrref()\n")); + TRACE(("idn_delimitermap_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_result_t +idn_delimitermap_add(idn_delimitermap_t ctx, unsigned long delimiter) { + idn_result_t r; + + assert(ctx != NULL && ctx->ndelimiters <= ctx->delimiter_size); + TRACE(("idn_delimitermap_add(delimiter=\\x%04lx)\n", delimiter)); + + if (delimiter == 0 || delimiter > UNICODE_MAX || + IS_SURROGATE_HIGH(delimiter) || IS_SURROGATE_LOW(delimiter)) { + r = idn_invalid_codepoint; + goto ret; + } + + if (ctx->ndelimiters == ctx->delimiter_size) { + unsigned long *new_delimiters; + + new_delimiters = (unsigned long *) realloc(ctx->delimiters, + sizeof(unsigned long) * ctx->delimiter_size * 2); + if (new_delimiters == NULL) { + r = idn_nomemory; + goto ret; + } + ctx->delimiters = new_delimiters; + ctx->delimiter_size *= 2; + } + + ctx->delimiters[ctx->ndelimiters] = delimiter; + ctx->ndelimiters++; + r = idn_success; + +ret: + TRACE(("idn_delimitermap_add(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_delimitermap_addall(idn_delimitermap_t ctx, unsigned long *delimiters, + int ndelimiters) { + idn_result_t r; + int i; + + assert(ctx != NULL && delimiters != NULL); + + TRACE(("idn_delimitermap_addall(ndelimiters=%d)\n", ndelimiters)); + + for (i = 0; i < ndelimiters; i++) { + r = idn_delimitermap_add(ctx, *delimiters); + if (r != idn_success) + goto ret; + delimiters++; + } + + r = idn_success; +ret: + TRACE(("idn_delimitermap_addall(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_delimitermap_map(idn_delimitermap_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen) { + + /* default delimiters (label separators) from IDNA specification */ + static const unsigned long default_delimiters[] = + { 0x002e, /* full stop */ + 0x3002, /* ideographic full stop */ + 0xff0e, /* fullwidth full stop */ + 0xff61, /* halfwidth ideographic full stop */ + 0x0000 }; + + unsigned long *to_org = to; + idn_result_t r; + int i, j; + int found; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_delimitermap_map(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), (int)tolen)); + + /* + * Map. + */ + while (*from != '\0') { + found = 0; + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + for (j = 0; default_delimiters[j] != 0x0000; j++) { + if (default_delimiters[j] == *from) { + found = 1; + break; + } + } + if (!found) { + for (i = 0; i < ctx->ndelimiters; i++) { + if (ctx->delimiters[i] == *from) { + found = 1; + break; + } + } + } + if (found) + *to = '.'; + else + *to = *from; + from++; + to++; + tolen--; + } + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + +ret: + if (r == idn_success) { + TRACE(("idn_delimitermap_map(): success (to=\"%s\")\n", + idn__debug_ucs4xstring(to_org, 50))); + } else { + TRACE(("idn_delimitermap_map(): %s\n", + idn_result_tostring(r))); + } + return (r); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/filechecker.c b/contrib/idn/idnkit-1.0-src/lib/filechecker.c new file mode 100644 index 0000000000..507c931570 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/filechecker.c @@ -0,0 +1,261 @@ +#ifndef lint +static char *rcsid = "$Id: filechecker.c,v 1.1 2003/06/04 00:25:52 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define SUPPORT_VERSIONING + +struct idn__filechecker { + idn_ucsset_t set; +}; + +static idn_result_t read_file(const char *file, FILE *fp, + idn_ucsset_t set); +static int get_range(char *s, unsigned long *ucs1, + unsigned long *ucs2); +static char *get_ucs(char *p, unsigned long *vp); + + +idn_result_t +idn__filechecker_create(const char *file, idn__filechecker_t *ctxp) { + FILE *fp; + idn__filechecker_t ctx; + idn_result_t r; + + assert(file != NULL && ctxp != NULL); + + TRACE(("idn__filechecker_create(file=\"%-.100s\")\n", file)); + + if ((fp = fopen(file, "r")) == NULL) { + WARNING(("idn__filechecker_create: cannot open %-.100s\n", + file)); + return (idn_nofile); + } + + if ((ctx = malloc(sizeof(struct idn__filechecker))) == NULL) + return (idn_nomemory); + + if ((r = idn_ucsset_create(&ctx->set)) != idn_success) { + free(ctx); + return (r); + } + + r = read_file(file, fp, ctx->set); + fclose(fp); + + if (r == idn_success) { + idn_ucsset_fix(ctx->set); + *ctxp = ctx; + } else { + idn_ucsset_destroy(ctx->set); + free(ctx); + } + return (r); +} + +void +idn__filechecker_destroy(idn__filechecker_t ctx) { + assert(ctx != NULL); + + TRACE(("idn__filechecker_destroy()\n")); + + idn_ucsset_destroy(ctx->set); + free(ctx); +} + +idn_result_t +idn__filechecker_lookup(idn__filechecker_t ctx, const unsigned long *str, + const unsigned long **found) { + idn_result_t r = idn_success; + + assert(ctx != NULL && str != NULL); + + TRACE(("idn__filechecker_lookup(str=\"%s\")\n", + idn__debug_ucs4xstring(str, 50))); + + while (*str != '\0') { + int exists; + + r = idn_ucsset_lookup(ctx->set, *str, &exists); + + if (r != idn_success) { + return (r); + } else if (exists) { + /* Found. */ + *found = str; + return (idn_success); + } + str++; + } + *found = NULL; + return (idn_success); +} + +static idn_result_t +read_file(const char *file, FILE *fp, idn_ucsset_t set) { + char line[256]; + idn_result_t r; + int lineno = 0; + + while (fgets(line, sizeof(line), fp) != NULL) { + char *p = line; + unsigned long ucs1, ucs2; + + lineno++; + while (isspace((unsigned char)*p)) + p++; + if (*p == '\0' || *p == '#') + continue; + +#ifdef SUPPORT_VERSIONING + /* Skip version tag. */ + if (lineno == 1 && strncmp("version=", line, 8) == 0) + continue; +#endif + if (!get_range(p, &ucs1, &ucs2)) { + WARNING(("syntax error in file \"%-.100s\" line %d: " + "%-.100s", file, lineno, line)); + return (idn_invalid_syntax); + } + if ((r = idn_ucsset_addrange(set, ucs1, ucs2)) != idn_success) + return (r); + } + return (idn_success); +} + +static int +get_range(char *s, unsigned long *ucs1, unsigned long *ucs2) { + if ((s = get_ucs(s, ucs1)) == NULL) + return (0); + *ucs2 = *ucs1; + + switch (s[0]) { + case '\0': + case '\n': + case '#': + case ';': + return (1); + case '-': + break; + default: + return (0); + } + + if ((s = get_ucs(s + 1, ucs2)) == NULL) + return (0); + + if (*ucs1 > *ucs2) { + INFO(("idn__filechecker_create: invalid range spec " + "U+%X-U+%X\n", *ucs1, *ucs2)); + return (0); + } + + switch (s[0]) { + case '\0': + case '\n': + case '#': + case ';': + return (1); + default: + return (0); + } +} + + +static char * +get_ucs(char *p, unsigned long *vp) { + char *end; + + /* Skip leading space */ + while (isspace((unsigned char)*p)) + p++; + + /* Skip optional 'U+' */ + if (strncmp(p, "U+", 2) == 0) + p += 2; + + *vp = strtoul(p, &end, 16); + if (end == p) { + INFO(("idn__filechecker_create: UCS code point expected\n")); + return (NULL); + } + p = end; + + /* Skip trailing space */ + while (isspace((unsigned char)*p)) + p++; + return p; +} + +idn_result_t +idn__filechecker_createproc(const char *parameter, void **ctxp) { + return idn__filechecker_create(parameter, (idn__filechecker_t *)ctxp); +} + +void +idn__filechecker_destroyproc(void *ctxp) { + idn__filechecker_destroy((idn__filechecker_t)ctxp); +} + +idn_result_t +idn__filechecker_lookupproc(void *ctx, const unsigned long *str, + const unsigned long **found) { + return idn__filechecker_lookup((idn__filechecker_t)ctx, str, found); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/filemapper.c b/contrib/idn/idnkit-1.0-src/lib/filemapper.c new file mode 100644 index 0000000000..1b752197de --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/filemapper.c @@ -0,0 +1,347 @@ +#ifndef lint +static char *rcsid = "$Id: filemapper.c,v 1.1 2003/06/04 00:25:53 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define SUPPORT_VERSIONING + +#define UCSBUF_LOCAL_SIZE 20 + +typedef struct ucsbuf { + unsigned long *ucs; + size_t size; + size_t len; + unsigned long local[UCSBUF_LOCAL_SIZE]; +} ucsbuf_t; + +struct idn__filemapper { + idn_ucsmap_t map; +}; + +static void ucsbuf_init(ucsbuf_t *b); +static idn_result_t ucsbuf_grow(ucsbuf_t *b); +static idn_result_t ucsbuf_append(ucsbuf_t *b, unsigned long v); +static void ucsbuf_free(ucsbuf_t *b); +static idn_result_t read_file(const char *file, FILE *fp, + idn_ucsmap_t map); +static idn_result_t get_map(char *p, ucsbuf_t *b); +static char *get_ucs(char *p, unsigned long *vp); + + +idn_result_t +idn__filemapper_create(const char *file, idn__filemapper_t *ctxp) { + FILE *fp; + idn__filemapper_t ctx; + idn_result_t r; + + assert(file != NULL && ctxp != NULL); + + TRACE(("idn__filemapper_create(file=\"%-.100s\")\n", file)); + + if ((fp = fopen(file, "r")) == NULL) { + WARNING(("idn__filemapper_create: cannot open %-.100s\n", + file)); + return (idn_nofile); + } + if ((ctx = malloc(sizeof(struct idn__filemapper))) == NULL) + return (idn_nomemory); + + if ((r = idn_ucsmap_create(&ctx->map)) != idn_success) { + free(ctx); + return (r); + } + + r = read_file(file, fp, ctx->map); + fclose(fp); + + if (r == idn_success) { + idn_ucsmap_fix(ctx->map); + *ctxp = ctx; + } else { + idn_ucsmap_destroy(ctx->map); + free(ctx); + } + return (r); +} + +void +idn__filemapper_destroy(idn__filemapper_t ctx) { + + assert(ctx != NULL); + + TRACE(("idn__filemapper_destroy()\n")); + + idn_ucsmap_destroy(ctx->map); + free(ctx); +} + +idn_result_t +idn__filemapper_map(idn__filemapper_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen) +{ + idn_result_t r = idn_success; + ucsbuf_t ub; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn__filemapper_map(from=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + /* Initialize temporary buffer. */ + ucsbuf_init(&ub); + + while (*from != '\0') { + /* Try mapping. */ + r = idn_ucsmap_map(ctx->map, *from, ub.ucs, ub.size, &ub.len); + switch (r) { + case idn_buffer_overflow: + /* Temporary buffer too small. Enlarge and retry. */ + if ((r = ucsbuf_grow(&ub)) != idn_success) + break; + continue; + case idn_nomapping: + /* There is no mapping. */ + r = idn_success; + /* fallthrough */ + case idn_success: + if (tolen < ub.len) { + r = idn_buffer_overflow; + goto ret; + } + memcpy(to, ub.ucs, sizeof(*to) * ub.len); + to += ub.len; + tolen -= ub.len; + break; + default: + goto ret; + } + from++; + } + + ret: + ucsbuf_free(&ub); + + if (r == idn_success) { + /* Terminate with NUL. */ + if (tolen == 0) + return (idn_buffer_overflow); + *to = '\0'; + } + + return (r); +} + +static void +ucsbuf_init(ucsbuf_t *b) { + b->ucs = b->local; + b->size = UCSBUF_LOCAL_SIZE; + b->len = 0; +} + +static idn_result_t +ucsbuf_grow(ucsbuf_t *b) { + unsigned long *newbuf; + + b->size *= 2; + if (b->ucs == b->local) { + b->ucs = malloc(sizeof(unsigned long) * b->size); + if (b->ucs == NULL) + return (idn_nomemory); + memcpy(b->ucs, b->local, sizeof(b->local)); + } else { + newbuf = realloc(b->ucs, sizeof(unsigned long) * b->size); + if (newbuf == NULL) + return (idn_nomemory); + b->ucs = newbuf; + } + return (idn_success); +} + +static idn_result_t +ucsbuf_append(ucsbuf_t *b, unsigned long v) { + idn_result_t r; + + if (b->len + 1 > b->size) { + r = ucsbuf_grow(b); + if (r != idn_success) + return (r); + } + b->ucs[b->len++] = v; + return (idn_success); +} + +static void +ucsbuf_free(ucsbuf_t *b) { + if (b->ucs != b->local && b->ucs != NULL) + free(b->ucs); +} + +static idn_result_t +read_file(const char *file, FILE *fp, idn_ucsmap_t map) { + char line[1024]; + ucsbuf_t ub; + idn_result_t r = idn_success; + int lineno = 0; + + ucsbuf_init(&ub); + + while (fgets(line, sizeof(line), fp) != NULL) { + char *p = line; + + lineno++; + while (isspace((unsigned char)*p)) + p++; + if (*p == '\0' || *p == '#') + continue; +#ifdef SUPPORT_VERSIONING + /* Skip version tag. */ + if (lineno == 1 && strncmp("version=", line, 8) == 0) + continue; +#endif + again: + ub.len = 0; + r = get_map(p, &ub); + switch (r) { + case idn_success: + r = idn_ucsmap_add(map, ub.ucs[0], + &ub.ucs[1], ub.len - 1); + break; + case idn_buffer_overflow: + if ((r = ucsbuf_grow(&ub)) != idn_success) + break; + goto again; + case idn_invalid_syntax: + WARNING(("syntax error in file \"%-.100s\" line %d: " + "%-.100s", file, lineno, line)); + /* fall through */ + default: + ucsbuf_free(&ub); + return (r); + } + } + ucsbuf_free(&ub); + return (r); +} + +static idn_result_t +get_map(char *p, ucsbuf_t *b) { + unsigned long v; + idn_result_t r = idn_success; + + for (;;) { + if ((p = get_ucs(p, &v)) == NULL) + return (idn_invalid_syntax); + if ((r = ucsbuf_append(b, v)) != idn_success) + return (r); + if (b->len == 1) { + if (*p != ';') + return (idn_invalid_syntax); + p++; + while (isspace((unsigned char)*p)) + p++; + } + + if (*p == ';' || *p == '#' || *p == '\0') + return (r); + } + return (r); +} + +static char * +get_ucs(char *p, unsigned long *vp) { + char *end; + + /* Skip leading space */ + while (isspace((unsigned char)*p)) + p++; + + /* Skip optional 'U+' */ + if (strncmp(p, "U+", 2) == 0) + p += 2; + + *vp = strtoul(p, &end, 16); + if (end == p) { + INFO(("idn__filemapper_create: UCS code point expected\n")); + return (NULL); + } + p = end; + + /* Skip trailing space */ + while (isspace((unsigned char)*p)) + p++; + return p; +} + +idn_result_t +idn__filemapper_createproc(const char *parameter, void **ctxp) { + return idn__filemapper_create(parameter, (idn__filemapper_t *)ctxp); +} + +void +idn__filemapper_destroyproc(void *ctxp) { + idn__filemapper_destroy((idn__filemapper_t)ctxp); +} + +idn_result_t +idn__filemapper_mapproc(void *ctx, const unsigned long *from, + unsigned long *to, size_t tolen) { + return idn__filemapper_map((idn__filemapper_t)ctx, from, to, tolen); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/idn.conf.sample.in b/contrib/idn/idnkit-1.0-src/lib/idn.conf.sample.in new file mode 100644 index 0000000000..11108607ba --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/idn.conf.sample.in @@ -0,0 +1,61 @@ +# $Id: idn.conf.sample.in,v 1.1 2003/06/04 00:26:45 marka Exp $ +# +# Sample file for idnkit configuration file (idn.conf). +# + +# +# `idn-encoding' entry specifies the encoding name used as the encoding +# of multilingualized names by resolvers and DNS servers. Currently, the +# following encodings are available: +# +# Punycode +# UTF-8 +# +# +# If you enabled extra ace feature, following IDN encoding can be used. +# +# AMC-ACE-Z (old name of Punycode) +# RACE +# +# syntax) +# idn-encoding +# +idn-encoding Punycode + +# +# `nameprep' entry specifies the version of NAMEPREP. +# idnkit currently supports the following version: +# +# RFC3491 -- name preparation scheme described in the +# RFC3491 +# +# syntax) +# nameprep +# +nameprep RFC3491 + +# +# `local-map' entry specifies TLD (top level domain) based local mapping +# schemes, which is performed before NAMEPREP. Available schemes are: +# +# -- nameprep version +# filemap: -- read mapping rules from a file +# +# syntax) +# local-map ... +# +# If the TLD of the domain name matches , local mapping specified +# by is performed on the name. Otherwise no mapping are +# performed. Multiple schemes can be specified; they are applied in +# turn. +# +# There are two special s for specifying a default mapping rule +# and a mapping rule for local names (domain names containing no +# dots). If is `.', its schemes are applied to domain names +# whose TLD does not match any TLDs specified in local-map entries. +# If is `-', its schemes are applied to domain names which +# contain no dots. +# +#local-map - filemap:/some/where/local.map +#local-map . filemap:/some/where/default.map +local-map .jp filemap:@mapdir@/jp.map diff --git a/contrib/idn/idnkit-1.0-src/lib/localencoding.c b/contrib/idn/idnkit-1.0-src/lib/localencoding.c new file mode 100644 index 0000000000..f713d3cb0b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/localencoding.c @@ -0,0 +1,123 @@ +#ifndef lint +static char *rcsid = "$Id: localencoding.c,v 1.1 2003/06/04 00:25:53 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#ifdef WIN32 +#include +#endif +#include +#include +#include +#include + +#ifdef HAVE_LOCALE_H +#include +#endif +#ifdef HAVE_LANGINFO_H +#include +#endif + +#include +#include +#include + +#ifdef ENABLE_MDNKIT_COMPAT +#include +#endif + +const char * +idn_localencoding_name(void) { + char *name; + + TRACE(("idn_localencoding_name()\n")); + + if ((name = getenv(IDN_LOCALCS_ENV)) != NULL) { + TRACE(("local encoding=\"%-.30s\"\n", + name == NULL ? "" : name)); + return (name); + } +#ifdef ENABLE_MDNKIT_COMPAT + if ((name = getenv(MDN_LOCALCS_ENV)) != NULL) { + TRACE(("local encoding=\"%-.30s\"\n", + name == NULL ? "" : name)); + return (name); + } +#endif + +#ifdef WIN32 + { + static char cp_str[40]; /* enough */ + (void)sprintf(cp_str, "CP%u", GetACP()); + TRACE(("local encoding(codepage)=\"%-.30s\"\n", cp_str)); + return (cp_str); + } +#else /* WIN32 */ +#ifdef HAVE_LIBCHARSET + name = locale_charset(); + TRACE(("local encoding=\"%-.30s\"\n", + name == NULL ? "" : name)); + return (name); +#endif + +#if defined(HAVE_NL_LANGINFO) && defined(CODESET) + if ((name = nl_langinfo(CODESET)) != NULL) { + TRACE(("local encoding=\"%-.30s\"\n", + name == NULL ? "" : name)); + return (name); + } +#endif + (void)( +#ifdef HAVE_SETLOCALE + (name = setlocale(LC_CTYPE, NULL)) || +#endif + (name = getenv("LC_ALL")) || + (name = getenv("LC_CTYPE")) || + (name = getenv("LANG"))); + TRACE(("local encoding=\"%-.30s\"\n", name == NULL ? "" : name)); + return (name); +#endif /* WIN32 */ +} diff --git a/contrib/idn/idnkit-1.0-src/lib/log.c b/contrib/idn/idnkit-1.0-src/lib/log.c new file mode 100644 index 0000000000..2b7c24e98c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/log.c @@ -0,0 +1,215 @@ +#ifndef lint +static char *rcsid = "$Id: log.c,v 1.1 2003/06/04 00:25:53 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif + +#include + +#define LOGLEVEL_ENV "IDN_LOG_LEVEL" + +#ifdef DEBUG +#define DEFAULT_LOG_LEVEL idn_log_level_info +#else +#define DEFAULT_LOG_LEVEL idn_log_level_error +#endif + +static int log_level = -1; +static idn_log_proc_t log_proc; + +static void initialize(void); +static void log(int level, const char *fmt, va_list args); +static void log_to_stderr(int level, const char *buf); + +void +idn_log_fatal(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_fatal, fmt, args); + va_end(args); + exit(1); +} + +void +idn_log_error(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_error, fmt, args); + va_end(args); +} + +void +idn_log_warning(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_warning, fmt, args); + va_end(args); +} + +void +idn_log_info(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_info, fmt, args); + va_end(args); +} + +void +idn_log_trace(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_trace, fmt, args); + va_end(args); +} + +void +idn_log_dump(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + log(idn_log_level_dump, fmt, args); + va_end(args); +} + +void +idn_log_setlevel(int level) { + if (level >= 0) + log_level = level; +} + +int +idn_log_getlevel(void) { + if (log_level < 0) + initialize(); + return log_level; +} + +void +idn_log_setproc(idn_log_proc_t proc) { + if (proc == NULL) + log_proc = log_to_stderr; + else + log_proc = proc; +} + +static void +initialize(void) { + char *s; + + if (log_level < 0) { + if ((s = getenv(LOGLEVEL_ENV)) != NULL) { + int level = atoi(s); + if (level >= 0) + log_level = level; + } + if (log_level < 0) + log_level = DEFAULT_LOG_LEVEL; + } + + if (log_proc == NULL) + log_proc = log_to_stderr; +} + +static void +log(int level, const char *fmt, va_list args) { + char buf[1024]; + + initialize(); + + if (log_level < level) + return; + +#if HAVE_VSNPRINTF + (void)vsnprintf(buf, sizeof(buf), fmt, args); +#else + /* Let's hope 1024 is enough.. */ + (void)vsprintf(buf, fmt, args); +#endif + (*log_proc)(level, buf); +} + +static void +log_to_stderr(int level, const char *buf) { + char *title; + char tmp[20]; + + switch (level) { + case idn_log_level_fatal: + title = "FATAL"; + break; + case idn_log_level_error: + title = "ERROR"; + break; + case idn_log_level_warning: + title = "WARNING"; + break; + case idn_log_level_info: + title = "INFO"; + break; + case idn_log_level_trace: + title = "TRACE"; + break; + case idn_log_level_dump: + title = "DUMP"; + break; + default: + (void)sprintf(tmp, "LEVEL%d", level); + title = tmp; + break; + } + fprintf(stderr, "%u: [%s] %s", (unsigned int)getpid(), title, buf); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/make.wnt b/contrib/idn/idnkit-1.0-src/lib/make.wnt new file mode 100644 index 0000000000..b006306f50 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/make.wnt @@ -0,0 +1,279 @@ +# $Id: make.wnt,v 1.1 2003/06/04 00:25:54 marka Exp $ +# Makefile for MDN library, manually configured for WIN-NT (VC5.0) +# +# Copyright (c) 2000,2002 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +!include + +INCDIR = ..\include +ICONVDIR = ..\win +LIBS = $(ICONVDIR)\iconv.lib +LIBS_LITE = +SYSLIBS = $(conlibsdll) + +# +# Files to build MDN library +# + +HDRS_LITE = \ + $(INCDIR)\config.h \ + $(INCDIR)\idn\aliaslist.h \ + $(INCDIR)\idn\api.h \ + $(INCDIR)\idn\assert.h \ + $(INCDIR)\idn\checker.h \ + $(INCDIR)\idn\converter.h \ + $(INCDIR)\idn\debug.h \ + $(INCDIR)\idn\delimitermap.h \ + $(INCDIR)\idn\export.h \ + $(INCDIR)\idn\filechecker.h \ + $(INCDIR)\idn\filemapper.h \ + $(INCDIR)\idn\localencoding.h \ + $(INCDIR)\idn\log.h \ + $(INCDIR)\idn\logmacro.h \ + $(INCDIR)\idn\mapper.h \ + $(INCDIR)\idn\mapselector.h \ + $(INCDIR)\idn\nameprep.h \ + $(INCDIR)\idn\normalizer.h \ + $(INCDIR)\idn\punycode.h \ + $(INCDIR)\idn\race.h \ + $(INCDIR)\idn\res.h \ + $(INCDIR)\idn\resconf.h \ + $(INCDIR)\idn\result.h \ + $(INCDIR)\idn\strhash.h \ + $(INCDIR)\idn\ucs4.h \ + $(INCDIR)\idn\ucsmap.h \ + $(INCDIR)\idn\ucsset.h \ + $(INCDIR)\idn\unicode.h \ + $(INCDIR)\idn\unormalize.h \ + $(INCDIR)\idn\utf8.h \ + $(INCDIR)\idn\util.h \ + $(INCDIR)\idn\version.h + +HDRS = $(ICONVDIR)\iconv.h \ + $(HDRS_LITE) + +SRCS = aliaslist.c api.c checker.c \ + converter.c debug.c delimitermap.c \ + filechecker.c filemapper.c \ + localencoding.c log.c mapper.c \ + mapselector.c nameprep.c nameprep_template.c \ + nameprepdata.c normalizer.c punycode.c race.c \ + res.c resconf.c result.c \ + strhash.c ucs4.c ucsmap.c \ + ucsset.c unicode.c unicode_template.c \ + unicodedata_320.c unormalize.c \ + utf8.c util.c version.c + +OBJS = aliaslist.obj api.obj checker.obj \ + converter.obj debug.obj delimitermap.obj \ + filechecker.obj filemapper.obj \ + localencoding.obj log.obj mapper.obj \ + mapselector.obj nameprep.obj \ + normalizer.obj punycode.obj race.obj \ + res.obj resconf.obj result.obj \ + strhash.obj ucs4.obj ucsmap.obj \ + ucsset.obj unicode.obj \ + unormalize.obj \ + utf8.obj util.obj version.obj + +OBJS_LITE = \ + aliaslist_l.obj api_l.obj checker_l.obj \ + converter_l.obj debug_l.obj delimitermap_l.obj \ + filechecker_l.obj filemapper_l.obj \ + localencoding_l.obj log_l.obj mapper_l.obj \ + mapselector_l.obj nameprep_l.obj \ + normalizer_l.obj punycode_l.obj race_l.obj \ + res_l.obj resconf_l.obj result_l.obj \ + strhash_l.obj ucs4_l.obj ucsmap_l.obj \ + ucsset_l.obj unicode_l.obj \ + unormalize_l.obj \ + utf8_l.obj util_l.obj version_l.obj + + +#DBG = -DDEBUG + +# +# Target to build +# + +TARGETS = idnkit.dll idnkitlite.dll + +all: $(TARGETS) + +idnkit.dll: $(OBJS) + -del idnkit.dll + $(link) /out:"idnkit.dll" /implib:"idnkit.lib" $(dlllflags) $(OBJS) $(LIBS) $(SYSLIBS) + +idnkitlite.dll: $(OBJS_LITE) + -del idnkitlite.dll + $(link) /out:"idnkitlite.dll" /implib:"idnkitlite.lib" $(dlllflags) $(OBJS_LITE) $(LIBS_LITE) $(SYSLIBS) + +install: + +clean: + -del *.obj + -del *.lib + -del *.dll + -del *.exp + +# +# Dependencies +# + +EXP = -DIDN_EXPORT="extern __declspec(dllexport)" +CCARGS = $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(EXP) $(DBG) +CCARGS_LITE = $(cflags) $(cvarsdll) -I$(INCDIR) -DWITHOUT_ICONV $(EXP) $(DBG) + +aliaslist.obj: aliaslist.c $(HDRS) + $(cc) $(CCARGS) /Foaliaslist.obj aliaslist.c +api.obj: api.c $(HDRS) + $(cc) $(CCARGS) /Foapi.obj api.c +checker.obj: checker.c $(HDRS) + $(cc) $(CCARGS) /Fochecker.obj checker.c +converter.obj: converter.c $(HDRS) + $(cc) $(CCARGS) /Foconverter.obj converter.c +debug.obj: debug.c $(HDRS) + $(cc) $(CCARGS) /Fodebug.obj debug.c +delimitermap.obj: delimitermap.c $(HDRS) + $(cc) $(CCARGS) /Fodelimitermap.obj delimitermap.c +filechecker.obj: filechecker.c $(HDRS) + $(cc) $(CCARGS) /Fofilechecker.obj filechecker.c +filemapper.obj: filemapper.c $(HDRS) + $(cc) $(CCARGS) /Fofilemapper.obj filemapper.c +localencoding.obj: localencoding.c $(HDRS) + $(cc) $(CCARGS) /Folocalencoding.obj localencoding.c +log.obj: log.c $(HDRS) + $(cc) $(CCARGS) /Folog.obj log.c +mapper.obj: mapper.c $(HDRS) + $(cc) $(CCARGS) /Fomapper.obj mapper.c +mapselector.obj: mapselector.c $(HDRS) + $(cc) $(CCARGS) /Fomapselector.obj mapselector.c +nameprep.obj: nameprep.c nameprepdata.c nameprep_template.c $(HDRS) + $(cc) $(CCARGS) /Fonameprep.obj nameprep.c +normalizer.obj: normalizer.c $(HDRS) + $(cc) $(CCARGS) /Fonormalizer.obj normalizer.c +punycode.obj: punycode.c $(HDRS) + $(cc) $(CCARGS) /Fopunycode.obj punycode.c +race.obj: race.c $(HDRS) + $(cc) $(CCARGS) /Forace.obj race.c +res.obj: res.c $(HDRS) + $(cc) $(CCARGS) /Fores.obj res.c +resconf.obj: resconf.c $(HDRS) + $(cc) $(CCARGS) /Foresconf.obj resconf.c +result.obj: result.c $(HDRS) + $(cc) $(CCARGS) /Foresult.obj result.c +strhash.obj: strhash.c $(HDRS) + $(cc) $(CCARGS) /Fostrhash.obj strhash.c +ucs4.obj: ucs4.c $(HDRS) + $(cc) $(CCARGS) /Foucs4.obj ucs4.c +ucsmap.obj: ucsmap.c $(HDRS) + $(cc) $(CCARGS) /Foucsmap.obj ucsmap.c +ucsset.obj: ucsset.c $(HDRS) + $(cc) $(CCARGS) /Foucsset.obj ucsset.c +unicode.obj: unicode.c unicodedata_320.c unicode_template.c $(HDRS) + $(cc) $(CCARGS) /Founicode.obj unicode.c +unormalize.obj: unormalize.c $(HDRS) + $(cc) $(CCARGS) /Founormalize.obj unormalize.c +utf8.obj: utf8.c $(HDRS) + $(cc) $(CCARGS) /Foutf8.obj utf8.c +util.obj: util.c $(HDRS) + $(cc) $(CCARGS) /Foutil.obj util.c +version.obj: version.c $(HDRS) + $(cc) $(CCARGS) /Foversion.obj version.c + +aliaslist_l.obj: aliaslist.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foaliaslist_l.obj aliaslist.c +api_l.obj: api.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foapi_l.obj api.c +checker_l.obj: checker.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fochecker_l.obj checker.c +converter_l.obj: converter.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foconverter_l.obj converter.c +debug_l.obj: debug.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fodebug_l.obj debug.c +delimitermap_l.obj: delimitermap.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fodelimitermap_l.obj delimitermap.c +dude_l.obj: dude.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fodude_l.obj dude.c +filechecker_l.obj: filechecker.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fofilechecker_l.obj filechecker.c +filemapper_l.obj: filemapper.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fofilemapper_l.obj filemapper.c +localencoding_l.obj: localencoding.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Folocalencoding_l.obj localencoding.c +log_l.obj: log.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Folog_l.obj log.c +mapper_l.obj: mapper.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fomapper_l.obj mapper.c +mapselector_l.obj: mapselector.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fomapselector_l.obj mapselector.c +nameprep_l.obj: nameprep.c nameprepdata.c nameprep_template.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fonameprep_l.obj nameprep.c +normalizer_l.obj: normalizer.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fonormalizer_l.obj normalizer.c +punycode_l.obj: punycode.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fopunycode_l.obj punycode.c +race_l.obj: race.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Forace_l.obj race.c +res_l.obj: res.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fores_l.obj res.c +resconf_l.obj: resconf.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foresconf_l.obj resconf.c +result_l.obj: result.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foresult_l.obj result.c +strhash_l.obj: strhash.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Fostrhash_l.obj strhash.c +ucs4_l.obj: ucs4.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foucs4_l.obj ucs4.c +ucsmap_l.obj: ucsmap.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foucsmap_l.obj ucsmap.c +ucsset_l.obj: ucsset.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foucsset_l.obj ucsset.c +unicode_l.obj: unicode.c unicodedata_320.c unicode_template.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Founicode_l.obj unicode.c +unormalize_l.obj: unormalize.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Founormalize_l.obj unormalize.c +utf8_l.obj: utf8.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foutf8_l.obj utf8.c +util_l.obj: util.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foutil_l.obj util.c +version_l.obj: version.c $(HDRS_LITE) + $(cc) $(CCARGS_LITE) /Foversion_l.obj version.c diff --git a/contrib/idn/idnkit-1.0-src/lib/mapper.c b/contrib/idn/idnkit-1.0-src/lib/mapper.c new file mode 100644 index 0000000000..22e8520152 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/mapper.c @@ -0,0 +1,482 @@ +#ifndef lint +static char *rcsid = "$Id: mapper.c,v 1.1 2003/06/04 00:25:55 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Type for mapping scheme. + */ +typedef struct { + char *prefix; + char *parameter; + idn_mapper_createproc_t create; + idn_mapper_destroyproc_t destroy; + idn_mapper_mapproc_t map; + void *context; +} map_scheme_t; + +/* + * Standard mapping schemes. + */ +static const map_scheme_t nameprep_scheme = { + "RFC3491", + NULL, + idn_nameprep_createproc, + idn_nameprep_destroyproc, + idn_nameprep_mapproc, + NULL, +}; + +static const map_scheme_t filemap_scheme = { + "filemap", + "", + idn__filemapper_createproc, + idn__filemapper_destroyproc, + idn__filemapper_mapproc, + NULL, +}; + +static const map_scheme_t *standard_map_schemes[] = { + &nameprep_scheme, + &filemap_scheme, + NULL, +}; + +/* + * Hash table for mapping schemes. + */ +static idn__strhash_t scheme_hash = NULL; + +/* + * Mapper object type. + */ +struct idn_mapper { + int nschemes; + int scheme_size; + map_scheme_t *schemes; + int reference_count; +}; + +#define MAPPER_INITIAL_SCHEME_SIZE 1 + +idn_result_t +idn_mapper_initialize(void) { + idn_result_t r; + map_scheme_t **scheme; + + TRACE(("idn_mapper_initialize()\n")); + + if (scheme_hash != NULL) { + r = idn_success; /* already initialized */ + goto ret; + } + + r = idn__strhash_create(&scheme_hash); + if (r != idn_success) + goto ret; + + for (scheme = (map_scheme_t **)standard_map_schemes; + *scheme != NULL; scheme++) { + r = idn__strhash_put(scheme_hash, (*scheme)->prefix, *scheme); + if (r != idn_success) + goto ret; + } + + r = idn_success; +ret: + if (r != idn_success && scheme_hash != NULL) { + idn__strhash_destroy(scheme_hash, NULL); + scheme_hash = NULL; + } + TRACE(("idn_mapper_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_mapper_create(idn_mapper_t *ctxp) { + idn_mapper_t ctx = NULL; + idn_result_t r; + + assert(scheme_hash != NULL); + assert(ctxp != NULL); + + TRACE(("idn_mapper_create()\n")); + + ctx = (idn_mapper_t) malloc(sizeof(struct idn_mapper)); + if (ctx == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->schemes = (map_scheme_t *) malloc(sizeof(map_scheme_t) + * MAPPER_INITIAL_SCHEME_SIZE); + if (ctx->schemes == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->nschemes = 0; + ctx->scheme_size = MAPPER_INITIAL_SCHEME_SIZE; + ctx->reference_count = 1; + *ctxp = ctx; + r = idn_success; + +ret: + if (r != idn_success) { + if (ctx != NULL) + free(ctx->schemes); + free(ctx); + } + TRACE(("idn_mapper_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_mapper_destroy(idn_mapper_t ctx) { + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL); + + TRACE(("idn_mapper_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_mapper_destroy(): the object is destroyed\n")); + for (i = 0; i < ctx->nschemes; i++) + ctx->schemes[i].destroy(ctx->schemes[i].context); + free(ctx->schemes); + free(ctx); + } else { + TRACE(("idn_mapper_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_mapper_incrref(idn_mapper_t ctx) { + assert(ctx != NULL && scheme_hash != NULL); + + TRACE(("idn_mapper_incrref()\n")); + TRACE(("idn_mapper_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_result_t +idn_mapper_add(idn_mapper_t ctx, const char *scheme_name) { + idn_result_t r; + map_scheme_t *scheme; + const char *scheme_prefix; + const char *scheme_parameter; + void *scheme_context = NULL; + char static_buffer[128]; /* large enough */ + char *buffer = static_buffer; + + assert(scheme_hash != NULL); + assert(ctx != NULL); + + TRACE(("idn_mapper_add(scheme_name=%s)\n", + idn__debug_xstring(scheme_name, 50))); + + /* + * Split `scheme_name' into `scheme_prefix' and `scheme_parameter'. + */ + scheme_parameter = strchr(scheme_name, ':'); + if (scheme_parameter == NULL) { + scheme_prefix = scheme_name; + } else { + ptrdiff_t scheme_prefixlen; + + scheme_prefixlen = scheme_parameter - scheme_name; + if (scheme_prefixlen + 1 > sizeof(static_buffer)) { + buffer = (char *) malloc(scheme_prefixlen + 1); + if (buffer == NULL) { + r = idn_nomemory; + goto ret; + } + } + memcpy(buffer, scheme_name, scheme_prefixlen); + *(buffer + scheme_prefixlen) = '\0'; + scheme_prefix = buffer; + scheme_parameter++; + } + + /* + * Find a scheme. + */ + if (idn__strhash_get(scheme_hash, scheme_prefix, (void **)&scheme) + != idn_success) { + ERROR(("idn_mapper_add(): invalid scheme name \"%-.30s\"\n", + scheme_prefix)); + r = idn_invalid_name; + goto ret; + } + if (scheme_parameter == NULL) { + if (scheme->parameter != NULL) + scheme_parameter = scheme->parameter; + else + scheme_parameter = scheme->prefix; + } + + /* + * Add the scheme. + */ + assert(ctx->nschemes <= ctx->scheme_size); + + if (ctx->nschemes == ctx->scheme_size) { + map_scheme_t *new_schemes; + + new_schemes = (map_scheme_t *) realloc(ctx->schemes, + sizeof(map_scheme_t) * ctx->scheme_size * 2); + if (new_schemes == NULL) { + r = idn_nomemory; + goto ret; + } + ctx->schemes = new_schemes; + ctx->scheme_size *= 2; + } + + r = scheme->create(scheme_parameter, &scheme_context); + if (r != idn_success) + goto ret; + + memcpy(ctx->schemes + ctx->nschemes, scheme, sizeof(map_scheme_t)); + ctx->schemes[ctx->nschemes].context = scheme_context; + ctx->nschemes++; + r = idn_success; +ret: + if (r != idn_success) + free(scheme_context); + if (buffer != static_buffer) + free(buffer); + TRACE(("idn_mapper_add(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_mapper_addall(idn_mapper_t ctx, const char **scheme_names, int nschemes) { + idn_result_t r; + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL && scheme_names != NULL); + + TRACE(("idn_mapper_addall(nschemes=%d)\n", nschemes)); + + for (i = 0; i < nschemes; i++) { + r = idn_mapper_add(ctx, (const char *)*scheme_names); + if (r != idn_success) + goto ret; + scheme_names++; + } + + r = idn_success; +ret: + TRACE(("idn_mapper_addall(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_mapper_map(idn_mapper_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen) { + idn_result_t r; + unsigned long *src, *dst; + unsigned long *buffers[2] = {NULL, NULL}; + size_t buflen[2] = {0, 0}; + size_t dstlen; + int idx; + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_mapper_map(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), (int)tolen)); + + if (ctx->nschemes <= 0) { + if (tolen < idn_ucs4_strlen(from) + 1) { + r = idn_buffer_overflow; + goto ret; + } + idn_ucs4_strcpy(to, from); + r = idn_success; + goto ret; + } + + /* + * Map. + */ + src = (void *)from; + dstlen = idn_ucs4_strlen(from) + 1; + + i = 0; + while (i < ctx->nschemes) { + TRACE(("idn_mapper_map(): map %s\n", ctx->schemes[i].prefix)); + + /* + * Choose destination area to restore the result of a mapping. + */ + if (i + 1 == ctx->nschemes) { + dst = to; + dstlen = tolen; + + } else { + if (src == buffers[0]) + idx = 1; + else + idx = 0; + + if (buflen[idx] < dstlen) { + void *newbuf; + + newbuf = realloc(buffers[idx], + sizeof(long) * dstlen); + if (newbuf == NULL) { + r = idn_nomemory; + goto ret; + } + buffers[idx] = (unsigned long *)newbuf; + buflen[idx] = dstlen; + } + + dst = buffers[idx]; + dstlen = buflen[idx]; + } + + /* + * Perform i-th map scheme. + * If buffer size is not enough, we double it and try again. + */ + r = (ctx->schemes[i].map)(ctx->schemes[i].context, src, dst, + dstlen); + if (r == idn_buffer_overflow && dst != to) { + dstlen *= 2; + continue; + } + if (r != idn_success) + goto ret; + + src = dst; + i++; + } + + r = idn_success; +ret: + free(buffers[0]); + free(buffers[1]); + if (r == idn_success) { + TRACE(("idn_mapper_map(): success (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn_mapper_map(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_mapper_register(const char *prefix, + idn_mapper_createproc_t create, + idn_mapper_destroyproc_t destroy, + idn_mapper_mapproc_t map) { + idn_result_t r; + map_scheme_t *scheme = NULL; + + assert(scheme_hash != NULL); + assert(prefix != NULL && create != NULL && destroy != NULL && + map != NULL); + + TRACE(("idn_mapper_register(prefix=%s)\n", prefix)); + + scheme = (map_scheme_t *) malloc(sizeof(map_scheme_t)); + if (scheme == NULL) { + r = idn_nomemory; + goto ret; + } + + scheme->prefix = (char *) malloc(strlen(prefix) + 1); + if (scheme->prefix == NULL) { + r = idn_nomemory; + goto ret; + } + + strcpy(scheme->prefix, prefix); + scheme->parameter = NULL; + scheme->create = create; + scheme->destroy = destroy; + scheme->map = map; + + r = idn__strhash_put(scheme_hash, prefix, scheme); + if (r != idn_success) + goto ret; + + r = idn_success; +ret: + if (r != idn_success) { + if (scheme != NULL) + free(scheme->prefix); + free(scheme); + } + + TRACE(("idn_mapper_register(): %s\n", idn_result_tostring(r))); + return (r); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/mapselector.c b/contrib/idn/idnkit-1.0-src/lib/mapselector.c new file mode 100644 index 0000000000..bcfb26c84d --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/mapselector.c @@ -0,0 +1,375 @@ +#ifndef lint +static char *rcsid = "$Id: mapselector.c,v 1.1 2003/06/04 00:25:56 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +struct idn_mapselector { + idn__strhash_t maphash; + int reference_count; +}; + +/* + * Maximum length of a top level domain name. (e.g. `com', `jp', ...) + */ +#define MAPSELECTOR_MAX_TLD_LENGTH 63 + +static void string_ascii_tolower(char *string); + + +const unsigned long * +idn_mapselector_getnotld(void) { + static const unsigned long notld[] = {0x002d, 0x0000}; /* "-" */ + return (notld); +} + +const unsigned long * +idn_mapselector_getdefaulttld(void) { + const static unsigned long defaulttld[] = {0x002e, 0x0000}; /* "." */ + return (defaulttld); +} + +idn_result_t +idn_mapselector_initialize(void) { + idn_result_t r; + + TRACE(("idn_mapselector_initialize()\n")); + + r = idn_mapper_initialize(); + + TRACE(("idn_mapselector_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_mapselector_create(idn_mapselector_t *ctxp) { + idn_mapselector_t ctx = NULL; + idn_result_t r; + + assert(ctxp != NULL); + TRACE(("idn_mapselector_create()\n")); + + ctx = (idn_mapselector_t)malloc(sizeof(struct idn_mapselector)); + if (ctx == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->maphash = NULL; + ctx->reference_count = 1; + + r = idn__strhash_create(&(ctx->maphash)); + if (r != idn_success) + goto ret; + + *ctxp = ctx; + r = idn_success; + +ret: + if (r != idn_success) { + if (ctx != NULL) + free(ctx->maphash); + free(ctx); + } + TRACE(("idn_mapselector_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_mapselector_destroy(idn_mapselector_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_mapselector_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_mapselector_destroy(): " + "the object is destroyed\n")); + idn__strhash_destroy(ctx->maphash, + (idn__strhash_freeproc_t)&idn_mapper_destroy); + free(ctx); + } else { + TRACE(("idn_mapselector_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_mapselector_incrref(idn_mapselector_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_mapselector_incrref()\n")); + TRACE(("idn_mapselector_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_result_t +idn_mapselector_add(idn_mapselector_t ctx, const char *tld, const char *name) { + idn_result_t r; + idn_mapper_t mapper; + char hash_key[MAPSELECTOR_MAX_TLD_LENGTH + 1]; + + assert(ctx != NULL && tld != NULL); + + TRACE(("idn_mapselector_add(tld=%s, name=%s)\n", tld, name)); + + if (!(tld[0] == '.' && tld[1] == '\0')) { + if (tld[0] == '.') + tld++; + if (strchr(tld, '.') != NULL) { + ERROR(("idn_mapselector_add: " + "invalid TLD \"%-.100s\"\n", tld)); + r = idn_invalid_name; + goto ret; + } + } + if (strlen(tld) > MAPSELECTOR_MAX_TLD_LENGTH) { + ERROR(("idn_mapselector_add: " + "too long TLD \"%-.100s\"\n", tld)); + r = idn_invalid_name; + goto ret; + } + strcpy(hash_key, tld); + string_ascii_tolower(hash_key); + + if (idn__strhash_get(ctx->maphash, hash_key, (void **)&mapper) + != idn_success) { + r = idn_mapper_create(&mapper); + if (r != idn_success) + goto ret; + + r = idn__strhash_put(ctx->maphash, hash_key, mapper); + if (r != idn_success) + goto ret; + } + + r = idn_mapper_add(mapper, name); +ret: + TRACE(("idn_mapselector_add(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_mapselector_addall(idn_mapselector_t ctx, const char *tld, + const char **scheme_names, int nschemes) { + idn_result_t r; + int i; + + assert(ctx != NULL && tld != NULL && scheme_names != NULL); + + TRACE(("idn_mapselector_addall(tld=%s, nschemes=%d)\n", + tld, nschemes)); + + for (i = 0; i < nschemes; i++) { + r = idn_mapselector_add(ctx, tld, (const char *)*scheme_names); + if (r != idn_success) + goto ret; + scheme_names++; + } + + r = idn_success; +ret: + TRACE(("idn_mapselector_addall(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_mapper_t +idn_mapselector_mapper(idn_mapselector_t ctx, const char *tld) { + idn_result_t r; + idn_mapper_t mapper; + char hash_key[MAPSELECTOR_MAX_TLD_LENGTH + 1]; + + assert(ctx != NULL && tld != NULL); + + TRACE(("idn_mapselector_mapper(tld=%s)\n", tld)); + + if (!(tld[0] == '.' && tld[1] == '\0')) { + if (tld[0] == '.') + tld++; + if (strchr(tld, '.') != NULL) + return (NULL); + } + if (strlen(tld) > MAPSELECTOR_MAX_TLD_LENGTH) + return (NULL); + strcpy(hash_key, tld); + string_ascii_tolower(hash_key); + + mapper = NULL; + r = idn__strhash_get(ctx->maphash, hash_key, (void **)&mapper); + if (r != idn_success) + return (NULL); + + idn_mapper_incrref(mapper); + + return (mapper); +} + +idn_result_t +idn_mapselector_map(idn_mapselector_t ctx, const unsigned long *from, + const char *tld, unsigned long *to, size_t tolen) { + idn_result_t r; + idn_mapper_t mapper = NULL; + char hash_key[MAPSELECTOR_MAX_TLD_LENGTH + 1]; + size_t fromlen; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_mapselector_map(from=\"%s\", tld=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), idn__debug_xstring(tld, 50), + (int)tolen)); + + if (!(tld[0] == '.' && tld[1] == '\0')) { + if (tld[0] == '.') + tld++; + if (strchr(tld, '.') != NULL) { + r = idn_invalid_name; + goto ret; + } + } + if (strlen(tld) > MAPSELECTOR_MAX_TLD_LENGTH) { + r = idn_invalid_name; + goto ret; + } + strcpy(hash_key, tld); + string_ascii_tolower(hash_key); + + fromlen = idn_ucs4_strlen(from); + + /* + * Get mapper for the TLD. + */ + if (idn__strhash_get(ctx->maphash, hash_key, (void **)&mapper) + != idn_success) { + strcpy(hash_key, IDN_MAPSELECTOR_DEFAULTTLD); + idn__strhash_get(ctx->maphash, hash_key, (void **)&mapper); + } + + /* + * Map. + * If default mapper has not been registered, copy the string. + */ + if (mapper == NULL) { + TRACE(("idn_mapselector_map(): no mapper\n")); + if (fromlen + 1 > tolen) { + r = idn_buffer_overflow; + goto ret; + } + memcpy(to, from, (fromlen + 1) * sizeof(*from)); + } else { + TRACE(("idn_mapselector_map(): tld=%s\n", tld)); + r = idn_mapper_map(mapper, from, to, tolen); + if (r != idn_success) + goto ret; + } + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_mapselector_map(): succcess (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn_mapselector_map(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_mapselector_map2(idn_mapselector_t ctx, const unsigned long *from, + const unsigned long *tld, unsigned long *to, + size_t tolen) { + char tld_utf8[MAPSELECTOR_MAX_TLD_LENGTH + 1]; + idn_result_t r; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_mapselector_map2(from=\"%s\", tld=\"%s\")\n", + idn__debug_ucs4xstring(from, 50), + idn__debug_ucs4xstring(tld, 50))); + + r = idn_ucs4_ucs4toutf8(tld, tld_utf8, sizeof(tld_utf8)); + if (r == idn_buffer_overflow) { + r = idn_invalid_name; + goto ret; + } else if (r != idn_success) { + goto ret; + } + + r = idn_mapselector_map(ctx, from, tld_utf8, to, tolen); +ret: + if (r == idn_success) { + TRACE(("idn_mapselector_map2(): success (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn_mapselector_map2(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +static void +string_ascii_tolower(char *string) { + unsigned char *p; + + for (p = (unsigned char *) string; *p != '\0'; p++) { + if ('A' <= *p && *p <= 'Z') + *p = *p - 'A' + 'a'; + } +} diff --git a/contrib/idn/idnkit-1.0-src/lib/nameprep.c b/contrib/idn/idnkit-1.0-src/lib/nameprep.c new file mode 100644 index 0000000000..b46b81b35e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/nameprep.c @@ -0,0 +1,357 @@ +#ifndef lint +static char *rcsid = "$Id: nameprep.c,v 1.1 2003/06/04 00:25:56 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#define UCS_MAX 0x7fffffff +#define UNICODE_MAX 0x10ffff + + +/* + * Load NAMEPREP compiled tables. + */ +#include "nameprepdata.c" + +/* + * Define mapping/checking functions for each version of the draft. + */ + +#define VERSION rfc3491 +#include "nameprep_template.c" +#undef VERSION + +typedef const char *(*nameprep_mapproc)(unsigned long v); +typedef int (*nameprep_checkproc)(unsigned long v); +typedef idn_biditype_t (*nameprep_biditypeproc)(unsigned long v); + +static struct idn_nameprep { + char *version; + nameprep_mapproc map_proc; + nameprep_checkproc prohibited_proc; + nameprep_checkproc unassigned_proc; + nameprep_biditypeproc biditype_proc; +} nameprep_versions[] = { +#define MAKE_NAMEPREP_HANDLE(version, id) \ + { version, \ + compose_sym2(nameprep_map_, id), \ + compose_sym2(nameprep_prohibited_, id), \ + compose_sym2(nameprep_unassigned_, id), \ + compose_sym2(nameprep_biditype_, id), } + MAKE_NAMEPREP_HANDLE("RFC3491", rfc3491), + { NULL, NULL, NULL }, +}; + +static idn_result_t idn_nameprep_check(nameprep_checkproc proc, + const unsigned long *str, + const unsigned long **found); + +idn_result_t +idn_nameprep_create(const char *version, idn_nameprep_t *handlep) { + idn_nameprep_t handle; + + assert(handlep != NULL); + + TRACE(("idn_nameprep_create(version=%-.50s)\n", + version == NULL ? "" : version)); + + if (version == NULL) + version = IDN_NAMEPREP_CURRENT; + + /* + * Lookup table for the specified version. Since the number of + * versions won't be large (I don't want see draft-23 or such :-), + * simple linear search is OK. + */ + for (handle = nameprep_versions; handle->version != NULL; handle++) { + if (strcmp(handle->version, version) == 0) { + *handlep = handle; + return (idn_success); + } + } + return (idn_notfound); +} + +void +idn_nameprep_destroy(idn_nameprep_t handle) { + assert(handle != NULL); + + TRACE(("idn_nameprep_destroy()\n")); + + /* Nothing to do. */ +} + +idn_result_t +idn_nameprep_map(idn_nameprep_t handle, const unsigned long *from, + unsigned long *to, size_t tolen) { + assert(handle != NULL && from != NULL && to != NULL); + + TRACE(("idn_nameprep_map(ctx=%s, from=\"%s\")\n", + handle->version, idn__debug_ucs4xstring(from, 50))); + + while (*from != '\0') { + unsigned long v = *from; + const char *mapped; + + if (v > UCS_MAX) { + /* This cannot happen, but just in case.. */ + return (idn_invalid_codepoint); + } else if (v > UNICODE_MAX) { + /* No mapping is possible. */ + mapped = NULL; + } else { + /* Try mapping. */ + mapped = (*handle->map_proc)(v); + } + + if (mapped == NULL) { + /* No mapping. Just copy verbatim. */ + if (tolen < 1) + return (idn_buffer_overflow); + *to++ = v; + tolen--; + } else { + const unsigned char *mappeddata; + size_t mappedlen; + + mappeddata = (const unsigned char *)mapped + 1; + mappedlen = *mapped; + + if (tolen < (mappedlen + 3) / 4) + return (idn_buffer_overflow); + tolen -= (mappedlen + 3) / 4; + while (mappedlen >= 4) { + *to = *mappeddata++; + *to |= *mappeddata++ << 8; + *to |= *mappeddata++ << 16; + *to |= *mappeddata++ << 24; + mappedlen -= 4; + to++; + } + if (mappedlen > 0) { + *to = *mappeddata++; + *to |= (mappedlen >= 2) ? + *mappeddata++ << 8: 0; + *to |= (mappedlen >= 3) ? + *mappeddata++ << 16: 0; + to++; + } + } + from++; + } + if (tolen == 0) + return (idn_buffer_overflow); + *to = '\0'; + return (idn_success); +} + +idn_result_t +idn_nameprep_isprohibited(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found) { + assert(handle != NULL && str != NULL && found != NULL); + + TRACE(("idn_nameprep_isprohibited(ctx=%s, str=\"%s\")\n", + handle->version, idn__debug_ucs4xstring(str, 50))); + + return (idn_nameprep_check(handle->prohibited_proc, str, found)); +} + +idn_result_t +idn_nameprep_isunassigned(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found) { + assert(handle != NULL && str != NULL && found != NULL); + + TRACE(("idn_nameprep_isunassigned(handle->version, str=\"%s\")\n", + handle->version, idn__debug_ucs4xstring(str, 50))); + + return (idn_nameprep_check(handle->unassigned_proc, str, found)); +} + +static idn_result_t +idn_nameprep_check(nameprep_checkproc proc, const unsigned long *str, + const unsigned long **found) { + unsigned long v; + + while (*str != '\0') { + v = *str; + + if (v > UCS_MAX) { + /* This cannot happen, but just in case.. */ + return (idn_invalid_codepoint); + } else if (v > UNICODE_MAX) { + /* It is invalid.. */ + *found = str; + return (idn_success); + } else if ((*proc)(v)) { + *found = str; + return (idn_success); + } + str++; + } + *found = NULL; + return (idn_success); +} + +idn_result_t +idn_nameprep_isvalidbidi(idn_nameprep_t handle, const unsigned long *str, + const unsigned long **found) { + unsigned long v; + idn_biditype_t first_char; + idn_biditype_t last_char; + int found_r_al; + + assert(handle != NULL && str != NULL && found != NULL); + + TRACE(("idn_nameprep_isvalidbidi(ctx=%s, str=\"%s\")\n", + handle->version, idn__debug_ucs4xstring(str, 50))); + + if (*str == '\0') { + *found = NULL; + return (idn_success); + } + + /* + * check first character's type and initialize variables. + */ + found_r_al = 0; + if (*str > UCS_MAX) { + /* This cannot happen, but just in case.. */ + return (idn_invalid_codepoint); + } else if (*str > UNICODE_MAX) { + /* It is invalid.. */ + *found = str; + return (idn_success); + } + first_char = last_char = (*(handle->biditype_proc))(*str); + if (first_char == idn_biditype_r_al) { + found_r_al = 1; + } + str++; + + /* + * see whether string is valid or not. + */ + while (*str != '\0') { + v = *str; + + if (v > UCS_MAX) { + /* This cannot happen, but just in case.. */ + return (idn_invalid_codepoint); + } else if (v > UNICODE_MAX) { + /* It is invalid.. */ + *found = str; + return (idn_success); + } else { + last_char = (*(handle->biditype_proc))(v); + if (found_r_al && last_char == idn_biditype_l) { + *found = str; + return (idn_success); + } + if (first_char != idn_biditype_r_al && last_char == idn_biditype_r_al) { + *found = str; + return (idn_success); + } + if (last_char == idn_biditype_r_al) { + found_r_al = 1; + } + } + str++; + } + + if (found_r_al) { + if (last_char != idn_biditype_r_al) { + *found = str - 1; + return (idn_success); + } + } + + *found = NULL; + return (idn_success); +} + +idn_result_t +idn_nameprep_createproc(const char *parameter, void **handlep) { + return idn_nameprep_create(parameter, (idn_nameprep_t *)handlep); +} + +void +idn_nameprep_destroyproc(void *handle) { + idn_nameprep_destroy((idn_nameprep_t)handle); +} + +idn_result_t +idn_nameprep_mapproc(void *handle, const unsigned long *from, + unsigned long *to, size_t tolen) { + return idn_nameprep_map((idn_nameprep_t)handle, from, to, tolen); +} + +idn_result_t +idn_nameprep_prohibitproc(void *handle, const unsigned long *str, + const unsigned long **found) { + return idn_nameprep_isprohibited((idn_nameprep_t)handle, str, found); +} + +idn_result_t +idn_nameprep_unassignedproc(void *handle, const unsigned long *str, + const unsigned long **found) { + return idn_nameprep_isunassigned((idn_nameprep_t)handle, str, found); +} + +idn_result_t +idn_nameprep_bidiproc(void *handle, const unsigned long *str, + const unsigned long **found) { + return idn_nameprep_isvalidbidi((idn_nameprep_t)handle, str, found); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/nameprep_template.c b/contrib/idn/idnkit-1.0-src/lib/nameprep_template.c new file mode 100644 index 0000000000..8a6a60f72e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/nameprep_template.c @@ -0,0 +1,137 @@ +/* $Id: nameprep_template.c,v 1.1 2003/06/04 00:25:57 marka Exp $ */ + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +/* + * Include this file once for each version of NAMEPREP. + * VERSION should be defined to appropriate value before inclusion. + */ + +#ifndef NAMEPREP_TEMPLATE_INIT +#define NAMEPREP_TEMPLATE_INIT + +/* Symbol composition. */ +#define compose_sym2(a, b) compose_sym2X(a, b) +#define compose_sym2X(a, b) a ## b +#define compose_sym3(a, b, c) compose_sym3X(a, b, c) +#define compose_sym3X(a, b, c) a ## b ## c + +/* Index calculation for multi-level index tables. */ +#define IDX0(type, v) IDX_0(v, BITS1(type), BITS2(type)) +#define IDX1(type, v) IDX_1(v, BITS1(type), BITS2(type)) +#define IDX2(type, v) IDX_2(v, BITS1(type), BITS2(type)) + +#define IDX_0(v, bits1, bits2) ((v) >> ((bits1) + (bits2))) +#define IDX_1(v, bits1, bits2) (((v) >> (bits2)) & ((1 << (bits1)) - 1)) +#define IDX_2(v, bits1, bits2) ((v) & ((1 << (bits2)) - 1)) + +#define BITS1(type) type ## _BITS_1 +#define BITS2(type) type ## _BITS_2 + +#endif /* NAMEPREP_TEMPLATE_INIT */ + +static const char * +compose_sym2(nameprep_map_, VERSION) (unsigned long v) { + int idx0 = IDX0(MAP, v); + int idx1 = IDX1(MAP, v); + int idx2 = IDX2(MAP, v); + int offset; + +#define IMAP compose_sym3(nameprep_, VERSION, _map_imap) +#define TABLE compose_sym3(nameprep_, VERSION, _map_table) +#define DATA compose_sym3(nameprep_, VERSION, _map_data) + offset = TABLE[IMAP[IMAP[idx0] + idx1]].tbl[idx2]; + if (offset == 0) + return (NULL); /* no mapping */ + return (const char *)(DATA + offset); +#undef IMAP +#undef TABLE +#undef DATA +} + +static int +compose_sym2(nameprep_prohibited_, VERSION) (unsigned long v) { + int idx0 = IDX0(PROH, v); + int idx1 = IDX1(PROH, v); + int idx2 = IDX2(PROH, v); + const unsigned char *bm; + +#define IMAP compose_sym3(nameprep_, VERSION, _prohibited_imap) +#define BITMAP compose_sym3(nameprep_, VERSION, _prohibited_bitmap) + bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; + return (bm[idx2 / 8] & (1 << (idx2 % 8))); +#undef IMAP +#undef BITMAP +} + +static int +compose_sym2(nameprep_unassigned_, VERSION) (unsigned long v) { + int idx0 = IDX0(UNAS, v); + int idx1 = IDX1(UNAS, v); + int idx2 = IDX2(UNAS, v); + const unsigned char *bm; + +#define IMAP compose_sym3(nameprep_, VERSION, _unassigned_imap) +#define BITMAP compose_sym3(nameprep_, VERSION, _unassigned_bitmap) + bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; + return (bm[idx2 / 8] & (1 << (idx2 % 8))); +#undef IMAP +#undef BITMAP +} + +static idn_biditype_t +compose_sym2(nameprep_biditype_, VERSION) (unsigned long v) { + int idx0 = IDX0(BIDI, v); + int idx1 = IDX1(BIDI, v); + int idx2 = IDX2(BIDI, v); + int offset; + +#define IMAP compose_sym3(nameprep_, VERSION, _bidi_imap) +#define TABLE compose_sym3(nameprep_, VERSION, _bidi_table) +#define DATA compose_sym3(nameprep_, VERSION, _bidi_data) + offset = TABLE[IMAP[IMAP[idx0] + idx1]].tbl[idx2]; + return DATA[offset]; +#undef IMAP +#undef TABLE +#undef DATA +} diff --git a/contrib/idn/idnkit-1.0-src/lib/nameprepdata.c b/contrib/idn/idnkit-1.0-src/lib/nameprepdata.c new file mode 100644 index 0000000000..f0fe44fee1 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/nameprepdata.c @@ -0,0 +1,2546 @@ +/* $Id: nameprepdata.c,v 1.1 2003/06/04 00:26:05 marka Exp $ */ +/* $-Id: generate_nameprep_data.pl,v 1.9 2002/11/29 09:08:13 ishisone Exp -$ */ +/* + * Do not edit this file! + * This file is generated from NAMEPREP specification. + */ + +#define MAP_BITS_0 9 +#define MAP_BITS_1 7 +#define MAP_BITS_2 5 + +#define PROH_BITS_0 7 +#define PROH_BITS_1 7 +#define PROH_BITS_2 7 + +#define UNAS_BITS_0 7 +#define UNAS_BITS_1 7 +#define UNAS_BITS_2 7 + +#define BIDI_BITS_0 9 +#define BIDI_BITS_1 7 +#define BIDI_BITS_2 5 + +static const unsigned short nameprep_rfc3491_map_imap[] = { + 272, 400, 528, 656, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 912, + 1040, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 1168, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 0, 0, 1, 0, 0, 2, 3, 0, + 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 15, 16, 17, 18, 19, + 20, 21, 0, 22, 23, 24, 25, 26, + 27, 28, 29, 0, 30, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 0, 0, 49, 0, 50, 0, 0, + 51, 52, 53, 54, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 55, 56, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 57, 58, 59, 60, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 61, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 62, 0, 0, 0, 0, 0, 0, 63, + 0, 64, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 65, 66, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 67, 68, 69, + 70, 80, 81, 73, 74, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned short tbl[32]; +} nameprep_rfc3491_map_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, + 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 50, 52, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 54, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, + 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, + 101, 0, 103, 105, 107, 109, 111, 113, 115, 117, + }}, + {{ + 123, 0, 126, 0, 129, 0, 132, 0, 135, 0, 138, + 0, 141, 0, 144, 0, 147, 0, 150, 0, 153, 0, + 156, 0, 159, 0, 162, 0, 165, 0, 168, 0, + }}, + {{ + 171, 0, 174, 0, 177, 0, 180, 0, 183, 0, 186, + 0, 189, 0, 192, 0, 195, 0, 202, 0, 205, 0, + 208, 0, 0, 211, 0, 214, 0, 217, 0, 220, + }}, + {{ + 0, 223, 0, 226, 0, 229, 0, 232, 0, 235, 241, + 0, 244, 0, 247, 0, 250, 0, 253, 0, 256, 0, + 259, 0, 262, 0, 265, 0, 268, 0, 271, 0, + }}, + {{ + 274, 0, 277, 0, 280, 0, 283, 0, 286, 0, 289, + 0, 292, 0, 295, 0, 298, 0, 301, 0, 304, 0, + 307, 0, 310, 312, 0, 315, 0, 318, 0, 38, + }}, + {{ + 0, 321, 324, 0, 327, 0, 330, 333, 0, 336, 339, + 342, 0, 0, 345, 348, 351, 354, 0, 357, 360, 0, + 363, 366, 369, 0, 0, 0, 372, 375, 0, 378, + }}, + {{ + 381, 0, 384, 0, 387, 0, 390, 393, 0, 396, 0, + 0, 399, 0, 402, 405, 0, 408, 411, 414, 0, 417, + 0, 420, 423, 0, 0, 0, 426, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 429, 429, 0, 432, 432, 0, 435, + 435, 0, 438, 0, 441, 0, 444, 0, 447, 0, 450, + 0, 453, 0, 456, 0, 459, 0, 0, 462, 0, + }}, + {{ + 465, 0, 468, 0, 471, 0, 474, 0, 477, 0, 480, + 0, 483, 0, 486, 0, 489, 496, 496, 0, 499, 0, + 502, 505, 508, 0, 511, 0, 514, 0, 517, 0, + }}, + {{ + 520, 0, 523, 0, 526, 0, 529, 0, 532, 0, 535, + 0, 538, 0, 541, 0, 544, 0, 547, 0, 550, 0, + 553, 0, 556, 0, 559, 0, 562, 0, 565, 0, + }}, + {{ + 568, 0, 571, 0, 574, 0, 577, 0, 580, 0, 583, + 0, 586, 0, 589, 0, 592, 0, 595, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 598, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 601, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 608, 0, 611, 614, 617, + 0, 620, 0, 623, 626, 629, 640, 643, 646, 649, 652, + 655, 658, 661, 598, 664, 667, 54, 670, 673, 676, + }}, + {{ + 679, 682, 0, 685, 688, 691, 694, 697, 700, 703, 706, + 709, 0, 0, 0, 0, 712, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 643, 661, 691, 623, 709, 694, + 679, 0, 723, 0, 726, 0, 729, 0, 732, 0, + }}, + {{ + 735, 0, 738, 0, 741, 0, 744, 0, 747, 0, 750, + 0, 753, 0, 756, 0, 664, 682, 685, 0, 661, 652, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 759, 762, 765, 768, 771, 774, 777, 780, 783, 786, 789, + 792, 795, 798, 801, 804, 807, 810, 813, 816, 819, 822, + 825, 828, 831, 834, 837, 840, 843, 846, 849, 852, + }}, + {{ + 855, 858, 861, 864, 867, 870, 873, 876, 879, 882, 885, + 888, 891, 894, 897, 900, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 903, 0, 906, 0, 909, 0, 912, 0, 915, 0, 918, + 0, 921, 0, 924, 0, 927, 0, 930, 0, 933, 0, + 936, 0, 939, 0, 942, 0, 945, 0, 948, 0, + }}, + {{ + 951, 0, 0, 0, 0, 0, 0, 0, 0, 0, 954, + 0, 957, 0, 960, 0, 963, 0, 966, 0, 969, 0, + 972, 0, 975, 0, 978, 0, 981, 0, 984, 0, + }}, + {{ + 987, 0, 990, 0, 993, 0, 996, 0, 999, 0, 1002, + 0, 1005, 0, 1008, 0, 1011, 0, 1014, 0, 1017, 0, + 1020, 0, 1023, 0, 1026, 0, 1029, 0, 1032, 0, + }}, + {{ + 0, 1035, 0, 1038, 0, 1041, 0, 1044, 0, 1047, 0, + 1050, 0, 1053, 0, 0, 1056, 0, 1059, 0, 1062, 0, + 1065, 0, 1068, 0, 1071, 0, 1074, 0, 1077, 0, + }}, + {{ + 1080, 0, 1083, 0, 1086, 0, 1089, 0, 1092, 0, 1095, + 0, 1098, 0, 1101, 0, 1104, 0, 1107, 0, 1110, 0, + 0, 0, 1113, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1116, 0, 1119, 0, 1122, 0, 1125, 0, 1128, 0, 1131, + 0, 1134, 0, 1137, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1140, 1143, 1146, 1149, 1152, + 1155, 1158, 1161, 1164, 1167, 1170, 1173, 1176, 1179, 1182, + }}, + {{ + 1185, 1188, 1191, 1194, 1197, 1200, 1203, 1206, 1209, 1212, 1215, + 1218, 1221, 1224, 1227, 1230, 1233, 1236, 1239, 1242, 1245, 1248, + 1251, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 1254, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1261, 0, 1264, 0, 1267, 0, 1270, 0, 1273, 0, 1276, + 0, 1279, 0, 1282, 0, 1285, 0, 1288, 0, 1291, 0, + 1294, 0, 1297, 0, 1300, 0, 1303, 0, 1306, 0, + }}, + {{ + 1309, 0, 1312, 0, 1315, 0, 1318, 0, 1321, 0, 1324, + 0, 1327, 0, 1330, 0, 1333, 0, 1336, 0, 1339, 0, + 1342, 0, 1345, 0, 1348, 0, 1351, 0, 1354, 0, + }}, + {{ + 1357, 0, 1360, 0, 1363, 0, 1366, 0, 1369, 0, 1372, + 0, 1375, 0, 1378, 0, 1381, 0, 1384, 0, 1387, 0, + 1390, 0, 1393, 0, 1396, 0, 1399, 0, 1402, 0, + }}, + {{ + 1405, 0, 1408, 0, 1411, 0, 1414, 0, 1417, 0, 1420, + 0, 1423, 0, 1426, 0, 1429, 0, 1432, 0, 1435, 0, + 1438, 0, 1441, 0, 1444, 0, 1447, 0, 1450, 0, + }}, + {{ + 1453, 0, 1456, 0, 1459, 0, 1462, 0, 1465, 0, 1468, + 0, 1471, 0, 1474, 0, 1477, 0, 1480, 0, 1483, 0, + 1486, 1493, 1500, 1507, 1514, 1405, 0, 0, 0, 0, + }}, + {{ + 1521, 0, 1524, 0, 1527, 0, 1530, 0, 1533, 0, 1536, + 0, 1539, 0, 1542, 0, 1545, 0, 1548, 0, 1551, 0, + 1554, 0, 1557, 0, 1560, 0, 1563, 0, 1566, 0, + }}, + {{ + 1569, 0, 1572, 0, 1575, 0, 1578, 0, 1581, 0, 1584, + 0, 1587, 0, 1590, 0, 1593, 0, 1596, 0, 1599, 0, + 1602, 0, 1605, 0, 1608, 0, 1611, 0, 1614, 0, + }}, + {{ + 1617, 0, 1620, 0, 1623, 0, 1626, 0, 1629, 0, 1632, + 0, 1635, 0, 1638, 0, 1641, 0, 1644, 0, 1647, 0, + 1650, 0, 1653, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1656, 1659, 1662, + 1665, 1668, 1671, 1674, 1677, 0, 0, 0, 0, 0, 0, + 0, 0, 1680, 1683, 1686, 1689, 1692, 1695, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1698, 1701, 1704, + 1707, 1710, 1713, 1716, 1719, 0, 0, 0, 0, 0, 0, + 0, 0, 1722, 1725, 1728, 1731, 1734, 1737, 1740, 1743, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1746, 1749, 1752, + 1755, 1758, 1761, 0, 0, 1764, 0, 1771, 0, 1782, 0, + 1793, 0, 0, 1804, 0, 1807, 0, 1810, 0, 1813, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1816, 1819, 1822, + 1825, 1828, 1831, 1834, 1837, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1840, 1847, 1854, 1861, 1868, 1875, 1882, 1889, 1840, 1847, 1854, + 1861, 1868, 1875, 1882, 1889, 1896, 1903, 1910, 1917, 1924, 1931, + 1938, 1945, 1896, 1903, 1910, 1917, 1924, 1931, 1938, 1945, + }}, + {{ + 1952, 1959, 1966, 1973, 1980, 1987, 1994, 2001, 1952, 1959, 1966, + 1973, 1980, 1987, 1994, 2001, 0, 0, 2008, 2015, 2022, 0, + 2029, 2036, 2047, 2050, 2053, 2056, 2015, 0, 598, 0, + }}, + {{ + 0, 0, 2059, 2066, 2073, 0, 2080, 2087, 2098, 2101, 2104, + 2107, 2066, 0, 0, 0, 0, 0, 2110, 629, 0, 0, + 2121, 2128, 2139, 2142, 2145, 2148, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2151, 712, 2162, 0, 2169, 2176, 2187, 2190, 2193, + 2196, 2199, 0, 0, 0, 0, 0, 2202, 2209, 2216, 0, + 2223, 2230, 2241, 2244, 2247, 2250, 2209, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 2253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 6, 2259, 0, 0, 0, 351, 0, 2265, 0, + 16, 16, 16, 0, 0, 18, 18, 24, 0, 0, 28, + 2271, 0, 0, 32, 34, 36, 36, 36, 0, 0, + }}, + {{ + 2277, 2283, 2293, 0, 52, 0, 703, 0, 52, 0, 22, + 67, 4, 6, 0, 0, 10, 12, 0, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 646, 679, + }}, + {{ + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2299, 2302, 2305, 2308, 2311, 2314, 2317, 2320, 2323, 2326, 2329, + 2332, 2335, 2338, 2341, 2344, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2347, 2350, 2353, 2356, 2359, 2362, 2365, 2368, 2371, 2374, + }}, + {{ + 2377, 2380, 2383, 2386, 2389, 2392, 2395, 2398, 2401, 2404, 2407, + 2410, 2413, 2416, 2419, 2422, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2425, 0, 2435, 0, 2441, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2447, 2453, 2459, 2465, 2471, 2477, 2483, 2489, 0, 0, 2495, + 2501, 2507, 0, 0, 0, 2513, 2519, 2529, 2539, 2549, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2447, 2559, + 2569, 2579, 0, 0, 0, 0, 0, 0, 0, 2589, 2595, + 2601, 2607, 2613, 2607, 2619, 2625, 2631, 2637, 2643, 2637, + }}, + {{ + 2649, 2656, 0, 2663, 0, 0, 2669, 2683, 2693, 2699, 0, + 2705, 0, 2711, 2717, 0, 0, 0, 0, 0, 0, 0, + 0, 2723, 0, 2729, 2739, 0, 2745, 2751, 0, 0, + }}, + {{ + 2757, 2763, 2769, 2775, 2785, 2795, 2795, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2801, 2808, 2815, + 2822, 2829, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + }}, + {{ + 0, 2836, 2839, 2842, 2845, 2848, 2851, 2854, 2857, 2860, 2863, + 2866, 2869, 2872, 2875, 2878, 2881, 2884, 2887, 2890, 2893, 2896, + 2899, 2902, 2905, 2908, 2911, 0, 0, 0, 0, 0, + }}, + {{ + 2914, 2918, 2922, 2926, 2930, 2934, 2938, 2942, 2946, 2950, 2954, + 2958, 2962, 2966, 2970, 2974, 2978, 2982, 2986, 2990, 2994, 2998, + 3002, 3006, 3010, 3014, 3018, 3022, 3026, 3030, 3034, 3038, + }}, + {{ + 3042, 3046, 3050, 3054, 3058, 3062, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, + 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, + 46, 48, 50, 52, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, + }}, + {{ + 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 6, + 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, + 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, + }}, + {{ + 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 6, 8, + }}, + {{ + 0, 0, 14, 0, 0, 20, 22, 0, 0, 28, 30, + 32, 34, 0, 38, 40, 42, 44, 46, 48, 50, 52, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 12, + 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + }}, + {{ + 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 2, 4, 0, 8, 10, 12, 14, + 0, 0, 20, 22, 24, 26, 28, 30, 32, 34, 0, + 38, 40, 42, 44, 46, 48, 50, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 4, 0, 8, 10, 12, 14, 0, + }}, + {{ + 18, 20, 22, 24, 26, 0, 30, 0, 0, 0, 38, + 40, 42, 44, 46, 48, 50, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, + 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, + }}, + {{ + 42, 44, 46, 48, 50, 52, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 50, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, + }}, + {{ + 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 640, 643, 646, + 649, 652, 655, 658, 661, 598, 664, 667, 54, 670, 673, + 676, 679, 682, 661, 685, 688, 691, 694, 697, 700, + }}, + {{ + 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 685, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 640, 643, 646, 649, 652, 655, 658, 661, 598, + 664, 667, 54, 670, 673, 676, 679, 682, 661, 685, 688, + 691, 694, 697, 700, 703, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 640, 643, 646, 649, + }}, + {{ + 652, 655, 658, 661, 598, 664, 667, 54, 670, 673, 676, + 679, 682, 661, 685, 688, 691, 694, 697, 700, 703, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 685, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 640, 643, 646, 649, 652, 655, 658, 661, 598, 664, + }}, + {{ + 667, 54, 670, 673, 676, 679, 682, 661, 685, 688, 691, + 694, 697, 700, 703, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 685, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 640, 643, 646, 649, 652, 655, + 658, 661, 598, 664, 667, 54, 670, 673, 676, 679, + }}, + {{ + 682, 661, 685, 688, 691, 694, 697, 700, 703, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 685, 0, 0, 0, 0, + }}, +}; + +static const unsigned char nameprep_rfc3491_map_data[] = { + 0, 0, 1, 97, 1, 98, 1, 99, 1, 100, 1, 101, + 1, 102, 1, 103, 1, 104, 1, 105, 1, 106, 1, 107, + 1, 108, 1, 109, 1, 110, 1, 111, 1, 112, 1, 113, + 1, 114, 1, 115, 1, 116, 1, 117, 1, 118, 1, 119, + 1, 120, 1, 121, 1, 122, 2, 188, 3, 1, 224, 1, + 225, 1, 226, 1, 227, 1, 228, 1, 229, 1, 230, 1, + 231, 1, 232, 1, 233, 1, 234, 1, 235, 1, 236, 1, + 237, 1, 238, 1, 239, 1, 240, 1, 241, 1, 242, 1, + 243, 1, 244, 1, 245, 1, 246, 1, 248, 1, 249, 1, + 250, 1, 251, 1, 252, 1, 253, 1, 254, 5, 115, 0, + 0, 0, 115, 2, 1, 1, 2, 3, 1, 2, 5, 1, + 2, 7, 1, 2, 9, 1, 2, 11, 1, 2, 13, 1, + 2, 15, 1, 2, 17, 1, 2, 19, 1, 2, 21, 1, + 2, 23, 1, 2, 25, 1, 2, 27, 1, 2, 29, 1, + 2, 31, 1, 2, 33, 1, 2, 35, 1, 2, 37, 1, + 2, 39, 1, 2, 41, 1, 2, 43, 1, 2, 45, 1, + 2, 47, 1, 6, 105, 0, 0, 0, 7, 3, 2, 51, + 1, 2, 53, 1, 2, 55, 1, 2, 58, 1, 2, 60, + 1, 2, 62, 1, 2, 64, 1, 2, 66, 1, 2, 68, + 1, 2, 70, 1, 2, 72, 1, 5, 188, 2, 0, 0, + 110, 2, 75, 1, 2, 77, 1, 2, 79, 1, 2, 81, + 1, 2, 83, 1, 2, 85, 1, 2, 87, 1, 2, 89, + 1, 2, 91, 1, 2, 93, 1, 2, 95, 1, 2, 97, + 1, 2, 99, 1, 2, 101, 1, 2, 103, 1, 2, 105, + 1, 2, 107, 1, 2, 109, 1, 2, 111, 1, 2, 113, + 1, 2, 115, 1, 2, 117, 1, 2, 119, 1, 1, 255, + 2, 122, 1, 2, 124, 1, 2, 126, 1, 2, 83, 2, + 2, 131, 1, 2, 133, 1, 2, 84, 2, 2, 136, 1, + 2, 86, 2, 2, 87, 2, 2, 140, 1, 2, 221, 1, + 2, 89, 2, 2, 91, 2, 2, 146, 1, 2, 96, 2, + 2, 99, 2, 2, 105, 2, 2, 104, 2, 2, 153, 1, + 2, 111, 2, 2, 114, 2, 2, 117, 2, 2, 161, 1, + 2, 163, 1, 2, 165, 1, 2, 128, 2, 2, 168, 1, + 2, 131, 2, 2, 173, 1, 2, 136, 2, 2, 176, 1, + 2, 138, 2, 2, 139, 2, 2, 180, 1, 2, 182, 1, + 2, 146, 2, 2, 185, 1, 2, 189, 1, 2, 198, 1, + 2, 201, 1, 2, 204, 1, 2, 206, 1, 2, 208, 1, + 2, 210, 1, 2, 212, 1, 2, 214, 1, 2, 216, 1, + 2, 218, 1, 2, 220, 1, 2, 223, 1, 2, 225, 1, + 2, 227, 1, 2, 229, 1, 2, 231, 1, 2, 233, 1, + 2, 235, 1, 2, 237, 1, 2, 239, 1, 6, 106, 0, + 0, 0, 12, 3, 2, 243, 1, 2, 245, 1, 2, 149, + 1, 2, 191, 1, 2, 249, 1, 2, 251, 1, 2, 253, + 1, 2, 255, 1, 2, 1, 2, 2, 3, 2, 2, 5, + 2, 2, 7, 2, 2, 9, 2, 2, 11, 2, 2, 13, + 2, 2, 15, 2, 2, 17, 2, 2, 19, 2, 2, 21, + 2, 2, 23, 2, 2, 25, 2, 2, 27, 2, 2, 29, + 2, 2, 31, 2, 2, 158, 1, 2, 35, 2, 2, 37, + 2, 2, 39, 2, 2, 41, 2, 2, 43, 2, 2, 45, + 2, 2, 47, 2, 2, 49, 2, 2, 51, 2, 2, 185, + 3, 6, 32, 0, 0, 0, 185, 3, 2, 172, 3, 2, + 173, 3, 2, 174, 3, 2, 175, 3, 2, 204, 3, 2, + 205, 3, 2, 206, 3, 10, 185, 3, 0, 0, 8, 3, + 0, 0, 1, 3, 2, 177, 3, 2, 178, 3, 2, 179, + 3, 2, 180, 3, 2, 181, 3, 2, 182, 3, 2, 183, + 3, 2, 184, 3, 2, 186, 3, 2, 187, 3, 2, 189, + 3, 2, 190, 3, 2, 191, 3, 2, 192, 3, 2, 193, + 3, 2, 195, 3, 2, 196, 3, 2, 197, 3, 2, 198, + 3, 2, 199, 3, 2, 200, 3, 2, 201, 3, 2, 202, + 3, 2, 203, 3, 10, 197, 3, 0, 0, 8, 3, 0, + 0, 1, 3, 2, 217, 3, 2, 219, 3, 2, 221, 3, + 2, 223, 3, 2, 225, 3, 2, 227, 3, 2, 229, 3, + 2, 231, 3, 2, 233, 3, 2, 235, 3, 2, 237, 3, + 2, 239, 3, 2, 80, 4, 2, 81, 4, 2, 82, 4, + 2, 83, 4, 2, 84, 4, 2, 85, 4, 2, 86, 4, + 2, 87, 4, 2, 88, 4, 2, 89, 4, 2, 90, 4, + 2, 91, 4, 2, 92, 4, 2, 93, 4, 2, 94, 4, + 2, 95, 4, 2, 48, 4, 2, 49, 4, 2, 50, 4, + 2, 51, 4, 2, 52, 4, 2, 53, 4, 2, 54, 4, + 2, 55, 4, 2, 56, 4, 2, 57, 4, 2, 58, 4, + 2, 59, 4, 2, 60, 4, 2, 61, 4, 2, 62, 4, + 2, 63, 4, 2, 64, 4, 2, 65, 4, 2, 66, 4, + 2, 67, 4, 2, 68, 4, 2, 69, 4, 2, 70, 4, + 2, 71, 4, 2, 72, 4, 2, 73, 4, 2, 74, 4, + 2, 75, 4, 2, 76, 4, 2, 77, 4, 2, 78, 4, + 2, 79, 4, 2, 97, 4, 2, 99, 4, 2, 101, 4, + 2, 103, 4, 2, 105, 4, 2, 107, 4, 2, 109, 4, + 2, 111, 4, 2, 113, 4, 2, 115, 4, 2, 117, 4, + 2, 119, 4, 2, 121, 4, 2, 123, 4, 2, 125, 4, + 2, 127, 4, 2, 129, 4, 2, 139, 4, 2, 141, 4, + 2, 143, 4, 2, 145, 4, 2, 147, 4, 2, 149, 4, + 2, 151, 4, 2, 153, 4, 2, 155, 4, 2, 157, 4, + 2, 159, 4, 2, 161, 4, 2, 163, 4, 2, 165, 4, + 2, 167, 4, 2, 169, 4, 2, 171, 4, 2, 173, 4, + 2, 175, 4, 2, 177, 4, 2, 179, 4, 2, 181, 4, + 2, 183, 4, 2, 185, 4, 2, 187, 4, 2, 189, 4, + 2, 191, 4, 2, 194, 4, 2, 196, 4, 2, 198, 4, + 2, 200, 4, 2, 202, 4, 2, 204, 4, 2, 206, 4, + 2, 209, 4, 2, 211, 4, 2, 213, 4, 2, 215, 4, + 2, 217, 4, 2, 219, 4, 2, 221, 4, 2, 223, 4, + 2, 225, 4, 2, 227, 4, 2, 229, 4, 2, 231, 4, + 2, 233, 4, 2, 235, 4, 2, 237, 4, 2, 239, 4, + 2, 241, 4, 2, 243, 4, 2, 245, 4, 2, 249, 4, + 2, 1, 5, 2, 3, 5, 2, 5, 5, 2, 7, 5, + 2, 9, 5, 2, 11, 5, 2, 13, 5, 2, 15, 5, + 2, 97, 5, 2, 98, 5, 2, 99, 5, 2, 100, 5, + 2, 101, 5, 2, 102, 5, 2, 103, 5, 2, 104, 5, + 2, 105, 5, 2, 106, 5, 2, 107, 5, 2, 108, 5, + 2, 109, 5, 2, 110, 5, 2, 111, 5, 2, 112, 5, + 2, 113, 5, 2, 114, 5, 2, 115, 5, 2, 116, 5, + 2, 117, 5, 2, 118, 5, 2, 119, 5, 2, 120, 5, + 2, 121, 5, 2, 122, 5, 2, 123, 5, 2, 124, 5, + 2, 125, 5, 2, 126, 5, 2, 127, 5, 2, 128, 5, + 2, 129, 5, 2, 130, 5, 2, 131, 5, 2, 132, 5, + 2, 133, 5, 2, 134, 5, 6, 101, 5, 0, 0, 130, + 5, 2, 1, 30, 2, 3, 30, 2, 5, 30, 2, 7, + 30, 2, 9, 30, 2, 11, 30, 2, 13, 30, 2, 15, + 30, 2, 17, 30, 2, 19, 30, 2, 21, 30, 2, 23, + 30, 2, 25, 30, 2, 27, 30, 2, 29, 30, 2, 31, + 30, 2, 33, 30, 2, 35, 30, 2, 37, 30, 2, 39, + 30, 2, 41, 30, 2, 43, 30, 2, 45, 30, 2, 47, + 30, 2, 49, 30, 2, 51, 30, 2, 53, 30, 2, 55, + 30, 2, 57, 30, 2, 59, 30, 2, 61, 30, 2, 63, + 30, 2, 65, 30, 2, 67, 30, 2, 69, 30, 2, 71, + 30, 2, 73, 30, 2, 75, 30, 2, 77, 30, 2, 79, + 30, 2, 81, 30, 2, 83, 30, 2, 85, 30, 2, 87, + 30, 2, 89, 30, 2, 91, 30, 2, 93, 30, 2, 95, + 30, 2, 97, 30, 2, 99, 30, 2, 101, 30, 2, 103, + 30, 2, 105, 30, 2, 107, 30, 2, 109, 30, 2, 111, + 30, 2, 113, 30, 2, 115, 30, 2, 117, 30, 2, 119, + 30, 2, 121, 30, 2, 123, 30, 2, 125, 30, 2, 127, + 30, 2, 129, 30, 2, 131, 30, 2, 133, 30, 2, 135, + 30, 2, 137, 30, 2, 139, 30, 2, 141, 30, 2, 143, + 30, 2, 145, 30, 2, 147, 30, 2, 149, 30, 6, 104, + 0, 0, 0, 49, 3, 6, 116, 0, 0, 0, 8, 3, + 6, 119, 0, 0, 0, 10, 3, 6, 121, 0, 0, 0, + 10, 3, 6, 97, 0, 0, 0, 190, 2, 2, 161, 30, + 2, 163, 30, 2, 165, 30, 2, 167, 30, 2, 169, 30, + 2, 171, 30, 2, 173, 30, 2, 175, 30, 2, 177, 30, + 2, 179, 30, 2, 181, 30, 2, 183, 30, 2, 185, 30, + 2, 187, 30, 2, 189, 30, 2, 191, 30, 2, 193, 30, + 2, 195, 30, 2, 197, 30, 2, 199, 30, 2, 201, 30, + 2, 203, 30, 2, 205, 30, 2, 207, 30, 2, 209, 30, + 2, 211, 30, 2, 213, 30, 2, 215, 30, 2, 217, 30, + 2, 219, 30, 2, 221, 30, 2, 223, 30, 2, 225, 30, + 2, 227, 30, 2, 229, 30, 2, 231, 30, 2, 233, 30, + 2, 235, 30, 2, 237, 30, 2, 239, 30, 2, 241, 30, + 2, 243, 30, 2, 245, 30, 2, 247, 30, 2, 249, 30, + 2, 0, 31, 2, 1, 31, 2, 2, 31, 2, 3, 31, + 2, 4, 31, 2, 5, 31, 2, 6, 31, 2, 7, 31, + 2, 16, 31, 2, 17, 31, 2, 18, 31, 2, 19, 31, + 2, 20, 31, 2, 21, 31, 2, 32, 31, 2, 33, 31, + 2, 34, 31, 2, 35, 31, 2, 36, 31, 2, 37, 31, + 2, 38, 31, 2, 39, 31, 2, 48, 31, 2, 49, 31, + 2, 50, 31, 2, 51, 31, 2, 52, 31, 2, 53, 31, + 2, 54, 31, 2, 55, 31, 2, 64, 31, 2, 65, 31, + 2, 66, 31, 2, 67, 31, 2, 68, 31, 2, 69, 31, + 6, 197, 3, 0, 0, 19, 3, 10, 197, 3, 0, 0, + 19, 3, 0, 0, 0, 3, 10, 197, 3, 0, 0, 19, + 3, 0, 0, 1, 3, 10, 197, 3, 0, 0, 19, 3, + 0, 0, 66, 3, 2, 81, 31, 2, 83, 31, 2, 85, + 31, 2, 87, 31, 2, 96, 31, 2, 97, 31, 2, 98, + 31, 2, 99, 31, 2, 100, 31, 2, 101, 31, 2, 102, + 31, 2, 103, 31, 6, 0, 31, 0, 0, 185, 3, 6, + 1, 31, 0, 0, 185, 3, 6, 2, 31, 0, 0, 185, + 3, 6, 3, 31, 0, 0, 185, 3, 6, 4, 31, 0, + 0, 185, 3, 6, 5, 31, 0, 0, 185, 3, 6, 6, + 31, 0, 0, 185, 3, 6, 7, 31, 0, 0, 185, 3, + 6, 32, 31, 0, 0, 185, 3, 6, 33, 31, 0, 0, + 185, 3, 6, 34, 31, 0, 0, 185, 3, 6, 35, 31, + 0, 0, 185, 3, 6, 36, 31, 0, 0, 185, 3, 6, + 37, 31, 0, 0, 185, 3, 6, 38, 31, 0, 0, 185, + 3, 6, 39, 31, 0, 0, 185, 3, 6, 96, 31, 0, + 0, 185, 3, 6, 97, 31, 0, 0, 185, 3, 6, 98, + 31, 0, 0, 185, 3, 6, 99, 31, 0, 0, 185, 3, + 6, 100, 31, 0, 0, 185, 3, 6, 101, 31, 0, 0, + 185, 3, 6, 102, 31, 0, 0, 185, 3, 6, 103, 31, + 0, 0, 185, 3, 6, 112, 31, 0, 0, 185, 3, 6, + 177, 3, 0, 0, 185, 3, 6, 172, 3, 0, 0, 185, + 3, 6, 177, 3, 0, 0, 66, 3, 10, 177, 3, 0, + 0, 66, 3, 0, 0, 185, 3, 2, 176, 31, 2, 177, + 31, 2, 112, 31, 2, 113, 31, 6, 116, 31, 0, 0, + 185, 3, 6, 183, 3, 0, 0, 185, 3, 6, 174, 3, + 0, 0, 185, 3, 6, 183, 3, 0, 0, 66, 3, 10, + 183, 3, 0, 0, 66, 3, 0, 0, 185, 3, 2, 114, + 31, 2, 115, 31, 2, 116, 31, 2, 117, 31, 10, 185, + 3, 0, 0, 8, 3, 0, 0, 0, 3, 6, 185, 3, + 0, 0, 66, 3, 10, 185, 3, 0, 0, 8, 3, 0, + 0, 66, 3, 2, 208, 31, 2, 209, 31, 2, 118, 31, + 2, 119, 31, 10, 197, 3, 0, 0, 8, 3, 0, 0, + 0, 3, 6, 193, 3, 0, 0, 19, 3, 6, 197, 3, + 0, 0, 66, 3, 10, 197, 3, 0, 0, 8, 3, 0, + 0, 66, 3, 2, 224, 31, 2, 225, 31, 2, 122, 31, + 2, 123, 31, 2, 229, 31, 6, 124, 31, 0, 0, 185, + 3, 6, 201, 3, 0, 0, 185, 3, 6, 206, 3, 0, + 0, 185, 3, 6, 201, 3, 0, 0, 66, 3, 10, 201, + 3, 0, 0, 66, 3, 0, 0, 185, 3, 2, 120, 31, + 2, 121, 31, 2, 124, 31, 2, 125, 31, 5, 114, 0, + 0, 0, 115, 5, 176, 0, 0, 0, 99, 5, 176, 0, + 0, 0, 102, 5, 110, 0, 0, 0, 111, 5, 115, 0, + 0, 0, 109, 9, 116, 0, 0, 0, 101, 0, 0, 0, + 108, 5, 116, 0, 0, 0, 109, 2, 112, 33, 2, 113, + 33, 2, 114, 33, 2, 115, 33, 2, 116, 33, 2, 117, + 33, 2, 118, 33, 2, 119, 33, 2, 120, 33, 2, 121, + 33, 2, 122, 33, 2, 123, 33, 2, 124, 33, 2, 125, + 33, 2, 126, 33, 2, 127, 33, 2, 208, 36, 2, 209, + 36, 2, 210, 36, 2, 211, 36, 2, 212, 36, 2, 213, + 36, 2, 214, 36, 2, 215, 36, 2, 216, 36, 2, 217, + 36, 2, 218, 36, 2, 219, 36, 2, 220, 36, 2, 221, + 36, 2, 222, 36, 2, 223, 36, 2, 224, 36, 2, 225, + 36, 2, 226, 36, 2, 227, 36, 2, 228, 36, 2, 229, + 36, 2, 230, 36, 2, 231, 36, 2, 232, 36, 2, 233, + 36, 9, 104, 0, 0, 0, 112, 0, 0, 0, 97, 5, + 97, 0, 0, 0, 117, 5, 111, 0, 0, 0, 118, 5, + 112, 0, 0, 0, 97, 5, 110, 0, 0, 0, 97, 5, + 188, 3, 0, 0, 97, 5, 109, 0, 0, 0, 97, 5, + 107, 0, 0, 0, 97, 5, 107, 0, 0, 0, 98, 5, + 109, 0, 0, 0, 98, 5, 103, 0, 0, 0, 98, 5, + 112, 0, 0, 0, 102, 5, 110, 0, 0, 0, 102, 5, + 188, 3, 0, 0, 102, 5, 104, 0, 0, 0, 122, 9, + 107, 0, 0, 0, 104, 0, 0, 0, 122, 9, 109, 0, + 0, 0, 104, 0, 0, 0, 122, 9, 103, 0, 0, 0, + 104, 0, 0, 0, 122, 9, 116, 0, 0, 0, 104, 0, + 0, 0, 122, 9, 107, 0, 0, 0, 112, 0, 0, 0, + 97, 9, 109, 0, 0, 0, 112, 0, 0, 0, 97, 9, + 103, 0, 0, 0, 112, 0, 0, 0, 97, 5, 112, 0, + 0, 0, 118, 5, 110, 0, 0, 0, 118, 5, 188, 3, + 0, 0, 118, 5, 109, 0, 0, 0, 118, 5, 107, 0, + 0, 0, 118, 5, 112, 0, 0, 0, 119, 5, 110, 0, + 0, 0, 119, 5, 188, 3, 0, 0, 119, 5, 109, 0, + 0, 0, 119, 5, 107, 0, 0, 0, 119, 6, 107, 0, + 0, 0, 201, 3, 6, 109, 0, 0, 0, 201, 3, 5, + 98, 0, 0, 0, 113, 13, 99, 0, 0, 0, 21, 34, + 0, 0, 107, 0, 0, 0, 103, 9, 99, 0, 0, 0, + 111, 0, 0, 0, 46, 5, 100, 0, 0, 0, 98, 5, + 103, 0, 0, 0, 121, 5, 104, 0, 0, 0, 112, 5, + 107, 0, 0, 0, 107, 5, 107, 0, 0, 0, 109, 5, + 112, 0, 0, 0, 104, 9, 112, 0, 0, 0, 112, 0, + 0, 0, 109, 5, 112, 0, 0, 0, 114, 5, 115, 0, + 0, 0, 118, 5, 119, 0, 0, 0, 98, 5, 102, 0, + 0, 0, 102, 5, 102, 0, 0, 0, 105, 5, 102, 0, + 0, 0, 108, 9, 102, 0, 0, 0, 102, 0, 0, 0, + 105, 9, 102, 0, 0, 0, 102, 0, 0, 0, 108, 5, + 115, 0, 0, 0, 116, 6, 116, 5, 0, 0, 118, 5, + 6, 116, 5, 0, 0, 101, 5, 6, 116, 5, 0, 0, + 107, 5, 6, 126, 5, 0, 0, 118, 5, 6, 116, 5, + 0, 0, 109, 5, 2, 65, 255, 2, 66, 255, 2, 67, + 255, 2, 68, 255, 2, 69, 255, 2, 70, 255, 2, 71, + 255, 2, 72, 255, 2, 73, 255, 2, 74, 255, 2, 75, + 255, 2, 76, 255, 2, 77, 255, 2, 78, 255, 2, 79, + 255, 2, 80, 255, 2, 81, 255, 2, 82, 255, 2, 83, + 255, 2, 84, 255, 2, 85, 255, 2, 86, 255, 2, 87, + 255, 2, 88, 255, 2, 89, 255, 2, 90, 255, 3, 40, + 4, 1, 3, 41, 4, 1, 3, 42, 4, 1, 3, 43, + 4, 1, 3, 44, 4, 1, 3, 45, 4, 1, 3, 46, + 4, 1, 3, 47, 4, 1, 3, 48, 4, 1, 3, 49, + 4, 1, 3, 50, 4, 1, 3, 51, 4, 1, 3, 52, + 4, 1, 3, 53, 4, 1, 3, 54, 4, 1, 3, 55, + 4, 1, 3, 56, 4, 1, 3, 57, 4, 1, 3, 58, + 4, 1, 3, 59, 4, 1, 3, 60, 4, 1, 3, 61, + 4, 1, 3, 62, 4, 1, 3, 63, 4, 1, 3, 64, + 4, 1, 3, 65, 4, 1, 3, 66, 4, 1, 3, 67, + 4, 1, 3, 68, 4, 1, 3, 69, 4, 1, 3, 70, + 4, 1, 3, 71, 4, 1, 3, 72, 4, 1, 3, 73, + 4, 1, 3, 74, 4, 1, 3, 75, 4, 1, 3, 76, + 4, 1, 3, 77, 4, 1, +}; + +static const unsigned short nameprep_rfc3491_prohibited_imap[] = { + 68, 196, 196, 324, 196, 196, 196, 452, + 196, 196, 196, 580, 196, 196, 196, 580, + 196, 196, 196, 580, 196, 196, 196, 580, + 196, 196, 196, 580, 196, 196, 196, 580, + 196, 196, 196, 580, 196, 196, 196, 580, + 196, 196, 196, 580, 196, 196, 196, 580, + 196, 196, 196, 580, 196, 196, 196, 580, + 708, 196, 196, 580, 836, 836, 836, 836, + 836, 836, 836, 836, 0, 1, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, 3, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 10, + 0, 0, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, +}; + +static const struct { + unsigned char bm[16]; +} nameprep_rfc3491_prohibited_bitmap[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 255,255,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, + }}, + {{ + 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 255,199, 0, 0, 0,255, 0, 0, 0, 0, 0,128, 14,252, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 15, + }}, + {{ + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 7, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, + }}, + {{ + 2, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, + }}, +}; + +static const unsigned short nameprep_rfc3491_unassigned_imap[] = { + 68, 196, 324, 452, 580, 708, 708, 836, + 964, 964, 1092, 1220, 708, 708, 708, 1348, + 708, 708, 708, 1348, 708, 708, 708, 1348, + 708, 708, 708, 1348, 708, 708, 708, 1348, + 708, 708, 708, 1348, 708, 708, 708, 1348, + 708, 708, 708, 1348, 708, 708, 708, 1348, + 708, 708, 708, 1348, 708, 708, 708, 1348, + 1476, 708, 708, 1348, 964, 964, 964, 964, + 964, 964, 964, 964, 0, 0, 0, 0, + 1, 2, 3, 4, 0, 5, 6, 7, + 8, 9, 10, 11, 12, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 0, 0, 0, + 36, 37, 38, 39, 40, 41, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 0, 42, 43, 44, 45, 46, 47, 48, + 0, 0, 0, 49, 50, 51, 0, 0, + 52, 53, 54, 55, 0, 0, 0, 0, + 0, 0, 12, 12, 12, 12, 12, 12, + 12, 56, 0, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 66, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 67, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 69, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 70, 12, 71, 72, 0, 0, 73, 74, + 75, 76, 35, 77, 12, 12, 12, 12, + 12, 12, 78, 12, 79, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 0, 80, 81, 82, + 12, 12, 12, 12, 83, 84, 85, 0, + 0, 86, 0, 87, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 88, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 89, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 0, 0, 0, 0, + 90, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 88, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 88, 91, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, +}; + +static const struct { + unsigned char bm[16]; +} nameprep_rfc3491_unassigned_bitmap[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 2, 0,240,255,255,255, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,128,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0,207,187, + }}, + {{ + 15, 40, 0, 0, 4, 0, 0, 0, 0,128, 0, 0, 0, 0,128,255, + }}, + {{ + 128, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0,192,252, + }}, + {{ + 0, 0,255,255,255,255, 1, 0, 0, 0,128, 1, 1, 0, 0, 0, + }}, + {{ + 0,249, 1, 0, 4, 0, 0, 4,224,255, 0, 0, 0,248,224,255, + }}, + {{ + 255,239,255,119, 1, 0, 0,248, 0, 0,192,255, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0,128, + }}, + {{ + 0, 64, 0, 0, 0,224, 0, 0, 0,248,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255, + }}, + {{ + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 17, 0, 0, 0, 0, 0, 0, 12, 0,192,224, 0, 0, 0,254,255, + }}, + {{ + 17, 96, 6, 0, 0, 2, 58, 44, 96,198,127, 79, 48, 0, 0,248, + }}, + {{ + 27,120, 6, 0, 0, 2,146, 44,120,198,255,161, 63, 0,224,255, + }}, + {{ + 17, 80, 4, 0, 0, 2, 18, 12, 64,196,254,255, 62, 0,255,255, + }}, + {{ + 17, 96, 6, 0, 0, 2, 50, 12,112,198, 63, 79, 60, 0,254,255, + }}, + {{ + 19, 56,194, 41,231, 56, 64, 60, 56,194,127,255,127, 0,248,255, + }}, + {{ + 17, 32, 2, 0, 0, 2, 16, 60, 32,194,159,255, 60, 0,255,255, + }}, + {{ + 19, 32, 2, 0, 0, 2, 16, 60, 32,194,159,191, 60, 0,255,255, + }}, + {{ + 19, 32, 2, 0, 0, 2, 0, 60, 48,194,127,255, 60, 0,255,255, + }}, + {{ + 19, 0,128, 3, 0, 0, 4,208,128,123,160, 0,255,255,227,255, + }}, + {{ + 1, 0, 0, 0, 0, 0, 0,120, 0, 0, 0,240,255,255,255,255, + }}, + {{ + 105,218, 15, 1, 81, 19, 0,196,160,192, 0,204,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,248, 1, 0, + }}, + {{ + 0,240, 0, 1, 0, 0, 0, 32, 0, 96,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 4, 9, 56,252, 0, 0, 0,252,255,255,255,255, + }}, + {{ + 255,255,255,255, 0, 0, 0, 0,192,255, 0, 0, 0, 0, 0,246, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, + }}, + {{ + 128, 0, 0, 0, 0, 0, 0, 0,128,194,128,194, 0, 0, 0, 0, + }}, + {{ + 128,194, 0, 0, 0,128,194,128,194,128,128, 0, 0,128, 0, 0, + }}, + {{ + 0,128,194,128, 0, 0, 0, 0,128, 0, 0,248, 1, 0, 0,224, + }}, + {{ + 255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,255, + }}, + {{ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, + }}, + {{ + 0, 0, 0,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,255, + }}, + {{ + 0, 32,224,255, 0, 0,128,255, 0, 0,240,255, 0, 32,242,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 0,252,255,255, + }}, + {{ + 0,128, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, + }}, + {{ + 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, + }}, + {{ + 0, 0,192,192, 0, 0, 0, 0,192,192, 0, 85, 0, 0, 0,192, + }}, + {{ + 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 48, 16, 0, 0, 35,128, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,127,240, 3, 12, 0, + }}, + {{ + 0,128,255,255, 0, 0,252,255,255,255, 0, 0, 0,248,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 24, 0,240, 7, 0, 0, 0, 0, 0, + }}, + {{ + 240,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0,128,255,255,255, 0,248,255,255, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, + }}, + {{ + 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, + }}, + {{ + 0,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 33, 12, 0, 0, 0, 1, 0, 0, 0, 80,184,128, 1, 0, 0, 0, + }}, + {{ + 0, 0,224, 0, 0, 0, 1,128,255,255, 0, 0, 0,240, 0, 0, + }}, + {{ + 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255, 0,240, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0,128, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 31, 0, 0, 0, 0,224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0,128, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 0, 0, + }}, + {{ + 0, 0, 0,224, 0, 0, 0, 0,240,255, 1, 0, 0, 0, 0,112, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 0, 0, 0, 0, 0,128, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 7, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0,128, + }}, + {{ + 0, 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 0,224, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0,240,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,248,255,255, + }}, + {{ + 128,255, 7, 31, 0, 0,128,160, 36, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0,252,255,255,255, 7, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 3, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0,224, + }}, + {{ + 0, 0,255,255,240,255, 0, 0,128, 1, 8, 0,128,240, 32, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0,128, 3, 3, 3,227,128,128,255, 1, + }}, + {{ + 0, 0, 0,128,240,255, 0, 0, 0,248,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0,192, 0, 0, 0, 0,192,255,255,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255, + }}, + {{ + 0, 0, 0, 0,128, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255,255, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 32,155, 33, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 64, 24, 32, 32, 0, 0, 0,132,160, 3, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, + }}, + {{ + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 63, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255, + }}, + {{ + 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255,255, + }}, + {{ + 253,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; + +static const unsigned short nameprep_rfc3491_bidi_imap[] = { + 272, 400, 528, 656, 784, 912, 912, 912, + 912, 1040, 1168, 912, 912, 1296, 912, 1424, + 1552, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1808, 1680, 1680, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 1936, 1680, 1680, 1680, 1680, 2064, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 2192, + 912, 912, 912, 912, 912, 912, 912, 912, + 912, 912, 912, 912, 912, 912, 912, 2192, + 0, 0, 1, 1, 0, 2, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 5, 6, 4, 4, 7, 8, 9, + 0, 0, 0, 10, 11, 12, 13, 14, + 4, 4, 4, 4, 15, 4, 13, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 29, 30, 31, + 32, 33, 0, 0, 29, 34, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, + 39, 51, 41, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 60, + 61, 64, 65, 60, 66, 67, 68, 69, + 20, 70, 71, 0, 72, 73, 74, 0, + 75, 76, 77, 78, 79, 80, 81, 0, + 4, 82, 83, 0, 0, 4, 84, 85, + 4, 4, 86, 4, 4, 87, 4, 88, + 89, 4, 90, 4, 91, 92, 93, 13, + 92, 4, 94, 95, 0, 4, 4, 96, + 20, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 97, 1, 4, 4, 98, + 99, 100, 101, 102, 4, 103, 104, 105, + 106, 4, 4, 83, 4, 107, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 108, 4, 4, 88, + 109, 4, 110, 111, 4, 112, 113, 114, + 115, 0, 0, 116, 0, 0, 0, 0, + 117, 118, 119, 4, 120, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 121, 4, 122, 123, 0, 0, 0, + 0, 0, 0, 0, 124, 4, 4, 105, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 125, 126, 20, 4, 127, 20, 4, 128, + 129, 130, 4, 4, 13, 83, 0, 6, + 131, 4, 120, 132, 4, 98, 133, 134, + 4, 4, 4, 135, 4, 4, 111, 134, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 14, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 136, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 137, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 120, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 138, 4, 139, 0, 0, 0, 0, + 140, 141, 142, 29, 29, 143, 144, 29, + 29, 29, 29, 29, 29, 29, 29, 29, + 29, 145, 146, 29, 147, 29, 148, 149, + 0, 0, 0, 150, 29, 29, 29, 151, + 0, 1, 1, 152, 4, 134, 153, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 134, 154, 139, 0, 0, 0, 0, 0, + 4, 155, 156, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 14, + 4, 157, 4, 158, 159, 160, 111, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 161, 4, 162, 163, 164, 4, + 165, 166, 167, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 168, 4, 4, + 4, 4, 4, 4, 4, 4, 105, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 97, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 111, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 111, +}; + +static const struct { + unsigned char tbl[32]; +} nameprep_rfc3491_bidi_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 0, 2, 0, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + }}, + {{ + 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, + }}, + {{ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, + }}, + {{ + 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, + 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, + 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 0, + }}, + {{ + 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, + 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 0, 2, 0, 2, 2, + }}, + {{ + 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 0, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 2, 2, + }}, + {{ + 0, 2, 2, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, + }}, + {{ + 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 0, 2, 2, 2, 0, 2, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, + 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + }}, + {{ + 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 2, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, + }}, + {{ + 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, + 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, + }}, + {{ + 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, + 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, + }}, + {{ + 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, + 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + }}, + {{ + 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, + }}, + {{ + 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, + 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, + }}, + {{ + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, + }}, + {{ + 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, + }}, + {{ + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 0, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, + }}, + {{ + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, + 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, + }}, + {{ + 0, 0, 2, 0, 0, 2, 2, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, + }}, + {{ + 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, + 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, + }}, + {{ + 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, +}; + +static const unsigned char nameprep_rfc3491_bidi_data[] = { + idn_biditype_others, + idn_biditype_r_al, + idn_biditype_l, +}; + diff --git a/contrib/idn/idnkit-1.0-src/lib/normalizer.c b/contrib/idn/idnkit-1.0-src/lib/normalizer.c new file mode 100644 index 0000000000..6695e383b0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/normalizer.c @@ -0,0 +1,439 @@ +#ifndef lint +static char *rcsid = "$Id: normalizer.c,v 1.1 2003/06/04 00:26:05 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAX_LOCAL_SCHEME 3 + +#define INITIALIZED (scheme_hash != NULL) + +typedef struct { + char *name; + idn_normalizer_proc_t proc; +} normalize_scheme_t; + +struct idn_normalizer { + int nschemes; + int scheme_size; + normalize_scheme_t **schemes; + normalize_scheme_t *local_buf[MAX_LOCAL_SCHEME]; + int reference_count; +}; + +static idn__strhash_t scheme_hash; + +static idn__unicode_version_t vcur = NULL; +static idn__unicode_version_t v320 = NULL; +#define INIT_VERSION(version, var) \ + if (var == NULL) { \ + idn_result_t r = idn__unicode_create(version, &var); \ + if (r != idn_success) \ + return (r); \ + } + +static idn_result_t expand_schemes(idn_normalizer_t ctx); +static idn_result_t register_standard_normalizers(void); +static idn_result_t normalizer_formkc(const unsigned long *from, + unsigned long *to, size_t tolen); +static idn_result_t normalizer_formkc_v320(const unsigned long *from, + unsigned long *to, + size_t tolen); + +static struct standard_normalizer { + char *name; + idn_normalizer_proc_t proc; +} standard_normalizer[] = { + { "unicode-form-kc", normalizer_formkc }, + { "unicode-form-kc/3.2.0", normalizer_formkc_v320 }, + { "RFC3491", normalizer_formkc_v320 }, + { NULL, NULL }, +}; + +idn_result_t +idn_normalizer_initialize(void) { + idn__strhash_t hash; + idn_result_t r; + + TRACE(("idn_normalizer_initialize()\n")); + + if (scheme_hash != NULL) { + r = idn_success; /* already initialized */ + goto ret; + } + + if ((r = idn__strhash_create(&hash)) != idn_success) + goto ret; + scheme_hash = hash; + + /* Register standard normalizers */ + r = register_standard_normalizers(); +ret: + TRACE(("idn_normalizer_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_normalizer_create(idn_normalizer_t *ctxp) { + idn_normalizer_t ctx; + idn_result_t r; + + assert(ctxp != NULL); + TRACE(("idn_normalizer_create()\n")); + + if ((ctx = malloc(sizeof(struct idn_normalizer))) == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->nschemes = 0; + ctx->scheme_size = MAX_LOCAL_SCHEME; + ctx->schemes = ctx->local_buf; + ctx->reference_count = 1; + *ctxp = ctx; + + r = idn_success; +ret: + TRACE(("idn_normalizer_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_normalizer_destroy(idn_normalizer_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_normalizer_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + TRACE(("idn_normalizer_destroy(): the object is destroyed\n")); + if (ctx->schemes != ctx->local_buf) + free(ctx->schemes); + free(ctx); + } else { + TRACE(("idn_normalizer_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_normalizer_incrref(idn_normalizer_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_normalizer_incrref()\n")); + TRACE(("idn_normalizer_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_result_t +idn_normalizer_add(idn_normalizer_t ctx, const char *scheme_name) { + idn_result_t r; + void *v; + normalize_scheme_t *scheme; + + assert(ctx != NULL && scheme_name != NULL); + + TRACE(("idn_normalizer_add(scheme_name=%s)\n", scheme_name)); + + assert(INITIALIZED); + + if (idn__strhash_get(scheme_hash, scheme_name, &v) != idn_success) { + ERROR(("idn_normalizer_add(): invalid scheme \"%-.30s\"\n", + scheme_name)); + r = idn_invalid_name; + goto ret; + } + + scheme = v; + + assert(ctx->nschemes <= ctx->scheme_size); + + if (ctx->nschemes == ctx->scheme_size && + (r = expand_schemes(ctx)) != idn_success) { + goto ret; + } + + ctx->schemes[ctx->nschemes++] = scheme; + r = idn_success; +ret: + TRACE(("idn_normalizer_add(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_normalizer_addall(idn_normalizer_t ctx, const char **scheme_names, + int nschemes) { + idn_result_t r; + int i; + + assert(ctx != NULL && scheme_names != NULL); + + TRACE(("idn_normalizer_addall(nschemes=%d)\n", nschemes)); + + for (i = 0; i < nschemes; i++) { + r = idn_normalizer_add(ctx, (const char *)*scheme_names); + if (r != idn_success) + goto ret; + scheme_names++; + } + + r = idn_success; +ret: + TRACE(("idn_normalizer_addall(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_normalizer_normalize(idn_normalizer_t ctx, const unsigned long *from, + unsigned long *to, size_t tolen) { + idn_result_t r; + unsigned long *src, *dst; + unsigned long *buffers[2] = {NULL, NULL}; + size_t buflen[2] = {0, 0}; + size_t dstlen; + int idx; + int i; + + assert(scheme_hash != NULL); + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_normalizer_normalize(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), (int)tolen)); + + if (ctx->nschemes <= 0) { + if (tolen < idn_ucs4_strlen(from) + 1) { + r = idn_buffer_overflow; + goto ret; + } + idn_ucs4_strcpy(to, from); + r = idn_success; + goto ret; + } + + /* + * Normalize. + */ + src = (void *)from; + dstlen = idn_ucs4_strlen(from) + 1; + + i = 0; + while (i < ctx->nschemes) { + TRACE(("idn_normalizer_normalize(): normalize %s\n", + ctx->schemes[i]->name)); + + /* + * Choose destination area to restore the result of a mapping. + */ + if (i + 1 == ctx->nschemes) { + dst = to; + dstlen = tolen; + } else { + if (src == buffers[0]) + idx = 1; + else + idx = 0; + + if (buflen[idx] < dstlen) { + void *newbuf; + + newbuf = realloc(buffers[idx], + sizeof(long) * dstlen); + if (newbuf == NULL) { + r = idn_nomemory; + goto ret; + } + buffers[idx] = (unsigned long *)newbuf; + buflen[idx] = dstlen; + } + + dst = buffers[idx]; + dstlen = buflen[idx]; + } + + /* + * Perform i-th normalization scheme. + * If buffer size is not enough, we double it and try again. + */ + r = (ctx->schemes[i]->proc)(src, dst, dstlen); + if (r == idn_buffer_overflow && dst != to) { + dstlen *= 2; + continue; + } + if (r != idn_success) + goto ret; + + src = dst; + i++; + } + + r = idn_success; +ret: + free(buffers[0]); + free(buffers[1]); + if (r == idn_success) { + TRACE(("idn_normalizer_normalize(): success (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn_normalizer_normalize(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_normalizer_register(const char *scheme_name, idn_normalizer_proc_t proc) { + idn_result_t r; + normalize_scheme_t *scheme; + + assert(scheme_name != NULL && proc != NULL); + + TRACE(("idn_normalizer_register(scheme_name=%s)\n", scheme_name)); + + assert(INITIALIZED); + + scheme = malloc(sizeof(*scheme) + strlen(scheme_name) + 1); + if (scheme == NULL) { + r = idn_nomemory; + goto ret; + } + scheme->name = (char *)(scheme + 1); + (void)strcpy(scheme->name, scheme_name); + scheme->proc = proc; + + r = idn__strhash_put(scheme_hash, scheme_name, scheme); + if (r != idn_success) + goto ret; + + r = idn_success; +ret: + TRACE(("idn_normalizer_register(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +expand_schemes(idn_normalizer_t ctx) { + normalize_scheme_t **new_schemes; + int new_size = ctx->scheme_size * 2; + + if (ctx->schemes == ctx->local_buf) { + new_schemes = malloc(sizeof(normalize_scheme_t) * new_size); + } else { + new_schemes = realloc(ctx->schemes, + sizeof(normalize_scheme_t) * new_size); + } + if (new_schemes == NULL) + return (idn_nomemory); + + if (ctx->schemes == ctx->local_buf) + memcpy(new_schemes, ctx->local_buf, sizeof(ctx->local_buf)); + + ctx->schemes = new_schemes; + ctx->scheme_size = new_size; + + return (idn_success); +} + +static idn_result_t +register_standard_normalizers(void) { + int i; + int failed = 0; + + for (i = 0; standard_normalizer[i].name != NULL; i++) { + idn_result_t r; + r = idn_normalizer_register(standard_normalizer[i].name, + standard_normalizer[i].proc); + if (r != idn_success) { + WARNING(("idn_normalizer_initialize(): " + "failed to register \"%-.100s\"\n", + standard_normalizer[i].name)); + failed++; + } + } + if (failed > 0) + return (idn_failure); + else + return (idn_success); +} + +/* + * Unicode Normalization Forms -- latest version + */ + +static idn_result_t +normalizer_formkc(const unsigned long *from, unsigned long *to, size_t tolen) { + INIT_VERSION(NULL, vcur); + return (idn__unormalize_formkc(vcur, from, to, tolen)); +} + +/* + * Unicode Normalization Forms -- version 3.2.0 + */ + +static idn_result_t +normalizer_formkc_v320(const unsigned long *from, unsigned long *to, + size_t tolen) { + INIT_VERSION("3.2.0", v320); + return (idn__unormalize_formkc(v320, from, to, tolen)); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/punycode.c b/contrib/idn/idnkit-1.0-src/lib/punycode.c new file mode 100644 index 0000000000..292763d553 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/punycode.c @@ -0,0 +1,434 @@ +#ifndef lint +static char *rcsid = "$Id: punycode.c,v 1.1 2003/06/04 00:26:06 marka Exp $"; +#endif + +/* + * Copyright (c) 2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Although draft-ietf-idn-punycode-00.txt doesn't specify the ACE + * signature, we have to choose one. In order to prevent the converted + * name from beginning with a hyphen, we should choose a prefix rather + * than a suffix. + */ +#ifndef IDN_PUNYCODE_PREFIX +#define IDN_PUNYCODE_PREFIX "xn--" +#endif + +#define INVALID_UCS 0x80000000 +#define MAX_UCS 0x10FFFF + +/* + * As the draft states, it is possible that `delta' may overflow during + * the encoding. The upper bound of 'delta' is: + * <# of chars. of input string> + * + * <# of chars. of input string + 1> + * For this value not to be greater than 0xffffffff (since the calculation + * is done using unsigned long, which is at least 32bit long), the maxmum + * input string size is about 3850 characters, which is long enough for + * a domain label... + */ +#define PUNYCODE_MAXINPUT 3800 + +/* + * Parameters. + */ +#define PUNYCODE_BASE 36 +#define PUNYCODE_TMIN 1 +#define PUNYCODE_TMAX 26 +#define PUNYCODE_SKEW 38 +#define PUNYCODE_DAMP 700 +#define PUNYCODE_INITIAL_BIAS 72 +#define PUNYCODE_INITIAL_N 0x80 + +static int punycode_getwc(const char *s, size_t len, + int bias, unsigned long *vp); +static int punycode_putwc(char *s, size_t len, + unsigned long delta, int bias); +static int punycode_update_bias(unsigned long delta, + size_t npoints, int first); + +idn_result_t +idn__punycode_decode(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) { + unsigned long *to_org = to; + unsigned long c, idx; + size_t prefixlen = strlen(IDN_PUNYCODE_PREFIX); + size_t fromlen; + size_t uidx, fidx, ucslen; + int first, bias; + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn__punycode_decode(from=\"%s\", tolen=%d)\n", + idn__debug_xstring(from, 50), (int)tolen)); + + if (!idn__util_asciihaveaceprefix(from, IDN_PUNYCODE_PREFIX)) { + if (*from == '\0') { + r = idn_ucs4_utf8toucs4(from, to, tolen); + goto ret; + } + r = idn_invalid_encoding; + goto ret; + } + from += prefixlen; + fromlen = strlen(from); + + /* + * Find the last delimiter, and copy the characters + * before it verbatim. + */ + ucslen = 0; + for (fidx = fromlen; fidx > 0; fidx--) { + if (from[fidx - 1] == '-') { + if (tolen < fidx) { + r = idn_buffer_overflow; + goto ret; + } + for (uidx = 0; uidx < fidx - 1; uidx++) { + to[uidx] = from[uidx]; + } + ucslen = uidx; + break; + } + } + + first = 1; + bias = PUNYCODE_INITIAL_BIAS; + c = PUNYCODE_INITIAL_N; + idx = 0; + while (fidx < fromlen) { + int len; + unsigned long delta; + int i; + + len = punycode_getwc(from + fidx, fromlen - fidx, bias, &delta); + if (len == 0) { + r = idn_invalid_encoding; + goto ret; + } + fidx += len; + + bias = punycode_update_bias(delta, ucslen + 1, first); + first = 0; + idx += delta; + c += idx / (ucslen + 1); + uidx = idx % (ucslen + 1); + + /* Insert 'c' at uidx. */ + if (tolen-- <= 0) { + r = idn_buffer_overflow; + goto ret; + } + for (i = ucslen; i > uidx; i--) + to[i] = to[i - 1]; + to[uidx] = c; + + ucslen++; + idx = uidx + 1; + } + + /* Terminate with NUL. */ + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + to[ucslen] = '\0'; + r = idn_success; + +ret: + if (r == idn_success) { + TRACE(("idn__punycode_decode(): succcess (to=\"%s\")\n", + idn__debug_ucs4xstring(to_org, 50))); + } else { + TRACE(("idn__punycode_decode(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn__punycode_encode(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen) { + char *to_org = to; + unsigned long cur_code, next_code, delta; + size_t prefixlen = strlen(IDN_PUNYCODE_PREFIX); + size_t fromlen; + size_t ucsdone; + size_t toidx; + int uidx, bias, first; + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn__punycode_encode(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), (int)tolen)); + + if (*from == '\0') { + r = idn_ucs4_ucs4toutf8(from, to, tolen); + goto ret; + } else if (idn__util_ucs4haveaceprefix(from, IDN_PUNYCODE_PREFIX)) { + r = idn_prohibited; + goto ret; + } + + if (tolen < prefixlen) { + r = idn_buffer_overflow; + goto ret; + } + memcpy(to, IDN_PUNYCODE_PREFIX, prefixlen); + to += prefixlen; + tolen -= prefixlen; + + fromlen = idn_ucs4_strlen(from); + + /* + * If the input string is too long (actually too long to be sane), + * return failure in order to prevent possible overflow. + */ + if (fromlen > PUNYCODE_MAXINPUT) { + ERROR(("idn__punycode_encode(): " + "the input string is too long to convert Punycode\n", + idn__debug_ucs4xstring(from, 50))); + r = idn_failure; + goto ret; + } + + ucsdone = 0; /* number of characters processed */ + toidx = 0; + + /* + * First, pick up basic code points and copy them to 'to'. + */ + for (uidx = 0; uidx < fromlen; uidx++) { + if (from[uidx] < 0x80) { + if (toidx >= tolen) { + r = idn_buffer_overflow; + goto ret; + } + to[toidx++] = from[uidx]; + ucsdone++; + } + } + + /* + * If there are any basic code points, output a delimiter + * (hyphen-minus). + */ + if (toidx > 0) { + if (toidx >= tolen) { + r = idn_buffer_overflow; + goto ret; + } + to[toidx++] = '-'; + to += toidx; + tolen -= toidx; + } + + /* + * Then encode non-basic characters. + */ + first = 1; + cur_code = PUNYCODE_INITIAL_N; + bias = PUNYCODE_INITIAL_BIAS; + delta = 0; + while (ucsdone < fromlen) { + int limit = -1, rest; + + /* + * Find the smallest code point equal to or greater + * than 'cur_code'. Also remember the index of the + * last occurence of the code point. + */ + for (next_code = MAX_UCS, uidx = fromlen - 1; + uidx >= 0; uidx--) { + if (from[uidx] >= cur_code && from[uidx] < next_code) { + next_code = from[uidx]; + limit = uidx; + } + } + /* There must be such code point. */ + assert(limit >= 0); + + delta += (next_code - cur_code) * (ucsdone + 1); + cur_code = next_code; + + /* + * Scan the input string again, and encode characters + * whose code point is 'cur_code'. Use 'limit' to avoid + * unnecessary scan. + */ + for (uidx = 0, rest = ucsdone; uidx <= limit; uidx++) { + if (from[uidx] < cur_code) { + delta++; + rest--; + } else if (from[uidx] == cur_code) { + int sz = punycode_putwc(to, tolen, delta, bias); + if (sz == 0) { + r = idn_buffer_overflow; + goto ret; + } + to += sz; + tolen -= sz; + ucsdone++; + bias = punycode_update_bias(delta, ucsdone, + first); + delta = 0; + first = 0; + } + } + delta += rest + 1; + cur_code++; + } + + /* + * Terminate with NUL. + */ + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + +ret: + if (r == idn_success) { + TRACE(("idn__punycode_encode(): succcess (to=\"%s\")\n", + idn__debug_xstring(to_org, 50))); + } else { + TRACE(("idn__punycode_encode(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +static int +punycode_getwc(const char *s, size_t len, int bias, unsigned long *vp) { + size_t orglen = len; + unsigned long v = 0, w = 1; + int k; + + for (k = PUNYCODE_BASE - bias; len > 0; k += PUNYCODE_BASE) { + int c = *s++; + int t = (k < PUNYCODE_TMIN) ? PUNYCODE_TMIN : + (k > PUNYCODE_TMAX) ? PUNYCODE_TMAX : k; + + len--; + if ('a' <= c && c <= 'z') + c = c - 'a'; + else if ('A' <= c && c <= 'Z') + c = c - 'A'; + else if ('0' <= c && c <= '9') + c = c - '0' + 26; + else + c = -1; + + if (c < 0) + return (0); /* invalid character */ + + v += c * w; + + if (c < t) { + *vp = v; + return (orglen - len); + } + + w *= (PUNYCODE_BASE - t); + } + + return (0); /* final character missing */ +} + +static int +punycode_putwc(char *s, size_t len, unsigned long delta, int bias) { + const char *punycode_base36 = "abcdefghijklmnopqrstuvwxyz0123456789"; + int k; + char *sorg = s; + + for (k = PUNYCODE_BASE - bias; 1; k += PUNYCODE_BASE) { + int t = (k < PUNYCODE_TMIN) ? PUNYCODE_TMIN : + (k > PUNYCODE_TMAX) ? PUNYCODE_TMAX : k; + + if (delta < t) + break; + if (len < 1) + return (0); + *s++ = punycode_base36[t + ((delta - t) % (PUNYCODE_BASE - t))]; + len--; + delta = (delta - t) / (PUNYCODE_BASE - t); + } + if (len < 1) + return (0); + *s++ = punycode_base36[delta]; + return (s - sorg); +} + +static int +punycode_update_bias(unsigned long delta, size_t npoints, int first) { + int k = 0; + + delta /= first ? PUNYCODE_DAMP : 2; + delta += delta / npoints; + + while (delta > ((PUNYCODE_BASE - PUNYCODE_TMIN) * PUNYCODE_TMAX) / 2) { + delta /= PUNYCODE_BASE - PUNYCODE_TMIN; + k++; + } + return (PUNYCODE_BASE * k + + (((PUNYCODE_BASE - PUNYCODE_TMIN + 1) * delta) / + (delta + PUNYCODE_SKEW))); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/race.c b/contrib/idn/idnkit-1.0-src/lib/race.c new file mode 100644 index 0000000000..44c2101d94 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/race.c @@ -0,0 +1,427 @@ +#ifndef lint +static char *rcsid = "$Id: race.c,v 1.1 2003/06/04 00:26:07 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef IDN_RACE_PREFIX +#define IDN_RACE_PREFIX "bq--" +#endif +#define RACE_2OCTET_MODE 0xd8 +#define RACE_ESCAPE 0xff +#define RACE_ESCAPE_2ND 0x99 + +#define RACE_BUF_SIZE 128 /* more than enough */ + +/* + * Unicode surrogate pair. + */ +#define IS_SURROGATE_HIGH(v) (0xd800 <= (v) && (v) <= 0xdbff) +#define IS_SURROGATE_LOW(v) (0xdc00 <= (v) && (v) <= 0xdfff) +#define SURROGATE_HIGH(v) (SURROGATE_H_OFF + (((v) - 0x10000) >> 10)) +#define SURROGATE_LOW(v) (SURROGATE_L_OFF + ((v) & 0x3ff)) +#define SURROGATE_BASE 0x10000 +#define SURROGATE_H_OFF 0xd800 +#define SURROGATE_L_OFF 0xdc00 +#define COMBINE_SURROGATE(h, l) \ + (SURROGATE_BASE + (((h)-SURROGATE_H_OFF)<<10) + ((l)-SURROGATE_L_OFF)) + +/* + * Compression type. + */ +enum { + compress_one, /* all characters are in a single row */ + compress_two, /* row 0 and another row */ + compress_none /* nope */ +}; + +static idn_result_t race_decode_decompress(const char *from, + unsigned short *buf, + size_t buflen); +static idn_result_t race_compress_encode(const unsigned short *p, + int compress_mode, + char *to, size_t tolen); +static int get_compress_mode(unsigned short *p); + +idn_result_t +idn__race_decode(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) { + unsigned short *buf = NULL; + size_t prefixlen = strlen(IDN_RACE_PREFIX); + size_t fromlen; + size_t buflen; + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn__race_decode(from=\"%s\", tolen=%d)\n", + idn__debug_xstring(from, 50), (int)tolen)); + + if (!idn__util_asciihaveaceprefix(from, IDN_RACE_PREFIX)) { + if (*from == '\0') { + r = idn_ucs4_utf8toucs4(from, to, tolen); + goto ret; + } + r = idn_invalid_encoding; + goto ret; + } + from += prefixlen; + fromlen = strlen(from); + + /* + * Allocate sufficient buffer. + */ + buflen = fromlen + 1; + buf = malloc(sizeof(*buf) * buflen); + if (buf == NULL) { + r = idn_nomemory; + goto ret; + } + + /* + * Decode base32 and decompress. + */ + r = race_decode_decompress(from, buf, buflen); + if (r != idn_success) + goto ret; + + /* + * Now 'buf' points the decompressed string, which must contain + * UTF-16 characters. + */ + + /* + * Convert to UCS4. + */ + r = idn_ucs4_utf16toucs4(buf, to, tolen); + if (r != idn_success) + goto ret; + +ret: + free(buf); + if (r == idn_success) { + TRACE(("idn__race_decode(): succcess (to=\"%s\")\n", + idn__debug_ucs4xstring(to, 50))); + } else { + TRACE(("idn__race_decode(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +static idn_result_t +race_decode_decompress(const char *from, unsigned short *buf, size_t buflen) +{ + unsigned short *p = buf; + unsigned int bitbuf = 0; + int bitlen = 0; + int i, j; + size_t len; + + while (*from != '\0') { + int c = *from++; + int x; + + if ('a' <= c && c <= 'z') + x = c - 'a'; + else if ('A' <= c && c <= 'Z') + x = c - 'A'; + else if ('2' <= c && c <= '7') + x = c - '2' + 26; + else + return (idn_invalid_encoding); + + bitbuf = (bitbuf << 5) + x; + bitlen += 5; + if (bitlen >= 8) { + *p++ = (bitbuf >> (bitlen - 8)) & 0xff; + bitlen -= 8; + } + } + len = p - buf; + + /* + * Now 'buf' holds the decoded string. + */ + + /* + * Decompress. + */ + if (buf[0] == RACE_2OCTET_MODE) { + if ((len - 1) % 2 != 0) + return (idn_invalid_encoding); + for (i = 1, j = 0; i < len; i += 2, j++) + buf[j] = (buf[i] << 8) + buf[i + 1]; + len = j; + } else { + unsigned short c = buf[0] << 8; /* higher octet */ + + for (i = 1, j = 0; i < len; j++) { + if (buf[i] == RACE_ESCAPE) { + if (i + 1 >= len) + return (idn_invalid_encoding); + else if (buf[i + 1] == RACE_ESCAPE_2ND) + buf[j] = c | 0xff; + else + buf[j] = buf[i + 1]; + i += 2; + + } else if (buf[i] == 0x99 && c == 0x00) { + /* + * The RACE specification says this is error. + */ + return (idn_invalid_encoding); + + } else { + buf[j] = c | buf[i++]; + } + } + len = j; + } + buf[len] = '\0'; + + return (idn_success); +} + +idn_result_t +idn__race_encode(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen) { + char *to_org = to; + unsigned short *p, *buf = NULL; + size_t prefixlen = strlen(IDN_RACE_PREFIX); + size_t buflen; + size_t fromlen; + idn_result_t r; + int compress_mode; + + assert(ctx != NULL); + + TRACE(("idn__race_encode(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), (int)tolen)); + + if (*from == '\0') { + r = idn_ucs4_ucs4toutf8(from, to, tolen); + goto ret; + } else if (idn__util_ucs4haveaceprefix(from, IDN_RACE_PREFIX)) { + r = idn_prohibited; + goto ret; + } + + if (tolen < prefixlen) { + r = idn_buffer_overflow; + goto ret; + } + memcpy(to, IDN_RACE_PREFIX, prefixlen); + to += prefixlen; + tolen -= prefixlen; + + fromlen = idn_ucs4_strlen(from); + buflen = fromlen * 2 + 2; + + /* + * Convert to UTF-16. + * Preserve space for a character at the top of the buffer. + */ + for (;;) { + unsigned short *new_buf; + + new_buf = realloc(buf, sizeof(*buf) * buflen); + if (new_buf == NULL) { + r = idn_nomemory; + goto ret; + } + buf = new_buf; + + r = idn_ucs4_ucs4toutf16(from, buf + 1, buflen - 1); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buflen = fromlen * 2 + 2; + } + p = buf + 1; + + /* + * Now 'p' contains UTF-16 encoded string. + */ + + /* + * Check U+0099. + * RACE doesn't permit U+0099 in an input string. + */ + for (p = buf + 1; *p != '\0'; p++) { + if (*p == 0x0099) { + r = idn_invalid_encoding; + goto ret; + } + } + + /* + * Compress, encode in base-32 and output. + */ + compress_mode = get_compress_mode(buf + 1); + r = race_compress_encode(buf, compress_mode, to, tolen); + +ret: + free(buf); + if (r == idn_success) { + TRACE(("idn__race_encode(): succcess (to=\"%s\")\n", + idn__debug_xstring(to_org, 50))); + } else { + TRACE(("idn__race_encode(): %s\n", idn_result_tostring(r))); + } + return (r); +} + +static idn_result_t +race_compress_encode(const unsigned short *p, int compress_mode, + char *to, size_t tolen) +{ + unsigned long bitbuf = *p++; /* bit stream buffer */ + int bitlen = 8; /* # of bits in 'bitbuf' */ + + while (*p != '\0' || bitlen > 0) { + unsigned int c = *p; + + if (c == '\0') { + /* End of data. Flush. */ + bitbuf <<= (5 - bitlen); + bitlen = 5; + } else if (compress_mode == compress_none) { + /* Push 16 bit data. */ + bitbuf = (bitbuf << 16) | c; + bitlen += 16; + p++; + } else {/* compress_mode == compress_one/compress_two */ + /* Push 8 or 16 bit data. */ + if (compress_mode == compress_two && + (c & 0xff00) == 0) { + /* Upper octet is zero (and not U1). */ + bitbuf = (bitbuf << 16) | 0xff00 | c; + bitlen += 16; + } else if ((c & 0xff) == 0xff) { + /* Lower octet is 0xff. */ + bitbuf = (bitbuf << 16) | + (RACE_ESCAPE << 8) | RACE_ESCAPE_2ND; + bitlen += 16; + } else { + /* Just output lower octet. */ + bitbuf = (bitbuf << 8) | (c & 0xff); + bitlen += 8; + } + p++; + } + + /* + * Output bits in 'bitbuf' in 5-bit unit. + */ + while (bitlen >= 5) { + int x; + + /* Get top 5 bits. */ + x = (bitbuf >> (bitlen - 5)) & 0x1f; + bitlen -= 5; + + /* Encode. */ + if (x < 26) + x += 'a'; + else + x = (x - 26) + '2'; + + if (tolen < 1) + return (idn_buffer_overflow); + + *to++ = x; + tolen--; + } + } + + if (tolen <= 0) + return (idn_buffer_overflow); + + *to = '\0'; + return (idn_success); +} + +static int +get_compress_mode(unsigned short *p) { + int zero = 0; + unsigned int upper = 0; + unsigned short *modepos = p - 1; + + while (*p != '\0') { + unsigned int hi = *p++ & 0xff00; + + if (hi == 0) { + zero++; + } else if (hi == upper) { + ; + } else if (upper == 0) { + upper = hi; + } else { + *modepos = RACE_2OCTET_MODE; + return (compress_none); + } + } + *modepos = upper >> 8; + if (upper > 0 && zero > 0) + return (compress_two); + else + return (compress_one); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/res.c b/contrib/idn/idnkit-1.0-src/lib/res.c new file mode 100644 index 0000000000..a3024d3239 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/res.c @@ -0,0 +1,1726 @@ +#ifndef lint +static char *rcsid = "$Id: res.c,v 1.1 2003/06/04 00:26:10 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef IDN_UTF8_ENCODING_NAME +#define IDN_UTF8_ENCODING_NAME "UTF-8" /* by IANA */ +#endif + +#ifndef WITHOUT_ICONV +#define ENCODE_MASK \ + (IDN_LOCALCONV | IDN_DELIMMAP | IDN_LOCALMAP | IDN_MAP | \ + IDN_NORMALIZE | IDN_PROHCHECK | IDN_UNASCHECK | IDN_BIDICHECK | \ + IDN_ASCCHECK | IDN_IDNCONV | IDN_LENCHECK | IDN_ENCODE_QUERY | \ + IDN_UNDOIFERR) +#define DECODE_MASK \ + (IDN_DELIMMAP | IDN_MAP | IDN_NORMALIZE | IDN_PROHCHECK | \ + IDN_UNASCHECK | IDN_BIDICHECK | IDN_IDNCONV | IDN_ASCCHECK | \ + IDN_RTCHECK | IDN_LOCALCONV | IDN_DECODE_QUERY) +#else +#define ENCODE_MASK \ + (IDN_DELIMMAP | IDN_LOCALMAP | IDN_MAP | IDN_NORMALIZE | \ + IDN_PROHCHECK | IDN_UNASCHECK | IDN_BIDICHECK | IDN_ASCCHECK | \ + IDN_IDNCONV | IDN_LENCHECK | IDN_ENCODE_QUERY | IDN_UNDOIFERR) +#define DECODE_MASK \ + (IDN_DELIMMAP | IDN_MAP | IDN_NORMALIZE | IDN_PROHCHECK | \ + IDN_UNASCHECK | IDN_BIDICHECK | IDN_IDNCONV | IDN_ASCCHECK | \ + IDN_RTCHECK | IDN_DECODE_QUERY) +#endif + +#define MAX_LABEL_LENGTH 63 + +/* + * label to convert. + */ +typedef struct labellist * labellist_t; +struct labellist { + unsigned long *name; + size_t name_length; + unsigned long *undo_name; + labellist_t next; + labellist_t previous; + int dot_followed; +}; + +typedef idn_result_t (*res_insnproc_t)(idn_resconf_t ctx, + labellist_t label); + +static void idn_res_initialize(void); +static idn_result_t copy_verbatim(const char *from, char *to, + size_t tolen); +static idn_result_t labellist_create(const unsigned long *name, + labellist_t *labelp); +static void labellist_destroy(labellist_t label); +static idn_result_t labellist_setname(labellist_t label, + const unsigned long *name); +static const unsigned long * + labellist_getname(labellist_t label); +static const unsigned long * + labellist_gettldname(labellist_t label); +static idn_result_t labellist_getnamelist(labellist_t label, + unsigned long *name, + size_t label_length); +static void labellist_undo(labellist_t label); +static labellist_t labellist_tail(labellist_t label); +static labellist_t labellist_previous(labellist_t label); + +#ifndef WITHOUT_ICONV +static idn_result_t label_localdecodecheck(idn_resconf_t ctx, + labellist_t label); +#endif +static idn_result_t label_idnencode_ace(idn_resconf_t ctx, + labellist_t label); +static idn_result_t label_idndecode(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_localmap(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_map(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_normalize(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_prohcheck(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_unascheck(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_bidicheck(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_asccheck(idn_resconf_t ctx, labellist_t label); +static idn_result_t label_lencheck_ace(idn_resconf_t ctx, + labellist_t label); +static idn_result_t label_lencheck_nonace(idn_resconf_t ctx, + labellist_t label); +static idn_result_t label_rtcheck(idn_resconf_t ctx, idn_action_t actions, + labellist_t label, + const unsigned long *original_name); + +static int initialized; +static int enabled; + +void +idn_res_enable(int on_off) { + if (!initialized) { + idn_res_initialize(); + } + + if (on_off == 0) { + enabled = 0; + } else { + enabled = 1; + } +} + +static void +idn_res_initialize(void) { + if (!initialized) { + char *value = getenv("IDN_DISABLE"); + + if (value == NULL) { + enabled = 1; + } else { + enabled = 0; + } + initialized = 1; + } +} + +idn_result_t +idn_res_encodename(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen) { + idn_converter_t local_converter = NULL; + idn_converter_t idn_converter = NULL; + idn_delimitermap_t delimiter_mapper; + idn_result_t r; + labellist_t labels = NULL, l; + unsigned long *buffer = NULL; + size_t buffer_length; + int from_is_root; + int idn_is_ace; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_res_encodename(actions=%s, from=\"%s\", tolen=%d)\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen)); + + if (actions & ~ENCODE_MASK) { + WARNING(("idn_res_encodename: invalid actions 0x%x\n", + actions)); + r = idn_invalid_action; + goto ret; + } + + if (!initialized) + idn_res_initialize(); + if (!enabled || actions == 0) { + r = copy_verbatim(from, to, tolen); + goto ret; + } else if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + + if (actions & IDN_ENCODE_QUERY) { +#ifndef WITHOUT_ICONV + actions |= (IDN_LOCALCONV | IDN_DELIMMAP | IDN_LOCALMAP | \ + IDN_MAP | IDN_NORMALIZE | IDN_PROHCHECK | \ + IDN_BIDICHECK | IDN_IDNCONV | IDN_LENCHECK); +#else + actions |= (IDN_DELIMMAP | IDN_LOCALMAP | IDN_MAP | \ + IDN_NORMALIZE | IDN_PROHCHECK | IDN_BIDICHECK | \ + IDN_IDNCONV | IDN_LENCHECK); +#endif + } + + /* + * Convert `from' to UCS4. + */ + local_converter = idn_resconf_getlocalconverter(ctx); +#ifndef WITHOUT_ICONV + if (local_converter == NULL) { + r = idn_invalid_name; + goto ret; + } +#endif + + idn_converter = idn_resconf_getidnconverter(ctx); + if (idn_converter != NULL && + idn_converter_isasciicompatible(idn_converter)) + idn_is_ace = 1; + else + idn_is_ace = 0; + + buffer_length = tolen * 2; + + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer, sizeof(*buffer) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer = (unsigned long *)new_buffer; + + if (actions & IDN_LOCALCONV) { + r = idn_converter_convtoucs4(local_converter, from, + buffer, buffer_length); + } else { + r = idn_ucs4_utf8toucs4(from, buffer, buffer_length); + } + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if (*buffer == '\0') { + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + goto ret; + } + + /* + * Delimiter map. + */ + if (actions & IDN_DELIMMAP) { + TRACE(("res delimitermap(name=\"%s\")\n", + idn__debug_ucs4xstring(buffer, 50))); + + delimiter_mapper = idn_resconf_getdelimitermap(ctx); + if (delimiter_mapper != NULL) { + r = idn_delimitermap_map(delimiter_mapper, buffer, + buffer, buffer_length); + idn_delimitermap_destroy(delimiter_mapper); + if (r != idn_success) + goto ret; + } + TRACE(("res delimitermap(): success (name=\"%s\")\n", + idn__debug_ucs4xstring(buffer, 50))); + } + + from_is_root = (buffer[0] == '.' && buffer[1] == '\0'); + + /* + * Split the name into a list of labels. + */ + r = labellist_create(buffer, &labels); + if (r != idn_success) + goto ret; + + /* + * Perform conversions and tests. + */ + for (l = labellist_tail(labels); l != NULL; + l = labellist_previous(l)) { + + if (!idn__util_ucs4isasciirange(labellist_getname(l))) { + if (actions & IDN_LOCALMAP) { + r = label_localmap(ctx, l); + if (r != idn_success) + goto ret; + } + } + + if (!idn__util_ucs4isasciirange(labellist_getname(l))) { + if (actions & IDN_MAP) { + r = label_map(ctx, l); + if (r != idn_success) + goto ret; + } + if (actions & IDN_NORMALIZE) { + r = label_normalize(ctx, l); + if (r != idn_success) + goto ret; + } + if (actions & IDN_PROHCHECK) { + r = label_prohcheck(ctx, l); + if (r == idn_prohibited && + (actions & IDN_UNDOIFERR)) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + if (actions & IDN_UNASCHECK) { + r = label_unascheck(ctx, l); + if (r == idn_prohibited && + (actions & IDN_UNDOIFERR)) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + if (actions & IDN_BIDICHECK) { + r = label_bidicheck(ctx, l); + if (r == idn_prohibited && + (actions & IDN_UNDOIFERR)) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + } + + if (actions & IDN_ASCCHECK) { + r = label_asccheck(ctx, l); + if (r == idn_prohibited && (actions & IDN_UNDOIFERR)) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + + if (!idn__util_ucs4isasciirange(labellist_getname(l))) { + if ((actions & IDN_IDNCONV) && idn_is_ace) { + r = label_idnencode_ace(ctx, l); + if (r != idn_success) + goto ret; + } + } + + if (!from_is_root && (actions & IDN_LENCHECK)) { + if (idn_is_ace) + r = label_lencheck_ace(ctx, l); + else + r = label_lencheck_nonace(ctx, l); + if (r == idn_invalid_length && + (actions & IDN_UNDOIFERR)) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + } + + /* + * Concat a list of labels to a name. + */ + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer, sizeof(*buffer) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer = (unsigned long *)new_buffer; + + r = labellist_getnamelist(labels, buffer, buffer_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if ((actions & IDN_IDNCONV) && idn_converter != NULL && !idn_is_ace) { + r = idn_converter_convfromucs4(idn_converter, buffer, to, + tolen); + } else { + r = idn_ucs4_ucs4toutf8(buffer, to, tolen); + } + +ret: + if (r == idn_success) { + TRACE(("idn_res_encodename(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_res_encodename(): %s\n", idn_result_tostring(r))); + } + free(buffer); + if (local_converter != NULL) + idn_converter_destroy(local_converter); + if (idn_converter != NULL) + idn_converter_destroy(idn_converter); + if (labels != NULL) + labellist_destroy(labels); + return (r); +} + +idn_result_t +idn_res_decodename(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen) { + idn_converter_t local_converter = NULL; + idn_converter_t idn_converter = NULL; + idn_delimitermap_t delimiter_mapper; + idn_result_t r; + labellist_t labels = NULL, l; + unsigned long *buffer = NULL; + unsigned long *saved_name = NULL; + size_t buffer_length; + int idn_is_ace; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_res_decodename(actions=%s, from=\"%s\", tolen=%d)\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen)); + + if (actions & ~DECODE_MASK) { + WARNING(("idn_res_decodename: invalid actions 0x%x\n", + actions)); + r = idn_invalid_action; + goto ret; + } + + if (!initialized) + idn_res_initialize(); + if (!enabled || actions == 0) { + r = copy_verbatim(from, to, tolen); + goto ret; + } else if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + + if (actions & IDN_DECODE_QUERY) { +#ifndef WITHOUT_ICONV + actions |= (IDN_DELIMMAP | IDN_MAP | IDN_NORMALIZE | \ + IDN_PROHCHECK | IDN_BIDICHECK | IDN_IDNCONV | \ + IDN_RTCHECK | IDN_LOCALCONV); +#else + actions |= (IDN_DELIMMAP | IDN_MAP | IDN_NORMALIZE | \ + IDN_PROHCHECK | IDN_BIDICHECK | IDN_IDNCONV | \ + IDN_RTCHECK); +#endif + } + + /* + * Convert `from' to UCS4. + */ + local_converter = idn_resconf_getlocalconverter(ctx); +#ifndef WITHOUT_ICONV + if (local_converter == NULL) { + r = idn_invalid_name; + goto ret; + } +#endif + + idn_converter = idn_resconf_getidnconverter(ctx); + if (idn_converter != NULL && + idn_converter_isasciicompatible(idn_converter)) + idn_is_ace = 1; + else + idn_is_ace = 0; + + buffer_length = tolen * 2; + + TRACE(("res idndecode(name=\"%s\")\n", idn__debug_xstring(from, 50))); + + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer, sizeof(*buffer) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer = (unsigned long *)new_buffer; + + if ((actions & IDN_IDNCONV) && + idn_converter != NULL && !idn_is_ace) { + r = idn_converter_convtoucs4(idn_converter, from, + buffer, buffer_length); + } else { + r = idn_ucs4_utf8toucs4(from, buffer, buffer_length); + } + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if (*buffer == '\0') { + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + goto ret; + } + + /* + * Delimiter map. + */ + if (actions & IDN_DELIMMAP) { + TRACE(("res delimitermap(name=\"%s\")\n", + idn__debug_ucs4xstring(buffer, 50))); + + delimiter_mapper = idn_resconf_getdelimitermap(ctx); + if (delimiter_mapper != NULL) { + r = idn_delimitermap_map(delimiter_mapper, buffer, + buffer, buffer_length); + idn_delimitermap_destroy(delimiter_mapper); + if (r != idn_success) + goto ret; + } + TRACE(("res delimitermap(): success (name=\"%s\")\n", + idn__debug_ucs4xstring(buffer, 50))); + } + + /* + * Split the name into a list of labels. + */ + r = labellist_create(buffer, &labels); + if (r != idn_success) + goto ret; + + /* + * Perform conversions and tests. + */ + for (l = labellist_tail(labels); l != NULL; + l = labellist_previous(l)) { + + free(saved_name); + saved_name = NULL; + + if (!idn__util_ucs4isasciirange(labellist_getname(l))) { + if (actions & IDN_MAP) { + r = label_map(ctx, l); + if (r != idn_success) + goto ret; + } + if (actions & IDN_NORMALIZE) { + r = label_normalize(ctx, l); + if (r != idn_success) + goto ret; + } + if (actions & IDN_PROHCHECK) { + r = label_prohcheck(ctx, l); + if (r == idn_prohibited) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + if (actions & IDN_UNASCHECK) { + r = label_unascheck(ctx, l); + if (r == idn_prohibited) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + if (actions & IDN_BIDICHECK) { + r = label_bidicheck(ctx, l); + if (r == idn_prohibited) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + } + + if ((actions & IDN_IDNCONV) && idn_is_ace) { + saved_name = idn_ucs4_strdup(labellist_getname(l)); + if (saved_name == NULL) { + r = idn_nomemory; + goto ret; + } + r = label_idndecode(ctx, l); + if (r == idn_invalid_encoding) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + if ((actions & IDN_RTCHECK) && saved_name != NULL) { + r = label_rtcheck(ctx, actions, l, saved_name); + if (r == idn_invalid_encoding) { + labellist_undo(l); + continue; + } else if (r != idn_success) { + goto ret; + } + } + +#ifndef WITHOUT_ICONV + if (actions & IDN_LOCALCONV) { + r = label_localdecodecheck(ctx, l); + if (r != idn_success) + goto ret; + } +#endif + } + + /* + * Concat a list of labels to a name. + */ + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer, sizeof(*buffer) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer = (unsigned long *)new_buffer; + + r = labellist_getnamelist(labels, buffer, buffer_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if (actions & IDN_LOCALCONV) { + r = idn_converter_convfromucs4(local_converter, buffer, to, + tolen); + } else { + r = idn_ucs4_ucs4toutf8(buffer, to, tolen); + } + +ret: + if (r == idn_success) { + TRACE(("idn_res_decodename(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_res_decodename(): %s\n", idn_result_tostring(r))); + } + free(saved_name); + free(buffer); + if (local_converter != NULL) + idn_converter_destroy(local_converter); + if (idn_converter != NULL) + idn_converter_destroy(idn_converter); + if (labels != NULL) + labellist_destroy(labels); + return (r); +} + +idn_result_t +idn_res_decodename2(idn_resconf_t ctx, idn_action_t actions, const char *from, + char *to, size_t tolen, const char *auxencoding) { +#ifdef WITHOUT_ICONV + return idn_failure; + +#else /* WITHOUT_ICONV */ + idn_result_t r; + idn_converter_t aux_converter = NULL; + unsigned long *buffer_ucs4 = NULL; + char *buffer_utf8 = NULL; + size_t buffer_length; + + assert(ctx != NULL && from != NULL && to != NULL); + + TRACE(("idn_res_decodename2(actions=%s, from=\"%s\", tolen=%d, " + "auxencoding=\"%s\")\n", + idn__res_actionstostring(actions), + idn__debug_xstring(from, 50), (int)tolen, + (auxencoding != NULL) ? auxencoding : "")); + + if (!initialized) + idn_res_initialize(); + if (!enabled || actions == 0) { + r = copy_verbatim(from, to, tolen); + goto ret; + } else if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + + if (auxencoding == NULL || + strcmp(auxencoding, IDN_UTF8_ENCODING_NAME) == 0 || + strcmp(auxencoding, "UTF-8") == 0) { + return idn_res_decodename(ctx, actions, from, to, tolen); + } + + /* + * Convert `from' to UCS4. + */ + r = idn_resconf_setauxidnconvertername(ctx, auxencoding, + IDN_CONVERTER_DELAYEDOPEN); + if (r != idn_success) { + goto ret; + } + + aux_converter = idn_resconf_getauxidnconverter(ctx); + if (aux_converter == NULL) { + r = idn_failure; + goto ret; + } + + buffer_length = tolen * 2; + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer_ucs4, + sizeof(*buffer_ucs4) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer_ucs4 = (unsigned long *)new_buffer; + + r = idn_converter_convtoucs4(aux_converter, from, + buffer_ucs4, + buffer_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if (*buffer_ucs4 == '\0') { + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + goto ret; + } + + /* + * Convert `buffer_ucs4' to UTF-8. + */ + buffer_length = tolen * 2; + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer_utf8, + sizeof(*buffer_utf8) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer_utf8 = (char *)new_buffer; + r = idn_ucs4_ucs4toutf8(buffer_ucs4, buffer_utf8, + buffer_length); + + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + if (*buffer_utf8 == '\0') { + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + r = idn_success; + goto ret; + } + + r = idn_res_decodename(ctx, actions, buffer_utf8, to, tolen); + +ret: + if (r == idn_success) { + TRACE(("idn_res_decodename2(): success (to=\"%s\")\n", + idn__debug_xstring(to, 50))); + } else { + TRACE(("idn_res_decodename2(): %s\n", idn_result_tostring(r))); + } + free(buffer_ucs4); + free(buffer_utf8); + if (aux_converter != NULL) + idn_converter_destroy(aux_converter); + + return (r); + +#endif /* WITHOUT_ICONV */ +} + +static idn_result_t +copy_verbatim(const char *from, char *to, size_t tolen) { + size_t fromlen = strlen(from); + + if (fromlen + 1 > tolen) + return (idn_buffer_overflow); + (void)memcpy(to, from, fromlen + 1); + return (idn_success); +} + +static idn_result_t +labellist_create(const unsigned long *name, labellist_t *labelp) { + size_t length, malloc_length; + labellist_t head_label = NULL; + labellist_t tail_label = NULL; + labellist_t new_label = NULL; + const unsigned long *endp = NULL; + idn_result_t r; + + while (*name != '\0') { + for (endp = name; *endp != '.' && *endp != '\0'; endp++) + ; /* nothing to be done */ + length = (endp - name) + 1; + malloc_length = length + 15; /* add 15 for margin */ + + new_label = (labellist_t) + malloc(sizeof(struct labellist)); + if (new_label == NULL) { + r = idn_nomemory; + goto ret; + } + if (head_label == NULL) + head_label = new_label; + + new_label->name = NULL; + new_label->undo_name = NULL; + new_label->name_length = malloc_length; + new_label->next = NULL; + new_label->previous = NULL; + new_label->dot_followed = (*endp == '.'); + + new_label->name = (unsigned long *) + malloc(sizeof(long) * malloc_length); + if (new_label->name == NULL) { + r = idn_nomemory; + goto ret; + } + memcpy(new_label->name, name, sizeof(long) * length); + *(new_label->name + length - 1) = '\0'; + + new_label->undo_name = (unsigned long *) + malloc(sizeof(long) * malloc_length); + if (new_label->undo_name == NULL) { + r = idn_nomemory; + goto ret; + } + memcpy(new_label->undo_name, name, sizeof(long) * length); + *(new_label->undo_name + length - 1) = '\0'; + + if (tail_label != NULL) { + tail_label->next = new_label; + new_label->previous = tail_label; + } + tail_label = new_label; + + if (*endp == '.') + name = endp + 1; + else + name = endp; + } + + *labelp = head_label; + r = idn_success; + +ret: + if (r != idn_success) { + if (new_label != NULL) { + free(new_label->name); + free(new_label->undo_name); + free(new_label); + } + if (head_label != NULL) + labellist_destroy(head_label); + } + return (r); +} + + +static void +labellist_destroy(labellist_t label) { + labellist_t l, l_next; + + for (l = label; l != NULL; l = l_next) { + l_next = l->next; + free(l->name); + free(l->undo_name); + free(l); + } +} + +static idn_result_t +labellist_setname(labellist_t label, const unsigned long *name) { + unsigned long *new_name; + size_t length, new_length; + + length = idn_ucs4_strlen(name) + 1; + new_length = length + 15; /* add 15 for margin */ + + if (label->name_length < new_length) { + new_name = (unsigned long *) + realloc(label->name, sizeof(long) * new_length); + if (new_name == NULL) + return (idn_nomemory); + label->name = new_name; + label->name_length = new_length; + } + memcpy(label->name, name, sizeof(long) * length); + + return (idn_success); +} + +static const unsigned long * +labellist_getname(labellist_t label) { + return (label->name); +} + +static const unsigned long * +labellist_gettldname(labellist_t label) { + labellist_t l; + + if (label->previous == NULL && label->next == NULL && + !label->dot_followed) + return (idn_mapselector_getnotld()); + + for (l = label; l->next != NULL; l = l->next) + ; /* nothing to be done */ + + return (l->name); +} + +static idn_result_t +labellist_getnamelist(labellist_t label, unsigned long *name, + size_t name_length) { + static const unsigned long dot_string[] = {0x002e, 0x0000}; /* "." */ + size_t length; + labellist_t l; + + for (l = label, length = 0; l != NULL; l = l->next) + length += idn_ucs4_strlen(l->name) + 1; /* name + `.' */ + length++; /* for NUL */ + + if (name_length < length) + return (idn_buffer_overflow); + + *name = '\0'; + for (l = label; l != NULL; l = l->next) { + idn_ucs4_strcat(name, l->name); + name += idn_ucs4_strlen(name); + if (l->dot_followed) + idn_ucs4_strcat(name, dot_string); + } + return (idn_success); +} + +static void +labellist_undo(labellist_t label) { + size_t length; + + length = idn_ucs4_strlen(label->undo_name) + 1; + memcpy(label->name, label->undo_name, sizeof(long) * length); +} + +static labellist_t +labellist_tail(labellist_t label) { + labellist_t l; + + if (label == NULL) + return (NULL); + for (l = label; l->next != NULL; l = l->next) + ; /* nothing to be done */ + return (l); +} + +static labellist_t +labellist_previous(labellist_t label) { + return (label->previous); +} + +#ifndef WITHOUT_ICONV + +static idn_result_t +label_localdecodecheck(idn_resconf_t ctx, labellist_t label) { + idn_converter_t local_converter = NULL; + const unsigned long *from; + char *to = NULL; + size_t to_length; + idn_result_t r; + + from = labellist_getname(label); + to_length = idn_ucs4_strlen(from) + 1 + 15; /* 15 for margin */ + TRACE(("res ucs4tolocal_check(label=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + local_converter = idn_resconf_getlocalconverter(ctx); + if (local_converter == NULL) { + r = idn_success; + goto ret; + } + + for (;;) { + char *new_buffer; + + new_buffer = (char *)realloc(to, to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_converter_convfromucs4(local_converter, from, to, + to_length); + if (r == idn_success) + break; + else if (r == idn_nomapping) { + r = label_idnencode_ace(ctx, label); + if (r != idn_success) + goto ret; + break; + } else if (r != idn_buffer_overflow) { + goto ret; + } + to_length *= 2; + } + + r = idn_success; +ret: + TRACE(("res ucs4tolocal_check(): %s\n", idn_result_tostring(r))); + if (local_converter != NULL) + idn_converter_destroy(local_converter); + free(to); + return (r); +} + +#endif /* !WITHOUT_ICONV */ + +static idn_result_t +label_idndecode(idn_resconf_t ctx, labellist_t label) { + idn_converter_t idn_converter = NULL; + const unsigned long *from; + char *ascii_from = NULL; + unsigned long *to = NULL; + size_t from_length, to_length; + idn_result_t r; + + from = labellist_getname(label); + from_length = idn_ucs4_strlen(from) + 1; + TRACE(("res idntoucs4(label=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + idn_converter = idn_resconf_getidnconverter(ctx); + if (idn_converter == NULL) { + r = idn_success; + goto ret; + } + + for (;;) { + char *new_buffer; + + new_buffer = (char *) realloc(ascii_from, from_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + ascii_from = new_buffer; + r = idn_ucs4_ucs4toutf8(from, ascii_from, from_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + from_length *= 2; + } + + to = NULL; + to_length = from_length; + + for (;;) { + unsigned long *new_buffer; + + new_buffer = (unsigned long *) + realloc(to, sizeof(long) * to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_converter_convtoucs4(idn_converter, ascii_from, to, + to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + r = labellist_setname(label, to); +ret: + if (r == idn_success) { + TRACE(("res idntoucs4(): success (label=\"%s\")\n", + idn__debug_ucs4xstring(labellist_getname(label), + 50))); + } else { + TRACE(("res idntoucs4(): %s\n", idn_result_tostring(r))); + } + if (idn_converter != NULL) + idn_converter_destroy(idn_converter); + free(to); + free(ascii_from); + return (r); +} + +static idn_result_t +label_idnencode_ace(idn_resconf_t ctx, labellist_t label) { + idn_converter_t idn_converter = NULL; + const unsigned long *from; + char *ascii_to = NULL; + unsigned long *to = NULL; + size_t to_length; + idn_result_t r; + + from = labellist_getname(label); + TRACE(("res ucs4toidn(label=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + idn_converter = idn_resconf_getidnconverter(ctx); + if (idn_converter == NULL) { + r = idn_success; + goto ret; + } + + ascii_to = NULL; + to_length = idn_ucs4_strlen(from) * 4 + 16; /* add mergin */ + + for (;;) { + char *new_buffer; + + new_buffer = (char *) realloc(ascii_to, to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + ascii_to = new_buffer; + r = idn_converter_convfromucs4(idn_converter, from, ascii_to, + to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + for (;;) { + unsigned long *new_buffer; + + new_buffer = (unsigned long *) + realloc(to, sizeof(long) * to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_ucs4_utf8toucs4(ascii_to, to, to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + if (r != idn_success) + goto ret; + + r = labellist_setname(label, to); +ret: + if (r == idn_success) { + TRACE(("res ucs4toidn(): success (label=\"%s\")\n", + idn__debug_ucs4xstring(labellist_getname(label), + 50))); + } else { + TRACE(("res ucs4toidn(): %s\n", idn_result_tostring(r))); + } + if (idn_converter != NULL) + idn_converter_destroy(idn_converter); + free(to); + free(ascii_to); + return (r); +} + +static idn_result_t +label_localmap(idn_resconf_t ctx, labellist_t label) { + const unsigned long *from; + const unsigned long *tld; + unsigned long *to = NULL; + size_t to_length; + idn_mapselector_t local_mapper; + idn_result_t r; + + from = labellist_getname(label); + tld = labellist_gettldname(label); + TRACE(("res localmap(label=\"%s\", tld=\"%s\")\n", + idn__debug_ucs4xstring(from, 50), + idn__debug_ucs4xstring(tld, 50))); + + local_mapper = idn_resconf_getlocalmapselector(ctx); + if (local_mapper == NULL) { + r = idn_success; + goto ret; + } + + if (tld == from) + tld = idn_mapselector_getdefaulttld(); + to_length = idn_ucs4_strlen(from) + 1 + 15; /* 15 for margin */ + + for (;;) { + unsigned long *new_buffer; + + new_buffer = (unsigned long *) + realloc(to, sizeof(long) * to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_mapselector_map2(local_mapper, from, tld, to, + to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + r = labellist_setname(label, to); +ret: + if (r == idn_success) { + TRACE(("res localmap(): success (label=\"%s\")\n", + idn__debug_ucs4xstring(labellist_getname(label), + 50))); + } else { + TRACE(("res localmap(): %s\n", idn_result_tostring(r))); + } + if (local_mapper != NULL) + idn_mapselector_destroy(local_mapper); + free(to); + return (r); +} + +static idn_result_t +label_map(idn_resconf_t ctx, labellist_t label) { + const unsigned long *from; + unsigned long *to = NULL; + size_t to_length; + idn_mapper_t mapper; + idn_result_t r; + + from = labellist_getname(label); + TRACE(("res map(label=\"%s\")\n", idn__debug_ucs4xstring(from, 50))); + + mapper = idn_resconf_getmapper(ctx); + if (mapper == NULL) { + r = idn_success; + goto ret; + } + to_length = idn_ucs4_strlen(from) + 1 + 15; /* 15 for margin */ + + for (;;) { + unsigned long *new_buffer; + + new_buffer = (unsigned long *) + realloc(to, sizeof(long) * to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_mapper_map(mapper, from, to, to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + r = labellist_setname(label, to); +ret: + if (r == idn_success) { + TRACE(("res map(): success (label=\"%s\")\n", + idn__debug_ucs4xstring(labellist_getname(label), + 50))); + } else { + TRACE(("res map(): %s\n", idn_result_tostring(r))); + } + if (mapper != NULL) + idn_mapper_destroy(mapper); + free(to); + return (r); +} + +static idn_result_t +label_normalize(idn_resconf_t ctx, labellist_t label) { + const unsigned long *from; + unsigned long *to = NULL; + size_t to_length; + idn_normalizer_t normalizer; + idn_result_t r; + + from = labellist_getname(label); + TRACE(("res normalzie(label=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + normalizer = idn_resconf_getnormalizer(ctx); + if (normalizer == NULL) { + r = idn_success; + goto ret; + } + to_length = idn_ucs4_strlen(from) + 1 + 15; /* 15 for margin */ + + for (;;) { + unsigned long *new_buffer; + + new_buffer = (unsigned long *) + realloc(to, sizeof(long) * to_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + to = new_buffer; + r = idn_normalizer_normalize(normalizer, from, to, to_length); + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + to_length *= 2; + } + + r = labellist_setname(label, to); +ret: + if (r == idn_success) { + TRACE(("res normalize(): success (label=\"%s\")\n", + idn__debug_ucs4xstring(labellist_getname(label), + 50))); + } else { + TRACE(("res normalize(): %s\n", idn_result_tostring(r))); + } + if (normalizer != NULL) + idn_normalizer_destroy(normalizer); + free(to); + return (r); +} + +static idn_result_t +label_prohcheck(idn_resconf_t ctx, labellist_t label) { + const unsigned long *name, *found; + idn_checker_t prohibit_checker; + idn_result_t r; + + name = labellist_getname(label); + TRACE(("res prohcheck(label=\"%s\")\n", + idn__debug_ucs4xstring(name, 50))); + + prohibit_checker = idn_resconf_getprohibitchecker(ctx); + if (prohibit_checker == NULL) { + r = idn_success; + goto ret; + } + + r = idn_checker_lookup(prohibit_checker, name, &found); + idn_checker_destroy(prohibit_checker); + if (r == idn_success && found != NULL) + r = idn_prohibited; + +ret: + TRACE(("res prohcheck(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +label_unascheck(idn_resconf_t ctx, labellist_t label) { + const unsigned long *name, *found; + idn_checker_t unassigned_checker; + idn_result_t r; + + name = labellist_getname(label); + TRACE(("res unascheck(label=\"%s\")\n", + idn__debug_ucs4xstring(name, 50))); + + unassigned_checker = idn_resconf_getunassignedchecker(ctx); + if (unassigned_checker == NULL) { + r = idn_success; + goto ret; + } + + r = idn_checker_lookup(unassigned_checker, name, &found); + idn_checker_destroy(unassigned_checker); + if (r == idn_success && found != NULL) + r = idn_prohibited; + +ret: + TRACE(("res unascheck(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +label_bidicheck(idn_resconf_t ctx, labellist_t label) { + const unsigned long *name, *found; + idn_checker_t bidi_checker; + idn_result_t r; + + name = labellist_getname(label); + TRACE(("res bidicheck(label=\"%s\")\n", + idn__debug_ucs4xstring(name, 50))); + + bidi_checker = idn_resconf_getbidichecker(ctx); + if (bidi_checker == NULL) { + r = idn_success; + goto ret; + } + + r = idn_checker_lookup(bidi_checker, name, &found); + idn_checker_destroy(bidi_checker); + if (r == idn_success && found != NULL) + r = idn_prohibited; + +ret: + TRACE(("res bidicheck(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +label_asccheck(idn_resconf_t ctx, labellist_t label) { + const unsigned long *name, *n; + idn_result_t r; + + name = labellist_getname(label); + TRACE(("res asccheck(label=\"%s\")\n", + idn__debug_ucs4xstring(name, 50))); + + if (*name == '-') { + r = idn_prohibited; + goto ret; + } + + for (n = name; *n != '\0'; n++) { + if (*n <= '\177') { + if ((*n < '0' || *n > '9') && + (*n < 'A' || *n > 'Z') && + (*n < 'a' || *n > 'z') && + *n != '-') { + r = idn_prohibited; + goto ret; + } + } + } + + if (n > name && *(n - 1) == '-') { + r = idn_prohibited; + goto ret; + } + + r = idn_success; +ret: + TRACE(("res asccheck(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +label_lencheck_ace(idn_resconf_t ctx, labellist_t label) { + const unsigned long *name; + size_t name_length; + idn_result_t r; + + name = labellist_getname(label); + name_length = idn_ucs4_strlen(name); + TRACE(("res lencheck(label=\"%s\")\n", + idn__debug_ucs4xstring(name, 50))); + + if (name_length == 0 || name_length > MAX_LABEL_LENGTH) { + r = idn_invalid_length; + goto ret; + } + + r = idn_success; +ret: + TRACE(("res lencheck(): %s\n", idn_result_tostring(r))); + return (r); +} + +static idn_result_t +label_lencheck_nonace(idn_resconf_t ctx, labellist_t label) { + idn_converter_t idn_converter; + const unsigned long *from; + size_t to_length; + idn_result_t r; + char *buffer = NULL; + size_t buffer_length; + + from = labellist_getname(label); + TRACE(("res lencheck(label=\"%s\")\n", + idn__debug_ucs4xstring(from, 50))); + + buffer_length = idn_ucs4_strlen(from) * 4 + 16; /* 16 for margin */ + idn_converter = idn_resconf_getidnconverter(ctx); + + for (;;) { + void *new_buffer; + + new_buffer = realloc(buffer, sizeof(*buffer) * buffer_length); + if (new_buffer == NULL) { + r = idn_nomemory; + goto ret; + } + buffer = (char *)new_buffer; + + if (idn_converter != NULL) { + r = idn_converter_convfromucs4(idn_converter, from, + buffer, buffer_length); + } else { + r = idn_ucs4_ucs4toutf8(from, buffer, buffer_length); + } + if (r == idn_success) + break; + else if (r != idn_buffer_overflow) + goto ret; + + buffer_length *= 2; + } + + to_length = strlen(buffer); + if (to_length == 0 || to_length > MAX_LABEL_LENGTH) { + r = idn_invalid_length; + goto ret; + } + + r = idn_success; +ret: + TRACE(("res lencheck(): %s\n", idn_result_tostring(r))); + if (idn_converter != NULL) + idn_converter_destroy(idn_converter); + free(buffer); + return (r); +} + +static idn_result_t +label_rtcheck(idn_resconf_t ctx, idn_action_t actions, labellist_t label, + const unsigned long *original_name) { + labellist_t rt_label = NULL; + const unsigned long *rt_name; + const unsigned long *cur_name; + idn_result_t r; + + cur_name = labellist_getname(label); + TRACE(("res rtcheck(label=\"%s\", org_label=\"%s\")\n", + idn__debug_ucs4xstring(cur_name, 50), + idn__debug_ucs4xstring(original_name, 50))); + + r = labellist_create(cur_name, &rt_label); + if (r != idn_success) + goto ret; + if (rt_label == NULL) { + if (*original_name == '\0') + r = idn_success; + else + r = idn_invalid_encoding; + goto ret; + } + + if (!idn__util_ucs4isasciirange(labellist_getname(rt_label))) { + r = label_map(ctx, rt_label); + if (r != idn_success) + goto ret; + r = label_normalize(ctx, rt_label); + if (r != idn_success) + goto ret; + r = label_prohcheck(ctx, rt_label); + if (r != idn_success) + goto ret; + if (actions & IDN_UNASCHECK) { + r = label_unascheck(ctx, rt_label); + if (r != idn_success) + goto ret; + } + r = label_bidicheck(ctx, rt_label); + if (r != idn_success) + goto ret; + } + + if (actions & IDN_ASCCHECK) { + r = label_asccheck(ctx, rt_label); + if (r != idn_success) + goto ret; + } + if (!idn__util_ucs4isasciirange(labellist_getname(rt_label))) { + r = label_idnencode_ace(ctx, rt_label); + if (r != idn_success) + goto ret; + } + r = label_lencheck_ace(ctx, rt_label); + if (r != idn_success) + goto ret; + rt_name = labellist_getname(rt_label); + + if (idn_ucs4_strcasecmp(rt_name, original_name) != 0) { + TRACE(("res rtcheck(): round trip failed, org =\"%s\", rt=\"%s\"\n", + idn__debug_ucs4xstring(original_name, 50), + idn__debug_ucs4xstring(rt_name, 50))); + r = idn_invalid_encoding; + goto ret; + } + + r = idn_success; +ret: + if (r != idn_nomemory && r != idn_success) + r = idn_invalid_encoding; + TRACE(("res rtcheck(): %s\n", idn_result_tostring(r))); + if (rt_label != NULL) + labellist_destroy(rt_label); + return (r); +} + +const char * +idn__res_actionstostring(idn_action_t actions) { + static char buf[100]; + + buf[0] = '\0'; + + if (actions == IDN_ENCODE_QUERY) + strcpy(buf, "encode-query"); + else if (actions == IDN_DECODE_QUERY) + strcpy(buf, "decode-query"); + else if (actions == IDN_ENCODE_APP) + strcpy(buf, "encode-app"); + else if (actions == IDN_DECODE_APP) + strcpy(buf, "decode-app"); + else if (actions == IDN_ENCODE_STORED) + strcpy(buf, "encode-stored"); + else if (actions == IDN_DECODE_STORED) + strcpy(buf, "decode-stored"); + else { + if (actions & IDN_LOCALCONV) + strcat(buf, "|localconv"); + if (actions & IDN_DELIMMAP) + strcat(buf, "|delimmap"); + if (actions & IDN_LOCALMAP) + strcat(buf, "|localmap"); + + if (actions & IDN_MAP) + strcat(buf, "|map"); + if (actions & IDN_NORMALIZE) + strcat(buf, "|normalize"); + if (actions & IDN_PROHCHECK) + strcat(buf, "|prohcheck"); + if (actions & IDN_UNASCHECK) + strcat(buf, "|unascheck"); + if (actions & IDN_BIDICHECK) + strcat(buf, "|bidicheck"); + + if (actions & IDN_IDNCONV) + strcat(buf, "|idnconv"); + if (actions & IDN_ASCCHECK) + strcat(buf, "|asccheck"); + if (actions & IDN_LENCHECK) + strcat(buf, "|lencheck"); + if (actions & IDN_RTCHECK) + strcat(buf, "|rtcheck"); + } + + if (buf[0] == '|') + return (buf + 1); + else + return (buf); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/resconf.c b/contrib/idn/idnkit-1.0-src/lib/resconf.c new file mode 100644 index 0000000000..9477c280bd --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/resconf.c @@ -0,0 +1,1477 @@ +#ifndef lint +static char *rcsid = "$Id: resconf.c,v 1.1 2003/06/04 00:26:12 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_PWD_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef WIN32 +#define MAX_PATH_SIZE 500 /* a good longer than MAX_PATH */ +#define IDNVAL_CONFFILE "ConfFile" +#else /* WIN32 */ + +#ifndef IDN_RESCONF_DIR +#define IDN_RESCONF_DIR "/etc" +#endif +#define IDN_RESCONF_FILE IDN_RESCONF_DIR "/idn.conf" +#define IDN_USER_RESCONF_FILE "/.idnrc" + +#endif /* WIN32 */ + +#define MAX_CONF_LINE_LENGTH 255 +#define MAX_CONF_LINE_ARGS 63 + +#define DEFAULT_CONF_NAMEPREP 0x0001 +#define DEFAULT_CONF_IDN_ENCODING 0x0010 +#define DEFAULT_CONF_ALL (DEFAULT_CONF_NAMEPREP | \ + DEFAULT_CONF_IDN_ENCODING) + +#define IDN_ENCODING_CURRENT "Punycode" + +#ifdef ENABLE_MDNKIT_COMPAT +#define MDN_RESCONF_FILE IDN_RESCONF_DIR "/mdn.conf" +#endif + +struct idn_resconf { + int local_converter_is_static; + idn_converter_t local_converter; + idn_converter_t idn_converter; + idn_converter_t aux_idn_converter; + idn_normalizer_t normalizer; + idn_checker_t prohibit_checker; + idn_checker_t unassigned_checker; + idn_checker_t bidi_checker; + idn_mapper_t mapper; + idn_mapselector_t local_mapper; + idn_delimitermap_t delimiter_mapper; + int reference_count; +}; + +static int initialized; + +#ifndef WIN32 +static const char * userhomedir(void); +#endif +static idn_result_t open_userdefaultfile(FILE **fpp); +static idn_result_t open_defaultfile(FILE **fpp); +static idn_result_t parse_conf(idn_resconf_t ctx, FILE *fp); +static idn_result_t parse_idn_encoding(idn_resconf_t ctx, char *args, + int lineno); +static idn_result_t parse_local_map(idn_resconf_t ctx, char *args, + int lineno); +static idn_result_t parse_nameprep(idn_resconf_t ctx, char *args, + int lineno); +static int split_args(char *s, char **av, int max_ac); +static void resetconf(idn_resconf_t ctx); +#ifndef WITHOUT_ICONV +static idn_result_t update_local_converter(idn_resconf_t ctx); +#endif +static idn_result_t setdefaults_body(idn_resconf_t ctx, int conf_mask); + +idn_result_t +idn_resconf_initialize(void) { + idn_result_t r; + + TRACE(("idn_resconf_initialize()\n")); + + if (initialized) { + r = idn_success; + goto ret; + } + + /* + * Initialize sub modules. + */ + if ((r = idn_converter_initialize()) != idn_success) + goto ret; + if ((r = idn_normalizer_initialize()) != idn_success) + goto ret; + if ((r = idn_checker_initialize()) != idn_success) + goto ret; + if ((r = idn_mapselector_initialize()) != idn_success) + goto ret; + if ((r = idn_mapper_initialize()) != idn_success) + goto ret; + + r = idn_success; + initialized = 1; +ret: + TRACE(("idn_resconf_initialize(): %s\n", idn_result_tostring(r))); + return (r); +} + +idn_result_t +idn_resconf_create(idn_resconf_t *ctxp) { + idn_resconf_t ctx = NULL; + idn_result_t r; + + assert(ctxp != NULL); + + TRACE(("idn_resconf_create()\n")); + + if (!initialized) { + r = idn_failure; + goto ret; + } + if ((ctx = malloc(sizeof(*ctx))) == NULL) { + r = idn_nomemory; + goto ret; + } + + ctx->local_converter_is_static = 0; + ctx->local_converter = NULL; + ctx->idn_converter = NULL; + ctx->aux_idn_converter = NULL; + ctx->normalizer = NULL; + ctx->prohibit_checker = NULL; + ctx->unassigned_checker = NULL; + ctx->bidi_checker = NULL; + ctx->mapper = NULL; + ctx->local_mapper = NULL; + ctx->reference_count = 1; + + r = idn_delimitermap_create(&ctx->delimiter_mapper); + if (r != idn_success) + goto ret; + + *ctxp = ctx; + r = idn_success; +ret: + TRACE(("idn_resconf_create(): %s\n", idn_result_tostring(r))); + return (r); +} + +char * +idn_resconf_defaultfile() { +#ifdef WIN32 + static char default_path[MAX_PATH_SIZE]; + + if (idn__util_getregistrystring(idn__util_hkey_localmachine, + IDNVAL_CONFFILE, default_path, + sizeof(default_path))) { + return (default_path); + } else { + return (NULL); + } +#else + return (IDN_RESCONF_FILE); +#endif +} + +#ifndef WIN32 +static const char * +userhomedir() { + uid_t uid; + struct passwd *pwd; + + uid = getuid(); + pwd = getpwuid(uid); + if (pwd == NULL) { + return (NULL); + } + + return (pwd->pw_dir); +} +#endif + +static idn_result_t +open_userdefaultfile(FILE **fpp) { +#ifdef WIN32 + char user_path[MAX_PATH_SIZE]; + + TRACE(("open_userdefaultfile()\n")); + + if (idn__util_getregistrystring(idn__util_hkey_currentuser, + IDNVAL_CONFFILE, user_path, + sizeof(user_path)) == 0) { + return (idn_nofile); + } + *fpp = fopen(user_path, "r"); + if (*fpp == NULL) { + return (idn_nofile); + } + return (idn_success); +#else /* WIN32 */ + const char *homedir; + char *file; + int len; + + TRACE(("open_userdefaultfile()\n")); + + homedir = userhomedir(); + len = strlen(IDN_USER_RESCONF_FILE) + 1; + if (homedir != NULL) { + len += strlen(homedir); + } else { + return (idn_notfound); + } + + file = (char *)malloc(sizeof(char) * len); + if (file == NULL) { + WARNING(("open_userdefaultfile(): malloc failed\n")); + return (idn_nomemory); + } + + (void)strcpy(file, homedir); + strcat(file, IDN_USER_RESCONF_FILE); + + *fpp = fopen(file, "r"); + free(file); + if (*fpp == NULL) { + return (idn_nofile); + } + + return (idn_success); +#endif /* WIN32 */ +} + +static idn_result_t +open_defaultfile(FILE **fpp) { + idn_result_t r; + const char *file; + + r = open_userdefaultfile(fpp); + if (r == idn_nofile || r == idn_notfound) { + TRACE(("open_defaultfile: " + "cannot open user configuration file\n")); + file = idn_resconf_defaultfile(); + *fpp = fopen(file, "r"); +#ifdef ENABLE_MDNKIT_COMPAT + if (*fpp == NULL) + *fpp = fopen(MDN_RESCONF_FILE, "r"); +#endif + if (*fpp == NULL) { + TRACE(("open_defaultfile: " + "cannot open system configuration file\n")); + return (idn_nofile); + } + } else if (r != idn_success) { + return (r); + } + + return (idn_success); +} + +idn_result_t +idn_resconf_loadfile(idn_resconf_t ctx, const char *file) { + FILE *fp = NULL; + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn_resconf_loadfile(file=%s)\n", + file == NULL ? "" : file)); + + resetconf(ctx); + r = idn_delimitermap_create(&ctx->delimiter_mapper); + if (r != idn_success) { + goto ret; + } + + if (file == NULL) { + r = open_defaultfile(&fp); + if (r == idn_nofile || r == idn_notfound) { + r = setdefaults_body(ctx, 0); + goto ret; + } else if (r != idn_success) { + goto ret; + } + } else { + fp = fopen(file, "r"); + if (fp == NULL) { + TRACE(("idn_resconf_loadfile: cannot open %-.40s\n", + file)); + r = idn_nofile; + goto ret; + } + } + + r = parse_conf(ctx, fp); + fclose(fp); + +ret: + TRACE(("idn_resconf_loadfile(): %s\n", idn_result_tostring(r))); + return (r); +} + +void +idn_resconf_destroy(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_destroy()\n")); + + ctx->reference_count--; + if (ctx->reference_count <= 0) { + resetconf(ctx); + free(ctx); + TRACE(("idn_resconf_destroy: the object is destroyed\n")); + } else { + TRACE(("idn_resconf_destroy(): " + "update reference count (%d->%d)\n", + ctx->reference_count + 1, ctx->reference_count)); + } +} + +void +idn_resconf_incrref(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_incrref()\n")); + TRACE(("idn_resconf_incrref: update reference count (%d->%d)\n", + ctx->reference_count, ctx->reference_count + 1)); + + ctx->reference_count++; +} + +idn_converter_t +idn_resconf_getalternateconverter(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getalternateconverter()\n")); + + return (idn_resconf_getidnconverter(ctx)); +} + +idn_delimitermap_t +idn_resconf_getdelimitermap(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getdelimitermap()\n")); + + if (ctx->delimiter_mapper != NULL) + idn_delimitermap_incrref(ctx->delimiter_mapper); + return (ctx->delimiter_mapper); +} + +idn_converter_t +idn_resconf_getidnconverter(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getidnconverter()\n")); + + if (ctx->idn_converter != NULL) + idn_converter_incrref(ctx->idn_converter); + return (ctx->idn_converter); +} + +idn_converter_t +idn_resconf_getauxidnconverter(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getauxidnconverter()\n")); + + if (ctx->aux_idn_converter != NULL) + idn_converter_incrref(ctx->aux_idn_converter); + return (ctx->aux_idn_converter); +} + +idn_converter_t +idn_resconf_getlocalconverter(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getlocalconverter()\n")); + +#ifdef WITHOUT_ICONV + return NULL; + +#else /* WITHOUT_ICONV */ + if (update_local_converter(ctx) != idn_success) + return (NULL); + + idn_converter_incrref(ctx->local_converter); + return (ctx->local_converter); + +#endif /* WITHOUT_ICONV */ +} + +idn_mapselector_t +idn_resconf_getlocalmapselector(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getlocalmapselector()\n")); + + if (ctx->local_mapper != NULL) + idn_mapselector_incrref(ctx->local_mapper); + return (ctx->local_mapper); +} + +idn_mapper_t +idn_resconf_getmapper(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getmapper()\n")); + + if (ctx->mapper != NULL) + idn_mapper_incrref(ctx->mapper); + return (ctx->mapper); +} + +idn_normalizer_t +idn_resconf_getnormalizer(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getnormalizer()\n")); + + if (ctx->normalizer != NULL) + idn_normalizer_incrref(ctx->normalizer); + return (ctx->normalizer); +} + +idn_checker_t +idn_resconf_getprohibitchecker(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getprohibitchecker()\n")); + + if (ctx->prohibit_checker != NULL) + idn_checker_incrref(ctx->prohibit_checker); + return (ctx->prohibit_checker); +} + +idn_checker_t +idn_resconf_getunassignedchecker(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getunassignedchecker()\n")); + + if (ctx->unassigned_checker != NULL) + idn_checker_incrref(ctx->unassigned_checker); + return (ctx->unassigned_checker); +} + +idn_checker_t +idn_resconf_getbidichecker(idn_resconf_t ctx) { + assert(ctx != NULL); + + TRACE(("idn_resconf_getbidichecker()\n")); + + if (ctx->bidi_checker != NULL) + idn_checker_incrref(ctx->bidi_checker); + return (ctx->bidi_checker); +} + +void +idn_resconf_setalternateconverter(idn_resconf_t ctx, + idn_converter_t alternate_converter) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setalternateconverter()\n")); +} + +void +idn_resconf_setdelimitermap(idn_resconf_t ctx, + idn_delimitermap_t delimiter_mapper) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setdelimitermap()\n")); + + if (ctx->delimiter_mapper != NULL) + idn_delimitermap_destroy(ctx->delimiter_mapper); + ctx->delimiter_mapper = delimiter_mapper; + if (delimiter_mapper != NULL) + idn_delimitermap_incrref(ctx->delimiter_mapper); +} + +void +idn_resconf_setidnconverter(idn_resconf_t ctx, + idn_converter_t idn_converter) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setidnconverter()\n")); + + if (ctx->idn_converter != NULL) + idn_converter_destroy(ctx->idn_converter); + ctx->idn_converter = idn_converter; + if (idn_converter != NULL) + idn_converter_incrref(ctx->idn_converter); +} + +void +idn_resconf_setauxidnconverter(idn_resconf_t ctx, + idn_converter_t aux_idn_converter) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setauxidnconverter()\n")); + + if (ctx->aux_idn_converter != NULL) + idn_converter_destroy(ctx->aux_idn_converter); + ctx->aux_idn_converter = aux_idn_converter; + if (aux_idn_converter != NULL) + idn_converter_incrref(ctx->aux_idn_converter); +} + +void +idn_resconf_setlocalconverter(idn_resconf_t ctx, + idn_converter_t local_converter) { +#ifndef WITHOUT_ICONV + assert(ctx != NULL); + + TRACE(("idn_resconf_setlocalconverter()\n")); + + if (ctx->local_converter != NULL) { + idn_converter_destroy(ctx->local_converter); + ctx->local_converter = NULL; + } + + if (local_converter == NULL) + ctx->local_converter_is_static = 0; + else { + ctx->local_converter = local_converter; + idn_converter_incrref(local_converter); + ctx->local_converter_is_static = 1; + } +#endif /* WITHOUT_ICONV */ +} + +void +idn_resconf_setlocalmapselector(idn_resconf_t ctx, + idn_mapselector_t local_mapper) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setlocalmapselector()\n")); + + if (ctx->local_mapper != NULL) + idn_mapselector_destroy(ctx->local_mapper); + ctx->local_mapper = local_mapper; + if (local_mapper != NULL) + idn_mapselector_incrref(ctx->local_mapper); +} + +void +idn_resconf_setmapper(idn_resconf_t ctx, idn_mapper_t mapper) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setmapper()\n")); + + if (ctx->mapper != NULL) + idn_mapper_destroy(ctx->mapper); + ctx->mapper = mapper; + if (mapper != NULL) + idn_mapper_incrref(ctx->mapper); +} + +void +idn_resconf_setnormalizer(idn_resconf_t ctx, idn_normalizer_t normalizer) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setnormalizer()\n")); + + if (ctx->normalizer != NULL) + idn_normalizer_destroy(ctx->normalizer); + ctx->normalizer = normalizer; + if (normalizer != NULL) + idn_normalizer_incrref(ctx->normalizer); +} + +void +idn_resconf_setprohibitchecker(idn_resconf_t ctx, + idn_checker_t prohibit_checker) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setprohibitchecker()\n")); + + if (ctx->prohibit_checker != NULL) + idn_checker_destroy(ctx->prohibit_checker); + ctx->prohibit_checker = prohibit_checker; + if (prohibit_checker != NULL) + idn_checker_incrref(ctx->prohibit_checker); +} + +void +idn_resconf_setunassignedchecker(idn_resconf_t ctx, + idn_checker_t unassigned_checker) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setunassignedchecker()\n")); + + if (ctx->unassigned_checker != NULL) + idn_checker_destroy(ctx->unassigned_checker); + ctx->unassigned_checker = unassigned_checker; + if (unassigned_checker != NULL) + idn_checker_incrref(ctx->unassigned_checker); +} + +void +idn_resconf_setbidichecker(idn_resconf_t ctx, + idn_checker_t bidi_checker) { + assert(ctx != NULL); + + TRACE(("idn_resconf_setbidichecker()\n")); + + if (ctx->bidi_checker != NULL) + idn_checker_destroy(ctx->bidi_checker); + ctx->bidi_checker = bidi_checker; + if (bidi_checker != NULL) + idn_checker_incrref(ctx->bidi_checker); +} + +idn_result_t +idn_resconf_setnameprepversion(idn_resconf_t ctx, const char *version) +{ + char prohibit_scheme_name[MAX_CONF_LINE_LENGTH + 1]; + char unassigned_scheme_name[MAX_CONF_LINE_LENGTH + 1]; + char bidi_scheme_name[MAX_CONF_LINE_LENGTH + 1]; + idn_mapper_t mapper = NULL; + idn_normalizer_t normalizer = NULL; + idn_checker_t prohibit_checker = NULL; + idn_checker_t unassigned_checker = NULL; + idn_checker_t bidi_checker = NULL; + idn_result_t r; + + assert(ctx != NULL && version != NULL); + + TRACE(("idn_resconf_setnameprepversion()\n")); + + /* + * Set canonical scheme names. + */ + if (strlen(version) + strlen(IDN_CHECKER_PROHIBIT_PREFIX) + > MAX_CONF_LINE_LENGTH) { + r = idn_invalid_name; + goto failure; + } + sprintf(prohibit_scheme_name, "%s%s", + IDN_CHECKER_PROHIBIT_PREFIX, version); + + if (strlen(version) + strlen(IDN_CHECKER_UNASSIGNED_PREFIX) + > MAX_CONF_LINE_LENGTH) { + r = idn_invalid_name; + goto failure; + } + sprintf(unassigned_scheme_name, "%s%s", + IDN_CHECKER_UNASSIGNED_PREFIX, version); + + if (strlen(version) + strlen(IDN_CHECKER_BIDI_PREFIX) + > MAX_CONF_LINE_LENGTH) { + r = idn_invalid_name; + goto failure; + } + sprintf(bidi_scheme_name, "%s%s", + IDN_CHECKER_BIDI_PREFIX, version); + + /* + * Create objects. + */ + r = idn_mapper_create(&mapper); + if (r != idn_success) + goto failure; + r = idn_normalizer_create(&normalizer); + if (r != idn_success) + goto failure; + r = idn_checker_create(&prohibit_checker); + if (r != idn_success) + goto failure; + r = idn_checker_create(&unassigned_checker); + if (r != idn_success) + goto failure; + r = idn_checker_create(&bidi_checker); + if (r != idn_success) + goto failure; + + r = idn_mapper_add(mapper, version); + if (r != idn_success) + goto failure; + r = idn_normalizer_add(normalizer, version); + if (r != idn_success) + goto failure; + r = idn_checker_add(prohibit_checker, prohibit_scheme_name); + if (r != idn_success) + goto failure; + r = idn_checker_add(unassigned_checker, unassigned_scheme_name); + if (r != idn_success) + goto failure; + r = idn_checker_add(bidi_checker, bidi_scheme_name); + if (r != idn_success) + goto failure; + + /* + * Set the objects. + */ + idn_resconf_setmapper(ctx, mapper); + idn_resconf_setnormalizer(ctx, normalizer); + idn_resconf_setprohibitchecker(ctx, prohibit_checker); + idn_resconf_setunassignedchecker(ctx, unassigned_checker); + idn_resconf_setbidichecker(ctx, bidi_checker); + + /* + * Destroy the objects. + */ + idn_mapper_destroy(mapper); + idn_normalizer_destroy(normalizer); + idn_checker_destroy(prohibit_checker); + idn_checker_destroy(unassigned_checker); + idn_checker_destroy(bidi_checker); + + return (idn_success); + +failure: + if (mapper != NULL) + idn_mapper_destroy(mapper); + if (normalizer != NULL) + idn_normalizer_destroy(normalizer); + if (prohibit_checker != NULL) + idn_checker_destroy(prohibit_checker); + if (unassigned_checker != NULL) + idn_checker_destroy(unassigned_checker); + if (bidi_checker != NULL) + idn_checker_destroy(bidi_checker); + + return (r); +} + +idn_result_t +idn_resconf_setalternateconvertername(idn_resconf_t ctx, const char *name, + int flags) { + assert(ctx != NULL && name != NULL); + + TRACE(("idn_resconf_setalternateconvertername(name=%s, flags=%d)\n", + name, flags)); + + return (idn_success); +} + +idn_result_t +idn_resconf_setidnconvertername(idn_resconf_t ctx, const char *name, + int flags) { + idn_converter_t idn_converter; + idn_result_t r; + + assert(ctx != NULL && name != NULL); + + TRACE(("idn_resconf_setidnconvertername(name=%s, flags=%d)\n", + name, flags)); + + r = idn_converter_create(name, &idn_converter, flags); + if (r != idn_success) + return (r); + + if (ctx->idn_converter != NULL) + idn_converter_destroy(ctx->idn_converter); + ctx->idn_converter = idn_converter; + + return (idn_success); +} + +idn_result_t +idn_resconf_setauxidnconvertername(idn_resconf_t ctx, const char *name, + int flags) { + idn_converter_t aux_idn_converter; + const char *old_name; + idn_result_t r; + + assert(ctx != NULL && name != NULL); + + TRACE(("idn_resconf_setauxidnconvertername(name=%s, flags=%d)\n", + name, flags)); + + if (ctx->aux_idn_converter != NULL) { + old_name = idn_converter_localencoding(ctx->aux_idn_converter); + if (old_name != NULL && strcmp(old_name, name) == 0) + return (idn_success); + } + + r = idn_converter_create(name, &aux_idn_converter, flags); + if (r != idn_success) + return (r); + + if (ctx->aux_idn_converter != NULL) + idn_converter_destroy(ctx->aux_idn_converter); + ctx->aux_idn_converter = aux_idn_converter; + + return (idn_success); +} + +idn_result_t +idn_resconf_setlocalconvertername(idn_resconf_t ctx, const char *name, + int flags) { +#ifdef WITHOUT_ICONV + return idn_failure; + +#else /* WITHOUT_ICONV */ + idn_converter_t local_converter; + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn_resconf_setlocalconvertername(name=%s, flags=%d)\n", + name == NULL ? "" : name, flags)); + + if (ctx->local_converter != NULL) { + idn_converter_destroy(ctx->local_converter); + ctx->local_converter = NULL; + } + ctx->local_converter_is_static = 0; + + if (name != NULL) { + r = idn_converter_create(name, &local_converter, flags); + if (r != idn_success) + return (r); + ctx->local_converter = local_converter; + ctx->local_converter_is_static = 1; + } + + return (idn_success); + +#endif /* WITHOUT_ICONV */ +} + +idn_result_t +idn_resconf_addalldelimitermapucs(idn_resconf_t ctx, unsigned long *v, + int nv) { + idn_result_t r; + + TRACE(("idn_resconf_addalldelimitermapucs(nv=%d)\n", nv)); + + if (ctx->delimiter_mapper == NULL) { + r = idn_delimitermap_create(&(ctx->delimiter_mapper)); + if (r != idn_success) + return (r); + } + + r = idn_delimitermap_addall(ctx->delimiter_mapper, v, nv); + return (r); +} + +idn_result_t +idn_resconf_addalllocalmapselectornames(idn_resconf_t ctx, const char *tld, + const char **names, int nnames) { + idn_result_t r; + + assert(ctx != NULL && names != NULL && tld != NULL); + + TRACE(("idn_resconf_addalllocalmapselectorname(tld=%s, nnames=%d)\n", + tld, nnames)); + + if (ctx->local_mapper == NULL) { + r = idn_mapselector_create(&(ctx->local_mapper)); + if (r != idn_success) + return (r); + } + + r = idn_mapselector_addall(ctx->local_mapper, tld, names, nnames); + return (r); +} + +idn_result_t +idn_resconf_addallmappernames(idn_resconf_t ctx, const char **names, + int nnames) { + idn_result_t r; + + assert(ctx != NULL && names != NULL); + + TRACE(("idn_resconf_addallmappername()\n")); + + if (ctx->mapper == NULL) { + r = idn_mapper_create(&(ctx->mapper)); + if (r != idn_success) + return (r); + } + + r = idn_mapper_addall(ctx->mapper, names, nnames); + return (r); +} + +idn_result_t +idn_resconf_addallnormalizernames(idn_resconf_t ctx, const char **names, + int nnames) { + idn_result_t r; + + assert(ctx != NULL && names != NULL); + + TRACE(("idn_resconf_addallnormalizername(nnames=%d)\n", nnames)); + + if (ctx->normalizer == NULL) { + r = idn_normalizer_create(&(ctx->normalizer)); + if (r != idn_success) + return (r); + } + + r = idn_normalizer_addall(ctx->normalizer, names, nnames); + return (r); +} + +idn_result_t +idn_resconf_addallprohibitcheckernames(idn_resconf_t ctx, const char **names, + int nnames) { + char long_name[MAX_CONF_LINE_LENGTH + 1]; + idn_result_t r; + int i; + + assert(ctx != NULL && names != NULL); + + TRACE(("idn_resconf_addallprohibitcheckername(nnames=%d)\n", nnames)); + + if (ctx->prohibit_checker == NULL) { + r = idn_checker_create(&(ctx->prohibit_checker)); + if (r != idn_success) + return (r); + } + + for (i = 0; i < nnames; i++, names++) { + if (strlen(*names) + strlen(IDN_CHECKER_PROHIBIT_PREFIX) + > MAX_CONF_LINE_LENGTH) { + return (idn_invalid_name); + } + strcpy(long_name, IDN_CHECKER_PROHIBIT_PREFIX); + strcat(long_name, *names); + + r = idn_checker_add(ctx->prohibit_checker, long_name); + if (r != idn_success) + return (r); + } + + return (idn_success); +} + +idn_result_t +idn_resconf_addallunassignedcheckernames(idn_resconf_t ctx, const char **names, + int nnames) { + char long_name[MAX_CONF_LINE_LENGTH + 1]; + idn_result_t r; + int i; + + assert(ctx != NULL && names != NULL); + + TRACE(("idn_resconf_addallunassignedcheckername(nnames=%d)\n", + nnames)); + + if (ctx->unassigned_checker == NULL) { + r = idn_checker_create(&(ctx->unassigned_checker)); + if (r != idn_success) + return (r); + } + + for (i = 0; i < nnames; i++, names++) { + if (strlen(*names) + strlen(IDN_CHECKER_UNASSIGNED_PREFIX) + > MAX_CONF_LINE_LENGTH) { + return (idn_invalid_name); + } + strcpy(long_name, IDN_CHECKER_UNASSIGNED_PREFIX); + strcat(long_name, *names); + + r = idn_checker_add(ctx->unassigned_checker, long_name); + if (r != idn_success) + return (r); + } + + return (idn_success); +} + +idn_result_t +idn_resconf_addallbidicheckernames(idn_resconf_t ctx, const char **names, + int nnames) { + char long_name[MAX_CONF_LINE_LENGTH + 1]; + idn_result_t r; + int i; + + assert(ctx != NULL && names != NULL); + + TRACE(("idn_resconf_addallbidicheckername(nnames=%d)\n", nnames)); + + if (ctx->bidi_checker == NULL) { + r = idn_checker_create(&(ctx->bidi_checker)); + if (r != idn_success) + return (r); + } + + for (i = 0; i < nnames; i++, names++) { + if (strlen(*names) + strlen(IDN_CHECKER_BIDI_PREFIX) + > MAX_CONF_LINE_LENGTH) { + return (idn_invalid_name); + } + strcpy(long_name, IDN_CHECKER_BIDI_PREFIX); + strcat(long_name, *names); + + r = idn_checker_add(ctx->bidi_checker, long_name); + if (r != idn_success) + return (r); + } + + return (idn_success); +} + +static idn_result_t +parse_conf(idn_resconf_t ctx, FILE *fp) { + char line[MAX_CONF_LINE_LENGTH + 1]; + int lineno = 0; + char *argv[3]; + int argc; + idn_result_t r; + int conf_mask = 0; + + TRACE(("parse_conf()\n")); + + /* + * Parse config file. parsing of 'idn-encoding' line is + * postponed because 'alias-file' line must be processed + * before them. + */ + while (fgets(line, sizeof(line), fp) != NULL) { + char *newline; + + lineno++; + newline = strpbrk(line, "\r\n"); + if (newline != NULL) + *newline = '\0'; + else if (fgetc(fp) != EOF) { + ERROR(("libidnkit: too long line \"%-.30s\", " + "line %d\n", line, lineno)); + return (idn_invalid_syntax); + } + + argc = split_args(line, argv, 2); + if (argc == -1) { + ERROR(("libidnkit: syntax error, line %d\n", lineno)); + return (idn_invalid_syntax); + } else if (argc == 0 || argv[0][0] == '#') { + continue; + } else if (argc == 1) { + ERROR(("libidnkit: syntax error, line %d\n", lineno)); + return (idn_invalid_syntax); + } + + if (strcmp(argv[0], "idn-encoding") == 0) { + if (conf_mask & DEFAULT_CONF_IDN_ENCODING) { + ERROR(("libidnkit: \"%s\" redefined, " + "line %d\n", argv[0], lineno)); + r = idn_invalid_syntax; + } else { + conf_mask |= DEFAULT_CONF_IDN_ENCODING; + r = parse_idn_encoding(ctx, argv[1], lineno); + } + } else if (strcmp(argv[0], "local-map") == 0) { + r = parse_local_map(ctx, argv[1], lineno); + + } else if (strcmp(argv[0], "nameprep") == 0) { + if (conf_mask & DEFAULT_CONF_NAMEPREP) { + ERROR(("libidnkit: \"%s\" redefined, " + "line %d\n", argv[0], lineno)); + r = idn_invalid_syntax; + } else { + conf_mask |= DEFAULT_CONF_NAMEPREP; + r = parse_nameprep(ctx, argv[1], lineno); + } + } else if (strcmp(argv[0], "nameprep-map") == 0 || + strcmp(argv[0], "nameprep-normalize") == 0 || + strcmp(argv[0], "nameprep-prohibit") == 0 || + strcmp(argv[0], "nameprep-unassigned") == 0 || + strcmp(argv[0], "alias-file") == 0 || + strcmp(argv[0], "encoding-alias-file") == 0 || + strcmp(argv[0], "normalize") == 0 || + strcmp(argv[0], "server-encoding") == 0 || + strcmp(argv[0], "alternate-encoding") == 0 || + strcmp(argv[0], "delimiter-map") == 0) { + WARNING(("libidnkit: obsolete command \"%s\", line %d " + "(ignored)\n", argv[0], lineno)); + r = idn_success; + } else { + ERROR(("libidnkit: unknown command \"%-.30s\", " + "line %d\n", argv[0], lineno)); + r = idn_invalid_syntax; + } + if (r != idn_success) + return (r); + } + + lineno++; + + if (conf_mask != DEFAULT_CONF_ALL) { + return setdefaults_body(ctx, conf_mask); + } + + return (idn_success); +} + +static idn_result_t +parse_idn_encoding(idn_resconf_t ctx, char *args, int lineno) { + idn_result_t r; + char *argv[MAX_CONF_LINE_ARGS + 1]; + int argc; + + argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); + + if (argc != 1) { + ERROR(("libidnkit: wrong # of args for idn-encoding, " + "line %d\n", lineno)); + return (idn_invalid_syntax); + } + + r = idn_converter_create(argv[0], &ctx->idn_converter, + IDN_CONVERTER_DELAYEDOPEN | + IDN_CONVERTER_RTCHECK); + if (r != idn_success) { + ERROR(("libidnkit: cannot create idn converter, %s, " + "line %d\n", idn_result_tostring(r), lineno)); + } + + return (r); +} + +static idn_result_t +parse_local_map(idn_resconf_t ctx, char *args, int lineno) { + idn_result_t r; + char *argv[MAX_CONF_LINE_ARGS + 1]; + int argc; + int i; + + argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); + + if (argc < 2 || argc > MAX_CONF_LINE_ARGS) { + ERROR(("libidnkit: wrong # of args for local-map, line %d\n", + lineno)); + return (idn_invalid_syntax); + } + + if (ctx->local_mapper == NULL) { + r = idn_mapselector_create(&ctx->local_mapper); + if (r != idn_success) { + ERROR(("libidnkit: cannot create local mapper, %s, " + "line %d\n", idn_result_tostring(r), lineno)); + return (r); + } + } + + for (i = 1; i < argc; i++) { + r = idn_mapselector_add(ctx->local_mapper, argv[0], argv[i]); + if (r == idn_invalid_name) { + ERROR(("libidnkit: map scheme unavailable \"%-.30s\"" + " or invalid TLD \"%-.30s\", line %d\n", + argv[i], argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + } + + return (idn_success); +} + +static idn_result_t +parse_nameprep(idn_resconf_t ctx, char *args, int lineno) { + idn_result_t r; + char *argv[MAX_CONF_LINE_ARGS + 1]; + char scheme_name[MAX_CONF_LINE_LENGTH + 1]; + int argc; + + argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); + + if (argc != 1) { + ERROR(("libidnkit: wrong # of args for nameprep, line %d\n", + lineno)); + return (idn_invalid_syntax); + } + + /* + * Set mapper. + */ + r = idn_mapper_create(&ctx->mapper); + if (r != idn_success) { + ERROR(("libidnkit: cannot create mapper, %s, line %d\n", + idn_result_tostring(r), lineno)); + return (r); + } + + r = idn_mapper_add(ctx->mapper, argv[0]); + if (r == idn_invalid_name) { + ERROR(("libidnkit: map scheme unavailable \"%-.30s\", " + "line %d\n", argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + + /* + * Set normalizer. + */ + r = idn_normalizer_create(&ctx->normalizer); + if (r != idn_success) { + ERROR(("libidnkit: cannot create normalizer, %s, line %d\n", + idn_result_tostring(r), lineno)); + return (r); + } + + r = idn_normalizer_add(ctx->normalizer, argv[0]); + if (r == idn_invalid_name) { + ERROR(("libidnkit: unknown normalization scheme \"%-.30s\", " + "line %d\n", argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + + /* + * Set prohibit checker. + */ + r = idn_checker_create(&ctx->prohibit_checker); + if (r != idn_success) { + ERROR(("libidnkit: cannot create prohibit checker, %s, " + "line %d\n", idn_result_tostring(r), lineno)); + return (r); + } + + sprintf(scheme_name, "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, argv[0]); + r = idn_checker_add(ctx->prohibit_checker, scheme_name); + if (r == idn_invalid_name) { + ERROR(("libidnkit: unknown prohibit scheme \"%-.30s\", " + "line %d\n", argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + + /* + * Set unassigned checker. + */ + r = idn_checker_create(&ctx->unassigned_checker); + if (r != idn_success) { + ERROR(("libidnkit: cannot create unassigned checker, %s, " + "line %d\n", idn_result_tostring(r), lineno)); + return (r); + } + + sprintf(scheme_name, "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, argv[0]); + r = idn_checker_add(ctx->unassigned_checker, scheme_name); + if (r == idn_invalid_name) { + ERROR(("libidnkit: unknown unassigned scheme \"%-.30s\", " + "line %d\n", argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + + /* + * Set bidi checker. + */ + r = idn_checker_create(&ctx->bidi_checker); + if (r != idn_success) { + ERROR(("libidnkit: cannot create bidi checker, %s, line %d\n", + idn_result_tostring(r), lineno)); + return (r); + } + + sprintf(scheme_name, "%s%s", IDN_CHECKER_BIDI_PREFIX, argv[0]); + r = idn_checker_add(ctx->bidi_checker, scheme_name); + if (r == idn_invalid_name) { + ERROR(("libidnkit: unknown bidi scheme \"%-.30s\", " + "line %d\n", argv[0], lineno)); + return (r); + } else if (r != idn_success) { + return (r); + } + + return (idn_success); +} + +static int +split_args(char *s, char **av, int max_ac) { + int ac; + int i; + + for (ac = 0; *s != '\0' && ac < max_ac; ac++) { + if (ac > 0) + *s++ = '\0'; + while (isspace((unsigned char)*s)) + s++; + if (*s == '\0') + break; + if (*s == '"' || *s == '\'') { + int qc = *s++; + av[ac] = s; + while (*s != qc) { + if (*s == '\0') + return (-1); + s++; + } + } else { + av[ac] = s; + while (*s != '\0' && !isspace((unsigned char)*s)) + s++; + } + } + + for (i = ac; i < max_ac; i++) + av[i] = NULL; + + return (ac); +} + +static void +resetconf(idn_resconf_t ctx) { +#ifndef WITHOUT_ICONV + idn_resconf_setlocalconverter(ctx, NULL); +#endif + idn_resconf_setidnconverter(ctx, NULL); + idn_resconf_setauxidnconverter(ctx, NULL); + idn_resconf_setdelimitermap(ctx, NULL); + idn_resconf_setlocalmapselector(ctx, NULL); + idn_resconf_setmapper(ctx, NULL); + idn_resconf_setnormalizer(ctx, NULL); + idn_resconf_setprohibitchecker(ctx, NULL); + idn_resconf_setunassignedchecker(ctx, NULL); + idn_resconf_setbidichecker(ctx, NULL); +} + +#ifndef WITHOUT_ICONV +static idn_result_t +update_local_converter(idn_resconf_t ctx) { + idn_result_t r; + const char *old_encoding; + const char *new_encoding; + + /* + * We don't update local converter, if the converter is set + * by idn_resconf_setlocalconverter() or + * idn_resconf_setlocalconvertername(). + */ + if (ctx->local_converter_is_static) + return (idn_success); + + /* + * Update the local converter if the local encoding is changed. + */ + old_encoding = (ctx->local_converter != NULL) ? + idn_converter_localencoding(ctx->local_converter) : + NULL; + new_encoding = idn_localencoding_name(); + if (new_encoding == NULL) { + ERROR(("cannot determine local codeset name\n")); + return (idn_notfound); + } + + if (old_encoding != NULL && + new_encoding != NULL && + strcmp(old_encoding, new_encoding) == 0) { + return (idn_success); + } + + if (ctx->local_converter != NULL) { + idn_converter_destroy(ctx->local_converter); + ctx->local_converter = NULL; + } + + r = idn_converter_create(new_encoding, + &ctx->local_converter, + IDN_CONVERTER_RTCHECK); + return (r); +} +#endif + +idn_result_t +idn_resconf_setdefaults(idn_resconf_t ctx) +{ + idn_result_t r; + + assert(ctx != NULL); + + TRACE(("idn_resconf_setdefaults()\n")); + + resetconf(ctx); + r = idn_delimitermap_create(&ctx->delimiter_mapper); + if (r != idn_success) { + ERROR(("libidnkit: cannot create delimiter mapper, %s\n", + idn_result_tostring(r))); + return (r); + } + + return setdefaults_body(ctx, 0); +} + +static idn_result_t +setdefaults_body(idn_resconf_t ctx, int conf_mask) { + idn_result_t r; + + TRACE(("setdefaults_body()\n")); + assert(ctx != NULL); + + if (!(conf_mask & DEFAULT_CONF_NAMEPREP)) { + TRACE(("set default nameprep\n")); + r = idn_resconf_setnameprepversion(ctx, IDN_NAMEPREP_CURRENT); + if (r != idn_success) { + return (r); + } + } + if (!(conf_mask & DEFAULT_CONF_IDN_ENCODING)) { + TRACE(("set default idn encoding\n")); + r = idn_converter_create(IDN_ENCODING_CURRENT, + &ctx->idn_converter, + IDN_CONVERTER_DELAYEDOPEN | + IDN_CONVERTER_RTCHECK); + if (r != idn_success) { + ERROR(("libidnkit: cannot create idn converter, %s\n", + idn_result_tostring(r))); + return (r); + } + } + + return (idn_success); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/result.c b/contrib/idn/idnkit-1.0-src/lib/result.c new file mode 100644 index 0000000000..ac3d27dca0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/result.c @@ -0,0 +1,76 @@ +#ifndef lint +static char *rcsid = "$Id: result.c,v 1.1 2003/06/04 00:26:12 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include + +static char *result_string[] = { + "success", + "not found", + "invalid encoding found", + "syntax error", + "invalid name", + "invalid message", + "invalid action", + "invalid code point", + "label length reduced to 0 or exceeded 63 bytes", + "buffer overflow", + "no such entry", + "out of memory", + "no such file", + "no mapping to output codeset", + "context information required", + "prohibited character found", + "generic failure", +}; + +char * +idn_result_tostring(idn_result_t result) { + if (result < 0 || result > idn_failure) + return ("unknown result code"); + + return (result_string[result]); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/strhash.c b/contrib/idn/idnkit-1.0-src/lib/strhash.c new file mode 100644 index 0000000000..304953d96c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/strhash.c @@ -0,0 +1,283 @@ +#ifndef lint +static char *rcsid = "$Id: strhash.c,v 1.1 2003/06/04 00:26:13 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +/* + * Initially, the number of hash buckets is INITIAL_HASH_SIZE. + * As the more elements are put in the hash, the number of elements + * per bucket will exceed THRESHOLD eventually. When it happens, + * the number of buckets will be multiplied by FACTOR. + */ +#define INITIAL_HASH_SIZE 67 +#define FACTOR 7 +#define THRESHOLD 5 + +#define HASH_MULT 31 + +typedef struct strhash_entry { + struct strhash_entry *next; + unsigned long hash_value; + char *key; + void *value; +} strhash_entry_t; + +struct idn__strhash { + int nbins; + int nelements; + strhash_entry_t **bins; +}; + +static unsigned long hash_value(const char *key); +static strhash_entry_t *find_entry(strhash_entry_t *entry, const char *key, + unsigned long hash); +static strhash_entry_t *new_entry(const char *key, void *value); +static idn_result_t expand_bins(idn__strhash_t hash, int new_size); + +idn_result_t +idn__strhash_create(idn__strhash_t *hashp) { + idn__strhash_t hash; + idn_result_t r; + + TRACE(("idn__strhash_create()\n")); + + assert(hashp != NULL); + + *hashp = NULL; + + if ((hash = malloc(sizeof(struct idn__strhash))) == NULL) { + WARNING(("idn__strhash_create: malloc failed (hash)\n")); + return (idn_nomemory); + } + hash->nbins = 0; + hash->nelements = 0; + hash->bins = NULL; + if ((r = expand_bins(hash, INITIAL_HASH_SIZE)) != idn_success) { + WARNING(("idn__strhash_create: malloc failed (bins)\n")); + free(hash); + return (r); + } + + *hashp = hash; + + return (idn_success); +} + +void +idn__strhash_destroy(idn__strhash_t hash, idn__strhash_freeproc_t proc) { + int i; + + assert(hash != NULL && hash->bins != NULL); + + for (i = 0; i < hash->nbins; i++) { + strhash_entry_t *bin = hash->bins[i]; + strhash_entry_t *next; + + while (bin != NULL) { + next = bin->next; + if (proc != NULL) + (*proc)(bin->value); + free(bin); + bin = next; + } + } + free(hash->bins); + free(hash); +} + +idn_result_t +idn__strhash_put(idn__strhash_t hash, const char *key, void *value) { + unsigned long h, h_index; + strhash_entry_t *entry; + + assert(hash != NULL && key != NULL); + + h = hash_value(key); + h_index = h % hash->nbins; + + if ((entry = find_entry(hash->bins[h_index], key, h)) != NULL) { + /* Entry exists. Replace the value. */ + entry->value = value; + } else { + /* Create new entry. */ + if ((entry = new_entry(key, value)) == NULL) { + return (idn_nomemory); + } + /* Insert it to the list. */ + entry->next = hash->bins[h_index]; + hash->bins[h_index] = entry; + hash->nelements++; + + if (hash->nelements > hash->nbins * THRESHOLD) { + idn_result_t r; + r = expand_bins(hash, hash->nbins * FACTOR); + if (r != idn_success) { + TRACE(("idn__strhash_put: hash table " + "expansion failed\n")); + } + } + } + + return (idn_success); +} + +idn_result_t +idn__strhash_get(idn__strhash_t hash, const char *key, void **valuep) { + unsigned long h; + strhash_entry_t *entry; + + assert(hash != NULL && key != NULL && valuep != NULL); + + h = hash_value(key); + entry = find_entry(hash->bins[h % hash->nbins], key, h); + if (entry == NULL) + return (idn_noentry); + + *valuep = entry->value; + return (idn_success); +} + +int +idn__strhash_exists(idn__strhash_t hash, const char *key) { + unsigned long h; + + assert(hash != NULL && key != NULL); + + h = hash_value(key); + return (find_entry(hash->bins[h % hash->nbins], key, h) != NULL); +} + +static unsigned long +hash_value(const char *key) { + unsigned long h = 0; + unsigned char *p = (unsigned char *)key; + int c; + + while ((c = *p++) != '\0') { + h = h * HASH_MULT + c; + } + return (h); +} + +static strhash_entry_t * +find_entry(strhash_entry_t *entry, const char *key, unsigned long hash) { + assert(key != NULL); + + while (entry != NULL) { + if (entry->hash_value == hash && strcmp(key, entry->key) == 0) + return (entry); + entry = entry->next; + } + return (NULL); +} + +static strhash_entry_t * +new_entry(const char *key, void *value) { + strhash_entry_t *entry; + int len; + + assert(key != NULL); + + len = strlen(key) + 1; + if ((entry = malloc(sizeof(strhash_entry_t) + len)) == NULL) { + return (NULL); + } + entry->next = NULL; + entry->hash_value = hash_value(key); + entry->key = (char *)(entry + 1); + (void)strcpy(entry->key, key); + entry->value = value; + + return (entry); +} + +static idn_result_t +expand_bins(idn__strhash_t hash, int new_size) { + strhash_entry_t **old_bins, **new_bins; + int old_size; + int old_index, new_index; + + new_bins = malloc(sizeof(strhash_entry_t *) * new_size); + if (new_bins == NULL) + return (idn_nomemory); + + memset(new_bins, 0, sizeof(strhash_entry_t *) * new_size); + + old_bins = hash->bins; + old_size = hash->nbins; + for (old_index = 0; old_index < old_size; old_index++) { + strhash_entry_t *entries = old_bins[old_index]; + + while (entries != NULL) { + strhash_entry_t *e = entries; + + /* Remove the top element from the linked list. */ + entries = entries->next; + + /* ..and move to the new hash. */ + new_index = e->hash_value % new_size; + e->next = new_bins[new_index]; + new_bins[new_index] = e; + } + } + + hash->nbins = new_size; + hash->bins = new_bins; + + if (old_bins != NULL) + free(old_bins); + + return (idn_success); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/Makefile.in b/contrib/idn/idnkit-1.0-src/lib/tests/Makefile.in new file mode 100644 index 0000000000..6e5a2c350f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/Makefile.in @@ -0,0 +1,304 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:26:46 marka Exp $ +# Copyright (c) 2000, 2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +.SUFFIXES: +.SUFFIXES: .tsy .c + +top_builddir = ../.. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +CC = @CC@ +SHELL = @SHELL@ +LIBTOOL = @LIBTOOL@ + +ICONVINC = @ICONVINC@ +ICONVLIB = @ICONVLIB@ +IDNLIB = ../libidntest.la +IDNLITELIB = ../libidntestlite.la + +INCS = -I. -I$(srcdir) -I$(srcdir)/../../include -I../../include $(ICONVINC) +DEFS = + +CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ +LDFLAGS = @LDFLAGS@ +TSYFLAGS = + +PERL = @PERL@ + +COMMONSRCS = testsuite.c testutil.c setenv.c +COMMONOBJS = testsuite.lo testutil.lo setenv.lo +BUILTSRCS = api.c api-init1.c api-init2.c api-init3.c \ + api-init4-1.c api-init4-2.c api-init4-3.c \ + api-init5-1.c api-init5-2.c api-init5-3.c \ + res.c resconf.c mapselector.c checker.c converter.c mapper.c \ + normalizer.c delimitermap.c ucs4.c nameprep.c \ + testconfig.h + +TESTS = api-test \ + api-init1-test \ + api-init2-test \ + api-init3-test \ + api-init4-1-test \ + api-init4-2-test \ + api-init4-3-test \ + api-init5-1-test \ + api-init5-2-test \ + api-init5-3-test \ + res-test \ + resconf-test \ + mapselector-test \ + converter-test \ + checker-test \ + mapper-test \ + normalizer-test \ + delimitermap-test \ + ucs4-test \ + nameprep-test + +LITETESTS = apilite-test \ + reslite-test \ + resconflite-test \ + converterlite-test + +.tsy.c: + rm -f $@ $@.tmp + $(PERL) $(srcdir)/testygen -o $@ $(TSYFLAGS) $< + $(PERL) $(srcdir)/utffilter $@ > $@.tmp + mv -f $@.tmp $@ + +all: + +install: + +clean: + rm -f *.o *.lo *.tmp core *.core *~ + rm -f $(TESTS) $(LITETESTS) $(BUILTSRCS) + rm -f test.conf testalias.conf test.map + rm -f iconvchk + rm -fr .libs/ + +distclean: clean + rm -f Makefile + +@LITEONLY_TRUE@test check: test-lite +@LITEONLY_FALSE@test check: test-nolite + +test-lite: $(LITETESTS) + @for i in $(LITETESTS); do \ + echo "Run test program: $$i"; \ + ./$$i; \ + echo; \ + done + +test-nolite: $(TESTS) $(LITETESTS) iconvchk + @./iconvchk + @for i in $(TESTS) $(LITETESTS); do \ + echo "Run test program: $$i"; \ + ./$$i; \ + echo; \ + done + +api-test: api.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api.lo: api.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api.c + +apilite-test: apilite.lo $(IDNLITELIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + apilite.lo $(COMMONOBJS) $(IDNLITELIB) +apilite.lo: api.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DWITHOUT_ICONV -o $@ \ + -c api.c + +api-init1-test: api-init1.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init1.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init1.lo: api-init1.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init1.c + +api-init2-test: api-init2.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init2.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init2.lo: api-init2.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init2.c + +api-init3-test: api-init3.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init3.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init3.lo: api-init3.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init3.c + +api-init4-1-test: api-init4-1.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init4-1.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init4-1.lo: api-init4-1.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init4-1.c + +api-init4-2-test: api-init4-2.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init4-2.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init4-2.lo: api-init4-2.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init4-2.c + +api-init4-3-test: api-init4-3.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init4-3.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init4-3.lo: api-init4-3.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init4-3.c + +api-init5-1-test: api-init5-1.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init5-1.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init5-1.lo: api-init5-1.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init5-1.c + +api-init5-2-test: api-init5-2.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init5-2.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init5-2.lo: api-init5-2.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init5-2.c + +api-init5-3-test: api-init5-3.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + api-init5-3.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +api-init5-3.lo: api-init5-3.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c api-init5-3.c + +res-test: res.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + res.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +res.lo: res.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c res.c + +reslite-test: reslite.lo $(IDNLITELIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + reslite.lo $(COMMONOBJS) $(IDNLITELIB) +reslite.lo: res.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DWITHOUT_ICONV -o $@ \ + -c res.c + +resconf-test: resconf.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + resconf.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +resconf.lo: resconf.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c resconf.c + +resconflite-test: resconflite.lo $(IDNLITELIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + resconflite.lo $(COMMONOBJS) $(IDNLITELIB) +resconflite.lo: resconf.c testconfig.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DWITHOUT_ICONV -o $@ \ + -c resconf.c + +mapselector-test: mapselector.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + mapselector.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +mapselector.lo: mapselector.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c mapselector.c + +converter-test: converter.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + converter.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +converter.lo: converter.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c converter.c + +converterlite-test: converterlite.lo $(IDNLITELIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + converterlite.lo $(COMMONOBJS) $(IDNLITELIB) +converterlite.lo: converter.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DWITHOUT_ICONV -o $@ \ + -c converter.c + +checker-test: checker.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + checker.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +checker.lo: checker.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c checker.c + +mapper-test: mapper.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + mapper.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +mapper.lo: mapper.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c mapper.c + +normalizer-test: normalizer.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + normalizer.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +normalizer.lo: normalizer.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c normalizer.c + +delimitermap-test: delimitermap.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + delimitermap.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +delimitermap.lo: delimitermap.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c delimitermap.c + +ucs4-test: ucs4.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + ucs4.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +ucs4.lo: ucs4.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c ucs4.c + +nameprep-test: nameprep.lo $(IDNLIB) $(COMMONOBJS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + nameprep.lo $(COMMONOBJS) $(IDNLIB) $(ICONVLIB) +nameprep.lo: nameprep.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c nameprep.c + +testsuite.lo: testsuite.c testsuite.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $(srcdir)/testsuite.c +testutil.lo: testutil.c testutil.h + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $(srcdir)/testutil.c +setenv.lo: setenv.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -o $@ -c $(srcdir)/setenv.c + +testconfig.h: ../../include/config.h + rm -f testconfig.h + sed -n -e '/HAVE_SETENV/p' -e '/HAVE_UNSETENV/p' \ + ../../include/config.h > testconfig.h + +iconvchk: iconvchk.c codeset.h + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o $@ \ + $(srcdir)/iconvchk.c $(IDNLIB) $(ICONVLIB) diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init1.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init1.tsy new file mode 100644 index 0000000000..ae9dd2b7cf --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init1.tsy @@ -0,0 +1,113 @@ +#ifndef lint +static char *rcsid = "$Id: api-init1.tsy,v 1.1 2003/06/04 00:26:46 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" +#include "testutil.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: nameinit(0) +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(0); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); + + r = idn_decodename(IDN_DECODE_APP, "xn--l8j", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); + + r = idn_decodename2(IDN_DECODE_APP, "xn--l8j", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init2.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init2.tsy new file mode 100644 index 0000000000..7ce1bbf3a7 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init2.tsy @@ -0,0 +1,113 @@ +#ifndef lint +static char *rcsid = "$Id: api-init2.tsy,v 1.1 2003/06/04 00:26:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" +#include "testutil.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: nameinit(1) +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(1); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); + + r = idn_decodename(IDN_DECODE_APP, "xn--l8j", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); + + r = idn_decodename2(IDN_DECODE_APP, "xn--l8j", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init3.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init3.tsy new file mode 100644 index 0000000000..96aa01d7a4 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init3.tsy @@ -0,0 +1,117 @@ +#ifndef lint +static char *rcsid = "$Id: api-init3.tsy,v 1.1 2003/06/04 00:26:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" +#include "testutil.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call nameinit() twice +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(1); + ASSERT_RESULT(r, idn_success); + r = idn_nameinit(0); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); + + r = idn_decodename(IDN_DECODE_APP, "xn--l8j", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); + + r = idn_decodename2(IDN_DECODE_APP, "xn--l8j", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); + + remove(CONF_FILENAME); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-1.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-1.tsy new file mode 100644 index 0000000000..9212f826f4 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-1.tsy @@ -0,0 +1,96 @@ +#ifndef lint +static char *rcsid = "$Id: api-init4-1.tsy,v 1.1 2003/06/04 00:26:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "testutil.h" + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call encodename() without initialization +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-2.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-2.tsy new file mode 100644 index 0000000000..119efe2c1c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-2.tsy @@ -0,0 +1,96 @@ +#ifndef lint +static char *rcsid = "$Id: api-init4-2.tsy,v 1.1 2003/06/04 00:26:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "testutil.h" + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call decodename() without initialization +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename(IDN_DECODE_APP, "xn--l8j", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-3.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-3.tsy new file mode 100644 index 0000000000..7423a0696d --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init4-3.tsy @@ -0,0 +1,102 @@ +#ifndef lint +static char *rcsid = "$Id: api-init4-3.tsy,v 1.1 2003/06/04 00:26:47 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" +#include "testutil.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call decodename2() without initialization +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename2(IDN_DECODE_APP, "xn--l8j", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-1.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-1.tsy new file mode 100644 index 0000000000..3399f912c2 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-1.tsy @@ -0,0 +1,102 @@ +#ifndef lint +static char *rcsid = "$Id: api-init5-1.tsy,v 1.1 2003/06/04 00:26:48 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "testutil.h" + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call encodename() and nameinit() +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "aaa", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(1); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--l8j"); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-2.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-2.tsy new file mode 100644 index 0000000000..f45f072a10 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-2.tsy @@ -0,0 +1,102 @@ +#ifndef lint +static char *rcsid = "$Id: api-init5-2.tsy,v 1.1 2003/06/04 00:26:48 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "testutil.h" + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call decodename() and nameinit() +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename(IDN_DECODE_APP, "aaa", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(1); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename(IDN_DECODE_APP, "xn--l8j", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-3.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-3.tsy new file mode 100644 index 0000000000..89402493b6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api-init5-3.tsy @@ -0,0 +1,109 @@ +#ifndef lint +static char *rcsid = "$Id: api-init5-3.tsy,v 1.1 2003/06/04 00:26:48 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" +#include "testutil.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#define CONF_FILENAME "test.conf" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: init +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + create_conf_file(CONF_FILENAME, 0, + "idn-encoding UTF-8", + NULL); +} + +//# TEARDOWN +// group: init +{ + remove(CONF_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call decodename2() and nameinit() +// group: init +{ + r = idn__setconffile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename2(IDN_DECODE_APP, "aaa", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + + r = idn_nameinit(1); + ASSERT_RESULT(r, idn_success); + + r = idn_decodename2(IDN_DECODE_APP, "xn--l8j", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/api.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/api.tsy new file mode 100644 index 0000000000..356c1771af --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/api.tsy @@ -0,0 +1,1009 @@ +#ifndef lint +static char *rcsid = "$Id: api.tsy,v 1.1 2003/06/04 00:26:50 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +/* + * U+304B: hiragana letter KA + * U+3099: combining katakana-hiragana voiced sound mark + * + * map("U+304B U+3099") -> "U+304C" + * + * U+304C: hiragana letter GA + */ +#define UTF8_NAME "A" +#define UTF8_REVNAME "a" + +/* + * A4AC: hiragana letter GA (in EUC-JP) + */ +#define EUCJP_NAME "\xa4\xac" +#define EUCJP_REVNAME "\xa4\xac" + +/* + * Conversion result of "U+304B U+3099 A" + */ +#define PUNYCODE_NAME "xn--a-i8t" + +/* + * Conversion result of "A U+304B U+3099" (in EUC-JP). + */ +#define AUX_EUCJP_NAME "xn--a-i\xa3\xb8t" + + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic-conversion +//-- +// Initialize the `api' module. +// Set local encoding to `UTF-8'. +{ + char to[256]; + idn_result_t r; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + idn_nameinit(0); +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: basic conversion by encodename() +// group: generic-conversion +{ + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: basic conversion by decodename() +// group: generic-conversion +{ + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +} + +//# TESTCASE +// title: basic conversion by decodename2() +// group: generic-conversion +{ + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); +#ifdef WITHOUT_ICONV + ASSERT_RESULT(r, idn_failure); +#else + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: call decodename2() with auxencoding=NULL +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to), + NULL); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=0 +// group: generic-conversion +{ + r = idn_encodename(0, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call decodename() with actions=0 +// group: generic-conversion +{ + r = idn_decodename(0, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call decodename2() with actions=0 +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(0, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=rtcheck +// group: generic-conversion quiet +{ + r = idn_encodename(IDN_RTCHECK, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-query +// group: generic-conversion quiet +{ + r = idn_encodename(IDN_DECODE_QUERY, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-app +// group: generic-conversion quiet +{ + r = idn_encodename(IDN_DECODE_APP, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-stored +// group: generic-conversion quiet +{ + r = idn_encodename(IDN_DECODE_STORED, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=(1<<31) +// group: generic-conversion quiet +{ + r = idn_encodename(1 << 31, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename() with actions=localmap +// group: generic-conversion quiet +{ + r = idn_decodename(IDN_LOCALMAP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=localmap +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_LOCALMAP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=lencheck +// group: generic-conversion quiet +{ + r = idn_decodename(IDN_LENCHECK, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=lencheck +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_LENCHECK, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-query +// group: generic-conversion quiet +{ + r = idn_decodename(IDN_ENCODE_QUERY, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-query +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_ENCODE_QUERY, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-app +// group: generic-conversion quiet +{ + r = idn_decodename(IDN_ENCODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-app +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_ENCODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-stored +// group: generic-conversion quiet +{ + r = idn_decodename(IDN_ENCODE_STORED, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-stored +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_ENCODE_STORED, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=(1<<31) +// group: generic-conversion quiet +{ + r = idn_decodename(1 << 31, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=(1<<31) +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(1 << 31, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=localconv +// group: generic-conversion quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_encodename(IDN_LOCALCONV, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=localconv +// group: generic-conversion quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename(IDN_LOCALCONV, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename2() with actions=localconv +// group: generic-conversion +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_LOCALCONV, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_failure); +#endif +} + +//# TESTCASE +// title: call enable(0) and then encodename() +// group: generic-conversion +{ + idn_enable(0); + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call decodename() when IDN_DISABLE is defined +// group: generic-conversion +{ + idn_enable(0); + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call decodename() when IDN_DISABLE is defined +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + idn_enable(0); + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: call enable(0) and then encodename() +// group: generic-conversion +{ + idn_enable(0); + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call enable(0) and then decodename() +// group: generic-conversion +{ + idn_enable(0); + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call enable(0) and then decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + idn_enable(0); + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: set IDN_DISABLE and call encodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE and call decodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE and call decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + setenv("IDN_DISABLE", "1", 1); + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and encodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + idn_enable(1); + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and decodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + idn_enable(1); + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + setenv("IDN_DISABLE", "1", 1); + idn_enable(1); + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: overrun test for arg `to' of encodename() +// group: generic-conversion +{ + /* Normal case */ + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, + strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, + strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* enable(0) case */ + idn_enable(0); + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, + strlen(UTF8_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); + + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, + strlen(UTF8_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_enable(1); + r = idn_encodename(0, UTF8_NAME, to, strlen(UTF8_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); + + r = idn_encodename(0, UTF8_NAME, to, strlen(UTF8_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: overrun test for arg `to' of decodename() +// group: generic-conversion +{ + /* Normal case */ + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(UTF8_REVNAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); + + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(UTF8_REVNAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* idn_enable(0) case */ + idn_enable(0); + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_enable(1); + r = idn_decodename(0, PUNYCODE_NAME, to, strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_decodename(0, PUNYCODE_NAME, to, strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: overrun test for arg `to' of decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* Normal case */ + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(UTF8_REVNAME) + 1, EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); + + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(UTF8_REVNAME), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* idn_enable(0) case */ + idn_enable(0); + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME) + 1, EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); + + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_enable(1); + r = idn_decodename2(0, AUX_EUCJP_NAME, to, strlen(AUX_EUCJP_NAME) + 1, + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); + + r = idn_decodename2(0, AUX_EUCJP_NAME, to, strlen(AUX_EUCJP_NAME), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + +#endif +} + +//# TESTCASE +// title: call encodename() with tolen=0 +// group: generic-conversion +{ + r = idn_encodename(IDN_ENCODE_APP, UTF8_NAME, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call decodename() with tolen=0 +// group: generic-conversion +{ + r = idn_decodename(IDN_DECODE_APP, PUNYCODE_NAME, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call decodename2() with tolen=0 +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_DECODE_APP, AUX_EUCJP_NAME, to, 0, + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); +#endif +} + +//# TESTCASE +// title: convert an empty string using encodename() +// group: generic-conversion +{ + r = idn_encodename(IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} + +//# TESTCASE +// title: convert an empty string using decodename() +// group: generic-conversion +{ + r = idn_decodename(IDN_DECODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} + +//# TESTCASE +// title: convert an empty string using decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_decodename2(IDN_DECODE_APP, "", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +#endif +} + +//# TESTCASE +// title: prohcheck by encodename() +// group: generic-conversion +{ + /* U+1680: prohibited character */ + r = idn_encodename(IDN_PROHCHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: unascheck by encodename() +// group: generic-conversion +{ + /* U+0221: unassigned codepoint */ + r = idn_encodename(IDN_UNASCHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: bidicheck by encodename() +// group: generic-conversion +{ + /* U+05D0: bidirectional property is "R" */ + /* `a': bidirectional property is "L" */ + /* `0', `-': bidirectional property is "N" */ + r = idn_encodename(IDN_BIDICHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_BIDICHECK, "", + to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_BIDICHECK, "-a", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_BIDICHECK, "-a-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_BIDICHECK, "a-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_BIDICHECK, "-0", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_BIDICHECK, "-0-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_BIDICHECK, "0-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: asccheck by encodename() +// group: generic-conversion +{ + r = idn_encodename(IDN_ASCCHECK, "-name", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_ASCCHECK, "name-", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_encodename(IDN_ASCCHECK, "n ame", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: lencheck by encodename() +// group: generic-conversion +{ + r = idn_encodename(IDN_LENCHECK, + "123456789-123456789-123456789-123456789-" + "123456789-123456789-123", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_encodename(IDN_LENCHECK, + "123456789-123456789-123456789-123456789-" + "123456789-123456789-1234", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_length); + + r = idn_encodename(IDN_LENCHECK, "a..b", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_length); +} + +//# TESTCASE +// title: rtcheck non-prohchecked label by decodename() +// group: generic-conversion +{ + /* "xn--6ue" -> "U+1680" (prohibited character) */ + r = idn_decodename(IDN_RTCHECK, "xn--6ue", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6ue"); +} + +//# TESTCASE +// title: rtcheck non-unaschecked label by decodename() +// group: generic-conversion +{ + /* "xn--6la" -> "U+0221" (unassigned codepoint) */ + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK | IDN_UNASCHECK, + "xn--6la", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6la"); +} + +//# TESTCASE +// title: rtcheck non-ascchecked label by decodename() +// group: generic-conversion +{ + /* "xn----x7t" -> "- U+3042" */ + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----x7t", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----x7t"); + + /* "xn----w7t" -> "U+3042 -" */ + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----w7t", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----w7t"); +} + +//# TESTCASE +// title: rtcheck non-lenchecked label by decodename() +// group: generic-conversion +{ + /* `s1' has 63 characters */ + const char *s1 = + "xn--l8jaa5522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + const char *s1rev = + "" + "" + ""; + + /* `s2' has 64 characters */ + const char *s2 = + "xn--a-w7ta6522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + /* `s3' has an empty label */ + const char *s3 = "a..b"; + + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK, s1, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s1rev); + + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK, s2, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s2); + + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK, s3, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s3); +} + +//# TESTCASE +// title: rtcheck non-prohchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn--6ue" -> "U+1680" (prohibited character) */ + r = idn_decodename2(IDN_RTCHECK, "xn--6ue", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6ue"); +#endif +} + +//# TESTCASE +// title: rtcheck non-unaschecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn--6la" -> "U+0221" (unassigned codepoint) */ + r = idn_decodename2(IDN_IDNCONV | IDN_RTCHECK | IDN_UNASCHECK, + "xn--6la", to, sizeof(to), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6la"); +#endif +} + +//# TESTCASE +// title: rtcheck non-ascchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn----x7t" -> "- U+3042" */ + r = idn_decodename2(IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----x7t", to, sizeof(to), EUCJP_ENCODING_NAME); + + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----x7t"); + + /* "xn----w7t" -> "U+3042 -" */ + r = idn_decodename2(IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----w7t", to, sizeof(to), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----w7t"); +#endif +} + +//# TESTCASE +// title: rtcheck non-lenchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* `s1' has 63 characters */ + const char *s1 = + "xn--l8jaa5522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + const char *s1rev = + "" + "" + ""; + + /* `s2' has 64 characters */ + const char *s2 = + "xn--a-w7ta6522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + /* `s3' has an empty label */ + const char *s3 = "a..b"; + + r = idn_decodename2(IDN_IDNCONV | IDN_RTCHECK, s1, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s1rev); + + r = idn_decodename2(IDN_IDNCONV | IDN_RTCHECK, s2, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s2); + + r = idn_decodename(IDN_IDNCONV | IDN_RTCHECK, s3, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s3); +#endif +} + +//# TESTCASE +// title: pass broken string as `from' to encodename() +// group: generic-conversion quiet +{ + /* "\xe3\x21" is not valid UTF-8 string */ + r = idn_encodename(IDN_ENCODE_APP, "\xe3\x21", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: pass broken string as `from' to decodename() +// group: generic-conversion quiet +{ + /* "\xe3\x21" is not valid UTF-8 string */ + r = idn_decodename(IDN_DECODE_APP, "\xe3\x21", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: pass broken string as `from' to decodename2() +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "\xa4\x21" is not valid EUC-JP string */ + r = idn_decodename2(IDN_DECODE_APP, "\xa4\x21", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_encoding); +#endif +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/checker.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/checker.tsy new file mode 100644 index 0000000000..13a300cebe --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/checker.tsy @@ -0,0 +1,610 @@ +#ifndef lint +static char *rcsid = "$Id: checker.tsy,v 1.1 2003/06/04 00:26:51 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "testutil.h" + +#define SIZEOFUCS4(x) (sizeof(x) / sizeof(unsigned long)) + +#define UCS4_NAME_STR "U+304C" /* hiragana letter ga */ +#define UCS4_NAME 0x304C + +#define BUF_SIZE 128 +#define ARRAY_SIZE 9 + +#define CONF_FILENAME "test.map" + +#define LINEBUF_SIZE 2001 + +/* + * Sample strings for `from' argument of normalize(), + * and its expected outputs. + */ +const unsigned long from[4] = { + UCS4_NAME, + 0x00A0, /* no-break space: prohibited character */ + 0x0221, /* unassigned character */ + 0x0000 +}; + + +#define FROM_UCS4NAME_OFFSET 0 +#define FROM_PROH_OFFSET 1 +#define FROM_UNAS_OFFSET 2 + +const unsigned long from2[4] = { + UCS4_NAME, + 0x0221, /* unassigned character */ + 0x00A0, /* no-break space: prohibited character */ + 0x0000 +}; + +#define FROM2_UCS4NAME_OFFSET 0 +#define FROM2_PROH_OFFSET 2 +#define FROM2_UNAS_OFFSET 1 + +static const unsigned long bidi_from[4] = { + 0x05BE, /* hebrew punctuation maqaf */ + 0x0041, /* latin capital letter a */ + 0xFEFC, /* arabic ligature lam with alef final form */ + 0x0000 +}; +#define BIDIFROM_OFFSET 1 + +idn_result_t +test_createproc(const char *parameter, void **ctxp) +{ + return (idn_success); +} + +void +test_destroyproc(void *ctx) +{ +} + +#define FOUNDPTR_OFFSET 2 +idn_result_t +test_lookupproc(void *ctx, const unsigned long *ucs4, + const unsigned long **found) +{ + *found = ucs4 + FOUNDPTR_OFFSET; + return (idn_success); +} + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_checker_t ctx = NULL; + char name[BUF_SIZE]; + + r = idn_checker_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_checker_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic +//-- +// Destroy context. +{ + if (ctx != NULL) + idn_checker_destroy(ctx); +} + +//# SETUP +// group: lookup +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_checker_t ctx = NULL; + char name[BUF_SIZE]; + const unsigned long *ptr; + + r = idn_checker_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_checker_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: lookup +//-- +// Destroy context. +{ + if (ctx != NULL) + idn_checker_destroy(ctx); +} + +//# SETUP +// group: addall +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_checker_t ctx = NULL; + char *names[ARRAY_SIZE]; + int i; + const unsigned long *ptr; + + for (i = 0; i < ARRAY_SIZE; i++) { + names[i] = malloc(BUF_SIZE); + if (names[i] == NULL) { + ASSERT("malloc failed\n"); + } + } + + r = idn_checker_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_checker_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: addall +//-- +// Destroy context and free some blocks. +{ + if (ctx != NULL) + idn_checker_destroy(ctx); + for (i = 0; i < ARRAY_SIZE; i++) { + free(names[i]); + } +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: idn_checker_add() - boundary condition +// group: generic quiet +{ + r = idn_checker_add(ctx, ""); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_add() - builtin schemes, prohibit +// group: generic quiet +{ + sprintf(name, "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + sprintf(name, "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "nameprep-01"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_add() - builtin schemes, unassigned +// group: generic quiet +{ + sprintf(name, "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + sprintf(name, "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "nameprep-01"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_add() - builtin schemes, bidi +// group: generic quiet +{ + sprintf(name, "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + sprintf(name, "%s%s", IDN_CHECKER_BIDI_PREFIX, "nameprep-01"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_add() - file - boundary condition +// group: generic quiet +{ + sprintf(name, "%sfileset:%s", IDN_CHECKER_UNASSIGNED_PREFIX, ""); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_nofile); + sprintf(name, "%sfileset:%s", IDN_CHECKER_PROHIBIT_PREFIX, ""); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_nofile); + sprintf(name, "%sfileset:%s", IDN_CHECKER_BIDI_PREFIX, ""); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_add() - file - long line +// group: generic quiet +{ + char line[LINEBUF_SIZE]; + const char *first_entry = "304C;"; + const char *other_entry = " 304D"; + int i; + int len; + + memcpy(line, first_entry, strlen(first_entry)); + len = strlen(other_entry); + for (i = len; i < LINEBUF_SIZE - len; i += len) { + memcpy(line + i, other_entry, len); + } + *(line + i) = '\0'; + + create_conf_file(CONF_FILENAME, 0, line, NULL); + sprintf(name, "%sfileset:%s", IDN_CHECKER_UNASSIGNED_PREFIX, + CONF_FILENAME); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_syntax); + sprintf(name, "%sfileset:%s", IDN_CHECKER_PROHIBIT_PREFIX, + CONF_FILENAME); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_checker_add() - file, prohibit +// group: lookup +{ + create_conf_file(CONF_FILENAME, 0, + UCS4_NAME_STR, + NULL); + sprintf(name, "%sfileset:%s", IDN_CHECKER_PROHIBIT_PREFIX, + CONF_FILENAME); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_UCS4NAME_OFFSET); + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_UCS4NAME_OFFSET); +} + +//# TESTCASE +// title: idn_checker_add() - file, unassigned +// group: lookup +{ + create_conf_file(CONF_FILENAME, 0, + UCS4_NAME_STR, + NULL); + sprintf(name, "%sfileset:%s", IDN_CHECKER_UNASSIGNED_PREFIX, + CONF_FILENAME); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_UCS4NAME_OFFSET); + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_UCS4NAME_OFFSET); +} + +//# TESTCASE +// title: idn_checker_add() - file, bidi +// group: lookup quiet +{ + create_conf_file(CONF_FILENAME, 0, + UCS4_NAME_STR, + NULL); + sprintf(name, "%sfileset:%s", IDN_CHECKER_BIDI_PREFIX, + CONF_FILENAME); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_addall() - boundary condition - scheme name +// group: addall quiet +{ + sprintf(names[0], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[1], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[2], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[3], "%s%s", IDN_CHECKER_BIDI_PREFIX, ""); + r = idn_checker_addall(ctx, (const char **)names, 4); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_checker_addall() - boundary condition - nschemes = 0 +// group: addall quiet +{ + sprintf(names[0], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "nameprep-01"); + sprintf(names[1], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "nameprep-01"); + sprintf(names[2], "%s%s", IDN_CHECKER_BIDI_PREFIX, ""); + sprintf(names[3], "%s%s", IDN_CHECKER_BIDI_PREFIX, "nameprep-01"); + r = idn_checker_addall(ctx, (const char **)names, 0); + ASSERT_RESULT(r, idn_success); + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, NULL); +} + +//# TESTCASE +// title: idn_checker_addall() - add a lot of schemes #1 +// group: addall +{ + sprintf(names[0], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[1], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[2], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[3], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[4], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[5], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[6], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[7], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[8], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + + r = idn_checker_addall(ctx, (const char **)names, 9); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_PROH_OFFSET); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_PROH_OFFSET); + + r = idn_checker_lookup(ctx, bidi_from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, bidi_from + BIDIFROM_OFFSET); +} + +//# TESTCASE +// title: idn_checker_addall() - add a lot of schemes #2 +// group: addall +{ + sprintf(names[0], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[1], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[2], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[3], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[4], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[5], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + sprintf(names[6], "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + sprintf(names[7], "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + sprintf(names[8], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + + r = idn_checker_addall(ctx, (const char **)names, 9); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_UNAS_OFFSET); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_UNAS_OFFSET); + + r = idn_checker_lookup(ctx, bidi_from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, bidi_from + BIDIFROM_OFFSET); +} + +//# TESTCASE +// title: idn_checker_addall() - add same scheme repetedly +// group: addall +{ + int i; + + sprintf(names[0], "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + for (i = 1; i < ARRAY_SIZE; i++) { + strcpy(names[i], names[0]); + } + r = idn_checker_addall(ctx, (const char **)names, ARRAY_SIZE); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_PROH_OFFSET); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_PROH_OFFSET); +} + +//# TESTCASE +// title: idn_checker_lookup() - builtin schemes - RFC3491 prohibit +// group: lookup +{ + sprintf(name, "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_PROH_OFFSET); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_PROH_OFFSET); +} + +//# TESTCASE +// title: idn_checker_lookup() - builtin schemes - RFC3491 unassigned +// group: lookup +{ + sprintf(name, "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FROM_UNAS_OFFSET); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from2 + FROM2_UNAS_OFFSET); +} + +//# TESTCASE +// title: idn_checker_lookup() - builtin schemes - RFC3491 bidi +// group: lookup +{ + sprintf(name, "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, bidi_from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, bidi_from + BIDIFROM_OFFSET); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, NULL); + + r = idn_checker_lookup(ctx, from2, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, NULL); +} + +//# TESTCASE +// title: idn_checker_lookup() - context without procedure +// group: lookup +{ + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, NULL); +} + +//# TESTCASE +// title: idn_checker_lookup() - string in ascii +// group: lookup +{ + char *ascii_str = "test"; + unsigned long ucs4_str[5]; + + r = idn_ucs4_utf8toucs4(ascii_str, ucs4_str, SIZEOFUCS4(ucs4_str)); + + sprintf(name, "%s%s", IDN_CHECKER_PROHIBIT_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + sprintf(name, "%s%s", IDN_CHECKER_UNASSIGNED_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + sprintf(name, "%s%s", IDN_CHECKER_BIDI_PREFIX, "RFC3491"); + r = idn_checker_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_checker_lookup(ctx, ucs4_str, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, NULL); +} + +//# TESTCASE +// title: idn_checker_destroy(), idn_checker_incrref() +// group: +{ + idn_result_t r; + idn_checker_t ctx = NULL; + + r = idn_checker_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_checker_create(&ctx); + ASSERT_RESULT(r, idn_success); + idn_checker_incrref(ctx); + idn_checker_destroy(ctx); + idn_checker_destroy(ctx); +} + +//# TESTCASE +// title: idn_checker_register() +// group: generic +{ + const unsigned long *ptr = NULL; + + r = idn_checker_register("test", + test_createproc, + test_destroyproc, + test_lookupproc); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_add(ctx, "test"); + ASSERT_RESULT(r, idn_success); + + r = idn_checker_lookup(ctx, from, &ptr); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(ptr, from + FOUNDPTR_OFFSET); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/codeset.h b/contrib/idn/idnkit-1.0-src/lib/tests/codeset.h new file mode 100644 index 0000000000..263a7ea337 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/codeset.h @@ -0,0 +1,71 @@ +/* $Id: codeset.h,v 1.1 2003/06/04 00:26:51 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef CODESET_H +#define CODESET_H + +/* + * Character encoding name that iconv() recognizes as Japanese EUC. + * + * Please edit the cpp macro definition if iconv() on the system doesn't + * recognize "EUC-JP". + * + * NOTE: + * Konstantin Chuguev's iconv-2.0 doesn't accept "eucJP", but "euc-jp". + */ +#define EUCJP_ENCODING_NAME "eucJP" + + +/* + * Character encoding name that iconv() recognizes as Japanese Shift JIS. + * + * Please edit the cpp macro definition if iconv() on the system doesn't + * recognize "SJIS". + * + * NOTE: + * Konstantin Chuguev's iconv-2.0 doesn't accept "SJIS", but "Shift_JIS". + */ +#define SJIS_ENCODING_NAME "SJIS" + +#endif /* CODESET_H */ diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/converter.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/converter.tsy new file mode 100644 index 0000000000..bbefc38d1a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/converter.tsy @@ -0,0 +1,822 @@ +#ifndef lint +static char *rcsid = "$Id: converter.tsy,v 1.1 2003/06/04 00:26:53 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "testutil.h" + + +#ifndef IDN_PUNYCODE_ENCODING_NAME +#define IDN_PUNYCODE_ENCODING_NAME "Punycode" +#endif + +#ifndef IDN_UTF8_ENCODING_NAME +#define IDN_UTF8_ENCODING_NAME "UTF-8" /* by IANA */ +#endif + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +#ifndef SJIS_ENCODING_NAME +#define SJIS_ENCODING_NAME "SJIS" +#endif + +#define CONF_FILENAME "testalias.conf" +#define LINEBUF_SIZE 2001 + +#define SIZEOFUCS4(x) (sizeof(x) / sizeof(unsigned long)) + +/* + * U+1820: mongorian letter a + */ +#define UCS4_INVALID_NAME_FOR_EUCJP 0x1820 + +/* + * A4AC: hiragana letter GA (in EUC-JP) + */ +#define EUCJP_NAME "\xa4\xac" +#define EUCJP_NAME_SIZE 3 + +/* + * U+304C: hiragana letter GA + */ +#define UCS4_NAME 0x304C + +/* + * Conversion result of "U+304C" + */ +#define PUNYCODE_NAME "xn--v8j" +#define PUNYCODE_NAME_SIZE 8 + +#define BUF_SIZE 128 + +idn_result_t +idn_test_encode(idn_converter_t ctx, void *privdata, + const unsigned long *from, char *to, size_t tolen) +{ + idn_result_t r; + + if (tolen >= EUCJP_NAME_SIZE) { + strcpy(to, EUCJP_NAME); + r = idn_success; + } else { + r = idn_buffer_overflow; + } + return (r); + +} + +idn_result_t +idn_test_decode(idn_converter_t ctx, void *privdata, + const char *from, unsigned long *to, size_t tolen) +{ + idn_result_t r; + + if (tolen >= 2) { + to[0] = UCS4_NAME; + to[1] = 0x0000; + r = idn_success; + } else { + r = idn_buffer_overflow; + } + return (r); +} + + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: noinit +//-- +// Do nothing +{ + idn_result_t r; +} + +//# SETUP +// group: generic +//-- +// Initialize the module. +{ + idn_result_t r; + idn_converter_t ctx = NULL; + const char *name; + + r = idn_converter_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_success); +} + +//# SETUP +// group: localencoding +//-- +// Initialize the module and load alias file. +{ + idn_result_t r; + idn_converter_t ctx = NULL; + const char *name; + + r = idn_converter_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_success); + create_conf_file(CONF_FILENAME, 0, + "*.KOI8-R KOI8-R", + "*.ISO_8859-1 ISO-8859-1", + "*.ISO_8859-2 ISO-8859-1", + "*.UTF-8 UTF-8", + "ja_JP.EUC eucJP", + "japanese eucJP", + NULL); + r = idn_converter_aliasfile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: localencoding +//-- +// reset alias information. +{ + idn_converter_resetalias(); +} + +//# SETUP +// group: conversion +//-- +// Initialize the module and create contexts. +{ + idn_result_t r; + idn_converter_t punycode_ctx = NULL; + idn_converter_t utf8_ctx = NULL; +#ifndef WITHOUT_ICONV + idn_converter_t eucjp_ctx = NULL; +#endif + + r = idn_converter_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_converter_create(IDN_PUNYCODE_ENCODING_NAME, &punycode_ctx, + 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_create(IDN_UTF8_ENCODING_NAME, &utf8_ctx, + IDN_CONVERTER_DELAYEDOPEN); + ASSERT_RESULT(r, idn_success); +#ifndef WITHOUT_ICONV + r = idn_converter_create(EUCJP_ENCODING_NAME, &eucjp_ctx, + IDN_CONVERTER_DELAYEDOPEN); + ASSERT_RESULT(r, idn_success); +#endif +} + +//# TEARDOWN +// group: conversion +//-- +// Destroy contexts. +{ + if (punycode_ctx != NULL) { + idn_converter_destroy(punycode_ctx); + } + if (utf8_ctx != NULL) { + idn_converter_destroy(utf8_ctx); + } +#ifndef WITHOUT_ICONV + if (eucjp_ctx != NULL) { + idn_converter_destroy(eucjp_ctx); + } +#endif +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: idn_converter_addalias() test - without initialization +// group: noinit quiet +{ + r = idn_converter_addalias("a", "b", 0); + ASSERT_RESULT(r, idn_failure); +} + +//# TESTCASE +// title: idn_converter_aliasfile() - without initialization +// group: noinit quiet +{ + r = idn_converter_aliasfile("a"); + ASSERT_RESULT(r, idn_failure); +} + +//# TESTCASE +// title: idn_converter_resetalias() - without initialization +// group: noinit quiet +{ + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_failure); +} + +//# TESTCASE +// title: idn_converter_getrealname() - without initialization +// group: noinit quiet +{ + const char *name; + + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "test"); +} + +//# TESTCASE +// title: idn_converter_create() +// group: generic quiet +{ +#ifdef WITHOUT_ICONV + r = idn_converter_addalias("*pc", "Punycode", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("*ej", EUCJP_ENCODING_NAME, 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("*sj", SJIS_ENCODING_NAME, 0); + ASSERT_RESULT(r, idn_success); + + r = idn_converter_create("abcsj", &ctx, 0); + ASSERT_RESULT(r, idn_invalid_name); + + r = idn_converter_create("notresolved", &ctx, 0); + ASSERT_RESULT(r, idn_invalid_name); + r = idn_converter_create("notresolved", &ctx, + IDN_CONVERTER_DELAYEDOPEN); + ASSERT_RESULT(r, idn_invalid_name); +#else + r = idn_converter_addalias("*pc", IDN_PUNYCODE_ENCODING_NAME, 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("*ej", EUCJP_ENCODING_NAME, 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("*sj", SJIS_ENCODING_NAME, 0); + ASSERT_RESULT(r, idn_success); + + r = idn_converter_create("abcsj", &ctx, 0); + ASSERT_RESULT(r, idn_success); + idn_converter_destroy(ctx); + + r = idn_converter_create("notresolved", &ctx, 0); + ASSERT_RESULT(r, idn_invalid_name); + r = idn_converter_create("notresolved", &ctx, + IDN_CONVERTER_DELAYEDOPEN); + ASSERT_RESULT(r, idn_success); + { + unsigned long ucs4_to[BUF_SIZE]; + + r = idn_converter_convtoucs4(ctx, "a", ucs4_to, BUF_SIZE); + ASSERT_RESULT(r, idn_invalid_name); + idn_converter_destroy(ctx); + } +#endif /* WITHOUT_ICONV */ +} + +//# TESTCASE +// title: idn_converter_addalias() - #1 +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-a"); +} + +//# TESTCASE +// title: idn_converter_addalias() - #2 +// group: generic +{ + r = idn_converter_addalias("test", "result-b", 1); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-b"); +} + +//# TESTCASE +// title: idn_converter_addalias() - #3 +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-b", 0); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-a"); +} + +//# TESTCASE +// title: idn_converter_addalias() - #4 +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-b", 1); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-b"); +} + +//# TESTCASE +// title: idn_converter_addalias() - #5 +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-b", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-c", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-d", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-e", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-f", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-g", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-h", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-i", 0); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-a"); +} + +//# TESTCASE +// title: idn_converter_addalias() - #6 +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-b", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-c", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-d", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-e", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-f", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-g", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-h", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-i", 1); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "result-i"); +} + +//# TESTCASE +// title: idn_converter_addalias() - null character +// group: generic +{ + r = idn_converter_addalias("", "result", 0); + ASSERT_RESULT(r, idn_invalid_syntax); + r = idn_converter_addalias("test", "", 0); + ASSERT_RESULT(r, idn_invalid_syntax); + r = idn_converter_addalias("", "", 0); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_converter_resetalias() - no alias added +// group: generic +{ + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "test"); + +} + +//# TESTCASE +// title: idn_converter_resetalias() - one alias added +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "test"); + +} + +//# TESTCASE +// title: idn_converter_resetalias() - many aliases added +// group: generic +{ + r = idn_converter_addalias("test", "result-a", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-b", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-c", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-d", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-e", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-f", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-g", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-h", 0); + ASSERT_RESULT(r, idn_success); + r = idn_converter_addalias("test", "result-i", 1); + ASSERT_RESULT(r, idn_success); + r = idn_converter_resetalias(); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("test"); + ASSERT_STRING(name, "test"); +} + +//# TESTCASE +// title: idn_converter_aliasfile() - boundary condition +// group: generic quiet +{ + r = idn_converter_aliasfile(""); + ASSERT_RESULT(r, idn_nofile); + + r = idn_converter_aliasfile("idnalias-not-found.conf"); + ASSERT_RESULT(r, idn_nofile); +} + +//# TESTCASE +// title: idn_converter_aliasfile() - long line +// group: generic quiet +{ + char line[LINEBUF_SIZE]; + const char *entry = "aaaaaaaaaa"; + int i; + int len; + + len = strlen(entry); + for (i = 0; i < LINEBUF_SIZE - len; i += len) { + memcpy(line + i, entry, len); + } + *(line + (LINEBUF_SIZE / 2)) = ' '; + *(line + i) = '\0'; + create_conf_file(CONF_FILENAME, 0, line, NULL); + r = idn_converter_aliasfile(CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_converter_aliasfile() - no new line at end of file +// group: generic quiet +{ + create_conf_file(CONF_FILENAME, CONF_NO_EOF_NEWLINE, + "*.ISO_8859-1 ISO-8859-1", + "*.ISO_8859-2 ISO-8859-1", + "*.SJIS Shift_JIS", + "*.Shift_JIS Shift_JIS", + "ja_JP.EUC eucJP", + "japanese eucJP", + NULL); + r = idn_converter_aliasfile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("japanese"); + ASSERT_STRING(name, "eucJP"); + +} + +//# TESTCASE +// title: idn_converter_aliasfile() - invalid entries +// group: generic quiet +{ + create_conf_file(CONF_FILENAME, 0, + "*.ISO_8859-1 ISO-8859-1", + "*.ISO_8859-2 ISO-8859-1", + "*.SJIS", + "*.Shift_JIS", + "ja_JP.EUC eucJP", + "japanese eucJP", + NULL); + r = idn_converter_aliasfile(CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_converter_aliasfile() - more then two items in one line +// group: generic quiet +{ + create_conf_file(CONF_FILENAME, 0, + "*.ISO_8859-1 ISO-8859-1", + "*.ISO_8859-2 ISO-8859-1", + "*.SJIS Shift_JIS ko_KR.EUC", + "*.Shift_JIS Shift_JIS", + "*.big5 Big5 *.big5 *.big5", + "ja_JP.EUC eucJP", + "japanese eucJP", + NULL); + r = idn_converter_aliasfile(CONF_FILENAME); + ASSERT_RESULT(r, idn_success); + name = idn_converter_getrealname("japanese"); + ASSERT_STRING(name, "eucJP"); +} + +//# TESTCASE +// title: idn_converter_localencoding() - #1 +// group: localencoding +{ + r = idn_converter_create("test.UTF-8", &ctx, + IDN_CONVERTER_DELAYEDOPEN); + ASSERT_RESULT(r, idn_success); + name = idn_converter_localencoding(ctx); + ASSERT_STRING(name, "UTF-8"); + idn_converter_destroy(ctx); +} + +//# TESTCASE +// title: idn_converter_localencoding() - #2 +// group: localencoding +{ + r = idn_converter_create("test.KOI8-R", &ctx, + IDN_CONVERTER_DELAYEDOPEN); +#ifdef WITHOUT_ICONV + ASSERT_RESULT(r, idn_invalid_name); +#else + ASSERT_RESULT(r, idn_success); + name = idn_converter_localencoding(ctx); + ASSERT_STRING(name, "KOI8-R"); + idn_converter_destroy(ctx); +#endif +} + +//# TESTCASE +// title: idn_converter_localencoding() - #3 +// group: localencoding +{ + r = idn_converter_create("unresolvedname", &ctx, + IDN_CONVERTER_DELAYEDOPEN); +#ifdef WITHOUT_ICONV + ASSERT_RESULT(r, idn_invalid_name); +#else + ASSERT_RESULT(r, idn_success); + name = idn_converter_localencoding(ctx); + ASSERT_STRING(name, "unresolvedname"); + idn_converter_destroy(ctx); +#endif +} + +//# TESTCASE +// title: idn_converter_encodingtype() +// group: conversion +{ + ASSERT_INT(idn_converter_encodingtype(punycode_ctx), + IDN_ACE_STRICTCASE); + ASSERT_INT(idn_converter_encodingtype(utf8_ctx), + IDN_NONACE); +#ifndef WITHOUT_ICONV + ASSERT_INT(idn_converter_encodingtype(eucjp_ctx), + IDN_NONACE); +#endif +} + +//# TESTCASE +// title: idn_converter_isasciicompatible() +// group: conversion +{ + ASSERT_INT(idn_converter_isasciicompatible(punycode_ctx), 1); + ASSERT_INT(idn_converter_isasciicompatible(utf8_ctx), 0); +#ifndef WITHOUT_ICONV + ASSERT_INT(idn_converter_isasciicompatible(eucjp_ctx), 0); +#endif +} + +//# TESTCASE +// title: idn_converter_convfromucs4() +// group: conversion quiet +{ + unsigned long from_nullchar = 0x0000; + unsigned long from[2] = { UCS4_NAME, 0x0000 }; + char to[1]; + char to_punycode[PUNYCODE_NAME_SIZE]; +#ifndef WITHOUT_ICONV + char to_eucjp[EUCJP_NAME_SIZE]; +#endif + + r = idn_converter_convfromucs4(punycode_ctx, &from_nullchar, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convfromucs4(punycode_ctx, &from_nullchar, to, 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); + + r = idn_converter_convfromucs4(punycode_ctx, from, to_punycode, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convfromucs4(punycode_ctx, from, to_punycode, + PUNYCODE_NAME_SIZE - 1); + ASSERT_RESULT(r, idn_buffer_overflow); + r = idn_converter_convfromucs4(punycode_ctx, from, to_punycode, + PUNYCODE_NAME_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to_punycode, PUNYCODE_NAME); + +#ifndef WITHOUT_ICONV + r = idn_converter_convfromucs4(eucjp_ctx, &from_nullchar, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convfromucs4(eucjp_ctx, &from_nullchar, to, 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); + + r = idn_converter_convfromucs4(eucjp_ctx, from, to_eucjp, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convfromucs4(eucjp_ctx, from, to_eucjp, + EUCJP_NAME_SIZE - 1); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convfromucs4(eucjp_ctx, from, to_eucjp, + EUCJP_NAME_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to_eucjp, EUCJP_NAME); + + from[0] = 0x80000000; + r = idn_converter_convfromucs4(eucjp_ctx, from, to_eucjp, + EUCJP_NAME_SIZE); + ASSERT_RESULT(r, idn_invalid_encoding); + + from[0] = UCS4_INVALID_NAME_FOR_EUCJP; + r = idn_converter_convfromucs4(eucjp_ctx, from, to_eucjp, + EUCJP_NAME_SIZE); + ASSERT_RESULT(r, idn_nomapping); +#endif +} + +//# TESTCASE +// title: idn_converter_convtoucs4() +// group: conversion +{ + unsigned long to_nullchar = 0x0000; + unsigned long to[1]; + unsigned long punycode_to[2]; +#ifndef WITHOUT_ICONV + unsigned long eucjp_to[2]; +#endif + unsigned long ucs4_name[2] = { UCS4_NAME, 0x0000 }; + + r = idn_converter_convtoucs4(punycode_ctx, "", to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convtoucs4(punycode_ctx, "", to, 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, &to_nullchar); + + r = idn_converter_convtoucs4(punycode_ctx, PUNYCODE_NAME, + punycode_to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convtoucs4(punycode_ctx, PUNYCODE_NAME, + punycode_to, 1); + ASSERT_RESULT(r, idn_buffer_overflow); + r = idn_converter_convtoucs4(punycode_ctx, PUNYCODE_NAME, punycode_to, + 2); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING_THRU(punycode_to, ucs4_name); + +#ifndef WITHOUT_ICONV + r = idn_converter_convtoucs4(eucjp_ctx, "", to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convtoucs4(eucjp_ctx, "", to, 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, &to_nullchar); + + r = idn_converter_convtoucs4(eucjp_ctx, EUCJP_NAME, eucjp_to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convtoucs4(eucjp_ctx, EUCJP_NAME, eucjp_to, 1); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_converter_convtoucs4(eucjp_ctx, EUCJP_NAME, eucjp_to, 2); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, &to_nullchar); + + r = idn_converter_convtoucs4(eucjp_ctx, "\xFF\xFF", eucjp_to, 2); + ASSERT_RESULT(r, idn_invalid_encoding); +#endif +} + +//# TESTCASE +// title: idn_converter_destroy(), idn_converter_incrref() +// group: generic +{ + idn_converter_t ctx2; + + r = idn_converter_create(IDN_UTF8_ENCODING_NAME, &ctx, 0); + ASSERT_RESULT(r, idn_success); + idn_converter_destroy(ctx); + + r = idn_converter_create(IDN_UTF8_ENCODING_NAME, &ctx2, 0); + ASSERT_RESULT(r, idn_success); + idn_converter_incrref(ctx2); + ASSERT_RESULT(r, idn_success); + idn_converter_destroy(ctx2); + idn_converter_destroy(ctx2); +} + +//# TESTCASE +// title: idn_converter_register() +// group: generic +{ + char eucjp_to[3]; + unsigned long ucs4_to[2]; + unsigned long ucs4_name[2] = { UCS4_NAME, 0x0000 }; + + r = idn_converter_register("test", + NULL, + NULL, + idn_test_encode, + idn_test_decode, + NULL, + IDN_ACE_STRICTCASE); + ASSERT_RESULT(r, idn_success); + r = idn_converter_create("test", &ctx, 0); + ASSERT_RESULT(r, idn_success); + + r = idn_converter_convfromucs4(ctx, ucs4_name, eucjp_to, sizeof(eucjp_to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(eucjp_to, EUCJP_NAME); + + r = idn_converter_convtoucs4(ctx, "", ucs4_to, SIZEOFUCS4(ucs4_to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(ucs4_to, ucs4_name); + + idn_converter_destroy(ctx); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/delimitermap.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/delimitermap.tsy new file mode 100644 index 0000000000..3189f6ff2f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/delimitermap.tsy @@ -0,0 +1,257 @@ +#ifndef lint +static char *rcsid = "$Id: delimitermap.tsy,v 1.1 2003/06/04 00:26:53 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "testutil.h" + +/* + * Codepoions to test the add() function. + */ +#define ADDITIONAL_DELIMITER0 0xe0 +#define ADDITIONAL_DELIMITER1 0xe1 + +/* + * Sample string for `from' argument of map(), + * and its expected outputs. + */ +static const unsigned long from[] = { + 0x002e, /* full stop */ + 0x3002, /* ideographic full stop */ + 0xff0e, /* fullwidth full stop */ + 0xff61, /* halfwidth ideographic full stop */ + ADDITIONAL_DELIMITER0, + ADDITIONAL_DELIMITER1, + 0x0000 +}; + +static const unsigned long expected_default[] = { + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + ADDITIONAL_DELIMITER0, + ADDITIONAL_DELIMITER1, + 0x0000 +}; + +static const unsigned long expected_add[] = { + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + ADDITIONAL_DELIMITER1, + 0x0000 +}; + +static const unsigned long expected_addall[] = { + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x002e, /* full stop */ + 0x0000 +}; + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic-init +{ + idn_result_t r; + idn_delimitermap_t ctx; + unsigned long to[256]; + + r = idn_delimitermap_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic-init +{ + if (ctx != NULL) + idn_delimitermap_destroy(ctx); +} + +//# SETUP +// group: quiet +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call create() +// group: generic-init +{ +} + +//# TESTCASE +// title: call map() without additional delimiters +// group: generic-init +{ + r = idn_delimitermap_map(ctx, from, to, sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: call add() and map() +// group: generic-init +{ + r = idn_delimitermap_add(ctx, ADDITIONAL_DELIMITER0); + ASSERT_RESULT(r, idn_success); + + r = idn_delimitermap_map(ctx, from, to, sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_add); +} + +//# TESTCASE +// title: call addall() +// group: generic-init +{ + unsigned long delimiters[2]; + + delimiters[0] = ADDITIONAL_DELIMITER0; + delimiters[1] = ADDITIONAL_DELIMITER1; + r = idn_delimitermap_addall(ctx, delimiters, 2); + ASSERT_RESULT(r, idn_success); + + r = idn_delimitermap_map(ctx, from, to, sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_addall); +} + +//# TESTCASE +// title: call addall() with nnames=0 +// group: generic-init +{ + unsigned long delimiters[2]; + + r = idn_delimitermap_addall(ctx, delimiters, 0); + ASSERT_RESULT(r, idn_success); + + r = idn_delimitermap_map(ctx, from, to, sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: call add() with invalid codepoint +// group: generic-init quiet +{ + r = idn_delimitermap_add(ctx, 0x0000); /* NUL */ + ASSERT_RESULT(r, idn_invalid_codepoint); + + r = idn_delimitermap_add(ctx, 0xd800); /* surrogate */ + ASSERT_RESULT(r, idn_invalid_codepoint); + + r = idn_delimitermap_add(ctx, 0x110000); /* out of range */ + ASSERT_RESULT(r, idn_invalid_codepoint); +} + +//# TESTCASE +// title: call addall() with invalid codepoint +// group: generic-init quiet +{ + unsigned long delimiters[1]; + + delimiters[0] = 0x0000; /* NUL */ + r = idn_delimitermap_addall(ctx, delimiters, 1); + ASSERT_RESULT(r, idn_invalid_codepoint); + + delimiters[0] = 0xd800; /* surrogate */ + r = idn_delimitermap_addall(ctx, delimiters, 1); + ASSERT_RESULT(r, idn_invalid_codepoint); + + delimiters[0] = 0x110000; /* out of range */ + r = idn_delimitermap_addall(ctx, delimiters, 1); + ASSERT_RESULT(r, idn_invalid_codepoint); +} + +//# TESTCASE +// title: overrun test for arg `to' of map() +// group: generic-init +{ + r = idn_delimitermap_map(ctx, from, to, + idn_ucs4_strlen(expected_default) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); + r = idn_delimitermap_map(ctx, from, to, + idn_ucs4_strlen(expected_default)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call map() with tolen=0 +// group: generic-init +{ + r = idn_delimitermap_map(ctx, from, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/iconvchk.c b/contrib/idn/idnkit-1.0-src/lib/tests/iconvchk.c new file mode 100644 index 0000000000..73ec8d2ff8 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/iconvchk.c @@ -0,0 +1,132 @@ +#ifndef lint +static char *rcsid = "$Id: iconvchk.c,v 1.1 2003/06/04 00:26:54 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include + +#include +#include +#include + +#include "codeset.h" + +#define IDN_UTF8_ENCODING_NAME "UTF-8" + +void +eucjp_check(void) +{ + idn_result_t r; + idn_converter_t eucjp_ctx = NULL; + + r = idn_nameinit(0); + if (r != idn_success) { + fprintf(stderr, "idn_nameinit(): failed\n"); + exit (1); + } + + r = idn_converter_create(EUCJP_ENCODING_NAME, &eucjp_ctx, 0); + + if (eucjp_ctx != NULL) { + idn_converter_destroy(eucjp_ctx); + } + + if (r != idn_success) { + if (r == idn_invalid_name) { + fprintf(stderr, \ + "\"%s\" is invalid codeset name, edit codeset.h\n", \ + EUCJP_ENCODING_NAME); + exit (1); + } else { + fprintf(stderr, \ + "idn_converter_create() failed with error \"%s\"\n", \ + idn_result_tostring(r)); + exit (1); + } + } +} + +void +sjis_check(void) +{ + idn_result_t r; + idn_converter_t sjis_ctx = NULL; + + r = idn_nameinit(0); + if (r != idn_success) { + fprintf(stderr, "idn_nameinit(): failed\n"); + exit (1); + } + + r = idn_converter_create(SJIS_ENCODING_NAME, &sjis_ctx, 0); + + if (sjis_ctx != NULL) { + idn_converter_destroy(sjis_ctx); + } + + if (r != idn_success) { + if (r == idn_invalid_name) { + fprintf(stderr, \ + "\"%s\" is invalid codeset name, edit codeset.h\n", \ + SJIS_ENCODING_NAME); + exit (1); + } else { + fprintf(stderr, \ + "idn_converter_create() failed with error \"%s\"\n", \ + idn_result_tostring(r)); + exit (1); + } + } +} + +int +main (int ac, char **av) +{ + eucjp_check(); + sjis_check(); + + exit (0); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/mapper.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/mapper.tsy new file mode 100644 index 0000000000..22ed604b25 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/mapper.tsy @@ -0,0 +1,497 @@ +#ifndef lint +static char *rcsid = "$Id: mapper.tsy,v 1.1 2003/06/04 00:26:54 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "testutil.h" + +#define SIZEOFUCS4(x) (sizeof(x) / sizeof(unsigned long)) + +#define UCS4_NAME_STR "U+304C" /* hiragana letter ga */ +#define UCS4_NAME 0x304C + +#define BUF_SIZE 128 +#define ARRAY_SIZE 9 +#define CONF_FILENAME "test.map" + +#define LINEBUF_SIZE 2001 + +/* + * Sample string for `from' argument of map(), + * and its expected outputs. + */ +static const unsigned long from[] = { + 0x0041, /* latin capital letter a */ + 0x0042, /* latin capital letter b */ + UCS4_NAME, + 0x0000 +}; + +static const unsigned long expected_default[] = { + 0x0061, /* latin small letter a */ + 0x0062, /* latin small letter b */ + UCS4_NAME, + 0x0000 +}; + +idn_result_t +test_create(const char *parameter, void **ctxp) +{ + return (idn_success); +} + +void +test_destroy(void *ctxp) +{ +} + +idn_result_t +test_map(void *ctx, const unsigned long *from, unsigned long *to, + size_t tolen) +{ + if (tolen > idn_ucs4_strlen(from)) { + idn_ucs4_strcpy(to, from); + } else { + return (idn_buffer_overflow); + } + + return (idn_success); +} + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: noinit +//-- +// Do nothing +{ + idn_result_t r; + const char *name; +} + +//# SETUP +// group: generic +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_mapper_t ctx = NULL; + + r = idn_mapper_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic +//-- +// Destroy context. +{ + idn_mapper_destroy(ctx); +} + +//# SETUP +// group: addall +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_mapper_t ctx = NULL; + char *names[ARRAY_SIZE]; + int i; + unsigned long to[4]; + + for (i = 0; i < ARRAY_SIZE; i++) { + names[i] = malloc(BUF_SIZE); + if (names[i] == NULL) { + ASSERT("malloc failed\n"); + } + } + + r = idn_mapper_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: addall +//-- +// Destroy context and free some blocks. +{ + idn_mapper_destroy(ctx); + for (i = 0; i < ARRAY_SIZE; i++) { + free(names[i]); + } +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: idn_mapper_add() - boundary condition +// group: generic quiet +{ + r = idn_mapper_add(ctx, ""); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_mapper_add() - builtin schemes +// group: generic quiet +{ + r = idn_mapper_add(ctx, "RFC3491"); + ASSERT_RESULT(r, idn_success); + + r = idn_mapper_add(ctx, "nameprep-01"); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_mapper_add() - boundary condition +// group: generic quiet +{ + r = idn_mapper_add(ctx, ""); + ASSERT_RESULT(r, idn_invalid_name); + r = idn_mapper_add(ctx, "filemap:"); + ASSERT_RESULT(r, idn_nofile); + r = idn_mapper_add(ctx, "filemap:notfound.map"); + ASSERT_RESULT(r, idn_nofile); +} + +//# TESTCASE +// title: idn_mapper_add() - file +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[4]; + + create_conf_file(CONF_FILENAME, 0, + "0041; 0061;", + "0042; 0062;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_add() - file - long line +// group: generic quiet +{ + char line[LINEBUF_SIZE]; + char name[BUF_SIZE]; + const char *first_entry = "0041;"; + const char *other_entry = " 0061"; + int i; + int len; + + memcpy(line, first_entry, strlen(first_entry)); + len = strlen(other_entry); + for (i = len; i < LINEBUF_SIZE - len; i += len) { + memcpy(line + i, other_entry, len); + } + *(line + i) = '\0'; + + create_conf_file(CONF_FILENAME, 0, line, NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_mapper_add() - file - no new line at end of file +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[4]; + + create_conf_file(CONF_FILENAME, CONF_NO_EOF_NEWLINE, + "0041; 0061;", + "0042; 0062;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_add() - file - one item in one line #1 +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[3]; + unsigned long expected[] = { + 0x0061, + UCS4_NAME, + 0x0000 + }; + + create_conf_file(CONF_FILENAME, 0, + "0041; 0061;", + "0042;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected); +} + +//# TESTCASE +// title: idn_mapper_add() - file - one item in one line #2 +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[3]; + unsigned long expected[] = { + 0x0061, + UCS4_NAME, + 0x0000 + }; + + create_conf_file(CONF_FILENAME, 0, + "0041; 0061;", + "0042; ;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected); +} + +//# TESTCASE +// title: idn_mapper_add() - file - more then two items in one line #1 +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[4]; + + create_conf_file(CONF_FILENAME, 0, + "0041; 0061; 0062;", + "0042; 0062; 0063;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_add() - file - more then two items in one line #2 +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[6]; + unsigned long expected_to[] = { + 0x0061, + 0x0062, + 0x0062, + 0x0063, + UCS4_NAME, + 0x0000 + }; + + create_conf_file(CONF_FILENAME, 0, + "0041; 0061 0062;", + "0042; 0062 0063;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_success); + + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_to); +} + +//# TESTCASE +// title: idn_mapper_add() - file - more then two items in one line #3 +// group: generic quiet +{ + char name[BUF_SIZE]; + unsigned long to[3]; + + create_conf_file(CONF_FILENAME, 0, + "0041 0042; 0063;", + NULL); + sprintf(name, "filemap:%s", CONF_FILENAME); + r = idn_mapper_add(ctx, name); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: idn_mapper_addall() - add all builtin schemes +// group: addall quiet +{ + strcpy(names[0], "RFC3491"); + strcpy(names[1], "RFC3491"); + strcpy(names[2], "RFC3491"); + strcpy(names[3], "RFC3491"); + strcpy(names[4], "RFC3491"); + strcpy(names[5], "RFC3491"); + strcpy(names[6], "RFC3491"); + strcpy(names[7], "RFC3491"); + strcpy(names[8], "RFC3491"); + + r = idn_mapper_addall(ctx, (const char **)names, 9); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_addall() - add same scheme repetedly +// group: addall quiet +{ + for (i = 0; i < ARRAY_SIZE; i++) { + strcpy(names[i], "RFC3491"); + } + r = idn_mapper_addall(ctx, (const char **)names, 3); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_map() - builtin schemes check - RFC3491 +// group: generic quiet +{ + unsigned long to[4]; + + r = idn_mapper_add(ctx, "RFC3491"); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, expected_default); +} + +//# TESTCASE +// title: idn_mapper_map() - context without procedure +// group: generic +{ + unsigned long to[4]; + + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, from); +} + +//# TESTCASE +// title: idn_mapper_destroy(), idn_mapper_incrref() +// group: +{ + idn_result_t r; + idn_mapper_t ctx = NULL; + + r = idn_mapper_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_create(&ctx); + ASSERT_RESULT(r, idn_success); + idn_mapper_incrref(ctx); + idn_mapper_destroy(ctx); + idn_mapper_destroy(ctx); +} + +//# TESTCASE +// title: idn_mapper_register() +// group: generic quiet +{ + unsigned long to[10]; + + r = idn_mapper_register("test", test_create, test_destroy, test_map); + ASSERT_RESULT(r, idn_success); + r = idn_mapper_add(ctx, "test"); + ASSERT_RESULT(r, idn_success); + + r = idn_mapper_map(ctx, from, to, SIZEOFUCS4(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, from); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/mapselector.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/mapselector.tsy new file mode 100644 index 0000000000..3acfc5e7b7 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/mapselector.tsy @@ -0,0 +1,592 @@ +#ifndef lint +static char *rcsid = "$Id: mapselector.tsy,v 1.1 2003/06/04 00:26:55 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "testutil.h" + +#define CONF_FILENAME "test.conf" +#define MAP_FILENAME "test.map" + +/* + * Sample TLDs. + */ +static const char *utf8_tlds_jp[] = {"jp", ".jp", "JP", ".JP"}; +static const char *utf8_tlds_tw[] = {"tw", ".tw", "TW", ".TW"}; + +static const unsigned long ucs4_tlds_jp[][4] = {{'j', 'p', '\0', '\0'}, + {'.', 'j', 'p', '\0'}, + {'J', 'P', '\0', '\0'}, + {'.', 'J', 'P', '\0'}}; + +static const unsigned long ucs4_tlds_tw[][4] = {{'t', 'w', '\0', '\0'}, + {'.', 't', 'w', '\0'}, + {'T', 'W', '\0', '\0'}, + {'.', 'T', 'W', '\0'}}; + +/* How many elements in `utf8_tlds_{jp|tw}[]' and `ucs4_tlds_{jp|tw}[]'. */ +#define TLD_NVARIANTS 4 + +/* + * Sample input string for mapping. (UCS4) + */ +static const unsigned long in_string[] = {0x00C0, 0x2212, 0}; + +/* + * Sample mapping results of IN_STRING. + * + * OUT_STRING_FILEMAP is the result of file-mapping (U+2212 -> U+002D). + * OUT_STRING_NAMEPREP is the result of the latest nameprep + * OUT_STRING_BOTH is the result of both file-mapping and nameprep. + */ +static const unsigned long out_string_filemap[] = {0x00C0, 0x002D, 0}; +static const unsigned long out_string_nameprep[] = {0x00E0, 0x2212, 0}; +static const unsigned long out_string_both[] = {0x00E0, 0x002D, 0}; + +#define MAP_FILENAME "test.map" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic-init +{ + idn_result_t r; + idn_mapselector_t ctxs[TLD_NVARIANTS]; + unsigned long to[256]; + + { + int i; + for (i = 0; i < TLD_NVARIANTS; i++) + ctxs[i] = NULL; + } + + r = idn_mapselector_initialize(); + ASSERT_RESULT(r, idn_success); + + { + int i; + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_create(&ctxs[i]); + ASSERT_RESULT(r, idn_success); + } + } +} + +//# TEARDOWN +// group: generic-init +{ + { + int i; + + for (i = 0; i < TLD_NVARIANTS; i++) { + if (ctxs[i] != NULL) + idn_mapselector_destroy(ctxs[i]); + remove(CONF_FILENAME); + } + } +} + +//# SETUP +// group: quiet +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +{ + idn_log_setlevel(saved_log_level); +} + +//# SETUP +// group: generic-filemap +{ + create_conf_file(MAP_FILENAME, 0, + "U+2212; U+002D", + NULL); +} + +//# TEARDOWN +// group: generic-filemap +{ + remove(MAP_FILENAME); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call initialize() twice. +// +{ + idn_result_t r; + + r = idn_mapselector_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_initialize(); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: call create() +{ + idn_result_t r; + idn_mapselector_t ctx; + + r = idn_mapselector_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_create(&ctx); + ASSERT_RESULT(r, idn_success); + + idn_mapselector_destroy(ctx); +} + +//# TESTCASE +// title: call add(filemap) and map() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + "filemap:" MAP_FILENAME); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_filemap); + + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call add(nameprep) and map() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_nameprep); + + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call add(filemap) and map2() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + "filemap:" MAP_FILENAME); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_filemap); + + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call add(nameprep) and map2() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_nameprep); + + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call add(filemap) and map() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + "filemap:" MAP_FILENAME); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_filemap); + + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call add(nameprep) and map() +// group: generic-init generic-filemap +{ + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_add(ctxs[i], utf8_tlds_jp[i], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_nameprep); + + r = idn_mapselector_map(ctxs[i], in_string, + utf8_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call addall() +// group: generic-init generic-filemap +{ + static const char *names[] = { + "filemap:" MAP_FILENAME, + IDN_NAMEPREP_CURRENT + }; + int i, j; + + for (i = 0; i < TLD_NVARIANTS; i++) { + r = idn_mapselector_addall(ctxs[i], utf8_tlds_jp[i], names, + sizeof(names) / sizeof(*names)); + ASSERT_RESULT(r, idn_success); + } + + for (i = 0; i < TLD_NVARIANTS; i++) { + for (j = 0; j < TLD_NVARIANTS; j++) { + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_jp[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_both); + + r = idn_mapselector_map2(ctxs[i], in_string, + ucs4_tlds_tw[j], to, + sizeof(to) / sizeof(*to)); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + } + } +} + +//# TESTCASE +// title: call addall() with nnames=0 +// group: generic-init +{ + static const char *names[] = {IDN_NAMEPREP_CURRENT}; + + r = idn_mapselector_addall(ctxs[0], ".", names, 0); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: call add() with empty tld +// group: generic-init +{ + r = idn_mapselector_add(ctxs[0], "", IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: call addall() with empty tld +// group: generic-init +{ + static const char *names[] = {IDN_NAMEPREP_CURRENT}; + + r = idn_mapselector_addall(ctxs[0], "", names, 1); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: call add() with too long tld +// group: generic-init quiet +{ + r = idn_mapselector_add(ctxs[0], + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJK", + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_add(ctxs[0], + "." + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJK", + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_add(ctxs[0], + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKL", + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_invalid_name); + + r = idn_mapselector_add(ctxs[0], + "." + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKL", + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: call addall() with too long tld +// group: generic-init quiet +{ + static const char *names[] = {IDN_NAMEPREP_CURRENT}; + + r = idn_mapselector_addall(ctxs[0], + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJK", + names, 1); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_addall(ctxs[0], + "." + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJK", + names, 1); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_addall(ctxs[0], + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKL", + names, 1); + ASSERT_RESULT(r, idn_invalid_name); + + r = idn_mapselector_addall(ctxs[0], + "." + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKL", + names, 1); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: overrun test for arg `to' of map() +// group: generic-init +{ + r = idn_mapselector_add(ctxs[0], utf8_tlds_jp[0], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_jp[0], to, + idn_ucs4_strlen(out_string_nameprep) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_nameprep); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_tw[0], to, + idn_ucs4_strlen(in_string) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_jp[0], to, + idn_ucs4_strlen(out_string_nameprep)); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_tw[0], to, + idn_ucs4_strlen(in_string)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: overrun test for arg `to' of map2() +// group: generic-init +{ + r = idn_mapselector_add(ctxs[0], utf8_tlds_jp[0], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_jp[0], to, + idn_ucs4_strlen(out_string_nameprep) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, out_string_nameprep); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_tw[0], to, + idn_ucs4_strlen(in_string) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, in_string); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_jp[0], to, + idn_ucs4_strlen(out_string_nameprep)); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_tw[0], to, + idn_ucs4_strlen(in_string)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call map() with tolen=0 +// group: generic-init +{ + r = idn_mapselector_add(ctxs[0], utf8_tlds_jp[0], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_jp[0], to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_mapselector_map(ctxs[0], in_string, utf8_tlds_tw[0], to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call map2() with tolen=0 +// group: generic-init +{ + r = idn_mapselector_add(ctxs[0], utf8_tlds_jp[0], + IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_jp[0], to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_mapselector_map2(ctxs[0], in_string, ucs4_tlds_tw[0], to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/nameprep.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/nameprep.tsy new file mode 100644 index 0000000000..c1b73ba04e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/nameprep.tsy @@ -0,0 +1,340 @@ +#ifndef lint +static char *rcsid = "$Id: nameprep.tsy,v 1.1 2003/06/04 00:26:56 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include "testutil.h" + +#define UCS4_NAME 0x304C /* hiragana letter ga */ +#define BUF_SIZE 4 +/* + * Sample string for `from' argument for map(), + * and its expected outputs. + */ +static const unsigned long map_from[] = { + 0x0041, /* latin capital letter a */ + 0x0042, /* latin capital letter b */ + UCS4_NAME, + 0x0000 +}; + +static const unsigned long map_expected[] = { + 0x0061, /* latin small letter a */ + 0x0062, /* latin small letter b */ + UCS4_NAME, + 0x0000 +}; + +/* + * Sample string for `from' argument for isprohibited(). + */ +static const unsigned long check_from[4] = { + UCS4_NAME, + 0x00A0, /* no-break space: prohibited character */ + 0x0221, /* unassigned character */ + 0x0000 +}; + +#define FROM_UCS4NAME_OFFSET 0 +#define FROM_PROH_OFFSET 1 +#define FROM_UNAS_OFFSET 2 + +/* + * Sample string for `from' argument for isunassigned(). + */ +static const unsigned long check_from2[4] = { + UCS4_NAME, + 0x0221, /* unassigned character */ + 0x00A0, /* no-break space: prohibited character */ + 0x0000 +}; + +#define FROM2_UCS4NAME_OFFSET 0 +#define FROM2_PROH_OFFSET 2 +#define FROM2_UNAS_OFFSET 1 + +/* + * Sample string for `from' argument for isvalidbidi(). + * (It is not a valid bidi label.) + */ +static const unsigned long bidi_from[4] = { + 0x05BE, /* hebrew punctuation maqaf */ + 0x0041, /* latin capital letter a */ + 0xFEFC, /* arabic ligature lam with alef final form */ + 0x0000 +}; +#define BIDIFROM_OFFSET 1 + +/* + * Empty string. + */ +static const unsigned long ucs4_nullstr[] = { + 0x0000 +}; + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic +//-- +// Nothing happens. +{ + idn_result_t r; + idn_nameprep_t handle = NULL; + +} + +//# SETUP +// group: check +//-- +// Initialize the module and create contexts. +{ + idn_result_t r; + idn_nameprep_t handle11 = NULL; + + r = idn_nameprep_create("RFC3491", &handle11); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: check +//-- +// Destroy contexts. +{ + if (handle11 != NULL) { + idn_nameprep_destroy(handle11); + } +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: idn_nameprep_create() - boundary condition +// group: generic quiet +{ + r = idn_nameprep_create("", &handle); + ASSERT_RESULT(r, idn_notfound); +} + +//# TESTCASE +// title: idn_nameprep_create() - version is NULL (current nameprep) +// group: generic quiet +{ + unsigned long to[BUF_SIZE]; + const unsigned long *found; + + r = idn_nameprep_create(NULL, &handle); + ASSERT_RESULT(r, idn_success); + + r = idn_nameprep_map(handle, map_from, to, BUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, map_expected); + + r = idn_nameprep_isunassigned(handle, check_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from + FROM_UNAS_OFFSET); + + r = idn_nameprep_isprohibited(handle, check_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from + FROM_PROH_OFFSET); + + r = idn_nameprep_isvalidbidi(handle, bidi_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, bidi_from + BIDIFROM_OFFSET); + + idn_nameprep_destroy(handle); +} + +//# TESTCASE +// title: idn_nameprep_create() - nameprep-01 +// group: generic quiet +{ + r = idn_nameprep_create("nameprep-01", &handle); + ASSERT_RESULT(r, idn_notfound); +} + +//# TESTCASE +// title: idn_nameprep_create() - RFC3491 +// group: generic +{ + r = idn_nameprep_create("RFC3491", &handle); + ASSERT_RESULT(r, idn_success); + idn_nameprep_destroy(handle); +} + +//# TESTCASE +// title: idn_nameprep_map() - boundary condition +// group: check +{ + unsigned long to[BUF_SIZE]; + + r = idn_nameprep_map(handle11, ucs4_nullstr, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + r = idn_nameprep_map(handle11, ucs4_nullstr, to, 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, ucs4_nullstr); +} + +//# TESTCASE +// title: idn_nameprep_map() - RFC3491 +// group: check +{ + unsigned long to[BUF_SIZE]; + + r = idn_nameprep_map(handle11, map_from, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); + r = idn_nameprep_map(handle11, map_from, to, BUF_SIZE - 1); + ASSERT_RESULT(r, idn_buffer_overflow); + r = idn_nameprep_map(handle11, map_from, to, BUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, map_expected); +} + +//# TESTCASE +// title: idn_nameprep_isunassigned() - boundary condition +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isunassigned(handle11, ucs4_nullstr, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, NULL); +} + +//# TESTCASE +// title: idn_nameprep_isunassigned() - RFC3491 +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isunassigned(handle11, check_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from + FROM_UNAS_OFFSET); + + r = idn_nameprep_isunassigned(handle11, check_from2, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from2 + FROM2_UNAS_OFFSET); +} + +//# TESTCASE +// title: idn_nameprep_isprohibited() - boundary condition +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isprohibited(handle11, ucs4_nullstr, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, NULL); +} + +//# TESTCASE +// title: idn_nameprep_isprohibited() - RFC3491 +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isprohibited(handle11, check_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from + FROM_PROH_OFFSET); + + r = idn_nameprep_isprohibited(handle11, check_from2, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, check_from2 + FROM2_PROH_OFFSET); +} + +//# TESTCASE +// title: idn_nameprep_isvalidbidi() - boundary condition +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isvalidbidi(handle11, ucs4_nullstr, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, NULL); +} + +//# TESTCASE +// title: idn_nameprep_isvalidbidi() - RFC3491 +// group: check +{ + const unsigned long *found; + + r = idn_nameprep_isvalidbidi(handle11, bidi_from, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, bidi_from + BIDIFROM_OFFSET); + + r = idn_nameprep_isvalidbidi(handle11, check_from2, &found); + ASSERT_RESULT(r, idn_success); + ASSERT_PTR(found, NULL); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/normalizer.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/normalizer.tsy new file mode 100644 index 0000000000..754790f831 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/normalizer.tsy @@ -0,0 +1,346 @@ +#ifndef lint +static char *rcsid = "$Id: normalizer.tsy,v 1.1 2003/06/04 00:26:57 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define BUF_SIZE 64 +#define TOBUF_SIZE 4 +#define ARRAY_SIZE 20 +#define CONF_FILENAME "test.map" + +/* + * Sample string for `from' argument of normalize(), + * and its expected outputs. + */ +static const unsigned long from[4] = { + 0x304B, /* hiragana letter ka */ + 0x3099, /* combining katakana-hiragana voiced sound mark */ + 0x32D0, /* circled katakana a */ + 0x0000 +}; + +static const unsigned long normalized_kc_str[3] = { + 0x304C, /* hiragana letter ga */ + 0x30A2, /* katakana letter a */ + 0x0000 +}; + +static const unsigned long normalized_c_str[3] = { + 0x304C, /* hiragana letter ga */ + 0x32D0, /* circled katakana a */ + 0x0000 +}; + +idn_result_t +test_proc(const unsigned long *from, unsigned long *to, size_t tolen) +{ + if (tolen > idn_ucs4_strlen(from)) { + idn_ucs4_strcpy(to, from); + } else { + return (idn_buffer_overflow); + } + + return (idn_success); +} + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: noinit +//-- +// Do nothing +{ + idn_result_t r; + const char *name; +} + +//# SETUP +// group: generic +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_normalizer_t ctx = NULL; + + r = idn_normalizer_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic +//-- +// Destroy context. +{ + idn_normalizer_destroy(ctx); +} + +//# SETUP +// group: addall +//-- +// Initialize the module and create context. +{ + idn_result_t r; + idn_normalizer_t ctx = NULL; + char *names[ARRAY_SIZE]; + int i; + + for (i = 0; i < ARRAY_SIZE; i++) { + names[i] = malloc(BUF_SIZE); + if (names[i] == NULL) { + ASSERT("malloc failed\n"); + } + } + + strcpy(names[0], "RFC3491"); + strcpy(names[1], "unicode-form-kc"); + strcpy(names[2], "unicode-form-kc/3.2.0"); + strcpy(names[3], "RFC3491"); + strcpy(names[4], "unicode-form-kc"); + strcpy(names[5], "unicode-form-kc/3.2.0"); + strcpy(names[6], "RFC3491"); + strcpy(names[7], "unicode-form-kc"); + strcpy(names[8], "unicode-form-kc/3.2.0"); + strcpy(names[9], "RFC3491"); + strcpy(names[10], "unicode-form-kc"); + strcpy(names[11], "unicode-form-kc/3.2.0"); + strcpy(names[12], "RFC3491"); + strcpy(names[13], "unicode-form-kc"); + strcpy(names[14], "unicode-form-kc/3.2.0"); + strcpy(names[15], "RFC3491"); + strcpy(names[16], "unicode-form-kc"); + strcpy(names[17], "unicode-form-kc/3.2.0"); + strcpy(names[18], "RFC3491"); + strcpy(names[19], "unicode-form-kc"); + + r = idn_normalizer_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: addall +//-- +// Destroy context. +{ + idn_normalizer_destroy(ctx); + for (i = 0; i < ARRAY_SIZE; i++) { + free(names[i]); + } +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: idn_normalizer_add() - boundary condition +// group: generic quiet +{ + r = idn_normalizer_add(ctx, ""); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_normalizer_add() - builtin schemes +// group: generic quiet +{ + r = idn_normalizer_add(ctx, "RFC3491"); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_add(ctx, "unicode-form-kc"); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_add(ctx, "unicode-form-kc/3.2.0"); + ASSERT_RESULT(r, idn_success); + + r = idn_normalizer_add(ctx, "nameprep-01"); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_normalizer_addall() - boundary condition +// group: addall quiet +{ + strcpy(names[3], ""); + r = idn_normalizer_addall(ctx, (const char **)names, ARRAY_SIZE); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: idn_normalizer_addall() - nschemes is 0 +// group: addall quiet +{ + r = idn_normalizer_addall(ctx, (const char **)names, 0); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: idn_normalizer_addall() - add a lot of schemes +// group: addall quiet +{ + unsigned long to[TOBUF_SIZE]; + + r = idn_normalizer_addall(ctx, (const char **)names, ARRAY_SIZE); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, normalized_kc_str); +} + +//# TESTCASE +// title: idn_normalizer_addall() - add same scheme repetedly +// group: addall quiet +{ + int i; + unsigned long to[TOBUF_SIZE]; + + for (i = 0; i < ARRAY_SIZE; i++) { + strcpy(names[i], "RFC3491"); + } + r = idn_normalizer_addall(ctx, (const char **)names, ARRAY_SIZE); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, normalized_kc_str); +} + +//# TESTCASE +// title: idn_normalizer_normalize() - schemes check - RFC3491 +// group: generic quiet +{ + unsigned long to[TOBUF_SIZE]; + + r = idn_normalizer_add(ctx, "RFC3491"); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, normalized_kc_str); +} + +//# TESTCASE +// title: idn_normalizer_normalize() - schemes check - unicode-form-kc/3.2.0 +// group: generic quiet +{ + unsigned long to[TOBUF_SIZE]; + + r = idn_normalizer_add(ctx, "unicode-form-kc/3.2.0"); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, normalized_kc_str); +} + +//# TESTCASE +// title: idn_normalizer_normalize() - context without procedure +// group: generic quiet +{ + unsigned long to[TOBUF_SIZE]; + + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, from); +} + +//# TESTCASE +// title: idn_normalizer_destroy(), idn_normalizer_incrref() +// group: +{ + idn_result_t r; + idn_normalizer_t ctx = NULL; + + r = idn_normalizer_initialize(); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_create(&ctx); + ASSERT_RESULT(r, idn_success); + idn_normalizer_incrref(ctx); + idn_normalizer_destroy(ctx); + idn_normalizer_destroy(ctx); +} + +//# TESTCASE +// title: idn_normalizer_register() +// group: generic quiet +{ + unsigned long to[TOBUF_SIZE]; + + r = idn_normalizer_register("test", test_proc); + ASSERT_RESULT(r, idn_success); + r = idn_normalizer_add(ctx, "test"); + ASSERT_RESULT(r, idn_success); + + r = idn_normalizer_normalize(ctx, from, to, TOBUF_SIZE); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, from); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/res.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/res.tsy new file mode 100644 index 0000000000..afb888cdfd --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/res.tsy @@ -0,0 +1,1026 @@ +#ifndef lint +static char *rcsid = "$Id: res.tsy,v 1.1 2003/06/04 00:26:59 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include + +#include "codeset.h" +#include "setenv.h" + +#ifndef EUCJP_ENCODING_NAME +#define EUCJP_ENCODING_NAME "eucJP" +#endif + +/* + * U+304B: hiragana letter KA + * U+3099: combining katakana-hiragana voiced sound mark + * + * map("U+304B U+3099") -> "U+304C" + * + * U+304C: hiragana letter GA + */ +#define UTF8_NAME "A" +#define UTF8_REVNAME "a" + +/* + * A4AC: hiragana letter GA (in EUC-JP) + */ +#define EUCJP_NAME "\xa4\xac" +#define EUCJP_REVNAME "\xa4\xac" + +/* + * Conversion result of "U+304B U+3099 A" + */ +#define PUNYCODE_NAME "xn--a-i8t" + +/* + * Conversion result of "A U+304B U+3099" (in EUC-JP). + */ +#define AUX_EUCJP_NAME "xn--a-i\xa3\xb8t" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic-conversion +//-- +// Initialize the `resconf' context. +// Set local encoding to `UTF-8'. +{ + char to[256]; + idn_result_t r; + idn_resconf_t ctx; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + unsetenv("IDN_DISABLE"); + + r = idn_resconf_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_resconf_create(&ctx); + ASSERT_RESULT(r, idn_success); + + r = idn_resconf_setdefaults(ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic-conversion +{ + idn_resconf_destroy(ctx); +} + +//# SETUP +// group: quiet +//-- +// Set log level to `fatal' to supress log messages. +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +//-- +// Restore log level. +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: basic conversion by encodename() +// group: generic-conversion +{ + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: basic conversion by decodename() +// group: generic-conversion +{ + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +} + +//# TESTCASE +// title: basic conversion by decodename2() +// group: generic-conversion +{ + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); +#ifdef WITHOUT_ICONV + ASSERT_RESULT(r, idn_failure); +#else + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: call decodename2() with auxencoding=NULL +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to), + NULL); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=0 +// group: generic-conversion +{ + r = idn_res_encodename(ctx, 0, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call decodename() with actions=0 +// group: generic-conversion +{ + r = idn_res_decodename(ctx, 0, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call decodename2() with actions=0 +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, 0, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=rtcheck +// group: generic-conversion quiet +{ + r = idn_res_encodename(ctx, IDN_RTCHECK, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-query +// group: generic-conversion quiet +{ + r = idn_res_encodename(ctx, IDN_DECODE_QUERY, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-app +// group: generic-conversion quiet +{ + r = idn_res_encodename(ctx, IDN_DECODE_APP, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=decode-stored +// group: generic-conversion quiet +{ + r = idn_res_encodename(ctx, IDN_DECODE_STORED, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call encodename() with actions=(1<<31) +// group: generic-conversion quiet +{ + r = idn_res_encodename(ctx, 1 << 31, EUCJP_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename() with actions=localmap +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, IDN_LOCALMAP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=localmap +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_LOCALMAP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=lencheck +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, IDN_LENCHECK, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=lencheck +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_LENCHECK, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-query +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, IDN_ENCODE_QUERY, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-query +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_ENCODE_QUERY, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-app +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, IDN_ENCODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-app +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_ENCODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=encode-stored +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, IDN_ENCODE_STORED, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=encode-stored +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_ENCODE_STORED, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=(1<<31) +// group: generic-conversion quiet +{ + r = idn_res_decodename(ctx, 1 << 31, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +} + +//# TESTCASE +// title: call decodename2() with actions=(1<<31) +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, 1 << 31, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call encodename() with actions=localconv +// group: generic-conversion quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_encodename(ctx, IDN_LOCALCONV, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename() with actions=localconv +// group: generic-conversion quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename(ctx, IDN_LOCALCONV, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_action); +#endif +} + +//# TESTCASE +// title: call decodename2() with actions=localconv +// group: generic-conversion +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_LOCALCONV, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_failure); +#endif +} + +//# TESTCASE +// title: call enable(0) and then encodename() +// group: generic-conversion +{ + idn_res_enable(0); + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call decodename() when IDN_DISABLE is defined +// group: generic-conversion +{ + idn_res_enable(0); + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call decodename() when IDN_DISABLE is defined +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + idn_res_enable(0); + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: call enable(0) and then encodename() +// group: generic-conversion +{ + idn_res_enable(0); + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: call enable(0) and then decodename() +// group: generic-conversion +{ + idn_res_enable(0); + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: call enable(0) and then decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + idn_res_enable(0); + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: set IDN_DISABLE and call encodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE and call decodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE and call decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + setenv("IDN_DISABLE", "1", 1); + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); +#endif +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and encodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + idn_res_enable(1); + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and decodename() +// group: generic-conversion +{ + setenv("IDN_DISABLE", "1", 1); + idn_res_enable(1); + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +} + +//# TESTCASE +// title: set IDN_DISABLE, and then call enable(1) and decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + setenv("IDN_DISABLE", "1", 1); + idn_res_enable(1); + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); +#endif +} + +//# TESTCASE +// title: overrun test for arg `to' of encodename() +// group: generic-conversion +{ + /* Normal case */ + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, + strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, + strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* enable(0) case */ + idn_res_enable(0); + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, + strlen(UTF8_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); + + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, + strlen(UTF8_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_res_enable(1); + r = idn_res_encodename(ctx, 0, UTF8_NAME, to, strlen(UTF8_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_NAME); + + r = idn_res_encodename(ctx, 0, UTF8_NAME, to, strlen(UTF8_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: overrun test for arg `to' of decodename() +// group: generic-conversion +{ + /* Normal case */ + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(UTF8_REVNAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); + + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(UTF8_REVNAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* idn_res_enable(0) case */ + idn_res_enable(0); + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_res_enable(1); + r = idn_res_decodename(ctx, 0, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, PUNYCODE_NAME); + + r = idn_res_decodename(ctx, 0, PUNYCODE_NAME, to, + strlen(PUNYCODE_NAME)); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: overrun test for arg `to' of decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* Normal case */ + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(UTF8_REVNAME) + 1, EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, UTF8_REVNAME); + + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(UTF8_REVNAME), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* idn_res_enable(0) case */ + idn_res_enable(0); + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME) + 1, EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); + + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + + /* actions=0 case */ + idn_res_enable(1); + r = idn_res_decodename2(ctx, 0, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME) + 1, EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, AUX_EUCJP_NAME); + + r = idn_res_decodename2(ctx, 0, AUX_EUCJP_NAME, to, + strlen(AUX_EUCJP_NAME), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); + +#endif +} + +//# TESTCASE +// title: call encodename() with tolen=0 +// group: generic-conversion +{ + r = idn_res_encodename(ctx, IDN_ENCODE_APP, UTF8_NAME, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call decodename() with tolen=0 +// group: generic-conversion +{ + r = idn_res_decodename(ctx, IDN_DECODE_APP, PUNYCODE_NAME, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: call decodename2() with tolen=0 +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_DECODE_APP, AUX_EUCJP_NAME, to, 0, + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_buffer_overflow); +#endif +} + +//# TESTCASE +// title: convert an empty string using encodename() +// group: generic-conversion +{ + r = idn_res_encodename(ctx, IDN_ENCODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} + +//# TESTCASE +// title: convert an empty string using decodename() +// group: generic-conversion +{ + r = idn_res_decodename(ctx, IDN_DECODE_APP, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} + +//# TESTCASE +// title: convert an empty string using decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + r = idn_res_decodename2(ctx, IDN_DECODE_APP, "", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +#endif +} + +//# TESTCASE +// title: prohcheck by encodename() +// group: generic-conversion +{ + /* U+1680: prohibited character */ + r = idn_res_encodename(ctx, IDN_PROHCHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: unascheck by encodename() +// group: generic-conversion +{ + /* U+0221: unassigned codepoint */ + r = idn_res_encodename(ctx, IDN_UNASCHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: bidicheck by encodename() +// group: generic-conversion +{ + /* U+05D0: bidirectional property is "R" */ + /* `a': bidirectional property is "L" */ + /* `0', `-': bidirectional property is "N" */ + r = idn_res_encodename(ctx, IDN_BIDICHECK, "", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "", + to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "-a", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "-a-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "a-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "-0", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "-0-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_res_encodename(ctx, IDN_BIDICHECK, "0-", + to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: asccheck by encodename() +// group: generic-conversion +{ + r = idn_res_encodename(ctx, IDN_ASCCHECK, "-name", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_ASCCHECK, "name-", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); + + r = idn_res_encodename(ctx, IDN_ASCCHECK, "n ame", to, sizeof(to)); + ASSERT_RESULT(r, idn_prohibited); +} + +//# TESTCASE +// title: lencheck by encodename() +// group: generic-conversion +{ + r = idn_res_encodename(ctx, IDN_LENCHECK, + "123456789-123456789-123456789-123456789-" + "123456789-123456789-123", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + + r = idn_res_encodename(ctx, IDN_LENCHECK, + "123456789-123456789-123456789-123456789-" + "123456789-123456789-1234", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_length); + + r = idn_res_encodename(ctx, IDN_LENCHECK, "a..b", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_length); +} + +//# TESTCASE +// title: rtcheck non-prohchecked label by decodename() +// group: generic-conversion +{ + /* "xn--6ue" -> "U+1680" (prohibited character) */ + r = idn_res_decodename(ctx, IDN_RTCHECK, "xn--6ue", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6ue"); +} + +//# TESTCASE +// title: rtcheck non-unaschecked label by decodename() +// group: generic-conversion +{ + /* "xn--6la" -> "U+0221" (unassigned codepoint) */ + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_UNASCHECK, + "xn--6la", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6la"); +} + +//# TESTCASE +// title: rtcheck non-ascchecked label by decodename() +// group: generic-conversion +{ + /* "xn----x7t" -> "- U+3042" */ + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----x7t", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----x7t"); + + /* "xn----w7t" -> "U+3042 -" */ + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----w7t", to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----w7t"); +} + +//# TESTCASE +// title: rtcheck non-lenchecked label by decodename() +// group: generic-conversion +{ + /* `s1' has 63 characters */ + const char *s1 = + "xn--l8jaa5522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + const char *s1rev = + "" + "" + ""; + + /* `s2' has 64 characters */ + const char *s2 = + "xn--a-w7ta6522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + /* `s3' has an empty label */ + const char *s3 = "a..b"; + + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK, s1, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s1rev); + + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK, s2, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s2); + + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK, s3, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s3); +} + +//# TESTCASE +// title: rtcheck non-prohchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn--6ue" -> "U+1680" (prohibited character) */ + r = idn_res_decodename2(ctx, IDN_RTCHECK, "xn--6ue", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6ue"); +#endif +} + +//# TESTCASE +// title: rtcheck non-unaschecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn--6la" -> "U+0221" (unassigned codepoint) */ + r = idn_res_decodename2(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_UNASCHECK, + "xn--6la", to, sizeof(to), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn--6la"); +#endif +} + +//# TESTCASE +// title: rtcheck non-ascchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "xn----x7t" -> "- U+3042" */ + r = idn_res_decodename2(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----x7t", to, sizeof(to), EUCJP_ENCODING_NAME); + + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----x7t"); + + /* "xn----w7t" -> "U+3042 -" */ + r = idn_res_decodename2(ctx, IDN_IDNCONV | IDN_RTCHECK | IDN_ASCCHECK, + "xn----w7t", to, sizeof(to), EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, "xn----w7t"); +#endif +} + +//# TESTCASE +// title: rtcheck non-lenchecked label by decodename2() +// group: generic-conversion +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* `s1' has 63 characters */ + const char *s1 = + "xn--l8jaa5522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + const char *s1rev = + "" + "" + ""; + + /* `s2' has 64 characters */ + const char *s2 = + "xn--a-w7ta6522a8sj38bzugvvblo3y90fjzgvxlmxscifws3d43odzaq6aj340b"; + + /* `s3' has an empty label */ + const char *s3 = "a..b"; + + r = idn_res_decodename2(ctx, IDN_IDNCONV | IDN_RTCHECK, s1, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s1rev); + + r = idn_res_decodename2(ctx, IDN_IDNCONV | IDN_RTCHECK, s2, to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s2); + + r = idn_res_decodename(ctx, IDN_IDNCONV | IDN_RTCHECK, s3, to, sizeof(to)); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, s3); +#endif +} + +//# TESTCASE +// title: pass broken string as `from' to encodename() +// group: generic-conversion quiet +{ + /* "\xe3\x21" is not valid UTF-8 string */ + r = idn_res_encodename(ctx, IDN_ENCODE_APP, "\xe3\x21", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: pass broken string as `from' to decodename() +// group: generic-conversion quiet +{ + /* "\xe3\x21" is not valid UTF-8 string */ + r = idn_res_decodename(ctx, IDN_DECODE_APP, "\xe3\x21", to, sizeof(to)); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: pass broken string as `from' to decodename2() +// group: generic-conversion quiet +{ +#ifdef WITHOUT_ICONV + SKIP_TESTCASE; +#else + /* "\xa4\x21" is not valid EUC-JP string */ + r = idn_res_decodename2(ctx, IDN_DECODE_APP, "\xa4\x21", to, sizeof(to), + EUCJP_ENCODING_NAME); + ASSERT_RESULT(r, idn_invalid_encoding); +#endif +} + diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/resconf.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/resconf.tsy new file mode 100644 index 0000000000..0537ac0a6b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/resconf.tsy @@ -0,0 +1,1026 @@ +#ifndef lint +static char *rcsid = "$Id: resconf.tsy,v 1.1 2003/06/04 00:27:00 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "testutil.h" + +#define CONF_FILENAME "test.conf" +#define MAP_FILENAME "test.map" + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: generic-init +{ + idn_result_t r; + idn_resconf_t ctx = NULL; + + setenv("IDN_LOCAL_CODESET", "UTF-8", 1); + + r = idn_resconf_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_resconf_create(&ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: generic-init +{ + if (ctx != NULL) + idn_resconf_destroy(ctx); + remove(CONF_FILENAME); + remove(MAP_FILENAME); +} + +//# SETUP +// group: set-defaults +{ + r = idn_resconf_setdefaults(ctx); + ASSERT_RESULT(r, idn_success); +} + +//# TEARDOWN +// group: set-defaults +{ +} + +//# SETUP +// group: quiet +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +{ + idn_log_setlevel(saved_log_level); +} + +//# SETUP +// group: delimitermap_ctx +{ + idn_delimitermap_t delimitermap_ctx1 = NULL; + idn_delimitermap_t delimitermap_ctx2 = NULL; +} + +//# TEARDOWN +// group: delimitermap_ctx +{ + if (delimitermap_ctx1 != NULL) + idn_delimitermap_destroy(delimitermap_ctx1); + if (delimitermap_ctx2 != NULL) + idn_delimitermap_destroy(delimitermap_ctx2); +} + +//# SETUP +// group: idnconverter_ctx +{ + idn_converter_t idnconverter_ctx1 = NULL; + idn_converter_t idnconverter_ctx2 = NULL; +} + +//# TEARDOWN +// group: idnconverter_ctx +{ + if (idnconverter_ctx1 != NULL) + idn_converter_destroy(idnconverter_ctx1); + if (idnconverter_ctx2 != NULL) + idn_converter_destroy(idnconverter_ctx2); +} + +//# SETUP +// group: localconverter_ctx +{ + idn_converter_t localconverter_ctx1 = NULL; + idn_converter_t localconverter_ctx2 = NULL; +} + +//# TEARDOWN +// group: localconverter_ctx +{ + if (localconverter_ctx1 != NULL) + idn_converter_destroy(localconverter_ctx1); + if (localconverter_ctx2 != NULL) + idn_converter_destroy(localconverter_ctx2); +} + +//# SETUP +// group: auxidnconverter_ctx +{ + idn_converter_t auxidnconverter_ctx1 = NULL; + idn_converter_t auxidnconverter_ctx2 = NULL; +} + +//# TEARDOWN +// group: auxidnconverter_ctx +{ + if (auxidnconverter_ctx1 != NULL) + idn_converter_destroy(auxidnconverter_ctx1); + if (auxidnconverter_ctx2 != NULL) + idn_converter_destroy(auxidnconverter_ctx2); +} + +//# SETUP +// group: mapselector_ctx +{ + idn_mapselector_t mapselector_ctx1 = NULL; + idn_mapselector_t mapselector_ctx2 = NULL; +} + +//# TEARDOWN +// group: mapselector_ctx +{ + if (mapselector_ctx1 != NULL) + idn_mapselector_destroy(mapselector_ctx1); + if (mapselector_ctx2 != NULL) + idn_mapselector_destroy(mapselector_ctx2); +} + +//# SETUP +// group: mapper_ctx +{ + idn_mapper_t mapper_ctx1 = NULL; + idn_mapper_t mapper_ctx2 = NULL; +} + +//# TEARDOWN +// group: mapper_ctx +{ + if (mapper_ctx1 != NULL) + idn_mapper_destroy(mapper_ctx1); + if (mapper_ctx2 != NULL) + idn_mapper_destroy(mapper_ctx2); +} + +//# SETUP +// group: normalizer_ctx +{ + idn_normalizer_t normalizer_ctx1 = NULL; + idn_normalizer_t normalizer_ctx2 = NULL; +} + +//# TEARDOWN +// group: normalizer_ctx +{ + if (normalizer_ctx1 != NULL) + idn_normalizer_destroy(normalizer_ctx1); + if (normalizer_ctx2 != NULL) + idn_normalizer_destroy(normalizer_ctx2); +} + +//# SETUP +// group: prohibitchecker_ctx +{ + idn_checker_t prohibitchecker_ctx1 = NULL; + idn_checker_t prohibitchecker_ctx2 = NULL; +} + +//# TEARDOWN +// group: prohibitchecker_ctx +{ + if (prohibitchecker_ctx1 != NULL) + idn_checker_destroy(prohibitchecker_ctx1); + if (prohibitchecker_ctx2 != NULL) + idn_checker_destroy(prohibitchecker_ctx2); +} + +//# SETUP +// group: unassignedchecker_ctx +{ + idn_checker_t unassignedchecker_ctx1 = NULL; + idn_checker_t unassignedchecker_ctx2 = NULL; +} + +//# TEARDOWN +// group: unassignedchecker_ctx +{ + if (unassignedchecker_ctx1 != NULL) + idn_checker_destroy(unassignedchecker_ctx1); + if (unassignedchecker_ctx2 != NULL) + idn_checker_destroy(unassignedchecker_ctx2); +} + +//# SETUP +// group: bidichecker_ctx +{ + idn_checker_t bidichecker_ctx1 = NULL; + idn_checker_t bidichecker_ctx2 = NULL; +} + +//# TEARDOWN +// group: bidichecker_ctx +{ + if (bidichecker_ctx1 != NULL) + idn_checker_destroy(bidichecker_ctx1); + if (bidichecker_ctx2 != NULL) + idn_checker_destroy(bidichecker_ctx2); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call create() without initialization. +//-- +// This must be the first test case. +{ + idn_result_t r; + idn_resconf_t ctx = NULL; + + r = idn_resconf_create(&ctx); + ASSERT_RESULT(r, idn_failure); + + if (ctx != NULL) + idn_resconf_destroy(ctx); +} + +//# TESTCASE +// title: call initialize() twice. +// +{ + idn_result_t r; + + r = idn_resconf_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_resconf_initialize(); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: call create() +{ + idn_result_t r; + idn_resconf_t ctx; + + r = idn_resconf_initialize(); + ASSERT_RESULT(r, idn_success); + + r = idn_resconf_create(&ctx); + ASSERT_RESULT(r, idn_success); + + if (ctx != NULL) + idn_resconf_destroy(ctx); +} + +//# TESTCASE +// title: load file (idn-encoding) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + "idn-encoding Punycode", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (nameprep) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + "nameprep " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (idn-encoding & nameprep) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + "idn-encoding Punycode", + "nameprep " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (empty) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (local-map filemap) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp filemap:" MAP_FILENAME, + NULL); + create_conf_file(MAP_FILENAME, 0, + "2212; FF0D", + NULL); + + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (local-map nameprep) +// group: generic-init +{ + const char *idn_encoding; + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: set defaults +// group: generic-init set-defaults +{ +} + +//# TESTCASE +// title: load file (no file) +// group: generic-init +{ + r = idn_resconf_loadfile(ctx, "no-such-file"); + ASSERT_RESULT(r, idn_nofile); +} + +//# TESTCASE +// title: load file (empty file name) +// group: generic-init +{ + r = idn_resconf_loadfile(ctx, ""); + ASSERT_RESULT(r, idn_nofile); +} + +//# TESTCASE +// title: load file (unknown command) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "unknown-command " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: load file (no newline at the end of file) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, CONF_NO_EOF_NEWLINE, + "nameprep " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (too long line) +// group: generic-init quiet +{ + char arg[1024]; + char *line; + + /* arg = "local-map . ////..." */ + memset(arg, '/', sizeof(arg)); + arg[sizeof(arg) - 1] = '\0'; + line = "local-map . "; + memcpy(arg, line, strlen(line)); + + create_conf_file(CONF_FILENAME, 0, arg, NULL); + + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: load file (empty file) +// group: generic-init +{ + create_conf_file(CONF_FILENAME, 0, "", NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: load file (invalid parameter for idn-encoding) +// group: generic-init quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + create_conf_file(CONF_FILENAME, 0, + "idn-encoding invalid-encoding-name", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_name); +#endif +} + +//# TESTCASE +// title: load file (define idn-encoding twice) +// group: generic-init quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + create_conf_file(CONF_FILENAME, CONF_NO_EOF_NEWLINE, + "idn-encoding Punycode", + "idn-encoding Punycode", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +#endif +} + +//# TESTCASE +// title: load file (invalid parameter for nameprep) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "nameprep invalid-version", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: load file (define nameprep twice) +// group: generic-init quiet +{ +#ifndef WITHOUT_ICONV + SKIP_TESTCASE; +#else + create_conf_file(CONF_FILENAME, CONF_NO_EOF_NEWLINE, + "nameprep " IDN_NAMEPREP_CURRENT, + "nameprep " IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +#endif +} + +//# TESTCASE +// title: load file (invalid parameter for local-map) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "local-map .jp :", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_name); + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp invalid:/dev/null", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_name); + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp filemap", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_nofile); + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp filemap:", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_nofile); + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp filemap:no-such-file", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_nofile); + + create_conf_file(CONF_FILENAME, 0, + "local-map " + "abcdefghijklmnopqrstuvwxyz0123" + "abcdefghijklmnopqrstuvwxyz0123" + "4567 " + IDN_NAMEPREP_CURRENT, + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_name); +} + +//# TESTCASE +// title: load file (pass wrong number of parameters to idn-encoding) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "idn-encoding ", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); + + create_conf_file(CONF_FILENAME, 0, + "idn-encoding Punycode ?", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: load file (pass wrong number of parameters to nameprep) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "nameprep ", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); + + create_conf_file(CONF_FILENAME, 0, + "nameprep " IDN_NAMEPREP_CURRENT " ?", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: load file (pass wrong number of parameters to local-map) +// group: generic-init quiet +{ + create_conf_file(CONF_FILENAME, 0, + "local-map ", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); + + create_conf_file(CONF_FILENAME, 0, + "local-map .jp ", + NULL); + r = idn_resconf_loadfile(ctx, CONF_FILENAME); + ASSERT_RESULT(r, idn_invalid_syntax); +} + +//# TESTCASE +// title: getdelimitermap +// group: generic-init set-defaults delimitermap_ctx +{ + delimitermap_ctx1 = idn_resconf_getdelimitermap(ctx); + ASSERT_PTR_NE(delimitermap_ctx1, NULL); +} + +//# TESTCASE +// title: setdelimitermap +// group: generic-init set-defaults delimitermap_ctx +{ + r = idn_delimitermap_create(&delimitermap_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set delimitermap context. */ + idn_resconf_setdelimitermap(ctx, delimitermap_ctx1); + delimitermap_ctx2 = idn_resconf_getdelimitermap(ctx); + ASSERT_PTR(delimitermap_ctx2, delimitermap_ctx1); + idn_delimitermap_destroy(delimitermap_ctx2); + + /* set NULL as delimitermap context */ + idn_resconf_setdelimitermap(ctx, NULL); + delimitermap_ctx2 = idn_resconf_getdelimitermap(ctx); + ASSERT_PTR(delimitermap_ctx2, NULL); +} + +//# TESTCASE +// title: addalldelimitermapucs +// group: generic-init set-defaults +{ + static unsigned long v[] = {0x002C, 0x3001, 0xFF0C}; + int nv = sizeof(v) / sizeof(*v); + + r = idn_resconf_addalldelimitermapucs(ctx, v, nv); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getidnconverter +// group: generic-init set-defaults idnconverter_ctx +{ + idnconverter_ctx1 = idn_resconf_getidnconverter(ctx); + ASSERT_PTR_NE(idnconverter_ctx1, NULL); +} + +//# TESTCASE +// title: setidnconverter +// group: generic-init set-defaults idnconverter_ctx +{ + r = idn_converter_create("Punycode", &idnconverter_ctx1, 0); + ASSERT_RESULT(r, idn_success); + + /* set idnconverter context. */ + idn_resconf_setidnconverter(ctx, idnconverter_ctx1); + idnconverter_ctx2 = idn_resconf_getidnconverter(ctx); + ASSERT_PTR(idnconverter_ctx2, idnconverter_ctx1); + idn_converter_destroy(idnconverter_ctx2); + + /* set NULL as idnconverter context */ + idn_resconf_setidnconverter(ctx, NULL); + idnconverter_ctx2 = idn_resconf_getidnconverter(ctx); + ASSERT_PTR(idnconverter_ctx2, NULL); +} + +//# TESTCASE +// title: getlocalconverter +// group: generic-init set-defaults localconverter_ctx +{ + localconverter_ctx1 = idn_resconf_getlocalconverter(ctx); +#ifdef WITHOUT_ICONV + ASSERT_PTR(localconverter_ctx1, NULL); +#else + ASSERT_PTR_NE(localconverter_ctx1, NULL); +#endif +} + +//# TESTCASE +// title: setlocalconverter +// group: generic-init set-defaults localconverter_ctx +{ + r = idn_converter_create("UTF-8", &localconverter_ctx1, 0); + ASSERT_RESULT(r, idn_success); + + /* set localconverter context. */ + idn_resconf_setlocalconverter(ctx, localconverter_ctx1); + localconverter_ctx2 = idn_resconf_getlocalconverter(ctx); +#ifdef WITHOUT_ICONV + ASSERT_PTR(localconverter_ctx2, NULL); +#else + ASSERT_PTR(localconverter_ctx2, localconverter_ctx1); + idn_converter_destroy(localconverter_ctx2); +#endif + + /* set NULL as localconverter context */ + idn_resconf_setlocalconverter(ctx, NULL); + localconverter_ctx2 = idn_resconf_getlocalconverter(ctx); +#ifdef WITHOUT_ICONV + ASSERT_PTR(localconverter_ctx2, NULL); +#else + ASSERT_PTR_NE(localconverter_ctx2, NULL); +#endif +} + +//# TESTCASE +// title: getauxidnconverter +// group: generic-init set-defaults auxidnconverter_ctx +{ + auxidnconverter_ctx1 = idn_resconf_getauxidnconverter(ctx); + ASSERT_PTR(auxidnconverter_ctx1, NULL); +} + +//# TESTCASE +// title: setauxidnconverter +// group: generic-init set-defaults auxidnconverter_ctx +{ + r = idn_converter_create("Punycode", &auxidnconverter_ctx1, 0); + ASSERT_RESULT(r, idn_success); + + /* set auxidnconverter context. */ + idn_resconf_setauxidnconverter(ctx, auxidnconverter_ctx1); + auxidnconverter_ctx2 = idn_resconf_getauxidnconverter(ctx); + ASSERT_PTR(auxidnconverter_ctx2, auxidnconverter_ctx1); + idn_converter_destroy(auxidnconverter_ctx2); + + /* set NULL as auxidnconverter context */ + idn_resconf_setauxidnconverter(ctx, NULL); + auxidnconverter_ctx2 = idn_resconf_getauxidnconverter(ctx); + ASSERT_PTR(auxidnconverter_ctx2, NULL); +} + +//# TESTCASE +// title: getlocalmapselector +// group: generic-init set-defaults mapselector_ctx +{ + mapselector_ctx1 = idn_resconf_getlocalmapselector(ctx); + ASSERT_PTR(mapselector_ctx1, NULL); +} + +//# TESTCASE +// title: setlocalmapselector +// group: generic-init set-defaults mapselector_ctx +{ + r = idn_mapselector_create(&mapselector_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set localmapselector context. */ + idn_resconf_setlocalmapselector(ctx, mapselector_ctx1); + mapselector_ctx2 = idn_resconf_getlocalmapselector(ctx); + ASSERT_PTR(mapselector_ctx2, mapselector_ctx1); + idn_mapselector_destroy(mapselector_ctx2); + + /* set NULL as localmapselector context */ + idn_resconf_setlocalmapselector(ctx, NULL); + mapselector_ctx2 = idn_resconf_getlocalmapselector(ctx); + ASSERT_PTR(mapselector_ctx2, NULL); +} + +//# TESTCASE +// title: addalllocalmapselectornames +// group: generic-init set-defaults +{ + static const char *names[] = { + "filemap:" MAP_FILENAME, + "filemap:" MAP_FILENAME, + "filemap:" MAP_FILENAME + }; + int nnames = sizeof(names) / sizeof(*names); + + create_conf_file(MAP_FILENAME, 0, + "2212; FF0D", + NULL); + r = idn_resconf_addalllocalmapselectornames(ctx, ".jp", names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getmapper +// group: generic-init set-defaults mapper_ctx +{ + mapper_ctx1 = idn_resconf_getmapper(ctx); + ASSERT_PTR_NE(mapper_ctx1, NULL); +} + +//# TESTCASE +// title: setmapper +// group: generic-init set-defaults mapper_ctx +{ + r = idn_mapper_create(&mapper_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set mapper context. */ + idn_resconf_setmapper(ctx, mapper_ctx1); + mapper_ctx2 = idn_resconf_getmapper(ctx); + ASSERT_PTR(mapper_ctx2, mapper_ctx1); + idn_mapper_destroy(mapper_ctx2); + + /* set NULL as mapper context */ + idn_resconf_setmapper(ctx, NULL); + mapper_ctx2 = idn_resconf_getmapper(ctx); + ASSERT_PTR(mapper_ctx2, NULL); +} + +//# TESTCASE +// title: addallmappernames +// group: generic-init set-defaults +{ + static const char *names[] = { + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT + }; + int nnames = sizeof(names) / sizeof(*names); + + r = idn_resconf_addallmappernames(ctx, names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getnormalizer +// group: generic-init set-defaults normalizer_ctx +{ + normalizer_ctx1 = idn_resconf_getnormalizer(ctx); + ASSERT_PTR_NE(normalizer_ctx1, NULL); +} + +//# TESTCASE +// title: setnormalizer +// group: generic-init set-defaults normalizer_ctx +{ + r = idn_normalizer_create(&normalizer_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set normalizer context. */ + idn_resconf_setnormalizer(ctx, normalizer_ctx1); + normalizer_ctx2 = idn_resconf_getnormalizer(ctx); + ASSERT_PTR(normalizer_ctx2, normalizer_ctx1); + idn_normalizer_destroy(normalizer_ctx2); + + /* set NULL as normalizer context */ + idn_resconf_setnormalizer(ctx, NULL); + normalizer_ctx2 = idn_resconf_getnormalizer(ctx); + ASSERT_PTR(normalizer_ctx2, NULL); +} + +//# TESTCASE +// title: addallnormalizernames +// group: generic-init set-defaults +{ + static const char *names[] = { + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT + }; + int nnames = sizeof(names) / sizeof(*names); + + r = idn_resconf_addallnormalizernames(ctx, names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getprohibitchecker +// group: generic-init set-defaults prohibitchecker_ctx +{ + prohibitchecker_ctx1 = idn_resconf_getprohibitchecker(ctx); + ASSERT_PTR_NE(prohibitchecker_ctx1, NULL); +} + +//# TESTCASE +// title: setprohibitchecker +// group: generic-init set-defaults prohibitchecker_ctx +{ + r = idn_checker_create(&prohibitchecker_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set checker context. */ + idn_resconf_setprohibitchecker(ctx, prohibitchecker_ctx1); + prohibitchecker_ctx2 = idn_resconf_getprohibitchecker(ctx); + ASSERT_PTR(prohibitchecker_ctx2, prohibitchecker_ctx1); + idn_checker_destroy(prohibitchecker_ctx2); + + /* set NULL as checker context */ + idn_resconf_setprohibitchecker(ctx, NULL); + prohibitchecker_ctx2 = idn_resconf_getprohibitchecker(ctx); + ASSERT_PTR(prohibitchecker_ctx2, NULL); +} + +//# TESTCASE +// title: addallprohibitcheckernames +// group: generic-init set-defaults +{ + static const char *names[] = { + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT + }; + int nnames = sizeof(names) / sizeof(*names); + + r = idn_resconf_addallprohibitcheckernames(ctx, names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getunassignedchecker +// group: generic-init set-defaults unassignedchecker_ctx +{ + unassignedchecker_ctx1 = idn_resconf_getunassignedchecker(ctx); + ASSERT_PTR_NE(unassignedchecker_ctx1, NULL); +} + +//# TESTCASE +// title: setunassignedchecker +// group: generic-init set-defaults unassignedchecker_ctx +{ + r = idn_checker_create(&unassignedchecker_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set checker context. */ + idn_resconf_setunassignedchecker(ctx, unassignedchecker_ctx1); + unassignedchecker_ctx2 = idn_resconf_getunassignedchecker(ctx); + ASSERT_PTR(unassignedchecker_ctx2, unassignedchecker_ctx1); + idn_checker_destroy(unassignedchecker_ctx2); + + /* set NULL as checker context */ + idn_resconf_setunassignedchecker(ctx, NULL); + unassignedchecker_ctx2 = idn_resconf_getunassignedchecker(ctx); + ASSERT_PTR(unassignedchecker_ctx2, NULL); +} + +//# TESTCASE +// title: addallunassignedcheckernames +// group: generic-init set-defaults +{ + static const char *names[] = { + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT + }; + int nnames = sizeof(names) / sizeof(*names); + + r = idn_resconf_addallunassignedcheckernames(ctx, names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: getbidichecker +// group: generic-init set-defaults bidichecker_ctx +{ + bidichecker_ctx1 = idn_resconf_getbidichecker(ctx); + ASSERT_PTR_NE(bidichecker_ctx1, NULL); +} + +//# TESTCASE +// title: setbidichecker +// group: generic-init set-defaults bidichecker_ctx +{ + r = idn_checker_create(&bidichecker_ctx1); + ASSERT_RESULT(r, idn_success); + + /* set checker context. */ + idn_resconf_setbidichecker(ctx, bidichecker_ctx1); + bidichecker_ctx2 = idn_resconf_getbidichecker(ctx); + ASSERT_PTR(bidichecker_ctx2, bidichecker_ctx1); + idn_checker_destroy(bidichecker_ctx2); + + /* set NULL as checker context */ + idn_resconf_setbidichecker(ctx, NULL); + bidichecker_ctx2 = idn_resconf_getbidichecker(ctx); + ASSERT_PTR(bidichecker_ctx2, NULL); +} + +//# TESTCASE +// title: addallbidicheckernames +// group: generic-init set-defaults +{ + static const char *names[] = { + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT, + IDN_NAMEPREP_CURRENT + }; + int nnames = sizeof(names) / sizeof(*names); + + r = idn_resconf_addallbidicheckernames(ctx, names, nnames); + ASSERT_RESULT(r, idn_success); +} + +//# TESTCASE +// title: setnameprepversion +// group: generic-init set-defaults +{ + idn_resconf_setnameprepversion(ctx, IDN_NAMEPREP_CURRENT); + ASSERT_RESULT(r, idn_success); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/setenv.c b/contrib/idn/idnkit-1.0-src/lib/tests/setenv.c new file mode 100644 index 0000000000..4d571e1d8f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/setenv.c @@ -0,0 +1,134 @@ +#ifndef lint +static char *rcsid = "$Id: setenv.c,v 1.1 2003/06/04 00:27:01 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include + +/* + * We don't include here. + * Also may declare `environ' and its type might be different + * from ours. + */ +extern char **environ; + +typedef struct myenv myenv_t; + +struct myenv { + char *pointer; + myenv_t *next; + myenv_t *prev; +}; + +static myenv_t *myenvs = NULL; + +void +myunsetenv(const char *name) { + char **e; + myenv_t *mye; + size_t namelen; + extern void free(void *); + + namelen = strlen(name); + for (e = environ; *e != NULL; e++) { + if (strncmp(*e, name, namelen) == 0 && (*e)[namelen] == '=') + break; + } + if (*e == NULL) + return; + + for (mye = myenvs; mye != NULL; mye = mye->next) { + if (mye->pointer == *e) { + if (mye->next != NULL) + mye->next->prev = mye->prev; + if (mye->prev != NULL) + mye->prev->next = mye->next; + if (mye->next == NULL && mye->prev == NULL) + myenvs = NULL; + free(mye); + free(*e); + break; + } + } + + for ( ; *e != NULL; e++) + *e = *(e + 1); +} + +#include + +int +mysetenv(const char *name, const char *value, int overwrite) { + myenv_t *mye; + char *buffer; + int result; + + if (getenv(name) != NULL && !overwrite) + return 0; + + buffer = (char *) malloc(strlen(name) + strlen(value) + 2); + if (buffer == NULL) + return -1; + strcpy(buffer, name); + strcat(buffer, "="); + strcat(buffer, value); + + myunsetenv(name); + + mye = (myenv_t *) malloc(sizeof(myenv_t)); + if (mye == NULL) + return -1; + mye->pointer = buffer; + mye->next = myenvs; + mye->prev = NULL; + if (myenvs != NULL) + myenvs->prev = mye; + myenvs = mye; + + result = putenv(buffer); + + return result; +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/setenv.h b/contrib/idn/idnkit-1.0-src/lib/tests/setenv.h new file mode 100644 index 0000000000..81eaaa60f9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/setenv.h @@ -0,0 +1,61 @@ +/* $Id: setenv.h,v 1.1 2003/06/04 00:27:01 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_SETENV_H +#define IDN_SETENV_H + +#include "testconfig.h" + +#ifndef HAVE_SETENV +#define unsetenv(a1) myunsetenv(a1) +#endif + +#ifndef HAVE_SETENV +#define setenv(a1, a2, a3) mysetenv(a1, a2, a3) +#endif + +void myunsetenv(const char *name); +int mysetenv(const char *name, const char *value, int overwrite); + +#endif /* IDN_SETENV_H */ diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.c b/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.c new file mode 100644 index 0000000000..14b202fcc9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.c @@ -0,0 +1,578 @@ +#ifndef lint +static char *rcsid = "$Id"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +typedef struct idn_testcase *idn_testcase_t; + +struct idn_testcase { + char *title; + idn_testsuite_testproc_t proc; +}; + +struct idn_testsuite { + idn_testcase_t testcases; + int ntestcases; + int testcase_size; + + int npassed; + int nfailed; + int nskipped; + idn_testcase_t current_testcase; + idn_teststatus_t current_status; + + idn_testsuite_msgproc_t msgproc; + int verbose; +}; + +#define INITIAL_TESTCASE_SIZE 16 +#define INITIAL_SETUP_SIZE 4 +#define INITIAL_TEARDOWN_SIZE 4 + +static void run_internal(idn_testsuite_t ctx, char *titles[]); +static char *make_hex_string(const char *string); +static char *make_hex_ucs4string(const unsigned long *string); +static void put_failure_message(idn_testsuite_t ctx, const char *msg, + const char *file, int lineno); +static void idn_testsuite_msgtostderr(const char *msg); + +int +idn_testsuite_create(idn_testsuite_t *ctxp) { + idn_testsuite_t ctx = NULL; + + assert(ctxp != NULL); + + ctx = (idn_testsuite_t) malloc(sizeof(struct idn_testsuite)); + if (ctx == NULL) + goto error; + + ctx->testcases = NULL; + ctx->ntestcases = 0; + ctx->testcase_size = 0; + ctx->npassed = 0; + ctx->nfailed = 0; + ctx->nskipped = 0; + ctx->current_testcase = NULL; + ctx->current_status = idn_teststatus_pass; + ctx->msgproc = NULL; + ctx->verbose = 0; + + ctx->testcases = (idn_testcase_t) malloc(sizeof(struct idn_testcase) + * INITIAL_TESTCASE_SIZE); + if (ctx->testcases == NULL) + goto error; + ctx->testcase_size = INITIAL_TESTCASE_SIZE; + + *ctxp = ctx; + return (1); + +error: + if (ctx != NULL) + free(ctx->testcases); + free(ctx); + return (0); +} + +void +idn_testsuite_destroy(idn_testsuite_t ctx) { + int i; + + assert(ctx != NULL); + + for (i = 0; i < ctx->ntestcases; i++) + free(ctx->testcases[i].title); + + free(ctx->testcases); + free(ctx); +} + +int +idn_testsuite_addtestcase(idn_testsuite_t ctx, const char *title, + idn_testsuite_testproc_t proc) { + char *dup_title = NULL; + idn_testcase_t new_buffer = NULL; + idn_testcase_t new_testcase; + int new_size; + + assert(ctx != NULL && title != NULL && proc != NULL); + + dup_title = (char *)malloc(strlen(title) + 1); + if (dup_title == NULL) + goto error; + strcpy(dup_title, title); + + if (ctx->ntestcases == ctx->testcase_size) { + new_size = ctx->testcase_size + INITIAL_TESTCASE_SIZE; + new_buffer = (idn_testcase_t) + realloc(ctx->testcases, + sizeof(struct idn_testcase) * new_size); + if (new_buffer == NULL) + goto error; + ctx->testcases = new_buffer; + ctx->testcase_size = new_size; + } + + new_testcase = ctx->testcases + ctx->ntestcases; + new_testcase->title = dup_title; + new_testcase->proc = proc; + ctx->ntestcases++; + return (1); + +error: + free(dup_title); + free(new_buffer); + return (0); +} + +int +idn_testsuite_ntestcases(idn_testsuite_t ctx) { + assert(ctx != NULL); + return (ctx->ntestcases); +} + +void +idn_testsuite_setverbose(idn_testsuite_t ctx) { + assert(ctx != NULL); + ctx->verbose = 1; +} + +void +idn_testsuite_unsetverbose(idn_testsuite_t ctx) { + assert(ctx != NULL); + ctx->verbose = 0; +} + +static void +run_internal(idn_testsuite_t ctx, char *titles[]) { + int i, j; + int run_testcase; + const char *status; + + assert(ctx != NULL); + + ctx->npassed = 0; + ctx->nfailed = 0; + ctx->nskipped = 0; + + for (i = 0; i < ctx->ntestcases; i++) { + ctx->current_testcase = ctx->testcases + i; + ctx->current_status = idn_teststatus_pass; + + if (titles == NULL) + run_testcase = 1; + else { + run_testcase = 0; + for (j = 0; titles[j] != NULL; j++) { + if (strcmp(ctx->current_testcase->title, + titles[j]) == 0) { + run_testcase = 1; + break; + } + } + } + + if (!run_testcase) { + ctx->nskipped++; + continue; + } + if (ctx->verbose) { + fprintf(stderr, "start testcase %d: %s\n", i + 1, + ctx->testcases[i].title); + } + (ctx->testcases[i].proc)(ctx); + status = idn_teststatus_tostring(ctx->current_status); + if (ctx->verbose) { + fprintf(stderr, "end testcase %d: %s\n", i + 1, + status); + } + + switch (ctx->current_status) { + case idn_teststatus_pass: + ctx->npassed++; + break; + case idn_teststatus_fail: + ctx->nfailed++; + break; + case idn_teststatus_skip: + ctx->nskipped++; + break; + } + } +} + +void +idn_testsuite_runall(idn_testsuite_t ctx) { + assert(ctx != NULL); + run_internal(ctx, NULL); +} + +void +idn_testsuite_run(idn_testsuite_t ctx, char *titles[]) { + assert(ctx != NULL && titles != NULL); + run_internal(ctx, titles); +} + +int +idn_testsuite_npassed(idn_testsuite_t ctx) { + assert(ctx != NULL); + return (ctx->npassed); +} + +int +idn_testsuite_nfailed(idn_testsuite_t ctx) { + assert(ctx != NULL); + return (ctx->nfailed); +} + +int +idn_testsuite_nskipped(idn_testsuite_t ctx) { + assert(ctx != NULL); + return (ctx->nskipped); +} + +idn_teststatus_t +idn_testsuite_getstatus(idn_testsuite_t ctx) { + assert(ctx != NULL); + return (ctx->current_status); +} + +void +idn_testsuite_setstatus(idn_testsuite_t ctx, idn_teststatus_t status) { + assert(ctx != NULL); + assert(status == idn_teststatus_pass || + status == idn_teststatus_fail || + status == idn_teststatus_skip); + + ctx->current_status = status; +} + +const char * +idn_teststatus_tostring(idn_teststatus_t status) { + assert(status == idn_teststatus_pass || + status == idn_teststatus_fail || + status == idn_teststatus_skip); + + switch (status) { + case idn_teststatus_pass: + return "pass"; + break; + case idn_teststatus_fail: + return "failed"; + break; + case idn_teststatus_skip: + return "skipped"; + break; + } + + return "unknown"; +} + +void +idn_testsuite_assert(idn_testsuite_t ctx, const char *msg, + const char *file, int lineno) { + assert(ctx != NULL && msg != NULL && file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + put_failure_message(ctx, msg, file, lineno); +} + +void +idn_testsuite_assertint(idn_testsuite_t ctx, int gotten, int expected, + const char *file, int lineno) { + char msg[256]; /* large enough */ + + assert(ctx != NULL && file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (expected == gotten) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + sprintf(msg, "`%d' expected, but got `%d'", expected, gotten); + put_failure_message(ctx, msg, file, lineno); +} + +void +idn_testsuite_assertstring(idn_testsuite_t ctx, + const char *gotten, const char *expected, + const char *file, int lineno) { + char *expected_hex = NULL; + char *gotten_hex = NULL; + char *msg; + + assert(ctx != NULL && gotten != NULL && expected != NULL && + file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (strcmp(expected, gotten) == 0) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + msg = (char *)malloc(strlen(expected) * 4 + strlen(gotten) * 4 + 32); + expected_hex = make_hex_string(expected); + gotten_hex = make_hex_string(gotten); + if (msg == NULL || expected_hex == NULL || gotten_hex == NULL) { + msg = ""; + } else { + sprintf(msg, "`%s' expected, but got `%s'", + expected_hex, gotten_hex); + } + + put_failure_message(ctx, msg, file, lineno); + + free(msg); + free(expected_hex); + free(gotten_hex); +} + +void +idn_testsuite_assertptr(idn_testsuite_t ctx, const void *gotten, + const void *expected, const char *file, int lineno) { + char *msg; + + assert(ctx != NULL && file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (expected == gotten) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + if (expected == NULL) + msg = "NULL expected, but got non-NULL"; + else if (gotten == NULL) + msg = "non-NULL expected, but got NULL"; + else + msg = "expected pointer != gotten pointer"; + put_failure_message(ctx, msg, file, lineno); +} + +void +idn_testsuite_assertptrne(idn_testsuite_t ctx, + const void *gotten, const void *unexpected, + const char *file, int lineno) { + char *msg; + + assert(ctx != NULL && file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (unexpected != gotten) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + if (unexpected == NULL) + msg = "non-NULL unexpected, but got NULL"; + else if (gotten == NULL) + msg = "non-NULL expected, but got NULL"; + else + msg = "expected pointer == gotten pointer"; + put_failure_message(ctx, msg, file, lineno); +} + +void +idn_testsuite_assertresult(idn_testsuite_t ctx, + idn_result_t gotten, idn_result_t expected, + const char *file, int lineno) { + char msg[256]; /* large enough */ + + assert(ctx != NULL && file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (expected == gotten) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + sprintf(msg, "`%s' expected, but got `%s'", + idn_result_tostring(expected), idn_result_tostring(gotten)); + put_failure_message(ctx, msg, file, lineno); +} + +void +idn_testsuite_assertucs4string(idn_testsuite_t ctx, + const unsigned long *gotten, + const unsigned long *expected, + const char *file, int lineno) { + char *expected_hex = NULL; + char *gotten_hex = NULL; + char *msg; + + assert(ctx != NULL && gotten != NULL && expected != NULL && + file != NULL); + + if (idn_testsuite_getstatus(ctx) != idn_teststatus_pass) + return; + if (idn_ucs4_strcmp(expected, gotten) == 0) + return; + idn_testsuite_setstatus(ctx, idn_teststatus_fail); + + msg = (char *)malloc(idn_ucs4_strlen(expected) * 8 + + idn_ucs4_strlen(gotten) * 8 + 32); + expected_hex = make_hex_ucs4string(expected); + gotten_hex = make_hex_ucs4string(gotten); + if (msg == NULL || expected_hex == NULL || gotten_hex == NULL) { + msg = ""; + } else { + sprintf(msg, "`%s' expected, but got `%s'", + expected_hex, gotten_hex); + } + + put_failure_message(ctx, msg, file, lineno); + + free(msg); + free(expected_hex); + free(gotten_hex); +} + +static char * +make_hex_string(const char *string) { + static const char hex[] = {"0123456789abcdef"}; + char *hex_string; + const char *src; + char *dst; + + hex_string = (char *)malloc((strlen(string)) * 4 + 1); + if (hex_string == NULL) + return NULL; + + for (src = string, dst = hex_string; *src != '\0'; src++) { + if (0x20 <= *src && *src <= 0x7e && *src != '\\') { + *dst++ = *src; + } else { + *dst++ = '\\'; + *dst++ = 'x'; + *dst++ = hex[*(const unsigned char *)src >> 4]; + *dst++ = hex[*src & 0x0f]; + } + } + *dst = '\0'; + + return hex_string; +} + +#define UCS4_MAX 0x10fffffUL + +static char * +make_hex_ucs4string(const unsigned long *string) { + static const char hex[] = {"0123456789abcdef"}; + char *hex_string; + const unsigned long *src; + char *dst; + + hex_string = (char *)malloc((idn_ucs4_strlen(string)) * 8 + 1); + if (hex_string == NULL) + return NULL; + + for (src = string, dst = hex_string; *src != '\0'; src++) { + if (0x20 <= *src && *src <= 0x7e && *src != '\\') { + *dst++ = *src; + } else if (*src <= UCS4_MAX) { + *dst++ = '\\'; + *dst++ = 'u'; + if (*src >= 0x100000) { + *dst++ = hex[(*src >> 20) & 0x0f]; + } + if (*src >= 0x10000) { + *dst++ = hex[(*src >> 16) & 0x0f]; + } + *dst++ = hex[(*src >> 12) & 0x0f]; + *dst++ = hex[(*src >> 8) & 0x0f]; + *dst++ = hex[(*src >> 4) & 0x0f]; + *dst++ = hex[*src & 0x0f]; + } else { + *dst++ = '\\'; + *dst++ = 'u'; + *dst++ = '?'; + *dst++ = '?'; + *dst++ = '?'; + *dst++ = '?'; + } + } + *dst = '\0'; + + return hex_string; +} + +static void +put_failure_message(idn_testsuite_t ctx, const char *msg, const char *file, + int lineno) { + idn_testsuite_msgproc_t proc; + char buffer[256]; + const char *title; + + proc = (ctx->msgproc == NULL) ? + idn_testsuite_msgtostderr : ctx->msgproc; + title = (ctx->current_testcase != NULL && + ctx->current_testcase->title != NULL) ? + ctx->current_testcase->title : "anonymous"; + + sprintf(buffer, "%.100s: In test `%.100s':", file, title); + (*proc)(buffer); + + sprintf(buffer, "%.100s:%d: failed (%.100s)", file, lineno, msg); + (*proc)(buffer); +} + + +static void +idn_testsuite_msgtostderr(const char *msg) { + fputs(msg, stderr); + fputc('\n', stderr); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.h b/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.h new file mode 100644 index 0000000000..49cff43a8b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/testsuite.h @@ -0,0 +1,276 @@ +/* $Id: testsuite.h,v 1.1 2003/06/04 00:27:03 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_TESTSUITE_H +#define IDN_TESTSUITE_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Result codes for test case. + */ +typedef enum { + idn_teststatus_pass, + idn_teststatus_fail, + idn_teststatus_skip +} idn_teststatus_t; + +/* + * Testsuite manager type (opaque). + */ +typedef struct idn_testsuite *idn_testsuite_t; + +/* + * Testcase function type. + */ +typedef void (*idn_testsuite_testproc_t)(idn_testsuite_t ctx); + +/* + * Message handler type. + */ +typedef void (*idn_testsuite_msgproc_t)(const char *msg); + +/* + * Create a testsuite manager context. + * + * Create an empty context and store it in '*ctxp'. + * Return 1 on success. Return 0 if memory is exhausted. + */ +extern int +idn_testsuite_create(idn_testsuite_t *ctxp); + +/* + * Destory the testsuite manager context. + * + * Destroy the context created by idn_testsuite_create(), and release + * memory allocated to the context. + */ +extern void +idn_testsuite_destroy(idn_testsuite_t ctx); + +/* + * Add a test case to the `group' test group. + * Return 1 on success. Return 0 if memory is exhausted. + */ +extern int +idn_testsuite_addtestcase(idn_testsuite_t ctx, const char *title, + idn_testsuite_testproc_t proc); + +/* + * Return the number of test cases registered in the context. + */ +extern int +idn_testsuite_ntestcases(idn_testsuite_t ctx); + +/* + * Run test cases registered in the context. + */ +extern void +idn_testsuite_runall(idn_testsuite_t ctx); +extern void +idn_testsuite_run(idn_testsuite_t ctx, char *titles[]); + +/* + * Return the string description of `status'. + */ +extern const char * +idn_teststatus_tostring(idn_teststatus_t status); + +/* + * Return the number of passed/failed/skipped test cases. + */ +extern int +idn_testsuite_npassed(idn_testsuite_t ctx); +extern int +idn_testsuite_nfailed(idn_testsuite_t ctx); +extern int +idn_testsuite_nskipped(idn_testsuite_t ctx); + +/* + * Set/Get status of the test case running currently. + * + * These functions must be called by test case function. + */ +extern idn_teststatus_t +idn_testsuite_getstatus(idn_testsuite_t ctx); +extern void +idn_testsuite_setstatus(idn_testsuite_t ctx, idn_teststatus_t status); + +/* + * Enable/Disable verbose mode. + */ +extern void +idn_testsuite_setverbose(idn_testsuite_t ctx); +extern void +idn_testsuite_unsetverbose(idn_testsuite_t ctx); + +/* + * Generic assertion with message + */ +extern void +idn_testsuite_assert(idn_testsuite_t ctx, const char *msg, + const char *file, int lineno); + +#define ASSERT_THRU(msg) \ + idn_testsuite_assert(ctx__, msg, __FILE__, __LINE__) +#define ASSERT(msg) \ + do { \ + ASSERT_THRU(msg); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two `int' values. + * The assertion passes if `gotten' is equal to `expected'. + */ +extern void +idn_testsuite_assertint(idn_testsuite_t ctx, int gotten, int expected, + const char *file, int lineno); + +#define ASSERT_INT(gotten, expected) \ + do { \ + idn_testsuite_assertint(ctx__, gotten, expected, __FILE__, __LINE__); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two strings. + * The assertion passes if `gotten' is lexically equal to `expected'. + */ +extern void +idn_testsuite_assertstring(idn_testsuite_t ctx, const char *gotten, + const char *expected, const char *file, int lineno); + +#define ASSERT_STRING(gotten, expected) \ + do { \ + idn_testsuite_assertstring(ctx__, gotten, expected, __FILE__, __LINE__); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two pointers. + * The assertion passes if `gotten' is equal to `expected'. + */ +extern void +idn_testsuite_assertptr(idn_testsuite_t ctx, const void *gotten, + const void *expected, const char *file, int lineno); + +#define ASSERT_PTR(gotten, expected) \ + do { \ + idn_testsuite_assertptr(ctx__, gotten, expected, __FILE__, __LINE__); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two pointers. + * The assertion passes if `gotten' is NOT equal to `expected'. + */ +extern void +idn_testsuite_assertptrne(idn_testsuite_t ctx, + const void *gotten, const void *unexpected, + const char *file, int lineno); + +#define ASSERT_PTR_NE(gotten, unexpected) \ + do { \ + idn_testsuite_assertptrne(ctx__, gotten, unexpected, __FILE__, __LINE__); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two `idn_result_t' values. + * The assertion passes if `gotten' is equal to `expected'. + */ +extern void +idn_testsuite_assertresult(idn_testsuite_t ctx, + idn_result_t gotten, idn_result_t expected, + const char *file, int lineno); + +#define ASSERT_RESULT(gotten, expected) \ + do { \ + idn_testsuite_assertresult(ctx__, gotten, expected, __FILE__, __LINE__); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Assertion function and macro to compare two UCS4 strings. + * The assertion passes if `gotten' is lexically equal to `expected'. + */ +extern void +idn_testsuite_assertucs4string(idn_testsuite_t ctx, + const unsigned long *gotten, + const unsigned long *expected, + const char *file, + int lineno); + +#define ASSERT_UCS4STRING_THRU(gotten, expected) \ + idn_testsuite_assertucs4string(ctx__, gotten, expected, __FILE__, __LINE__) +#define ASSERT_UCS4STRING(gotten, expected) \ + do { \ + ASSERT_UCS4STRING_THRU(gotten, expected); \ + if (idn_testsuite_getstatus(ctx__) != idn_teststatus_pass) \ + goto EXIT__; \ + } while (0) + +/* + * Shorthands. + */ +#define SKIP_TESTCASE \ + do { \ + idn_testsuite_setstatus(ctx__, idn_teststatus_skip); \ + goto EXIT__; \ + } while (0) + +#ifdef __cplusplus +} +#endif + +#endif /* IDN_TESTSUITE_H */ diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/testutil.c b/contrib/idn/idnkit-1.0-src/lib/tests/testutil.c new file mode 100644 index 0000000000..9fd178928b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/testutil.c @@ -0,0 +1,83 @@ +#ifndef lint +static char *rcsid = "$Id: testutil.c,v 1.1 2003/06/04 00:27:03 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include "testutil.h" + +int +create_conf_file(const char *filename, unsigned int flags, ...) { + FILE *file; + va_list ap; + const char *arg; + int arg_index; + + file = fopen(filename, "w"); + if (file == NULL) { + fprintf(stderr, "failed to create config file `%s'\n", + filename); + return 0; + } + + arg_index = 0; + va_start(ap, flags); + for (;;) { + arg = va_arg(ap, const char *); + if (arg == NULL) + break; + if (arg_index++ > 0) + fputc('\n', file); + fputs(arg, file); + } + if (!(flags & CONF_NO_EOF_NEWLINE) && arg_index > 0) + fputc('\n', file); + + fclose(file); + return 1; +} diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/testutil.h b/contrib/idn/idnkit-1.0-src/lib/tests/testutil.h new file mode 100644 index 0000000000..8c2af7a88e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/testutil.h @@ -0,0 +1,71 @@ +/* $Id: testutil.h,v 1.1 2003/06/04 00:27:03 marka Exp $ */ +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_TESTUTIL_H +#define IDN_TESTUTIL_H 1 + +/* + * Option flags for create_conf_file(). + * + * CONF_NO_EOF_NEWLINE -- Don't put newline character + * at the end of file. + */ +#define CONF_NO_EOF_NEWLINE 0x0001 + +/* + * Create a configuration file. + * + * Write strings specified as variable length arguments (`...') to + * `filename'. Note that the arguments must be terminated with `NULL'. + * + * In the created config file, each string in the variable length + * arguments becomes a line. In other words, newline characters are + * added automatically. + * + * This function returns 1 upon success, 0 otherwise. + */ +int +create_conf_file(const char *filename, unsigned int flags, ...); + +#endif /* IDN_TESTUTIL_H */ diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/testygen b/contrib/idn/idnkit-1.0-src/lib/tests/testygen new file mode 100755 index 0000000000..5d2f9ca585 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/testygen @@ -0,0 +1,557 @@ +#! /usr/bin/perl -w +# +# Copyright (c) 2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# +use FileHandle; +use Getopt::Std; + +# +# Parsing status. +# +my $STATUS_HEADER = 0; +my $STATUS_HEADER_COMMENT = 1; +my $STATUS_SEPARATOR = 2; +my $STATUS_BODY = 3; +my $STATUS_GLOBAL = 4; +my $STATUS_GLOBAL_COMMENT = 5; +my $STATUS_PREAMBLE = 6; + +my $LINENO_MARK = ""; + +# +# Create a new testsuite context. +# +sub new_testsuite { + return {'ntests' => 0, + 'setups' => {}, + 'teardowns' => {}, + 'tests' => [], + 'titles' => [], + 'preambles' => ''}; +} + +# +# Read `$file' and put the result into `$testsutie'. +# +sub parse_file { + my ($testsuite, $file, $lineinfo) = @_; + my $parser = {'type' => '', + 'group' => '', + 'title' => '', + 'status' => $STATUS_PREAMBLE, + 'error' => '', + 'file' => $file, + 'lineno' => 0, + 'lineinfo' => $lineinfo}; + + my $handle = FileHandle->new($file, 'r'); + if (!defined($handle)) { + die "failed to open the file, $!: $file\n"; + } + + my ($result, $line); + for (;;) { + $line = $handle->getline(); + last if (!defined($line)); + + chomp($line); + $line .= "\n"; + $parser->{lineno}++; + $result = parse_line($testsuite, $parser, $line); + if (!$result) { + die sprintf("%s, at line %d\n", + $parser->{error}, $parser->{lineno}); + } + } + + if ($parser->{status} != $STATUS_GLOBAL) { + die "unexpected EOF, at line $.\n"; + } + + $handle->close(); +} + +sub parse_line { + my ($testsuite, $parser, $line) = @_; + my $result = 1; + + if ($parser->{status} == $STATUS_HEADER) { + if ($line =~ /^\/\/--/) { + $parser->{status} = $STATUS_HEADER_COMMENT; + } elsif ($line =~ /^\/\//) { + $result = parse_header($testsuite, $parser, $line); + } elsif ($line =~ /^\s*$/) { + $parser->{status} = $STATUS_SEPARATOR; + $result = parse_endheader($testsuite, $parser, $line); + } elsif ($line =~ /^\{\s*$/) { + $parser->{status} = $STATUS_BODY; + $result = parse_endheader($testsuite, $parser, $line) + && parse_startbody($testsuite, $parser, $line); + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + } elsif ($parser->{status} == $STATUS_HEADER_COMMENT) { + if ($line =~ /^\/\//) { + # nothing to be done. + } elsif ($line =~ /^\s*$/) { + $parser->{status} = $STATUS_SEPARATOR; + $result = parse_endheader($testsuite, $parser, $line); + } elsif ($line =~ /^\{\s*$/) { + $parser->{status} = $STATUS_BODY; + $result = parse_endheader($testsuite, $parser, $line) + && parse_startbody($testsuite, $parser, $line); + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + } elsif ($parser->{status} == $STATUS_SEPARATOR) { + if ($line =~ /^\s*$/) { + # nothing to be done. + } elsif ($line =~ /^\{\s*$/) { + $parser->{status} = $STATUS_BODY; + $result = parse_startbody($testsuite, $parser, $line); + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + } elsif ($parser->{status} == $STATUS_BODY) { + if ($line =~ /^\}\s*$/) { + $parser->{status} = $STATUS_GLOBAL; + $result = parse_endbody($testsuite, $parser, $line); + } else { + $result = parse_body($testsuite, $parser, $line); + } + + } elsif ($parser->{status} == $STATUS_GLOBAL) { + if ($line =~ /^\/\/\#/) { + $parser->{status} = $STATUS_HEADER; + $result = parse_startheader($testsuite, $parser, $line); + } elsif ($line =~ /^\/\/--/) { + $parser->{status} = $STATUS_GLOBAL_COMMENT; + } elsif ($line =~ /^\s*$/) { + # nothing to be done. + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + } elsif ($parser->{status} == $STATUS_GLOBAL_COMMENT) { + if ($line =~ /^\/\//) { + # nothing to be done. + } elsif ($line =~ /^\s*$/) { + $parser->{status} = $STATUS_GLOBAL; + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + } elsif ($parser->{status} == $STATUS_PREAMBLE) { + if ($line =~ /^\/\/\#/) { + $parser->{status} = $STATUS_HEADER; + $result = parse_startheader($testsuite, $parser, $line); + } elsif ($line =~ /^\/\/--/) { + $parser->{status} = $STATUS_GLOBAL_COMMENT; + } else { + $result = parse_preamble($testsuite, $parser, $line); + } + + } else { + $parser->{error} = 'syntax error'; + $result = 0; + } + + return $result; +} + +sub parse_startheader { + my ($testsuite, $parser, $line) = @_; + + if ($line =~ /^\/\/\#\s*(SETUP|TEARDOWN|TESTCASE)\s*$/) { + $parser->{type} = $1; + $parser->{group} = ''; + $parser->{title} = ''; + } else { + $parser->{error} = 'invalid test-header format'; + return 0; + } + + + return 1; +} + +sub parse_header { + my ($testsuite, $parser, $line) = @_; + + my $field = $line; + $field =~ s/^\/\/\s*//; + $field =~ s/^(\S+):\s*/$1:/; + $field =~ s/\s+$//; + + return 1 if ($field eq ''); + + if ($field =~ /^group:(.*)$/) { + my $group = $1; + + if ($parser->{group} ne '') { + $parser->{error} = "group defined twice in a header"; + return 0; + } + if ($parser->{type} eq 'SETUP') { + if ($group !~ /^[0-9A-Za-z_\-]+$/) { + $parser->{error} = "invalid group name"; + return 0; + } + if (defined($testsuite->{setups}->{$group})) { + $parser->{error} = sprintf("SETUP \`%s' redefined", $group); + return 0; + } + } elsif ($parser->{type} eq 'TEARDOWN') { + if ($group !~ /^[0-9A-Za-z_\-]+$/) { + $parser->{error} = "invalid group name"; + return 0; + } + if (defined($testsuite->{teardowns}->{$group})) { + $parser->{error} = sprintf("TEARDOWN \`%s' redefined", $group); + return 0; + } + } else { + foreach my $i (split(/[ \t]+/, $group)) { + if ($i !~ /^[0-9A-Za-z_\-]+$/) { + $parser->{error} = "invalid group name \`$i'"; + return 0; + } + if (!defined($testsuite->{setups}->{$i}) + && !defined($testsuite->{teardowns}->{$i})) { + $parser->{error} = sprintf("group \'%s' not defined", $i); + return 0; + } + } + } + $parser->{group} = $group; + + } elsif ($field =~ /^title:(.*)$/) { + my $title = $1; + + if ($parser->{title} ne '') { + $parser->{error} = "title defined twice in a header"; + return 0; + } + if ($title =~ /[\x00-\x1f\x7f-\xff\"\\]/ || $title eq '') { + $parser->{error} = "invalid title"; + return 0; + } + if ($parser->{type} ne 'TESTCASE') { + $parser->{error} = sprintf("title for %s is not permitted", + $parser->{type}); + return 0; + } + $parser->{title} = $title; + + } else { + $parser->{error} = "invalid test-header field"; + return 0; + } + + return 1; +} + +sub parse_endheader { + my ($testsuite, $parser, $line) = @_; + + if ($parser->{type} ne 'TESTCASE' && $parser->{group} eq '') { + $parser->{error} = "missing \`group' in the header"; + return 0; + } + + if ($parser->{type} eq 'TESTCASE' && $parser->{title} eq '') { + $parser->{error} = "missing \`title' in the header"; + return 0; + } + + return 1; +} + +sub parse_startbody { + my ($testsuite, $parser, $line) = @_; + my $group = $parser->{group}; + + if ($parser->{type} eq 'SETUP') { + if ($parser->{lineinfo}) { + $testsuite->{setups}->{$group} = + generate_line_info($parser->{lineno} + 1, $parser->{file}); + } + } elsif ($parser->{type} eq 'TEARDOWN') { + if ($parser->{lineinfo}) { + $testsuite->{teardowns}->{$group} = + generate_line_info($parser->{lineno} + 1, $parser->{file}); + } + } else { + $testsuite->{ntests}++; + push(@{$testsuite->{tests}}, ''); + push(@{$testsuite->{titles}}, $parser->{title}); + + $testsuite->{tests}->[-1] .= "\n"; + $testsuite->{tests}->[-1] .= "$LINENO_MARK\n"; + $testsuite->{tests}->[-1] .= + sprintf("static void\ntestcase\%d(idn_testsuite_t ctx__) {\n", + $testsuite->{ntests}); + + my (@group_names) = split(/[ \t]+/, $group); + for (my $i = 0; $i < @group_names; $i++) { + if (defined($testsuite->{setups}->{$group_names[$i]})) { + $testsuite->{tests}->[-1] .= "\t\{\n"; + $testsuite->{tests}->[-1] .= "#undef EXIT__\n"; + $testsuite->{tests}->[-1] .= "#define EXIT__ exit${i}__\n"; + $testsuite->{tests}->[-1] .= + $testsuite->{setups}->{$group_names[$i]}; + } + } + $testsuite->{tests}->[-1] .= "$LINENO_MARK\n"; + $testsuite->{tests}->[-1] .= "\t\{\n"; + $testsuite->{tests}->[-1] .= "#undef EXIT__\n"; + $testsuite->{tests}->[-1] .= "#define EXIT__ exit__\n"; + if ($parser->{lineinfo}) { + $testsuite->{tests}->[-1] .= + generate_line_info($parser->{lineno} + 1, $parser->{file}); + } + } + + return 1; +} + +sub parse_body { + my ($testsuite, $parser, $line) = @_; + my ($group) = $parser->{group}; + + if ($parser->{type} eq 'SETUP') { + $testsuite->{setups}->{$group} .= $line; + } elsif ($parser->{type} eq 'TEARDOWN') { + $testsuite->{teardowns}->{$group} .= $line; + } else { + $testsuite->{tests}->[-1] .= $line; + } + + return 1; +} + +sub parse_endbody { + my ($testsuite, $parser, $line) = @_; + my ($group) = $parser->{group}; + + if ($parser->{type} eq 'TESTCASE') { + $testsuite->{tests}->[-1] .= "$LINENO_MARK\n"; + $testsuite->{tests}->[-1] .= "\t\}\n"; + $testsuite->{tests}->[-1] .= " exit__:\n"; + $testsuite->{tests}->[-1] .= "\t;\n"; + + my (@group_names) = split(/[ \t]+/, $group); + for (my $i = @group_names - 1; $i >= 0; $i--) { + $testsuite->{tests}->[-1] .= " exit${i}__:\n"; + $testsuite->{tests}->[-1] .= "\t;\n"; + if (defined($testsuite->{teardowns}->{$group_names[$i]})) { + $testsuite->{tests}->[-1] .= + $testsuite->{teardowns}->{$group_names[$i]}; + } + $testsuite->{tests}->[-1] .= "$LINENO_MARK\n"; + $testsuite->{tests}->[-1] .= "\t\}\n"; + } + + $testsuite->{tests}->[-1] .= "}\n"; + } + + return 1; +} + +sub parse_preamble { + my ($testsuite, $parser, $line) = @_; + + if ($parser->{lineinfo} && $parser->{lineno} == 1) { + $testsuite->{preambles} .= generate_line_info(1, $parser->{file}); + } + $testsuite->{preambles} .= $line; + return 1; +} + +sub generate_line_info { + my ($lineno, $file) = @_; + return "#line $lineno \"$file\"\n"; +} + +# +# Output `$testsuite' as source codes of C. +# +sub output_tests { + my ($testsuite, $file, $lineinfo) = @_; + + my $generator = { + 'file' => $file, + 'lineno' => 0 + }; + + my $handle = FileHandle->new($file, 'w'); + if (!defined($handle)) { + die "failed to open the file, $!: $file\n"; + } + + my $preamble_header = + "/* This file is automatically generated by testygen. */\n\n" + . "#define TESTYGEN 1\n" + . "\n"; + output_lines($preamble_header, $generator, $handle, $lineinfo); + + output_lines($testsuite->{preambles}, $generator, $handle, $lineinfo); + + my $preamble_footer = + "\n" + . "$LINENO_MARK\n" + . "#include \"testsuite.h\"\n" + . "\n"; + output_lines($preamble_footer, $generator, $handle, $lineinfo); + + + for (my $i = 0; $i < $testsuite->{ntests}; $i++) { + output_lines($testsuite->{tests}->[$i], $generator, $handle, + $lineinfo); + } + + my $main_header = + "\n" + . "$LINENO_MARK\n" + . "int\n" + . "main(int argc, char *argv[]) {\n" + . "\tidn_testsuite_t ctx;\n" + . "\tconst char *title;\n" + . "\n" + . "\tidn_testsuite_create(&ctx);\n"; + output_lines($main_header, $generator, $handle, $lineinfo); + + for (my $i = 0; $i < $testsuite->{ntests}; $i++) { + my $title = $testsuite->{titles}->[$i]; + my $proc = sprintf("testcase%d", $i + 1); + output_lines("\tidn_testsuite_addtestcase(ctx, \"$title\", $proc);\n", + $generator, $handle, $lineinfo); + } + + my $main_footer = + "\n" + . "\tif (argc > 1 && strcmp(argv[1], \"-v\") == 0) {\n" + . "\t idn_testsuite_setverbose(ctx);\n" + . "\t argc--;\n" + . "\t argv++;\n" + . "\t}\n" + . "\tif (argc == 1)\n" + . "\t idn_testsuite_runall(ctx);\n" + . "\telse\n" + . "\t idn_testsuite_run(ctx, argv + 1);\n" + . "\n" + . "\tprintf(\"passed=%d, failed=%d, total=%d\\n\",\n" + . "\t idn_testsuite_npassed(ctx),\n" + . "\t idn_testsuite_nfailed(ctx),\n" + . "\t idn_testsuite_ntestcases(ctx) - idn_testsuite_nskipped(ctx));\n" + . "\n" + . "\tidn_testsuite_destroy(ctx);\n" + . "\treturn (0);\n" + . "\}\n"; + output_lines($main_footer, $generator, $handle, $lineinfo); + + $handle->close(); +} + +sub output_lines { + my ($lines, $generator, $handle, $lineinfo) = @_; + my ($line); + + chomp($lines); + $lines .= "\n"; + + while ($lines ne '') { + $lines =~ s/^([^\n]*)\n//; + $line = $1; + $generator->{lineno}++; + if ($line eq $LINENO_MARK) { + if ($lineinfo) { + $handle->printf("#line %d \"%s\"\n", $generator->{lineno} + 1, + $generator->{file}); + } + } else { + $handle->print("$line\n"); + } + } +} + +sub output_usage { + warn "$0: [-o output-file] input-file\n"; +} + +# +# main. +# +my (%options); + +if (!getopts('Lo:', \%options)) { + output_usage; + exit(1); +} +if (@ARGV != 1) { + output_usage; + exit(1); +} + +my ($in_file) = $ARGV[0]; +my ($out_file); +if (!defined($options{o})) { + $out_file = $in_file; + $out_file .= '\.tsy' if ($out_file !~ /\.tsy$/); + $out_file =~ s/\.tsy$/\.c/; +} else { + $out_file = $options{o}; +} + +my $testsuite = new_testsuite(); +parse_file($testsuite, $in_file, !$options{L}); +output_tests($testsuite, $out_file, !$options{L}); + +exit(0); diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/ucs4.tsy b/contrib/idn/idnkit-1.0-src/lib/tests/ucs4.tsy new file mode 100644 index 0000000000..ba33db3c58 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/ucs4.tsy @@ -0,0 +1,257 @@ +#ifndef lint +static char *rcsid = "$Id: ucs4.tsy,v 1.1 2003/06/04 00:27:04 marka Exp $"; +#endif + +/* + * Copyright (c) 2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "testutil.h" + +/* + * Sample UTF8 and UCS4 strings. + */ +static const char *utf8_string = + "\x7f" /* 0x0000007f */ + "\xdf\xbf" /* 0x000007ff */ + "\xef\xbf\xbf" /* 0x0000ffff */ + "\xf7\xbf\xbf\xbf" /* 0x001fffff */ + "\xfb\xbf\xbf\xbf\xbf" /* 0x03ffffff */ + "\xfd\xbf\xbf\xbf\xbf\xbf"; /* 0x7fffffff */ + +static const unsigned long ucs4_string[] = { + 0x0000007f, + 0x000007ff, + 0x0000ffff, + 0x001fffff, + 0x03ffffff, + 0x7fffffff, + 0x00000000 +}; + +//-------------------------------------------------------------------- +// Setups and Teardowns. +//-------------------------------------------------------------------- + +//# SETUP +// group: utf8-init +{ + unsigned long to[256]; + size_t tolen = 256; + idn_result_t r; +} + +//# SETUP +// group: ucs4-init +{ + char to[256]; + size_t tolen = 256; + idn_result_t r; +} + +//# SETUP +// group: quiet +{ + int saved_log_level; + + saved_log_level = idn_log_getlevel(); + idn_log_setlevel(idn_log_level_fatal); +} + +//# TEARDOWN +// group: quiet +{ + idn_log_setlevel(saved_log_level); +} + +//-------------------------------------------------------------------- +// Testcases. +//-------------------------------------------------------------------- + +//# TESTCASE +// title: call utf8toucs4() +// group: utf8-init +{ + r = idn_ucs4_utf8toucs4(utf8_string, to, tolen); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, ucs4_string); +} + +//# TESTCASE +// title: call ucs4toutf8() +// group: ucs4-init +{ + r = idn_ucs4_ucs4toutf8(ucs4_string, to, tolen); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, utf8_string); +} + +//# TESTCASE +// title: call utf8toucs4() with empty from +// group: utf8-init +{ + static unsigned long empty_ucs4_string[] = {0}; + + r = idn_ucs4_utf8toucs4("", to, tolen); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, empty_ucs4_string); +} + +//# TESTCASE +// title: call ucs4toutf8() with empty from +// group: ucs4-init +{ + static unsigned long empty_ucs4_string[] = {0}; + + r = idn_ucs4_ucs4toutf8(empty_ucs4_string, to, tolen); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, ""); +} + +//# TESTCASE +// title: call utf8toucs4() with broken string +// group: utf8-init quiet +{ + /* "\xfe" as the 1st byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xfe\xbf\xbf\xbf\xbf\xbf\xbf", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\x7f" as the 2nd byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xdf\x7f", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\xc0" as the 2nd byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xdf\xc0", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\x7f" as the 3rd byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xef\xbf\x7f", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\xc0" as the 3rd byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xef\xbf\xc0", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\x7f" as the 4th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xf7\xbf\xbf\x7f", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\xc0" as the 4th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xf7\xbf\xbf\xc0", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\x7f" as the 5th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xfb\xbf\xbf\xbf\x7f", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\xc0" as the 5th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xfb\xbf\xbf\xbf\xc0", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\x7f" as the 6th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xfd\xbf\xbf\xbf\xbf\x7f", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* "\xc0" as the 6th byte is out of range. */ + r = idn_ucs4_utf8toucs4("\xfd\xbf\xbf\xbf\xbf\xc0", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* `from' contains surrogate pair */ + r = idn_ucs4_utf8toucs4("\xed\xa0\x80\xed\xbf\xbf", to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: call ucs4toutf8() with broken string +// group: ucs4-init quiet +{ + static unsigned long invalid_ucs4_string0[] = {0x80000000, 0}; + static unsigned long invalid_ucs4_string1[] = {0xd800, 0xdfff, 0}; + + /* 0x80000000 is out of range */ + r = idn_ucs4_ucs4toutf8(invalid_ucs4_string0, to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); + + /* `from' contains surrogate pair */ + r = idn_ucs4_ucs4toutf8(invalid_ucs4_string1, to, tolen); + ASSERT_RESULT(r, idn_invalid_encoding); +} + +//# TESTCASE +// title: buffer overrun test for utf8toucs4() +// group: utf8-init +{ + r = idn_ucs4_utf8toucs4(utf8_string, to, + idn_ucs4_strlen(ucs4_string) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_UCS4STRING(to, ucs4_string); + + r = idn_ucs4_utf8toucs4(utf8_string, to, + idn_ucs4_strlen(ucs4_string)); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_ucs4_utf8toucs4(utf8_string, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + +//# TESTCASE +// title: buffer overrun test for ucs4toutf8() +// group: ucs4-init +{ + r = idn_ucs4_ucs4toutf8(ucs4_string, to, strlen(utf8_string) + 1); + ASSERT_RESULT(r, idn_success); + ASSERT_STRING(to, utf8_string); + + r = idn_ucs4_ucs4toutf8(ucs4_string, to, strlen(utf8_string)); + ASSERT_RESULT(r, idn_buffer_overflow); + + r = idn_ucs4_ucs4toutf8(ucs4_string, to, 0); + ASSERT_RESULT(r, idn_buffer_overflow); +} + diff --git a/contrib/idn/idnkit-1.0-src/lib/tests/utffilter b/contrib/idn/idnkit-1.0-src/lib/tests/utffilter new file mode 100755 index 0000000000..cebd4dce2f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/tests/utffilter @@ -0,0 +1,82 @@ +#! /usr/bin/perl -wp +# +# Copyright (c) 2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# + +sub to_utf8 ($) { + my ($utf32) = hex($_[0]); + my ($mask, $length); + + if ($utf32 < 0x80) { + $mask = 0; + $length = 1; + } elsif ($utf32 < 0x800) { + $mask = 0xc0; + $length = 2; + } elsif ($utf32 < 0x10000) { + $mask = 0xe0; + $length = 3; + } elsif ($utf32 < 0x200000) { + $mask = 0xf0; + $length = 4; + } elsif ($utf32 < 0x4000000) { + $mask = 0xf8; + $length = 5; + } elsif ($utf32 < 0x80000000) { + $mask = 0xfc; + $length = 6; + } else { + return ''; + } + + my ($result, $offset); + $offset = 6 * ($length - 1); + $result .= sprintf('\\x%02x', ($utf32 >> $offset) | $mask); + while ($offset > 0) { + $offset -= 6; + $result .= sprintf('\\x%02x', (($utf32 >> $offset) & 0x3f) | 0x80); + } + + return $result; +} + +s//&to_utf8($1)/eg; diff --git a/contrib/idn/idnkit-1.0-src/lib/ucs4.c b/contrib/idn/idnkit-1.0-src/lib/ucs4.c new file mode 100644 index 0000000000..1d7aea14c3 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/ucs4.c @@ -0,0 +1,461 @@ +#ifndef lint +static char *rcsid = "$Id: ucs4.c,v 1.1 2003/06/04 00:26:14 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* + * Unicode surrogate pair. + */ +#define IS_SURROGATE_HIGH(v) (0xd800 <= (v) && (v) <= 0xdbff) +#define IS_SURROGATE_LOW(v) (0xdc00 <= (v) && (v) <= 0xdfff) +#define SURROGATE_HIGH(v) (SURROGATE_H_OFF + (((v) - 0x10000) >> 10)) +#define SURROGATE_LOW(v) (SURROGATE_L_OFF + ((v) & 0x3ff)) +#define SURROGATE_BASE 0x10000 +#define SURROGATE_H_OFF 0xd800 +#define SURROGATE_L_OFF 0xdc00 +#define COMBINE_SURROGATE(h, l) \ + (SURROGATE_BASE + (((h)-SURROGATE_H_OFF)<<10) + ((l)-SURROGATE_L_OFF)) + +/* + * ASCII ctype macros. + * Note that these macros evaluate the argument multiple times. Be careful. + */ +#define ASCII_TOUPPER(c) \ + (('a' <= (c) && (c) <= 'z') ? ((c) - 'a' + 'A') : (c)) +#define ASCII_TOLOWER(c) \ + (('A' <= (c) && (c) <= 'Z') ? ((c) - 'A' + 'a') : (c)) + +idn_result_t +idn_ucs4_ucs4toutf16(const unsigned long *ucs4, unsigned short *utf16, + size_t tolen) { + unsigned short *utf16p = utf16; + unsigned long v; + idn_result_t r; + + TRACE(("idn_ucs4_ucs4toutf16(ucs4=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(ucs4, 50), (int)tolen)); + + while (*ucs4 != '\0') { + v = *ucs4++; + + if (IS_SURROGATE_LOW(v) || IS_SURROGATE_HIGH(v)) { + WARNING(("idn_ucs4_ucs4toutf16: UCS4 string contains " + "surrogate pair\n")); + r = idn_invalid_encoding; + goto ret; + } else if (v > 0xffff) { + /* Convert to surrogate pair */ + if (v >= 0x110000) { + r = idn_invalid_encoding; + goto ret; + } + if (tolen < 2) { + r = idn_buffer_overflow; + goto ret; + } + *utf16p++ = SURROGATE_HIGH(v); + *utf16p++ = SURROGATE_LOW(v); + tolen -= 2; + } else { + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *utf16p++ = v; + tolen--; + } + } + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *utf16p = '\0'; + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_ucs4_ucs4toutf16(): success (utf16=\"%s\")\n", + idn__debug_utf16xstring(utf16, 50))); + } else { + TRACE(("idn_ucs4_ucs4toutf16(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_ucs4_utf16toucs4(const unsigned short *utf16, unsigned long *ucs4, + size_t tolen) { + unsigned long *ucs4p = ucs4; + unsigned short v0, v1; + idn_result_t r; + + TRACE(("idn_ucs4_utf16toucs4(utf16=\"%s\", tolen=%d)\n", + idn__debug_utf16xstring(utf16, 50), (int)tolen)); + + while (*utf16 != '\0') { + v0 = *utf16; + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + + if (IS_SURROGATE_HIGH(v0)) { + v1 = *(utf16 + 1); + if (!IS_SURROGATE_LOW(v1)) { + WARNING(("idn_ucs4_utf16toucs4: " + "corrupted surrogate pair\n")); + r = idn_invalid_encoding; + goto ret; + } + *ucs4p++ = COMBINE_SURROGATE(v0, v1); + tolen--; + utf16 += 2; + + } else { + *ucs4p++ = v0; + tolen--; + utf16++; + + } + } + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *ucs4p = '\0'; + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_ucs4_utf16toucs4(): success (ucs4=\"%s\")\n", + idn__debug_ucs4xstring(ucs4, 50))); + } else { + TRACE(("idn_ucs4_utf16toucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_ucs4_utf8toucs4(const char *utf8, unsigned long *ucs4, size_t tolen) { + const unsigned char *utf8p = (const unsigned char *)utf8; + unsigned long *ucs4p = ucs4; + unsigned long v, min; + unsigned char c; + int width; + int i; + idn_result_t r; + + TRACE(("idn_ucs4_utf8toucs4(utf8=\"%s\", tolen=%d)\n", + idn__debug_xstring(utf8, 50), (int)tolen)); + + while(*utf8p != '\0') { + c = *utf8p++; + if (c < 0x80) { + v = c; + min = 0; + width = 1; + } else if (c < 0xc0) { + WARNING(("idn_ucs4_utf8toucs4: invalid character\n")); + r = idn_invalid_encoding; + goto ret; + } else if (c < 0xe0) { + v = c & 0x1f; + min = 0x80; + width = 2; + } else if (c < 0xf0) { + v = c & 0x0f; + min = 0x800; + width = 3; + } else if (c < 0xf8) { + v = c & 0x07; + min = 0x10000; + width = 4; + } else if (c < 0xfc) { + v = c & 0x03; + min = 0x200000; + width = 5; + } else if (c < 0xfe) { + v = c & 0x01; + min = 0x4000000; + width = 6; + } else { + WARNING(("idn_ucs4_utf8toucs4: invalid character\n")); + r = idn_invalid_encoding; + goto ret; + } + + for (i = width - 1; i > 0; i--) { + c = *utf8p++; + if (c < 0x80 || 0xc0 <= c) { + WARNING(("idn_ucs4_utf8toucs4: " + "invalid character\n")); + r = idn_invalid_encoding; + goto ret; + } + v = (v << 6) | (c & 0x3f); + } + + if (v < min) { + WARNING(("idn_ucs4_utf8toucs4: invalid character\n")); + r = idn_invalid_encoding; + goto ret; + } + if (IS_SURROGATE_LOW(v) || IS_SURROGATE_HIGH(v)) { + WARNING(("idn_ucs4_utf8toucs4: UTF-8 string contains " + "surrogate pair\n")); + r = idn_invalid_encoding; + goto ret; + } + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + tolen--; + *ucs4p++ = v; + } + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *ucs4p = '\0'; + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_ucs4_utf8toucs4(): success (ucs4=\"%s\")\n", + idn__debug_ucs4xstring(ucs4, 50))); + } else { + TRACE(("idn_ucs4_utf8toucs4(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +idn_result_t +idn_ucs4_ucs4toutf8(const unsigned long *ucs4, char *utf8, size_t tolen) { + unsigned char *utf8p = (unsigned char *)utf8; + unsigned long v; + int width; + int mask; + int offset; + idn_result_t r; + + TRACE(("idn_ucs4_ucs4toutf8(ucs4=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(ucs4, 50), (int)tolen)); + + while (*ucs4 != '\0') { + v = *ucs4++; + if (IS_SURROGATE_LOW(v) || IS_SURROGATE_HIGH(v)) { + WARNING(("idn_ucs4_ucs4toutf8: UCS4 string contains " + "surrogate pair\n")); + r = idn_invalid_encoding; + goto ret; + } + if (v < 0x80) { + mask = 0; + width = 1; + } else if (v < 0x800) { + mask = 0xc0; + width = 2; + } else if (v < 0x10000) { + mask = 0xe0; + width = 3; + } else if (v < 0x200000) { + mask = 0xf0; + width = 4; + } else if (v < 0x4000000) { + mask = 0xf8; + width = 5; + } else if (v < 0x80000000) { + mask = 0xfc; + width = 6; + } else { + WARNING(("idn_ucs4_ucs4toutf8: invalid character\n")); + r = idn_invalid_encoding; + goto ret; + } + + if (tolen < width) { + r = idn_buffer_overflow; + goto ret; + } + offset = 6 * (width - 1); + *utf8p++ = (v >> offset) | mask; + mask = 0x80; + while (offset > 0) { + offset -= 6; + *utf8p++ = ((v >> offset) & 0x3f) | mask; + } + tolen -= width; + } + + if (tolen < 1) { + r = idn_buffer_overflow; + goto ret; + } + *utf8p = '\0'; + + r = idn_success; +ret: + if (r == idn_success) { + TRACE(("idn_ucs4_ucs4toutf8(): success (utf8=\"%s\")\n", + idn__debug_xstring(utf8, 50))); + } else { + TRACE(("idn_ucs4_ucs4toutf8(): %s\n", + idn_result_tostring(r))); + } + return (r); +} + +size_t +idn_ucs4_strlen(const unsigned long *ucs4) { + size_t len; + + for (len = 0; *ucs4 != '\0'; ucs4++, len++) + /* nothing to do */ ; + + return (len); +} + +unsigned long * +idn_ucs4_strcpy(unsigned long *to, const unsigned long *from) { + unsigned long *result = to; + + while (*from != '\0') + *to++ = *from++; + *to = '\0'; + + return (result); +} + +unsigned long * +idn_ucs4_strcat(unsigned long *to, const unsigned long *from) { + unsigned long *result = to; + + while (*to != '\0') + to++; + + while (*from != '\0') + *to++ = *from++; + *to = '\0'; + + return (result); +} + +int +idn_ucs4_strcmp(const unsigned long *str1, const unsigned long *str2) { + while (*str1 != '\0') { + if (*str1 > *str2) + return (1); + else if (*str1 < *str2) + return (-1); + str1++; + str2++; + } + + if (*str1 > *str2) + return (1); + else if (*str1 < *str2) + return (-1); + + return (0); +} + +int +idn_ucs4_strcasecmp(const unsigned long *str1, const unsigned long *str2) { + unsigned long c1, c2; + + while (*str1 != '\0') { + c1 = ASCII_TOLOWER(*str1); + c2 = ASCII_TOLOWER(*str2); + if (c1 > c2) + return (1); + else if (c1 < c2) + return (-1); + str1++; + str2++; + } + + c1 = ASCII_TOLOWER(*str1); + c2 = ASCII_TOLOWER(*str2); + if (c1 > c2) + return (1); + else if (c1 < c2) + return (-1); + + return (0); +} + + +unsigned long * +idn_ucs4_strdup(const unsigned long *str) { + size_t length = idn_ucs4_strlen(str); + unsigned long *dupstr; + + dupstr = (unsigned long *)malloc(sizeof(*str) * (length + 1)); + if (dupstr == NULL) + return NULL; + memcpy(dupstr, str, sizeof(*str) * (length + 1)); + + return dupstr; +} diff --git a/contrib/idn/idnkit-1.0-src/lib/ucsmap.c b/contrib/idn/idnkit-1.0-src/lib/ucsmap.c new file mode 100644 index 0000000000..81e58a9c59 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/ucsmap.c @@ -0,0 +1,380 @@ +#ifndef lint +static char *rcsid = "$Id: ucsmap.c,v 1.1 2003/06/04 00:26:14 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#define INIT_SIZE 50 +#define DEFAULT_BUF_SIZE 500 +#define UCSMAP_HASH_SIZE 103 +#define MAX_MAPLEN 0xffff + +/* + * This module implements UCS 1-to-N mapping. + * To speed up mapping table lookup, a combination of hash and + * binary search is used. + */ + +/* + * Mapping entry. + * Entries are sorted by its hash index and code point. + */ +typedef struct { + short hidx; /* hash index */ + unsigned short len; /* length of mapped sequence */ + unsigned long ucs; /* code point to be mapped */ + unsigned long *map; /* mapped sequence of code points */ +} ucsmap_entry_t; + +/* + * Hash table entry. + * Since the entries pointed by ucsmap_hash_t.entry are sorted, + * binary search can be used. + */ +typedef struct { + ucsmap_entry_t *entry; /* sorted by code point */ + int n; /* length of 'entry' */ +} ucsmap_hash_t; + +/* + * UCS character buffer for storing target character sequence. + */ +typedef struct ucsmap_buf { + struct ucsmap_buf *next; + unsigned long buf[1]; /* actually a variable length array */ +} ucsmap_buf_t; + +/* + * Mapping object. + */ +typedef struct idn_ucsmap { + ucsmap_hash_t hash[UCSMAP_HASH_SIZE]; + ucsmap_entry_t *entries; /* array of entries */ + size_t entry_size; /* allocated size */ + size_t nentries; /* # of entries in use */ + ucsmap_buf_t *mapdata; /* list of character buffers */ + size_t mapdata_size; /* allocated size of current buffer */ + size_t mapdata_used; /* # of chars in use */ + int fixed; /* already fixed? */ + int refcnt; /* reference count */ +} ucsmap_t; + +static int ucsmap_hash(unsigned long v); +static unsigned long *save_mapped_sequence(idn_ucsmap_t ctx, + unsigned long *map, + size_t maplen); +static void free_mapbuf(ucsmap_buf_t *buf); +static int comp_entry(const void *v1, const void *v2); + +idn_result_t +idn_ucsmap_create(idn_ucsmap_t *ctxp) { + idn_ucsmap_t ctx; + + assert(ctxp != NULL); + + TRACE(("idn_ucsmap_create()\n")); + + if ((ctx = malloc(sizeof(*ctx))) == NULL) { + WARNING(("idn_ucsmap_create: malloc failed\n")); + return (idn_nomemory); + } + + ctx->entry_size = 0; + ctx->nentries = 0; + ctx->entries = NULL; + ctx->mapdata = NULL; + ctx->mapdata_size = 0; + ctx->mapdata_used = 0; + ctx->fixed = 0; + ctx->refcnt = 1; + *ctxp = ctx; + return (idn_success); +} + +void +idn_ucsmap_destroy(idn_ucsmap_t ctx) { + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsmap_destroy()\n")); + + if (--ctx->refcnt == 0) { + if (ctx->entries != NULL) + free(ctx->entries); + if (ctx->mapdata != NULL) + free_mapbuf(ctx->mapdata); + free(ctx); + } +} + +void +idn_ucsmap_incrref(idn_ucsmap_t ctx) { + assert(ctx != NULL && ctx->refcnt > 0); + + ctx->refcnt++; +} + +idn_result_t +idn_ucsmap_add(idn_ucsmap_t ctx, unsigned long ucs, + unsigned long *map, size_t maplen) +{ + ucsmap_entry_t *e; + ucsmap_entry_t *newbuf; + + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsmap_add(ucs=U+%lX, maplen=%u)\n", ucs, maplen)); + + /* Make sure it is not fixed yet. */ + if (ctx->fixed) { + WARNING(("idn_ucsmap_add: attempt to add to fixed map\n")); + return (idn_failure); + } + + if (maplen > MAX_MAPLEN) { + WARNING(("idn_ucsmap_add: maplen too large (> %d)\n", + MAX_MAPLEN)); + return (idn_failure); + } + + /* Append an entry. */ + if (ctx->nentries >= ctx->entry_size) { + if (ctx->entry_size == 0) + ctx->entry_size = INIT_SIZE; + else + ctx->entry_size *= 2; + newbuf = realloc(ctx->entries, sizeof(*e) * ctx->entry_size); + if (newbuf == NULL) + return (idn_nomemory); + ctx->entries = newbuf; + } + e = &ctx->entries[ctx->nentries]; + e->hidx = ucsmap_hash(ucs); + e->len = maplen; + e->ucs = ucs; + if (maplen > 0) { + /* Save mapped sequence in the buffer. */ + e->map = save_mapped_sequence(ctx, map, maplen); + if (e->map == NULL) + return (idn_nomemory); + } else { + /* + * Zero 'maplen' is perfectly valid meaning one-to-zero + * mapping. + */ + e->map = NULL; + } + ctx->nentries++; + + return (idn_success); +} + +void +idn_ucsmap_fix(idn_ucsmap_t ctx) { + ucsmap_entry_t *e; + int last_hidx; + int i; + + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsmap_fix()\n")); + + if (ctx->fixed) + return; + + ctx->fixed = 1; + + /* Initialize hash. */ + for (i = 0; i < UCSMAP_HASH_SIZE; i++) { + ctx->hash[i].entry = NULL; + ctx->hash[i].n = 0; + } + + if (ctx->nentries == 0) + return; + + /* Sort entries by the hash value and code point. */ + qsort(ctx->entries, ctx->nentries, sizeof(ucsmap_entry_t), comp_entry); + + /* + * Now the entries are sorted by their hash value, and + * sorted by its code point among the ones with the same hash value. + */ + + /* Build hash table. */ + last_hidx = -1; + for (i = 0, e = ctx->entries; i < ctx->nentries; i++, e++) { + if (e->hidx != last_hidx) { + ctx->hash[e->hidx].entry = e; + last_hidx = e->hidx; + } + ctx->hash[last_hidx].n++; + } +} + +idn_result_t +idn_ucsmap_map(idn_ucsmap_t ctx, unsigned long v, unsigned long *to, + size_t tolen, size_t *maplenp) { + int hash; + ucsmap_entry_t *e; + int n; + int hi, lo, mid; + + assert(ctx != NULL && ctx->refcnt > 0 && to != NULL && + maplenp != NULL); + + TRACE(("idn_ucsmap_map(v=U+%lX)\n", v)); + + if (!ctx->fixed) { + WARNING(("idn_ucsmap_map: not fixed yet\n")); + return (idn_failure); + } + + /* First, look up hash table. */ + hash = ucsmap_hash(v); + if ((n = ctx->hash[hash].n) == 0) + goto nomap; + + /* Then do binary search. */ + e = ctx->hash[hash].entry; + lo = 0; + hi = n - 1; + while (lo <= hi) { + mid = (lo + hi) / 2; + if (v < e[mid].ucs) + hi = mid - 1; + else if (v > e[mid].ucs) + lo = mid + 1; + else { + /* Found. */ + if (tolen < e[mid].len) + return (idn_buffer_overflow); + memcpy(to, e[mid].map, sizeof(*to) * e[mid].len); + *maplenp = e[mid].len; + return (idn_success); + } + } + + /* + * Not found. Put the original character to 'to' + * just for convenience. + */ + nomap: + if (tolen < 1) + return (idn_buffer_overflow); + *to = v; + *maplenp = 1; + return (idn_nomapping); +} + +static int +ucsmap_hash(unsigned long v) { + return (v % UCSMAP_HASH_SIZE); +} + +static unsigned long * +save_mapped_sequence(idn_ucsmap_t ctx, unsigned long *map, size_t maplen) { + ucsmap_buf_t *buf; + unsigned long *p; + size_t allocsize; + + /* + * If the current buffer (the first one in the ctx->mapdata list) + * has enough space, use it. Otherwise, allocate a new buffer and + * insert it at the beginning of the list. + */ + if (ctx->mapdata_used + maplen > ctx->mapdata_size) { + if (maplen > DEFAULT_BUF_SIZE) + allocsize = maplen * 2; + else + allocsize = DEFAULT_BUF_SIZE; + buf = malloc(sizeof(ucsmap_hash_t) + + sizeof(unsigned long) * allocsize); + if (buf == NULL) + return (NULL); + buf->next = ctx->mapdata; + ctx->mapdata = buf; + ctx->mapdata_size = allocsize; + ctx->mapdata_used = 0; + } + p = ctx->mapdata->buf + ctx->mapdata_used; + memcpy(p, map, sizeof(unsigned long) * maplen); + ctx->mapdata_used += maplen; + return (p); +} + +static void +free_mapbuf(ucsmap_buf_t *buf) { + while (buf != NULL) { + ucsmap_buf_t *next = buf->next; + free(buf); + buf = next; + } +} + +static int +comp_entry(const void *v1, const void *v2) { + const ucsmap_entry_t *e1 = v1; + const ucsmap_entry_t *e2 = v2; + + if (e1->hidx < e2->hidx) + return (-1); + else if (e1->hidx > e2->hidx) + return (1); + else if (e1->ucs < e2->ucs) + return (-1); + else if (e1->ucs > e2->ucs) + return (1); + else + return (0); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/ucsset.c b/contrib/idn/idnkit-1.0-src/lib/ucsset.c new file mode 100644 index 0000000000..091832112c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/ucsset.c @@ -0,0 +1,368 @@ +#ifndef lint +static char *rcsid = "$Id: ucsset.c,v 1.1 2003/06/04 00:26:15 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#define UCS_MAX 0x80000000UL + +#define INIT_SIZE 50 + +/* + * Code point range. + * + * The set of code points is represented by an array of code point ranges. + * In the building phase, specified ranges by 'idn_ucsset_add' or + * 'idn_ucsset_addrange' are simply appended to the array. + * And 'idn_ucsset_fix' sorts the array by the code point value, and also + * merges any intersecting ranges. Since the array is sorted, a binary + * search can be used for looking up. + */ +typedef struct { + unsigned long from; + unsigned long to; +} range_t; + +/* + * Code point segment. + * + * To speed up searching further, the entire region of UCS-4 code points + * (U+0000 - U+7FFFFFFF) are divided into segments. For each segment, + * the first and last element of the range array corresponding to the + * segment are computed by 'idn_ucsset_fix'. This narrows down the + * (initial) search range. + */ +typedef struct { + int range_start; /* index of ucsset.ranges */ + int range_end; /* ditto */ +} segment_t; + +/* + * Code point to segment index conversion. + * + * Below is the function that maps a code point to the corresponding segment. + * The mapping is non-uniform, so that BMP, the following 16 planes that + * comprise Unicode code points together with BMP, and other planes + * have different granularity. + */ +#define SEG_THLD1 0x10000 /* BMP */ +#define SEG_THLD2 0x110000 /* Unicode (BMP+16planes) */ +#define SEG_SFT1 10 /* BMP: 1K code points/segment */ +#define SEG_SFT2 14 /* following 16 planes: 16K cp/seg */ +#define SEG_SFT3 24 /* rest: 16M cp/seg */ +#define SEG_OFF1 (SEG_THLD1 >> SEG_SFT1) +#define SEG_OFF2 (((SEG_THLD2 - SEG_THLD1) >> SEG_SFT2) + SEG_OFF1) +#define SEG_INDEX(v) \ + (((v) < SEG_THLD1) ? ((v) >> SEG_SFT1) : \ + ((v) < SEG_THLD2) ? ((((v) - SEG_THLD1) >> SEG_SFT2) + SEG_OFF1) : \ + ((((v) - SEG_THLD2) >> SEG_SFT3) + SEG_OFF2)) +#define SEG_LEN (SEG_INDEX(UCS_MAX - 1) + 1) + +/* + * Representation of set of UCS code points. + */ +typedef struct idn_ucsset { + segment_t segments[SEG_LEN]; + int fixed; + int size; /* allocated size of 'ranges' */ + int nranges; /* num of ranges */ + range_t *ranges; + int refcnt; /* reference count */ +} ucsset; + +static idn_result_t addrange(idn_ucsset_t ctx, unsigned long from, + unsigned long to, char *func_name); +static int comp_range(const void *v1, const void *v2); + +idn_result_t +idn_ucsset_create(idn_ucsset_t *ctx) { + idn_ucsset_t bm; + + assert(ctx != NULL); + + TRACE(("idn_ucsset_create()\n")); + + if ((bm = malloc(sizeof(ucsset))) == NULL) { + WARNING(("idn_ucsset_create: malloc failed\n")); + return idn_nomemory; + } + bm->size = bm->nranges = 0; + bm->ranges = NULL; + bm->fixed = 0; + bm->refcnt = 1; + *ctx = bm; + return (idn_success); +} + +void +idn_ucsset_destroy(idn_ucsset_t ctx) { + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsset_destroy()\n")); + + if (--ctx->refcnt == 0) { + if (ctx->ranges != NULL) + free(ctx->ranges); + free(ctx); + } +} + +void +idn_ucsset_incrref(idn_ucsset_t ctx) { + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsset_incrref()\n")); + + ctx->refcnt++; +} + +idn_result_t +idn_ucsset_add(idn_ucsset_t ctx, unsigned long v) { + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsset_add(v=U+%lX)\n", v)); + + return (addrange(ctx, v, v, "idn_ucsset_add")); +} + +idn_result_t +idn_ucsset_addrange(idn_ucsset_t ctx, unsigned long from, + unsigned long to) +{ + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsset_addrange(from=U+%lX, to=U+%lX)\n", + from, to)); + + return (addrange(ctx, from, to, "idn_ucsset_addrange")); +} + +void +idn_ucsset_fix(idn_ucsset_t ctx) { + int nranges; + range_t *ranges; + segment_t *segments; + int i, j; + + assert(ctx != NULL && ctx->refcnt > 0); + + TRACE(("idn_ucsset_fix()\n")); + + nranges = ctx->nranges; + ranges = ctx->ranges; + segments = ctx->segments; + + if (ctx->fixed) + return; + + ctx->fixed = 1; + + /* Initialize segment array */ + for (i = 0; i < SEG_LEN; i++) { + segments[i].range_start = -1; + segments[i].range_end = -1; + } + + /* If the set is empty, there's nothing to be done. */ + if (nranges == 0) + return; + + /* Sort ranges. */ + qsort(ranges, nranges, sizeof(range_t), comp_range); + + /* Merge overlapped/continuous ranges. */ + for (i = 0, j = 1; j < nranges; j++) { + if (ranges[i].to + 1 >= ranges[j].from) { + /* can be merged */ + if (ranges[i].to < ranges[j].to) { + ranges[i].to = ranges[j].to; + } + } else { + i++; + if (i < j) + ranges[i] = ranges[j]; + } + } + /* 'i' points the last range in the array. */ + ctx->nranges = nranges = ++i; + + /* Create segment array. */ + for (i = 0; i < nranges; i++) { + int fidx = SEG_INDEX(ranges[i].from); + int tidx = SEG_INDEX(ranges[i].to); + + for (j = fidx; j <= tidx; j++) { + if (segments[j].range_start < 0) + segments[j].range_start = i; + segments[j].range_end = i; + } + } + +#if 0 + /* + * Does the standard guarantee realloc() always succeeds + * when shrinking? + */ + /* Shrink malloc'ed space if possible. */ + ctx->ranges = realloc(ctx->ranges, ctx->nranges * sizeof(range_t)); +#endif +} + +idn_result_t +idn_ucsset_lookup(idn_ucsset_t ctx, unsigned long v, int *found) { + int idx; + segment_t *segments; + + assert(ctx != NULL && ctx->refcnt > 0 && found != NULL); + + TRACE(("idn_ucsset_lookup(v=U+%lX)\n", v)); + + /* Make sure it is fixed. */ + if (!ctx->fixed) { + WARNING(("idn_ucsset_lookup: not fixed yet\n")); + return (idn_failure); + } + + /* Check the given code point. */ + if (v >= UCS_MAX) + return (idn_invalid_codepoint); + + /* Get the segment 'v' belongs to. */ + segments = ctx->segments; + idx = SEG_INDEX(v); + + /* Do binary search. */ + *found = 0; + if (segments[idx].range_start >= 0) { + int lo = segments[idx].range_start; + int hi = segments[idx].range_end; + range_t *ranges = ctx->ranges; + + while (lo <= hi) { + int mid = (lo + hi) / 2; + if (v < ranges[mid].from) { + hi = mid - 1; + } else if (v > ranges[mid].to) { + lo = mid + 1; + } else { + *found = 1; + break; + } + } + } + return (idn_success); +} + +static idn_result_t +addrange(idn_ucsset_t ctx, unsigned long from, unsigned long to, + char *func_name) +{ + range_t *newbuf; + + /* Check the given code points. */ + if (from > UCS_MAX) { + WARNING(("%s: code point out of range (U+%lX)\n", + func_name, from)); + return (idn_invalid_codepoint); + } else if (to > UCS_MAX) { + WARNING(("%s: code point out of range (U+%lX)\n", + func_name, to)); + return (idn_invalid_codepoint); + } else if (from > to) { + WARNING(("%s: invalid range spec (U+%lX-U+%lX)\n", + func_name, from, to)); + return (idn_invalid_codepoint); + } + + /* Make sure it is not fixed yet. */ + if (ctx->fixed) { + WARNING(("%s: attempt to add to already fixed object\n", + func_name)); + return (idn_failure); + } + + /* Append the specified range to the 'ranges' array. */ + if (ctx->nranges >= ctx->size) { + /* Make it bigger. */ + if (ctx->size == 0) + ctx->size = INIT_SIZE; + else + ctx->size *= 2; + newbuf = realloc(ctx->ranges, ctx->size * sizeof(range_t)); + if (newbuf == NULL) + return (idn_nomemory); + ctx->ranges = newbuf; + } + ctx->ranges[ctx->nranges].from = from; + ctx->ranges[ctx->nranges].to = to; + ctx->nranges++; + + return (idn_success); +} + +static int +comp_range(const void *v1, const void *v2) { + /* + * Range comparation function suitable for qsort(). + */ + const range_t *r1 = v1; + const range_t *r2 = v2; + + if (r1->from < r2->from) + return (-1); + else if (r1->from > r2->from) + return (1); + else + return (0); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/unicode.c b/contrib/idn/idnkit-1.0-src/lib/unicode.c new file mode 100644 index 0000000000..ecd76125f9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/unicode.c @@ -0,0 +1,309 @@ +#ifndef lint +static char *rcsid = "$Id: unicode.c,v 1.1 2003/06/04 00:26:16 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#define UNICODE_CURRENT "3.2.0" + +#define UCS_MAX 0x10ffff +#define END_BIT 0x80000000 + +/* + * Some constants for Hangul decomposition/composition. + */ +#define SBase 0xac00 +#define LBase 0x1100 +#define VBase 0x1161 +#define TBase 0x11a7 +#define LCount 19 +#define VCount 21 +#define TCount 28 +#define SLast (SBase + LCount * VCount * TCount) + +/* + * Symbol composition macro. + */ +#define compose_sym(a, b) compose_symX(a, b) +#define compose_symX(a, b) a ## b + +struct composition { + unsigned long c2; /* 2nd character */ + unsigned long comp; /* composed character */ +}; + +#include "unicodedata_320.c" +#define VERSION v320 +#include "unicode_template.c" +#undef VERSION + +typedef int (*unicode_canonclassproc)(unsigned long v); +typedef int (*unicode_decomposeproc)(unsigned long c, + const unsigned long **seqp); +typedef int (*unicode_composeproc)(unsigned long c, + const struct composition **compp); + +static struct idn__unicode_ops { + char *version; + unicode_canonclassproc canonclass_proc; + unicode_decomposeproc decompose_proc; + unicode_composeproc compose_proc; +} unicode_versions[] = { +#define MAKE_UNICODE_HANDLE(version, suffix) \ + { version, \ + compose_sym(canonclass_, suffix), \ + compose_sym(decompose_, suffix), \ + compose_sym(compose_, suffix) } + MAKE_UNICODE_HANDLE("3.2.0", v320), + { NULL }, +#undef MAKE_UNICODE_HANDLE +}; + +idn_result_t +idn__unicode_create(const char *version, + idn__unicode_version_t *versionp) { + idn__unicode_version_t v; + + assert(versionp != NULL); + TRACE(("idn__unicode_create(version=%-.50s)\n", + version == NULL ? "" : version)); + + if (version == NULL) + version = UNICODE_CURRENT; + + for (v = unicode_versions; v->version != NULL; v++) { + if (strcmp(v->version, version) == 0) { + *versionp = v; + return (idn_success); + } + } + return (idn_notfound); +} + +void +idn__unicode_destroy(idn__unicode_version_t version) { + assert(version != NULL); + TRACE(("idn__unicode_destroy()\n")); + /* Nothing to do */ +} + +int +idn__unicode_canonicalclass(idn__unicode_version_t version, unsigned long c) { + if (c > UCS_MAX) + return (0); + + return (*version->canonclass_proc)(c); +} + +idn_result_t +idn__unicode_decompose(idn__unicode_version_t version, + int compat, unsigned long *v, size_t vlen, + unsigned long c, int *decomp_lenp) { + unsigned long *vorg = v; + int seqidx; + const unsigned long *seq; + + assert(v != NULL && vlen >= 0 && decomp_lenp != NULL); + + if (c > UCS_MAX) + return (idn_notfound); + + /* + * First, check for Hangul. + */ + if (SBase <= c && c < SLast) { + int idx, t_offset, v_offset, l_offset; + + idx = c - SBase; + t_offset = idx % TCount; + idx /= TCount; + v_offset = idx % VCount; + l_offset = idx / VCount; + if ((t_offset == 0 && vlen < 2) || (t_offset > 0 && vlen < 3)) + return (idn_buffer_overflow); + *v++ = LBase + l_offset; + *v++ = VBase + v_offset; + if (t_offset > 0) + *v++ = TBase + t_offset; + *decomp_lenp = v - vorg; + return (idn_success); + } + + /* + * Look up decomposition table. If no decomposition is defined + * or if it is a compatibility decomosition when canonical + * decomposition requested, return 'idn_notfound'. + */ + seqidx = (*version->decompose_proc)(c, &seq); + if (seqidx == 0 || (compat == 0 && (seqidx & DECOMP_COMPAT) != 0)) + return (idn_notfound); + + /* + * Copy the decomposed sequence. The end of the sequence are + * marked with END_BIT. + */ + do { + unsigned long c; + int dlen; + idn_result_t r; + + c = *seq & ~END_BIT; + + /* Decompose recursively. */ + r = idn__unicode_decompose(version, compat, v, vlen, c, &dlen); + if (r == idn_success) { + v += dlen; + vlen -= dlen; + } else if (r == idn_notfound) { + if (vlen < 1) + return (idn_buffer_overflow); + *v++ = c; + vlen--; + } else { + return (r); + } + + } while ((*seq++ & END_BIT) == 0); + + *decomp_lenp = v - vorg; + + return (idn_success); +} + +int +idn__unicode_iscompositecandidate(idn__unicode_version_t version, + unsigned long c) { + const struct composition *dummy; + + if (c > UCS_MAX) + return (0); + + /* Check for Hangul */ + if ((LBase <= c && c < LBase + LCount) || (SBase <= c && c < SLast)) + return (1); + + /* + * Look up composition table. If there are no composition + * that begins with the given character, it is not a + * composition candidate. + */ + if ((*version->compose_proc)(c, &dummy) == 0) + return (0); + else + return (1); +} + +idn_result_t +idn__unicode_compose(idn__unicode_version_t version, unsigned long c1, + unsigned long c2, unsigned long *compp) { + int n; + int lo, hi; + const struct composition *cseq; + + assert(compp != NULL); + + if (c1 > UCS_MAX || c2 > UCS_MAX) + return (idn_notfound); + + /* + * Check for Hangul. + */ + if (LBase <= c1 && c1 < LBase + LCount && + VBase <= c2 && c2 < VBase + VCount) { + /* + * Hangul L and V. + */ + *compp = SBase + + ((c1 - LBase) * VCount + (c2 - VBase)) * TCount; + return (idn_success); + } else if (SBase <= c1 && c1 < SLast && + TBase <= c2 && c2 < TBase + TCount && + (c1 - SBase) % TCount == 0) { + /* + * Hangul LV and T. + */ + *compp = c1 + (c2 - TBase); + return (idn_success); + } + + /* + * Look up composition table. If the result is 0, no composition + * is defined. Otherwise, upper 16bits of the result contains + * the number of composition that begins with 'c1', and the lower + * 16bits is the offset in 'compose_seq'. + */ + if ((n = (*version->compose_proc)(c1, &cseq)) == 0) + return (idn_notfound); + + /* + * The composite sequences are sorted by the 2nd character 'c2'. + * So we can use binary search. + */ + lo = 0; + hi = n - 1; + while (lo <= hi) { + int mid = (lo + hi) / 2; + + if (cseq[mid].c2 < c2) { + lo = mid + 1; + } else if (cseq[mid].c2 > c2) { + hi = mid - 1; + } else { + *compp = cseq[mid].comp; + return (idn_success); + } + } + return (idn_notfound); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/unicode_template.c b/contrib/idn/idnkit-1.0-src/lib/unicode_template.c new file mode 100644 index 0000000000..87a360754e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/unicode_template.c @@ -0,0 +1,101 @@ +/* $Id: unicode_template.c,v 1.1 2003/06/04 00:26:16 marka Exp $ */ + +/* + * Copyright (c) 2000,2001 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef UNICODE_TEMPLATE_INIT +#define UNICODE_TEMPLATE_INIT + +/* + * Macro for multi-level index table. + */ +#define LOOKUPTBL(vprefix, mprefix, v) \ + DMAP(vprefix)[\ + IMAP(vprefix)[\ + IMAP(vprefix)[IDX0(mprefix, v)] + IDX1(mprefix, v)\ + ]\ + ].tbl[IDX2(mprefix, v)] + +#define IDX0(mprefix, v) IDX_0(v, BITS1(mprefix), BITS2(mprefix)) +#define IDX1(mprefix, v) IDX_1(v, BITS1(mprefix), BITS2(mprefix)) +#define IDX2(mprefix, v) IDX_2(v, BITS1(mprefix), BITS2(mprefix)) + +#define IDX_0(v, bits1, bits2) ((v) >> ((bits1) + (bits2))) +#define IDX_1(v, bits1, bits2) (((v) >> (bits2)) & ((1 << (bits1)) - 1)) +#define IDX_2(v, bits1, bits2) ((v) & ((1 << (bits2)) - 1)) + +#define BITS1(mprefix) mprefix ## _BITS_1 +#define BITS2(mprefix) mprefix ## _BITS_2 + +#define IMAP(vprefix) concat4(VERSION, _, vprefix, _imap) +#define DMAP(vprefix) concat4(VERSION, _, vprefix, _table) +#define SEQ(vprefix) concat4(VERSION, _, vprefix, _seq) +#define concat4(a,b,c,d) concat4X(a, b, c, d) +#define concat4X(a,b,c,d) a ## b ## c ## d + +#endif /* UNICODE_TEMPLATE_INIT */ + +static int +compose_sym(canonclass_, VERSION) (unsigned long c) { + /* Look up canonicalclass table. */ + return (LOOKUPTBL(canon_class, CANON_CLASS, c)); +} + +static int +compose_sym(decompose_, VERSION) (unsigned long c, const unsigned long **seqp) +{ + /* Look up decomposition table. */ + int seqidx = LOOKUPTBL(decompose, DECOMP, c); + *seqp = SEQ(decompose) + (seqidx & ~DECOMP_COMPAT); + return (seqidx); +} + +static int +compose_sym(compose_, VERSION) (unsigned long c, + const struct composition **compp) +{ + /* Look up composition table. */ + int seqidx = LOOKUPTBL(compose, CANON_COMPOSE, c); + *compp = SEQ(compose) + (seqidx & 0xffff); + return (seqidx >> 16); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/unicodedata_320.c b/contrib/idn/idnkit-1.0-src/lib/unicodedata_320.c new file mode 100644 index 0000000000..5e321a9f18 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/unicodedata_320.c @@ -0,0 +1,7916 @@ +/* $Id: unicodedata_320.c,v 1.1 2003/06/04 00:26:43 marka Exp $ */ +/* $-Id: generate_normalize_data.pl,v 1.8 2001/10/31 08:51:30 m-kasahr Exp -$ */ +/* + * Do not edit this file! + * This file is generated from UnicodeData.txt, CompositionExclusions-1.txt, + * SpecialCasing.txt and CaseFolding.txt. + */ + + +/* + * Canonical Class + */ + +#define CANON_CLASS_BITS_0 9 +#define CANON_CLASS_BITS_1 7 +#define CANON_CLASS_BITS_2 5 + +static const unsigned short v320_canon_class_imap[] = { + 272, 400, 528, 656, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 912, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 1040, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 3, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 6, 7, 8, 0, + 0, 0, 9, 10, 0, 0, 11, 12, + 13, 14, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 17, 0, 0, 16, 18, 0, + 0, 16, 18, 0, 0, 16, 18, 0, + 0, 16, 18, 0, 0, 0, 18, 0, + 0, 0, 19, 0, 0, 0, 18, 0, + 0, 0, 18, 0, 0, 0, 20, 0, + 0, 21, 22, 0, 0, 23, 24, 0, + 25, 26, 0, 27, 28, 0, 29, 0, + 0, 30, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 31, 31, 0, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 33, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 34, 35, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 38, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 39, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 40, 41, 42, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned char tbl[32]; +} v320_canon_class_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 232, + 220, 220, 220, 220, 232, 216, 220, 220, 220, 220, + }}, + {{ + 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, + 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, + 1, 1, 1, 220, 220, 220, 220, 230, 230, 230, + }}, + {{ + 230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, + 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 234, 234, 233, 230, 230, 230, 230, 230, 230, 230, 230, + 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 220, 230, 230, 230, 230, + 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, + }}, + {{ + 230, 230, 0, 220, 220, 220, 220, 220, 230, 230, 220, + 230, 230, 222, 228, 230, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 0, 20, 21, 22, 0, 23, + }}, + {{ + 0, 24, 25, 0, 230, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, + }}, + {{ + 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, + 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 230, 220, 230, 230, 220, 230, + 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, + }}, + {{ + 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, + 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, + 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, + 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 220, 220, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, + 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, + 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, + }}, + {{ + 130, 0, 230, 230, 9, 0, 230, 230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, + 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, + }}, + {{ + 0, 230, 0, 0, 0, 1, 1, 230, 220, 230, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, + 228, 232, 222, 224, 224, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, + }}, + {{ + 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 216, 216, 1, 1, 1, 0, + 0, 0, 226, 216, 216, 216, 216, 216, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, + }}, + {{ + 220, 220, 220, 0, 0, 230, 230, 230, 230, 230, 220, + 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, + 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; + +/* + * Canonical Composition + */ + +#define CANON_COMPOSE_BITS_0 9 +#define CANON_COMPOSE_BITS_1 7 +#define CANON_COMPOSE_BITS_2 5 + +static const unsigned short v320_compose_imap[] = { + 272, 400, 528, 656, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 0, 1, 2, 3, 0, 4, 5, 6, + 7, 0, 8, 9, 0, 10, 0, 11, + 0, 12, 0, 0, 13, 0, 0, 0, + 0, 0, 0, 0, 14, 15, 16, 0, + 17, 18, 19, 20, 0, 0, 21, 22, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 23, 24, 0, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 26, 0, 0, 0, 0, 27, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 29, 0, 30, 0, + 0, 0, 31, 0, 0, 32, 33, 0, + 0, 0, 34, 0, 0, 0, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 37, 38, 39, 0, 40, 41, 0, + 42, 43, 44, 45, 0, 46, 47, 48, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 0, 50, 0, + 51, 52, 53, 54, 55, 56, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 57, 58, 59, 60, 61, 62, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned long tbl[32]; +} v320_compose_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 65537, 65538, 65539, 0, + }}, + {{ + 0, 1048580, 196628, 327703, 393244, 1114146, 65587, + 458804, 458811, 983106, 65617, 327762, 393303, 196701, + 589920, 1048681, 131193, 0, 524411, 458883, 458890, + 1245329, 131236, 393382, 131244, 589998, 393399, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 1048765, 196813, 327888, 393429, 1114331, 65772, + 458989, 524532, 917756, 131338, 327948, 393489, 196887, + 590106, 1048867, 131379, 0, 524597, 459069, 524612, + 1245516, 131423, 459105, 131432, 655722, 393588, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 196986, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 262525, 0, 65921, 65922, 131459, + 65925, 0, 0, 262534, 0, 0, 0, + 0, 65930, 0, 0, 0, 0, 262539, + 197007, 65938, 0, 65939, 0, 0, 0, + 262548, 0, 0, 0, + }}, + {{ + 0, 0, 262552, 0, 65948, 65949, 131486, + 65952, 0, 0, 262561, 0, 0, 0, + 0, 65957, 0, 0, 0, 0, 262566, + 197034, 65965, 0, 65966, 0, 0, 0, + 262575, 0, 0, 0, + }}, + {{ + 0, 0, 262579, 262583, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 131515, 131517, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 131519, 131521, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 65987, 65988, + 0, 0, 0, 0, + }}, + {{ + 65989, 65990, 0, 0, 0, 0, 0, + 0, 65991, 65992, 65993, 65994, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 65995, + }}, + {{ + 328140, 328145, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 328150, 328155, 0, 0, 0, 0, + 0, 0, 66016, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66017, 66018, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66019, + 66020, 66021, 66022, 0, 0, 0, 0, + 66023, 66024, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 66025, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 459242, 0, 0, 0, + 262641, 0, 328181, 0, 459258, 0, 0, + 0, 0, 0, 262657, + }}, + {{ + 0, 66053, 0, 0, 0, 393734, 0, + 0, 0, 328204, 0, 0, 66065, 0, + 66066, 0, 0, 524819, 0, 0, 0, + 262683, 0, 393759, 0, 524837, 0, 0, + 0, 0, 0, 262701, + }}, + {{ + 0, 131633, 0, 0, 0, 524851, 0, + 0, 0, 393787, 197185, 197188, 0, 0, + 66119, 0, 0, 0, 131656, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66122, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 131659, 0, 0, 66125, 0, + 197198, 131665, 66131, 262740, 0, 66136, 0, + 0, 0, 66137, 0, + }}, + {{ + 0, 0, 0, 262746, 0, 0, 0, + 66142, 0, 0, 0, 66143, 0, 66144, + 0, 0, 131681, 0, 0, 66147, 0, + 197220, 131687, 66153, 262762, 0, 66158, 0, + 0, 0, 66159, 0, + }}, + {{ + 0, 0, 0, 262768, 0, 0, 0, + 66164, 0, 0, 0, 66165, 0, 66166, + 0, 0, 0, 0, 0, 0, 0, + 0, 66167, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 66168, + 66169, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66170, 66171, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 66172, 66173, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 197246, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 66177, 0, 66178, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 66179, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 66180, 0, 0, + 66181, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 66182, 0, 0, 0, 0, 0, + 0, 0, 66183, 0, 0, 66184, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 131721, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 197259, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 66190, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 131727, + 66193, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66194, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66195, + }}, + {{ + 0, 0, 0, 0, 0, 0, 197268, + 0, 0, 0, 66199, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 131736, + 66202, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 197275, 0, 0, + 66206, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 66207, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66208, 66209, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 66210, 66211, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 66212, 66213, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 131750, 131752, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66218, 66219, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 66220, 66221, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 262830, 262834, 66230, 66231, 66232, 66233, 66234, + 66235, 262844, 262848, 66244, 66245, 66246, 66247, + 66248, 66249, 131786, 131788, 0, 0, 0, + 0, 0, 0, 131790, 131792, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 262866, 262870, 66266, 66267, 66268, 66269, 66270, + 66271, 262880, 262884, 66280, 66281, 66282, 66283, + 66284, 66285, 197358, 197361, 0, 0, 0, + 0, 0, 0, 197364, 197367, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 131834, 131836, 0, 0, 0, 0, 0, + 0, 131838, 131840, 0, 0, 0, 0, + 0, 0, 197378, 197381, 0, 0, 0, + 0, 0, 0, 0, 197384, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 262923, 262927, 66323, 66324, 66325, 66326, 66327, + 66328, 262937, 262941, 66337, 66338, 66339, 66340, + 66341, 66342, 66343, 0, 0, 0, 66344, + 0, 0, 0, 0, 0, 0, 0, + 66345, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66346, 0, 0, 0, 0, 0, + 0, 0, 0, 197419, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66350, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66351, 0, 0, 0, 0, 0, + 0, 0, 197424, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 66355, 0, 66356, 0, 66357, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 66358, 0, 66359, 0, 66360, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 66361, 0, 0, 0, + 0, 66362, 0, 0, 66363, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 66364, 0, 66365, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 66366, 0, 0, 0, + }}, + {{ + 0, 0, 0, 66367, 0, 66368, 0, + 0, 66369, 0, 0, 0, 0, 66370, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 66371, 0, 0, 66372, 66373, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 66374, 66375, 0, + 0, 66376, 66377, 0, 0, 66378, 66379, + 66380, 66381, 0, 0, + }}, + {{ + 0, 0, 66382, 66383, 0, 0, 66384, + 66385, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 66386, 66387, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 66388, 0, 0, 0, 0, + 0, 66389, 66390, 0, 66391, 0, 0, + 0, 0, 0, 0, 66392, 66393, 66394, + 66395, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66396, + 0, 0, 0, 0, 66397, 0, 66398, + 0, 66399, 0, 66400, 0, 66401, 0, + 66402, 0, 66403, 0, 66404, 0, 66405, + 0, 66406, 0, 66407, + }}, + {{ + 0, 66408, 0, 0, 66409, 0, 66410, + 0, 66411, 0, 0, 0, 0, 0, + 0, 131948, 0, 0, 131950, 0, 0, + 131952, 0, 0, 131954, 0, 0, 131956, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66422, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 66423, + 0, 0, 0, 0, 66424, 0, 66425, + 0, 66426, 0, 66427, 0, 66428, 0, + 66429, 0, 66430, 0, 66431, 0, 66432, + 0, 66433, 0, 66434, + }}, + {{ + 0, 66435, 0, 0, 66436, 0, 66437, + 0, 66438, 0, 0, 0, 0, 0, + 0, 131975, 0, 0, 131977, 0, 0, + 131979, 0, 0, 131981, 0, 0, 131983, + 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66449, 66450, 66451, 66452, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 66453, 0, 0, + }}, +}; + +static const struct composition v320_compose_seq[] = { + { 0x00000000, 0x00000000 }, { 0x00000338, 0x0000226e }, + { 0x00000338, 0x00002260 }, { 0x00000338, 0x0000226f }, + { 0x00000300, 0x000000c0 }, { 0x00000301, 0x000000c1 }, + { 0x00000302, 0x000000c2 }, { 0x00000303, 0x000000c3 }, + { 0x00000304, 0x00000100 }, { 0x00000306, 0x00000102 }, + { 0x00000307, 0x00000226 }, { 0x00000308, 0x000000c4 }, + { 0x00000309, 0x00001ea2 }, { 0x0000030a, 0x000000c5 }, + { 0x0000030c, 0x000001cd }, { 0x0000030f, 0x00000200 }, + { 0x00000311, 0x00000202 }, { 0x00000323, 0x00001ea0 }, + { 0x00000325, 0x00001e00 }, { 0x00000328, 0x00000104 }, + { 0x00000307, 0x00001e02 }, { 0x00000323, 0x00001e04 }, + { 0x00000331, 0x00001e06 }, { 0x00000301, 0x00000106 }, + { 0x00000302, 0x00000108 }, { 0x00000307, 0x0000010a }, + { 0x0000030c, 0x0000010c }, { 0x00000327, 0x000000c7 }, + { 0x00000307, 0x00001e0a }, { 0x0000030c, 0x0000010e }, + { 0x00000323, 0x00001e0c }, { 0x00000327, 0x00001e10 }, + { 0x0000032d, 0x00001e12 }, { 0x00000331, 0x00001e0e }, + { 0x00000300, 0x000000c8 }, { 0x00000301, 0x000000c9 }, + { 0x00000302, 0x000000ca }, { 0x00000303, 0x00001ebc }, + { 0x00000304, 0x00000112 }, { 0x00000306, 0x00000114 }, + { 0x00000307, 0x00000116 }, { 0x00000308, 0x000000cb }, + { 0x00000309, 0x00001eba }, { 0x0000030c, 0x0000011a }, + { 0x0000030f, 0x00000204 }, { 0x00000311, 0x00000206 }, + { 0x00000323, 0x00001eb8 }, { 0x00000327, 0x00000228 }, + { 0x00000328, 0x00000118 }, { 0x0000032d, 0x00001e18 }, + { 0x00000330, 0x00001e1a }, { 0x00000307, 0x00001e1e }, + { 0x00000301, 0x000001f4 }, { 0x00000302, 0x0000011c }, + { 0x00000304, 0x00001e20 }, { 0x00000306, 0x0000011e }, + { 0x00000307, 0x00000120 }, { 0x0000030c, 0x000001e6 }, + { 0x00000327, 0x00000122 }, { 0x00000302, 0x00000124 }, + { 0x00000307, 0x00001e22 }, { 0x00000308, 0x00001e26 }, + { 0x0000030c, 0x0000021e }, { 0x00000323, 0x00001e24 }, + { 0x00000327, 0x00001e28 }, { 0x0000032e, 0x00001e2a }, + { 0x00000300, 0x000000cc }, { 0x00000301, 0x000000cd }, + { 0x00000302, 0x000000ce }, { 0x00000303, 0x00000128 }, + { 0x00000304, 0x0000012a }, { 0x00000306, 0x0000012c }, + { 0x00000307, 0x00000130 }, { 0x00000308, 0x000000cf }, + { 0x00000309, 0x00001ec8 }, { 0x0000030c, 0x000001cf }, + { 0x0000030f, 0x00000208 }, { 0x00000311, 0x0000020a }, + { 0x00000323, 0x00001eca }, { 0x00000328, 0x0000012e }, + { 0x00000330, 0x00001e2c }, { 0x00000302, 0x00000134 }, + { 0x00000301, 0x00001e30 }, { 0x0000030c, 0x000001e8 }, + { 0x00000323, 0x00001e32 }, { 0x00000327, 0x00000136 }, + { 0x00000331, 0x00001e34 }, { 0x00000301, 0x00000139 }, + { 0x0000030c, 0x0000013d }, { 0x00000323, 0x00001e36 }, + { 0x00000327, 0x0000013b }, { 0x0000032d, 0x00001e3c }, + { 0x00000331, 0x00001e3a }, { 0x00000301, 0x00001e3e }, + { 0x00000307, 0x00001e40 }, { 0x00000323, 0x00001e42 }, + { 0x00000300, 0x000001f8 }, { 0x00000301, 0x00000143 }, + { 0x00000303, 0x000000d1 }, { 0x00000307, 0x00001e44 }, + { 0x0000030c, 0x00000147 }, { 0x00000323, 0x00001e46 }, + { 0x00000327, 0x00000145 }, { 0x0000032d, 0x00001e4a }, + { 0x00000331, 0x00001e48 }, { 0x00000300, 0x000000d2 }, + { 0x00000301, 0x000000d3 }, { 0x00000302, 0x000000d4 }, + { 0x00000303, 0x000000d5 }, { 0x00000304, 0x0000014c }, + { 0x00000306, 0x0000014e }, { 0x00000307, 0x0000022e }, + { 0x00000308, 0x000000d6 }, { 0x00000309, 0x00001ece }, + { 0x0000030b, 0x00000150 }, { 0x0000030c, 0x000001d1 }, + { 0x0000030f, 0x0000020c }, { 0x00000311, 0x0000020e }, + { 0x0000031b, 0x000001a0 }, { 0x00000323, 0x00001ecc }, + { 0x00000328, 0x000001ea }, { 0x00000301, 0x00001e54 }, + { 0x00000307, 0x00001e56 }, { 0x00000301, 0x00000154 }, + { 0x00000307, 0x00001e58 }, { 0x0000030c, 0x00000158 }, + { 0x0000030f, 0x00000210 }, { 0x00000311, 0x00000212 }, + { 0x00000323, 0x00001e5a }, { 0x00000327, 0x00000156 }, + { 0x00000331, 0x00001e5e }, { 0x00000301, 0x0000015a }, + { 0x00000302, 0x0000015c }, { 0x00000307, 0x00001e60 }, + { 0x0000030c, 0x00000160 }, { 0x00000323, 0x00001e62 }, + { 0x00000326, 0x00000218 }, { 0x00000327, 0x0000015e }, + { 0x00000307, 0x00001e6a }, { 0x0000030c, 0x00000164 }, + { 0x00000323, 0x00001e6c }, { 0x00000326, 0x0000021a }, + { 0x00000327, 0x00000162 }, { 0x0000032d, 0x00001e70 }, + { 0x00000331, 0x00001e6e }, { 0x00000300, 0x000000d9 }, + { 0x00000301, 0x000000da }, { 0x00000302, 0x000000db }, + { 0x00000303, 0x00000168 }, { 0x00000304, 0x0000016a }, + { 0x00000306, 0x0000016c }, { 0x00000308, 0x000000dc }, + { 0x00000309, 0x00001ee6 }, { 0x0000030a, 0x0000016e }, + { 0x0000030b, 0x00000170 }, { 0x0000030c, 0x000001d3 }, + { 0x0000030f, 0x00000214 }, { 0x00000311, 0x00000216 }, + { 0x0000031b, 0x000001af }, { 0x00000323, 0x00001ee4 }, + { 0x00000324, 0x00001e72 }, { 0x00000328, 0x00000172 }, + { 0x0000032d, 0x00001e76 }, { 0x00000330, 0x00001e74 }, + { 0x00000303, 0x00001e7c }, { 0x00000323, 0x00001e7e }, + { 0x00000300, 0x00001e80 }, { 0x00000301, 0x00001e82 }, + { 0x00000302, 0x00000174 }, { 0x00000307, 0x00001e86 }, + { 0x00000308, 0x00001e84 }, { 0x00000323, 0x00001e88 }, + { 0x00000307, 0x00001e8a }, { 0x00000308, 0x00001e8c }, + { 0x00000300, 0x00001ef2 }, { 0x00000301, 0x000000dd }, + { 0x00000302, 0x00000176 }, { 0x00000303, 0x00001ef8 }, + { 0x00000304, 0x00000232 }, { 0x00000307, 0x00001e8e }, + { 0x00000308, 0x00000178 }, { 0x00000309, 0x00001ef6 }, + { 0x00000323, 0x00001ef4 }, { 0x00000301, 0x00000179 }, + { 0x00000302, 0x00001e90 }, { 0x00000307, 0x0000017b }, + { 0x0000030c, 0x0000017d }, { 0x00000323, 0x00001e92 }, + { 0x00000331, 0x00001e94 }, { 0x00000300, 0x000000e0 }, + { 0x00000301, 0x000000e1 }, { 0x00000302, 0x000000e2 }, + { 0x00000303, 0x000000e3 }, { 0x00000304, 0x00000101 }, + { 0x00000306, 0x00000103 }, { 0x00000307, 0x00000227 }, + { 0x00000308, 0x000000e4 }, { 0x00000309, 0x00001ea3 }, + { 0x0000030a, 0x000000e5 }, { 0x0000030c, 0x000001ce }, + { 0x0000030f, 0x00000201 }, { 0x00000311, 0x00000203 }, + { 0x00000323, 0x00001ea1 }, { 0x00000325, 0x00001e01 }, + { 0x00000328, 0x00000105 }, { 0x00000307, 0x00001e03 }, + { 0x00000323, 0x00001e05 }, { 0x00000331, 0x00001e07 }, + { 0x00000301, 0x00000107 }, { 0x00000302, 0x00000109 }, + { 0x00000307, 0x0000010b }, { 0x0000030c, 0x0000010d }, + { 0x00000327, 0x000000e7 }, { 0x00000307, 0x00001e0b }, + { 0x0000030c, 0x0000010f }, { 0x00000323, 0x00001e0d }, + { 0x00000327, 0x00001e11 }, { 0x0000032d, 0x00001e13 }, + { 0x00000331, 0x00001e0f }, { 0x00000300, 0x000000e8 }, + { 0x00000301, 0x000000e9 }, { 0x00000302, 0x000000ea }, + { 0x00000303, 0x00001ebd }, { 0x00000304, 0x00000113 }, + { 0x00000306, 0x00000115 }, { 0x00000307, 0x00000117 }, + { 0x00000308, 0x000000eb }, { 0x00000309, 0x00001ebb }, + { 0x0000030c, 0x0000011b }, { 0x0000030f, 0x00000205 }, + { 0x00000311, 0x00000207 }, { 0x00000323, 0x00001eb9 }, + { 0x00000327, 0x00000229 }, { 0x00000328, 0x00000119 }, + { 0x0000032d, 0x00001e19 }, { 0x00000330, 0x00001e1b }, + { 0x00000307, 0x00001e1f }, { 0x00000301, 0x000001f5 }, + { 0x00000302, 0x0000011d }, { 0x00000304, 0x00001e21 }, + { 0x00000306, 0x0000011f }, { 0x00000307, 0x00000121 }, + { 0x0000030c, 0x000001e7 }, { 0x00000327, 0x00000123 }, + { 0x00000302, 0x00000125 }, { 0x00000307, 0x00001e23 }, + { 0x00000308, 0x00001e27 }, { 0x0000030c, 0x0000021f }, + { 0x00000323, 0x00001e25 }, { 0x00000327, 0x00001e29 }, + { 0x0000032e, 0x00001e2b }, { 0x00000331, 0x00001e96 }, + { 0x00000300, 0x000000ec }, { 0x00000301, 0x000000ed }, + { 0x00000302, 0x000000ee }, { 0x00000303, 0x00000129 }, + { 0x00000304, 0x0000012b }, { 0x00000306, 0x0000012d }, + { 0x00000308, 0x000000ef }, { 0x00000309, 0x00001ec9 }, + { 0x0000030c, 0x000001d0 }, { 0x0000030f, 0x00000209 }, + { 0x00000311, 0x0000020b }, { 0x00000323, 0x00001ecb }, + { 0x00000328, 0x0000012f }, { 0x00000330, 0x00001e2d }, + { 0x00000302, 0x00000135 }, { 0x0000030c, 0x000001f0 }, + { 0x00000301, 0x00001e31 }, { 0x0000030c, 0x000001e9 }, + { 0x00000323, 0x00001e33 }, { 0x00000327, 0x00000137 }, + { 0x00000331, 0x00001e35 }, { 0x00000301, 0x0000013a }, + { 0x0000030c, 0x0000013e }, { 0x00000323, 0x00001e37 }, + { 0x00000327, 0x0000013c }, { 0x0000032d, 0x00001e3d }, + { 0x00000331, 0x00001e3b }, { 0x00000301, 0x00001e3f }, + { 0x00000307, 0x00001e41 }, { 0x00000323, 0x00001e43 }, + { 0x00000300, 0x000001f9 }, { 0x00000301, 0x00000144 }, + { 0x00000303, 0x000000f1 }, { 0x00000307, 0x00001e45 }, + { 0x0000030c, 0x00000148 }, { 0x00000323, 0x00001e47 }, + { 0x00000327, 0x00000146 }, { 0x0000032d, 0x00001e4b }, + { 0x00000331, 0x00001e49 }, { 0x00000300, 0x000000f2 }, + { 0x00000301, 0x000000f3 }, { 0x00000302, 0x000000f4 }, + { 0x00000303, 0x000000f5 }, { 0x00000304, 0x0000014d }, + { 0x00000306, 0x0000014f }, { 0x00000307, 0x0000022f }, + { 0x00000308, 0x000000f6 }, { 0x00000309, 0x00001ecf }, + { 0x0000030b, 0x00000151 }, { 0x0000030c, 0x000001d2 }, + { 0x0000030f, 0x0000020d }, { 0x00000311, 0x0000020f }, + { 0x0000031b, 0x000001a1 }, { 0x00000323, 0x00001ecd }, + { 0x00000328, 0x000001eb }, { 0x00000301, 0x00001e55 }, + { 0x00000307, 0x00001e57 }, { 0x00000301, 0x00000155 }, + { 0x00000307, 0x00001e59 }, { 0x0000030c, 0x00000159 }, + { 0x0000030f, 0x00000211 }, { 0x00000311, 0x00000213 }, + { 0x00000323, 0x00001e5b }, { 0x00000327, 0x00000157 }, + { 0x00000331, 0x00001e5f }, { 0x00000301, 0x0000015b }, + { 0x00000302, 0x0000015d }, { 0x00000307, 0x00001e61 }, + { 0x0000030c, 0x00000161 }, { 0x00000323, 0x00001e63 }, + { 0x00000326, 0x00000219 }, { 0x00000327, 0x0000015f }, + { 0x00000307, 0x00001e6b }, { 0x00000308, 0x00001e97 }, + { 0x0000030c, 0x00000165 }, { 0x00000323, 0x00001e6d }, + { 0x00000326, 0x0000021b }, { 0x00000327, 0x00000163 }, + { 0x0000032d, 0x00001e71 }, { 0x00000331, 0x00001e6f }, + { 0x00000300, 0x000000f9 }, { 0x00000301, 0x000000fa }, + { 0x00000302, 0x000000fb }, { 0x00000303, 0x00000169 }, + { 0x00000304, 0x0000016b }, { 0x00000306, 0x0000016d }, + { 0x00000308, 0x000000fc }, { 0x00000309, 0x00001ee7 }, + { 0x0000030a, 0x0000016f }, { 0x0000030b, 0x00000171 }, + { 0x0000030c, 0x000001d4 }, { 0x0000030f, 0x00000215 }, + { 0x00000311, 0x00000217 }, { 0x0000031b, 0x000001b0 }, + { 0x00000323, 0x00001ee5 }, { 0x00000324, 0x00001e73 }, + { 0x00000328, 0x00000173 }, { 0x0000032d, 0x00001e77 }, + { 0x00000330, 0x00001e75 }, { 0x00000303, 0x00001e7d }, + { 0x00000323, 0x00001e7f }, { 0x00000300, 0x00001e81 }, + { 0x00000301, 0x00001e83 }, { 0x00000302, 0x00000175 }, + { 0x00000307, 0x00001e87 }, { 0x00000308, 0x00001e85 }, + { 0x0000030a, 0x00001e98 }, { 0x00000323, 0x00001e89 }, + { 0x00000307, 0x00001e8b }, { 0x00000308, 0x00001e8d }, + { 0x00000300, 0x00001ef3 }, { 0x00000301, 0x000000fd }, + { 0x00000302, 0x00000177 }, { 0x00000303, 0x00001ef9 }, + { 0x00000304, 0x00000233 }, { 0x00000307, 0x00001e8f }, + { 0x00000308, 0x000000ff }, { 0x00000309, 0x00001ef7 }, + { 0x0000030a, 0x00001e99 }, { 0x00000323, 0x00001ef5 }, + { 0x00000301, 0x0000017a }, { 0x00000302, 0x00001e91 }, + { 0x00000307, 0x0000017c }, { 0x0000030c, 0x0000017e }, + { 0x00000323, 0x00001e93 }, { 0x00000331, 0x00001e95 }, + { 0x00000300, 0x00001fed }, { 0x00000301, 0x00000385 }, + { 0x00000342, 0x00001fc1 }, { 0x00000300, 0x00001ea6 }, + { 0x00000301, 0x00001ea4 }, { 0x00000303, 0x00001eaa }, + { 0x00000309, 0x00001ea8 }, { 0x00000304, 0x000001de }, + { 0x00000301, 0x000001fa }, { 0x00000301, 0x000001fc }, + { 0x00000304, 0x000001e2 }, { 0x00000301, 0x00001e08 }, + { 0x00000300, 0x00001ec0 }, { 0x00000301, 0x00001ebe }, + { 0x00000303, 0x00001ec4 }, { 0x00000309, 0x00001ec2 }, + { 0x00000301, 0x00001e2e }, { 0x00000300, 0x00001ed2 }, + { 0x00000301, 0x00001ed0 }, { 0x00000303, 0x00001ed6 }, + { 0x00000309, 0x00001ed4 }, { 0x00000301, 0x00001e4c }, + { 0x00000304, 0x0000022c }, { 0x00000308, 0x00001e4e }, + { 0x00000304, 0x0000022a }, { 0x00000301, 0x000001fe }, + { 0x00000300, 0x000001db }, { 0x00000301, 0x000001d7 }, + { 0x00000304, 0x000001d5 }, { 0x0000030c, 0x000001d9 }, + { 0x00000300, 0x00001ea7 }, { 0x00000301, 0x00001ea5 }, + { 0x00000303, 0x00001eab }, { 0x00000309, 0x00001ea9 }, + { 0x00000304, 0x000001df }, { 0x00000301, 0x000001fb }, + { 0x00000301, 0x000001fd }, { 0x00000304, 0x000001e3 }, + { 0x00000301, 0x00001e09 }, { 0x00000300, 0x00001ec1 }, + { 0x00000301, 0x00001ebf }, { 0x00000303, 0x00001ec5 }, + { 0x00000309, 0x00001ec3 }, { 0x00000301, 0x00001e2f }, + { 0x00000300, 0x00001ed3 }, { 0x00000301, 0x00001ed1 }, + { 0x00000303, 0x00001ed7 }, { 0x00000309, 0x00001ed5 }, + { 0x00000301, 0x00001e4d }, { 0x00000304, 0x0000022d }, + { 0x00000308, 0x00001e4f }, { 0x00000304, 0x0000022b }, + { 0x00000301, 0x000001ff }, { 0x00000300, 0x000001dc }, + { 0x00000301, 0x000001d8 }, { 0x00000304, 0x000001d6 }, + { 0x0000030c, 0x000001da }, { 0x00000300, 0x00001eb0 }, + { 0x00000301, 0x00001eae }, { 0x00000303, 0x00001eb4 }, + { 0x00000309, 0x00001eb2 }, { 0x00000300, 0x00001eb1 }, + { 0x00000301, 0x00001eaf }, { 0x00000303, 0x00001eb5 }, + { 0x00000309, 0x00001eb3 }, { 0x00000300, 0x00001e14 }, + { 0x00000301, 0x00001e16 }, { 0x00000300, 0x00001e15 }, + { 0x00000301, 0x00001e17 }, { 0x00000300, 0x00001e50 }, + { 0x00000301, 0x00001e52 }, { 0x00000300, 0x00001e51 }, + { 0x00000301, 0x00001e53 }, { 0x00000307, 0x00001e64 }, + { 0x00000307, 0x00001e65 }, { 0x00000307, 0x00001e66 }, + { 0x00000307, 0x00001e67 }, { 0x00000301, 0x00001e78 }, + { 0x00000301, 0x00001e79 }, { 0x00000308, 0x00001e7a }, + { 0x00000308, 0x00001e7b }, { 0x00000307, 0x00001e9b }, + { 0x00000300, 0x00001edc }, { 0x00000301, 0x00001eda }, + { 0x00000303, 0x00001ee0 }, { 0x00000309, 0x00001ede }, + { 0x00000323, 0x00001ee2 }, { 0x00000300, 0x00001edd }, + { 0x00000301, 0x00001edb }, { 0x00000303, 0x00001ee1 }, + { 0x00000309, 0x00001edf }, { 0x00000323, 0x00001ee3 }, + { 0x00000300, 0x00001eea }, { 0x00000301, 0x00001ee8 }, + { 0x00000303, 0x00001eee }, { 0x00000309, 0x00001eec }, + { 0x00000323, 0x00001ef0 }, { 0x00000300, 0x00001eeb }, + { 0x00000301, 0x00001ee9 }, { 0x00000303, 0x00001eef }, + { 0x00000309, 0x00001eed }, { 0x00000323, 0x00001ef1 }, + { 0x0000030c, 0x000001ee }, { 0x00000304, 0x000001ec }, + { 0x00000304, 0x000001ed }, { 0x00000304, 0x000001e0 }, + { 0x00000304, 0x000001e1 }, { 0x00000306, 0x00001e1c }, + { 0x00000306, 0x00001e1d }, { 0x00000304, 0x00000230 }, + { 0x00000304, 0x00000231 }, { 0x0000030c, 0x000001ef }, + { 0x00000300, 0x00001fba }, { 0x00000301, 0x00000386 }, + { 0x00000304, 0x00001fb9 }, { 0x00000306, 0x00001fb8 }, + { 0x00000313, 0x00001f08 }, { 0x00000314, 0x00001f09 }, + { 0x00000345, 0x00001fbc }, { 0x00000300, 0x00001fc8 }, + { 0x00000301, 0x00000388 }, { 0x00000313, 0x00001f18 }, + { 0x00000314, 0x00001f19 }, { 0x00000300, 0x00001fca }, + { 0x00000301, 0x00000389 }, { 0x00000313, 0x00001f28 }, + { 0x00000314, 0x00001f29 }, { 0x00000345, 0x00001fcc }, + { 0x00000300, 0x00001fda }, { 0x00000301, 0x0000038a }, + { 0x00000304, 0x00001fd9 }, { 0x00000306, 0x00001fd8 }, + { 0x00000308, 0x000003aa }, { 0x00000313, 0x00001f38 }, + { 0x00000314, 0x00001f39 }, { 0x00000300, 0x00001ff8 }, + { 0x00000301, 0x0000038c }, { 0x00000313, 0x00001f48 }, + { 0x00000314, 0x00001f49 }, { 0x00000314, 0x00001fec }, + { 0x00000300, 0x00001fea }, { 0x00000301, 0x0000038e }, + { 0x00000304, 0x00001fe9 }, { 0x00000306, 0x00001fe8 }, + { 0x00000308, 0x000003ab }, { 0x00000314, 0x00001f59 }, + { 0x00000300, 0x00001ffa }, { 0x00000301, 0x0000038f }, + { 0x00000313, 0x00001f68 }, { 0x00000314, 0x00001f69 }, + { 0x00000345, 0x00001ffc }, { 0x00000345, 0x00001fb4 }, + { 0x00000345, 0x00001fc4 }, { 0x00000300, 0x00001f70 }, + { 0x00000301, 0x000003ac }, { 0x00000304, 0x00001fb1 }, + { 0x00000306, 0x00001fb0 }, { 0x00000313, 0x00001f00 }, + { 0x00000314, 0x00001f01 }, { 0x00000342, 0x00001fb6 }, + { 0x00000345, 0x00001fb3 }, { 0x00000300, 0x00001f72 }, + { 0x00000301, 0x000003ad }, { 0x00000313, 0x00001f10 }, + { 0x00000314, 0x00001f11 }, { 0x00000300, 0x00001f74 }, + { 0x00000301, 0x000003ae }, { 0x00000313, 0x00001f20 }, + { 0x00000314, 0x00001f21 }, { 0x00000342, 0x00001fc6 }, + { 0x00000345, 0x00001fc3 }, { 0x00000300, 0x00001f76 }, + { 0x00000301, 0x000003af }, { 0x00000304, 0x00001fd1 }, + { 0x00000306, 0x00001fd0 }, { 0x00000308, 0x000003ca }, + { 0x00000313, 0x00001f30 }, { 0x00000314, 0x00001f31 }, + { 0x00000342, 0x00001fd6 }, { 0x00000300, 0x00001f78 }, + { 0x00000301, 0x000003cc }, { 0x00000313, 0x00001f40 }, + { 0x00000314, 0x00001f41 }, { 0x00000313, 0x00001fe4 }, + { 0x00000314, 0x00001fe5 }, { 0x00000300, 0x00001f7a }, + { 0x00000301, 0x000003cd }, { 0x00000304, 0x00001fe1 }, + { 0x00000306, 0x00001fe0 }, { 0x00000308, 0x000003cb }, + { 0x00000313, 0x00001f50 }, { 0x00000314, 0x00001f51 }, + { 0x00000342, 0x00001fe6 }, { 0x00000300, 0x00001f7c }, + { 0x00000301, 0x000003ce }, { 0x00000313, 0x00001f60 }, + { 0x00000314, 0x00001f61 }, { 0x00000342, 0x00001ff6 }, + { 0x00000345, 0x00001ff3 }, { 0x00000300, 0x00001fd2 }, + { 0x00000301, 0x00000390 }, { 0x00000342, 0x00001fd7 }, + { 0x00000300, 0x00001fe2 }, { 0x00000301, 0x000003b0 }, + { 0x00000342, 0x00001fe7 }, { 0x00000345, 0x00001ff4 }, + { 0x00000301, 0x000003d3 }, { 0x00000308, 0x000003d4 }, + { 0x00000308, 0x00000407 }, { 0x00000306, 0x000004d0 }, + { 0x00000308, 0x000004d2 }, { 0x00000301, 0x00000403 }, + { 0x00000300, 0x00000400 }, { 0x00000306, 0x000004d6 }, + { 0x00000308, 0x00000401 }, { 0x00000306, 0x000004c1 }, + { 0x00000308, 0x000004dc }, { 0x00000308, 0x000004de }, + { 0x00000300, 0x0000040d }, { 0x00000304, 0x000004e2 }, + { 0x00000306, 0x00000419 }, { 0x00000308, 0x000004e4 }, + { 0x00000301, 0x0000040c }, { 0x00000308, 0x000004e6 }, + { 0x00000304, 0x000004ee }, { 0x00000306, 0x0000040e }, + { 0x00000308, 0x000004f0 }, { 0x0000030b, 0x000004f2 }, + { 0x00000308, 0x000004f4 }, { 0x00000308, 0x000004f8 }, + { 0x00000308, 0x000004ec }, { 0x00000306, 0x000004d1 }, + { 0x00000308, 0x000004d3 }, { 0x00000301, 0x00000453 }, + { 0x00000300, 0x00000450 }, { 0x00000306, 0x000004d7 }, + { 0x00000308, 0x00000451 }, { 0x00000306, 0x000004c2 }, + { 0x00000308, 0x000004dd }, { 0x00000308, 0x000004df }, + { 0x00000300, 0x0000045d }, { 0x00000304, 0x000004e3 }, + { 0x00000306, 0x00000439 }, { 0x00000308, 0x000004e5 }, + { 0x00000301, 0x0000045c }, { 0x00000308, 0x000004e7 }, + { 0x00000304, 0x000004ef }, { 0x00000306, 0x0000045e }, + { 0x00000308, 0x000004f1 }, { 0x0000030b, 0x000004f3 }, + { 0x00000308, 0x000004f5 }, { 0x00000308, 0x000004f9 }, + { 0x00000308, 0x000004ed }, { 0x00000308, 0x00000457 }, + { 0x0000030f, 0x00000476 }, { 0x0000030f, 0x00000477 }, + { 0x00000308, 0x000004da }, { 0x00000308, 0x000004db }, + { 0x00000308, 0x000004ea }, { 0x00000308, 0x000004eb }, + { 0x00000653, 0x00000622 }, { 0x00000654, 0x00000623 }, + { 0x00000655, 0x00000625 }, { 0x00000654, 0x00000624 }, + { 0x00000654, 0x00000626 }, { 0x00000654, 0x000006c2 }, + { 0x00000654, 0x000006d3 }, { 0x00000654, 0x000006c0 }, + { 0x0000093c, 0x00000929 }, { 0x0000093c, 0x00000931 }, + { 0x0000093c, 0x00000934 }, { 0x000009be, 0x000009cb }, + { 0x000009d7, 0x000009cc }, { 0x00000b3e, 0x00000b4b }, + { 0x00000b56, 0x00000b48 }, { 0x00000b57, 0x00000b4c }, + { 0x00000bd7, 0x00000b94 }, { 0x00000bbe, 0x00000bca }, + { 0x00000bd7, 0x00000bcc }, { 0x00000bbe, 0x00000bcb }, + { 0x00000c56, 0x00000c48 }, { 0x00000cd5, 0x00000cc0 }, + { 0x00000cc2, 0x00000cca }, { 0x00000cd5, 0x00000cc7 }, + { 0x00000cd6, 0x00000cc8 }, { 0x00000cd5, 0x00000ccb }, + { 0x00000d3e, 0x00000d4a }, { 0x00000d57, 0x00000d4c }, + { 0x00000d3e, 0x00000d4b }, { 0x00000dca, 0x00000dda }, + { 0x00000dcf, 0x00000ddc }, { 0x00000ddf, 0x00000dde }, + { 0x00000dca, 0x00000ddd }, { 0x0000102e, 0x00001026 }, + { 0x00000304, 0x00001e38 }, { 0x00000304, 0x00001e39 }, + { 0x00000304, 0x00001e5c }, { 0x00000304, 0x00001e5d }, + { 0x00000307, 0x00001e68 }, { 0x00000307, 0x00001e69 }, + { 0x00000302, 0x00001eac }, { 0x00000306, 0x00001eb6 }, + { 0x00000302, 0x00001ead }, { 0x00000306, 0x00001eb7 }, + { 0x00000302, 0x00001ec6 }, { 0x00000302, 0x00001ec7 }, + { 0x00000302, 0x00001ed8 }, { 0x00000302, 0x00001ed9 }, + { 0x00000300, 0x00001f02 }, { 0x00000301, 0x00001f04 }, + { 0x00000342, 0x00001f06 }, { 0x00000345, 0x00001f80 }, + { 0x00000300, 0x00001f03 }, { 0x00000301, 0x00001f05 }, + { 0x00000342, 0x00001f07 }, { 0x00000345, 0x00001f81 }, + { 0x00000345, 0x00001f82 }, { 0x00000345, 0x00001f83 }, + { 0x00000345, 0x00001f84 }, { 0x00000345, 0x00001f85 }, + { 0x00000345, 0x00001f86 }, { 0x00000345, 0x00001f87 }, + { 0x00000300, 0x00001f0a }, { 0x00000301, 0x00001f0c }, + { 0x00000342, 0x00001f0e }, { 0x00000345, 0x00001f88 }, + { 0x00000300, 0x00001f0b }, { 0x00000301, 0x00001f0d }, + { 0x00000342, 0x00001f0f }, { 0x00000345, 0x00001f89 }, + { 0x00000345, 0x00001f8a }, { 0x00000345, 0x00001f8b }, + { 0x00000345, 0x00001f8c }, { 0x00000345, 0x00001f8d }, + { 0x00000345, 0x00001f8e }, { 0x00000345, 0x00001f8f }, + { 0x00000300, 0x00001f12 }, { 0x00000301, 0x00001f14 }, + { 0x00000300, 0x00001f13 }, { 0x00000301, 0x00001f15 }, + { 0x00000300, 0x00001f1a }, { 0x00000301, 0x00001f1c }, + { 0x00000300, 0x00001f1b }, { 0x00000301, 0x00001f1d }, + { 0x00000300, 0x00001f22 }, { 0x00000301, 0x00001f24 }, + { 0x00000342, 0x00001f26 }, { 0x00000345, 0x00001f90 }, + { 0x00000300, 0x00001f23 }, { 0x00000301, 0x00001f25 }, + { 0x00000342, 0x00001f27 }, { 0x00000345, 0x00001f91 }, + { 0x00000345, 0x00001f92 }, { 0x00000345, 0x00001f93 }, + { 0x00000345, 0x00001f94 }, { 0x00000345, 0x00001f95 }, + { 0x00000345, 0x00001f96 }, { 0x00000345, 0x00001f97 }, + { 0x00000300, 0x00001f2a }, { 0x00000301, 0x00001f2c }, + { 0x00000342, 0x00001f2e }, { 0x00000345, 0x00001f98 }, + { 0x00000300, 0x00001f2b }, { 0x00000301, 0x00001f2d }, + { 0x00000342, 0x00001f2f }, { 0x00000345, 0x00001f99 }, + { 0x00000345, 0x00001f9a }, { 0x00000345, 0x00001f9b }, + { 0x00000345, 0x00001f9c }, { 0x00000345, 0x00001f9d }, + { 0x00000345, 0x00001f9e }, { 0x00000345, 0x00001f9f }, + { 0x00000300, 0x00001f32 }, { 0x00000301, 0x00001f34 }, + { 0x00000342, 0x00001f36 }, { 0x00000300, 0x00001f33 }, + { 0x00000301, 0x00001f35 }, { 0x00000342, 0x00001f37 }, + { 0x00000300, 0x00001f3a }, { 0x00000301, 0x00001f3c }, + { 0x00000342, 0x00001f3e }, { 0x00000300, 0x00001f3b }, + { 0x00000301, 0x00001f3d }, { 0x00000342, 0x00001f3f }, + { 0x00000300, 0x00001f42 }, { 0x00000301, 0x00001f44 }, + { 0x00000300, 0x00001f43 }, { 0x00000301, 0x00001f45 }, + { 0x00000300, 0x00001f4a }, { 0x00000301, 0x00001f4c }, + { 0x00000300, 0x00001f4b }, { 0x00000301, 0x00001f4d }, + { 0x00000300, 0x00001f52 }, { 0x00000301, 0x00001f54 }, + { 0x00000342, 0x00001f56 }, { 0x00000300, 0x00001f53 }, + { 0x00000301, 0x00001f55 }, { 0x00000342, 0x00001f57 }, + { 0x00000300, 0x00001f5b }, { 0x00000301, 0x00001f5d }, + { 0x00000342, 0x00001f5f }, { 0x00000300, 0x00001f62 }, + { 0x00000301, 0x00001f64 }, { 0x00000342, 0x00001f66 }, + { 0x00000345, 0x00001fa0 }, { 0x00000300, 0x00001f63 }, + { 0x00000301, 0x00001f65 }, { 0x00000342, 0x00001f67 }, + { 0x00000345, 0x00001fa1 }, { 0x00000345, 0x00001fa2 }, + { 0x00000345, 0x00001fa3 }, { 0x00000345, 0x00001fa4 }, + { 0x00000345, 0x00001fa5 }, { 0x00000345, 0x00001fa6 }, + { 0x00000345, 0x00001fa7 }, { 0x00000300, 0x00001f6a }, + { 0x00000301, 0x00001f6c }, { 0x00000342, 0x00001f6e }, + { 0x00000345, 0x00001fa8 }, { 0x00000300, 0x00001f6b }, + { 0x00000301, 0x00001f6d }, { 0x00000342, 0x00001f6f }, + { 0x00000345, 0x00001fa9 }, { 0x00000345, 0x00001faa }, + { 0x00000345, 0x00001fab }, { 0x00000345, 0x00001fac }, + { 0x00000345, 0x00001fad }, { 0x00000345, 0x00001fae }, + { 0x00000345, 0x00001faf }, { 0x00000345, 0x00001fb2 }, + { 0x00000345, 0x00001fc2 }, { 0x00000345, 0x00001ff2 }, + { 0x00000345, 0x00001fb7 }, { 0x00000300, 0x00001fcd }, + { 0x00000301, 0x00001fce }, { 0x00000342, 0x00001fcf }, + { 0x00000345, 0x00001fc7 }, { 0x00000345, 0x00001ff7 }, + { 0x00000300, 0x00001fdd }, { 0x00000301, 0x00001fde }, + { 0x00000342, 0x00001fdf }, { 0x00000338, 0x0000219a }, + { 0x00000338, 0x0000219b }, { 0x00000338, 0x000021ae }, + { 0x00000338, 0x000021cd }, { 0x00000338, 0x000021cf }, + { 0x00000338, 0x000021ce }, { 0x00000338, 0x00002204 }, + { 0x00000338, 0x00002209 }, { 0x00000338, 0x0000220c }, + { 0x00000338, 0x00002224 }, { 0x00000338, 0x00002226 }, + { 0x00000338, 0x00002241 }, { 0x00000338, 0x00002244 }, + { 0x00000338, 0x00002247 }, { 0x00000338, 0x00002249 }, + { 0x00000338, 0x0000226d }, { 0x00000338, 0x00002262 }, + { 0x00000338, 0x00002270 }, { 0x00000338, 0x00002271 }, + { 0x00000338, 0x00002274 }, { 0x00000338, 0x00002275 }, + { 0x00000338, 0x00002278 }, { 0x00000338, 0x00002279 }, + { 0x00000338, 0x00002280 }, { 0x00000338, 0x00002281 }, + { 0x00000338, 0x000022e0 }, { 0x00000338, 0x000022e1 }, + { 0x00000338, 0x00002284 }, { 0x00000338, 0x00002285 }, + { 0x00000338, 0x00002288 }, { 0x00000338, 0x00002289 }, + { 0x00000338, 0x000022e2 }, { 0x00000338, 0x000022e3 }, + { 0x00000338, 0x000022ac }, { 0x00000338, 0x000022ad }, + { 0x00000338, 0x000022ae }, { 0x00000338, 0x000022af }, + { 0x00000338, 0x000022ea }, { 0x00000338, 0x000022eb }, + { 0x00000338, 0x000022ec }, { 0x00000338, 0x000022ed }, + { 0x00003099, 0x00003094 }, { 0x00003099, 0x0000304c }, + { 0x00003099, 0x0000304e }, { 0x00003099, 0x00003050 }, + { 0x00003099, 0x00003052 }, { 0x00003099, 0x00003054 }, + { 0x00003099, 0x00003056 }, { 0x00003099, 0x00003058 }, + { 0x00003099, 0x0000305a }, { 0x00003099, 0x0000305c }, + { 0x00003099, 0x0000305e }, { 0x00003099, 0x00003060 }, + { 0x00003099, 0x00003062 }, { 0x00003099, 0x00003065 }, + { 0x00003099, 0x00003067 }, { 0x00003099, 0x00003069 }, + { 0x00003099, 0x00003070 }, { 0x0000309a, 0x00003071 }, + { 0x00003099, 0x00003073 }, { 0x0000309a, 0x00003074 }, + { 0x00003099, 0x00003076 }, { 0x0000309a, 0x00003077 }, + { 0x00003099, 0x00003079 }, { 0x0000309a, 0x0000307a }, + { 0x00003099, 0x0000307c }, { 0x0000309a, 0x0000307d }, + { 0x00003099, 0x0000309e }, { 0x00003099, 0x000030f4 }, + { 0x00003099, 0x000030ac }, { 0x00003099, 0x000030ae }, + { 0x00003099, 0x000030b0 }, { 0x00003099, 0x000030b2 }, + { 0x00003099, 0x000030b4 }, { 0x00003099, 0x000030b6 }, + { 0x00003099, 0x000030b8 }, { 0x00003099, 0x000030ba }, + { 0x00003099, 0x000030bc }, { 0x00003099, 0x000030be }, + { 0x00003099, 0x000030c0 }, { 0x00003099, 0x000030c2 }, + { 0x00003099, 0x000030c5 }, { 0x00003099, 0x000030c7 }, + { 0x00003099, 0x000030c9 }, { 0x00003099, 0x000030d0 }, + { 0x0000309a, 0x000030d1 }, { 0x00003099, 0x000030d3 }, + { 0x0000309a, 0x000030d4 }, { 0x00003099, 0x000030d6 }, + { 0x0000309a, 0x000030d7 }, { 0x00003099, 0x000030d9 }, + { 0x0000309a, 0x000030da }, { 0x00003099, 0x000030dc }, + { 0x0000309a, 0x000030dd }, { 0x00003099, 0x000030f7 }, + { 0x00003099, 0x000030f8 }, { 0x00003099, 0x000030f9 }, + { 0x00003099, 0x000030fa }, { 0x00003099, 0x000030fe }, +}; + + +/* + * Canonical/Compatibility Decomposition + */ + +#define DECOMP_BITS_0 9 +#define DECOMP_BITS_1 7 +#define DECOMP_BITS_2 5 +#define DECOMP_COMPAT 32768 + +static const unsigned short v320_decompose_imap[] = { + 272, 400, 528, 656, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 912, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 1040, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 1168, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 0, 0, 0, 0, 0, 1, 2, 3, + 4, 5, 6, 7, 0, 8, 9, 10, + 11, 12, 0, 0, 0, 13, 14, 15, + 0, 0, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 0, 0, 26, 27, + 0, 0, 0, 0, 28, 0, 0, 0, + 0, 29, 0, 30, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 33, 0, 0, 0, 34, 0, + 0, 35, 36, 0, 0, 0, 0, 0, + 0, 0, 37, 0, 38, 0, 39, 0, + 0, 0, 40, 0, 0, 0, 41, 0, + 0, 0, 42, 0, 0, 0, 43, 0, + 0, 44, 0, 0, 0, 45, 46, 0, + 47, 0, 48, 49, 50, 51, 0, 0, + 0, 52, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 0, 0, + 75, 76, 77, 78, 79, 80, 81, 0, + 82, 83, 84, 85, 86, 87, 0, 88, + 0, 89, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 90, 91, 92, 93, 94, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 95, 0, 0, 96, 0, 0, 97, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 98, 0, 0, 99, + 100, 101, 102, 103, 104, 105, 106, 0, + 107, 108, 109, 110, 111, 112, 113, 114, + 0, 115, 116, 117, 118, 0, 0, 0, + 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, + 0, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 186, 187, 0, 188, 189, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, + 238, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned short tbl[32]; +} v320_decompose_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 32769, 0, 0, 0, 0, 0, 0, 0, + 32770, 0, 32772, 0, 0, 0, 0, 32773, + 0, 0, 32775, 32776, 32777, 32779, 0, 0, + 32780, 32782, 32783, 0, 32784, 32787, 32790, 0, + }}, + {{ + 25, 27, 29, 31, 33, 35, 0, 37, + 39, 41, 43, 45, 47, 49, 51, 53, + 0, 55, 57, 59, 61, 63, 65, 0, + 0, 67, 69, 71, 73, 75, 0, 0, + }}, + {{ + 77, 79, 81, 83, 85, 87, 0, 89, + 91, 93, 95, 97, 99, 101, 103, 105, + 0, 107, 109, 111, 113, 115, 117, 0, + 0, 119, 121, 123, 125, 127, 0, 129, + }}, + {{ + 131, 133, 135, 137, 139, 141, 143, 145, + 147, 149, 151, 153, 155, 157, 159, 161, + 0, 0, 163, 165, 167, 169, 171, 173, + 175, 177, 179, 181, 183, 185, 187, 189, + }}, + {{ + 191, 193, 195, 197, 199, 201, 0, 0, + 203, 205, 207, 209, 211, 213, 215, 217, + 219, 0, 32989, 32991, 225, 227, 229, 231, + 0, 233, 235, 237, 239, 241, 243, 33013, + }}, + {{ + 33015, 0, 0, 249, 251, 253, 255, 257, + 259, 33029, 0, 0, 263, 265, 267, 269, + 271, 273, 0, 0, 275, 277, 279, 281, + 283, 285, 287, 289, 291, 293, 295, 297, + }}, + {{ + 299, 301, 303, 305, 307, 309, 0, 0, + 311, 313, 315, 317, 319, 321, 323, 325, + 327, 329, 331, 333, 335, 337, 339, 341, + 343, 345, 347, 349, 351, 353, 355, 33125, + }}, + {{ + 358, 360, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 362, + 364, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 33134, 33136, 33138, 33140, + 33142, 33144, 33146, 33148, 33150, 384, 386, 388, + 390, 392, 394, 396, 398, 400, 402, 404, + 406, 408, 410, 412, 414, 0, 416, 418, + }}, + {{ + 420, 422, 424, 426, 0, 0, 428, 430, + 432, 434, 436, 438, 440, 442, 444, 446, + 448, 33218, 33220, 33222, 456, 458, 0, 0, + 460, 462, 464, 466, 468, 470, 472, 474, + }}, + {{ + 476, 478, 480, 482, 484, 486, 488, 490, + 492, 494, 496, 498, 500, 502, 504, 506, + 508, 510, 512, 514, 516, 518, 520, 522, + 524, 526, 528, 530, 0, 0, 532, 534, + }}, + {{ + 0, 0, 0, 0, 0, 0, 536, 538, + 540, 542, 544, 546, 548, 550, 552, 554, + 556, 558, 560, 562, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33332, 33333, 33334, 33335, 33336, 33337, 33338, 33339, + 33340, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33341, 33343, 33345, 33347, 33349, 33351, 0, 0, + }}, + {{ + 33353, 33354, 33355, 33356, 33357, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 590, 591, 0, 592, 593, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 595, 0, 0, 0, + 0, 0, 33364, 0, 0, 0, 598, 0, + }}, + {{ + 0, 0, 0, 0, 33367, 601, 603, 605, + 606, 608, 610, 0, 612, 0, 614, 616, + 618, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 620, 622, 624, 626, 628, 630, + 632, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 634, 636, 638, 640, 642, 0, + 33412, 33413, 33414, 647, 649, 33419, 33420, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33421, 33422, 33423, 0, 33424, 33425, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 658, 660, 0, 662, 0, 0, 0, 664, + 0, 0, 0, 0, 666, 668, 670, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 672, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 674, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 676, 678, 0, 680, 0, 0, 0, 682, + 0, 0, 0, 0, 684, 686, 688, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 690, 692, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 694, 696, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 698, 700, 702, 704, 0, 0, 706, 708, + 0, 0, 710, 712, 714, 716, 718, 720, + }}, + {{ + 0, 0, 722, 724, 726, 728, 730, 732, + 0, 0, 734, 736, 738, 740, 742, 744, + 746, 748, 750, 752, 754, 756, 0, 0, + 758, 760, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 33530, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 764, 766, 768, 770, 772, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 33542, 33544, 33546, + 33548, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 782, 0, 784, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 788, 0, 0, 0, 0, 0, 0, + 0, 790, 0, 0, 792, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 794, 796, 798, 800, 802, 804, 806, 808, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 810, 812, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 814, 816, 0, 818, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 820, 0, 0, 822, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 824, 826, 828, 0, 0, 830, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 832, 0, 0, 834, 836, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 838, 840, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 842, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 844, 846, 848, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 850, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 852, 0, 0, 0, 0, 0, 0, 854, + 856, 0, 858, 860, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 862, 864, 866, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 868, 0, 870, 872, 874, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 33644, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 33646, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33648, 33650, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33652, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 885, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 887, 0, 0, + 0, 0, 889, 0, 0, 0, 0, 891, + 0, 0, 0, 0, 893, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 895, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 897, 0, 899, 901, 33671, + 905, 33675, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 909, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 911, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 913, 0, 0, + }}, + {{ + 0, 0, 915, 0, 0, 0, 0, 917, + 0, 0, 0, 0, 919, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 921, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 923, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 925, 927, 929, 931, 933, 935, 937, 939, + 941, 943, 945, 947, 949, 951, 953, 955, + 957, 959, 961, 963, 965, 967, 969, 971, + 973, 975, 977, 979, 981, 983, 985, 987, + }}, + {{ + 989, 991, 993, 995, 997, 999, 1001, 1003, + 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, + 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, + 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, + }}, + {{ + 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, + 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, + 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, + 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, + }}, + {{ + 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, + 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, + 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, + 1165, 1167, 1169, 1171, 1173, 1175, 1177, 1179, + }}, + {{ + 1181, 1183, 1185, 1187, 1189, 1191, 1193, 1195, + 1197, 1199, 1201, 1203, 1205, 1207, 1209, 1211, + 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, + 1229, 1231, 34001, 1235, 0, 0, 0, 0, + }}, + {{ + 1237, 1239, 1241, 1243, 1245, 1247, 1249, 1251, + 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, + 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, + 1285, 1287, 1289, 1291, 1293, 1295, 1297, 1299, + }}, + {{ + 1301, 1303, 1305, 1307, 1309, 1311, 1313, 1315, + 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, + 1333, 1335, 1337, 1339, 1341, 1343, 1345, 1347, + 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, + }}, + {{ + 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, + 1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, + 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, + 1413, 1415, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, + 1433, 1435, 1437, 1439, 1441, 1443, 1445, 1447, + 1449, 1451, 1453, 1455, 1457, 1459, 0, 0, + 1461, 1463, 1465, 1467, 1469, 1471, 0, 0, + }}, + {{ + 1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, + 1489, 1491, 1493, 1495, 1497, 1499, 1501, 1503, + 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, + 1521, 1523, 1525, 1527, 1529, 1531, 1533, 1535, + }}, + {{ + 1537, 1539, 1541, 1543, 1545, 1547, 0, 0, + 1549, 1551, 1553, 1555, 1557, 1559, 0, 0, + 1561, 1563, 1565, 1567, 1569, 1571, 1573, 1575, + 0, 1577, 0, 1579, 0, 1581, 0, 1583, + }}, + {{ + 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599, + 1601, 1603, 1605, 1607, 1609, 1611, 1613, 1615, + 1617, 1619, 1620, 1622, 1623, 1625, 1626, 1628, + 1629, 1631, 1632, 1634, 1635, 1637, 0, 0, + }}, + {{ + 1638, 1640, 1642, 1644, 1646, 1648, 1650, 1652, + 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, + 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, + 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700, + }}, + {{ + 1702, 1704, 1706, 1708, 1710, 1712, 1714, 1716, + 1718, 1720, 1722, 1724, 1726, 1728, 1730, 1732, + 1734, 1736, 1738, 1740, 1742, 0, 1744, 1746, + 1748, 1750, 1752, 1754, 1755, 34525, 1759, 34528, + }}, + {{ + 34530, 1764, 1766, 1768, 1770, 0, 1772, 1774, + 1776, 1778, 1779, 1781, 1782, 1784, 1786, 1788, + 1790, 1792, 1794, 1796, 0, 0, 1797, 1799, + 1801, 1803, 1805, 1807, 0, 1808, 1810, 1812, + }}, + {{ + 1814, 1816, 1818, 1820, 1821, 1823, 1825, 1827, + 1829, 1831, 1833, 1835, 1836, 1838, 1840, 1841, + 0, 0, 1842, 1844, 1846, 0, 1848, 1850, + 1852, 1854, 1855, 1857, 1858, 1860, 34629, 0, + }}, + {{ + 1863, 1864, 34633, 34634, 34635, 34636, 34637, 34638, + 34639, 34640, 34641, 0, 0, 0, 0, 0, + 0, 34642, 0, 0, 0, 0, 0, 34643, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 34645, 34646, 34648, 0, + 0, 0, 0, 0, 0, 0, 0, 34651, + 0, 0, 0, 34652, 34654, 0, 34657, 34659, + 0, 0, 0, 0, 34662, 0, 34664, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 34666, + 34668, 34670, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34672, + 0, 0, 0, 0, 0, 0, 0, 34676, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 34677, 34678, 0, 0, 34679, 34680, 34681, 34682, + 34683, 34684, 34685, 34686, 34687, 34688, 34689, 34690, + }}, + {{ + 34691, 34692, 34693, 34694, 34695, 34696, 34697, 34698, + 34699, 34700, 34701, 34702, 34703, 34704, 34705, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 34706, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 34708, 34711, 34714, 34715, 0, 34717, 34720, 34723, + 0, 34724, 34726, 34727, 34728, 34729, 34730, 34731, + 34732, 34733, 34734, 34735, 0, 34736, 34737, 0, + 0, 34739, 34740, 34741, 34742, 34743, 0, 0, + }}, + {{ + 34744, 34746, 34749, 0, 34751, 0, 1984, 0, + 34753, 0, 1986, 1987, 34756, 34757, 0, 34758, + 34759, 34760, 0, 34761, 34762, 34763, 34764, 34765, + 34766, 34767, 0, 0, 0, 34768, 34769, 34770, + }}, + {{ + 34771, 0, 0, 0, 0, 34772, 34773, 34774, + 34775, 34776, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 34777, 34780, 34783, 34786, 34789, + 34792, 34795, 34798, 34801, 34804, 34807, 34810, 34813, + }}, + {{ + 34815, 34816, 34818, 34821, 34823, 34824, 34826, 34829, + 34833, 34835, 34836, 34838, 34841, 34842, 34843, 34844, + 34845, 34846, 34848, 34851, 34853, 34854, 34856, 34859, + 34863, 34865, 34866, 34868, 34871, 34872, 34873, 34874, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2107, 2109, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2111, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2113, 2115, 2117, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 2119, 0, 0, 0, + 0, 2121, 0, 0, 2123, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 2125, 0, 2127, 0, + 0, 0, 0, 0, 34897, 34899, 0, 34902, + 34904, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2139, 0, 0, 2141, 0, 0, 2143, + 0, 2145, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2147, 0, 2149, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2151, 2153, 2155, + 2157, 2159, 0, 0, 2161, 2163, 0, 0, + 2165, 2167, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2169, 2171, 0, 0, 2173, 2175, 0, 0, + 2177, 2179, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2181, 2183, 2185, 2187, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2189, 2191, 2193, 2195, 0, 0, 0, 0, + 0, 0, 2197, 2199, 2201, 2203, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2205, 2206, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 34975, 34976, 34977, 34978, 34979, 34980, 34981, 34982, + 34983, 34984, 34986, 34988, 34990, 34992, 34994, 34996, + 34998, 35000, 35002, 35004, 35006, 35009, 35012, 35015, + 35018, 35021, 35024, 35027, 35030, 35033, 35037, 35041, + }}, + {{ + 35045, 35049, 35053, 35057, 35061, 35065, 35069, 35073, + 35077, 35079, 35081, 35083, 35085, 35087, 35089, 35091, + 35093, 35095, 35098, 35101, 35104, 35107, 35110, 35113, + 35116, 35119, 35122, 35125, 35128, 35131, 35134, 35137, + }}, + {{ + 35140, 35143, 35146, 35149, 35152, 35155, 35158, 35161, + 35164, 35167, 35170, 35173, 35176, 35179, 35182, 35185, + 35188, 35191, 35194, 35197, 35200, 35203, 35206, 35207, + 35208, 35209, 35210, 35211, 35212, 35213, 35214, 35215, + }}, + {{ + 35216, 35217, 35218, 35219, 35220, 35221, 35222, 35223, + 35224, 35225, 35226, 35227, 35228, 35229, 35230, 35231, + 35232, 35233, 35234, 35235, 35236, 35237, 35238, 35239, + 35240, 35241, 35242, 35243, 35244, 35245, 35246, 35247, + }}, + {{ + 35248, 35249, 35250, 35251, 35252, 35253, 35254, 35255, + 35256, 35257, 35258, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 35259, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 35263, 35266, 35268, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2503, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 35273, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 35274, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 35275, 35276, 35277, 35278, 35279, 35280, 35281, 35282, + 35283, 35284, 35285, 35286, 35287, 35288, 35289, 35290, + 35291, 35292, 35293, 35294, 35295, 35296, 35297, 35298, + 35299, 35300, 35301, 35302, 35303, 35304, 35305, 35306, + }}, + {{ + 35307, 35308, 35309, 35310, 35311, 35312, 35313, 35314, + 35315, 35316, 35317, 35318, 35319, 35320, 35321, 35322, + 35323, 35324, 35325, 35326, 35327, 35328, 35329, 35330, + 35331, 35332, 35333, 35334, 35335, 35336, 35337, 35338, + }}, + {{ + 35339, 35340, 35341, 35342, 35343, 35344, 35345, 35346, + 35347, 35348, 35349, 35350, 35351, 35352, 35353, 35354, + 35355, 35356, 35357, 35358, 35359, 35360, 35361, 35362, + 35363, 35364, 35365, 35366, 35367, 35368, 35369, 35370, + }}, + {{ + 35371, 35372, 35373, 35374, 35375, 35376, 35377, 35378, + 35379, 35380, 35381, 35382, 35383, 35384, 35385, 35386, + 35387, 35388, 35389, 35390, 35391, 35392, 35393, 35394, + 35395, 35396, 35397, 35398, 35399, 35400, 35401, 35402, + }}, + {{ + 35403, 35404, 35405, 35406, 35407, 35408, 35409, 35410, + 35411, 35412, 35413, 35414, 35415, 35416, 35417, 35418, + 35419, 35420, 35421, 35422, 35423, 35424, 35425, 35426, + 35427, 35428, 35429, 35430, 35431, 35432, 35433, 35434, + }}, + {{ + 35435, 35436, 35437, 35438, 35439, 35440, 35441, 35442, + 35443, 35444, 35445, 35446, 35447, 35448, 35449, 35450, + 35451, 35452, 35453, 35454, 35455, 35456, 35457, 35458, + 35459, 35460, 35461, 35462, 35463, 35464, 35465, 35466, + }}, + {{ + 35467, 35468, 35469, 35470, 35471, 35472, 35473, 35474, + 35475, 35476, 35477, 35478, 35479, 35480, 35481, 35482, + 35483, 35484, 35485, 35486, 35487, 35488, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 35489, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 35490, 0, + 35491, 35492, 35493, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2726, 0, 2728, 0, + 2730, 0, 2732, 0, 2734, 0, 2736, 0, + 2738, 0, 2740, 0, 2742, 0, 2744, 0, + }}, + {{ + 2746, 0, 2748, 0, 0, 2750, 0, 2752, + 0, 2754, 0, 0, 0, 0, 0, 0, + 2756, 2758, 0, 2760, 2762, 0, 2764, 2766, + 0, 2768, 2770, 0, 2772, 2774, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2776, 0, 0, 0, + 0, 0, 0, 35546, 35548, 0, 2782, 35552, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2786, 0, 2788, 0, + 2790, 0, 2792, 0, 2794, 0, 2796, 0, + 2798, 0, 2800, 0, 2802, 0, 2804, 0, + }}, + {{ + 2806, 0, 2808, 0, 0, 2810, 0, 2812, + 0, 2814, 0, 0, 0, 0, 0, 0, + 2816, 2818, 0, 2820, 2822, 0, 2824, 2826, + 0, 2828, 2830, 0, 2832, 2834, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2836, 0, 0, 2838, + 2840, 2842, 2844, 0, 0, 0, 2846, 35616, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 35618, 35619, 35620, 35621, 35622, 35623, 35624, + 35625, 35626, 35627, 35628, 35629, 35630, 35631, 35632, + }}, + {{ + 35633, 35634, 35635, 35636, 35637, 35638, 35639, 35640, + 35641, 35642, 35643, 35644, 35645, 35646, 35647, 35648, + 35649, 35650, 35651, 35652, 35653, 35654, 35655, 35656, + 35657, 35658, 35659, 35660, 35661, 35662, 35663, 35664, + }}, + {{ + 35665, 35666, 35667, 35668, 35669, 35670, 35671, 35672, + 35673, 35674, 35675, 35676, 35677, 35678, 35679, 35680, + 35681, 35682, 35683, 35684, 35685, 35686, 35687, 35688, + 35689, 35690, 35691, 35692, 35693, 35694, 35695, 35696, + }}, + {{ + 35697, 35698, 35699, 35700, 35701, 35702, 35703, 35704, + 35705, 35706, 35707, 35708, 35709, 35710, 35711, 0, + 0, 0, 35712, 35713, 35714, 35715, 35716, 35717, + 35718, 35719, 35720, 35721, 35722, 35723, 35724, 35725, + }}, + {{ + 35726, 35729, 35732, 35735, 35738, 35741, 35744, 35747, + 35750, 35753, 35756, 35759, 35762, 35765, 35768, 35772, + 35776, 35780, 35784, 35788, 35792, 35796, 35800, 35804, + 35808, 35812, 35816, 35820, 35824, 0, 0, 0, + }}, + {{ + 35828, 35831, 35834, 35837, 35840, 35843, 35846, 35849, + 35852, 35855, 35858, 35861, 35864, 35867, 35870, 35873, + 35876, 35879, 35882, 35885, 35888, 35891, 35894, 35897, + 35900, 35903, 35906, 35909, 35912, 35915, 35918, 35921, + }}, + {{ + 35924, 35927, 35930, 35933, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 35936, 35938, 35940, 35942, 35944, 35946, 35948, + 35950, 35952, 35954, 35956, 35958, 35960, 35962, 35964, + }}, + {{ + 35966, 35967, 35968, 35969, 35970, 35971, 35972, 35973, + 35974, 35975, 35976, 35977, 35978, 35979, 35980, 35982, + 35984, 35986, 35988, 35990, 35992, 35994, 35996, 35998, + 36000, 36002, 36004, 36006, 0, 0, 0, 0, + }}, + {{ + 36008, 36009, 36010, 36011, 36012, 36013, 36014, 36015, + 36016, 36017, 36018, 36019, 36020, 36021, 36022, 36023, + 36024, 36025, 36026, 36027, 36028, 36029, 36030, 36031, + 36032, 36033, 36034, 36035, 36036, 36037, 36038, 36039, + }}, + {{ + 36040, 36041, 36042, 36043, 36044, 36045, 36046, 36047, + 36048, 36049, 36050, 36051, 36052, 36053, 36054, 36055, + 36056, 36057, 36059, 36061, 36063, 36065, 36067, 36069, + 36071, 36073, 36075, 36077, 36079, 36081, 36083, 36085, + }}, + {{ + 36087, 36089, 36091, 36093, 36095, 36097, 36099, 36101, + 36103, 36105, 36108, 36111, 0, 0, 0, 0, + 36114, 36115, 36116, 36117, 36118, 36119, 36120, 36121, + 36122, 36123, 36124, 36125, 36126, 36127, 36128, 36129, + }}, + {{ + 36130, 36131, 36132, 36133, 36134, 36135, 36136, 36137, + 36138, 36139, 36140, 36141, 36142, 36143, 36144, 36145, + 36146, 36147, 36148, 36149, 36150, 36151, 36152, 36153, + 36154, 36155, 36156, 36157, 36158, 36159, 36160, 0, + }}, + {{ + 36161, 36165, 36169, 36173, 36176, 36180, 36183, 36186, + 36191, 36195, 36198, 36201, 36204, 36208, 36212, 36215, + 36218, 36220, 36223, 36227, 36231, 36233, 36238, 36244, + 36249, 36252, 36257, 36262, 36266, 36269, 36272, 36275, + }}, + {{ + 36279, 36284, 36288, 36291, 36294, 36297, 36299, 36301, + 36303, 36305, 36308, 36311, 36316, 36319, 36323, 36328, + 36331, 36333, 36335, 36340, 36344, 36349, 36352, 36357, + 36359, 36362, 36365, 36368, 36371, 36374, 36378, 36381, + }}, + {{ + 36383, 36386, 36389, 36392, 36396, 36399, 36402, 36405, + 36410, 36414, 36416, 36421, 36423, 36427, 36431, 36434, + 36437, 36440, 36444, 36446, 36449, 36453, 36455, 36460, + 36463, 36465, 36467, 36469, 36471, 36473, 36475, 36477, + }}, + {{ + 36479, 36481, 36483, 36486, 36489, 36492, 36495, 36498, + 36501, 36504, 36507, 36510, 36513, 36516, 36519, 36522, + 36525, 36528, 36531, 36533, 36535, 36538, 36540, 0, + 0, 0, 0, 36542, 36544, 36546, 36548, 36550, + }}, + {{ + 36554, 36556, 36558, 36560, 36562, 36564, 36566, 36568, + 36570, 36573, 36577, 36579, 36581, 36583, 36585, 36587, + 36589, 36591, 36594, 36597, 36600, 36603, 36605, 36607, + 36609, 36611, 36613, 36615, 36617, 36619, 36621, 36623, + }}, + {{ + 36626, 36629, 36631, 36634, 36637, 36640, 36642, 36645, + 36648, 36652, 36654, 36657, 36660, 36663, 36666, 36671, + 36677, 36679, 36681, 36683, 36685, 36687, 36689, 36691, + 36693, 36695, 36697, 36699, 36701, 36703, 36705, 36707, + }}, + {{ + 36709, 36711, 36713, 36717, 36719, 36721, 36723, 36727, + 36730, 36732, 36734, 36736, 36738, 36740, 36742, 36744, + 36746, 36748, 36750, 36753, 36755, 36757, 36760, 36763, + 36765, 36769, 36772, 36774, 36776, 36778, 0, 0, + }}, + {{ + 36780, 36782, 36784, 36786, 36788, 36790, 36792, 36794, + 36796, 36798, 36801, 36804, 36807, 36810, 36813, 36816, + 36819, 36822, 36825, 36828, 36831, 36834, 36837, 36840, + 36843, 36846, 36849, 36852, 36855, 36858, 36861, 0, + }}, + {{ + 4096, 4097, 4098, 4099, 4100, 4101, 4102, 4103, + 4104, 4105, 4106, 4107, 4108, 4109, 4110, 4111, + 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, + 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, + }}, + {{ + 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, + 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143, + 4144, 4145, 4146, 4147, 4148, 4149, 4150, 4151, + 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, + }}, + {{ + 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, + 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4175, + 4176, 4177, 4178, 4179, 4180, 4181, 4182, 4183, + 4184, 4185, 4186, 4187, 4188, 4189, 4190, 4191, + }}, + {{ + 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, + 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, + 4208, 4209, 4210, 4211, 4212, 4213, 4214, 4215, + 4216, 4217, 4218, 4219, 4220, 4221, 4222, 4223, + }}, + {{ + 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, + 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, + 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, + 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4255, + }}, + {{ + 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, + 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, + 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, + 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, + }}, + {{ + 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, + 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, + 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, + 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, + }}, + {{ + 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, + 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, + 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, + 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, + }}, + {{ + 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, + 4360, 4361, 4362, 4363, 4364, 4365, 0, 0, + 4366, 0, 4367, 0, 0, 4368, 4369, 4370, + 4371, 4372, 4373, 4374, 4375, 4376, 4377, 0, + }}, + {{ + 4378, 0, 4379, 0, 0, 4380, 4381, 0, + 0, 0, 4382, 4383, 4384, 4385, 0, 0, + 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, + 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, + }}, + {{ + 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, + 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, + 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425, + 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4433, + }}, + {{ + 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, + 4442, 4443, 4444, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 37213, 37215, 37217, 37219, 37222, 37225, 37227, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37229, 37231, 37233, 37235, 37237, + 0, 0, 0, 0, 0, 4471, 0, 4473, + }}, + {{ + 37243, 37244, 37245, 37246, 37247, 37248, 37249, 37250, + 37251, 37252, 4485, 4487, 4489, 4491, 4493, 4495, + 4497, 4499, 4501, 4503, 4505, 4507, 4509, 0, + 4511, 4513, 4515, 4517, 4519, 0, 4521, 0, + }}, + {{ + 4523, 4525, 0, 4527, 4529, 0, 4531, 4533, + 4535, 4537, 4539, 4541, 4543, 4545, 4547, 37317, + 37319, 37320, 37321, 37322, 37323, 37324, 37325, 37326, + 37327, 37328, 37329, 37330, 37331, 37332, 37333, 37334, + }}, + {{ + 37335, 37336, 37337, 37338, 37339, 37340, 37341, 37342, + 37343, 37344, 37345, 37346, 37347, 37348, 37349, 37350, + 37351, 37352, 37353, 37354, 37355, 37356, 37357, 37358, + 37359, 37360, 37361, 37362, 37363, 37364, 37365, 37366, + }}, + {{ + 37367, 37368, 37369, 37370, 37371, 37372, 37373, 37374, + 37375, 37376, 37377, 37378, 37379, 37380, 37381, 37382, + 37383, 37384, 37385, 37386, 37387, 37388, 37389, 37390, + 37391, 37392, 37393, 37394, 37395, 37396, 37397, 37398, + }}, + {{ + 37399, 37400, 37401, 37402, 37403, 37404, 37405, 37406, + 37407, 37408, 37409, 37410, 37411, 37412, 37413, 37414, + 37415, 37416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37417, 37418, 37419, 37420, 37421, + 37422, 37423, 37424, 37425, 37426, 37427, 37428, 37429, + }}, + {{ + 37430, 37431, 37432, 37433, 37434, 37435, 37436, 37437, + 37438, 37439, 37440, 37442, 37444, 37446, 37448, 37450, + 37452, 37454, 37456, 37458, 37460, 37462, 37464, 37466, + 37468, 37470, 37472, 37474, 37476, 37477, 37478, 37479, + }}, + {{ + 37480, 37482, 37484, 37486, 37488, 37490, 37492, 37494, + 37496, 37498, 37500, 37502, 37504, 37506, 37508, 37510, + 37512, 37514, 37516, 37518, 37520, 37522, 37524, 37526, + 37528, 37530, 37532, 37534, 37536, 37538, 37540, 37542, + }}, + {{ + 37544, 37546, 37548, 37550, 37552, 37554, 37556, 37558, + 37560, 37562, 37564, 37566, 37568, 37570, 37572, 37574, + 37576, 37578, 37580, 37582, 37584, 37586, 37588, 37590, + 37592, 37594, 37596, 37598, 37600, 37602, 37604, 37606, + }}, + {{ + 37608, 37610, 37612, 37614, 37616, 37618, 37620, 37622, + 37624, 37626, 37628, 37630, 37632, 37634, 37636, 37638, + 37640, 37642, 37644, 37646, 37648, 37650, 37652, 37654, + 37656, 37658, 37660, 37662, 37664, 37666, 37668, 37671, + }}, + {{ + 37674, 37677, 37680, 37683, 37686, 37688, 37690, 37692, + 37694, 37696, 37698, 37700, 37702, 37704, 37706, 37708, + 37710, 37712, 37714, 37716, 37718, 37720, 37722, 37724, + 37726, 37728, 37730, 37732, 37734, 37736, 37738, 37740, + }}, + {{ + 37742, 37744, 37746, 37748, 37750, 37752, 37754, 37756, + 37758, 37760, 37762, 37764, 37766, 37768, 37770, 37772, + 37774, 37776, 37778, 37780, 37782, 37784, 37786, 37788, + 37790, 37792, 37794, 37796, 37798, 37800, 37802, 37804, + }}, + {{ + 37806, 37808, 37810, 37812, 37814, 37816, 37818, 37820, + 37822, 37824, 37826, 37828, 37830, 37832, 37834, 37836, + 37838, 37840, 37842, 37844, 37846, 37848, 37850, 37852, + 37854, 37856, 37858, 37860, 37862, 37864, 37866, 37868, + }}, + {{ + 37870, 37872, 37874, 37876, 37878, 37880, 37882, 37884, + 37886, 37888, 37890, 37892, 37894, 37896, 37898, 37900, + 37902, 37904, 37906, 37908, 37910, 37912, 37914, 37916, + 37918, 37920, 37922, 37924, 37926, 37928, 37930, 37932, + }}, + {{ + 37934, 37936, 37938, 37940, 37942, 37944, 37946, 37948, + 37950, 37952, 37954, 37956, 37958, 37960, 37962, 37964, + 37966, 37968, 37970, 37973, 37976, 37979, 37981, 37983, + 37985, 37987, 37989, 37991, 37993, 37995, 37997, 37999, + }}, + {{ + 38001, 38003, 38005, 38007, 38009, 38011, 38013, 38015, + 38017, 38019, 38021, 38023, 38025, 38027, 38029, 38031, + 38033, 38035, 38037, 38039, 38041, 38043, 38045, 38047, + 38049, 38051, 38053, 38055, 38057, 38059, 38061, 38063, + }}, + {{ + 38065, 38067, 38069, 38071, 38073, 38075, 38077, 38079, + 38081, 38083, 38085, 38087, 38089, 38091, 38093, 38095, + 38097, 38099, 38101, 38103, 38105, 38107, 38109, 38111, + 38113, 38115, 38117, 38119, 38121, 38123, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 38125, 38128, 38131, 38134, 38137, 38140, 38143, 38146, + 38149, 38152, 38155, 38158, 38161, 38164, 38167, 38170, + }}, + {{ + 38173, 38176, 38179, 38182, 38185, 38188, 38191, 38194, + 38197, 38200, 38203, 38206, 38209, 38212, 38215, 38218, + 38221, 38224, 38227, 38230, 38233, 38236, 38239, 38242, + 38245, 38248, 38251, 38254, 38257, 38260, 38263, 38266, + }}, + {{ + 38269, 38272, 38275, 38278, 38281, 38284, 38287, 38290, + 38293, 38296, 38299, 38302, 38305, 38308, 38311, 38314, + 0, 0, 38317, 38320, 38323, 38326, 38329, 38332, + 38335, 38338, 38341, 38344, 38347, 38350, 38353, 38356, + }}, + {{ + 38359, 38362, 38365, 38368, 38371, 38374, 38377, 38380, + 38383, 38386, 38389, 38392, 38395, 38398, 38401, 38404, + 38407, 38410, 38413, 38416, 38419, 38422, 38425, 38428, + 38431, 38434, 38437, 38440, 38443, 38446, 38449, 38452, + }}, + {{ + 38455, 38458, 38461, 38464, 38467, 38470, 38473, 38476, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 38479, 38482, 38485, 38489, 38493, 38497, 38501, 38505, + 38509, 38513, 38516, 38534, 38542, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 38546, 38547, 38548, 38549, 38550, 38551, 38552, 38553, + 38554, 38555, 38556, 38557, 38558, 38559, 38560, 38561, + }}, + {{ + 38562, 38563, 38564, 38565, 38566, 0, 0, 0, + 0, 38567, 38568, 38569, 38570, 38571, 38572, 38573, + 38574, 38575, 38576, 0, 38577, 38578, 38579, 38580, + 38581, 38582, 38583, 38584, 38585, 38586, 38587, 38588, + }}, + {{ + 38589, 38590, 38591, 38592, 38593, 38594, 38595, 0, + 38596, 38597, 38598, 38599, 0, 0, 0, 0, + 38600, 38602, 38604, 0, 38606, 0, 38608, 38610, + 38612, 38614, 38616, 38618, 38620, 38622, 38624, 38626, + }}, + {{ + 38628, 38629, 38630, 38631, 38632, 38633, 38634, 38635, + 38636, 38637, 38638, 38639, 38640, 38641, 38642, 38643, + 38644, 38645, 38646, 38647, 38648, 38649, 38650, 38651, + 38652, 38653, 38654, 38655, 38656, 38657, 38658, 38659, + }}, + {{ + 38660, 38661, 38662, 38663, 38664, 38665, 38666, 38667, + 38668, 38669, 38670, 38671, 38672, 38673, 38674, 38675, + 38676, 38677, 38678, 38679, 38680, 38681, 38682, 38683, + 38684, 38685, 38686, 38687, 38688, 38689, 38690, 38691, + }}, + {{ + 38692, 38693, 38694, 38695, 38696, 38697, 38698, 38699, + 38700, 38701, 38702, 38703, 38704, 38705, 38706, 38707, + 38708, 38709, 38710, 38711, 38712, 38713, 38714, 38715, + 38716, 38717, 38718, 38719, 38720, 38721, 38722, 38723, + }}, + {{ + 38724, 38725, 38726, 38727, 38728, 38729, 38730, 38731, + 38732, 38733, 38734, 38735, 38736, 38737, 38738, 38739, + 38740, 38741, 38742, 38743, 38744, 38745, 38747, 38749, + 38751, 38753, 38755, 38757, 38759, 0, 0, 0, + }}, + {{ + 0, 38761, 38762, 38763, 38764, 38765, 38766, 38767, + 38768, 38769, 38770, 38771, 38772, 38773, 38774, 38775, + 38776, 38777, 38778, 38779, 38780, 38781, 38782, 38783, + 38784, 38785, 38786, 38787, 38788, 38789, 38790, 38791, + }}, + {{ + 38792, 38793, 38794, 38795, 38796, 38797, 38798, 38799, + 38800, 38801, 38802, 38803, 38804, 38805, 38806, 38807, + 38808, 38809, 38810, 38811, 38812, 38813, 38814, 38815, + 38816, 38817, 38818, 38819, 38820, 38821, 38822, 38823, + }}, + {{ + 38824, 38825, 38826, 38827, 38828, 38829, 38830, 38831, + 38832, 38833, 38834, 38835, 38836, 38837, 38838, 38839, + 38840, 38841, 38842, 38843, 38844, 38845, 38846, 38847, + 38848, 38849, 38850, 38851, 38852, 38853, 38854, 38855, + }}, + {{ + 38856, 38857, 38858, 38859, 38860, 38861, 38862, 38863, + 38864, 38865, 38866, 38867, 38868, 38869, 38870, 38871, + 38872, 38873, 38874, 38875, 38876, 38877, 38878, 38879, + 38880, 38881, 38882, 38883, 38884, 38885, 38886, 38887, + }}, + {{ + 38888, 38889, 38890, 38891, 38892, 38893, 38894, 38895, + 38896, 38897, 38898, 38899, 38900, 38901, 38902, 38903, + 38904, 38905, 38906, 38907, 38908, 38909, 38910, 38911, + 38912, 38913, 38914, 38915, 38916, 38917, 38918, 38919, + }}, + {{ + 38920, 38921, 38922, 38923, 38924, 38925, 38926, 38927, + 38928, 38929, 38930, 38931, 38932, 38933, 38934, 38935, + 38936, 38937, 38938, 38939, 38940, 38941, 38942, 38943, + 38944, 38945, 38946, 38947, 38948, 38949, 38950, 0, + }}, + {{ + 0, 0, 38951, 38952, 38953, 38954, 38955, 38956, + 0, 0, 38957, 38958, 38959, 38960, 38961, 38962, + 0, 0, 38963, 38964, 38965, 38966, 38967, 38968, + 0, 0, 38969, 38970, 38971, 0, 0, 0, + }}, + {{ + 38972, 38973, 38974, 38975, 38976, 38977, 38978, 0, + 38979, 38980, 38981, 38982, 38983, 38984, 38985, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6218, 6220, + }}, + {{ + 6222, 6224, 6226, 6228, 6230, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6232, 6234, 6236, 6238, 6240, + }}, + {{ + 6242, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 39012, 39013, 39014, 39015, 39016, 39017, 39018, 39019, + 39020, 39021, 39022, 39023, 39024, 39025, 39026, 39027, + 39028, 39029, 39030, 39031, 39032, 39033, 39034, 39035, + 39036, 39037, 39038, 39039, 39040, 39041, 39042, 39043, + }}, + {{ + 39044, 39045, 39046, 39047, 39048, 39049, 39050, 39051, + 39052, 39053, 39054, 39055, 39056, 39057, 39058, 39059, + 39060, 39061, 39062, 39063, 39064, 39065, 39066, 39067, + 39068, 39069, 39070, 39071, 39072, 39073, 39074, 39075, + }}, + {{ + 39076, 39077, 39078, 39079, 39080, 39081, 39082, 39083, + 39084, 39085, 39086, 39087, 39088, 39089, 39090, 39091, + 39092, 39093, 39094, 39095, 39096, 0, 39097, 39098, + 39099, 39100, 39101, 39102, 39103, 39104, 39105, 39106, + }}, + {{ + 39107, 39108, 39109, 39110, 39111, 39112, 39113, 39114, + 39115, 39116, 39117, 39118, 39119, 39120, 39121, 39122, + 39123, 39124, 39125, 39126, 39127, 39128, 39129, 39130, + 39131, 39132, 39133, 39134, 39135, 39136, 39137, 39138, + }}, + {{ + 39139, 39140, 39141, 39142, 39143, 39144, 39145, 39146, + 39147, 39148, 39149, 39150, 39151, 39152, 39153, 39154, + 39155, 39156, 39157, 39158, 39159, 39160, 39161, 39162, + 39163, 39164, 39165, 39166, 39167, 0, 39168, 39169, + }}, + {{ + 0, 0, 39170, 0, 0, 39171, 39172, 0, + 0, 39173, 39174, 39175, 39176, 0, 39177, 39178, + 39179, 39180, 39181, 39182, 39183, 39184, 39185, 39186, + 39187, 39188, 0, 39189, 0, 39190, 39191, 39192, + }}, + {{ + 39193, 0, 39194, 39195, 0, 39196, 39197, 39198, + 39199, 39200, 39201, 39202, 39203, 39204, 39205, 39206, + 39207, 39208, 39209, 39210, 39211, 39212, 39213, 39214, + 39215, 39216, 39217, 39218, 39219, 39220, 39221, 39222, + }}, + {{ + 39223, 39224, 39225, 39226, 39227, 39228, 39229, 39230, + 39231, 39232, 39233, 39234, 39235, 39236, 39237, 39238, + 39239, 39240, 39241, 39242, 39243, 39244, 39245, 39246, + 39247, 39248, 39249, 39250, 39251, 39252, 39253, 39254, + }}, + {{ + 39255, 39256, 39257, 39258, 39259, 39260, 0, 39261, + 39262, 39263, 39264, 0, 0, 39265, 39266, 39267, + 39268, 39269, 39270, 39271, 39272, 0, 39273, 39274, + 39275, 39276, 39277, 39278, 39279, 0, 39280, 39281, + }}, + {{ + 39282, 39283, 39284, 39285, 39286, 39287, 39288, 39289, + 39290, 39291, 39292, 39293, 39294, 39295, 39296, 39297, + 39298, 39299, 39300, 39301, 39302, 39303, 39304, 39305, + 39306, 39307, 0, 39308, 39309, 39310, 39311, 0, + }}, + {{ + 39312, 39313, 39314, 39315, 39316, 0, 39317, 0, + 0, 0, 39318, 39319, 39320, 39321, 39322, 39323, + 39324, 0, 39325, 39326, 39327, 39328, 39329, 39330, + 39331, 39332, 39333, 39334, 39335, 39336, 39337, 39338, + }}, + {{ + 39339, 39340, 39341, 39342, 39343, 39344, 39345, 39346, + 39347, 39348, 39349, 39350, 39351, 39352, 39353, 39354, + 39355, 39356, 39357, 39358, 39359, 39360, 39361, 39362, + 39363, 39364, 39365, 39366, 39367, 39368, 39369, 39370, + }}, + {{ + 39371, 39372, 39373, 39374, 39375, 39376, 39377, 39378, + 39379, 39380, 39381, 39382, 39383, 39384, 39385, 39386, + 39387, 39388, 39389, 39390, 39391, 39392, 39393, 39394, + 39395, 39396, 39397, 39398, 39399, 39400, 39401, 39402, + }}, + {{ + 39403, 39404, 39405, 39406, 39407, 39408, 39409, 39410, + 39411, 39412, 39413, 39414, 39415, 39416, 39417, 39418, + 39419, 39420, 39421, 39422, 39423, 39424, 39425, 39426, + 39427, 39428, 39429, 39430, 39431, 39432, 39433, 39434, + }}, + {{ + 39435, 39436, 39437, 39438, 39439, 39440, 39441, 39442, + 39443, 39444, 39445, 39446, 39447, 39448, 39449, 39450, + 39451, 39452, 39453, 39454, 39455, 39456, 39457, 39458, + 39459, 39460, 39461, 39462, 39463, 39464, 39465, 39466, + }}, + {{ + 39467, 39468, 39469, 39470, 39471, 39472, 39473, 39474, + 39475, 39476, 39477, 39478, 39479, 39480, 39481, 39482, + 39483, 39484, 39485, 39486, 39487, 39488, 39489, 39490, + 39491, 39492, 39493, 39494, 39495, 39496, 39497, 39498, + }}, + {{ + 39499, 39500, 39501, 39502, 39503, 39504, 39505, 39506, + 39507, 39508, 39509, 39510, 39511, 39512, 39513, 39514, + 39515, 39516, 39517, 39518, 39519, 39520, 39521, 39522, + 39523, 39524, 39525, 39526, 39527, 39528, 39529, 39530, + }}, + {{ + 39531, 39532, 39533, 39534, 39535, 39536, 39537, 39538, + 39539, 39540, 39541, 39542, 39543, 39544, 39545, 39546, + 39547, 39548, 39549, 39550, 39551, 39552, 39553, 39554, + 39555, 39556, 39557, 39558, 39559, 39560, 39561, 39562, + }}, + {{ + 39563, 39564, 39565, 39566, 39567, 39568, 39569, 39570, + 39571, 39572, 39573, 39574, 39575, 39576, 39577, 39578, + 39579, 39580, 39581, 39582, 39583, 39584, 39585, 39586, + 39587, 39588, 39589, 39590, 39591, 39592, 39593, 39594, + }}, + {{ + 39595, 39596, 39597, 39598, 39599, 39600, 39601, 39602, + 39603, 39604, 39605, 39606, 39607, 39608, 39609, 39610, + 39611, 39612, 39613, 39614, 39615, 39616, 39617, 39618, + 39619, 39620, 39621, 39622, 39623, 39624, 39625, 39626, + }}, + {{ + 39627, 39628, 39629, 39630, 39631, 39632, 39633, 39634, + 39635, 39636, 39637, 39638, 39639, 39640, 39641, 39642, + 39643, 39644, 39645, 39646, 39647, 39648, 39649, 39650, + 39651, 39652, 39653, 39654, 39655, 39656, 39657, 39658, + }}, + {{ + 39659, 39660, 39661, 39662, 0, 0, 0, 0, + 39663, 39664, 39665, 39666, 39667, 39668, 39669, 39670, + 39671, 39672, 39673, 39674, 39675, 39676, 39677, 39678, + 39679, 39680, 39681, 39682, 39683, 39684, 39685, 39686, + }}, + {{ + 39687, 39688, 39689, 39690, 39691, 39692, 39693, 39694, + 39695, 39696, 39697, 39698, 39699, 39700, 39701, 39702, + 39703, 39704, 39705, 39706, 39707, 39708, 39709, 39710, + 39711, 39712, 39713, 39714, 39715, 39716, 39717, 39718, + }}, + {{ + 39719, 39720, 39721, 39722, 39723, 39724, 39725, 39726, + 39727, 39728, 39729, 39730, 39731, 39732, 39733, 39734, + 39735, 39736, 39737, 39738, 39739, 39740, 39741, 39742, + 39743, 39744, 39745, 39746, 39747, 39748, 39749, 39750, + }}, + {{ + 39751, 39752, 39753, 39754, 39755, 39756, 39757, 39758, + 39759, 39760, 39761, 39762, 39763, 39764, 39765, 39766, + 39767, 39768, 39769, 39770, 39771, 39772, 39773, 39774, + 39775, 39776, 39777, 39778, 39779, 39780, 39781, 39782, + }}, + {{ + 39783, 39784, 39785, 39786, 39787, 39788, 39789, 39790, + 39791, 39792, 39793, 39794, 39795, 39796, 39797, 39798, + 39799, 39800, 39801, 39802, 39803, 39804, 39805, 39806, + 39807, 39808, 39809, 39810, 39811, 39812, 39813, 39814, + }}, + {{ + 39815, 39816, 39817, 39818, 39819, 39820, 39821, 39822, + 39823, 39824, 39825, 39826, 39827, 39828, 39829, 39830, + 39831, 39832, 39833, 39834, 39835, 39836, 39837, 39838, + 39839, 39840, 39841, 39842, 39843, 39844, 39845, 39846, + }}, + {{ + 39847, 39848, 39849, 39850, 39851, 39852, 39853, 39854, + 39855, 39856, 39857, 39858, 39859, 39860, 39861, 39862, + 39863, 39864, 39865, 39866, 39867, 39868, 39869, 39870, + 39871, 39872, 39873, 39874, 39875, 39876, 39877, 39878, + }}, + {{ + 39879, 39880, 39881, 39882, 39883, 39884, 39885, 39886, + 39887, 39888, 39889, 39890, 39891, 39892, 39893, 39894, + 39895, 39896, 39897, 39898, 39899, 39900, 39901, 39902, + 39903, 39904, 39905, 39906, 39907, 39908, 39909, 39910, + }}, + {{ + 39911, 39912, 39913, 39914, 39915, 39916, 39917, 39918, + 39919, 39920, 39921, 39922, 39923, 39924, 39925, 39926, + 39927, 39928, 39929, 39930, 39931, 39932, 39933, 39934, + 39935, 39936, 39937, 39938, 39939, 39940, 39941, 39942, + }}, + {{ + 39943, 39944, 39945, 39946, 39947, 39948, 39949, 39950, + 39951, 39952, 0, 0, 0, 0, 39953, 39954, + 39955, 39956, 39957, 39958, 39959, 39960, 39961, 39962, + 39963, 39964, 39965, 39966, 39967, 39968, 39969, 39970, + }}, + {{ + 39971, 39972, 39973, 39974, 39975, 39976, 39977, 39978, + 39979, 39980, 39981, 39982, 39983, 39984, 39985, 39986, + 39987, 39988, 39989, 39990, 39991, 39992, 39993, 39994, + 39995, 39996, 39997, 39998, 39999, 40000, 40001, 40002, + }}, + {{ + 7235, 7236, 7237, 7238, 7239, 7240, 7241, 7242, + 7243, 7244, 7245, 7246, 7247, 7248, 7249, 7250, + 7251, 7252, 7253, 7254, 7255, 7256, 7257, 7258, + 7259, 7260, 7261, 7262, 7263, 7264, 7265, 7266, + }}, + {{ + 7267, 7268, 7269, 7270, 7271, 7272, 7273, 7274, + 7275, 7276, 7277, 7278, 7279, 7280, 7281, 7282, + 7283, 7284, 7285, 7286, 7287, 7288, 7289, 7290, + 7291, 7292, 7293, 7294, 7295, 7296, 7297, 7298, + }}, + {{ + 7299, 7300, 7301, 7302, 7303, 7304, 7305, 7306, + 7307, 7308, 7309, 7310, 7311, 7312, 7313, 7314, + 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, + 7323, 7324, 7325, 7326, 7327, 7328, 7329, 7330, + }}, + {{ + 7331, 7332, 7333, 7334, 7335, 7336, 7337, 7338, + 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, + 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, + 7355, 7356, 7357, 7358, 7359, 7360, 7361, 7362, + }}, + {{ + 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, + 7371, 7372, 7373, 7374, 7375, 7376, 7377, 7378, + 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, + 7387, 7388, 7389, 7390, 7391, 7392, 7393, 7394, + }}, + {{ + 7395, 7396, 7397, 7398, 7399, 7400, 7401, 7402, + 7403, 7404, 7405, 7406, 7407, 7408, 7409, 7410, + 7411, 7412, 7413, 7414, 7415, 7416, 7417, 7418, + 7419, 7420, 7421, 7422, 7423, 7424, 7425, 7426, + }}, + {{ + 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, + 7435, 7436, 7437, 7438, 7439, 7440, 7441, 7442, + 7443, 7444, 7445, 7446, 7447, 7448, 7449, 7450, + 7451, 7452, 7453, 7454, 7455, 7456, 7457, 7458, + }}, + {{ + 7459, 7460, 7461, 7462, 7463, 7464, 7465, 7466, + 7467, 7468, 7469, 7470, 7471, 7472, 7473, 7474, + 7475, 7476, 7477, 7478, 7479, 7480, 7481, 7482, + 7483, 7484, 7485, 7486, 7487, 7488, 7489, 7490, + }}, + {{ + 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, + 7499, 7500, 7501, 7502, 7503, 7504, 7505, 7506, + 7507, 7508, 7509, 7510, 7511, 7512, 7513, 7514, + 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, + }}, + {{ + 7523, 7524, 7525, 7526, 7527, 7528, 7529, 7530, + 7531, 7532, 7533, 7534, 7535, 7536, 7537, 7538, + 7539, 7540, 7541, 7542, 7543, 7544, 7545, 7546, + 7547, 7548, 7549, 7550, 7551, 7552, 7553, 7554, + }}, + {{ + 7555, 7556, 7557, 7558, 7559, 7560, 7561, 7562, + 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, + 7571, 7572, 7573, 7574, 7575, 7576, 7577, 7578, + 7579, 7580, 7581, 7582, 7583, 7584, 7585, 7586, + }}, + {{ + 7587, 7588, 7589, 7590, 7591, 7592, 7593, 7594, + 7595, 7596, 7597, 7598, 7599, 7600, 7601, 7602, + 7603, 7604, 7605, 7606, 7607, 7608, 7609, 7610, + 7611, 7612, 7613, 7614, 7615, 7616, 7617, 7618, + }}, + {{ + 7619, 7620, 7621, 7622, 7623, 7624, 7625, 7626, + 7627, 7628, 7629, 7630, 7631, 7632, 7633, 7634, + 7635, 7636, 7637, 7638, 7639, 7640, 7641, 7642, + 7643, 7644, 7645, 7646, 7647, 7648, 7649, 7650, + }}, + {{ + 7651, 7652, 7653, 7654, 7655, 7656, 7657, 7658, + 7659, 7660, 7661, 7662, 7663, 7664, 7665, 7666, + 7667, 7668, 7669, 7670, 7671, 7672, 7673, 7674, + 7675, 7676, 7677, 7678, 7679, 7680, 7681, 7682, + }}, + {{ + 7683, 7684, 7685, 7686, 7687, 7688, 7689, 7690, + 7691, 7692, 7693, 7694, 7695, 7696, 7697, 7698, + 7699, 7700, 7701, 7702, 7703, 7704, 7705, 7706, + 7707, 7708, 7709, 7710, 7711, 7712, 7713, 7714, + }}, + {{ + 7715, 7716, 7717, 7718, 7719, 7720, 7721, 7722, + 7723, 7724, 7725, 7726, 7727, 7728, 7729, 7730, + 7731, 7732, 7733, 7734, 7735, 7736, 7737, 7738, + 7739, 7740, 7741, 7742, 7743, 7744, 7745, 7746, + }}, + {{ + 7747, 7748, 7749, 7750, 7751, 7752, 7753, 7754, + 7755, 7756, 7757, 7758, 7759, 7760, 7761, 7762, + 7763, 7764, 7765, 7766, 7767, 7768, 7769, 7770, + 7771, 7772, 7773, 7774, 7775, 7776, 0, 0, + }}, +}; +static const unsigned long v320_decompose_seq[] = { + 0x00000000, 0x80000020, 0x00000020, 0x80000308, + 0x80000061, 0x00000020, 0x80000304, 0x80000032, + 0x80000033, 0x00000020, 0x80000301, 0x800003bc, + 0x00000020, 0x80000327, 0x80000031, 0x8000006f, + 0x00000031, 0x00002044, 0x80000034, 0x00000031, + 0x00002044, 0x80000032, 0x00000033, 0x00002044, + 0x80000034, 0x00000041, 0x80000300, 0x00000041, + 0x80000301, 0x00000041, 0x80000302, 0x00000041, + 0x80000303, 0x00000041, 0x80000308, 0x00000041, + 0x8000030a, 0x00000043, 0x80000327, 0x00000045, + 0x80000300, 0x00000045, 0x80000301, 0x00000045, + 0x80000302, 0x00000045, 0x80000308, 0x00000049, + 0x80000300, 0x00000049, 0x80000301, 0x00000049, + 0x80000302, 0x00000049, 0x80000308, 0x0000004e, + 0x80000303, 0x0000004f, 0x80000300, 0x0000004f, + 0x80000301, 0x0000004f, 0x80000302, 0x0000004f, + 0x80000303, 0x0000004f, 0x80000308, 0x00000055, + 0x80000300, 0x00000055, 0x80000301, 0x00000055, + 0x80000302, 0x00000055, 0x80000308, 0x00000059, + 0x80000301, 0x00000061, 0x80000300, 0x00000061, + 0x80000301, 0x00000061, 0x80000302, 0x00000061, + 0x80000303, 0x00000061, 0x80000308, 0x00000061, + 0x8000030a, 0x00000063, 0x80000327, 0x00000065, + 0x80000300, 0x00000065, 0x80000301, 0x00000065, + 0x80000302, 0x00000065, 0x80000308, 0x00000069, + 0x80000300, 0x00000069, 0x80000301, 0x00000069, + 0x80000302, 0x00000069, 0x80000308, 0x0000006e, + 0x80000303, 0x0000006f, 0x80000300, 0x0000006f, + 0x80000301, 0x0000006f, 0x80000302, 0x0000006f, + 0x80000303, 0x0000006f, 0x80000308, 0x00000075, + 0x80000300, 0x00000075, 0x80000301, 0x00000075, + 0x80000302, 0x00000075, 0x80000308, 0x00000079, + 0x80000301, 0x00000079, 0x80000308, 0x00000041, + 0x80000304, 0x00000061, 0x80000304, 0x00000041, + 0x80000306, 0x00000061, 0x80000306, 0x00000041, + 0x80000328, 0x00000061, 0x80000328, 0x00000043, + 0x80000301, 0x00000063, 0x80000301, 0x00000043, + 0x80000302, 0x00000063, 0x80000302, 0x00000043, + 0x80000307, 0x00000063, 0x80000307, 0x00000043, + 0x8000030c, 0x00000063, 0x8000030c, 0x00000044, + 0x8000030c, 0x00000064, 0x8000030c, 0x00000045, + 0x80000304, 0x00000065, 0x80000304, 0x00000045, + 0x80000306, 0x00000065, 0x80000306, 0x00000045, + 0x80000307, 0x00000065, 0x80000307, 0x00000045, + 0x80000328, 0x00000065, 0x80000328, 0x00000045, + 0x8000030c, 0x00000065, 0x8000030c, 0x00000047, + 0x80000302, 0x00000067, 0x80000302, 0x00000047, + 0x80000306, 0x00000067, 0x80000306, 0x00000047, + 0x80000307, 0x00000067, 0x80000307, 0x00000047, + 0x80000327, 0x00000067, 0x80000327, 0x00000048, + 0x80000302, 0x00000068, 0x80000302, 0x00000049, + 0x80000303, 0x00000069, 0x80000303, 0x00000049, + 0x80000304, 0x00000069, 0x80000304, 0x00000049, + 0x80000306, 0x00000069, 0x80000306, 0x00000049, + 0x80000328, 0x00000069, 0x80000328, 0x00000049, + 0x80000307, 0x00000049, 0x8000004a, 0x00000069, + 0x8000006a, 0x0000004a, 0x80000302, 0x0000006a, + 0x80000302, 0x0000004b, 0x80000327, 0x0000006b, + 0x80000327, 0x0000004c, 0x80000301, 0x0000006c, + 0x80000301, 0x0000004c, 0x80000327, 0x0000006c, + 0x80000327, 0x0000004c, 0x8000030c, 0x0000006c, + 0x8000030c, 0x0000004c, 0x800000b7, 0x0000006c, + 0x800000b7, 0x0000004e, 0x80000301, 0x0000006e, + 0x80000301, 0x0000004e, 0x80000327, 0x0000006e, + 0x80000327, 0x0000004e, 0x8000030c, 0x0000006e, + 0x8000030c, 0x000002bc, 0x8000006e, 0x0000004f, + 0x80000304, 0x0000006f, 0x80000304, 0x0000004f, + 0x80000306, 0x0000006f, 0x80000306, 0x0000004f, + 0x8000030b, 0x0000006f, 0x8000030b, 0x00000052, + 0x80000301, 0x00000072, 0x80000301, 0x00000052, + 0x80000327, 0x00000072, 0x80000327, 0x00000052, + 0x8000030c, 0x00000072, 0x8000030c, 0x00000053, + 0x80000301, 0x00000073, 0x80000301, 0x00000053, + 0x80000302, 0x00000073, 0x80000302, 0x00000053, + 0x80000327, 0x00000073, 0x80000327, 0x00000053, + 0x8000030c, 0x00000073, 0x8000030c, 0x00000054, + 0x80000327, 0x00000074, 0x80000327, 0x00000054, + 0x8000030c, 0x00000074, 0x8000030c, 0x00000055, + 0x80000303, 0x00000075, 0x80000303, 0x00000055, + 0x80000304, 0x00000075, 0x80000304, 0x00000055, + 0x80000306, 0x00000075, 0x80000306, 0x00000055, + 0x8000030a, 0x00000075, 0x8000030a, 0x00000055, + 0x8000030b, 0x00000075, 0x8000030b, 0x00000055, + 0x80000328, 0x00000075, 0x80000328, 0x00000057, + 0x80000302, 0x00000077, 0x80000302, 0x00000059, + 0x80000302, 0x00000079, 0x80000302, 0x00000059, + 0x80000308, 0x0000005a, 0x80000301, 0x0000007a, + 0x80000301, 0x0000005a, 0x80000307, 0x0000007a, + 0x80000307, 0x0000005a, 0x8000030c, 0x0000007a, + 0x8000030c, 0x80000073, 0x0000004f, 0x8000031b, + 0x0000006f, 0x8000031b, 0x00000055, 0x8000031b, + 0x00000075, 0x8000031b, 0x00000044, 0x8000017d, + 0x00000044, 0x8000017e, 0x00000064, 0x8000017e, + 0x0000004c, 0x8000004a, 0x0000004c, 0x8000006a, + 0x0000006c, 0x8000006a, 0x0000004e, 0x8000004a, + 0x0000004e, 0x8000006a, 0x0000006e, 0x8000006a, + 0x00000041, 0x8000030c, 0x00000061, 0x8000030c, + 0x00000049, 0x8000030c, 0x00000069, 0x8000030c, + 0x0000004f, 0x8000030c, 0x0000006f, 0x8000030c, + 0x00000055, 0x8000030c, 0x00000075, 0x8000030c, + 0x000000dc, 0x80000304, 0x000000fc, 0x80000304, + 0x000000dc, 0x80000301, 0x000000fc, 0x80000301, + 0x000000dc, 0x8000030c, 0x000000fc, 0x8000030c, + 0x000000dc, 0x80000300, 0x000000fc, 0x80000300, + 0x000000c4, 0x80000304, 0x000000e4, 0x80000304, + 0x00000226, 0x80000304, 0x00000227, 0x80000304, + 0x000000c6, 0x80000304, 0x000000e6, 0x80000304, + 0x00000047, 0x8000030c, 0x00000067, 0x8000030c, + 0x0000004b, 0x8000030c, 0x0000006b, 0x8000030c, + 0x0000004f, 0x80000328, 0x0000006f, 0x80000328, + 0x000001ea, 0x80000304, 0x000001eb, 0x80000304, + 0x000001b7, 0x8000030c, 0x00000292, 0x8000030c, + 0x0000006a, 0x8000030c, 0x00000044, 0x8000005a, + 0x00000044, 0x8000007a, 0x00000064, 0x8000007a, + 0x00000047, 0x80000301, 0x00000067, 0x80000301, + 0x0000004e, 0x80000300, 0x0000006e, 0x80000300, + 0x000000c5, 0x80000301, 0x000000e5, 0x80000301, + 0x000000c6, 0x80000301, 0x000000e6, 0x80000301, + 0x000000d8, 0x80000301, 0x000000f8, 0x80000301, + 0x00000041, 0x8000030f, 0x00000061, 0x8000030f, + 0x00000041, 0x80000311, 0x00000061, 0x80000311, + 0x00000045, 0x8000030f, 0x00000065, 0x8000030f, + 0x00000045, 0x80000311, 0x00000065, 0x80000311, + 0x00000049, 0x8000030f, 0x00000069, 0x8000030f, + 0x00000049, 0x80000311, 0x00000069, 0x80000311, + 0x0000004f, 0x8000030f, 0x0000006f, 0x8000030f, + 0x0000004f, 0x80000311, 0x0000006f, 0x80000311, + 0x00000052, 0x8000030f, 0x00000072, 0x8000030f, + 0x00000052, 0x80000311, 0x00000072, 0x80000311, + 0x00000055, 0x8000030f, 0x00000075, 0x8000030f, + 0x00000055, 0x80000311, 0x00000075, 0x80000311, + 0x00000053, 0x80000326, 0x00000073, 0x80000326, + 0x00000054, 0x80000326, 0x00000074, 0x80000326, + 0x00000048, 0x8000030c, 0x00000068, 0x8000030c, + 0x00000041, 0x80000307, 0x00000061, 0x80000307, + 0x00000045, 0x80000327, 0x00000065, 0x80000327, + 0x000000d6, 0x80000304, 0x000000f6, 0x80000304, + 0x000000d5, 0x80000304, 0x000000f5, 0x80000304, + 0x0000004f, 0x80000307, 0x0000006f, 0x80000307, + 0x0000022e, 0x80000304, 0x0000022f, 0x80000304, + 0x00000059, 0x80000304, 0x00000079, 0x80000304, + 0x80000068, 0x80000266, 0x8000006a, 0x80000072, + 0x80000279, 0x8000027b, 0x80000281, 0x80000077, + 0x80000079, 0x00000020, 0x80000306, 0x00000020, + 0x80000307, 0x00000020, 0x8000030a, 0x00000020, + 0x80000328, 0x00000020, 0x80000303, 0x00000020, + 0x8000030b, 0x80000263, 0x8000006c, 0x80000073, + 0x80000078, 0x80000295, 0x80000300, 0x80000301, + 0x80000313, 0x00000308, 0x80000301, 0x800002b9, + 0x00000020, 0x80000345, 0x8000003b, 0x00000020, + 0x80000301, 0x000000a8, 0x80000301, 0x00000391, + 0x80000301, 0x800000b7, 0x00000395, 0x80000301, + 0x00000397, 0x80000301, 0x00000399, 0x80000301, + 0x0000039f, 0x80000301, 0x000003a5, 0x80000301, + 0x000003a9, 0x80000301, 0x000003ca, 0x80000301, + 0x00000399, 0x80000308, 0x000003a5, 0x80000308, + 0x000003b1, 0x80000301, 0x000003b5, 0x80000301, + 0x000003b7, 0x80000301, 0x000003b9, 0x80000301, + 0x000003cb, 0x80000301, 0x000003b9, 0x80000308, + 0x000003c5, 0x80000308, 0x000003bf, 0x80000301, + 0x000003c5, 0x80000301, 0x000003c9, 0x80000301, + 0x800003b2, 0x800003b8, 0x800003a5, 0x000003d2, + 0x80000301, 0x000003d2, 0x80000308, 0x800003c6, + 0x800003c0, 0x800003ba, 0x800003c1, 0x800003c2, + 0x80000398, 0x800003b5, 0x00000415, 0x80000300, + 0x00000415, 0x80000308, 0x00000413, 0x80000301, + 0x00000406, 0x80000308, 0x0000041a, 0x80000301, + 0x00000418, 0x80000300, 0x00000423, 0x80000306, + 0x00000418, 0x80000306, 0x00000438, 0x80000306, + 0x00000435, 0x80000300, 0x00000435, 0x80000308, + 0x00000433, 0x80000301, 0x00000456, 0x80000308, + 0x0000043a, 0x80000301, 0x00000438, 0x80000300, + 0x00000443, 0x80000306, 0x00000474, 0x8000030f, + 0x00000475, 0x8000030f, 0x00000416, 0x80000306, + 0x00000436, 0x80000306, 0x00000410, 0x80000306, + 0x00000430, 0x80000306, 0x00000410, 0x80000308, + 0x00000430, 0x80000308, 0x00000415, 0x80000306, + 0x00000435, 0x80000306, 0x000004d8, 0x80000308, + 0x000004d9, 0x80000308, 0x00000416, 0x80000308, + 0x00000436, 0x80000308, 0x00000417, 0x80000308, + 0x00000437, 0x80000308, 0x00000418, 0x80000304, + 0x00000438, 0x80000304, 0x00000418, 0x80000308, + 0x00000438, 0x80000308, 0x0000041e, 0x80000308, + 0x0000043e, 0x80000308, 0x000004e8, 0x80000308, + 0x000004e9, 0x80000308, 0x0000042d, 0x80000308, + 0x0000044d, 0x80000308, 0x00000423, 0x80000304, + 0x00000443, 0x80000304, 0x00000423, 0x80000308, + 0x00000443, 0x80000308, 0x00000423, 0x8000030b, + 0x00000443, 0x8000030b, 0x00000427, 0x80000308, + 0x00000447, 0x80000308, 0x0000042b, 0x80000308, + 0x0000044b, 0x80000308, 0x00000565, 0x80000582, + 0x00000627, 0x80000653, 0x00000627, 0x80000654, + 0x00000648, 0x80000654, 0x00000627, 0x80000655, + 0x0000064a, 0x80000654, 0x00000627, 0x80000674, + 0x00000648, 0x80000674, 0x000006c7, 0x80000674, + 0x0000064a, 0x80000674, 0x000006d5, 0x80000654, + 0x000006c1, 0x80000654, 0x000006d2, 0x80000654, + 0x00000928, 0x8000093c, 0x00000930, 0x8000093c, + 0x00000933, 0x8000093c, 0x00000915, 0x8000093c, + 0x00000916, 0x8000093c, 0x00000917, 0x8000093c, + 0x0000091c, 0x8000093c, 0x00000921, 0x8000093c, + 0x00000922, 0x8000093c, 0x0000092b, 0x8000093c, + 0x0000092f, 0x8000093c, 0x000009c7, 0x800009be, + 0x000009c7, 0x800009d7, 0x000009a1, 0x800009bc, + 0x000009a2, 0x800009bc, 0x000009af, 0x800009bc, + 0x00000a32, 0x80000a3c, 0x00000a38, 0x80000a3c, + 0x00000a16, 0x80000a3c, 0x00000a17, 0x80000a3c, + 0x00000a1c, 0x80000a3c, 0x00000a2b, 0x80000a3c, + 0x00000b47, 0x80000b56, 0x00000b47, 0x80000b3e, + 0x00000b47, 0x80000b57, 0x00000b21, 0x80000b3c, + 0x00000b22, 0x80000b3c, 0x00000b92, 0x80000bd7, + 0x00000bc6, 0x80000bbe, 0x00000bc7, 0x80000bbe, + 0x00000bc6, 0x80000bd7, 0x00000c46, 0x80000c56, + 0x00000cbf, 0x80000cd5, 0x00000cc6, 0x80000cd5, + 0x00000cc6, 0x80000cd6, 0x00000cc6, 0x80000cc2, + 0x00000cca, 0x80000cd5, 0x00000d46, 0x80000d3e, + 0x00000d47, 0x80000d3e, 0x00000d46, 0x80000d57, + 0x00000dd9, 0x80000dca, 0x00000dd9, 0x80000dcf, + 0x00000ddc, 0x80000dca, 0x00000dd9, 0x80000ddf, + 0x00000e4d, 0x80000e32, 0x00000ecd, 0x80000eb2, + 0x00000eab, 0x80000e99, 0x00000eab, 0x80000ea1, + 0x80000f0b, 0x00000f42, 0x80000fb7, 0x00000f4c, + 0x80000fb7, 0x00000f51, 0x80000fb7, 0x00000f56, + 0x80000fb7, 0x00000f5b, 0x80000fb7, 0x00000f40, + 0x80000fb5, 0x00000f71, 0x80000f72, 0x00000f71, + 0x80000f74, 0x00000fb2, 0x80000f80, 0x00000fb2, + 0x80000f81, 0x00000fb3, 0x80000f80, 0x00000fb3, + 0x80000f81, 0x00000f71, 0x80000f80, 0x00000f92, + 0x80000fb7, 0x00000f9c, 0x80000fb7, 0x00000fa1, + 0x80000fb7, 0x00000fa6, 0x80000fb7, 0x00000fab, + 0x80000fb7, 0x00000f90, 0x80000fb5, 0x00001025, + 0x8000102e, 0x00000041, 0x80000325, 0x00000061, + 0x80000325, 0x00000042, 0x80000307, 0x00000062, + 0x80000307, 0x00000042, 0x80000323, 0x00000062, + 0x80000323, 0x00000042, 0x80000331, 0x00000062, + 0x80000331, 0x000000c7, 0x80000301, 0x000000e7, + 0x80000301, 0x00000044, 0x80000307, 0x00000064, + 0x80000307, 0x00000044, 0x80000323, 0x00000064, + 0x80000323, 0x00000044, 0x80000331, 0x00000064, + 0x80000331, 0x00000044, 0x80000327, 0x00000064, + 0x80000327, 0x00000044, 0x8000032d, 0x00000064, + 0x8000032d, 0x00000112, 0x80000300, 0x00000113, + 0x80000300, 0x00000112, 0x80000301, 0x00000113, + 0x80000301, 0x00000045, 0x8000032d, 0x00000065, + 0x8000032d, 0x00000045, 0x80000330, 0x00000065, + 0x80000330, 0x00000228, 0x80000306, 0x00000229, + 0x80000306, 0x00000046, 0x80000307, 0x00000066, + 0x80000307, 0x00000047, 0x80000304, 0x00000067, + 0x80000304, 0x00000048, 0x80000307, 0x00000068, + 0x80000307, 0x00000048, 0x80000323, 0x00000068, + 0x80000323, 0x00000048, 0x80000308, 0x00000068, + 0x80000308, 0x00000048, 0x80000327, 0x00000068, + 0x80000327, 0x00000048, 0x8000032e, 0x00000068, + 0x8000032e, 0x00000049, 0x80000330, 0x00000069, + 0x80000330, 0x000000cf, 0x80000301, 0x000000ef, + 0x80000301, 0x0000004b, 0x80000301, 0x0000006b, + 0x80000301, 0x0000004b, 0x80000323, 0x0000006b, + 0x80000323, 0x0000004b, 0x80000331, 0x0000006b, + 0x80000331, 0x0000004c, 0x80000323, 0x0000006c, + 0x80000323, 0x00001e36, 0x80000304, 0x00001e37, + 0x80000304, 0x0000004c, 0x80000331, 0x0000006c, + 0x80000331, 0x0000004c, 0x8000032d, 0x0000006c, + 0x8000032d, 0x0000004d, 0x80000301, 0x0000006d, + 0x80000301, 0x0000004d, 0x80000307, 0x0000006d, + 0x80000307, 0x0000004d, 0x80000323, 0x0000006d, + 0x80000323, 0x0000004e, 0x80000307, 0x0000006e, + 0x80000307, 0x0000004e, 0x80000323, 0x0000006e, + 0x80000323, 0x0000004e, 0x80000331, 0x0000006e, + 0x80000331, 0x0000004e, 0x8000032d, 0x0000006e, + 0x8000032d, 0x000000d5, 0x80000301, 0x000000f5, + 0x80000301, 0x000000d5, 0x80000308, 0x000000f5, + 0x80000308, 0x0000014c, 0x80000300, 0x0000014d, + 0x80000300, 0x0000014c, 0x80000301, 0x0000014d, + 0x80000301, 0x00000050, 0x80000301, 0x00000070, + 0x80000301, 0x00000050, 0x80000307, 0x00000070, + 0x80000307, 0x00000052, 0x80000307, 0x00000072, + 0x80000307, 0x00000052, 0x80000323, 0x00000072, + 0x80000323, 0x00001e5a, 0x80000304, 0x00001e5b, + 0x80000304, 0x00000052, 0x80000331, 0x00000072, + 0x80000331, 0x00000053, 0x80000307, 0x00000073, + 0x80000307, 0x00000053, 0x80000323, 0x00000073, + 0x80000323, 0x0000015a, 0x80000307, 0x0000015b, + 0x80000307, 0x00000160, 0x80000307, 0x00000161, + 0x80000307, 0x00001e62, 0x80000307, 0x00001e63, + 0x80000307, 0x00000054, 0x80000307, 0x00000074, + 0x80000307, 0x00000054, 0x80000323, 0x00000074, + 0x80000323, 0x00000054, 0x80000331, 0x00000074, + 0x80000331, 0x00000054, 0x8000032d, 0x00000074, + 0x8000032d, 0x00000055, 0x80000324, 0x00000075, + 0x80000324, 0x00000055, 0x80000330, 0x00000075, + 0x80000330, 0x00000055, 0x8000032d, 0x00000075, + 0x8000032d, 0x00000168, 0x80000301, 0x00000169, + 0x80000301, 0x0000016a, 0x80000308, 0x0000016b, + 0x80000308, 0x00000056, 0x80000303, 0x00000076, + 0x80000303, 0x00000056, 0x80000323, 0x00000076, + 0x80000323, 0x00000057, 0x80000300, 0x00000077, + 0x80000300, 0x00000057, 0x80000301, 0x00000077, + 0x80000301, 0x00000057, 0x80000308, 0x00000077, + 0x80000308, 0x00000057, 0x80000307, 0x00000077, + 0x80000307, 0x00000057, 0x80000323, 0x00000077, + 0x80000323, 0x00000058, 0x80000307, 0x00000078, + 0x80000307, 0x00000058, 0x80000308, 0x00000078, + 0x80000308, 0x00000059, 0x80000307, 0x00000079, + 0x80000307, 0x0000005a, 0x80000302, 0x0000007a, + 0x80000302, 0x0000005a, 0x80000323, 0x0000007a, + 0x80000323, 0x0000005a, 0x80000331, 0x0000007a, + 0x80000331, 0x00000068, 0x80000331, 0x00000074, + 0x80000308, 0x00000077, 0x8000030a, 0x00000079, + 0x8000030a, 0x00000061, 0x800002be, 0x0000017f, + 0x80000307, 0x00000041, 0x80000323, 0x00000061, + 0x80000323, 0x00000041, 0x80000309, 0x00000061, + 0x80000309, 0x000000c2, 0x80000301, 0x000000e2, + 0x80000301, 0x000000c2, 0x80000300, 0x000000e2, + 0x80000300, 0x000000c2, 0x80000309, 0x000000e2, + 0x80000309, 0x000000c2, 0x80000303, 0x000000e2, + 0x80000303, 0x00001ea0, 0x80000302, 0x00001ea1, + 0x80000302, 0x00000102, 0x80000301, 0x00000103, + 0x80000301, 0x00000102, 0x80000300, 0x00000103, + 0x80000300, 0x00000102, 0x80000309, 0x00000103, + 0x80000309, 0x00000102, 0x80000303, 0x00000103, + 0x80000303, 0x00001ea0, 0x80000306, 0x00001ea1, + 0x80000306, 0x00000045, 0x80000323, 0x00000065, + 0x80000323, 0x00000045, 0x80000309, 0x00000065, + 0x80000309, 0x00000045, 0x80000303, 0x00000065, + 0x80000303, 0x000000ca, 0x80000301, 0x000000ea, + 0x80000301, 0x000000ca, 0x80000300, 0x000000ea, + 0x80000300, 0x000000ca, 0x80000309, 0x000000ea, + 0x80000309, 0x000000ca, 0x80000303, 0x000000ea, + 0x80000303, 0x00001eb8, 0x80000302, 0x00001eb9, + 0x80000302, 0x00000049, 0x80000309, 0x00000069, + 0x80000309, 0x00000049, 0x80000323, 0x00000069, + 0x80000323, 0x0000004f, 0x80000323, 0x0000006f, + 0x80000323, 0x0000004f, 0x80000309, 0x0000006f, + 0x80000309, 0x000000d4, 0x80000301, 0x000000f4, + 0x80000301, 0x000000d4, 0x80000300, 0x000000f4, + 0x80000300, 0x000000d4, 0x80000309, 0x000000f4, + 0x80000309, 0x000000d4, 0x80000303, 0x000000f4, + 0x80000303, 0x00001ecc, 0x80000302, 0x00001ecd, + 0x80000302, 0x000001a0, 0x80000301, 0x000001a1, + 0x80000301, 0x000001a0, 0x80000300, 0x000001a1, + 0x80000300, 0x000001a0, 0x80000309, 0x000001a1, + 0x80000309, 0x000001a0, 0x80000303, 0x000001a1, + 0x80000303, 0x000001a0, 0x80000323, 0x000001a1, + 0x80000323, 0x00000055, 0x80000323, 0x00000075, + 0x80000323, 0x00000055, 0x80000309, 0x00000075, + 0x80000309, 0x000001af, 0x80000301, 0x000001b0, + 0x80000301, 0x000001af, 0x80000300, 0x000001b0, + 0x80000300, 0x000001af, 0x80000309, 0x000001b0, + 0x80000309, 0x000001af, 0x80000303, 0x000001b0, + 0x80000303, 0x000001af, 0x80000323, 0x000001b0, + 0x80000323, 0x00000059, 0x80000300, 0x00000079, + 0x80000300, 0x00000059, 0x80000323, 0x00000079, + 0x80000323, 0x00000059, 0x80000309, 0x00000079, + 0x80000309, 0x00000059, 0x80000303, 0x00000079, + 0x80000303, 0x000003b1, 0x80000313, 0x000003b1, + 0x80000314, 0x00001f00, 0x80000300, 0x00001f01, + 0x80000300, 0x00001f00, 0x80000301, 0x00001f01, + 0x80000301, 0x00001f00, 0x80000342, 0x00001f01, + 0x80000342, 0x00000391, 0x80000313, 0x00000391, + 0x80000314, 0x00001f08, 0x80000300, 0x00001f09, + 0x80000300, 0x00001f08, 0x80000301, 0x00001f09, + 0x80000301, 0x00001f08, 0x80000342, 0x00001f09, + 0x80000342, 0x000003b5, 0x80000313, 0x000003b5, + 0x80000314, 0x00001f10, 0x80000300, 0x00001f11, + 0x80000300, 0x00001f10, 0x80000301, 0x00001f11, + 0x80000301, 0x00000395, 0x80000313, 0x00000395, + 0x80000314, 0x00001f18, 0x80000300, 0x00001f19, + 0x80000300, 0x00001f18, 0x80000301, 0x00001f19, + 0x80000301, 0x000003b7, 0x80000313, 0x000003b7, + 0x80000314, 0x00001f20, 0x80000300, 0x00001f21, + 0x80000300, 0x00001f20, 0x80000301, 0x00001f21, + 0x80000301, 0x00001f20, 0x80000342, 0x00001f21, + 0x80000342, 0x00000397, 0x80000313, 0x00000397, + 0x80000314, 0x00001f28, 0x80000300, 0x00001f29, + 0x80000300, 0x00001f28, 0x80000301, 0x00001f29, + 0x80000301, 0x00001f28, 0x80000342, 0x00001f29, + 0x80000342, 0x000003b9, 0x80000313, 0x000003b9, + 0x80000314, 0x00001f30, 0x80000300, 0x00001f31, + 0x80000300, 0x00001f30, 0x80000301, 0x00001f31, + 0x80000301, 0x00001f30, 0x80000342, 0x00001f31, + 0x80000342, 0x00000399, 0x80000313, 0x00000399, + 0x80000314, 0x00001f38, 0x80000300, 0x00001f39, + 0x80000300, 0x00001f38, 0x80000301, 0x00001f39, + 0x80000301, 0x00001f38, 0x80000342, 0x00001f39, + 0x80000342, 0x000003bf, 0x80000313, 0x000003bf, + 0x80000314, 0x00001f40, 0x80000300, 0x00001f41, + 0x80000300, 0x00001f40, 0x80000301, 0x00001f41, + 0x80000301, 0x0000039f, 0x80000313, 0x0000039f, + 0x80000314, 0x00001f48, 0x80000300, 0x00001f49, + 0x80000300, 0x00001f48, 0x80000301, 0x00001f49, + 0x80000301, 0x000003c5, 0x80000313, 0x000003c5, + 0x80000314, 0x00001f50, 0x80000300, 0x00001f51, + 0x80000300, 0x00001f50, 0x80000301, 0x00001f51, + 0x80000301, 0x00001f50, 0x80000342, 0x00001f51, + 0x80000342, 0x000003a5, 0x80000314, 0x00001f59, + 0x80000300, 0x00001f59, 0x80000301, 0x00001f59, + 0x80000342, 0x000003c9, 0x80000313, 0x000003c9, + 0x80000314, 0x00001f60, 0x80000300, 0x00001f61, + 0x80000300, 0x00001f60, 0x80000301, 0x00001f61, + 0x80000301, 0x00001f60, 0x80000342, 0x00001f61, + 0x80000342, 0x000003a9, 0x80000313, 0x000003a9, + 0x80000314, 0x00001f68, 0x80000300, 0x00001f69, + 0x80000300, 0x00001f68, 0x80000301, 0x00001f69, + 0x80000301, 0x00001f68, 0x80000342, 0x00001f69, + 0x80000342, 0x000003b1, 0x80000300, 0x800003ac, + 0x000003b5, 0x80000300, 0x800003ad, 0x000003b7, + 0x80000300, 0x800003ae, 0x000003b9, 0x80000300, + 0x800003af, 0x000003bf, 0x80000300, 0x800003cc, + 0x000003c5, 0x80000300, 0x800003cd, 0x000003c9, + 0x80000300, 0x800003ce, 0x00001f00, 0x80000345, + 0x00001f01, 0x80000345, 0x00001f02, 0x80000345, + 0x00001f03, 0x80000345, 0x00001f04, 0x80000345, + 0x00001f05, 0x80000345, 0x00001f06, 0x80000345, + 0x00001f07, 0x80000345, 0x00001f08, 0x80000345, + 0x00001f09, 0x80000345, 0x00001f0a, 0x80000345, + 0x00001f0b, 0x80000345, 0x00001f0c, 0x80000345, + 0x00001f0d, 0x80000345, 0x00001f0e, 0x80000345, + 0x00001f0f, 0x80000345, 0x00001f20, 0x80000345, + 0x00001f21, 0x80000345, 0x00001f22, 0x80000345, + 0x00001f23, 0x80000345, 0x00001f24, 0x80000345, + 0x00001f25, 0x80000345, 0x00001f26, 0x80000345, + 0x00001f27, 0x80000345, 0x00001f28, 0x80000345, + 0x00001f29, 0x80000345, 0x00001f2a, 0x80000345, + 0x00001f2b, 0x80000345, 0x00001f2c, 0x80000345, + 0x00001f2d, 0x80000345, 0x00001f2e, 0x80000345, + 0x00001f2f, 0x80000345, 0x00001f60, 0x80000345, + 0x00001f61, 0x80000345, 0x00001f62, 0x80000345, + 0x00001f63, 0x80000345, 0x00001f64, 0x80000345, + 0x00001f65, 0x80000345, 0x00001f66, 0x80000345, + 0x00001f67, 0x80000345, 0x00001f68, 0x80000345, + 0x00001f69, 0x80000345, 0x00001f6a, 0x80000345, + 0x00001f6b, 0x80000345, 0x00001f6c, 0x80000345, + 0x00001f6d, 0x80000345, 0x00001f6e, 0x80000345, + 0x00001f6f, 0x80000345, 0x000003b1, 0x80000306, + 0x000003b1, 0x80000304, 0x00001f70, 0x80000345, + 0x000003b1, 0x80000345, 0x000003ac, 0x80000345, + 0x000003b1, 0x80000342, 0x00001fb6, 0x80000345, + 0x00000391, 0x80000306, 0x00000391, 0x80000304, + 0x00000391, 0x80000300, 0x80000386, 0x00000391, + 0x80000345, 0x00000020, 0x80000313, 0x800003b9, + 0x00000020, 0x80000313, 0x00000020, 0x80000342, + 0x000000a8, 0x80000342, 0x00001f74, 0x80000345, + 0x000003b7, 0x80000345, 0x000003ae, 0x80000345, + 0x000003b7, 0x80000342, 0x00001fc6, 0x80000345, + 0x00000395, 0x80000300, 0x80000388, 0x00000397, + 0x80000300, 0x80000389, 0x00000397, 0x80000345, + 0x00001fbf, 0x80000300, 0x00001fbf, 0x80000301, + 0x00001fbf, 0x80000342, 0x000003b9, 0x80000306, + 0x000003b9, 0x80000304, 0x000003ca, 0x80000300, + 0x80000390, 0x000003b9, 0x80000342, 0x000003ca, + 0x80000342, 0x00000399, 0x80000306, 0x00000399, + 0x80000304, 0x00000399, 0x80000300, 0x8000038a, + 0x00001ffe, 0x80000300, 0x00001ffe, 0x80000301, + 0x00001ffe, 0x80000342, 0x000003c5, 0x80000306, + 0x000003c5, 0x80000304, 0x000003cb, 0x80000300, + 0x800003b0, 0x000003c1, 0x80000313, 0x000003c1, + 0x80000314, 0x000003c5, 0x80000342, 0x000003cb, + 0x80000342, 0x000003a5, 0x80000306, 0x000003a5, + 0x80000304, 0x000003a5, 0x80000300, 0x8000038e, + 0x000003a1, 0x80000314, 0x000000a8, 0x80000300, + 0x80000385, 0x80000060, 0x00001f7c, 0x80000345, + 0x000003c9, 0x80000345, 0x000003ce, 0x80000345, + 0x000003c9, 0x80000342, 0x00001ff6, 0x80000345, + 0x0000039f, 0x80000300, 0x8000038c, 0x000003a9, + 0x80000300, 0x8000038f, 0x000003a9, 0x80000345, + 0x800000b4, 0x00000020, 0x80000314, 0x80002002, + 0x80002003, 0x80000020, 0x80000020, 0x80000020, + 0x80000020, 0x80000020, 0x80000020, 0x80000020, + 0x80000020, 0x80000020, 0x80002010, 0x00000020, + 0x80000333, 0x8000002e, 0x0000002e, 0x8000002e, + 0x0000002e, 0x0000002e, 0x8000002e, 0x80000020, + 0x00002032, 0x80002032, 0x00002032, 0x00002032, + 0x80002032, 0x00002035, 0x80002035, 0x00002035, + 0x00002035, 0x80002035, 0x00000021, 0x80000021, + 0x00000020, 0x80000305, 0x0000003f, 0x8000003f, + 0x0000003f, 0x80000021, 0x00000021, 0x8000003f, + 0x00002032, 0x00002032, 0x00002032, 0x80002032, + 0x80000020, 0x80000030, 0x80000069, 0x80000034, + 0x80000035, 0x80000036, 0x80000037, 0x80000038, + 0x80000039, 0x8000002b, 0x80002212, 0x8000003d, + 0x80000028, 0x80000029, 0x8000006e, 0x80000030, + 0x80000031, 0x80000032, 0x80000033, 0x80000034, + 0x80000035, 0x80000036, 0x80000037, 0x80000038, + 0x80000039, 0x8000002b, 0x80002212, 0x8000003d, + 0x80000028, 0x80000029, 0x00000052, 0x80000073, + 0x00000061, 0x0000002f, 0x80000063, 0x00000061, + 0x0000002f, 0x80000073, 0x80000043, 0x000000b0, + 0x80000043, 0x00000063, 0x0000002f, 0x8000006f, + 0x00000063, 0x0000002f, 0x80000075, 0x80000190, + 0x000000b0, 0x80000046, 0x80000067, 0x80000048, + 0x80000048, 0x80000048, 0x80000068, 0x80000127, + 0x80000049, 0x80000049, 0x8000004c, 0x8000006c, + 0x8000004e, 0x0000004e, 0x8000006f, 0x80000050, + 0x80000051, 0x80000052, 0x80000052, 0x80000052, + 0x00000053, 0x8000004d, 0x00000054, 0x00000045, + 0x8000004c, 0x00000054, 0x8000004d, 0x8000005a, + 0x800003a9, 0x8000005a, 0x8000004b, 0x800000c5, + 0x80000042, 0x80000043, 0x80000065, 0x80000045, + 0x80000046, 0x8000004d, 0x8000006f, 0x800005d0, + 0x800005d1, 0x800005d2, 0x800005d3, 0x80000069, + 0x800003b3, 0x80000393, 0x800003a0, 0x80002211, + 0x80000044, 0x80000064, 0x80000065, 0x80000069, + 0x8000006a, 0x00000031, 0x00002044, 0x80000033, + 0x00000032, 0x00002044, 0x80000033, 0x00000031, + 0x00002044, 0x80000035, 0x00000032, 0x00002044, + 0x80000035, 0x00000033, 0x00002044, 0x80000035, + 0x00000034, 0x00002044, 0x80000035, 0x00000031, + 0x00002044, 0x80000036, 0x00000035, 0x00002044, + 0x80000036, 0x00000031, 0x00002044, 0x80000038, + 0x00000033, 0x00002044, 0x80000038, 0x00000035, + 0x00002044, 0x80000038, 0x00000037, 0x00002044, + 0x80000038, 0x00000031, 0x80002044, 0x80000049, + 0x00000049, 0x80000049, 0x00000049, 0x00000049, + 0x80000049, 0x00000049, 0x80000056, 0x80000056, + 0x00000056, 0x80000049, 0x00000056, 0x00000049, + 0x80000049, 0x00000056, 0x00000049, 0x00000049, + 0x80000049, 0x00000049, 0x80000058, 0x80000058, + 0x00000058, 0x80000049, 0x00000058, 0x00000049, + 0x80000049, 0x8000004c, 0x80000043, 0x80000044, + 0x8000004d, 0x80000069, 0x00000069, 0x80000069, + 0x00000069, 0x00000069, 0x80000069, 0x00000069, + 0x80000076, 0x80000076, 0x00000076, 0x80000069, + 0x00000076, 0x00000069, 0x80000069, 0x00000076, + 0x00000069, 0x00000069, 0x80000069, 0x00000069, + 0x80000078, 0x80000078, 0x00000078, 0x80000069, + 0x00000078, 0x00000069, 0x80000069, 0x8000006c, + 0x80000063, 0x80000064, 0x8000006d, 0x00002190, + 0x80000338, 0x00002192, 0x80000338, 0x00002194, + 0x80000338, 0x000021d0, 0x80000338, 0x000021d4, + 0x80000338, 0x000021d2, 0x80000338, 0x00002203, + 0x80000338, 0x00002208, 0x80000338, 0x0000220b, + 0x80000338, 0x00002223, 0x80000338, 0x00002225, + 0x80000338, 0x0000222b, 0x8000222b, 0x0000222b, + 0x0000222b, 0x8000222b, 0x0000222e, 0x8000222e, + 0x0000222e, 0x0000222e, 0x8000222e, 0x0000223c, + 0x80000338, 0x00002243, 0x80000338, 0x00002245, + 0x80000338, 0x00002248, 0x80000338, 0x0000003d, + 0x80000338, 0x00002261, 0x80000338, 0x0000224d, + 0x80000338, 0x0000003c, 0x80000338, 0x0000003e, + 0x80000338, 0x00002264, 0x80000338, 0x00002265, + 0x80000338, 0x00002272, 0x80000338, 0x00002273, + 0x80000338, 0x00002276, 0x80000338, 0x00002277, + 0x80000338, 0x0000227a, 0x80000338, 0x0000227b, + 0x80000338, 0x00002282, 0x80000338, 0x00002283, + 0x80000338, 0x00002286, 0x80000338, 0x00002287, + 0x80000338, 0x000022a2, 0x80000338, 0x000022a8, + 0x80000338, 0x000022a9, 0x80000338, 0x000022ab, + 0x80000338, 0x0000227c, 0x80000338, 0x0000227d, + 0x80000338, 0x00002291, 0x80000338, 0x00002292, + 0x80000338, 0x000022b2, 0x80000338, 0x000022b3, + 0x80000338, 0x000022b4, 0x80000338, 0x000022b5, + 0x80000338, 0x80003008, 0x80003009, 0x80000031, + 0x80000032, 0x80000033, 0x80000034, 0x80000035, + 0x80000036, 0x80000037, 0x80000038, 0x80000039, + 0x00000031, 0x80000030, 0x00000031, 0x80000031, + 0x00000031, 0x80000032, 0x00000031, 0x80000033, + 0x00000031, 0x80000034, 0x00000031, 0x80000035, + 0x00000031, 0x80000036, 0x00000031, 0x80000037, + 0x00000031, 0x80000038, 0x00000031, 0x80000039, + 0x00000032, 0x80000030, 0x00000028, 0x00000031, + 0x80000029, 0x00000028, 0x00000032, 0x80000029, + 0x00000028, 0x00000033, 0x80000029, 0x00000028, + 0x00000034, 0x80000029, 0x00000028, 0x00000035, + 0x80000029, 0x00000028, 0x00000036, 0x80000029, + 0x00000028, 0x00000037, 0x80000029, 0x00000028, + 0x00000038, 0x80000029, 0x00000028, 0x00000039, + 0x80000029, 0x00000028, 0x00000031, 0x00000030, + 0x80000029, 0x00000028, 0x00000031, 0x00000031, + 0x80000029, 0x00000028, 0x00000031, 0x00000032, + 0x80000029, 0x00000028, 0x00000031, 0x00000033, + 0x80000029, 0x00000028, 0x00000031, 0x00000034, + 0x80000029, 0x00000028, 0x00000031, 0x00000035, + 0x80000029, 0x00000028, 0x00000031, 0x00000036, + 0x80000029, 0x00000028, 0x00000031, 0x00000037, + 0x80000029, 0x00000028, 0x00000031, 0x00000038, + 0x80000029, 0x00000028, 0x00000031, 0x00000039, + 0x80000029, 0x00000028, 0x00000032, 0x00000030, + 0x80000029, 0x00000031, 0x8000002e, 0x00000032, + 0x8000002e, 0x00000033, 0x8000002e, 0x00000034, + 0x8000002e, 0x00000035, 0x8000002e, 0x00000036, + 0x8000002e, 0x00000037, 0x8000002e, 0x00000038, + 0x8000002e, 0x00000039, 0x8000002e, 0x00000031, + 0x00000030, 0x8000002e, 0x00000031, 0x00000031, + 0x8000002e, 0x00000031, 0x00000032, 0x8000002e, + 0x00000031, 0x00000033, 0x8000002e, 0x00000031, + 0x00000034, 0x8000002e, 0x00000031, 0x00000035, + 0x8000002e, 0x00000031, 0x00000036, 0x8000002e, + 0x00000031, 0x00000037, 0x8000002e, 0x00000031, + 0x00000038, 0x8000002e, 0x00000031, 0x00000039, + 0x8000002e, 0x00000032, 0x00000030, 0x8000002e, + 0x00000028, 0x00000061, 0x80000029, 0x00000028, + 0x00000062, 0x80000029, 0x00000028, 0x00000063, + 0x80000029, 0x00000028, 0x00000064, 0x80000029, + 0x00000028, 0x00000065, 0x80000029, 0x00000028, + 0x00000066, 0x80000029, 0x00000028, 0x00000067, + 0x80000029, 0x00000028, 0x00000068, 0x80000029, + 0x00000028, 0x00000069, 0x80000029, 0x00000028, + 0x0000006a, 0x80000029, 0x00000028, 0x0000006b, + 0x80000029, 0x00000028, 0x0000006c, 0x80000029, + 0x00000028, 0x0000006d, 0x80000029, 0x00000028, + 0x0000006e, 0x80000029, 0x00000028, 0x0000006f, + 0x80000029, 0x00000028, 0x00000070, 0x80000029, + 0x00000028, 0x00000071, 0x80000029, 0x00000028, + 0x00000072, 0x80000029, 0x00000028, 0x00000073, + 0x80000029, 0x00000028, 0x00000074, 0x80000029, + 0x00000028, 0x00000075, 0x80000029, 0x00000028, + 0x00000076, 0x80000029, 0x00000028, 0x00000077, + 0x80000029, 0x00000028, 0x00000078, 0x80000029, + 0x00000028, 0x00000079, 0x80000029, 0x00000028, + 0x0000007a, 0x80000029, 0x80000041, 0x80000042, + 0x80000043, 0x80000044, 0x80000045, 0x80000046, + 0x80000047, 0x80000048, 0x80000049, 0x8000004a, + 0x8000004b, 0x8000004c, 0x8000004d, 0x8000004e, + 0x8000004f, 0x80000050, 0x80000051, 0x80000052, + 0x80000053, 0x80000054, 0x80000055, 0x80000056, + 0x80000057, 0x80000058, 0x80000059, 0x8000005a, + 0x80000061, 0x80000062, 0x80000063, 0x80000064, + 0x80000065, 0x80000066, 0x80000067, 0x80000068, + 0x80000069, 0x8000006a, 0x8000006b, 0x8000006c, + 0x8000006d, 0x8000006e, 0x8000006f, 0x80000070, + 0x80000071, 0x80000072, 0x80000073, 0x80000074, + 0x80000075, 0x80000076, 0x80000077, 0x80000078, + 0x80000079, 0x8000007a, 0x80000030, 0x0000222b, + 0x0000222b, 0x0000222b, 0x8000222b, 0x0000003a, + 0x0000003a, 0x8000003d, 0x0000003d, 0x8000003d, + 0x0000003d, 0x0000003d, 0x8000003d, 0x00002add, + 0x80000338, 0x80006bcd, 0x80009f9f, 0x80004e00, + 0x80004e28, 0x80004e36, 0x80004e3f, 0x80004e59, + 0x80004e85, 0x80004e8c, 0x80004ea0, 0x80004eba, + 0x8000513f, 0x80005165, 0x8000516b, 0x80005182, + 0x80005196, 0x800051ab, 0x800051e0, 0x800051f5, + 0x80005200, 0x8000529b, 0x800052f9, 0x80005315, + 0x8000531a, 0x80005338, 0x80005341, 0x8000535c, + 0x80005369, 0x80005382, 0x800053b6, 0x800053c8, + 0x800053e3, 0x800056d7, 0x8000571f, 0x800058eb, + 0x80005902, 0x8000590a, 0x80005915, 0x80005927, + 0x80005973, 0x80005b50, 0x80005b80, 0x80005bf8, + 0x80005c0f, 0x80005c22, 0x80005c38, 0x80005c6e, + 0x80005c71, 0x80005ddb, 0x80005de5, 0x80005df1, + 0x80005dfe, 0x80005e72, 0x80005e7a, 0x80005e7f, + 0x80005ef4, 0x80005efe, 0x80005f0b, 0x80005f13, + 0x80005f50, 0x80005f61, 0x80005f73, 0x80005fc3, + 0x80006208, 0x80006236, 0x8000624b, 0x8000652f, + 0x80006534, 0x80006587, 0x80006597, 0x800065a4, + 0x800065b9, 0x800065e0, 0x800065e5, 0x800066f0, + 0x80006708, 0x80006728, 0x80006b20, 0x80006b62, + 0x80006b79, 0x80006bb3, 0x80006bcb, 0x80006bd4, + 0x80006bdb, 0x80006c0f, 0x80006c14, 0x80006c34, + 0x8000706b, 0x8000722a, 0x80007236, 0x8000723b, + 0x8000723f, 0x80007247, 0x80007259, 0x8000725b, + 0x800072ac, 0x80007384, 0x80007389, 0x800074dc, + 0x800074e6, 0x80007518, 0x8000751f, 0x80007528, + 0x80007530, 0x8000758b, 0x80007592, 0x80007676, + 0x8000767d, 0x800076ae, 0x800076bf, 0x800076ee, + 0x800077db, 0x800077e2, 0x800077f3, 0x8000793a, + 0x800079b8, 0x800079be, 0x80007a74, 0x80007acb, + 0x80007af9, 0x80007c73, 0x80007cf8, 0x80007f36, + 0x80007f51, 0x80007f8a, 0x80007fbd, 0x80008001, + 0x8000800c, 0x80008012, 0x80008033, 0x8000807f, + 0x80008089, 0x800081e3, 0x800081ea, 0x800081f3, + 0x800081fc, 0x8000820c, 0x8000821b, 0x8000821f, + 0x8000826e, 0x80008272, 0x80008278, 0x8000864d, + 0x8000866b, 0x80008840, 0x8000884c, 0x80008863, + 0x8000897e, 0x8000898b, 0x800089d2, 0x80008a00, + 0x80008c37, 0x80008c46, 0x80008c55, 0x80008c78, + 0x80008c9d, 0x80008d64, 0x80008d70, 0x80008db3, + 0x80008eab, 0x80008eca, 0x80008f9b, 0x80008fb0, + 0x80008fb5, 0x80009091, 0x80009149, 0x800091c6, + 0x800091cc, 0x800091d1, 0x80009577, 0x80009580, + 0x8000961c, 0x800096b6, 0x800096b9, 0x800096e8, + 0x80009751, 0x8000975e, 0x80009762, 0x80009769, + 0x800097cb, 0x800097ed, 0x800097f3, 0x80009801, + 0x800098a8, 0x800098db, 0x800098df, 0x80009996, + 0x80009999, 0x800099ac, 0x80009aa8, 0x80009ad8, + 0x80009adf, 0x80009b25, 0x80009b2f, 0x80009b32, + 0x80009b3c, 0x80009b5a, 0x80009ce5, 0x80009e75, + 0x80009e7f, 0x80009ea5, 0x80009ebb, 0x80009ec3, + 0x80009ecd, 0x80009ed1, 0x80009ef9, 0x80009efd, + 0x80009f0e, 0x80009f13, 0x80009f20, 0x80009f3b, + 0x80009f4a, 0x80009f52, 0x80009f8d, 0x80009f9c, + 0x80009fa0, 0x80000020, 0x80003012, 0x80005341, + 0x80005344, 0x80005345, 0x0000304b, 0x80003099, + 0x0000304d, 0x80003099, 0x0000304f, 0x80003099, + 0x00003051, 0x80003099, 0x00003053, 0x80003099, + 0x00003055, 0x80003099, 0x00003057, 0x80003099, + 0x00003059, 0x80003099, 0x0000305b, 0x80003099, + 0x0000305d, 0x80003099, 0x0000305f, 0x80003099, + 0x00003061, 0x80003099, 0x00003064, 0x80003099, + 0x00003066, 0x80003099, 0x00003068, 0x80003099, + 0x0000306f, 0x80003099, 0x0000306f, 0x8000309a, + 0x00003072, 0x80003099, 0x00003072, 0x8000309a, + 0x00003075, 0x80003099, 0x00003075, 0x8000309a, + 0x00003078, 0x80003099, 0x00003078, 0x8000309a, + 0x0000307b, 0x80003099, 0x0000307b, 0x8000309a, + 0x00003046, 0x80003099, 0x00000020, 0x80003099, + 0x00000020, 0x8000309a, 0x0000309d, 0x80003099, + 0x00003088, 0x8000308a, 0x000030ab, 0x80003099, + 0x000030ad, 0x80003099, 0x000030af, 0x80003099, + 0x000030b1, 0x80003099, 0x000030b3, 0x80003099, + 0x000030b5, 0x80003099, 0x000030b7, 0x80003099, + 0x000030b9, 0x80003099, 0x000030bb, 0x80003099, + 0x000030bd, 0x80003099, 0x000030bf, 0x80003099, + 0x000030c1, 0x80003099, 0x000030c4, 0x80003099, + 0x000030c6, 0x80003099, 0x000030c8, 0x80003099, + 0x000030cf, 0x80003099, 0x000030cf, 0x8000309a, + 0x000030d2, 0x80003099, 0x000030d2, 0x8000309a, + 0x000030d5, 0x80003099, 0x000030d5, 0x8000309a, + 0x000030d8, 0x80003099, 0x000030d8, 0x8000309a, + 0x000030db, 0x80003099, 0x000030db, 0x8000309a, + 0x000030a6, 0x80003099, 0x000030ef, 0x80003099, + 0x000030f0, 0x80003099, 0x000030f1, 0x80003099, + 0x000030f2, 0x80003099, 0x000030fd, 0x80003099, + 0x000030b3, 0x800030c8, 0x80001100, 0x80001101, + 0x800011aa, 0x80001102, 0x800011ac, 0x800011ad, + 0x80001103, 0x80001104, 0x80001105, 0x800011b0, + 0x800011b1, 0x800011b2, 0x800011b3, 0x800011b4, + 0x800011b5, 0x8000111a, 0x80001106, 0x80001107, + 0x80001108, 0x80001121, 0x80001109, 0x8000110a, + 0x8000110b, 0x8000110c, 0x8000110d, 0x8000110e, + 0x8000110f, 0x80001110, 0x80001111, 0x80001112, + 0x80001161, 0x80001162, 0x80001163, 0x80001164, + 0x80001165, 0x80001166, 0x80001167, 0x80001168, + 0x80001169, 0x8000116a, 0x8000116b, 0x8000116c, + 0x8000116d, 0x8000116e, 0x8000116f, 0x80001170, + 0x80001171, 0x80001172, 0x80001173, 0x80001174, + 0x80001175, 0x80001160, 0x80001114, 0x80001115, + 0x800011c7, 0x800011c8, 0x800011cc, 0x800011ce, + 0x800011d3, 0x800011d7, 0x800011d9, 0x8000111c, + 0x800011dd, 0x800011df, 0x8000111d, 0x8000111e, + 0x80001120, 0x80001122, 0x80001123, 0x80001127, + 0x80001129, 0x8000112b, 0x8000112c, 0x8000112d, + 0x8000112e, 0x8000112f, 0x80001132, 0x80001136, + 0x80001140, 0x80001147, 0x8000114c, 0x800011f1, + 0x800011f2, 0x80001157, 0x80001158, 0x80001159, + 0x80001184, 0x80001185, 0x80001188, 0x80001191, + 0x80001192, 0x80001194, 0x8000119e, 0x800011a1, + 0x80004e00, 0x80004e8c, 0x80004e09, 0x800056db, + 0x80004e0a, 0x80004e2d, 0x80004e0b, 0x80007532, + 0x80004e59, 0x80004e19, 0x80004e01, 0x80005929, + 0x80005730, 0x80004eba, 0x00000028, 0x00001100, + 0x80000029, 0x00000028, 0x00001102, 0x80000029, + 0x00000028, 0x00001103, 0x80000029, 0x00000028, + 0x00001105, 0x80000029, 0x00000028, 0x00001106, + 0x80000029, 0x00000028, 0x00001107, 0x80000029, + 0x00000028, 0x00001109, 0x80000029, 0x00000028, + 0x0000110b, 0x80000029, 0x00000028, 0x0000110c, + 0x80000029, 0x00000028, 0x0000110e, 0x80000029, + 0x00000028, 0x0000110f, 0x80000029, 0x00000028, + 0x00001110, 0x80000029, 0x00000028, 0x00001111, + 0x80000029, 0x00000028, 0x00001112, 0x80000029, + 0x00000028, 0x00001100, 0x00001161, 0x80000029, + 0x00000028, 0x00001102, 0x00001161, 0x80000029, + 0x00000028, 0x00001103, 0x00001161, 0x80000029, + 0x00000028, 0x00001105, 0x00001161, 0x80000029, + 0x00000028, 0x00001106, 0x00001161, 0x80000029, + 0x00000028, 0x00001107, 0x00001161, 0x80000029, + 0x00000028, 0x00001109, 0x00001161, 0x80000029, + 0x00000028, 0x0000110b, 0x00001161, 0x80000029, + 0x00000028, 0x0000110c, 0x00001161, 0x80000029, + 0x00000028, 0x0000110e, 0x00001161, 0x80000029, + 0x00000028, 0x0000110f, 0x00001161, 0x80000029, + 0x00000028, 0x00001110, 0x00001161, 0x80000029, + 0x00000028, 0x00001111, 0x00001161, 0x80000029, + 0x00000028, 0x00001112, 0x00001161, 0x80000029, + 0x00000028, 0x0000110c, 0x0000116e, 0x80000029, + 0x00000028, 0x00004e00, 0x80000029, 0x00000028, + 0x00004e8c, 0x80000029, 0x00000028, 0x00004e09, + 0x80000029, 0x00000028, 0x000056db, 0x80000029, + 0x00000028, 0x00004e94, 0x80000029, 0x00000028, + 0x0000516d, 0x80000029, 0x00000028, 0x00004e03, + 0x80000029, 0x00000028, 0x0000516b, 0x80000029, + 0x00000028, 0x00004e5d, 0x80000029, 0x00000028, + 0x00005341, 0x80000029, 0x00000028, 0x00006708, + 0x80000029, 0x00000028, 0x0000706b, 0x80000029, + 0x00000028, 0x00006c34, 0x80000029, 0x00000028, + 0x00006728, 0x80000029, 0x00000028, 0x000091d1, + 0x80000029, 0x00000028, 0x0000571f, 0x80000029, + 0x00000028, 0x000065e5, 0x80000029, 0x00000028, + 0x0000682a, 0x80000029, 0x00000028, 0x00006709, + 0x80000029, 0x00000028, 0x0000793e, 0x80000029, + 0x00000028, 0x0000540d, 0x80000029, 0x00000028, + 0x00007279, 0x80000029, 0x00000028, 0x00008ca1, + 0x80000029, 0x00000028, 0x0000795d, 0x80000029, + 0x00000028, 0x000052b4, 0x80000029, 0x00000028, + 0x00004ee3, 0x80000029, 0x00000028, 0x0000547c, + 0x80000029, 0x00000028, 0x00005b66, 0x80000029, + 0x00000028, 0x000076e3, 0x80000029, 0x00000028, + 0x00004f01, 0x80000029, 0x00000028, 0x00008cc7, + 0x80000029, 0x00000028, 0x00005354, 0x80000029, + 0x00000028, 0x0000796d, 0x80000029, 0x00000028, + 0x00004f11, 0x80000029, 0x00000028, 0x000081ea, + 0x80000029, 0x00000028, 0x000081f3, 0x80000029, + 0x00000032, 0x80000031, 0x00000032, 0x80000032, + 0x00000032, 0x80000033, 0x00000032, 0x80000034, + 0x00000032, 0x80000035, 0x00000032, 0x80000036, + 0x00000032, 0x80000037, 0x00000032, 0x80000038, + 0x00000032, 0x80000039, 0x00000033, 0x80000030, + 0x00000033, 0x80000031, 0x00000033, 0x80000032, + 0x00000033, 0x80000033, 0x00000033, 0x80000034, + 0x00000033, 0x80000035, 0x80001100, 0x80001102, + 0x80001103, 0x80001105, 0x80001106, 0x80001107, + 0x80001109, 0x8000110b, 0x8000110c, 0x8000110e, + 0x8000110f, 0x80001110, 0x80001111, 0x80001112, + 0x00001100, 0x80001161, 0x00001102, 0x80001161, + 0x00001103, 0x80001161, 0x00001105, 0x80001161, + 0x00001106, 0x80001161, 0x00001107, 0x80001161, + 0x00001109, 0x80001161, 0x0000110b, 0x80001161, + 0x0000110c, 0x80001161, 0x0000110e, 0x80001161, + 0x0000110f, 0x80001161, 0x00001110, 0x80001161, + 0x00001111, 0x80001161, 0x00001112, 0x80001161, + 0x80004e00, 0x80004e8c, 0x80004e09, 0x800056db, + 0x80004e94, 0x8000516d, 0x80004e03, 0x8000516b, + 0x80004e5d, 0x80005341, 0x80006708, 0x8000706b, + 0x80006c34, 0x80006728, 0x800091d1, 0x8000571f, + 0x800065e5, 0x8000682a, 0x80006709, 0x8000793e, + 0x8000540d, 0x80007279, 0x80008ca1, 0x8000795d, + 0x800052b4, 0x800079d8, 0x80007537, 0x80005973, + 0x80009069, 0x8000512a, 0x80005370, 0x80006ce8, + 0x80009805, 0x80004f11, 0x80005199, 0x80006b63, + 0x80004e0a, 0x80004e2d, 0x80004e0b, 0x80005de6, + 0x800053f3, 0x8000533b, 0x80005b97, 0x80005b66, + 0x800076e3, 0x80004f01, 0x80008cc7, 0x80005354, + 0x8000591c, 0x00000033, 0x80000036, 0x00000033, + 0x80000037, 0x00000033, 0x80000038, 0x00000033, + 0x80000039, 0x00000034, 0x80000030, 0x00000034, + 0x80000031, 0x00000034, 0x80000032, 0x00000034, + 0x80000033, 0x00000034, 0x80000034, 0x00000034, + 0x80000035, 0x00000034, 0x80000036, 0x00000034, + 0x80000037, 0x00000034, 0x80000038, 0x00000034, + 0x80000039, 0x00000035, 0x80000030, 0x00000031, + 0x80006708, 0x00000032, 0x80006708, 0x00000033, + 0x80006708, 0x00000034, 0x80006708, 0x00000035, + 0x80006708, 0x00000036, 0x80006708, 0x00000037, + 0x80006708, 0x00000038, 0x80006708, 0x00000039, + 0x80006708, 0x00000031, 0x00000030, 0x80006708, + 0x00000031, 0x00000031, 0x80006708, 0x00000031, + 0x00000032, 0x80006708, 0x800030a2, 0x800030a4, + 0x800030a6, 0x800030a8, 0x800030aa, 0x800030ab, + 0x800030ad, 0x800030af, 0x800030b1, 0x800030b3, + 0x800030b5, 0x800030b7, 0x800030b9, 0x800030bb, + 0x800030bd, 0x800030bf, 0x800030c1, 0x800030c4, + 0x800030c6, 0x800030c8, 0x800030ca, 0x800030cb, + 0x800030cc, 0x800030cd, 0x800030ce, 0x800030cf, + 0x800030d2, 0x800030d5, 0x800030d8, 0x800030db, + 0x800030de, 0x800030df, 0x800030e0, 0x800030e1, + 0x800030e2, 0x800030e4, 0x800030e6, 0x800030e8, + 0x800030e9, 0x800030ea, 0x800030eb, 0x800030ec, + 0x800030ed, 0x800030ef, 0x800030f0, 0x800030f1, + 0x800030f2, 0x000030a2, 0x000030d1, 0x000030fc, + 0x800030c8, 0x000030a2, 0x000030eb, 0x000030d5, + 0x800030a1, 0x000030a2, 0x000030f3, 0x000030da, + 0x800030a2, 0x000030a2, 0x000030fc, 0x800030eb, + 0x000030a4, 0x000030cb, 0x000030f3, 0x800030b0, + 0x000030a4, 0x000030f3, 0x800030c1, 0x000030a6, + 0x000030a9, 0x800030f3, 0x000030a8, 0x000030b9, + 0x000030af, 0x000030fc, 0x800030c9, 0x000030a8, + 0x000030fc, 0x000030ab, 0x800030fc, 0x000030aa, + 0x000030f3, 0x800030b9, 0x000030aa, 0x000030fc, + 0x800030e0, 0x000030ab, 0x000030a4, 0x800030ea, + 0x000030ab, 0x000030e9, 0x000030c3, 0x800030c8, + 0x000030ab, 0x000030ed, 0x000030ea, 0x800030fc, + 0x000030ac, 0x000030ed, 0x800030f3, 0x000030ac, + 0x000030f3, 0x800030de, 0x000030ae, 0x800030ac, + 0x000030ae, 0x000030cb, 0x800030fc, 0x000030ad, + 0x000030e5, 0x000030ea, 0x800030fc, 0x000030ae, + 0x000030eb, 0x000030c0, 0x800030fc, 0x000030ad, + 0x800030ed, 0x000030ad, 0x000030ed, 0x000030b0, + 0x000030e9, 0x800030e0, 0x000030ad, 0x000030ed, + 0x000030e1, 0x000030fc, 0x000030c8, 0x800030eb, + 0x000030ad, 0x000030ed, 0x000030ef, 0x000030c3, + 0x800030c8, 0x000030b0, 0x000030e9, 0x800030e0, + 0x000030b0, 0x000030e9, 0x000030e0, 0x000030c8, + 0x800030f3, 0x000030af, 0x000030eb, 0x000030bc, + 0x000030a4, 0x800030ed, 0x000030af, 0x000030ed, + 0x000030fc, 0x800030cd, 0x000030b1, 0x000030fc, + 0x800030b9, 0x000030b3, 0x000030eb, 0x800030ca, + 0x000030b3, 0x000030fc, 0x800030dd, 0x000030b5, + 0x000030a4, 0x000030af, 0x800030eb, 0x000030b5, + 0x000030f3, 0x000030c1, 0x000030fc, 0x800030e0, + 0x000030b7, 0x000030ea, 0x000030f3, 0x800030b0, + 0x000030bb, 0x000030f3, 0x800030c1, 0x000030bb, + 0x000030f3, 0x800030c8, 0x000030c0, 0x000030fc, + 0x800030b9, 0x000030c7, 0x800030b7, 0x000030c9, + 0x800030eb, 0x000030c8, 0x800030f3, 0x000030ca, + 0x800030ce, 0x000030ce, 0x000030c3, 0x800030c8, + 0x000030cf, 0x000030a4, 0x800030c4, 0x000030d1, + 0x000030fc, 0x000030bb, 0x000030f3, 0x800030c8, + 0x000030d1, 0x000030fc, 0x800030c4, 0x000030d0, + 0x000030fc, 0x000030ec, 0x800030eb, 0x000030d4, + 0x000030a2, 0x000030b9, 0x000030c8, 0x800030eb, + 0x000030d4, 0x000030af, 0x800030eb, 0x000030d4, + 0x800030b3, 0x000030d3, 0x800030eb, 0x000030d5, + 0x000030a1, 0x000030e9, 0x000030c3, 0x800030c9, + 0x000030d5, 0x000030a3, 0x000030fc, 0x800030c8, + 0x000030d6, 0x000030c3, 0x000030b7, 0x000030a7, + 0x800030eb, 0x000030d5, 0x000030e9, 0x800030f3, + 0x000030d8, 0x000030af, 0x000030bf, 0x000030fc, + 0x800030eb, 0x000030da, 0x800030bd, 0x000030da, + 0x000030cb, 0x800030d2, 0x000030d8, 0x000030eb, + 0x800030c4, 0x000030da, 0x000030f3, 0x800030b9, + 0x000030da, 0x000030fc, 0x800030b8, 0x000030d9, + 0x000030fc, 0x800030bf, 0x000030dd, 0x000030a4, + 0x000030f3, 0x800030c8, 0x000030dc, 0x000030eb, + 0x800030c8, 0x000030db, 0x800030f3, 0x000030dd, + 0x000030f3, 0x800030c9, 0x000030db, 0x000030fc, + 0x800030eb, 0x000030db, 0x000030fc, 0x800030f3, + 0x000030de, 0x000030a4, 0x000030af, 0x800030ed, + 0x000030de, 0x000030a4, 0x800030eb, 0x000030de, + 0x000030c3, 0x800030cf, 0x000030de, 0x000030eb, + 0x800030af, 0x000030de, 0x000030f3, 0x000030b7, + 0x000030e7, 0x800030f3, 0x000030df, 0x000030af, + 0x000030ed, 0x800030f3, 0x000030df, 0x800030ea, + 0x000030df, 0x000030ea, 0x000030d0, 0x000030fc, + 0x800030eb, 0x000030e1, 0x800030ac, 0x000030e1, + 0x000030ac, 0x000030c8, 0x800030f3, 0x000030e1, + 0x000030fc, 0x000030c8, 0x800030eb, 0x000030e4, + 0x000030fc, 0x800030c9, 0x000030e4, 0x000030fc, + 0x800030eb, 0x000030e6, 0x000030a2, 0x800030f3, + 0x000030ea, 0x000030c3, 0x000030c8, 0x800030eb, + 0x000030ea, 0x800030e9, 0x000030eb, 0x000030d4, + 0x800030fc, 0x000030eb, 0x000030fc, 0x000030d6, + 0x800030eb, 0x000030ec, 0x800030e0, 0x000030ec, + 0x000030f3, 0x000030c8, 0x000030b2, 0x800030f3, + 0x000030ef, 0x000030c3, 0x800030c8, 0x00000030, + 0x800070b9, 0x00000031, 0x800070b9, 0x00000032, + 0x800070b9, 0x00000033, 0x800070b9, 0x00000034, + 0x800070b9, 0x00000035, 0x800070b9, 0x00000036, + 0x800070b9, 0x00000037, 0x800070b9, 0x00000038, + 0x800070b9, 0x00000039, 0x800070b9, 0x00000031, + 0x00000030, 0x800070b9, 0x00000031, 0x00000031, + 0x800070b9, 0x00000031, 0x00000032, 0x800070b9, + 0x00000031, 0x00000033, 0x800070b9, 0x00000031, + 0x00000034, 0x800070b9, 0x00000031, 0x00000035, + 0x800070b9, 0x00000031, 0x00000036, 0x800070b9, + 0x00000031, 0x00000037, 0x800070b9, 0x00000031, + 0x00000038, 0x800070b9, 0x00000031, 0x00000039, + 0x800070b9, 0x00000032, 0x00000030, 0x800070b9, + 0x00000032, 0x00000031, 0x800070b9, 0x00000032, + 0x00000032, 0x800070b9, 0x00000032, 0x00000033, + 0x800070b9, 0x00000032, 0x00000034, 0x800070b9, + 0x00000068, 0x00000050, 0x80000061, 0x00000064, + 0x80000061, 0x00000041, 0x80000055, 0x00000062, + 0x00000061, 0x80000072, 0x0000006f, 0x80000056, + 0x00000070, 0x80000063, 0x00005e73, 0x80006210, + 0x0000662d, 0x8000548c, 0x00005927, 0x80006b63, + 0x0000660e, 0x80006cbb, 0x0000682a, 0x00005f0f, + 0x00004f1a, 0x8000793e, 0x00000070, 0x80000041, + 0x0000006e, 0x80000041, 0x000003bc, 0x80000041, + 0x0000006d, 0x80000041, 0x0000006b, 0x80000041, + 0x0000004b, 0x80000042, 0x0000004d, 0x80000042, + 0x00000047, 0x80000042, 0x00000063, 0x00000061, + 0x8000006c, 0x0000006b, 0x00000063, 0x00000061, + 0x8000006c, 0x00000070, 0x80000046, 0x0000006e, + 0x80000046, 0x000003bc, 0x80000046, 0x000003bc, + 0x80000067, 0x0000006d, 0x80000067, 0x0000006b, + 0x80000067, 0x00000048, 0x8000007a, 0x0000006b, + 0x00000048, 0x8000007a, 0x0000004d, 0x00000048, + 0x8000007a, 0x00000047, 0x00000048, 0x8000007a, + 0x00000054, 0x00000048, 0x8000007a, 0x000003bc, + 0x80002113, 0x0000006d, 0x80002113, 0x00000064, + 0x80002113, 0x0000006b, 0x80002113, 0x00000066, + 0x8000006d, 0x0000006e, 0x8000006d, 0x000003bc, + 0x8000006d, 0x0000006d, 0x8000006d, 0x00000063, + 0x8000006d, 0x0000006b, 0x8000006d, 0x0000006d, + 0x0000006d, 0x800000b2, 0x00000063, 0x0000006d, + 0x800000b2, 0x0000006d, 0x800000b2, 0x0000006b, + 0x0000006d, 0x800000b2, 0x0000006d, 0x0000006d, + 0x800000b3, 0x00000063, 0x0000006d, 0x800000b3, + 0x0000006d, 0x800000b3, 0x0000006b, 0x0000006d, + 0x800000b3, 0x0000006d, 0x00002215, 0x80000073, + 0x0000006d, 0x00002215, 0x00000073, 0x800000b2, + 0x00000050, 0x80000061, 0x0000006b, 0x00000050, + 0x80000061, 0x0000004d, 0x00000050, 0x80000061, + 0x00000047, 0x00000050, 0x80000061, 0x00000072, + 0x00000061, 0x80000064, 0x00000072, 0x00000061, + 0x00000064, 0x00002215, 0x80000073, 0x00000072, + 0x00000061, 0x00000064, 0x00002215, 0x00000073, + 0x800000b2, 0x00000070, 0x80000073, 0x0000006e, + 0x80000073, 0x000003bc, 0x80000073, 0x0000006d, + 0x80000073, 0x00000070, 0x80000056, 0x0000006e, + 0x80000056, 0x000003bc, 0x80000056, 0x0000006d, + 0x80000056, 0x0000006b, 0x80000056, 0x0000004d, + 0x80000056, 0x00000070, 0x80000057, 0x0000006e, + 0x80000057, 0x000003bc, 0x80000057, 0x0000006d, + 0x80000057, 0x0000006b, 0x80000057, 0x0000004d, + 0x80000057, 0x0000006b, 0x800003a9, 0x0000004d, + 0x800003a9, 0x00000061, 0x0000002e, 0x0000006d, + 0x8000002e, 0x00000042, 0x80000071, 0x00000063, + 0x80000063, 0x00000063, 0x80000064, 0x00000043, + 0x00002215, 0x0000006b, 0x80000067, 0x00000043, + 0x0000006f, 0x8000002e, 0x00000064, 0x80000042, + 0x00000047, 0x80000079, 0x00000068, 0x80000061, + 0x00000048, 0x80000050, 0x00000069, 0x8000006e, + 0x0000004b, 0x8000004b, 0x0000004b, 0x8000004d, + 0x0000006b, 0x80000074, 0x0000006c, 0x8000006d, + 0x0000006c, 0x8000006e, 0x0000006c, 0x0000006f, + 0x80000067, 0x0000006c, 0x80000078, 0x0000006d, + 0x80000062, 0x0000006d, 0x00000069, 0x8000006c, + 0x0000006d, 0x0000006f, 0x8000006c, 0x00000050, + 0x80000048, 0x00000070, 0x0000002e, 0x0000006d, + 0x8000002e, 0x00000050, 0x00000050, 0x8000004d, + 0x00000050, 0x80000052, 0x00000073, 0x80000072, + 0x00000053, 0x80000076, 0x00000057, 0x80000062, + 0x00000031, 0x800065e5, 0x00000032, 0x800065e5, + 0x00000033, 0x800065e5, 0x00000034, 0x800065e5, + 0x00000035, 0x800065e5, 0x00000036, 0x800065e5, + 0x00000037, 0x800065e5, 0x00000038, 0x800065e5, + 0x00000039, 0x800065e5, 0x00000031, 0x00000030, + 0x800065e5, 0x00000031, 0x00000031, 0x800065e5, + 0x00000031, 0x00000032, 0x800065e5, 0x00000031, + 0x00000033, 0x800065e5, 0x00000031, 0x00000034, + 0x800065e5, 0x00000031, 0x00000035, 0x800065e5, + 0x00000031, 0x00000036, 0x800065e5, 0x00000031, + 0x00000037, 0x800065e5, 0x00000031, 0x00000038, + 0x800065e5, 0x00000031, 0x00000039, 0x800065e5, + 0x00000032, 0x00000030, 0x800065e5, 0x00000032, + 0x00000031, 0x800065e5, 0x00000032, 0x00000032, + 0x800065e5, 0x00000032, 0x00000033, 0x800065e5, + 0x00000032, 0x00000034, 0x800065e5, 0x00000032, + 0x00000035, 0x800065e5, 0x00000032, 0x00000036, + 0x800065e5, 0x00000032, 0x00000037, 0x800065e5, + 0x00000032, 0x00000038, 0x800065e5, 0x00000032, + 0x00000039, 0x800065e5, 0x00000033, 0x00000030, + 0x800065e5, 0x00000033, 0x00000031, 0x800065e5, + 0x80008c48, 0x800066f4, 0x80008eca, 0x80008cc8, + 0x80006ed1, 0x80004e32, 0x800053e5, 0x80009f9c, + 0x80009f9c, 0x80005951, 0x800091d1, 0x80005587, + 0x80005948, 0x800061f6, 0x80007669, 0x80007f85, + 0x8000863f, 0x800087ba, 0x800088f8, 0x8000908f, + 0x80006a02, 0x80006d1b, 0x800070d9, 0x800073de, + 0x8000843d, 0x8000916a, 0x800099f1, 0x80004e82, + 0x80005375, 0x80006b04, 0x8000721b, 0x8000862d, + 0x80009e1e, 0x80005d50, 0x80006feb, 0x800085cd, + 0x80008964, 0x800062c9, 0x800081d8, 0x8000881f, + 0x80005eca, 0x80006717, 0x80006d6a, 0x800072fc, + 0x800090ce, 0x80004f86, 0x800051b7, 0x800052de, + 0x800064c4, 0x80006ad3, 0x80007210, 0x800076e7, + 0x80008001, 0x80008606, 0x8000865c, 0x80008def, + 0x80009732, 0x80009b6f, 0x80009dfa, 0x8000788c, + 0x8000797f, 0x80007da0, 0x800083c9, 0x80009304, + 0x80009e7f, 0x80008ad6, 0x800058df, 0x80005f04, + 0x80007c60, 0x8000807e, 0x80007262, 0x800078ca, + 0x80008cc2, 0x800096f7, 0x800058d8, 0x80005c62, + 0x80006a13, 0x80006dda, 0x80006f0f, 0x80007d2f, + 0x80007e37, 0x8000964b, 0x800052d2, 0x8000808b, + 0x800051dc, 0x800051cc, 0x80007a1c, 0x80007dbe, + 0x800083f1, 0x80009675, 0x80008b80, 0x800062cf, + 0x80006a02, 0x80008afe, 0x80004e39, 0x80005be7, + 0x80006012, 0x80007387, 0x80007570, 0x80005317, + 0x800078fb, 0x80004fbf, 0x80005fa9, 0x80004e0d, + 0x80006ccc, 0x80006578, 0x80007d22, 0x800053c3, + 0x8000585e, 0x80007701, 0x80008449, 0x80008aaa, + 0x80006bba, 0x80008fb0, 0x80006c88, 0x800062fe, + 0x800082e5, 0x800063a0, 0x80007565, 0x80004eae, + 0x80005169, 0x800051c9, 0x80006881, 0x80007ce7, + 0x8000826f, 0x80008ad2, 0x800091cf, 0x800052f5, + 0x80005442, 0x80005973, 0x80005eec, 0x800065c5, + 0x80006ffe, 0x8000792a, 0x800095ad, 0x80009a6a, + 0x80009e97, 0x80009ece, 0x8000529b, 0x800066c6, + 0x80006b77, 0x80008f62, 0x80005e74, 0x80006190, + 0x80006200, 0x8000649a, 0x80006f23, 0x80007149, + 0x80007489, 0x800079ca, 0x80007df4, 0x8000806f, + 0x80008f26, 0x800084ee, 0x80009023, 0x8000934a, + 0x80005217, 0x800052a3, 0x800054bd, 0x800070c8, + 0x800088c2, 0x80008aaa, 0x80005ec9, 0x80005ff5, + 0x8000637b, 0x80006bae, 0x80007c3e, 0x80007375, + 0x80004ee4, 0x800056f9, 0x80005be7, 0x80005dba, + 0x8000601c, 0x800073b2, 0x80007469, 0x80007f9a, + 0x80008046, 0x80009234, 0x800096f6, 0x80009748, + 0x80009818, 0x80004f8b, 0x800079ae, 0x800091b4, + 0x800096b8, 0x800060e1, 0x80004e86, 0x800050da, + 0x80005bee, 0x80005c3f, 0x80006599, 0x80006a02, + 0x800071ce, 0x80007642, 0x800084fc, 0x8000907c, + 0x80009f8d, 0x80006688, 0x8000962e, 0x80005289, + 0x8000677b, 0x800067f3, 0x80006d41, 0x80006e9c, + 0x80007409, 0x80007559, 0x8000786b, 0x80007d10, + 0x8000985e, 0x8000516d, 0x8000622e, 0x80009678, + 0x8000502b, 0x80005d19, 0x80006dea, 0x80008f2a, + 0x80005f8b, 0x80006144, 0x80006817, 0x80007387, + 0x80009686, 0x80005229, 0x8000540f, 0x80005c65, + 0x80006613, 0x8000674e, 0x800068a8, 0x80006ce5, + 0x80007406, 0x800075e2, 0x80007f79, 0x800088cf, + 0x800088e1, 0x800091cc, 0x800096e2, 0x8000533f, + 0x80006eba, 0x8000541d, 0x800071d0, 0x80007498, + 0x800085fa, 0x800096a3, 0x80009c57, 0x80009e9f, + 0x80006797, 0x80006dcb, 0x800081e8, 0x80007acb, + 0x80007b20, 0x80007c92, 0x800072c0, 0x80007099, + 0x80008b58, 0x80004ec0, 0x80008336, 0x8000523a, + 0x80005207, 0x80005ea6, 0x800062d3, 0x80007cd6, + 0x80005b85, 0x80006d1e, 0x800066b4, 0x80008f3b, + 0x8000884c, 0x8000964d, 0x8000898b, 0x80005ed3, + 0x80005140, 0x800055c0, 0x8000585a, 0x80006674, + 0x800051de, 0x8000732a, 0x800076ca, 0x8000793c, + 0x8000795e, 0x80007965, 0x8000798f, 0x80009756, + 0x80007cbe, 0x80007fbd, 0x80008612, 0x80008af8, + 0x80009038, 0x800090fd, 0x800098ef, 0x800098fc, + 0x80009928, 0x80009db4, 0x80004fae, 0x800050e7, + 0x8000514d, 0x800052c9, 0x800052e4, 0x80005351, + 0x8000559d, 0x80005606, 0x80005668, 0x80005840, + 0x800058a8, 0x80005c64, 0x80005c6e, 0x80006094, + 0x80006168, 0x8000618e, 0x800061f2, 0x8000654f, + 0x800065e2, 0x80006691, 0x80006885, 0x80006d77, + 0x80006e1a, 0x80006f22, 0x8000716e, 0x8000722b, + 0x80007422, 0x80007891, 0x8000793e, 0x80007949, + 0x80007948, 0x80007950, 0x80007956, 0x8000795d, + 0x8000798d, 0x8000798e, 0x80007a40, 0x80007a81, + 0x80007bc0, 0x80007df4, 0x80007e09, 0x80007e41, + 0x80007f72, 0x80008005, 0x800081ed, 0x80008279, + 0x80008279, 0x80008457, 0x80008910, 0x80008996, + 0x80008b01, 0x80008b39, 0x80008cd3, 0x80008d08, + 0x80008fb6, 0x80009038, 0x800096e3, 0x800097ff, + 0x8000983b, 0x00000066, 0x80000066, 0x00000066, + 0x80000069, 0x00000066, 0x8000006c, 0x00000066, + 0x00000066, 0x80000069, 0x00000066, 0x00000066, + 0x8000006c, 0x0000017f, 0x80000074, 0x00000073, + 0x80000074, 0x00000574, 0x80000576, 0x00000574, + 0x80000565, 0x00000574, 0x8000056b, 0x0000057e, + 0x80000576, 0x00000574, 0x8000056d, 0x000005d9, + 0x800005b4, 0x000005f2, 0x800005b7, 0x800005e2, + 0x800005d0, 0x800005d3, 0x800005d4, 0x800005db, + 0x800005dc, 0x800005dd, 0x800005e8, 0x800005ea, + 0x8000002b, 0x000005e9, 0x800005c1, 0x000005e9, + 0x800005c2, 0x0000fb49, 0x800005c1, 0x0000fb49, + 0x800005c2, 0x000005d0, 0x800005b7, 0x000005d0, + 0x800005b8, 0x000005d0, 0x800005bc, 0x000005d1, + 0x800005bc, 0x000005d2, 0x800005bc, 0x000005d3, + 0x800005bc, 0x000005d4, 0x800005bc, 0x000005d5, + 0x800005bc, 0x000005d6, 0x800005bc, 0x000005d8, + 0x800005bc, 0x000005d9, 0x800005bc, 0x000005da, + 0x800005bc, 0x000005db, 0x800005bc, 0x000005dc, + 0x800005bc, 0x000005de, 0x800005bc, 0x000005e0, + 0x800005bc, 0x000005e1, 0x800005bc, 0x000005e3, + 0x800005bc, 0x000005e4, 0x800005bc, 0x000005e6, + 0x800005bc, 0x000005e7, 0x800005bc, 0x000005e8, + 0x800005bc, 0x000005e9, 0x800005bc, 0x000005ea, + 0x800005bc, 0x000005d5, 0x800005b9, 0x000005d1, + 0x800005bf, 0x000005db, 0x800005bf, 0x000005e4, + 0x800005bf, 0x000005d0, 0x800005dc, 0x80000671, + 0x80000671, 0x8000067b, 0x8000067b, 0x8000067b, + 0x8000067b, 0x8000067e, 0x8000067e, 0x8000067e, + 0x8000067e, 0x80000680, 0x80000680, 0x80000680, + 0x80000680, 0x8000067a, 0x8000067a, 0x8000067a, + 0x8000067a, 0x8000067f, 0x8000067f, 0x8000067f, + 0x8000067f, 0x80000679, 0x80000679, 0x80000679, + 0x80000679, 0x800006a4, 0x800006a4, 0x800006a4, + 0x800006a4, 0x800006a6, 0x800006a6, 0x800006a6, + 0x800006a6, 0x80000684, 0x80000684, 0x80000684, + 0x80000684, 0x80000683, 0x80000683, 0x80000683, + 0x80000683, 0x80000686, 0x80000686, 0x80000686, + 0x80000686, 0x80000687, 0x80000687, 0x80000687, + 0x80000687, 0x8000068d, 0x8000068d, 0x8000068c, + 0x8000068c, 0x8000068e, 0x8000068e, 0x80000688, + 0x80000688, 0x80000698, 0x80000698, 0x80000691, + 0x80000691, 0x800006a9, 0x800006a9, 0x800006a9, + 0x800006a9, 0x800006af, 0x800006af, 0x800006af, + 0x800006af, 0x800006b3, 0x800006b3, 0x800006b3, + 0x800006b3, 0x800006b1, 0x800006b1, 0x800006b1, + 0x800006b1, 0x800006ba, 0x800006ba, 0x800006bb, + 0x800006bb, 0x800006bb, 0x800006bb, 0x800006c0, + 0x800006c0, 0x800006c1, 0x800006c1, 0x800006c1, + 0x800006c1, 0x800006be, 0x800006be, 0x800006be, + 0x800006be, 0x800006d2, 0x800006d2, 0x800006d3, + 0x800006d3, 0x800006ad, 0x800006ad, 0x800006ad, + 0x800006ad, 0x800006c7, 0x800006c7, 0x800006c6, + 0x800006c6, 0x800006c8, 0x800006c8, 0x80000677, + 0x800006cb, 0x800006cb, 0x800006c5, 0x800006c5, + 0x800006c9, 0x800006c9, 0x800006d0, 0x800006d0, + 0x800006d0, 0x800006d0, 0x80000649, 0x80000649, + 0x00000626, 0x80000627, 0x00000626, 0x80000627, + 0x00000626, 0x800006d5, 0x00000626, 0x800006d5, + 0x00000626, 0x80000648, 0x00000626, 0x80000648, + 0x00000626, 0x800006c7, 0x00000626, 0x800006c7, + 0x00000626, 0x800006c6, 0x00000626, 0x800006c6, + 0x00000626, 0x800006c8, 0x00000626, 0x800006c8, + 0x00000626, 0x800006d0, 0x00000626, 0x800006d0, + 0x00000626, 0x800006d0, 0x00000626, 0x80000649, + 0x00000626, 0x80000649, 0x00000626, 0x80000649, + 0x800006cc, 0x800006cc, 0x800006cc, 0x800006cc, + 0x00000626, 0x8000062c, 0x00000626, 0x8000062d, + 0x00000626, 0x80000645, 0x00000626, 0x80000649, + 0x00000626, 0x8000064a, 0x00000628, 0x8000062c, + 0x00000628, 0x8000062d, 0x00000628, 0x8000062e, + 0x00000628, 0x80000645, 0x00000628, 0x80000649, + 0x00000628, 0x8000064a, 0x0000062a, 0x8000062c, + 0x0000062a, 0x8000062d, 0x0000062a, 0x8000062e, + 0x0000062a, 0x80000645, 0x0000062a, 0x80000649, + 0x0000062a, 0x8000064a, 0x0000062b, 0x8000062c, + 0x0000062b, 0x80000645, 0x0000062b, 0x80000649, + 0x0000062b, 0x8000064a, 0x0000062c, 0x8000062d, + 0x0000062c, 0x80000645, 0x0000062d, 0x8000062c, + 0x0000062d, 0x80000645, 0x0000062e, 0x8000062c, + 0x0000062e, 0x8000062d, 0x0000062e, 0x80000645, + 0x00000633, 0x8000062c, 0x00000633, 0x8000062d, + 0x00000633, 0x8000062e, 0x00000633, 0x80000645, + 0x00000635, 0x8000062d, 0x00000635, 0x80000645, + 0x00000636, 0x8000062c, 0x00000636, 0x8000062d, + 0x00000636, 0x8000062e, 0x00000636, 0x80000645, + 0x00000637, 0x8000062d, 0x00000637, 0x80000645, + 0x00000638, 0x80000645, 0x00000639, 0x8000062c, + 0x00000639, 0x80000645, 0x0000063a, 0x8000062c, + 0x0000063a, 0x80000645, 0x00000641, 0x8000062c, + 0x00000641, 0x8000062d, 0x00000641, 0x8000062e, + 0x00000641, 0x80000645, 0x00000641, 0x80000649, + 0x00000641, 0x8000064a, 0x00000642, 0x8000062d, + 0x00000642, 0x80000645, 0x00000642, 0x80000649, + 0x00000642, 0x8000064a, 0x00000643, 0x80000627, + 0x00000643, 0x8000062c, 0x00000643, 0x8000062d, + 0x00000643, 0x8000062e, 0x00000643, 0x80000644, + 0x00000643, 0x80000645, 0x00000643, 0x80000649, + 0x00000643, 0x8000064a, 0x00000644, 0x8000062c, + 0x00000644, 0x8000062d, 0x00000644, 0x8000062e, + 0x00000644, 0x80000645, 0x00000644, 0x80000649, + 0x00000644, 0x8000064a, 0x00000645, 0x8000062c, + 0x00000645, 0x8000062d, 0x00000645, 0x8000062e, + 0x00000645, 0x80000645, 0x00000645, 0x80000649, + 0x00000645, 0x8000064a, 0x00000646, 0x8000062c, + 0x00000646, 0x8000062d, 0x00000646, 0x8000062e, + 0x00000646, 0x80000645, 0x00000646, 0x80000649, + 0x00000646, 0x8000064a, 0x00000647, 0x8000062c, + 0x00000647, 0x80000645, 0x00000647, 0x80000649, + 0x00000647, 0x8000064a, 0x0000064a, 0x8000062c, + 0x0000064a, 0x8000062d, 0x0000064a, 0x8000062e, + 0x0000064a, 0x80000645, 0x0000064a, 0x80000649, + 0x0000064a, 0x8000064a, 0x00000630, 0x80000670, + 0x00000631, 0x80000670, 0x00000649, 0x80000670, + 0x00000020, 0x0000064c, 0x80000651, 0x00000020, + 0x0000064d, 0x80000651, 0x00000020, 0x0000064e, + 0x80000651, 0x00000020, 0x0000064f, 0x80000651, + 0x00000020, 0x00000650, 0x80000651, 0x00000020, + 0x00000651, 0x80000670, 0x00000626, 0x80000631, + 0x00000626, 0x80000632, 0x00000626, 0x80000645, + 0x00000626, 0x80000646, 0x00000626, 0x80000649, + 0x00000626, 0x8000064a, 0x00000628, 0x80000631, + 0x00000628, 0x80000632, 0x00000628, 0x80000645, + 0x00000628, 0x80000646, 0x00000628, 0x80000649, + 0x00000628, 0x8000064a, 0x0000062a, 0x80000631, + 0x0000062a, 0x80000632, 0x0000062a, 0x80000645, + 0x0000062a, 0x80000646, 0x0000062a, 0x80000649, + 0x0000062a, 0x8000064a, 0x0000062b, 0x80000631, + 0x0000062b, 0x80000632, 0x0000062b, 0x80000645, + 0x0000062b, 0x80000646, 0x0000062b, 0x80000649, + 0x0000062b, 0x8000064a, 0x00000641, 0x80000649, + 0x00000641, 0x8000064a, 0x00000642, 0x80000649, + 0x00000642, 0x8000064a, 0x00000643, 0x80000627, + 0x00000643, 0x80000644, 0x00000643, 0x80000645, + 0x00000643, 0x80000649, 0x00000643, 0x8000064a, + 0x00000644, 0x80000645, 0x00000644, 0x80000649, + 0x00000644, 0x8000064a, 0x00000645, 0x80000627, + 0x00000645, 0x80000645, 0x00000646, 0x80000631, + 0x00000646, 0x80000632, 0x00000646, 0x80000645, + 0x00000646, 0x80000646, 0x00000646, 0x80000649, + 0x00000646, 0x8000064a, 0x00000649, 0x80000670, + 0x0000064a, 0x80000631, 0x0000064a, 0x80000632, + 0x0000064a, 0x80000645, 0x0000064a, 0x80000646, + 0x0000064a, 0x80000649, 0x0000064a, 0x8000064a, + 0x00000626, 0x8000062c, 0x00000626, 0x8000062d, + 0x00000626, 0x8000062e, 0x00000626, 0x80000645, + 0x00000626, 0x80000647, 0x00000628, 0x8000062c, + 0x00000628, 0x8000062d, 0x00000628, 0x8000062e, + 0x00000628, 0x80000645, 0x00000628, 0x80000647, + 0x0000062a, 0x8000062c, 0x0000062a, 0x8000062d, + 0x0000062a, 0x8000062e, 0x0000062a, 0x80000645, + 0x0000062a, 0x80000647, 0x0000062b, 0x80000645, + 0x0000062c, 0x8000062d, 0x0000062c, 0x80000645, + 0x0000062d, 0x8000062c, 0x0000062d, 0x80000645, + 0x0000062e, 0x8000062c, 0x0000062e, 0x80000645, + 0x00000633, 0x8000062c, 0x00000633, 0x8000062d, + 0x00000633, 0x8000062e, 0x00000633, 0x80000645, + 0x00000635, 0x8000062d, 0x00000635, 0x8000062e, + 0x00000635, 0x80000645, 0x00000636, 0x8000062c, + 0x00000636, 0x8000062d, 0x00000636, 0x8000062e, + 0x00000636, 0x80000645, 0x00000637, 0x8000062d, + 0x00000638, 0x80000645, 0x00000639, 0x8000062c, + 0x00000639, 0x80000645, 0x0000063a, 0x8000062c, + 0x0000063a, 0x80000645, 0x00000641, 0x8000062c, + 0x00000641, 0x8000062d, 0x00000641, 0x8000062e, + 0x00000641, 0x80000645, 0x00000642, 0x8000062d, + 0x00000642, 0x80000645, 0x00000643, 0x8000062c, + 0x00000643, 0x8000062d, 0x00000643, 0x8000062e, + 0x00000643, 0x80000644, 0x00000643, 0x80000645, + 0x00000644, 0x8000062c, 0x00000644, 0x8000062d, + 0x00000644, 0x8000062e, 0x00000644, 0x80000645, + 0x00000644, 0x80000647, 0x00000645, 0x8000062c, + 0x00000645, 0x8000062d, 0x00000645, 0x8000062e, + 0x00000645, 0x80000645, 0x00000646, 0x8000062c, + 0x00000646, 0x8000062d, 0x00000646, 0x8000062e, + 0x00000646, 0x80000645, 0x00000646, 0x80000647, + 0x00000647, 0x8000062c, 0x00000647, 0x80000645, + 0x00000647, 0x80000670, 0x0000064a, 0x8000062c, + 0x0000064a, 0x8000062d, 0x0000064a, 0x8000062e, + 0x0000064a, 0x80000645, 0x0000064a, 0x80000647, + 0x00000626, 0x80000645, 0x00000626, 0x80000647, + 0x00000628, 0x80000645, 0x00000628, 0x80000647, + 0x0000062a, 0x80000645, 0x0000062a, 0x80000647, + 0x0000062b, 0x80000645, 0x0000062b, 0x80000647, + 0x00000633, 0x80000645, 0x00000633, 0x80000647, + 0x00000634, 0x80000645, 0x00000634, 0x80000647, + 0x00000643, 0x80000644, 0x00000643, 0x80000645, + 0x00000644, 0x80000645, 0x00000646, 0x80000645, + 0x00000646, 0x80000647, 0x0000064a, 0x80000645, + 0x0000064a, 0x80000647, 0x00000640, 0x0000064e, + 0x80000651, 0x00000640, 0x0000064f, 0x80000651, + 0x00000640, 0x00000650, 0x80000651, 0x00000637, + 0x80000649, 0x00000637, 0x8000064a, 0x00000639, + 0x80000649, 0x00000639, 0x8000064a, 0x0000063a, + 0x80000649, 0x0000063a, 0x8000064a, 0x00000633, + 0x80000649, 0x00000633, 0x8000064a, 0x00000634, + 0x80000649, 0x00000634, 0x8000064a, 0x0000062d, + 0x80000649, 0x0000062d, 0x8000064a, 0x0000062c, + 0x80000649, 0x0000062c, 0x8000064a, 0x0000062e, + 0x80000649, 0x0000062e, 0x8000064a, 0x00000635, + 0x80000649, 0x00000635, 0x8000064a, 0x00000636, + 0x80000649, 0x00000636, 0x8000064a, 0x00000634, + 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, + 0x8000062e, 0x00000634, 0x80000645, 0x00000634, + 0x80000631, 0x00000633, 0x80000631, 0x00000635, + 0x80000631, 0x00000636, 0x80000631, 0x00000637, + 0x80000649, 0x00000637, 0x8000064a, 0x00000639, + 0x80000649, 0x00000639, 0x8000064a, 0x0000063a, + 0x80000649, 0x0000063a, 0x8000064a, 0x00000633, + 0x80000649, 0x00000633, 0x8000064a, 0x00000634, + 0x80000649, 0x00000634, 0x8000064a, 0x0000062d, + 0x80000649, 0x0000062d, 0x8000064a, 0x0000062c, + 0x80000649, 0x0000062c, 0x8000064a, 0x0000062e, + 0x80000649, 0x0000062e, 0x8000064a, 0x00000635, + 0x80000649, 0x00000635, 0x8000064a, 0x00000636, + 0x80000649, 0x00000636, 0x8000064a, 0x00000634, + 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, + 0x8000062e, 0x00000634, 0x80000645, 0x00000634, + 0x80000631, 0x00000633, 0x80000631, 0x00000635, + 0x80000631, 0x00000636, 0x80000631, 0x00000634, + 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, + 0x8000062e, 0x00000634, 0x80000645, 0x00000633, + 0x80000647, 0x00000634, 0x80000647, 0x00000637, + 0x80000645, 0x00000633, 0x8000062c, 0x00000633, + 0x8000062d, 0x00000633, 0x8000062e, 0x00000634, + 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, + 0x8000062e, 0x00000637, 0x80000645, 0x00000638, + 0x80000645, 0x00000627, 0x8000064b, 0x00000627, + 0x8000064b, 0x0000062a, 0x0000062c, 0x80000645, + 0x0000062a, 0x0000062d, 0x8000062c, 0x0000062a, + 0x0000062d, 0x8000062c, 0x0000062a, 0x0000062d, + 0x80000645, 0x0000062a, 0x0000062e, 0x80000645, + 0x0000062a, 0x00000645, 0x8000062c, 0x0000062a, + 0x00000645, 0x8000062d, 0x0000062a, 0x00000645, + 0x8000062e, 0x0000062c, 0x00000645, 0x8000062d, + 0x0000062c, 0x00000645, 0x8000062d, 0x0000062d, + 0x00000645, 0x8000064a, 0x0000062d, 0x00000645, + 0x80000649, 0x00000633, 0x0000062d, 0x8000062c, + 0x00000633, 0x0000062c, 0x8000062d, 0x00000633, + 0x0000062c, 0x80000649, 0x00000633, 0x00000645, + 0x8000062d, 0x00000633, 0x00000645, 0x8000062d, + 0x00000633, 0x00000645, 0x8000062c, 0x00000633, + 0x00000645, 0x80000645, 0x00000633, 0x00000645, + 0x80000645, 0x00000635, 0x0000062d, 0x8000062d, + 0x00000635, 0x0000062d, 0x8000062d, 0x00000635, + 0x00000645, 0x80000645, 0x00000634, 0x0000062d, + 0x80000645, 0x00000634, 0x0000062d, 0x80000645, + 0x00000634, 0x0000062c, 0x8000064a, 0x00000634, + 0x00000645, 0x8000062e, 0x00000634, 0x00000645, + 0x8000062e, 0x00000634, 0x00000645, 0x80000645, + 0x00000634, 0x00000645, 0x80000645, 0x00000636, + 0x0000062d, 0x80000649, 0x00000636, 0x0000062e, + 0x80000645, 0x00000636, 0x0000062e, 0x80000645, + 0x00000637, 0x00000645, 0x8000062d, 0x00000637, + 0x00000645, 0x8000062d, 0x00000637, 0x00000645, + 0x80000645, 0x00000637, 0x00000645, 0x8000064a, + 0x00000639, 0x0000062c, 0x80000645, 0x00000639, + 0x00000645, 0x80000645, 0x00000639, 0x00000645, + 0x80000645, 0x00000639, 0x00000645, 0x80000649, + 0x0000063a, 0x00000645, 0x80000645, 0x0000063a, + 0x00000645, 0x8000064a, 0x0000063a, 0x00000645, + 0x80000649, 0x00000641, 0x0000062e, 0x80000645, + 0x00000641, 0x0000062e, 0x80000645, 0x00000642, + 0x00000645, 0x8000062d, 0x00000642, 0x00000645, + 0x80000645, 0x00000644, 0x0000062d, 0x80000645, + 0x00000644, 0x0000062d, 0x8000064a, 0x00000644, + 0x0000062d, 0x80000649, 0x00000644, 0x0000062c, + 0x8000062c, 0x00000644, 0x0000062c, 0x8000062c, + 0x00000644, 0x0000062e, 0x80000645, 0x00000644, + 0x0000062e, 0x80000645, 0x00000644, 0x00000645, + 0x8000062d, 0x00000644, 0x00000645, 0x8000062d, + 0x00000645, 0x0000062d, 0x8000062c, 0x00000645, + 0x0000062d, 0x80000645, 0x00000645, 0x0000062d, + 0x8000064a, 0x00000645, 0x0000062c, 0x8000062d, + 0x00000645, 0x0000062c, 0x80000645, 0x00000645, + 0x0000062e, 0x8000062c, 0x00000645, 0x0000062e, + 0x80000645, 0x00000645, 0x0000062c, 0x8000062e, + 0x00000647, 0x00000645, 0x8000062c, 0x00000647, + 0x00000645, 0x80000645, 0x00000646, 0x0000062d, + 0x80000645, 0x00000646, 0x0000062d, 0x80000649, + 0x00000646, 0x0000062c, 0x80000645, 0x00000646, + 0x0000062c, 0x80000645, 0x00000646, 0x0000062c, + 0x80000649, 0x00000646, 0x00000645, 0x8000064a, + 0x00000646, 0x00000645, 0x80000649, 0x0000064a, + 0x00000645, 0x80000645, 0x0000064a, 0x00000645, + 0x80000645, 0x00000628, 0x0000062e, 0x8000064a, + 0x0000062a, 0x0000062c, 0x8000064a, 0x0000062a, + 0x0000062c, 0x80000649, 0x0000062a, 0x0000062e, + 0x8000064a, 0x0000062a, 0x0000062e, 0x80000649, + 0x0000062a, 0x00000645, 0x8000064a, 0x0000062a, + 0x00000645, 0x80000649, 0x0000062c, 0x00000645, + 0x8000064a, 0x0000062c, 0x0000062d, 0x80000649, + 0x0000062c, 0x00000645, 0x80000649, 0x00000633, + 0x0000062e, 0x80000649, 0x00000635, 0x0000062d, + 0x8000064a, 0x00000634, 0x0000062d, 0x8000064a, + 0x00000636, 0x0000062d, 0x8000064a, 0x00000644, + 0x0000062c, 0x8000064a, 0x00000644, 0x00000645, + 0x8000064a, 0x0000064a, 0x0000062d, 0x8000064a, + 0x0000064a, 0x0000062c, 0x8000064a, 0x0000064a, + 0x00000645, 0x8000064a, 0x00000645, 0x00000645, + 0x8000064a, 0x00000642, 0x00000645, 0x8000064a, + 0x00000646, 0x0000062d, 0x8000064a, 0x00000642, + 0x00000645, 0x8000062d, 0x00000644, 0x0000062d, + 0x80000645, 0x00000639, 0x00000645, 0x8000064a, + 0x00000643, 0x00000645, 0x8000064a, 0x00000646, + 0x0000062c, 0x8000062d, 0x00000645, 0x0000062e, + 0x8000064a, 0x00000644, 0x0000062c, 0x80000645, + 0x00000643, 0x00000645, 0x80000645, 0x00000644, + 0x0000062c, 0x80000645, 0x00000646, 0x0000062c, + 0x8000062d, 0x0000062c, 0x0000062d, 0x8000064a, + 0x0000062d, 0x0000062c, 0x8000064a, 0x00000645, + 0x0000062c, 0x8000064a, 0x00000641, 0x00000645, + 0x8000064a, 0x00000628, 0x0000062d, 0x8000064a, + 0x00000643, 0x00000645, 0x80000645, 0x00000639, + 0x0000062c, 0x80000645, 0x00000635, 0x00000645, + 0x80000645, 0x00000633, 0x0000062e, 0x8000064a, + 0x00000646, 0x0000062c, 0x8000064a, 0x00000635, + 0x00000644, 0x800006d2, 0x00000642, 0x00000644, + 0x800006d2, 0x00000627, 0x00000644, 0x00000644, + 0x80000647, 0x00000627, 0x00000643, 0x00000628, + 0x80000631, 0x00000645, 0x0000062d, 0x00000645, + 0x8000062f, 0x00000635, 0x00000644, 0x00000639, + 0x80000645, 0x00000631, 0x00000633, 0x00000648, + 0x80000644, 0x00000639, 0x00000644, 0x0000064a, + 0x80000647, 0x00000648, 0x00000633, 0x00000644, + 0x80000645, 0x00000635, 0x00000644, 0x80000649, + 0x00000635, 0x00000644, 0x00000649, 0x00000020, + 0x00000627, 0x00000644, 0x00000644, 0x00000647, + 0x00000020, 0x00000639, 0x00000644, 0x0000064a, + 0x00000647, 0x00000020, 0x00000648, 0x00000633, + 0x00000644, 0x80000645, 0x0000062c, 0x00000644, + 0x00000020, 0x0000062c, 0x00000644, 0x00000627, + 0x00000644, 0x80000647, 0x00000631, 0x000006cc, + 0x00000627, 0x80000644, 0x80002025, 0x80002014, + 0x80002013, 0x8000005f, 0x8000005f, 0x80000028, + 0x80000029, 0x8000007b, 0x8000007d, 0x80003014, + 0x80003015, 0x80003010, 0x80003011, 0x8000300a, + 0x8000300b, 0x80003008, 0x80003009, 0x8000300c, + 0x8000300d, 0x8000300e, 0x8000300f, 0x8000203e, + 0x8000203e, 0x8000203e, 0x8000203e, 0x8000005f, + 0x8000005f, 0x8000005f, 0x8000002c, 0x80003001, + 0x8000002e, 0x8000003b, 0x8000003a, 0x8000003f, + 0x80000021, 0x80002014, 0x80000028, 0x80000029, + 0x8000007b, 0x8000007d, 0x80003014, 0x80003015, + 0x80000023, 0x80000026, 0x8000002a, 0x8000002b, + 0x8000002d, 0x8000003c, 0x8000003e, 0x8000003d, + 0x8000005c, 0x80000024, 0x80000025, 0x80000040, + 0x00000020, 0x8000064b, 0x00000640, 0x8000064b, + 0x00000020, 0x8000064c, 0x00000020, 0x8000064d, + 0x00000020, 0x8000064e, 0x00000640, 0x8000064e, + 0x00000020, 0x8000064f, 0x00000640, 0x8000064f, + 0x00000020, 0x80000650, 0x00000640, 0x80000650, + 0x00000020, 0x80000651, 0x00000640, 0x80000651, + 0x00000020, 0x80000652, 0x00000640, 0x80000652, + 0x80000621, 0x80000622, 0x80000622, 0x80000623, + 0x80000623, 0x80000624, 0x80000624, 0x80000625, + 0x80000625, 0x80000626, 0x80000626, 0x80000626, + 0x80000626, 0x80000627, 0x80000627, 0x80000628, + 0x80000628, 0x80000628, 0x80000628, 0x80000629, + 0x80000629, 0x8000062a, 0x8000062a, 0x8000062a, + 0x8000062a, 0x8000062b, 0x8000062b, 0x8000062b, + 0x8000062b, 0x8000062c, 0x8000062c, 0x8000062c, + 0x8000062c, 0x8000062d, 0x8000062d, 0x8000062d, + 0x8000062d, 0x8000062e, 0x8000062e, 0x8000062e, + 0x8000062e, 0x8000062f, 0x8000062f, 0x80000630, + 0x80000630, 0x80000631, 0x80000631, 0x80000632, + 0x80000632, 0x80000633, 0x80000633, 0x80000633, + 0x80000633, 0x80000634, 0x80000634, 0x80000634, + 0x80000634, 0x80000635, 0x80000635, 0x80000635, + 0x80000635, 0x80000636, 0x80000636, 0x80000636, + 0x80000636, 0x80000637, 0x80000637, 0x80000637, + 0x80000637, 0x80000638, 0x80000638, 0x80000638, + 0x80000638, 0x80000639, 0x80000639, 0x80000639, + 0x80000639, 0x8000063a, 0x8000063a, 0x8000063a, + 0x8000063a, 0x80000641, 0x80000641, 0x80000641, + 0x80000641, 0x80000642, 0x80000642, 0x80000642, + 0x80000642, 0x80000643, 0x80000643, 0x80000643, + 0x80000643, 0x80000644, 0x80000644, 0x80000644, + 0x80000644, 0x80000645, 0x80000645, 0x80000645, + 0x80000645, 0x80000646, 0x80000646, 0x80000646, + 0x80000646, 0x80000647, 0x80000647, 0x80000647, + 0x80000647, 0x80000648, 0x80000648, 0x80000649, + 0x80000649, 0x8000064a, 0x8000064a, 0x8000064a, + 0x8000064a, 0x00000644, 0x80000622, 0x00000644, + 0x80000622, 0x00000644, 0x80000623, 0x00000644, + 0x80000623, 0x00000644, 0x80000625, 0x00000644, + 0x80000625, 0x00000644, 0x80000627, 0x00000644, + 0x80000627, 0x80000021, 0x80000022, 0x80000023, + 0x80000024, 0x80000025, 0x80000026, 0x80000027, + 0x80000028, 0x80000029, 0x8000002a, 0x8000002b, + 0x8000002c, 0x8000002d, 0x8000002e, 0x8000002f, + 0x80000030, 0x80000031, 0x80000032, 0x80000033, + 0x80000034, 0x80000035, 0x80000036, 0x80000037, + 0x80000038, 0x80000039, 0x8000003a, 0x8000003b, + 0x8000003c, 0x8000003d, 0x8000003e, 0x8000003f, + 0x80000040, 0x80000041, 0x80000042, 0x80000043, + 0x80000044, 0x80000045, 0x80000046, 0x80000047, + 0x80000048, 0x80000049, 0x8000004a, 0x8000004b, + 0x8000004c, 0x8000004d, 0x8000004e, 0x8000004f, + 0x80000050, 0x80000051, 0x80000052, 0x80000053, + 0x80000054, 0x80000055, 0x80000056, 0x80000057, + 0x80000058, 0x80000059, 0x8000005a, 0x8000005b, + 0x8000005c, 0x8000005d, 0x8000005e, 0x8000005f, + 0x80000060, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x8000007b, + 0x8000007c, 0x8000007d, 0x8000007e, 0x80002985, + 0x80002986, 0x80003002, 0x8000300c, 0x8000300d, + 0x80003001, 0x800030fb, 0x800030f2, 0x800030a1, + 0x800030a3, 0x800030a5, 0x800030a7, 0x800030a9, + 0x800030e3, 0x800030e5, 0x800030e7, 0x800030c3, + 0x800030fc, 0x800030a2, 0x800030a4, 0x800030a6, + 0x800030a8, 0x800030aa, 0x800030ab, 0x800030ad, + 0x800030af, 0x800030b1, 0x800030b3, 0x800030b5, + 0x800030b7, 0x800030b9, 0x800030bb, 0x800030bd, + 0x800030bf, 0x800030c1, 0x800030c4, 0x800030c6, + 0x800030c8, 0x800030ca, 0x800030cb, 0x800030cc, + 0x800030cd, 0x800030ce, 0x800030cf, 0x800030d2, + 0x800030d5, 0x800030d8, 0x800030db, 0x800030de, + 0x800030df, 0x800030e0, 0x800030e1, 0x800030e2, + 0x800030e4, 0x800030e6, 0x800030e8, 0x800030e9, + 0x800030ea, 0x800030eb, 0x800030ec, 0x800030ed, + 0x800030ef, 0x800030f3, 0x80003099, 0x8000309a, + 0x80003164, 0x80003131, 0x80003132, 0x80003133, + 0x80003134, 0x80003135, 0x80003136, 0x80003137, + 0x80003138, 0x80003139, 0x8000313a, 0x8000313b, + 0x8000313c, 0x8000313d, 0x8000313e, 0x8000313f, + 0x80003140, 0x80003141, 0x80003142, 0x80003143, + 0x80003144, 0x80003145, 0x80003146, 0x80003147, + 0x80003148, 0x80003149, 0x8000314a, 0x8000314b, + 0x8000314c, 0x8000314d, 0x8000314e, 0x8000314f, + 0x80003150, 0x80003151, 0x80003152, 0x80003153, + 0x80003154, 0x80003155, 0x80003156, 0x80003157, + 0x80003158, 0x80003159, 0x8000315a, 0x8000315b, + 0x8000315c, 0x8000315d, 0x8000315e, 0x8000315f, + 0x80003160, 0x80003161, 0x80003162, 0x80003163, + 0x800000a2, 0x800000a3, 0x800000ac, 0x800000af, + 0x800000a6, 0x800000a5, 0x800020a9, 0x80002502, + 0x80002190, 0x80002191, 0x80002192, 0x80002193, + 0x800025a0, 0x800025cb, 0x0001d157, 0x8001d165, + 0x0001d158, 0x8001d165, 0x0001d15f, 0x8001d16e, + 0x0001d15f, 0x8001d16f, 0x0001d15f, 0x8001d170, + 0x0001d15f, 0x8001d171, 0x0001d15f, 0x8001d172, + 0x0001d1b9, 0x8001d165, 0x0001d1ba, 0x8001d165, + 0x0001d1bb, 0x8001d16e, 0x0001d1bc, 0x8001d16e, + 0x0001d1bb, 0x8001d16f, 0x0001d1bc, 0x8001d16f, + 0x80000041, 0x80000042, 0x80000043, 0x80000044, + 0x80000045, 0x80000046, 0x80000047, 0x80000048, + 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, + 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, + 0x80000051, 0x80000052, 0x80000053, 0x80000054, + 0x80000055, 0x80000056, 0x80000057, 0x80000058, + 0x80000059, 0x8000005a, 0x80000061, 0x80000062, + 0x80000063, 0x80000064, 0x80000065, 0x80000066, + 0x80000067, 0x80000068, 0x80000069, 0x8000006a, + 0x8000006b, 0x8000006c, 0x8000006d, 0x8000006e, + 0x8000006f, 0x80000070, 0x80000071, 0x80000072, + 0x80000073, 0x80000074, 0x80000075, 0x80000076, + 0x80000077, 0x80000078, 0x80000079, 0x8000007a, + 0x80000041, 0x80000042, 0x80000043, 0x80000044, + 0x80000045, 0x80000046, 0x80000047, 0x80000048, + 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, + 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, + 0x80000051, 0x80000052, 0x80000053, 0x80000054, + 0x80000055, 0x80000056, 0x80000057, 0x80000058, + 0x80000059, 0x8000005a, 0x80000061, 0x80000062, + 0x80000063, 0x80000064, 0x80000065, 0x80000066, + 0x80000067, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000043, 0x80000044, 0x80000047, 0x8000004a, + 0x8000004b, 0x8000004e, 0x8000004f, 0x80000050, + 0x80000051, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000066, 0x80000068, 0x80000069, + 0x8000006a, 0x8000006b, 0x8000006d, 0x8000006e, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000044, 0x80000045, 0x80000046, + 0x80000047, 0x8000004a, 0x8000004b, 0x8000004c, + 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, + 0x80000051, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x80000061, 0x80000062, 0x80000063, 0x80000064, + 0x80000065, 0x80000066, 0x80000067, 0x80000068, + 0x80000069, 0x8000006a, 0x8000006b, 0x8000006c, + 0x8000006d, 0x8000006e, 0x8000006f, 0x80000070, + 0x80000071, 0x80000072, 0x80000073, 0x80000074, + 0x80000075, 0x80000076, 0x80000077, 0x80000078, + 0x80000079, 0x8000007a, 0x80000041, 0x80000042, + 0x80000044, 0x80000045, 0x80000046, 0x80000047, + 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, + 0x8000004d, 0x8000004f, 0x80000053, 0x80000054, + 0x80000055, 0x80000056, 0x80000057, 0x80000058, + 0x80000059, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000041, + 0x80000042, 0x80000043, 0x80000044, 0x80000045, + 0x80000046, 0x80000047, 0x80000048, 0x80000049, + 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, + 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, + 0x80000052, 0x80000053, 0x80000054, 0x80000055, + 0x80000056, 0x80000057, 0x80000058, 0x80000059, + 0x8000005a, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, + 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, + 0x80000070, 0x80000071, 0x80000072, 0x80000073, + 0x80000074, 0x80000075, 0x80000076, 0x80000077, + 0x80000078, 0x80000079, 0x8000007a, 0x80000391, + 0x80000392, 0x80000393, 0x80000394, 0x80000395, + 0x80000396, 0x80000397, 0x80000398, 0x80000399, + 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, + 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, + 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, + 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, + 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, + 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, + 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, + 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, + 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, + 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, + 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, + 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, + 0x800003d6, 0x80000391, 0x80000392, 0x80000393, + 0x80000394, 0x80000395, 0x80000396, 0x80000397, + 0x80000398, 0x80000399, 0x8000039a, 0x8000039b, + 0x8000039c, 0x8000039d, 0x8000039e, 0x8000039f, + 0x800003a0, 0x800003a1, 0x800003f4, 0x800003a3, + 0x800003a4, 0x800003a5, 0x800003a6, 0x800003a7, + 0x800003a8, 0x800003a9, 0x80002207, 0x800003b1, + 0x800003b2, 0x800003b3, 0x800003b4, 0x800003b5, + 0x800003b6, 0x800003b7, 0x800003b8, 0x800003b9, + 0x800003ba, 0x800003bb, 0x800003bc, 0x800003bd, + 0x800003be, 0x800003bf, 0x800003c0, 0x800003c1, + 0x800003c2, 0x800003c3, 0x800003c4, 0x800003c5, + 0x800003c6, 0x800003c7, 0x800003c8, 0x800003c9, + 0x80002202, 0x800003f5, 0x800003d1, 0x800003f0, + 0x800003d5, 0x800003f1, 0x800003d6, 0x80000391, + 0x80000392, 0x80000393, 0x80000394, 0x80000395, + 0x80000396, 0x80000397, 0x80000398, 0x80000399, + 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, + 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, + 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, + 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, + 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, + 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, + 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, + 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, + 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, + 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, + 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, + 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, + 0x800003d6, 0x80000391, 0x80000392, 0x80000393, + 0x80000394, 0x80000395, 0x80000396, 0x80000397, + 0x80000398, 0x80000399, 0x8000039a, 0x8000039b, + 0x8000039c, 0x8000039d, 0x8000039e, 0x8000039f, + 0x800003a0, 0x800003a1, 0x800003f4, 0x800003a3, + 0x800003a4, 0x800003a5, 0x800003a6, 0x800003a7, + 0x800003a8, 0x800003a9, 0x80002207, 0x800003b1, + 0x800003b2, 0x800003b3, 0x800003b4, 0x800003b5, + 0x800003b6, 0x800003b7, 0x800003b8, 0x800003b9, + 0x800003ba, 0x800003bb, 0x800003bc, 0x800003bd, + 0x800003be, 0x800003bf, 0x800003c0, 0x800003c1, + 0x800003c2, 0x800003c3, 0x800003c4, 0x800003c5, + 0x800003c6, 0x800003c7, 0x800003c8, 0x800003c9, + 0x80002202, 0x800003f5, 0x800003d1, 0x800003f0, + 0x800003d5, 0x800003f1, 0x800003d6, 0x80000391, + 0x80000392, 0x80000393, 0x80000394, 0x80000395, + 0x80000396, 0x80000397, 0x80000398, 0x80000399, + 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, + 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, + 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, + 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, + 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, + 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, + 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, + 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, + 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, + 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, + 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, + 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, + 0x800003d6, 0x80000030, 0x80000031, 0x80000032, + 0x80000033, 0x80000034, 0x80000035, 0x80000036, + 0x80000037, 0x80000038, 0x80000039, 0x80000030, + 0x80000031, 0x80000032, 0x80000033, 0x80000034, + 0x80000035, 0x80000036, 0x80000037, 0x80000038, + 0x80000039, 0x80000030, 0x80000031, 0x80000032, + 0x80000033, 0x80000034, 0x80000035, 0x80000036, + 0x80000037, 0x80000038, 0x80000039, 0x80000030, + 0x80000031, 0x80000032, 0x80000033, 0x80000034, + 0x80000035, 0x80000036, 0x80000037, 0x80000038, + 0x80000039, 0x80000030, 0x80000031, 0x80000032, + 0x80000033, 0x80000034, 0x80000035, 0x80000036, + 0x80000037, 0x80000038, 0x80000039, 0x80004e3d, + 0x80004e38, 0x80004e41, 0x80020122, 0x80004f60, + 0x80004fae, 0x80004fbb, 0x80005002, 0x8000507a, + 0x80005099, 0x800050e7, 0x800050cf, 0x8000349e, + 0x8002063a, 0x8000514d, 0x80005154, 0x80005164, + 0x80005177, 0x8002051c, 0x800034b9, 0x80005167, + 0x8000518d, 0x8002054b, 0x80005197, 0x800051a4, + 0x80004ecc, 0x800051ac, 0x800051b5, 0x800291df, + 0x800051f5, 0x80005203, 0x800034df, 0x8000523b, + 0x80005246, 0x80005272, 0x80005277, 0x80003515, + 0x800052c7, 0x800052c9, 0x800052e4, 0x800052fa, + 0x80005305, 0x80005306, 0x80005317, 0x80005349, + 0x80005351, 0x8000535a, 0x80005373, 0x8000537d, + 0x8000537f, 0x8000537f, 0x8000537f, 0x80020a2c, + 0x80007070, 0x800053ca, 0x800053df, 0x80020b63, + 0x800053eb, 0x800053f1, 0x80005406, 0x8000549e, + 0x80005438, 0x80005448, 0x80005468, 0x800054a2, + 0x800054f6, 0x80005510, 0x80005553, 0x80005563, + 0x80005584, 0x80005584, 0x80005599, 0x800055ab, + 0x800055b3, 0x800055c2, 0x80005716, 0x80005606, + 0x80005717, 0x80005651, 0x80005674, 0x80005207, + 0x800058ee, 0x800057ce, 0x800057f4, 0x8000580d, + 0x8000578b, 0x80005832, 0x80005831, 0x800058ac, + 0x800214e4, 0x800058f2, 0x800058f7, 0x80005906, + 0x8000591a, 0x80005922, 0x80005962, 0x800216a8, + 0x800216ea, 0x800059ec, 0x80005a1b, 0x80005a27, + 0x800059d8, 0x80005a66, 0x800036ee, 0x8002136a, + 0x80005b08, 0x80005b3e, 0x80005b3e, 0x800219c8, + 0x80005bc3, 0x80005bd8, 0x80005be7, 0x80005bf3, + 0x80021b18, 0x80005bff, 0x80005c06, 0x80005f33, + 0x80005c22, 0x80003781, 0x80005c60, 0x80005c6e, + 0x80005cc0, 0x80005c8d, 0x80021de4, 0x80005d43, + 0x80021de6, 0x80005d6e, 0x80005d6b, 0x80005d7c, + 0x80005de1, 0x80005de2, 0x8000382f, 0x80005dfd, + 0x80005e28, 0x80005e3d, 0x80005e69, 0x80003862, + 0x80022183, 0x8000387c, 0x80005eb0, 0x80005eb3, + 0x80005eb6, 0x80005eca, 0x8002a392, 0x80005efe, + 0x80022331, 0x80022331, 0x80008201, 0x80005f22, + 0x80005f22, 0x800038c7, 0x800232b8, 0x800261da, + 0x80005f62, 0x80005f6b, 0x800038e3, 0x80005f9a, + 0x80005fcd, 0x80005fd7, 0x80005ff9, 0x80006081, + 0x8000393a, 0x8000391c, 0x80006094, 0x800226d4, + 0x800060c7, 0x80006148, 0x8000614c, 0x8000614e, + 0x8000614c, 0x8000617a, 0x8000618e, 0x800061b2, + 0x800061a4, 0x800061af, 0x800061de, 0x800061f2, + 0x800061f6, 0x80006210, 0x8000621b, 0x8000625d, + 0x800062b1, 0x800062d4, 0x80006350, 0x80022b0c, + 0x8000633d, 0x800062fc, 0x80006368, 0x80006383, + 0x800063e4, 0x80022bf1, 0x80006422, 0x800063c5, + 0x800063a9, 0x80003a2e, 0x80006469, 0x8000647e, + 0x8000649d, 0x80006477, 0x80003a6c, 0x8000654f, + 0x8000656c, 0x8002300a, 0x800065e3, 0x800066f8, + 0x80006649, 0x80003b19, 0x80006691, 0x80003b08, + 0x80003ae4, 0x80005192, 0x80005195, 0x80006700, + 0x8000669c, 0x800080ad, 0x800043d9, 0x80006717, + 0x8000671b, 0x80006721, 0x8000675e, 0x80006753, + 0x800233c3, 0x80003b49, 0x800067fa, 0x80006785, + 0x80006852, 0x80006885, 0x8002346d, 0x8000688e, + 0x8000681f, 0x80006914, 0x80003b9d, 0x80006942, + 0x800069a3, 0x800069ea, 0x80006aa8, 0x800236a3, + 0x80006adb, 0x80003c18, 0x80006b21, 0x800238a7, + 0x80006b54, 0x80003c4e, 0x80006b72, 0x80006b9f, + 0x80006bba, 0x80006bbb, 0x80023a8d, 0x80021d0b, + 0x80023afa, 0x80006c4e, 0x80023cbc, 0x80006cbf, + 0x80006ccd, 0x80006c67, 0x80006d16, 0x80006d3e, + 0x80006d77, 0x80006d41, 0x80006d69, 0x80006d78, + 0x80006d85, 0x80023d1e, 0x80006d34, 0x80006e2f, + 0x80006e6e, 0x80003d33, 0x80006ecb, 0x80006ec7, + 0x80023ed1, 0x80006df9, 0x80006f6e, 0x80023f5e, + 0x80023f8e, 0x80006fc6, 0x80007039, 0x8000701e, + 0x8000701b, 0x80003d96, 0x8000704a, 0x8000707d, + 0x80007077, 0x800070ad, 0x80020525, 0x80007145, + 0x80024263, 0x8000719c, 0x800043ab, 0x80007228, + 0x80007235, 0x80007250, 0x80024608, 0x80007280, + 0x80007295, 0x80024735, 0x80024814, 0x8000737a, + 0x8000738b, 0x80003eac, 0x800073a5, 0x80003eb8, + 0x80003eb8, 0x80007447, 0x8000745c, 0x80007471, + 0x80007485, 0x800074ca, 0x80003f1b, 0x80007524, + 0x80024c36, 0x8000753e, 0x80024c92, 0x80007570, + 0x8002219f, 0x80007610, 0x80024fa1, 0x80024fb8, + 0x80025044, 0x80003ffc, 0x80004008, 0x800076f4, + 0x800250f3, 0x800250f2, 0x80025119, 0x80025133, + 0x8000771e, 0x8000771f, 0x8000771f, 0x8000774a, + 0x80004039, 0x8000778b, 0x80004046, 0x80004096, + 0x8002541d, 0x8000784e, 0x8000788c, 0x800078cc, + 0x800040e3, 0x80025626, 0x80007956, 0x8002569a, + 0x800256c5, 0x8000798f, 0x800079eb, 0x8000412f, + 0x80007a40, 0x80007a4a, 0x80007a4f, 0x8002597c, + 0x80025aa7, 0x80025aa7, 0x80007aae, 0x80004202, + 0x80025bab, 0x80007bc6, 0x80007bc9, 0x80004227, + 0x80025c80, 0x80007cd2, 0x800042a0, 0x80007ce8, + 0x80007ce3, 0x80007d00, 0x80025f86, 0x80007d63, + 0x80004301, 0x80007dc7, 0x80007e02, 0x80007e45, + 0x80004334, 0x80026228, 0x80026247, 0x80004359, + 0x800262d9, 0x80007f7a, 0x8002633e, 0x80007f95, + 0x80007ffa, 0x80008005, 0x800264da, 0x80026523, + 0x80008060, 0x800265a8, 0x80008070, 0x8002335f, + 0x800043d5, 0x800080b2, 0x80008103, 0x8000440b, + 0x8000813e, 0x80005ab5, 0x800267a7, 0x800267b5, + 0x80023393, 0x8002339c, 0x80008201, 0x80008204, + 0x80008f9e, 0x8000446b, 0x80008291, 0x8000828b, + 0x8000829d, 0x800052b3, 0x800082b1, 0x800082b3, + 0x800082bd, 0x800082e6, 0x80026b3c, 0x800082e5, + 0x8000831d, 0x80008363, 0x800083ad, 0x80008323, + 0x800083bd, 0x800083e7, 0x80008457, 0x80008353, + 0x800083ca, 0x800083cc, 0x800083dc, 0x80026c36, + 0x80026d6b, 0x80026cd5, 0x8000452b, 0x800084f1, + 0x800084f3, 0x80008516, 0x800273ca, 0x80008564, + 0x80026f2c, 0x8000455d, 0x80004561, 0x80026fb1, + 0x800270d2, 0x8000456b, 0x80008650, 0x8000865c, + 0x80008667, 0x80008669, 0x800086a9, 0x80008688, + 0x8000870e, 0x800086e2, 0x80008779, 0x80008728, + 0x8000876b, 0x80008786, 0x80004d57, 0x800087e1, + 0x80008801, 0x800045f9, 0x80008860, 0x80008863, + 0x80027667, 0x800088d7, 0x800088de, 0x80004635, + 0x800088fa, 0x800034bb, 0x800278ae, 0x80027966, + 0x800046be, 0x800046c7, 0x80008aa0, 0x80008aed, + 0x80008b8a, 0x80008c55, 0x80027ca8, 0x80008cab, + 0x80008cc1, 0x80008d1b, 0x80008d77, 0x80027f2f, + 0x80020804, 0x80008dcb, 0x80008dbc, 0x80008df0, + 0x800208de, 0x80008ed4, 0x80008f38, 0x800285d2, + 0x800285ed, 0x80009094, 0x800090f1, 0x80009111, + 0x8002872e, 0x8000911b, 0x80009238, 0x800092d7, + 0x800092d8, 0x8000927c, 0x800093f9, 0x80009415, + 0x80028bfa, 0x8000958b, 0x80004995, 0x800095b7, + 0x80028d77, 0x800049e6, 0x800096c3, 0x80005db2, + 0x80009723, 0x80029145, 0x8002921a, 0x80004a6e, + 0x80004a76, 0x800097e0, 0x8002940a, 0x80004ab2, + 0x80029496, 0x8000980b, 0x8000980b, 0x80009829, + 0x800295b6, 0x800098e2, 0x80004b33, 0x80009929, + 0x800099a7, 0x800099c2, 0x800099fe, 0x80004bce, + 0x80029b30, 0x80009b12, 0x80009c40, 0x80009cfd, + 0x80004cce, 0x80004ced, 0x80009d67, 0x8002a0ce, + 0x80004cf8, 0x8002a105, 0x8002a20e, 0x8002a291, + 0x80009ebb, 0x80004d56, 0x80009ef9, 0x80009efe, + 0x80009f05, 0x80009f0f, 0x80009f16, 0x80009f3b, + 0x8002a600, +}; + + +/* + * Lowercase <-> Uppercase mapping + */ + +/* + * Flags for special case mapping. + */ +#define CMF_FINAL 1 +#define CMF_NONFINAL 2 +#define CMF_LAST 16 +#define CMF_CTXDEP (CMF_FINAL|CMF_NONFINAL) + +#define CASEMAP_BITS_0 9 +#define CASEMAP_BITS_1 7 +#define CASEMAP_BITS_2 5 + +static const unsigned short v320_toupper_imap[] = { + 272, 400, 528, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 784, + 912, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 0, 0, 0, 1, 0, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 0, 0, 0, + 0, 0, 18, 0, 19, 20, 21, 22, + 0, 23, 24, 25, 26, 27, 28, 29, + 30, 0, 0, 31, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 49, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 50, 51, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 52, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 53, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 54, 55, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned short tbl[32]; +} v320_toupper_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, + 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, + 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + }}, + {{ + 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, + 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, + 102, 0, 104, 106, 108, 110, 112, 114, 116, 118, + }}, + {{ + 0, 120, 0, 122, 0, 124, 0, 126, 0, 128, 0, + 130, 0, 132, 0, 134, 0, 136, 0, 138, 0, 140, + 0, 142, 0, 144, 0, 146, 0, 148, 0, 150, + }}, + {{ + 0, 152, 0, 154, 0, 156, 0, 158, 0, 160, 0, + 162, 0, 164, 0, 166, 0, 168, 0, 170, 0, 172, + 0, 174, 0, 0, 176, 0, 178, 0, 180, 0, + }}, + {{ + 182, 0, 184, 0, 186, 0, 188, 0, 190, 192, 0, + 195, 0, 197, 0, 199, 0, 201, 0, 203, 0, 205, + 0, 207, 0, 209, 0, 211, 0, 213, 0, 215, + }}, + {{ + 0, 217, 0, 219, 0, 221, 0, 223, 0, 225, 0, + 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, + 0, 239, 0, 0, 241, 0, 243, 0, 245, 247, + }}, + {{ + 0, 0, 0, 249, 0, 251, 0, 0, 253, 0, 0, + 0, 255, 0, 0, 0, 0, 0, 257, 0, 0, 259, + 0, 0, 0, 261, 0, 0, 0, 0, 263, 0, + }}, + {{ + 0, 265, 0, 267, 0, 269, 0, 0, 271, 0, 0, + 0, 0, 273, 0, 0, 275, 0, 0, 0, 277, 0, + 279, 0, 0, 281, 0, 0, 0, 283, 0, 285, + }}, + {{ + 0, 0, 0, 0, 0, 287, 289, 0, 291, 293, 0, + 295, 297, 0, 299, 0, 301, 0, 303, 0, 305, 0, + 307, 0, 309, 0, 311, 0, 313, 315, 0, 317, + }}, + {{ + 0, 319, 0, 321, 0, 323, 0, 325, 0, 327, 0, + 329, 0, 331, 0, 333, 335, 0, 338, 340, 0, 342, + 0, 0, 0, 344, 0, 346, 0, 348, 0, 350, + }}, + {{ + 0, 352, 0, 354, 0, 356, 0, 358, 0, 360, 0, + 362, 0, 364, 0, 366, 0, 368, 0, 370, 0, 372, + 0, 374, 0, 376, 0, 378, 0, 380, 0, 382, + }}, + {{ + 0, 0, 0, 384, 0, 386, 0, 388, 0, 390, 0, + 392, 0, 394, 0, 396, 0, 398, 0, 400, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 402, 404, 0, + 406, 408, 0, 410, 0, 412, 0, 0, 0, 0, + }}, + {{ + 414, 0, 0, 416, 0, 0, 0, 0, 418, 420, 0, + 0, 0, 0, 0, 422, 0, 0, 424, 0, 0, 426, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 428, 0, 0, 430, 0, 0, 0, 0, 432, 0, 434, + 436, 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 446, 448, 450, 452, 454, 458, 460, 462, 464, 466, + 468, 470, 472, 474, 476, 478, 480, 482, 484, 486, + }}, + {{ + 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, + 510, 512, 514, 516, 0, 518, 520, 0, 0, 0, 522, + 524, 0, 0, 526, 0, 528, 0, 530, 0, 532, + }}, + {{ + 0, 534, 0, 536, 0, 538, 0, 540, 0, 542, 0, + 544, 0, 546, 0, 548, 550, 552, 554, 0, 0, 556, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 558, 560, 562, 564, 566, 568, + 570, 572, 574, 576, 578, 580, 582, 584, 586, 588, + }}, + {{ + 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, + 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, 632, + 634, 636, 638, 640, 642, 644, 646, 648, 650, 652, + }}, + {{ + 0, 654, 0, 656, 0, 658, 0, 660, 0, 662, 0, + 664, 0, 666, 0, 668, 0, 670, 0, 672, 0, 674, + 0, 676, 0, 678, 0, 680, 0, 682, 0, 684, + }}, + {{ + 0, 686, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 688, 0, 690, 0, 692, 0, 694, 0, 696, 0, 698, + 0, 700, 0, 702, 0, 704, 0, 706, 0, 708, + }}, + {{ + 0, 710, 0, 712, 0, 714, 0, 716, 0, 718, 0, + 720, 0, 722, 0, 724, 0, 726, 0, 728, 0, 730, + 0, 732, 0, 734, 0, 736, 0, 738, 0, 740, + }}, + {{ + 0, 0, 742, 0, 744, 0, 746, 0, 748, 0, 750, + 0, 752, 0, 754, 0, 0, 756, 0, 758, 0, 760, + 0, 762, 0, 764, 0, 766, 0, 768, 0, 770, + }}, + {{ + 0, 772, 0, 774, 0, 776, 0, 778, 0, 780, 0, + 782, 0, 784, 0, 786, 0, 788, 0, 790, 0, 792, + 0, 0, 0, 794, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 796, 0, 798, 0, 800, 0, 802, 0, 804, 0, + 806, 0, 808, 0, 810, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 812, 814, 816, 818, 820, 822, 824, 826, 828, 830, + 832, 834, 836, 838, 840, 842, 844, 846, 848, 850, 852, + 854, 856, 858, 860, 862, 864, 866, 868, 870, 872, + }}, + {{ + 874, 876, 878, 880, 882, 884, 886, 888, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 891, 0, 893, 0, 895, 0, 897, 0, 899, 0, + 901, 0, 903, 0, 905, 0, 907, 0, 909, 0, 911, + 0, 913, 0, 915, 0, 917, 0, 919, 0, 921, + }}, + {{ + 0, 923, 0, 925, 0, 927, 0, 929, 0, 931, 0, + 933, 0, 935, 0, 937, 0, 939, 0, 941, 0, 943, + 0, 945, 0, 947, 0, 949, 0, 951, 0, 953, + }}, + {{ + 0, 955, 0, 957, 0, 959, 0, 961, 0, 963, 0, + 965, 0, 967, 0, 969, 0, 971, 0, 973, 0, 975, + 0, 977, 0, 979, 0, 981, 0, 983, 0, 985, + }}, + {{ + 0, 987, 0, 989, 0, 991, 0, 993, 0, 995, 0, + 997, 0, 999, 0, 1001, 0, 1003, 0, 1005, 0, 1007, + 0, 1009, 0, 1011, 0, 1013, 0, 1015, 0, 1017, + }}, + {{ + 0, 1019, 0, 1021, 0, 1023, 0, 1025, 0, 1027, 0, + 1029, 0, 1031, 0, 1033, 0, 1035, 0, 1037, 0, 1039, + 1041, 1044, 1047, 1050, 1053, 1056, 0, 0, 0, 0, + }}, + {{ + 0, 1058, 0, 1060, 0, 1062, 0, 1064, 0, 1066, 0, + 1068, 0, 1070, 0, 1072, 0, 1074, 0, 1076, 0, 1078, + 0, 1080, 0, 1082, 0, 1084, 0, 1086, 0, 1088, + }}, + {{ + 0, 1090, 0, 1092, 0, 1094, 0, 1096, 0, 1098, 0, + 1100, 0, 1102, 0, 1104, 0, 1106, 0, 1108, 0, 1110, + 0, 1112, 0, 1114, 0, 1116, 0, 1118, 0, 1120, + }}, + {{ + 0, 1122, 0, 1124, 0, 1126, 0, 1128, 0, 1130, 0, + 1132, 0, 1134, 0, 1136, 0, 1138, 0, 1140, 0, 1142, + 0, 1144, 0, 1146, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 0, 0, 0, + 0, 0, 0, 0, 0, 1164, 1166, 1168, 1170, 1172, 1174, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 0, 0, 0, + 0, 0, 0, 0, 0, 1192, 1194, 1196, 1198, 1200, 1202, + 1204, 1206, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1208, 1210, 1212, 1214, 1216, 1218, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1220, 1223, 1225, 1229, 1231, 1235, + 1237, 1241, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1243, 1245, 1247, 1249, 1251, 1253, 1255, 1257, 0, 0, 0, + 0, 0, 0, 0, 0, 1259, 1261, 1263, 1265, 1267, 1269, + 1271, 1273, 1275, 1277, 1279, 1281, 1283, 1285, 0, 0, + }}, + {{ + 1287, 1292, 1297, 1302, 1307, 1312, 1317, 1322, 1327, 1330, 1333, + 1336, 1339, 1342, 1345, 1348, 1351, 1356, 1361, 1366, 1371, 1376, + 1381, 1386, 1391, 1394, 1397, 1400, 1403, 1406, 1409, 1412, + }}, + {{ + 1415, 1420, 1425, 1430, 1435, 1440, 1445, 1450, 1455, 1458, 1461, + 1464, 1467, 1470, 1473, 1476, 1479, 1481, 1483, 1486, 1491, 0, + 1494, 1497, 0, 0, 0, 0, 1501, 0, 1504, 0, + }}, + {{ + 0, 0, 1506, 1509, 1514, 0, 1517, 1520, 0, 0, 0, + 0, 1524, 0, 0, 0, 1527, 1529, 1531, 1535, 0, 0, + 1539, 1542, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1546, 1548, 1550, 1554, 1558, 1561, 1563, 1566, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1570, 1573, 1578, 0, + 1581, 1584, 0, 0, 0, 0, 1588, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1591, 1593, 1595, 1597, 1599, 1601, + 1603, 1605, 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1623, 1625, 1627, 1629, 1631, 1633, + 1635, 1637, 1639, 1641, 1643, 1645, 1647, 1649, 1651, 1653, + }}, + {{ + 1655, 1657, 1659, 1661, 1663, 1665, 1667, 1669, 1671, 1673, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1675, 1678, 1681, 1684, 1688, 1692, 1695, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1698, 1701, 1704, + 1707, 1710, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1713, 1715, 1717, 1719, 1721, 1723, 1725, 1727, 1729, 1731, + 1733, 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, + 1755, 1757, 1759, 1761, 1763, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1765, 1767, 1769, + 1771, 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1789, 1791, + 1793, 1795, 1797, 1799, 1801, 1803, 1805, 1807, 1809, 1811, + }}, + {{ + 1813, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831, 1833, + 1835, 1837, 1839, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; +static const unsigned short v320_tolower_imap[] = { + 272, 400, 528, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 784, + 912, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 0, 0, 1, 0, 0, 0, 2, 0, + 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 14, 15, 16, + 17, 18, 0, 19, 20, 21, 22, 23, + 24, 25, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 43, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 45, 46, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 48, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned short tbl[32]; +} v320_tolower_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, + 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, + 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, + }}, + {{ + 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, + 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, + 97, 0, 99, 101, 103, 105, 107, 109, 111, 0, + }}, + {{ + 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, + 0, 125, 0, 127, 0, 129, 0, 131, 0, 133, 0, + 135, 0, 137, 0, 139, 0, 141, 0, 143, 0, + }}, + {{ + 145, 0, 147, 0, 149, 0, 151, 0, 153, 0, 155, + 0, 157, 0, 159, 0, 161, 0, 165, 0, 167, 0, + 169, 0, 0, 171, 0, 173, 0, 175, 0, 177, + }}, + {{ + 0, 179, 0, 181, 0, 183, 0, 185, 0, 0, 187, + 0, 189, 0, 191, 0, 193, 0, 195, 0, 197, 0, + 199, 0, 201, 0, 203, 0, 205, 0, 207, 0, + }}, + {{ + 209, 0, 211, 0, 213, 0, 215, 0, 217, 0, 219, + 0, 221, 0, 223, 0, 225, 0, 227, 0, 229, 0, + 231, 0, 233, 235, 0, 237, 0, 239, 0, 0, + }}, + {{ + 0, 241, 243, 0, 245, 0, 247, 249, 0, 251, 253, + 255, 0, 0, 257, 259, 261, 263, 0, 265, 267, 0, + 269, 271, 273, 0, 0, 0, 275, 277, 0, 279, + }}, + {{ + 281, 0, 283, 0, 285, 0, 287, 289, 0, 291, 0, + 0, 293, 0, 295, 297, 0, 299, 301, 303, 0, 305, + 0, 307, 309, 0, 0, 0, 311, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 313, 315, 0, 317, 319, 0, 321, + 323, 0, 325, 0, 327, 0, 329, 0, 331, 0, 333, + 0, 335, 0, 337, 0, 339, 0, 0, 341, 0, + }}, + {{ + 343, 0, 345, 0, 347, 0, 349, 0, 351, 0, 353, + 0, 355, 0, 357, 0, 0, 359, 361, 0, 363, 0, + 365, 367, 369, 0, 371, 0, 373, 0, 375, 0, + }}, + {{ + 377, 0, 379, 0, 381, 0, 383, 0, 385, 0, 387, + 0, 389, 0, 391, 0, 393, 0, 395, 0, 397, 0, + 399, 0, 401, 0, 403, 0, 405, 0, 407, 0, + }}, + {{ + 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, + 0, 421, 0, 423, 0, 425, 0, 427, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 429, 0, 431, 433, 435, + 0, 437, 0, 439, 441, 0, 443, 445, 447, 449, 451, + 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, + }}, + {{ + 473, 475, 0, 477, 479, 481, 483, 485, 487, 489, 491, + 493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 495, 0, 497, 0, 499, 0, 501, 0, + }}, + {{ + 503, 0, 505, 0, 507, 0, 509, 0, 511, 0, 513, + 0, 515, 0, 517, 0, 0, 0, 0, 0, 519, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 521, 523, 525, 527, 529, 531, 533, 535, 537, 539, 541, + 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, 563, + 565, 567, 569, 571, 573, 575, 577, 579, 581, 583, + }}, + {{ + 585, 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, + 607, 609, 611, 613, 615, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 617, 0, 619, 0, 621, 0, 623, 0, 625, 0, 627, + 0, 629, 0, 631, 0, 633, 0, 635, 0, 637, 0, + 639, 0, 641, 0, 643, 0, 645, 0, 647, 0, + }}, + {{ + 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 651, + 0, 653, 0, 655, 0, 657, 0, 659, 0, 661, 0, + 663, 0, 665, 0, 667, 0, 669, 0, 671, 0, + }}, + {{ + 673, 0, 675, 0, 677, 0, 679, 0, 681, 0, 683, + 0, 685, 0, 687, 0, 689, 0, 691, 0, 693, 0, + 695, 0, 697, 0, 699, 0, 701, 0, 703, 0, + }}, + {{ + 0, 705, 0, 707, 0, 709, 0, 711, 0, 713, 0, + 715, 0, 717, 0, 0, 719, 0, 721, 0, 723, 0, + 725, 0, 727, 0, 729, 0, 731, 0, 733, 0, + }}, + {{ + 735, 0, 737, 0, 739, 0, 741, 0, 743, 0, 745, + 0, 747, 0, 749, 0, 751, 0, 753, 0, 755, 0, + 0, 0, 757, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 759, 0, 761, 0, 763, 0, 765, 0, 767, 0, 769, + 0, 771, 0, 773, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 775, 777, 779, 781, 783, + 785, 787, 789, 791, 793, 795, 797, 799, 801, 803, + }}, + {{ + 805, 807, 809, 811, 813, 815, 817, 819, 821, 823, 825, + 827, 829, 831, 833, 835, 837, 839, 841, 843, 845, 847, + 849, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 851, 0, 853, 0, 855, 0, 857, 0, 859, 0, 861, + 0, 863, 0, 865, 0, 867, 0, 869, 0, 871, 0, + 873, 0, 875, 0, 877, 0, 879, 0, 881, 0, + }}, + {{ + 883, 0, 885, 0, 887, 0, 889, 0, 891, 0, 893, + 0, 895, 0, 897, 0, 899, 0, 901, 0, 903, 0, + 905, 0, 907, 0, 909, 0, 911, 0, 913, 0, + }}, + {{ + 915, 0, 917, 0, 919, 0, 921, 0, 923, 0, 925, + 0, 927, 0, 929, 0, 931, 0, 933, 0, 935, 0, + 937, 0, 939, 0, 941, 0, 943, 0, 945, 0, + }}, + {{ + 947, 0, 949, 0, 951, 0, 953, 0, 955, 0, 957, + 0, 959, 0, 961, 0, 963, 0, 965, 0, 967, 0, + 969, 0, 971, 0, 973, 0, 975, 0, 977, 0, + }}, + {{ + 979, 0, 981, 0, 983, 0, 985, 0, 987, 0, 989, + 0, 991, 0, 993, 0, 995, 0, 997, 0, 999, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1001, 0, 1003, 0, 1005, 0, 1007, 0, 1009, 0, 1011, + 0, 1013, 0, 1015, 0, 1017, 0, 1019, 0, 1021, 0, + 1023, 0, 1025, 0, 1027, 0, 1029, 0, 1031, 0, + }}, + {{ + 1033, 0, 1035, 0, 1037, 0, 1039, 0, 1041, 0, 1043, + 0, 1045, 0, 1047, 0, 1049, 0, 1051, 0, 1053, 0, + 1055, 0, 1057, 0, 1059, 0, 1061, 0, 1063, 0, + }}, + {{ + 1065, 0, 1067, 0, 1069, 0, 1071, 0, 1073, 0, 1075, + 0, 1077, 0, 1079, 0, 1081, 0, 1083, 0, 1085, 0, + 1087, 0, 1089, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1091, 1093, 1095, + 1097, 1099, 1101, 1103, 1105, 0, 0, 0, 0, 0, 0, + 0, 0, 1107, 1109, 1111, 1113, 1115, 1117, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1119, 1121, 1123, + 1125, 1127, 1129, 1131, 1133, 0, 0, 0, 0, 0, 0, + 0, 0, 1135, 1137, 1139, 1141, 1143, 1145, 1147, 1149, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1151, 1153, 1155, + 1157, 1159, 1161, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1163, 0, 1165, 0, 1167, 0, 1169, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1171, 1173, 1175, + 1177, 1179, 1181, 1183, 1185, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1187, 1191, 1195, + 1199, 1203, 1207, 1211, 1215, 0, 0, 0, 0, 0, 0, + 0, 0, 1219, 1223, 1227, 1231, 1235, 1239, 1243, 1247, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1251, 1255, 1259, + 1263, 1267, 1271, 1275, 1279, 0, 0, 0, 0, 0, 0, + 0, 0, 1283, 1285, 1287, 1289, 1291, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1295, 1297, 1299, + 1301, 1303, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1307, 1309, 1311, 1313, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 1315, 1317, 1319, + 1321, 1323, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1325, 1327, 1329, 1331, 1333, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 1337, 0, 0, 0, 1339, + 1341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1343, 1345, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, + 1365, 1367, 1369, 1371, 1373, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1375, 1377, 1379, 1381, 1383, 1385, 1387, 1389, 1391, 1393, + }}, + {{ + 1395, 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, 1413, 1415, + 1417, 1419, 1421, 1423, 1425, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1427, 1429, 1431, 1433, 1435, 1437, 1439, 1441, 1443, 1445, + 1447, 1449, 1451, 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, + 1469, 1471, 1473, 1475, 1477, 0, 0, 0, 0, 0, + }}, + {{ + 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495, 1497, 1499, + 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, 1521, + 1523, 1525, 1527, 1529, 1531, 1533, 1535, 1537, 1539, 1541, + }}, + {{ + 1543, 1545, 1547, 1549, 1551, 1553, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; +static const unsigned long v320_toupper_seq[] = { + 0x00000000, 0x00000010, 0x80000041, 0x00000010, + 0x80000042, 0x00000010, 0x80000043, 0x00000010, + 0x80000044, 0x00000010, 0x80000045, 0x00000010, + 0x80000046, 0x00000010, 0x80000047, 0x00000010, + 0x80000048, 0x00000010, 0x80000049, 0x00000010, + 0x8000004a, 0x00000010, 0x8000004b, 0x00000010, + 0x8000004c, 0x00000010, 0x8000004d, 0x00000010, + 0x8000004e, 0x00000010, 0x8000004f, 0x00000010, + 0x80000050, 0x00000010, 0x80000051, 0x00000010, + 0x80000052, 0x00000010, 0x80000053, 0x00000010, + 0x80000054, 0x00000010, 0x80000055, 0x00000010, + 0x80000056, 0x00000010, 0x80000057, 0x00000010, + 0x80000058, 0x00000010, 0x80000059, 0x00000010, + 0x8000005a, 0x00000010, 0x8000039c, 0x00000010, + 0x00000053, 0x80000053, 0x00000010, 0x800000c0, + 0x00000010, 0x800000c1, 0x00000010, 0x800000c2, + 0x00000010, 0x800000c3, 0x00000010, 0x800000c4, + 0x00000010, 0x800000c5, 0x00000010, 0x800000c6, + 0x00000010, 0x800000c7, 0x00000010, 0x800000c8, + 0x00000010, 0x800000c9, 0x00000010, 0x800000ca, + 0x00000010, 0x800000cb, 0x00000010, 0x800000cc, + 0x00000010, 0x800000cd, 0x00000010, 0x800000ce, + 0x00000010, 0x800000cf, 0x00000010, 0x800000d0, + 0x00000010, 0x800000d1, 0x00000010, 0x800000d2, + 0x00000010, 0x800000d3, 0x00000010, 0x800000d4, + 0x00000010, 0x800000d5, 0x00000010, 0x800000d6, + 0x00000010, 0x800000d8, 0x00000010, 0x800000d9, + 0x00000010, 0x800000da, 0x00000010, 0x800000db, + 0x00000010, 0x800000dc, 0x00000010, 0x800000dd, + 0x00000010, 0x800000de, 0x00000010, 0x80000178, + 0x00000010, 0x80000100, 0x00000010, 0x80000102, + 0x00000010, 0x80000104, 0x00000010, 0x80000106, + 0x00000010, 0x80000108, 0x00000010, 0x8000010a, + 0x00000010, 0x8000010c, 0x00000010, 0x8000010e, + 0x00000010, 0x80000110, 0x00000010, 0x80000112, + 0x00000010, 0x80000114, 0x00000010, 0x80000116, + 0x00000010, 0x80000118, 0x00000010, 0x8000011a, + 0x00000010, 0x8000011c, 0x00000010, 0x8000011e, + 0x00000010, 0x80000120, 0x00000010, 0x80000122, + 0x00000010, 0x80000124, 0x00000010, 0x80000126, + 0x00000010, 0x80000128, 0x00000010, 0x8000012a, + 0x00000010, 0x8000012c, 0x00000010, 0x8000012e, + 0x00000010, 0x80000049, 0x00000010, 0x80000132, + 0x00000010, 0x80000134, 0x00000010, 0x80000136, + 0x00000010, 0x80000139, 0x00000010, 0x8000013b, + 0x00000010, 0x8000013d, 0x00000010, 0x8000013f, + 0x00000010, 0x80000141, 0x00000010, 0x80000143, + 0x00000010, 0x80000145, 0x00000010, 0x80000147, + 0x00000010, 0x000002bc, 0x8000004e, 0x00000010, + 0x8000014a, 0x00000010, 0x8000014c, 0x00000010, + 0x8000014e, 0x00000010, 0x80000150, 0x00000010, + 0x80000152, 0x00000010, 0x80000154, 0x00000010, + 0x80000156, 0x00000010, 0x80000158, 0x00000010, + 0x8000015a, 0x00000010, 0x8000015c, 0x00000010, + 0x8000015e, 0x00000010, 0x80000160, 0x00000010, + 0x80000162, 0x00000010, 0x80000164, 0x00000010, + 0x80000166, 0x00000010, 0x80000168, 0x00000010, + 0x8000016a, 0x00000010, 0x8000016c, 0x00000010, + 0x8000016e, 0x00000010, 0x80000170, 0x00000010, + 0x80000172, 0x00000010, 0x80000174, 0x00000010, + 0x80000176, 0x00000010, 0x80000179, 0x00000010, + 0x8000017b, 0x00000010, 0x8000017d, 0x00000010, + 0x80000053, 0x00000010, 0x80000182, 0x00000010, + 0x80000184, 0x00000010, 0x80000187, 0x00000010, + 0x8000018b, 0x00000010, 0x80000191, 0x00000010, + 0x800001f6, 0x00000010, 0x80000198, 0x00000010, + 0x80000220, 0x00000010, 0x800001a0, 0x00000010, + 0x800001a2, 0x00000010, 0x800001a4, 0x00000010, + 0x800001a7, 0x00000010, 0x800001ac, 0x00000010, + 0x800001af, 0x00000010, 0x800001b3, 0x00000010, + 0x800001b5, 0x00000010, 0x800001b8, 0x00000010, + 0x800001bc, 0x00000010, 0x800001f7, 0x00000010, + 0x800001c4, 0x00000010, 0x800001c4, 0x00000010, + 0x800001c7, 0x00000010, 0x800001c7, 0x00000010, + 0x800001ca, 0x00000010, 0x800001ca, 0x00000010, + 0x800001cd, 0x00000010, 0x800001cf, 0x00000010, + 0x800001d1, 0x00000010, 0x800001d3, 0x00000010, + 0x800001d5, 0x00000010, 0x800001d7, 0x00000010, + 0x800001d9, 0x00000010, 0x800001db, 0x00000010, + 0x8000018e, 0x00000010, 0x800001de, 0x00000010, + 0x800001e0, 0x00000010, 0x800001e2, 0x00000010, + 0x800001e4, 0x00000010, 0x800001e6, 0x00000010, + 0x800001e8, 0x00000010, 0x800001ea, 0x00000010, + 0x800001ec, 0x00000010, 0x800001ee, 0x00000010, + 0x0000004a, 0x8000030c, 0x00000010, 0x800001f1, + 0x00000010, 0x800001f1, 0x00000010, 0x800001f4, + 0x00000010, 0x800001f8, 0x00000010, 0x800001fa, + 0x00000010, 0x800001fc, 0x00000010, 0x800001fe, + 0x00000010, 0x80000200, 0x00000010, 0x80000202, + 0x00000010, 0x80000204, 0x00000010, 0x80000206, + 0x00000010, 0x80000208, 0x00000010, 0x8000020a, + 0x00000010, 0x8000020c, 0x00000010, 0x8000020e, + 0x00000010, 0x80000210, 0x00000010, 0x80000212, + 0x00000010, 0x80000214, 0x00000010, 0x80000216, + 0x00000010, 0x80000218, 0x00000010, 0x8000021a, + 0x00000010, 0x8000021c, 0x00000010, 0x8000021e, + 0x00000010, 0x80000222, 0x00000010, 0x80000224, + 0x00000010, 0x80000226, 0x00000010, 0x80000228, + 0x00000010, 0x8000022a, 0x00000010, 0x8000022c, + 0x00000010, 0x8000022e, 0x00000010, 0x80000230, + 0x00000010, 0x80000232, 0x00000010, 0x80000181, + 0x00000010, 0x80000186, 0x00000010, 0x80000189, + 0x00000010, 0x8000018a, 0x00000010, 0x8000018f, + 0x00000010, 0x80000190, 0x00000010, 0x80000193, + 0x00000010, 0x80000194, 0x00000010, 0x80000197, + 0x00000010, 0x80000196, 0x00000010, 0x8000019c, + 0x00000010, 0x8000019d, 0x00000010, 0x8000019f, + 0x00000010, 0x800001a6, 0x00000010, 0x800001a9, + 0x00000010, 0x800001ae, 0x00000010, 0x800001b1, + 0x00000010, 0x800001b2, 0x00000010, 0x800001b7, + 0x00000010, 0x80000399, 0x00000010, 0x00000399, + 0x00000308, 0x80000301, 0x00000010, 0x80000386, + 0x00000010, 0x80000388, 0x00000010, 0x80000389, + 0x00000010, 0x8000038a, 0x00000010, 0x000003a5, + 0x00000308, 0x80000301, 0x00000010, 0x80000391, + 0x00000010, 0x80000392, 0x00000010, 0x80000393, + 0x00000010, 0x80000394, 0x00000010, 0x80000395, + 0x00000010, 0x80000396, 0x00000010, 0x80000397, + 0x00000010, 0x80000398, 0x00000010, 0x80000399, + 0x00000010, 0x8000039a, 0x00000010, 0x8000039b, + 0x00000010, 0x8000039c, 0x00000010, 0x8000039d, + 0x00000010, 0x8000039e, 0x00000010, 0x8000039f, + 0x00000010, 0x800003a0, 0x00000010, 0x800003a1, + 0x00000010, 0x800003a3, 0x00000010, 0x800003a3, + 0x00000010, 0x800003a4, 0x00000010, 0x800003a5, + 0x00000010, 0x800003a6, 0x00000010, 0x800003a7, + 0x00000010, 0x800003a8, 0x00000010, 0x800003a9, + 0x00000010, 0x800003aa, 0x00000010, 0x800003ab, + 0x00000010, 0x8000038c, 0x00000010, 0x8000038e, + 0x00000010, 0x8000038f, 0x00000010, 0x80000392, + 0x00000010, 0x80000398, 0x00000010, 0x800003a6, + 0x00000010, 0x800003a0, 0x00000010, 0x800003d8, + 0x00000010, 0x800003da, 0x00000010, 0x800003dc, + 0x00000010, 0x800003de, 0x00000010, 0x800003e0, + 0x00000010, 0x800003e2, 0x00000010, 0x800003e4, + 0x00000010, 0x800003e6, 0x00000010, 0x800003e8, + 0x00000010, 0x800003ea, 0x00000010, 0x800003ec, + 0x00000010, 0x800003ee, 0x00000010, 0x8000039a, + 0x00000010, 0x800003a1, 0x00000010, 0x800003a3, + 0x00000010, 0x80000395, 0x00000010, 0x80000410, + 0x00000010, 0x80000411, 0x00000010, 0x80000412, + 0x00000010, 0x80000413, 0x00000010, 0x80000414, + 0x00000010, 0x80000415, 0x00000010, 0x80000416, + 0x00000010, 0x80000417, 0x00000010, 0x80000418, + 0x00000010, 0x80000419, 0x00000010, 0x8000041a, + 0x00000010, 0x8000041b, 0x00000010, 0x8000041c, + 0x00000010, 0x8000041d, 0x00000010, 0x8000041e, + 0x00000010, 0x8000041f, 0x00000010, 0x80000420, + 0x00000010, 0x80000421, 0x00000010, 0x80000422, + 0x00000010, 0x80000423, 0x00000010, 0x80000424, + 0x00000010, 0x80000425, 0x00000010, 0x80000426, + 0x00000010, 0x80000427, 0x00000010, 0x80000428, + 0x00000010, 0x80000429, 0x00000010, 0x8000042a, + 0x00000010, 0x8000042b, 0x00000010, 0x8000042c, + 0x00000010, 0x8000042d, 0x00000010, 0x8000042e, + 0x00000010, 0x8000042f, 0x00000010, 0x80000400, + 0x00000010, 0x80000401, 0x00000010, 0x80000402, + 0x00000010, 0x80000403, 0x00000010, 0x80000404, + 0x00000010, 0x80000405, 0x00000010, 0x80000406, + 0x00000010, 0x80000407, 0x00000010, 0x80000408, + 0x00000010, 0x80000409, 0x00000010, 0x8000040a, + 0x00000010, 0x8000040b, 0x00000010, 0x8000040c, + 0x00000010, 0x8000040d, 0x00000010, 0x8000040e, + 0x00000010, 0x8000040f, 0x00000010, 0x80000460, + 0x00000010, 0x80000462, 0x00000010, 0x80000464, + 0x00000010, 0x80000466, 0x00000010, 0x80000468, + 0x00000010, 0x8000046a, 0x00000010, 0x8000046c, + 0x00000010, 0x8000046e, 0x00000010, 0x80000470, + 0x00000010, 0x80000472, 0x00000010, 0x80000474, + 0x00000010, 0x80000476, 0x00000010, 0x80000478, + 0x00000010, 0x8000047a, 0x00000010, 0x8000047c, + 0x00000010, 0x8000047e, 0x00000010, 0x80000480, + 0x00000010, 0x8000048a, 0x00000010, 0x8000048c, + 0x00000010, 0x8000048e, 0x00000010, 0x80000490, + 0x00000010, 0x80000492, 0x00000010, 0x80000494, + 0x00000010, 0x80000496, 0x00000010, 0x80000498, + 0x00000010, 0x8000049a, 0x00000010, 0x8000049c, + 0x00000010, 0x8000049e, 0x00000010, 0x800004a0, + 0x00000010, 0x800004a2, 0x00000010, 0x800004a4, + 0x00000010, 0x800004a6, 0x00000010, 0x800004a8, + 0x00000010, 0x800004aa, 0x00000010, 0x800004ac, + 0x00000010, 0x800004ae, 0x00000010, 0x800004b0, + 0x00000010, 0x800004b2, 0x00000010, 0x800004b4, + 0x00000010, 0x800004b6, 0x00000010, 0x800004b8, + 0x00000010, 0x800004ba, 0x00000010, 0x800004bc, + 0x00000010, 0x800004be, 0x00000010, 0x800004c1, + 0x00000010, 0x800004c3, 0x00000010, 0x800004c5, + 0x00000010, 0x800004c7, 0x00000010, 0x800004c9, + 0x00000010, 0x800004cb, 0x00000010, 0x800004cd, + 0x00000010, 0x800004d0, 0x00000010, 0x800004d2, + 0x00000010, 0x800004d4, 0x00000010, 0x800004d6, + 0x00000010, 0x800004d8, 0x00000010, 0x800004da, + 0x00000010, 0x800004dc, 0x00000010, 0x800004de, + 0x00000010, 0x800004e0, 0x00000010, 0x800004e2, + 0x00000010, 0x800004e4, 0x00000010, 0x800004e6, + 0x00000010, 0x800004e8, 0x00000010, 0x800004ea, + 0x00000010, 0x800004ec, 0x00000010, 0x800004ee, + 0x00000010, 0x800004f0, 0x00000010, 0x800004f2, + 0x00000010, 0x800004f4, 0x00000010, 0x800004f8, + 0x00000010, 0x80000500, 0x00000010, 0x80000502, + 0x00000010, 0x80000504, 0x00000010, 0x80000506, + 0x00000010, 0x80000508, 0x00000010, 0x8000050a, + 0x00000010, 0x8000050c, 0x00000010, 0x8000050e, + 0x00000010, 0x80000531, 0x00000010, 0x80000532, + 0x00000010, 0x80000533, 0x00000010, 0x80000534, + 0x00000010, 0x80000535, 0x00000010, 0x80000536, + 0x00000010, 0x80000537, 0x00000010, 0x80000538, + 0x00000010, 0x80000539, 0x00000010, 0x8000053a, + 0x00000010, 0x8000053b, 0x00000010, 0x8000053c, + 0x00000010, 0x8000053d, 0x00000010, 0x8000053e, + 0x00000010, 0x8000053f, 0x00000010, 0x80000540, + 0x00000010, 0x80000541, 0x00000010, 0x80000542, + 0x00000010, 0x80000543, 0x00000010, 0x80000544, + 0x00000010, 0x80000545, 0x00000010, 0x80000546, + 0x00000010, 0x80000547, 0x00000010, 0x80000548, + 0x00000010, 0x80000549, 0x00000010, 0x8000054a, + 0x00000010, 0x8000054b, 0x00000010, 0x8000054c, + 0x00000010, 0x8000054d, 0x00000010, 0x8000054e, + 0x00000010, 0x8000054f, 0x00000010, 0x80000550, + 0x00000010, 0x80000551, 0x00000010, 0x80000552, + 0x00000010, 0x80000553, 0x00000010, 0x80000554, + 0x00000010, 0x80000555, 0x00000010, 0x80000556, + 0x00000010, 0x00000535, 0x80000552, 0x00000010, + 0x80001e00, 0x00000010, 0x80001e02, 0x00000010, + 0x80001e04, 0x00000010, 0x80001e06, 0x00000010, + 0x80001e08, 0x00000010, 0x80001e0a, 0x00000010, + 0x80001e0c, 0x00000010, 0x80001e0e, 0x00000010, + 0x80001e10, 0x00000010, 0x80001e12, 0x00000010, + 0x80001e14, 0x00000010, 0x80001e16, 0x00000010, + 0x80001e18, 0x00000010, 0x80001e1a, 0x00000010, + 0x80001e1c, 0x00000010, 0x80001e1e, 0x00000010, + 0x80001e20, 0x00000010, 0x80001e22, 0x00000010, + 0x80001e24, 0x00000010, 0x80001e26, 0x00000010, + 0x80001e28, 0x00000010, 0x80001e2a, 0x00000010, + 0x80001e2c, 0x00000010, 0x80001e2e, 0x00000010, + 0x80001e30, 0x00000010, 0x80001e32, 0x00000010, + 0x80001e34, 0x00000010, 0x80001e36, 0x00000010, + 0x80001e38, 0x00000010, 0x80001e3a, 0x00000010, + 0x80001e3c, 0x00000010, 0x80001e3e, 0x00000010, + 0x80001e40, 0x00000010, 0x80001e42, 0x00000010, + 0x80001e44, 0x00000010, 0x80001e46, 0x00000010, + 0x80001e48, 0x00000010, 0x80001e4a, 0x00000010, + 0x80001e4c, 0x00000010, 0x80001e4e, 0x00000010, + 0x80001e50, 0x00000010, 0x80001e52, 0x00000010, + 0x80001e54, 0x00000010, 0x80001e56, 0x00000010, + 0x80001e58, 0x00000010, 0x80001e5a, 0x00000010, + 0x80001e5c, 0x00000010, 0x80001e5e, 0x00000010, + 0x80001e60, 0x00000010, 0x80001e62, 0x00000010, + 0x80001e64, 0x00000010, 0x80001e66, 0x00000010, + 0x80001e68, 0x00000010, 0x80001e6a, 0x00000010, + 0x80001e6c, 0x00000010, 0x80001e6e, 0x00000010, + 0x80001e70, 0x00000010, 0x80001e72, 0x00000010, + 0x80001e74, 0x00000010, 0x80001e76, 0x00000010, + 0x80001e78, 0x00000010, 0x80001e7a, 0x00000010, + 0x80001e7c, 0x00000010, 0x80001e7e, 0x00000010, + 0x80001e80, 0x00000010, 0x80001e82, 0x00000010, + 0x80001e84, 0x00000010, 0x80001e86, 0x00000010, + 0x80001e88, 0x00000010, 0x80001e8a, 0x00000010, + 0x80001e8c, 0x00000010, 0x80001e8e, 0x00000010, + 0x80001e90, 0x00000010, 0x80001e92, 0x00000010, + 0x80001e94, 0x00000010, 0x00000048, 0x80000331, + 0x00000010, 0x00000054, 0x80000308, 0x00000010, + 0x00000057, 0x8000030a, 0x00000010, 0x00000059, + 0x8000030a, 0x00000010, 0x00000041, 0x800002be, + 0x00000010, 0x80001e60, 0x00000010, 0x80001ea0, + 0x00000010, 0x80001ea2, 0x00000010, 0x80001ea4, + 0x00000010, 0x80001ea6, 0x00000010, 0x80001ea8, + 0x00000010, 0x80001eaa, 0x00000010, 0x80001eac, + 0x00000010, 0x80001eae, 0x00000010, 0x80001eb0, + 0x00000010, 0x80001eb2, 0x00000010, 0x80001eb4, + 0x00000010, 0x80001eb6, 0x00000010, 0x80001eb8, + 0x00000010, 0x80001eba, 0x00000010, 0x80001ebc, + 0x00000010, 0x80001ebe, 0x00000010, 0x80001ec0, + 0x00000010, 0x80001ec2, 0x00000010, 0x80001ec4, + 0x00000010, 0x80001ec6, 0x00000010, 0x80001ec8, + 0x00000010, 0x80001eca, 0x00000010, 0x80001ecc, + 0x00000010, 0x80001ece, 0x00000010, 0x80001ed0, + 0x00000010, 0x80001ed2, 0x00000010, 0x80001ed4, + 0x00000010, 0x80001ed6, 0x00000010, 0x80001ed8, + 0x00000010, 0x80001eda, 0x00000010, 0x80001edc, + 0x00000010, 0x80001ede, 0x00000010, 0x80001ee0, + 0x00000010, 0x80001ee2, 0x00000010, 0x80001ee4, + 0x00000010, 0x80001ee6, 0x00000010, 0x80001ee8, + 0x00000010, 0x80001eea, 0x00000010, 0x80001eec, + 0x00000010, 0x80001eee, 0x00000010, 0x80001ef0, + 0x00000010, 0x80001ef2, 0x00000010, 0x80001ef4, + 0x00000010, 0x80001ef6, 0x00000010, 0x80001ef8, + 0x00000010, 0x80001f08, 0x00000010, 0x80001f09, + 0x00000010, 0x80001f0a, 0x00000010, 0x80001f0b, + 0x00000010, 0x80001f0c, 0x00000010, 0x80001f0d, + 0x00000010, 0x80001f0e, 0x00000010, 0x80001f0f, + 0x00000010, 0x80001f18, 0x00000010, 0x80001f19, + 0x00000010, 0x80001f1a, 0x00000010, 0x80001f1b, + 0x00000010, 0x80001f1c, 0x00000010, 0x80001f1d, + 0x00000010, 0x80001f28, 0x00000010, 0x80001f29, + 0x00000010, 0x80001f2a, 0x00000010, 0x80001f2b, + 0x00000010, 0x80001f2c, 0x00000010, 0x80001f2d, + 0x00000010, 0x80001f2e, 0x00000010, 0x80001f2f, + 0x00000010, 0x80001f38, 0x00000010, 0x80001f39, + 0x00000010, 0x80001f3a, 0x00000010, 0x80001f3b, + 0x00000010, 0x80001f3c, 0x00000010, 0x80001f3d, + 0x00000010, 0x80001f3e, 0x00000010, 0x80001f3f, + 0x00000010, 0x80001f48, 0x00000010, 0x80001f49, + 0x00000010, 0x80001f4a, 0x00000010, 0x80001f4b, + 0x00000010, 0x80001f4c, 0x00000010, 0x80001f4d, + 0x00000010, 0x000003a5, 0x80000313, 0x00000010, + 0x80001f59, 0x00000010, 0x000003a5, 0x00000313, + 0x80000300, 0x00000010, 0x80001f5b, 0x00000010, + 0x000003a5, 0x00000313, 0x80000301, 0x00000010, + 0x80001f5d, 0x00000010, 0x000003a5, 0x00000313, + 0x80000342, 0x00000010, 0x80001f5f, 0x00000010, + 0x80001f68, 0x00000010, 0x80001f69, 0x00000010, + 0x80001f6a, 0x00000010, 0x80001f6b, 0x00000010, + 0x80001f6c, 0x00000010, 0x80001f6d, 0x00000010, + 0x80001f6e, 0x00000010, 0x80001f6f, 0x00000010, + 0x80001fba, 0x00000010, 0x80001fbb, 0x00000010, + 0x80001fc8, 0x00000010, 0x80001fc9, 0x00000010, + 0x80001fca, 0x00000010, 0x80001fcb, 0x00000010, + 0x80001fda, 0x00000010, 0x80001fdb, 0x00000010, + 0x80001ff8, 0x00000010, 0x80001ff9, 0x00000010, + 0x80001fea, 0x00000010, 0x80001feb, 0x00000010, + 0x80001ffa, 0x00000010, 0x80001ffb, 0x00000000, + 0x00001f08, 0x80000399, 0x00000010, 0x80001f88, + 0x00000000, 0x00001f09, 0x80000399, 0x00000010, + 0x80001f89, 0x00000000, 0x00001f0a, 0x80000399, + 0x00000010, 0x80001f8a, 0x00000000, 0x00001f0b, + 0x80000399, 0x00000010, 0x80001f8b, 0x00000000, + 0x00001f0c, 0x80000399, 0x00000010, 0x80001f8c, + 0x00000000, 0x00001f0d, 0x80000399, 0x00000010, + 0x80001f8d, 0x00000000, 0x00001f0e, 0x80000399, + 0x00000010, 0x80001f8e, 0x00000000, 0x00001f0f, + 0x80000399, 0x00000010, 0x80001f8f, 0x00000010, + 0x00001f08, 0x80000399, 0x00000010, 0x00001f09, + 0x80000399, 0x00000010, 0x00001f0a, 0x80000399, + 0x00000010, 0x00001f0b, 0x80000399, 0x00000010, + 0x00001f0c, 0x80000399, 0x00000010, 0x00001f0d, + 0x80000399, 0x00000010, 0x00001f0e, 0x80000399, + 0x00000010, 0x00001f0f, 0x80000399, 0x00000000, + 0x00001f28, 0x80000399, 0x00000010, 0x80001f98, + 0x00000000, 0x00001f29, 0x80000399, 0x00000010, + 0x80001f99, 0x00000000, 0x00001f2a, 0x80000399, + 0x00000010, 0x80001f9a, 0x00000000, 0x00001f2b, + 0x80000399, 0x00000010, 0x80001f9b, 0x00000000, + 0x00001f2c, 0x80000399, 0x00000010, 0x80001f9c, + 0x00000000, 0x00001f2d, 0x80000399, 0x00000010, + 0x80001f9d, 0x00000000, 0x00001f2e, 0x80000399, + 0x00000010, 0x80001f9e, 0x00000000, 0x00001f2f, + 0x80000399, 0x00000010, 0x80001f9f, 0x00000010, + 0x00001f28, 0x80000399, 0x00000010, 0x00001f29, + 0x80000399, 0x00000010, 0x00001f2a, 0x80000399, + 0x00000010, 0x00001f2b, 0x80000399, 0x00000010, + 0x00001f2c, 0x80000399, 0x00000010, 0x00001f2d, + 0x80000399, 0x00000010, 0x00001f2e, 0x80000399, + 0x00000010, 0x00001f2f, 0x80000399, 0x00000000, + 0x00001f68, 0x80000399, 0x00000010, 0x80001fa8, + 0x00000000, 0x00001f69, 0x80000399, 0x00000010, + 0x80001fa9, 0x00000000, 0x00001f6a, 0x80000399, + 0x00000010, 0x80001faa, 0x00000000, 0x00001f6b, + 0x80000399, 0x00000010, 0x80001fab, 0x00000000, + 0x00001f6c, 0x80000399, 0x00000010, 0x80001fac, + 0x00000000, 0x00001f6d, 0x80000399, 0x00000010, + 0x80001fad, 0x00000000, 0x00001f6e, 0x80000399, + 0x00000010, 0x80001fae, 0x00000000, 0x00001f6f, + 0x80000399, 0x00000010, 0x80001faf, 0x00000010, + 0x00001f68, 0x80000399, 0x00000010, 0x00001f69, + 0x80000399, 0x00000010, 0x00001f6a, 0x80000399, + 0x00000010, 0x00001f6b, 0x80000399, 0x00000010, + 0x00001f6c, 0x80000399, 0x00000010, 0x00001f6d, + 0x80000399, 0x00000010, 0x00001f6e, 0x80000399, + 0x00000010, 0x00001f6f, 0x80000399, 0x00000010, + 0x80001fb8, 0x00000010, 0x80001fb9, 0x00000010, + 0x00001fba, 0x80000399, 0x00000000, 0x00000391, + 0x80000399, 0x00000010, 0x80001fbc, 0x00000010, + 0x00000386, 0x80000399, 0x00000010, 0x00000391, + 0x80000342, 0x00000010, 0x00000391, 0x00000342, + 0x80000399, 0x00000010, 0x00000391, 0x80000399, + 0x00000010, 0x80000399, 0x00000010, 0x00001fca, + 0x80000399, 0x00000000, 0x00000397, 0x80000399, + 0x00000010, 0x80001fcc, 0x00000010, 0x00000389, + 0x80000399, 0x00000010, 0x00000397, 0x80000342, + 0x00000010, 0x00000397, 0x00000342, 0x80000399, + 0x00000010, 0x00000397, 0x80000399, 0x00000010, + 0x80001fd8, 0x00000010, 0x80001fd9, 0x00000010, + 0x00000399, 0x00000308, 0x80000300, 0x00000010, + 0x00000399, 0x00000308, 0x80000301, 0x00000010, + 0x00000399, 0x80000342, 0x00000010, 0x00000399, + 0x00000308, 0x80000342, 0x00000010, 0x80001fe8, + 0x00000010, 0x80001fe9, 0x00000010, 0x000003a5, + 0x00000308, 0x80000300, 0x00000010, 0x000003a5, + 0x00000308, 0x80000301, 0x00000010, 0x000003a1, + 0x80000313, 0x00000010, 0x80001fec, 0x00000010, + 0x000003a5, 0x80000342, 0x00000010, 0x000003a5, + 0x00000308, 0x80000342, 0x00000010, 0x00001ffa, + 0x80000399, 0x00000000, 0x000003a9, 0x80000399, + 0x00000010, 0x80001ffc, 0x00000010, 0x0000038f, + 0x80000399, 0x00000010, 0x000003a9, 0x80000342, + 0x00000010, 0x000003a9, 0x00000342, 0x80000399, + 0x00000010, 0x000003a9, 0x80000399, 0x00000010, + 0x80002160, 0x00000010, 0x80002161, 0x00000010, + 0x80002162, 0x00000010, 0x80002163, 0x00000010, + 0x80002164, 0x00000010, 0x80002165, 0x00000010, + 0x80002166, 0x00000010, 0x80002167, 0x00000010, + 0x80002168, 0x00000010, 0x80002169, 0x00000010, + 0x8000216a, 0x00000010, 0x8000216b, 0x00000010, + 0x8000216c, 0x00000010, 0x8000216d, 0x00000010, + 0x8000216e, 0x00000010, 0x8000216f, 0x00000010, + 0x800024b6, 0x00000010, 0x800024b7, 0x00000010, + 0x800024b8, 0x00000010, 0x800024b9, 0x00000010, + 0x800024ba, 0x00000010, 0x800024bb, 0x00000010, + 0x800024bc, 0x00000010, 0x800024bd, 0x00000010, + 0x800024be, 0x00000010, 0x800024bf, 0x00000010, + 0x800024c0, 0x00000010, 0x800024c1, 0x00000010, + 0x800024c2, 0x00000010, 0x800024c3, 0x00000010, + 0x800024c4, 0x00000010, 0x800024c5, 0x00000010, + 0x800024c6, 0x00000010, 0x800024c7, 0x00000010, + 0x800024c8, 0x00000010, 0x800024c9, 0x00000010, + 0x800024ca, 0x00000010, 0x800024cb, 0x00000010, + 0x800024cc, 0x00000010, 0x800024cd, 0x00000010, + 0x800024ce, 0x00000010, 0x800024cf, 0x00000010, + 0x00000046, 0x80000046, 0x00000010, 0x00000046, + 0x80000049, 0x00000010, 0x00000046, 0x8000004c, + 0x00000010, 0x00000046, 0x00000046, 0x80000049, + 0x00000010, 0x00000046, 0x00000046, 0x8000004c, + 0x00000010, 0x00000053, 0x80000054, 0x00000010, + 0x00000053, 0x80000054, 0x00000010, 0x00000544, + 0x80000546, 0x00000010, 0x00000544, 0x80000535, + 0x00000010, 0x00000544, 0x8000053b, 0x00000010, + 0x0000054e, 0x80000546, 0x00000010, 0x00000544, + 0x8000053d, 0x00000010, 0x8000ff21, 0x00000010, + 0x8000ff22, 0x00000010, 0x8000ff23, 0x00000010, + 0x8000ff24, 0x00000010, 0x8000ff25, 0x00000010, + 0x8000ff26, 0x00000010, 0x8000ff27, 0x00000010, + 0x8000ff28, 0x00000010, 0x8000ff29, 0x00000010, + 0x8000ff2a, 0x00000010, 0x8000ff2b, 0x00000010, + 0x8000ff2c, 0x00000010, 0x8000ff2d, 0x00000010, + 0x8000ff2e, 0x00000010, 0x8000ff2f, 0x00000010, + 0x8000ff30, 0x00000010, 0x8000ff31, 0x00000010, + 0x8000ff32, 0x00000010, 0x8000ff33, 0x00000010, + 0x8000ff34, 0x00000010, 0x8000ff35, 0x00000010, + 0x8000ff36, 0x00000010, 0x8000ff37, 0x00000010, + 0x8000ff38, 0x00000010, 0x8000ff39, 0x00000010, + 0x8000ff3a, 0x00000010, 0x80010400, 0x00000010, + 0x80010401, 0x00000010, 0x80010402, 0x00000010, + 0x80010403, 0x00000010, 0x80010404, 0x00000010, + 0x80010405, 0x00000010, 0x80010406, 0x00000010, + 0x80010407, 0x00000010, 0x80010408, 0x00000010, + 0x80010409, 0x00000010, 0x8001040a, 0x00000010, + 0x8001040b, 0x00000010, 0x8001040c, 0x00000010, + 0x8001040d, 0x00000010, 0x8001040e, 0x00000010, + 0x8001040f, 0x00000010, 0x80010410, 0x00000010, + 0x80010411, 0x00000010, 0x80010412, 0x00000010, + 0x80010413, 0x00000010, 0x80010414, 0x00000010, + 0x80010415, 0x00000010, 0x80010416, 0x00000010, + 0x80010417, 0x00000010, 0x80010418, 0x00000010, + 0x80010419, 0x00000010, 0x8001041a, 0x00000010, + 0x8001041b, 0x00000010, 0x8001041c, 0x00000010, + 0x8001041d, 0x00000010, 0x8001041e, 0x00000010, + 0x8001041f, 0x00000010, 0x80010420, 0x00000010, + 0x80010421, 0x00000010, 0x80010422, 0x00000010, + 0x80010423, 0x00000010, 0x80010424, 0x00000010, + 0x80010425, +}; + +static const unsigned long v320_tolower_seq[] = { + 0x00000000, 0x00000010, 0x80000061, 0x00000010, + 0x80000062, 0x00000010, 0x80000063, 0x00000010, + 0x80000064, 0x00000010, 0x80000065, 0x00000010, + 0x80000066, 0x00000010, 0x80000067, 0x00000010, + 0x80000068, 0x00000010, 0x80000069, 0x00000010, + 0x8000006a, 0x00000010, 0x8000006b, 0x00000010, + 0x8000006c, 0x00000010, 0x8000006d, 0x00000010, + 0x8000006e, 0x00000010, 0x8000006f, 0x00000010, + 0x80000070, 0x00000010, 0x80000071, 0x00000010, + 0x80000072, 0x00000010, 0x80000073, 0x00000010, + 0x80000074, 0x00000010, 0x80000075, 0x00000010, + 0x80000076, 0x00000010, 0x80000077, 0x00000010, + 0x80000078, 0x00000010, 0x80000079, 0x00000010, + 0x8000007a, 0x00000010, 0x800000e0, 0x00000010, + 0x800000e1, 0x00000010, 0x800000e2, 0x00000010, + 0x800000e3, 0x00000010, 0x800000e4, 0x00000010, + 0x800000e5, 0x00000010, 0x800000e6, 0x00000010, + 0x800000e7, 0x00000010, 0x800000e8, 0x00000010, + 0x800000e9, 0x00000010, 0x800000ea, 0x00000010, + 0x800000eb, 0x00000010, 0x800000ec, 0x00000010, + 0x800000ed, 0x00000010, 0x800000ee, 0x00000010, + 0x800000ef, 0x00000010, 0x800000f0, 0x00000010, + 0x800000f1, 0x00000010, 0x800000f2, 0x00000010, + 0x800000f3, 0x00000010, 0x800000f4, 0x00000010, + 0x800000f5, 0x00000010, 0x800000f6, 0x00000010, + 0x800000f8, 0x00000010, 0x800000f9, 0x00000010, + 0x800000fa, 0x00000010, 0x800000fb, 0x00000010, + 0x800000fc, 0x00000010, 0x800000fd, 0x00000010, + 0x800000fe, 0x00000010, 0x80000101, 0x00000010, + 0x80000103, 0x00000010, 0x80000105, 0x00000010, + 0x80000107, 0x00000010, 0x80000109, 0x00000010, + 0x8000010b, 0x00000010, 0x8000010d, 0x00000010, + 0x8000010f, 0x00000010, 0x80000111, 0x00000010, + 0x80000113, 0x00000010, 0x80000115, 0x00000010, + 0x80000117, 0x00000010, 0x80000119, 0x00000010, + 0x8000011b, 0x00000010, 0x8000011d, 0x00000010, + 0x8000011f, 0x00000010, 0x80000121, 0x00000010, + 0x80000123, 0x00000010, 0x80000125, 0x00000010, + 0x80000127, 0x00000010, 0x80000129, 0x00000010, + 0x8000012b, 0x00000010, 0x8000012d, 0x00000010, + 0x8000012f, 0x00000000, 0x80000069, 0x00000010, + 0x80000069, 0x00000010, 0x80000133, 0x00000010, + 0x80000135, 0x00000010, 0x80000137, 0x00000010, + 0x8000013a, 0x00000010, 0x8000013c, 0x00000010, + 0x8000013e, 0x00000010, 0x80000140, 0x00000010, + 0x80000142, 0x00000010, 0x80000144, 0x00000010, + 0x80000146, 0x00000010, 0x80000148, 0x00000010, + 0x8000014b, 0x00000010, 0x8000014d, 0x00000010, + 0x8000014f, 0x00000010, 0x80000151, 0x00000010, + 0x80000153, 0x00000010, 0x80000155, 0x00000010, + 0x80000157, 0x00000010, 0x80000159, 0x00000010, + 0x8000015b, 0x00000010, 0x8000015d, 0x00000010, + 0x8000015f, 0x00000010, 0x80000161, 0x00000010, + 0x80000163, 0x00000010, 0x80000165, 0x00000010, + 0x80000167, 0x00000010, 0x80000169, 0x00000010, + 0x8000016b, 0x00000010, 0x8000016d, 0x00000010, + 0x8000016f, 0x00000010, 0x80000171, 0x00000010, + 0x80000173, 0x00000010, 0x80000175, 0x00000010, + 0x80000177, 0x00000010, 0x800000ff, 0x00000010, + 0x8000017a, 0x00000010, 0x8000017c, 0x00000010, + 0x8000017e, 0x00000010, 0x80000253, 0x00000010, + 0x80000183, 0x00000010, 0x80000185, 0x00000010, + 0x80000254, 0x00000010, 0x80000188, 0x00000010, + 0x80000256, 0x00000010, 0x80000257, 0x00000010, + 0x8000018c, 0x00000010, 0x800001dd, 0x00000010, + 0x80000259, 0x00000010, 0x8000025b, 0x00000010, + 0x80000192, 0x00000010, 0x80000260, 0x00000010, + 0x80000263, 0x00000010, 0x80000269, 0x00000010, + 0x80000268, 0x00000010, 0x80000199, 0x00000010, + 0x8000026f, 0x00000010, 0x80000272, 0x00000010, + 0x80000275, 0x00000010, 0x800001a1, 0x00000010, + 0x800001a3, 0x00000010, 0x800001a5, 0x00000010, + 0x80000280, 0x00000010, 0x800001a8, 0x00000010, + 0x80000283, 0x00000010, 0x800001ad, 0x00000010, + 0x80000288, 0x00000010, 0x800001b0, 0x00000010, + 0x8000028a, 0x00000010, 0x8000028b, 0x00000010, + 0x800001b4, 0x00000010, 0x800001b6, 0x00000010, + 0x80000292, 0x00000010, 0x800001b9, 0x00000010, + 0x800001bd, 0x00000010, 0x800001c6, 0x00000010, + 0x800001c6, 0x00000010, 0x800001c9, 0x00000010, + 0x800001c9, 0x00000010, 0x800001cc, 0x00000010, + 0x800001cc, 0x00000010, 0x800001ce, 0x00000010, + 0x800001d0, 0x00000010, 0x800001d2, 0x00000010, + 0x800001d4, 0x00000010, 0x800001d6, 0x00000010, + 0x800001d8, 0x00000010, 0x800001da, 0x00000010, + 0x800001dc, 0x00000010, 0x800001df, 0x00000010, + 0x800001e1, 0x00000010, 0x800001e3, 0x00000010, + 0x800001e5, 0x00000010, 0x800001e7, 0x00000010, + 0x800001e9, 0x00000010, 0x800001eb, 0x00000010, + 0x800001ed, 0x00000010, 0x800001ef, 0x00000010, + 0x800001f3, 0x00000010, 0x800001f3, 0x00000010, + 0x800001f5, 0x00000010, 0x80000195, 0x00000010, + 0x800001bf, 0x00000010, 0x800001f9, 0x00000010, + 0x800001fb, 0x00000010, 0x800001fd, 0x00000010, + 0x800001ff, 0x00000010, 0x80000201, 0x00000010, + 0x80000203, 0x00000010, 0x80000205, 0x00000010, + 0x80000207, 0x00000010, 0x80000209, 0x00000010, + 0x8000020b, 0x00000010, 0x8000020d, 0x00000010, + 0x8000020f, 0x00000010, 0x80000211, 0x00000010, + 0x80000213, 0x00000010, 0x80000215, 0x00000010, + 0x80000217, 0x00000010, 0x80000219, 0x00000010, + 0x8000021b, 0x00000010, 0x8000021d, 0x00000010, + 0x8000021f, 0x00000010, 0x8000019e, 0x00000010, + 0x80000223, 0x00000010, 0x80000225, 0x00000010, + 0x80000227, 0x00000010, 0x80000229, 0x00000010, + 0x8000022b, 0x00000010, 0x8000022d, 0x00000010, + 0x8000022f, 0x00000010, 0x80000231, 0x00000010, + 0x80000233, 0x00000010, 0x800003ac, 0x00000010, + 0x800003ad, 0x00000010, 0x800003ae, 0x00000010, + 0x800003af, 0x00000010, 0x800003cc, 0x00000010, + 0x800003cd, 0x00000010, 0x800003ce, 0x00000010, + 0x800003b1, 0x00000010, 0x800003b2, 0x00000010, + 0x800003b3, 0x00000010, 0x800003b4, 0x00000010, + 0x800003b5, 0x00000010, 0x800003b6, 0x00000010, + 0x800003b7, 0x00000010, 0x800003b8, 0x00000010, + 0x800003b9, 0x00000010, 0x800003ba, 0x00000010, + 0x800003bb, 0x00000010, 0x800003bc, 0x00000010, + 0x800003bd, 0x00000010, 0x800003be, 0x00000010, + 0x800003bf, 0x00000010, 0x800003c0, 0x00000010, + 0x800003c1, 0x00000010, 0x800003c3, 0x00000010, + 0x800003c4, 0x00000010, 0x800003c5, 0x00000010, + 0x800003c6, 0x00000010, 0x800003c7, 0x00000010, + 0x800003c8, 0x00000010, 0x800003c9, 0x00000010, + 0x800003ca, 0x00000010, 0x800003cb, 0x00000010, + 0x800003d9, 0x00000010, 0x800003db, 0x00000010, + 0x800003dd, 0x00000010, 0x800003df, 0x00000010, + 0x800003e1, 0x00000010, 0x800003e3, 0x00000010, + 0x800003e5, 0x00000010, 0x800003e7, 0x00000010, + 0x800003e9, 0x00000010, 0x800003eb, 0x00000010, + 0x800003ed, 0x00000010, 0x800003ef, 0x00000010, + 0x800003b8, 0x00000010, 0x80000450, 0x00000010, + 0x80000451, 0x00000010, 0x80000452, 0x00000010, + 0x80000453, 0x00000010, 0x80000454, 0x00000010, + 0x80000455, 0x00000010, 0x80000456, 0x00000010, + 0x80000457, 0x00000010, 0x80000458, 0x00000010, + 0x80000459, 0x00000010, 0x8000045a, 0x00000010, + 0x8000045b, 0x00000010, 0x8000045c, 0x00000010, + 0x8000045d, 0x00000010, 0x8000045e, 0x00000010, + 0x8000045f, 0x00000010, 0x80000430, 0x00000010, + 0x80000431, 0x00000010, 0x80000432, 0x00000010, + 0x80000433, 0x00000010, 0x80000434, 0x00000010, + 0x80000435, 0x00000010, 0x80000436, 0x00000010, + 0x80000437, 0x00000010, 0x80000438, 0x00000010, + 0x80000439, 0x00000010, 0x8000043a, 0x00000010, + 0x8000043b, 0x00000010, 0x8000043c, 0x00000010, + 0x8000043d, 0x00000010, 0x8000043e, 0x00000010, + 0x8000043f, 0x00000010, 0x80000440, 0x00000010, + 0x80000441, 0x00000010, 0x80000442, 0x00000010, + 0x80000443, 0x00000010, 0x80000444, 0x00000010, + 0x80000445, 0x00000010, 0x80000446, 0x00000010, + 0x80000447, 0x00000010, 0x80000448, 0x00000010, + 0x80000449, 0x00000010, 0x8000044a, 0x00000010, + 0x8000044b, 0x00000010, 0x8000044c, 0x00000010, + 0x8000044d, 0x00000010, 0x8000044e, 0x00000010, + 0x8000044f, 0x00000010, 0x80000461, 0x00000010, + 0x80000463, 0x00000010, 0x80000465, 0x00000010, + 0x80000467, 0x00000010, 0x80000469, 0x00000010, + 0x8000046b, 0x00000010, 0x8000046d, 0x00000010, + 0x8000046f, 0x00000010, 0x80000471, 0x00000010, + 0x80000473, 0x00000010, 0x80000475, 0x00000010, + 0x80000477, 0x00000010, 0x80000479, 0x00000010, + 0x8000047b, 0x00000010, 0x8000047d, 0x00000010, + 0x8000047f, 0x00000010, 0x80000481, 0x00000010, + 0x8000048b, 0x00000010, 0x8000048d, 0x00000010, + 0x8000048f, 0x00000010, 0x80000491, 0x00000010, + 0x80000493, 0x00000010, 0x80000495, 0x00000010, + 0x80000497, 0x00000010, 0x80000499, 0x00000010, + 0x8000049b, 0x00000010, 0x8000049d, 0x00000010, + 0x8000049f, 0x00000010, 0x800004a1, 0x00000010, + 0x800004a3, 0x00000010, 0x800004a5, 0x00000010, + 0x800004a7, 0x00000010, 0x800004a9, 0x00000010, + 0x800004ab, 0x00000010, 0x800004ad, 0x00000010, + 0x800004af, 0x00000010, 0x800004b1, 0x00000010, + 0x800004b3, 0x00000010, 0x800004b5, 0x00000010, + 0x800004b7, 0x00000010, 0x800004b9, 0x00000010, + 0x800004bb, 0x00000010, 0x800004bd, 0x00000010, + 0x800004bf, 0x00000010, 0x800004c2, 0x00000010, + 0x800004c4, 0x00000010, 0x800004c6, 0x00000010, + 0x800004c8, 0x00000010, 0x800004ca, 0x00000010, + 0x800004cc, 0x00000010, 0x800004ce, 0x00000010, + 0x800004d1, 0x00000010, 0x800004d3, 0x00000010, + 0x800004d5, 0x00000010, 0x800004d7, 0x00000010, + 0x800004d9, 0x00000010, 0x800004db, 0x00000010, + 0x800004dd, 0x00000010, 0x800004df, 0x00000010, + 0x800004e1, 0x00000010, 0x800004e3, 0x00000010, + 0x800004e5, 0x00000010, 0x800004e7, 0x00000010, + 0x800004e9, 0x00000010, 0x800004eb, 0x00000010, + 0x800004ed, 0x00000010, 0x800004ef, 0x00000010, + 0x800004f1, 0x00000010, 0x800004f3, 0x00000010, + 0x800004f5, 0x00000010, 0x800004f9, 0x00000010, + 0x80000501, 0x00000010, 0x80000503, 0x00000010, + 0x80000505, 0x00000010, 0x80000507, 0x00000010, + 0x80000509, 0x00000010, 0x8000050b, 0x00000010, + 0x8000050d, 0x00000010, 0x8000050f, 0x00000010, + 0x80000561, 0x00000010, 0x80000562, 0x00000010, + 0x80000563, 0x00000010, 0x80000564, 0x00000010, + 0x80000565, 0x00000010, 0x80000566, 0x00000010, + 0x80000567, 0x00000010, 0x80000568, 0x00000010, + 0x80000569, 0x00000010, 0x8000056a, 0x00000010, + 0x8000056b, 0x00000010, 0x8000056c, 0x00000010, + 0x8000056d, 0x00000010, 0x8000056e, 0x00000010, + 0x8000056f, 0x00000010, 0x80000570, 0x00000010, + 0x80000571, 0x00000010, 0x80000572, 0x00000010, + 0x80000573, 0x00000010, 0x80000574, 0x00000010, + 0x80000575, 0x00000010, 0x80000576, 0x00000010, + 0x80000577, 0x00000010, 0x80000578, 0x00000010, + 0x80000579, 0x00000010, 0x8000057a, 0x00000010, + 0x8000057b, 0x00000010, 0x8000057c, 0x00000010, + 0x8000057d, 0x00000010, 0x8000057e, 0x00000010, + 0x8000057f, 0x00000010, 0x80000580, 0x00000010, + 0x80000581, 0x00000010, 0x80000582, 0x00000010, + 0x80000583, 0x00000010, 0x80000584, 0x00000010, + 0x80000585, 0x00000010, 0x80000586, 0x00000010, + 0x80001e01, 0x00000010, 0x80001e03, 0x00000010, + 0x80001e05, 0x00000010, 0x80001e07, 0x00000010, + 0x80001e09, 0x00000010, 0x80001e0b, 0x00000010, + 0x80001e0d, 0x00000010, 0x80001e0f, 0x00000010, + 0x80001e11, 0x00000010, 0x80001e13, 0x00000010, + 0x80001e15, 0x00000010, 0x80001e17, 0x00000010, + 0x80001e19, 0x00000010, 0x80001e1b, 0x00000010, + 0x80001e1d, 0x00000010, 0x80001e1f, 0x00000010, + 0x80001e21, 0x00000010, 0x80001e23, 0x00000010, + 0x80001e25, 0x00000010, 0x80001e27, 0x00000010, + 0x80001e29, 0x00000010, 0x80001e2b, 0x00000010, + 0x80001e2d, 0x00000010, 0x80001e2f, 0x00000010, + 0x80001e31, 0x00000010, 0x80001e33, 0x00000010, + 0x80001e35, 0x00000010, 0x80001e37, 0x00000010, + 0x80001e39, 0x00000010, 0x80001e3b, 0x00000010, + 0x80001e3d, 0x00000010, 0x80001e3f, 0x00000010, + 0x80001e41, 0x00000010, 0x80001e43, 0x00000010, + 0x80001e45, 0x00000010, 0x80001e47, 0x00000010, + 0x80001e49, 0x00000010, 0x80001e4b, 0x00000010, + 0x80001e4d, 0x00000010, 0x80001e4f, 0x00000010, + 0x80001e51, 0x00000010, 0x80001e53, 0x00000010, + 0x80001e55, 0x00000010, 0x80001e57, 0x00000010, + 0x80001e59, 0x00000010, 0x80001e5b, 0x00000010, + 0x80001e5d, 0x00000010, 0x80001e5f, 0x00000010, + 0x80001e61, 0x00000010, 0x80001e63, 0x00000010, + 0x80001e65, 0x00000010, 0x80001e67, 0x00000010, + 0x80001e69, 0x00000010, 0x80001e6b, 0x00000010, + 0x80001e6d, 0x00000010, 0x80001e6f, 0x00000010, + 0x80001e71, 0x00000010, 0x80001e73, 0x00000010, + 0x80001e75, 0x00000010, 0x80001e77, 0x00000010, + 0x80001e79, 0x00000010, 0x80001e7b, 0x00000010, + 0x80001e7d, 0x00000010, 0x80001e7f, 0x00000010, + 0x80001e81, 0x00000010, 0x80001e83, 0x00000010, + 0x80001e85, 0x00000010, 0x80001e87, 0x00000010, + 0x80001e89, 0x00000010, 0x80001e8b, 0x00000010, + 0x80001e8d, 0x00000010, 0x80001e8f, 0x00000010, + 0x80001e91, 0x00000010, 0x80001e93, 0x00000010, + 0x80001e95, 0x00000010, 0x80001ea1, 0x00000010, + 0x80001ea3, 0x00000010, 0x80001ea5, 0x00000010, + 0x80001ea7, 0x00000010, 0x80001ea9, 0x00000010, + 0x80001eab, 0x00000010, 0x80001ead, 0x00000010, + 0x80001eaf, 0x00000010, 0x80001eb1, 0x00000010, + 0x80001eb3, 0x00000010, 0x80001eb5, 0x00000010, + 0x80001eb7, 0x00000010, 0x80001eb9, 0x00000010, + 0x80001ebb, 0x00000010, 0x80001ebd, 0x00000010, + 0x80001ebf, 0x00000010, 0x80001ec1, 0x00000010, + 0x80001ec3, 0x00000010, 0x80001ec5, 0x00000010, + 0x80001ec7, 0x00000010, 0x80001ec9, 0x00000010, + 0x80001ecb, 0x00000010, 0x80001ecd, 0x00000010, + 0x80001ecf, 0x00000010, 0x80001ed1, 0x00000010, + 0x80001ed3, 0x00000010, 0x80001ed5, 0x00000010, + 0x80001ed7, 0x00000010, 0x80001ed9, 0x00000010, + 0x80001edb, 0x00000010, 0x80001edd, 0x00000010, + 0x80001edf, 0x00000010, 0x80001ee1, 0x00000010, + 0x80001ee3, 0x00000010, 0x80001ee5, 0x00000010, + 0x80001ee7, 0x00000010, 0x80001ee9, 0x00000010, + 0x80001eeb, 0x00000010, 0x80001eed, 0x00000010, + 0x80001eef, 0x00000010, 0x80001ef1, 0x00000010, + 0x80001ef3, 0x00000010, 0x80001ef5, 0x00000010, + 0x80001ef7, 0x00000010, 0x80001ef9, 0x00000010, + 0x80001f00, 0x00000010, 0x80001f01, 0x00000010, + 0x80001f02, 0x00000010, 0x80001f03, 0x00000010, + 0x80001f04, 0x00000010, 0x80001f05, 0x00000010, + 0x80001f06, 0x00000010, 0x80001f07, 0x00000010, + 0x80001f10, 0x00000010, 0x80001f11, 0x00000010, + 0x80001f12, 0x00000010, 0x80001f13, 0x00000010, + 0x80001f14, 0x00000010, 0x80001f15, 0x00000010, + 0x80001f20, 0x00000010, 0x80001f21, 0x00000010, + 0x80001f22, 0x00000010, 0x80001f23, 0x00000010, + 0x80001f24, 0x00000010, 0x80001f25, 0x00000010, + 0x80001f26, 0x00000010, 0x80001f27, 0x00000010, + 0x80001f30, 0x00000010, 0x80001f31, 0x00000010, + 0x80001f32, 0x00000010, 0x80001f33, 0x00000010, + 0x80001f34, 0x00000010, 0x80001f35, 0x00000010, + 0x80001f36, 0x00000010, 0x80001f37, 0x00000010, + 0x80001f40, 0x00000010, 0x80001f41, 0x00000010, + 0x80001f42, 0x00000010, 0x80001f43, 0x00000010, + 0x80001f44, 0x00000010, 0x80001f45, 0x00000010, + 0x80001f51, 0x00000010, 0x80001f53, 0x00000010, + 0x80001f55, 0x00000010, 0x80001f57, 0x00000010, + 0x80001f60, 0x00000010, 0x80001f61, 0x00000010, + 0x80001f62, 0x00000010, 0x80001f63, 0x00000010, + 0x80001f64, 0x00000010, 0x80001f65, 0x00000010, + 0x80001f66, 0x00000010, 0x80001f67, 0x00000000, + 0x80001f80, 0x00000010, 0x80001f80, 0x00000000, + 0x80001f81, 0x00000010, 0x80001f81, 0x00000000, + 0x80001f82, 0x00000010, 0x80001f82, 0x00000000, + 0x80001f83, 0x00000010, 0x80001f83, 0x00000000, + 0x80001f84, 0x00000010, 0x80001f84, 0x00000000, + 0x80001f85, 0x00000010, 0x80001f85, 0x00000000, + 0x80001f86, 0x00000010, 0x80001f86, 0x00000000, + 0x80001f87, 0x00000010, 0x80001f87, 0x00000000, + 0x80001f90, 0x00000010, 0x80001f90, 0x00000000, + 0x80001f91, 0x00000010, 0x80001f91, 0x00000000, + 0x80001f92, 0x00000010, 0x80001f92, 0x00000000, + 0x80001f93, 0x00000010, 0x80001f93, 0x00000000, + 0x80001f94, 0x00000010, 0x80001f94, 0x00000000, + 0x80001f95, 0x00000010, 0x80001f95, 0x00000000, + 0x80001f96, 0x00000010, 0x80001f96, 0x00000000, + 0x80001f97, 0x00000010, 0x80001f97, 0x00000000, + 0x80001fa0, 0x00000010, 0x80001fa0, 0x00000000, + 0x80001fa1, 0x00000010, 0x80001fa1, 0x00000000, + 0x80001fa2, 0x00000010, 0x80001fa2, 0x00000000, + 0x80001fa3, 0x00000010, 0x80001fa3, 0x00000000, + 0x80001fa4, 0x00000010, 0x80001fa4, 0x00000000, + 0x80001fa5, 0x00000010, 0x80001fa5, 0x00000000, + 0x80001fa6, 0x00000010, 0x80001fa6, 0x00000000, + 0x80001fa7, 0x00000010, 0x80001fa7, 0x00000010, + 0x80001fb0, 0x00000010, 0x80001fb1, 0x00000010, + 0x80001f70, 0x00000010, 0x80001f71, 0x00000000, + 0x80001fb3, 0x00000010, 0x80001fb3, 0x00000010, + 0x80001f72, 0x00000010, 0x80001f73, 0x00000010, + 0x80001f74, 0x00000010, 0x80001f75, 0x00000000, + 0x80001fc3, 0x00000010, 0x80001fc3, 0x00000010, + 0x80001fd0, 0x00000010, 0x80001fd1, 0x00000010, + 0x80001f76, 0x00000010, 0x80001f77, 0x00000010, + 0x80001fe0, 0x00000010, 0x80001fe1, 0x00000010, + 0x80001f7a, 0x00000010, 0x80001f7b, 0x00000010, + 0x80001fe5, 0x00000010, 0x80001f78, 0x00000010, + 0x80001f79, 0x00000010, 0x80001f7c, 0x00000010, + 0x80001f7d, 0x00000000, 0x80001ff3, 0x00000010, + 0x80001ff3, 0x00000010, 0x800003c9, 0x00000010, + 0x8000006b, 0x00000010, 0x800000e5, 0x00000010, + 0x80002170, 0x00000010, 0x80002171, 0x00000010, + 0x80002172, 0x00000010, 0x80002173, 0x00000010, + 0x80002174, 0x00000010, 0x80002175, 0x00000010, + 0x80002176, 0x00000010, 0x80002177, 0x00000010, + 0x80002178, 0x00000010, 0x80002179, 0x00000010, + 0x8000217a, 0x00000010, 0x8000217b, 0x00000010, + 0x8000217c, 0x00000010, 0x8000217d, 0x00000010, + 0x8000217e, 0x00000010, 0x8000217f, 0x00000010, + 0x800024d0, 0x00000010, 0x800024d1, 0x00000010, + 0x800024d2, 0x00000010, 0x800024d3, 0x00000010, + 0x800024d4, 0x00000010, 0x800024d5, 0x00000010, + 0x800024d6, 0x00000010, 0x800024d7, 0x00000010, + 0x800024d8, 0x00000010, 0x800024d9, 0x00000010, + 0x800024da, 0x00000010, 0x800024db, 0x00000010, + 0x800024dc, 0x00000010, 0x800024dd, 0x00000010, + 0x800024de, 0x00000010, 0x800024df, 0x00000010, + 0x800024e0, 0x00000010, 0x800024e1, 0x00000010, + 0x800024e2, 0x00000010, 0x800024e3, 0x00000010, + 0x800024e4, 0x00000010, 0x800024e5, 0x00000010, + 0x800024e6, 0x00000010, 0x800024e7, 0x00000010, + 0x800024e8, 0x00000010, 0x800024e9, 0x00000010, + 0x8000ff41, 0x00000010, 0x8000ff42, 0x00000010, + 0x8000ff43, 0x00000010, 0x8000ff44, 0x00000010, + 0x8000ff45, 0x00000010, 0x8000ff46, 0x00000010, + 0x8000ff47, 0x00000010, 0x8000ff48, 0x00000010, + 0x8000ff49, 0x00000010, 0x8000ff4a, 0x00000010, + 0x8000ff4b, 0x00000010, 0x8000ff4c, 0x00000010, + 0x8000ff4d, 0x00000010, 0x8000ff4e, 0x00000010, + 0x8000ff4f, 0x00000010, 0x8000ff50, 0x00000010, + 0x8000ff51, 0x00000010, 0x8000ff52, 0x00000010, + 0x8000ff53, 0x00000010, 0x8000ff54, 0x00000010, + 0x8000ff55, 0x00000010, 0x8000ff56, 0x00000010, + 0x8000ff57, 0x00000010, 0x8000ff58, 0x00000010, + 0x8000ff59, 0x00000010, 0x8000ff5a, 0x00000010, + 0x80010428, 0x00000010, 0x80010429, 0x00000010, + 0x8001042a, 0x00000010, 0x8001042b, 0x00000010, + 0x8001042c, 0x00000010, 0x8001042d, 0x00000010, + 0x8001042e, 0x00000010, 0x8001042f, 0x00000010, + 0x80010430, 0x00000010, 0x80010431, 0x00000010, + 0x80010432, 0x00000010, 0x80010433, 0x00000010, + 0x80010434, 0x00000010, 0x80010435, 0x00000010, + 0x80010436, 0x00000010, 0x80010437, 0x00000010, + 0x80010438, 0x00000010, 0x80010439, 0x00000010, + 0x8001043a, 0x00000010, 0x8001043b, 0x00000010, + 0x8001043c, 0x00000010, 0x8001043d, 0x00000010, + 0x8001043e, 0x00000010, 0x8001043f, 0x00000010, + 0x80010440, 0x00000010, 0x80010441, 0x00000010, + 0x80010442, 0x00000010, 0x80010443, 0x00000010, + 0x80010444, 0x00000010, 0x80010445, 0x00000010, + 0x80010446, 0x00000010, 0x80010447, 0x00000010, + 0x80010448, 0x00000010, 0x80010449, 0x00000010, + 0x8001044a, 0x00000010, 0x8001044b, 0x00000010, + 0x8001044c, 0x00000010, 0x8001044d, +}; + + +/* + * Cased characters and non-spacing marks (for casemap context) + */ + +#define CASEMAP_CTX_BITS_0 9 +#define CASEMAP_CTX_BITS_1 7 +#define CASEMAP_CTX_BITS_2 5 + +#define CTX_CASED 1 +#define CTX_NSM 2 + +static const unsigned short v320_casemap_ctx_imap[] = { + 272, 400, 528, 656, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 912, + 1040, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 1168, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, + 0, 0, 1, 1, 0, 2, 3, 3, + 4, 4, 4, 4, 4, 5, 6, 4, + 4, 7, 8, 4, 4, 9, 0, 0, + 10, 10, 11, 11, 12, 13, 14, 15, + 4, 4, 4, 4, 16, 4, 14, 17, + 18, 19, 20, 21, 22, 23, 24, 0, + 0, 0, 25, 26, 0, 0, 27, 28, + 29, 30, 31, 0, 0, 32, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 33, 34, 35, 36, 37, 34, 38, 36, + 39, 34, 40, 41, 33, 34, 42, 0, + 37, 43, 44, 0, 39, 0, 45, 0, + 0, 46, 47, 0, 0, 48, 49, 0, + 0, 0, 50, 0, 0, 0, 51, 0, + 0, 52, 53, 0, 0, 54, 55, 0, + 56, 57, 0, 58, 59, 60, 61, 0, + 0, 62, 56, 0, 0, 4, 63, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 65, 65, 0, 66, 67, 0, + 68, 0, 0, 0, 0, 69, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 70, 4, 4, 71, + 72, 4, 73, 74, 4, 75, 76, 77, + 0, 0, 0, 78, 0, 0, 79, 80, + 81, 82, 83, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 84, 0, 0, 85, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 86, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 11, 87, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 88, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 89, 90, 91, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 92, 4, 93, 94, 95, 4, + 96, 97, 98, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 99, 100, 5, + 92, 92, 14, 14, 101, 101, 102, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned char tbl[32]; +} v320_casemap_ctx_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, + }}, + {{ + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 0, 2, 2, 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, + }}, + {{ + 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, + }}, + {{ + 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, + 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, + }}, + {{ + 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + }}, + {{ + 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, + }}, + {{ + 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, + 0, 2, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, + }}, + {{ + 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, + }}, + {{ + 0, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, + }}, + {{ + 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, + 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, + }}, + {{ + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, + }}, + {{ + 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, + }}, + {{ + 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, + }}, + {{ + 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, + }}, + {{ + 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, + }}, + {{ + 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + }}, + {{ + 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; + +/* + * Case Folding + */ + +#define CASE_FOLDING_BITS_0 9 +#define CASE_FOLDING_BITS_1 7 +#define CASE_FOLDING_BITS_2 5 + +static const unsigned short v320_case_folding_imap[] = { + 272, 400, 528, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 784, + 912, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 656, 656, 656, 656, 656, 656, 656, 656, + 0, 0, 1, 0, 0, 2, 3, 0, + 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 0, 15, 16, 17, 18, + 19, 20, 0, 21, 22, 23, 24, 25, + 26, 27, 28, 0, 29, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 46, 0, 47, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 48, 49, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 50, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 52, 53, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const struct { + unsigned short tbl[32]; +} v320_case_folding_table[] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 0, 52, 53, 54, 55, 56, 57, 58, 59, + }}, + {{ + 61, 0, 62, 0, 63, 0, 64, 0, 65, 0, 66, + 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, 0, + 72, 0, 73, 0, 74, 0, 75, 0, 76, 0, + }}, + {{ + 77, 0, 78, 0, 79, 0, 80, 0, 81, 0, 82, + 0, 83, 0, 84, 0, 87, 0, 88, 0, 89, 0, + 90, 0, 0, 91, 0, 92, 0, 93, 0, 94, + }}, + {{ + 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 101, + 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, + 107, 0, 108, 0, 109, 0, 110, 0, 111, 0, + }}, + {{ + 112, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, + 0, 118, 0, 119, 0, 120, 0, 121, 0, 122, 0, + 123, 0, 124, 125, 0, 126, 0, 127, 0, 128, + }}, + {{ + 0, 129, 130, 0, 131, 0, 132, 133, 0, 134, 135, + 136, 0, 0, 137, 138, 139, 140, 0, 141, 142, 0, + 143, 144, 145, 0, 0, 0, 146, 147, 0, 148, + }}, + {{ + 149, 0, 150, 0, 151, 0, 152, 153, 0, 154, 0, + 0, 155, 0, 156, 157, 0, 158, 159, 160, 0, 161, + 0, 162, 163, 0, 0, 0, 164, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 165, 166, 0, 167, 168, 0, 169, + 170, 0, 171, 0, 172, 0, 173, 0, 174, 0, 175, + 0, 176, 0, 177, 0, 178, 0, 0, 179, 0, + }}, + {{ + 180, 0, 181, 0, 182, 0, 183, 0, 184, 0, 185, + 0, 186, 0, 187, 0, 188, 190, 191, 0, 192, 0, + 193, 194, 195, 0, 196, 0, 197, 0, 198, 0, + }}, + {{ + 199, 0, 200, 0, 201, 0, 202, 0, 203, 0, 204, + 0, 205, 0, 206, 0, 207, 0, 208, 0, 209, 0, + 210, 0, 211, 0, 212, 0, 213, 0, 214, 0, + }}, + {{ + 215, 0, 216, 0, 217, 0, 218, 0, 219, 0, 220, + 0, 221, 0, 222, 0, 223, 0, 224, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 226, 0, 227, 228, 229, + 0, 230, 0, 231, 232, 233, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + }}, + {{ + 251, 252, 0, 253, 254, 255, 256, 257, 258, 259, 260, + 261, 0, 0, 0, 0, 262, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 266, 267, 0, 0, 0, 268, + 269, 0, 270, 0, 271, 0, 272, 0, 273, 0, + }}, + {{ + 274, 0, 275, 0, 276, 0, 277, 0, 278, 0, 279, + 0, 280, 0, 281, 0, 282, 283, 284, 0, 285, 286, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + }}, + {{ + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 335, 0, 336, 0, 337, 0, 338, 0, 339, 0, 340, + 0, 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, + 346, 0, 347, 0, 348, 0, 349, 0, 350, 0, + }}, + {{ + 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352, + 0, 353, 0, 354, 0, 355, 0, 356, 0, 357, 0, + 358, 0, 359, 0, 360, 0, 361, 0, 362, 0, + }}, + {{ + 363, 0, 364, 0, 365, 0, 366, 0, 367, 0, 368, + 0, 369, 0, 370, 0, 371, 0, 372, 0, 373, 0, + 374, 0, 375, 0, 376, 0, 377, 0, 378, 0, + }}, + {{ + 0, 379, 0, 380, 0, 381, 0, 382, 0, 383, 0, + 384, 0, 385, 0, 0, 386, 0, 387, 0, 388, 0, + 389, 0, 390, 0, 391, 0, 392, 0, 393, 0, + }}, + {{ + 394, 0, 395, 0, 396, 0, 397, 0, 398, 0, 399, + 0, 400, 0, 401, 0, 402, 0, 403, 0, 404, 0, + 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 406, 0, 407, 0, 408, 0, 409, 0, 410, 0, 411, + 0, 412, 0, 413, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 414, 415, 416, 417, 418, + 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + }}, + {{ + 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, + 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 452, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 454, 0, 455, 0, 456, 0, 457, 0, 458, 0, 459, + 0, 460, 0, 461, 0, 462, 0, 463, 0, 464, 0, + 465, 0, 466, 0, 467, 0, 468, 0, 469, 0, + }}, + {{ + 470, 0, 471, 0, 472, 0, 473, 0, 474, 0, 475, + 0, 476, 0, 477, 0, 478, 0, 479, 0, 480, 0, + 481, 0, 482, 0, 483, 0, 484, 0, 485, 0, + }}, + {{ + 486, 0, 487, 0, 488, 0, 489, 0, 490, 0, 491, + 0, 492, 0, 493, 0, 494, 0, 495, 0, 496, 0, + 497, 0, 498, 0, 499, 0, 500, 0, 501, 0, + }}, + {{ + 502, 0, 503, 0, 504, 0, 505, 0, 506, 0, 507, + 0, 508, 0, 509, 0, 510, 0, 511, 0, 512, 0, + 513, 0, 514, 0, 515, 0, 516, 0, 517, 0, + }}, + {{ + 518, 0, 519, 0, 520, 0, 521, 0, 522, 0, 523, + 0, 524, 0, 525, 0, 526, 0, 527, 0, 528, 0, + 529, 531, 533, 535, 537, 539, 0, 0, 0, 0, + }}, + {{ + 540, 0, 541, 0, 542, 0, 543, 0, 544, 0, 545, + 0, 546, 0, 547, 0, 548, 0, 549, 0, 550, 0, + 551, 0, 552, 0, 553, 0, 554, 0, 555, 0, + }}, + {{ + 556, 0, 557, 0, 558, 0, 559, 0, 560, 0, 561, + 0, 562, 0, 563, 0, 564, 0, 565, 0, 566, 0, + 567, 0, 568, 0, 569, 0, 570, 0, 571, 0, + }}, + {{ + 572, 0, 573, 0, 574, 0, 575, 0, 576, 0, 577, + 0, 578, 0, 579, 0, 580, 0, 581, 0, 582, 0, + 583, 0, 584, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 585, 586, 587, + 588, 589, 590, 591, 592, 0, 0, 0, 0, 0, 0, + 0, 0, 593, 594, 595, 596, 597, 598, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 599, 600, 601, + 602, 603, 604, 605, 606, 0, 0, 0, 0, 0, 0, + 0, 0, 607, 608, 609, 610, 611, 612, 613, 614, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 615, 616, 617, + 618, 619, 620, 0, 0, 621, 0, 623, 0, 626, 0, + 629, 0, 0, 632, 0, 633, 0, 634, 0, 635, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 636, 637, 638, + 639, 640, 641, 642, 643, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 644, 646, 648, 650, 652, 654, 656, 658, 662, 665, 668, + 671, 674, 677, 680, 683, 684, 686, 688, 690, 692, 694, + 696, 698, 702, 705, 708, 711, 714, 717, 720, 723, + }}, + {{ + 724, 726, 728, 730, 732, 734, 736, 738, 742, 745, 748, + 751, 754, 757, 760, 763, 0, 0, 764, 766, 768, 0, + 770, 772, 775, 776, 777, 778, 781, 0, 782, 0, + }}, + {{ + 0, 0, 783, 785, 787, 0, 789, 791, 794, 795, 796, + 797, 800, 0, 0, 0, 0, 0, 801, 804, 0, 0, + 807, 809, 812, 813, 814, 815, 0, 0, 0, 0, + }}, + {{ + 0, 0, 816, 819, 822, 0, 824, 826, 829, 830, 831, + 832, 833, 0, 0, 0, 0, 0, 834, 836, 838, 0, + 840, 842, 845, 846, 847, 848, 851, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 852, 0, 0, 0, 853, + 854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, + 866, 867, 868, 869, 870, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, + }}, + {{ + 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, + 892, 893, 894, 895, 896, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 897, 899, 901, 903, 906, 909, 911, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 913, 915, 917, + 919, 921, 0, 0, 0, 0, 0, 0, 0, 0, + }}, + {{ + 0, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, + 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, + 944, 945, 946, 947, 948, 0, 0, 0, 0, 0, + }}, + {{ + 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, + 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, + }}, + {{ + 981, 982, 983, 984, 985, 986, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }}, +}; +static const unsigned long v320_case_folding_seq[] = { + 0x00000000, 0x80000061, 0x80000062, 0x80000063, + 0x80000064, 0x80000065, 0x80000066, 0x80000067, + 0x80000068, 0x80000069, 0x80000131, 0x8000006a, + 0x8000006b, 0x8000006c, 0x8000006d, 0x8000006e, + 0x8000006f, 0x80000070, 0x80000071, 0x80000072, + 0x80000073, 0x80000074, 0x80000075, 0x80000076, + 0x80000077, 0x80000078, 0x80000079, 0x8000007a, + 0x800003bc, 0x800000e0, 0x800000e1, 0x800000e2, + 0x800000e3, 0x800000e4, 0x800000e5, 0x800000e6, + 0x800000e7, 0x800000e8, 0x800000e9, 0x800000ea, + 0x800000eb, 0x800000ec, 0x800000ed, 0x800000ee, + 0x800000ef, 0x800000f0, 0x800000f1, 0x800000f2, + 0x800000f3, 0x800000f4, 0x800000f5, 0x800000f6, + 0x800000f8, 0x800000f9, 0x800000fa, 0x800000fb, + 0x800000fc, 0x800000fd, 0x800000fe, 0x00000073, + 0x80000073, 0x80000101, 0x80000103, 0x80000105, + 0x80000107, 0x80000109, 0x8000010b, 0x8000010d, + 0x8000010f, 0x80000111, 0x80000113, 0x80000115, + 0x80000117, 0x80000119, 0x8000011b, 0x8000011d, + 0x8000011f, 0x80000121, 0x80000123, 0x80000125, + 0x80000127, 0x80000129, 0x8000012b, 0x8000012d, + 0x8000012f, 0x00000069, 0x80000307, 0x80000069, + 0x80000133, 0x80000135, 0x80000137, 0x8000013a, + 0x8000013c, 0x8000013e, 0x80000140, 0x80000142, + 0x80000144, 0x80000146, 0x80000148, 0x000002bc, + 0x8000006e, 0x8000014b, 0x8000014d, 0x8000014f, + 0x80000151, 0x80000153, 0x80000155, 0x80000157, + 0x80000159, 0x8000015b, 0x8000015d, 0x8000015f, + 0x80000161, 0x80000163, 0x80000165, 0x80000167, + 0x80000169, 0x8000016b, 0x8000016d, 0x8000016f, + 0x80000171, 0x80000173, 0x80000175, 0x80000177, + 0x800000ff, 0x8000017a, 0x8000017c, 0x8000017e, + 0x80000073, 0x80000253, 0x80000183, 0x80000185, + 0x80000254, 0x80000188, 0x80000256, 0x80000257, + 0x8000018c, 0x800001dd, 0x80000259, 0x8000025b, + 0x80000192, 0x80000260, 0x80000263, 0x80000269, + 0x80000268, 0x80000199, 0x8000026f, 0x80000272, + 0x80000275, 0x800001a1, 0x800001a3, 0x800001a5, + 0x80000280, 0x800001a8, 0x80000283, 0x800001ad, + 0x80000288, 0x800001b0, 0x8000028a, 0x8000028b, + 0x800001b4, 0x800001b6, 0x80000292, 0x800001b9, + 0x800001bd, 0x800001c6, 0x800001c6, 0x800001c9, + 0x800001c9, 0x800001cc, 0x800001cc, 0x800001ce, + 0x800001d0, 0x800001d2, 0x800001d4, 0x800001d6, + 0x800001d8, 0x800001da, 0x800001dc, 0x800001df, + 0x800001e1, 0x800001e3, 0x800001e5, 0x800001e7, + 0x800001e9, 0x800001eb, 0x800001ed, 0x800001ef, + 0x0000006a, 0x8000030c, 0x800001f3, 0x800001f3, + 0x800001f5, 0x80000195, 0x800001bf, 0x800001f9, + 0x800001fb, 0x800001fd, 0x800001ff, 0x80000201, + 0x80000203, 0x80000205, 0x80000207, 0x80000209, + 0x8000020b, 0x8000020d, 0x8000020f, 0x80000211, + 0x80000213, 0x80000215, 0x80000217, 0x80000219, + 0x8000021b, 0x8000021d, 0x8000021f, 0x8000019e, + 0x80000223, 0x80000225, 0x80000227, 0x80000229, + 0x8000022b, 0x8000022d, 0x8000022f, 0x80000231, + 0x80000233, 0x800003b9, 0x800003ac, 0x800003ad, + 0x800003ae, 0x800003af, 0x800003cc, 0x800003cd, + 0x800003ce, 0x000003b9, 0x00000308, 0x80000301, + 0x800003b1, 0x800003b2, 0x800003b3, 0x800003b4, + 0x800003b5, 0x800003b6, 0x800003b7, 0x800003b8, + 0x800003b9, 0x800003ba, 0x800003bb, 0x800003bc, + 0x800003bd, 0x800003be, 0x800003bf, 0x800003c0, + 0x800003c1, 0x800003c3, 0x800003c4, 0x800003c5, + 0x800003c6, 0x800003c7, 0x800003c8, 0x800003c9, + 0x800003ca, 0x800003cb, 0x000003c5, 0x00000308, + 0x80000301, 0x800003c3, 0x800003b2, 0x800003b8, + 0x800003c6, 0x800003c0, 0x800003d9, 0x800003db, + 0x800003dd, 0x800003df, 0x800003e1, 0x800003e3, + 0x800003e5, 0x800003e7, 0x800003e9, 0x800003eb, + 0x800003ed, 0x800003ef, 0x800003ba, 0x800003c1, + 0x800003c3, 0x800003b8, 0x800003b5, 0x80000450, + 0x80000451, 0x80000452, 0x80000453, 0x80000454, + 0x80000455, 0x80000456, 0x80000457, 0x80000458, + 0x80000459, 0x8000045a, 0x8000045b, 0x8000045c, + 0x8000045d, 0x8000045e, 0x8000045f, 0x80000430, + 0x80000431, 0x80000432, 0x80000433, 0x80000434, + 0x80000435, 0x80000436, 0x80000437, 0x80000438, + 0x80000439, 0x8000043a, 0x8000043b, 0x8000043c, + 0x8000043d, 0x8000043e, 0x8000043f, 0x80000440, + 0x80000441, 0x80000442, 0x80000443, 0x80000444, + 0x80000445, 0x80000446, 0x80000447, 0x80000448, + 0x80000449, 0x8000044a, 0x8000044b, 0x8000044c, + 0x8000044d, 0x8000044e, 0x8000044f, 0x80000461, + 0x80000463, 0x80000465, 0x80000467, 0x80000469, + 0x8000046b, 0x8000046d, 0x8000046f, 0x80000471, + 0x80000473, 0x80000475, 0x80000477, 0x80000479, + 0x8000047b, 0x8000047d, 0x8000047f, 0x80000481, + 0x8000048b, 0x8000048d, 0x8000048f, 0x80000491, + 0x80000493, 0x80000495, 0x80000497, 0x80000499, + 0x8000049b, 0x8000049d, 0x8000049f, 0x800004a1, + 0x800004a3, 0x800004a5, 0x800004a7, 0x800004a9, + 0x800004ab, 0x800004ad, 0x800004af, 0x800004b1, + 0x800004b3, 0x800004b5, 0x800004b7, 0x800004b9, + 0x800004bb, 0x800004bd, 0x800004bf, 0x800004c2, + 0x800004c4, 0x800004c6, 0x800004c8, 0x800004ca, + 0x800004cc, 0x800004ce, 0x800004d1, 0x800004d3, + 0x800004d5, 0x800004d7, 0x800004d9, 0x800004db, + 0x800004dd, 0x800004df, 0x800004e1, 0x800004e3, + 0x800004e5, 0x800004e7, 0x800004e9, 0x800004eb, + 0x800004ed, 0x800004ef, 0x800004f1, 0x800004f3, + 0x800004f5, 0x800004f9, 0x80000501, 0x80000503, + 0x80000505, 0x80000507, 0x80000509, 0x8000050b, + 0x8000050d, 0x8000050f, 0x80000561, 0x80000562, + 0x80000563, 0x80000564, 0x80000565, 0x80000566, + 0x80000567, 0x80000568, 0x80000569, 0x8000056a, + 0x8000056b, 0x8000056c, 0x8000056d, 0x8000056e, + 0x8000056f, 0x80000570, 0x80000571, 0x80000572, + 0x80000573, 0x80000574, 0x80000575, 0x80000576, + 0x80000577, 0x80000578, 0x80000579, 0x8000057a, + 0x8000057b, 0x8000057c, 0x8000057d, 0x8000057e, + 0x8000057f, 0x80000580, 0x80000581, 0x80000582, + 0x80000583, 0x80000584, 0x80000585, 0x80000586, + 0x00000565, 0x80000582, 0x80001e01, 0x80001e03, + 0x80001e05, 0x80001e07, 0x80001e09, 0x80001e0b, + 0x80001e0d, 0x80001e0f, 0x80001e11, 0x80001e13, + 0x80001e15, 0x80001e17, 0x80001e19, 0x80001e1b, + 0x80001e1d, 0x80001e1f, 0x80001e21, 0x80001e23, + 0x80001e25, 0x80001e27, 0x80001e29, 0x80001e2b, + 0x80001e2d, 0x80001e2f, 0x80001e31, 0x80001e33, + 0x80001e35, 0x80001e37, 0x80001e39, 0x80001e3b, + 0x80001e3d, 0x80001e3f, 0x80001e41, 0x80001e43, + 0x80001e45, 0x80001e47, 0x80001e49, 0x80001e4b, + 0x80001e4d, 0x80001e4f, 0x80001e51, 0x80001e53, + 0x80001e55, 0x80001e57, 0x80001e59, 0x80001e5b, + 0x80001e5d, 0x80001e5f, 0x80001e61, 0x80001e63, + 0x80001e65, 0x80001e67, 0x80001e69, 0x80001e6b, + 0x80001e6d, 0x80001e6f, 0x80001e71, 0x80001e73, + 0x80001e75, 0x80001e77, 0x80001e79, 0x80001e7b, + 0x80001e7d, 0x80001e7f, 0x80001e81, 0x80001e83, + 0x80001e85, 0x80001e87, 0x80001e89, 0x80001e8b, + 0x80001e8d, 0x80001e8f, 0x80001e91, 0x80001e93, + 0x80001e95, 0x00000068, 0x80000331, 0x00000074, + 0x80000308, 0x00000077, 0x8000030a, 0x00000079, + 0x8000030a, 0x00000061, 0x800002be, 0x80001e61, + 0x80001ea1, 0x80001ea3, 0x80001ea5, 0x80001ea7, + 0x80001ea9, 0x80001eab, 0x80001ead, 0x80001eaf, + 0x80001eb1, 0x80001eb3, 0x80001eb5, 0x80001eb7, + 0x80001eb9, 0x80001ebb, 0x80001ebd, 0x80001ebf, + 0x80001ec1, 0x80001ec3, 0x80001ec5, 0x80001ec7, + 0x80001ec9, 0x80001ecb, 0x80001ecd, 0x80001ecf, + 0x80001ed1, 0x80001ed3, 0x80001ed5, 0x80001ed7, + 0x80001ed9, 0x80001edb, 0x80001edd, 0x80001edf, + 0x80001ee1, 0x80001ee3, 0x80001ee5, 0x80001ee7, + 0x80001ee9, 0x80001eeb, 0x80001eed, 0x80001eef, + 0x80001ef1, 0x80001ef3, 0x80001ef5, 0x80001ef7, + 0x80001ef9, 0x80001f00, 0x80001f01, 0x80001f02, + 0x80001f03, 0x80001f04, 0x80001f05, 0x80001f06, + 0x80001f07, 0x80001f10, 0x80001f11, 0x80001f12, + 0x80001f13, 0x80001f14, 0x80001f15, 0x80001f20, + 0x80001f21, 0x80001f22, 0x80001f23, 0x80001f24, + 0x80001f25, 0x80001f26, 0x80001f27, 0x80001f30, + 0x80001f31, 0x80001f32, 0x80001f33, 0x80001f34, + 0x80001f35, 0x80001f36, 0x80001f37, 0x80001f40, + 0x80001f41, 0x80001f42, 0x80001f43, 0x80001f44, + 0x80001f45, 0x000003c5, 0x80000313, 0x000003c5, + 0x00000313, 0x80000300, 0x000003c5, 0x00000313, + 0x80000301, 0x000003c5, 0x00000313, 0x80000342, + 0x80001f51, 0x80001f53, 0x80001f55, 0x80001f57, + 0x80001f60, 0x80001f61, 0x80001f62, 0x80001f63, + 0x80001f64, 0x80001f65, 0x80001f66, 0x80001f67, + 0x00001f00, 0x800003b9, 0x00001f01, 0x800003b9, + 0x00001f02, 0x800003b9, 0x00001f03, 0x800003b9, + 0x00001f04, 0x800003b9, 0x00001f05, 0x800003b9, + 0x00001f06, 0x800003b9, 0x00001f07, 0x800003b9, + 0x00001f00, 0x800003b9, 0x80001f80, 0x00001f01, + 0x800003b9, 0x80001f81, 0x00001f02, 0x800003b9, + 0x80001f82, 0x00001f03, 0x800003b9, 0x80001f83, + 0x00001f04, 0x800003b9, 0x80001f84, 0x00001f05, + 0x800003b9, 0x80001f85, 0x00001f06, 0x800003b9, + 0x80001f86, 0x00001f07, 0x800003b9, 0x80001f87, + 0x00001f20, 0x800003b9, 0x00001f21, 0x800003b9, + 0x00001f22, 0x800003b9, 0x00001f23, 0x800003b9, + 0x00001f24, 0x800003b9, 0x00001f25, 0x800003b9, + 0x00001f26, 0x800003b9, 0x00001f27, 0x800003b9, + 0x00001f20, 0x800003b9, 0x80001f90, 0x00001f21, + 0x800003b9, 0x80001f91, 0x00001f22, 0x800003b9, + 0x80001f92, 0x00001f23, 0x800003b9, 0x80001f93, + 0x00001f24, 0x800003b9, 0x80001f94, 0x00001f25, + 0x800003b9, 0x80001f95, 0x00001f26, 0x800003b9, + 0x80001f96, 0x00001f27, 0x800003b9, 0x80001f97, + 0x00001f60, 0x800003b9, 0x00001f61, 0x800003b9, + 0x00001f62, 0x800003b9, 0x00001f63, 0x800003b9, + 0x00001f64, 0x800003b9, 0x00001f65, 0x800003b9, + 0x00001f66, 0x800003b9, 0x00001f67, 0x800003b9, + 0x00001f60, 0x800003b9, 0x80001fa0, 0x00001f61, + 0x800003b9, 0x80001fa1, 0x00001f62, 0x800003b9, + 0x80001fa2, 0x00001f63, 0x800003b9, 0x80001fa3, + 0x00001f64, 0x800003b9, 0x80001fa4, 0x00001f65, + 0x800003b9, 0x80001fa5, 0x00001f66, 0x800003b9, + 0x80001fa6, 0x00001f67, 0x800003b9, 0x80001fa7, + 0x00001f70, 0x800003b9, 0x000003b1, 0x800003b9, + 0x000003ac, 0x800003b9, 0x000003b1, 0x80000342, + 0x000003b1, 0x00000342, 0x800003b9, 0x80001fb0, + 0x80001fb1, 0x80001f70, 0x80001f71, 0x000003b1, + 0x800003b9, 0x80001fb3, 0x800003b9, 0x00001f74, + 0x800003b9, 0x000003b7, 0x800003b9, 0x000003ae, + 0x800003b9, 0x000003b7, 0x80000342, 0x000003b7, + 0x00000342, 0x800003b9, 0x80001f72, 0x80001f73, + 0x80001f74, 0x80001f75, 0x000003b7, 0x800003b9, + 0x80001fc3, 0x000003b9, 0x00000308, 0x80000300, + 0x000003b9, 0x00000308, 0x80000301, 0x000003b9, + 0x80000342, 0x000003b9, 0x00000308, 0x80000342, + 0x80001fd0, 0x80001fd1, 0x80001f76, 0x80001f77, + 0x000003c5, 0x00000308, 0x80000300, 0x000003c5, + 0x00000308, 0x80000301, 0x000003c1, 0x80000313, + 0x000003c5, 0x80000342, 0x000003c5, 0x00000308, + 0x80000342, 0x80001fe0, 0x80001fe1, 0x80001f7a, + 0x80001f7b, 0x80001fe5, 0x00001f7c, 0x800003b9, + 0x000003c9, 0x800003b9, 0x000003ce, 0x800003b9, + 0x000003c9, 0x80000342, 0x000003c9, 0x00000342, + 0x800003b9, 0x80001f78, 0x80001f79, 0x80001f7c, + 0x80001f7d, 0x000003c9, 0x800003b9, 0x80001ff3, + 0x800003c9, 0x8000006b, 0x800000e5, 0x80002170, + 0x80002171, 0x80002172, 0x80002173, 0x80002174, + 0x80002175, 0x80002176, 0x80002177, 0x80002178, + 0x80002179, 0x8000217a, 0x8000217b, 0x8000217c, + 0x8000217d, 0x8000217e, 0x8000217f, 0x800024d0, + 0x800024d1, 0x800024d2, 0x800024d3, 0x800024d4, + 0x800024d5, 0x800024d6, 0x800024d7, 0x800024d8, + 0x800024d9, 0x800024da, 0x800024db, 0x800024dc, + 0x800024dd, 0x800024de, 0x800024df, 0x800024e0, + 0x800024e1, 0x800024e2, 0x800024e3, 0x800024e4, + 0x800024e5, 0x800024e6, 0x800024e7, 0x800024e8, + 0x800024e9, 0x00000066, 0x80000066, 0x00000066, + 0x80000069, 0x00000066, 0x8000006c, 0x00000066, + 0x00000066, 0x80000069, 0x00000066, 0x00000066, + 0x8000006c, 0x00000073, 0x80000074, 0x00000073, + 0x80000074, 0x00000574, 0x80000576, 0x00000574, + 0x80000565, 0x00000574, 0x8000056b, 0x0000057e, + 0x80000576, 0x00000574, 0x8000056d, 0x8000ff41, + 0x8000ff42, 0x8000ff43, 0x8000ff44, 0x8000ff45, + 0x8000ff46, 0x8000ff47, 0x8000ff48, 0x8000ff49, + 0x8000ff4a, 0x8000ff4b, 0x8000ff4c, 0x8000ff4d, + 0x8000ff4e, 0x8000ff4f, 0x8000ff50, 0x8000ff51, + 0x8000ff52, 0x8000ff53, 0x8000ff54, 0x8000ff55, + 0x8000ff56, 0x8000ff57, 0x8000ff58, 0x8000ff59, + 0x8000ff5a, 0x80010428, 0x80010429, 0x8001042a, + 0x8001042b, 0x8001042c, 0x8001042d, 0x8001042e, + 0x8001042f, 0x80010430, 0x80010431, 0x80010432, + 0x80010433, 0x80010434, 0x80010435, 0x80010436, + 0x80010437, 0x80010438, 0x80010439, 0x8001043a, + 0x8001043b, 0x8001043c, 0x8001043d, 0x8001043e, + 0x8001043f, 0x80010440, 0x80010441, 0x80010442, + 0x80010443, 0x80010444, 0x80010445, 0x80010446, + 0x80010447, 0x80010448, 0x80010449, 0x8001044a, + 0x8001044b, 0x8001044c, 0x8001044d, +}; + diff --git a/contrib/idn/idnkit-1.0-src/lib/unormalize.c b/contrib/idn/idnkit-1.0-src/lib/unormalize.c new file mode 100644 index 0000000000..e809e39f7a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/unormalize.c @@ -0,0 +1,413 @@ +#ifndef lint +static char *rcsid = "$Id: unormalize.c,v 1.1 2003/06/04 00:26:43 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) +#define memmove(a,b,c) bcopy((char *)(b),(char *)(a),(int)(c)) +#endif + +#define WORKBUF_SIZE 128 +#define WORKBUF_SIZE_MAX 10000 + +typedef struct { + idn__unicode_version_t version; /* Unicode version */ + int cur; /* pointing now processing character */ + int last; /* pointing just after the last character */ + int size; /* size of UCS and CLASS array */ + unsigned long *ucs4; /* UCS-4 characters */ + int *class; /* and their canonical classes */ + unsigned long ucs4_buf[WORKBUF_SIZE]; /* local buffer */ + int class_buf[WORKBUF_SIZE]; /* ditto */ +} workbuf_t; + +static idn_result_t normalize(idn__unicode_version_t version, + int do_composition, int compat, + const unsigned long *from, + unsigned long *to, size_t tolen); +static idn_result_t decompose(workbuf_t *wb, unsigned long c, int compat); +static void get_class(workbuf_t *wb); +static void reorder(workbuf_t *wb); +static void compose(workbuf_t *wb); +static idn_result_t flush_before_cur(workbuf_t *wb, + unsigned long **top, size_t *tolenp); +static void workbuf_init(workbuf_t *wb); +static void workbuf_free(workbuf_t *wb); +static idn_result_t workbuf_extend(workbuf_t *wb); +static idn_result_t workbuf_append(workbuf_t *wb, unsigned long c); +static void workbuf_shift(workbuf_t *wb, int shift); +static void workbuf_removevoid(workbuf_t *wb); + +idn_result_t +idn__unormalize_formkc(idn__unicode_version_t version, + const unsigned long *from, unsigned long *to, + size_t tolen) { + assert(version != NULL && from != NULL && to != NULL && tolen >= 0); + TRACE(("idn__unormalize_formkc(from=\"%s\", tolen=%d)\n", + idn__debug_ucs4xstring(from, 50), tolen)); + return (normalize(version, 1, 1, from, to, tolen)); +} + +static idn_result_t +normalize(idn__unicode_version_t version, int do_composition, int compat, + const unsigned long *from, unsigned long *to, size_t tolen) { + workbuf_t wb; + idn_result_t r = idn_success; + + /* + * Initialize working buffer. + */ + workbuf_init(&wb); + wb.version = version; + + while (*from != '\0') { + unsigned long c; + + assert(wb.cur == wb.last); + + /* + * Get one character from 'from'. + */ + c = *from++; + + /* + * Decompose it. + */ + if ((r = decompose(&wb, c, compat)) != idn_success) + goto ret; + + /* + * Get canonical class. + */ + get_class(&wb); + + /* + * Reorder & compose. + */ + for (; wb.cur < wb.last; wb.cur++) { + if (wb.cur == 0) { + continue; + } else if (wb.class[wb.cur] > 0) { + /* + * This is not a starter. Try reordering. + * Note that characters up to it are + * already in canonical order. + */ + reorder(&wb); + continue; + } + + /* + * This is a starter character, and there are + * some characters before it. Those characters + * have been reordered properly, and + * ready for composition. + */ + if (do_composition && wb.class[0] == 0) + compose(&wb); + + /* + * If CUR points to a starter character, + * then process of characters before CUR are + * already finished, because any further + * reordering/composition for them are blocked + * by the starter CUR points. + */ + if (wb.cur > 0 && wb.class[wb.cur] == 0) { + /* Flush everything before CUR. */ + r = flush_before_cur(&wb, &to, &tolen); + if (r != idn_success) + goto ret; + } + } + } + + if (r == idn_success) { + if (do_composition && wb.cur > 0 && wb.class[0] == 0) { + /* + * There is some characters left in WB. + * They are ordered, but not composed yet. + * Now CUR points just after the last character in WB, + * and since compose() tries to compose characters + * between top and CUR inclusive, we must make CUR + * one character back during compose(). + */ + wb.cur--; + compose(&wb); + wb.cur++; + } + /* + * Call this even when WB.CUR == 0, to make TO + * NUL-terminated. + */ + r = flush_before_cur(&wb, &to, &tolen); + if (r != idn_success) + goto ret; + } + + if (tolen <= 0) { + r = idn_buffer_overflow; + goto ret; + } + *to = '\0'; + +ret: + workbuf_free(&wb); + return (r); +} + +static idn_result_t +decompose(workbuf_t *wb, unsigned long c, int compat) { + idn_result_t r; + int dec_len; + +again: + r = idn__unicode_decompose(wb->version, compat, wb->ucs4 + wb->last, + wb->size - wb->last, c, &dec_len); + switch (r) { + case idn_success: + wb->last += dec_len; + return (idn_success); + case idn_notfound: + return (workbuf_append(wb, c)); + case idn_buffer_overflow: + if ((r = workbuf_extend(wb)) != idn_success) + return (r); + if (wb->size > WORKBUF_SIZE_MAX) { + WARNING(("idn__unormalize_form*: " + "working buffer too large\n")); + return (idn_nomemory); + } + goto again; + default: + return (r); + } + /* NOTREACHED */ +} + +static void +get_class(workbuf_t *wb) { + int i; + + for (i = wb->cur; i < wb->last; i++) + wb->class[i] = idn__unicode_canonicalclass(wb->version, + wb->ucs4[i]); +} + +static void +reorder(workbuf_t *wb) { + unsigned long c; + int i; + int class; + + assert(wb != NULL); + + i = wb->cur; + c = wb->ucs4[i]; + class = wb->class[i]; + + while (i > 0 && wb->class[i - 1] > class) { + wb->ucs4[i] = wb->ucs4[i - 1]; + wb->class[i] =wb->class[i - 1]; + i--; + wb->ucs4[i] = c; + wb->class[i] = class; + } +} + +static void +compose(workbuf_t *wb) { + int cur; + unsigned long *ucs4; + int *class; + int last_class; + int nvoids; + int i; + idn__unicode_version_t ver; + + assert(wb != NULL && wb->class[0] == 0); + + cur = wb->cur; + ucs4 = wb->ucs4; + class = wb->class; + ver = wb->version; + + /* + * If there are no decomposition sequence that begins with + * the top character, composition is impossible. + */ + if (!idn__unicode_iscompositecandidate(ver, ucs4[0])) + return; + + last_class = 0; + nvoids = 0; + for (i = 1; i <= cur; i++) { + unsigned long c; + int cl = class[i]; + + if ((last_class < cl || cl == 0) && + idn__unicode_compose(ver, ucs4[0], ucs4[i], + &c) == idn_success) { + /* + * Replace the top character with the composed one. + */ + ucs4[0] = c; + class[0] = idn__unicode_canonicalclass(ver, c); + + class[i] = -1; /* void this character */ + nvoids++; + } else { + last_class = cl; + } + } + + /* Purge void characters, if any. */ + if (nvoids > 0) + workbuf_removevoid(wb); +} + +static idn_result_t +flush_before_cur(workbuf_t *wb, unsigned long **top, size_t *tolenp) { + if (*tolenp < wb->cur) + return (idn_buffer_overflow); + + memcpy(*top, wb->ucs4, sizeof(**top) * wb->cur); + *top += wb->cur; + *tolenp -= wb->cur; + workbuf_shift(wb, wb->cur); + + return (idn_success); +} + +static void +workbuf_init(workbuf_t *wb) { + wb->cur = 0; + wb->last = 0; + wb->size = WORKBUF_SIZE; + wb->ucs4 = wb->ucs4_buf; + wb->class = wb->class_buf; +} + +static void +workbuf_free(workbuf_t *wb) { + if (wb->ucs4 != wb->ucs4_buf) { + free(wb->ucs4); + free(wb->class); + } +} + +static idn_result_t +workbuf_extend(workbuf_t *wb) { + int newsize = wb->size * 3; + + if (wb->ucs4 == wb->ucs4_buf) { + wb->ucs4 = malloc(sizeof(wb->ucs4[0]) * newsize); + wb->class = malloc(sizeof(wb->class[0]) * newsize); + } else { + wb->ucs4 = realloc(wb->ucs4, sizeof(wb->ucs4[0]) * newsize); + wb->class = realloc(wb->class, sizeof(wb->class[0]) * newsize); + } + if (wb->ucs4 == NULL || wb->class == NULL) + return (idn_nomemory); + else + return (idn_success); +} + +static idn_result_t +workbuf_append(workbuf_t *wb, unsigned long c) { + idn_result_t r; + + if (wb->last >= wb->size && (r = workbuf_extend(wb)) != idn_success) + return (r); + wb->ucs4[wb->last++] = c; + return (idn_success); +} + +static void +workbuf_shift(workbuf_t *wb, int shift) { + int nmove; + + assert(wb != NULL && wb->cur >= shift); + + nmove = wb->last - shift; + (void)memmove(&wb->ucs4[0], &wb->ucs4[shift], + nmove * sizeof(wb->ucs4[0])); + (void)memmove(&wb->class[0], &wb->class[shift], + nmove * sizeof(wb->class[0])); + wb->cur -= shift; + wb->last -= shift; +} + +static void +workbuf_removevoid(workbuf_t *wb) { + int i, j; + int last = wb->last; + + for (i = j = 0; i < last; i++) { + if (wb->class[i] >= 0) { + if (j < i) { + wb->ucs4[j] = wb->ucs4[i]; + wb->class[j] = wb->class[i]; + } + j++; + } + } + wb->cur -= last - j; + wb->last = j; +} diff --git a/contrib/idn/idnkit-1.0-src/lib/utf8.c b/contrib/idn/idnkit-1.0-src/lib/utf8.c new file mode 100644 index 0000000000..a1810ccce0 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/utf8.c @@ -0,0 +1,276 @@ +#ifndef lint +static char *rcsid = "$Id: utf8.c,v 1.1 2003/06/04 00:26:44 marka Exp $"; +#endif + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include + +#include +#include +#include +#include + +#define UTF8_WIDTH(c) \ + (((c) < 0x80) ? 1 : \ + ((c) < 0xc0) ? 0 : \ + ((c) < 0xe0) ? 2 : \ + ((c) < 0xf0) ? 3 : \ + ((c) < 0xf8) ? 4 : \ + ((c) < 0xfc) ? 5 : \ + ((c) < 0xfe) ? 6 : 0) + +#define VALID_CONT_BYTE(c) (0x80 <= (c) && (c) < 0xc0) + +int +idn_utf8_mblen(const char *s) { + int c = *(unsigned char *)s; + + assert(s != NULL); + +#if 0 + TRACE(("idn_utf8_mblen(s=<%s>)\n", idn__debug_hexstring(s, 6))); +#endif + + return UTF8_WIDTH(c); +} + +int +idn_utf8_getmb(const char *s, size_t len, char *buf) { + /* buf must be at least 7-bytes long */ + const unsigned char *p = (const unsigned char *)s; + unsigned char *q = (unsigned char *)buf; + int width = UTF8_WIDTH(*p); + int w; + + assert(s != NULL); + +#if 0 + TRACE(("idn_utf8_getmb(s=<%s>,len=%d)\n", + idn__debug_hexstring(s, 6), len)); +#endif + + if (width == 0 || len < width) + return (0); + + /* Copy the first byte. */ + *q++ = *p++; + + /* .. and the rest. */ + w = width; + while (--w > 0) { + if (!VALID_CONT_BYTE(*p)) + return (0); + *q++ = *p++; + } + return (width); +} + +int +idn_utf8_getwc(const char *s, size_t len, unsigned long *vp) { + unsigned long v; + unsigned long min; + const unsigned char *p = (const unsigned char *)s; + int c; + int width; + int rest; + + assert(s != NULL); + +#if 0 + TRACE(("idn_utf8_getwc(s=<%s>,len=%d)\n", + idn__debug_hexstring(s, 10), len)); +#endif + + c = *p++; + width = UTF8_WIDTH(c); + + switch (width) { + case 0: + return (0); + case 1: + v = c; + min = 0; + break; + case 2: + v = c & 0x1f; + min = 0x80; + break; + case 3: + v = c & 0xf; + min = 0x800; + break; + case 4: + v = c & 0x7; + min = 0x10000; + break; + case 5: + v = c & 3; + min = 0x200000; + break; + case 6: + v = c & 1; + min = 0x4000000; + break; + default: + FATAL(("idn_utf8_getint: internal error\n")); + return (0); + } + + if (len < width) + return (0); + + rest = width - 1; + while (rest-- > 0) { + if (!VALID_CONT_BYTE(*p)) + return (0); + v = (v << 6) | (*p & 0x3f); + p++; + } + + if (v < min) + return (0); + + *vp = v; + return (width); +} + +int +idn_utf8_putwc(char *s, size_t len, unsigned long v) { + unsigned char *p = (unsigned char *)s; + int mask; + int off; + int l; + + assert(s != NULL); + +#if 0 + TRACE(("idn_utf8_putwc(v=%lx)\n", v)); +#endif + + if (v < 0x80) { + mask = 0; + l = 1; + } else if (v < 0x800) { + mask = 0xc0; + l = 2; + } else if (v < 0x10000) { + mask = 0xe0; + l = 3; + } else if (v < 0x200000) { + mask = 0xf0; + l = 4; + } else if (v < 0x4000000) { + mask = 0xf8; + l = 5; + } else if (v < 0x80000000) { + mask = 0xfc; + l = 6; + } else { + return (0); + } + + if (len < l) + return (0); + + off = 6 * (l - 1); + *p++ = (v >> off) | mask; + mask = 0x80; + while (off > 0) { + off -= 6; + *p++ = ((v >> off) & 0x3f) | mask; + } + return l; +} + +int +idn_utf8_isvalidchar(const char *s) { + unsigned long dummy; + + TRACE(("idn_utf8_isvalidchar(s=<%s>)\n", + idn__debug_hexstring(s, 6))); + + return (idn_utf8_getwc(s, 6, &dummy) > 0); +} + +int +idn_utf8_isvalidstring(const char *s) { + unsigned long dummy; + int width; + + assert(s != NULL); + + TRACE(("idn_utf8_isvalidstring(s=<%s>)\n", + idn__debug_hexstring(s, 20))); + + while (*s != '\0') { + width = idn_utf8_getwc(s, 6, &dummy); + if (width == 0) + return (0); + s += width; + } + return (1); +} + +char * +idn_utf8_findfirstbyte(const char *s, const char *known_top) { + const unsigned char *p = (const unsigned char *)s; + const unsigned char *t = (const unsigned char *)known_top; + + assert(s != NULL && known_top != NULL && known_top <= s); + + TRACE(("idn_utf8_findfirstbyte(s=<%s>)\n", + idn__debug_hexstring(s, 8))); + + while (p >= t) { + if (!VALID_CONT_BYTE(*p)) + break; + p--; + } + if (p < t || UTF8_WIDTH(*p) == 0) + return (NULL); + + return ((char *)p); +} diff --git a/contrib/idn/idnkit-1.0-src/lib/util.c b/contrib/idn/idnkit-1.0-src/lib/util.c new file mode 100644 index 0000000000..f986bc4ac5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/util.c @@ -0,0 +1,162 @@ +#ifndef lint +static char *rcsid = "$Id: util.c,v 1.1 2003/06/04 00:26:45 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#ifdef WIN32 +#include +#undef ERROR +#endif + +#include + +#include +#include +#include +#include +#include + +#ifdef WIN32 +#define IDNKEY_IDNKIT "Software\\JPNIC\\IDN" +#endif + +/* + * ASCII ctype macros. + * Note that these macros evaluate the argument multiple times. Be careful. + */ +#define ASCII_ISDIGIT(c) \ + ('0' <= (c) && (c) <= '9') +#define ASCII_ISUPPER(c) \ + ('A' <= (c) && (c) <= 'Z') +#define ASCII_ISLOWER(c) \ + ('a' <= (c) && (c) <= 'z') +#define ASCII_ISALPHA(c) \ + (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) \ + (ASCII_ISDIGIT(c) || ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) + +#define ASCII_TOUPPER(c) \ + (('a' <= (c) && (c) <= 'z') ? ((c) - 'a' + 'A') : (c)) +#define ASCII_TOLOWER(c) \ + (('A' <= (c) && (c) <= 'Z') ? ((c) - 'A' + 'a') : (c)) + +int +idn__util_asciihaveaceprefix(const char *str, const char *prefix) { + assert(str != NULL && prefix != NULL); + + while (*prefix != '\0') { + if (ASCII_TOLOWER(*str) != ASCII_TOLOWER(*prefix)) + return 0; + str++; + prefix++; + } + + return (1); +} + +int +idn__util_ucs4haveaceprefix(const unsigned long *str, const char *prefix) { + assert(str != NULL && prefix != NULL); + + while (*prefix != '\0') { + if (ASCII_TOLOWER(*str) != ASCII_TOLOWER(*prefix)) + return 0; + str++; + prefix++; + } + + return (1); +} + +int +idn__util_ucs4isasciirange(const unsigned long *str) { + while (*str != '\0') { + if (*str > 0x7f) + return (0); + str++; + } + + return (1); +} + +#ifdef WIN32 +int +idn__util_getregistrystring(idn__util_hkey_t topkey, const char *name, + char *str, size_t length) +{ + HKEY top; + LONG stat; + HKEY hk; + DWORD len, type; + + assert((topkey == idn__util_hkey_currentuser || + topkey == idn__util_hkey_localmachine) && + name != NULL && str != NULL); + + if (topkey == idn__util_hkey_currentuser) { + top= HKEY_CURRENT_USER; + } else { /* idn__util_hkey_localmachine */ + top = HKEY_LOCAL_MACHINE; + } + + stat = RegOpenKeyEx(top, IDNKEY_IDNKIT, 0, KEY_READ, &hk); + if (stat != ERROR_SUCCESS) { + return (0); + } + + len = (DWORD)length; + stat = RegQueryValueEx(hk, (LPCTSTR)name, NULL, + &type, (LPBYTE)str, &len); + RegCloseKey(hk); + + if (stat != ERROR_SUCCESS || type != REG_SZ) { + return (0); + } + + return (1); +} +#endif /* WIN32 */ diff --git a/contrib/idn/idnkit-1.0-src/lib/version.c b/contrib/idn/idnkit-1.0-src/lib/version.c new file mode 100644 index 0000000000..0abbddecd7 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/lib/version.c @@ -0,0 +1,54 @@ +#ifndef lint +static char *rcsid = "$Id: version.c,v 1.1 2003/06/04 00:26:45 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include + +const char * +idn_version_getstring(void) { + return IDNKIT_VERSION; +} diff --git a/contrib/idn/idnkit-1.0-src/ltconfig b/contrib/idn/idnkit-1.0-src/ltconfig new file mode 100755 index 0000000000..c1cb8c0bf6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/ltconfig @@ -0,0 +1,3114 @@ +#! /bin/sh + +# ltconfig - Create a system-specific libtool. +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A lot of this script is taken from autoconf-2.10. + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} +echo=echo +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec "$SHELL" "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null`} + case X$UNAME in + *-DOS) PATH_SEPARATOR=';' ;; + *) PATH_SEPARATOR=':' ;; + esac +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string="`eval $cmd`") 2>/dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || + test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH /usr/ucb; do + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running ltconfig again with it. + ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf "%s\n"' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + # Cool, printf works + : + elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && + test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# The name of this program. +progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` + +# Constants: +PROGRAM=ltconfig +PACKAGE=libtool +VERSION=1.3.5 +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +rm="rm -f" + +help="Try \`$progname --help' for more information." + +# Global variables: +default_ofile=libtool +can_build_shared=yes +enable_shared=yes +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +enable_static=yes +enable_fast_install=yes +enable_dlopen=unknown +enable_win32_dll=no +ltmain= +silent= +srcdir= +ac_config_guess= +ac_config_sub= +host= +nonopt= +ofile="$default_ofile" +verify_host=yes +with_gcc=no +with_gnu_ld=no +need_locks=yes +ac_ext=c +objext=o +libext=a +exeext= +cache_file= + +old_AR="$AR" +old_CC="$CC" +old_CFLAGS="$CFLAGS" +old_CPPFLAGS="$CPPFLAGS" +old_LDFLAGS="$LDFLAGS" +old_LD="$LD" +old_LN_S="$LN_S" +old_LIBS="$LIBS" +old_NM="$NM" +old_RANLIB="$RANLIB" +old_DLLTOOL="$DLLTOOL" +old_OBJDUMP="$OBJDUMP" +old_AS="$AS" + +# Parse the command line options. +args= +prev= +for option +do + case "$option" in + -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + eval "$prev=\$option" + prev= + continue + fi + + case "$option" in + --help) cat <&2 + echo "$help" 1>&2 + exit 1 + ;; + + *) + if test -z "$ltmain"; then + ltmain="$option" + elif test -z "$host"; then +# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 +# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then +# echo "$progname: warning \`$option' is not a valid host type" 1>&2 +# fi + host="$option" + else + echo "$progname: too many arguments" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac +done + +if test -z "$ltmain"; then + echo "$progname: you must specify a LTMAIN file" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +if test ! -f "$ltmain"; then + echo "$progname: \`$ltmain' does not exist" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +# Quote any args containing shell metacharacters. +ltconfig_args= +for arg +do + case "$arg" in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ltconfig_args="$ltconfig_args '$arg'" ;; + *) ltconfig_args="$ltconfig_args $arg" ;; + esac +done + +# A relevant subset of AC_INIT. + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 5 compiler messages saved in config.log +# 6 checking for... messages and results +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>>./config.log + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi + +if test -n "$cache_file" && test -r "$cache_file"; then + echo "loading cache $cache_file within ltconfig" + . $cache_file +fi + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + +if test -z "$srcdir"; then + # Assume the source directory is the same one as the path to LTMAIN. + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` + test "$srcdir" = "$ltmain" && srcdir=. +fi + +trap "$rm conftest*; exit 1" 1 2 15 +if test "$verify_host" = yes; then + # Check for config.guess and config.sub. + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/config.guess; then + ac_aux_dir=$ac_dir + break + fi + done + if test -z "$ac_aux_dir"; then + echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 + echo "$help" 1>&2 + exit 1 + fi + ac_config_guess=$ac_aux_dir/config.guess + ac_config_sub=$ac_aux_dir/config.sub + + # Make sure we can run config.sub. + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : + else + echo "$progname: cannot run $ac_config_sub" 1>&2 + echo "$help" 1>&2 + exit 1 + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 + + host_alias=$host + case "$host_alias" in + "") + if host_alias=`$SHELL $ac_config_guess`; then : + else + echo "$progname: cannot guess host type; you must specify one" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac + host=`$SHELL $ac_config_sub $host_alias` + echo "$ac_t$host" 1>&6 + + # Make sure the host verified. + test -z "$host" && exit 1 + +elif test -z "$host"; then + echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 + echo "$help" 1>&2 + exit 1 +else + host_alias=$host +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case "$host_os" in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +case "$host_os" in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR cru $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +# Set a sane default for `AR'. +test -z "$AR" && AR=ar + +# Set a sane default for `OBJDUMP'. +test -z "$OBJDUMP" && OBJDUMP=objdump + +# If RANLIB is not set, then run the test. +if test "${RANLIB+set}" != "set"; then + result=no + + echo $ac_n "checking for ranlib... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then + RANLIB="ranlib" + result="ranlib" + break + fi + done + IFS="$save_ifs" + + echo "$ac_t$result" 1>&6 +fi + +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" +fi + +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$AS" && AS=as + +# Check to see if we are using GCC. +if test "$with_gcc" != yes || test -z "$CC"; then + # If CC is not set, then try to find GCC or a usable CC. + if test -z "$CC"; then + echo $ac_n "checking for gcc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then + CC="gcc" + break + fi + done + IFS="$save_ifs" + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + fi + + # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". + if test -z "$CC"; then + echo $ac_n "checking for cc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + cc_rejected=no + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/cc || test -f $dir/cc$ac_exeext; then + if test "$dir/cc" = "/usr/ucb/cc"; then + cc_rejected=yes + continue + fi + CC="cc" + break + fi + done + IFS="$save_ifs" + if test $cc_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same name, so the bogon will be chosen + # first if we set CC to just the name; use the full file name. + shift + set dummy "$dir/cc" "$@" + shift + CC="$@" + fi + fi + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$CC"; then + echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 + exit 1 + fi + fi + + # Now see if the compiler is really GCC. + with_gcc=no + echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:581: checking whether we are using GNU C" >&5 + + $rm conftest.c + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + with_gcc=yes + fi + $rm conftest.c + echo "$ac_t$with_gcc" 1>&6 +fi + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="$2" + +echo $ac_n "checking for object suffix... $ac_c" 1>&6 +$rm conftest* +echo 'int i = 1;' > conftest.c +echo "$progname:603: checking for object suffix" >& 5 +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 +fi +$rm conftest* +echo "$ac_t$objext" 1>&6 + +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_exeext="no" + $rm conftest* + echo 'main () { return 0; }' > conftest.c + echo "$progname:629: checking for executable suffix" >& 5 + if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c | *.err | *.$objext ) ;; + *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; + esac + done + else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* +fi +if test "X$ac_cv_exeext" = Xno; then + exeext="" +else + exeext="$ac_cv_exeext" +fi +echo "$ac_t$ac_cv_exeext" 1>&6 + +echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 +pic_flag= +special_shlib_compile_flags= +wl= +link_static_flag= +no_builtin_flag= + +if test "$with_gcc" = yes; then + wl='-Wl,' + link_static_flag='-static' + + case "$host_os" in + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + aix*) + # Below there is a dirty hack to force normal static linking with -ldl + # The problem is because libdl dynamically linked with both libc and + # libC (AIX C++ library), which obviously doesn't included in libraries + # list by gcc. This cause undefined symbols with -static flags. + # This hack allows C programs to be linked with "-static -ldl", but + # we not sure about C++ programs. + link_static_flag="$link_static_flag ${wl}-lC" + ;; + cygwin* | mingw* | os2*) + # We can build DLLs from non-PIC. + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + sysv4*MP*) + if test -d /usr/nec; then + pic_flag=-Kconform_pic + fi + ;; + *) + pic_flag='-fPIC' + ;; + esac +else + # PORTME Check for PIC flags for the system compiler. + case "$host_os" in + aix3* | aix4*) + # All AIX code is PIC. + link_static_flag='-bnso -bI:/lib/syscalls.exp' + ;; + + hpux9* | hpux10* | hpux11*) + # Is there a better link_static_flag that works with the bundled CC? + wl='-Wl,' + link_static_flag="${wl}-a ${wl}archive" + pic_flag='+Z' + ;; + + irix5* | irix6*) + wl='-Wl,' + link_static_flag='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + cygwin* | mingw* | os2*) + # We can build DLLs from non-PIC. + ;; + + osf3* | osf4* | osf5*) + # All OSF/1 code is PIC. + wl='-Wl,' + link_static_flag='-non_shared' + ;; + + sco3.2v5*) + pic_flag='-Kpic' + link_static_flag='-dn' + special_shlib_compile_flags='-belf' + ;; + + solaris*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + sunos4*) + pic_flag='-PIC' + link_static_flag='-Bstatic' + wl='-Qoption ld ' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + sysv4*MP*) + if test -d /usr/nec ;then + pic_flag='-Kconform_pic' + link_static_flag='-Bstatic' + fi + ;; + *) + can_build_shared=no + ;; + esac +fi + +if test -n "$pic_flag"; then + echo "$ac_t$pic_flag" 1>&6 + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pic_flag -DPIC" + echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + case "$host_os" in + hpux9* | hpux10* | hpux11*) + # On HP-UX, both CC and GCC only warn that PIC is supported... then they + # create non-PIC objects. So, if there were any warnings, we assume that + # PIC is not supported. + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + can_build_shared=no + pic_flag= + else + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + fi + ;; + *) + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + ;; + esac + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + can_build_shared=no + pic_flag= + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + echo "$ac_t"none 1>&6 +fi + +# Check to see if options -o and -c are simultaneously supported by compiler +echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 +$rm -r conftest 2>/dev/null +mkdir conftest +cd conftest +$rm conftest* +echo "int some_variable = 0;" > conftest.c +mkdir out +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers +# that will create temporary files in the current directory regardless of +# the output directory. Thus, making CWD read-only will cause this test +# to fail, enabling locking or at least warning the user not to do parallel +# builds. +chmod -w . +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -o out/conftest2.o" +echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 +if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then + echo "$ac_t"no 1>&6 + compiler_c_o=no + else + echo "$ac_t"yes 1>&6 + compiler_c_o=yes + fi +else + # Append any errors to the config.log. + cat out/conftest.err 1>&5 + compiler_c_o=no + echo "$ac_t"no 1>&6 +fi +CFLAGS="$save_CFLAGS" +chmod u+w . +$rm conftest* out/* +rmdir out +cd .. +rmdir conftest +$rm -r conftest 2>/dev/null + +if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 +if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_o_lo=no + else + echo "$ac_t"yes 1>&6 + compiler_o_lo=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_o_lo=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + compiler_o_lo=no +fi + +# Check to see if we can do hard links to lock some files if needed +hard_links="nottested" +if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$ac_t$hard_links" 1>&6 + $rm conftest* + if test "$hard_links" = no; then + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 + need_locks=warn + fi +else + need_locks=no +fi + +if test "$with_gcc" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 + $rm conftest* + echo "int some_variable = 0;" > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" + echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + compiler_rtti_exceptions=no + else + echo "$ac_t"yes 1>&6 + compiler_rtti_exceptions=yes + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + compiler_rtti_exceptions=no + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi + +fi + +# Check for any special shared library compilation flags. +if test -n "$special_shlib_compile_flags"; then + echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 + if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : + else + echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 + can_build_shared=no + fi +fi + +echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 +$rm conftest* +echo 'main(){return(0);}' > conftest.c +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $link_static_flag" +echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + echo "$ac_t$link_static_flag" 1>&6 +else + echo "$ac_t"none 1>&6 + link_static_flag= +fi +LDFLAGS="$save_LDFLAGS" +$rm conftest* + +if test -z "$LN_S"; then + # Check to see if we can use ln -s, or we need hard links. + echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 + $rm conftest.dat + if ln -s X conftest.dat 2>/dev/null; then + $rm conftest.dat + LN_S="ln -s" + else + LN_S=ln + fi + if test "$LN_S" = "ln -s"; then + echo "$ac_t"yes 1>&6 + else + echo "$ac_t"no 1>&6 + fi +fi + +# Make sure LD is an absolute path. +if test -z "$LD"; then + ac_prog=ld + if test "$with_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 + echo "$progname:991: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we are not using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld... $ac_c" 1>&6 + echo "$progname:1015: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 + echo "$progname:1018: checking for non-GNU ld" >&5 + fi + + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" + fi + + if test -n "$LD"; then + echo "$ac_t$LD" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$LD"; then + echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 + exit 1 + fi +fi + +# Check to see if it really is or is not GNU ld. +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +else + with_gnu_ld=no +fi +echo "$ac_t$with_gnu_ld" 1>&6 + +# See if the linker supports building shared libraries. +echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 + +allow_undefined_flag= +no_undefined_flag= +need_lib_prefix=unknown +need_version=unknown +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +archive_cmds= +archive_expsym_cmds= +old_archive_from_new_cmds= +export_dynamic_flag_spec= +whole_archive_flag_spec= +thread_safe_flag_spec= +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= +always_export_symbols=no +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' +# include_expsyms should be a list of space-separated symbols to be *always* +# included in the symbol list +include_expsyms= +# exclude_expsyms can be an egrep regular expression of symbols to exclude +# it will be wrapped by ` (' and `)$', so one must not match beginning or +# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', +# as well as any symbol that contains `d'. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out +# platforms (ab)use it in PIC code, but their linkers get confused if +# the symbol is explicitly referenced. Since portable code cannot +# rely on this symbol name, it's probably fine to never include it in +# preloaded symbol tables. + +case "$host_os" in +cygwin* | mingw*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$with_gcc" != yes; then + with_gnu_ld=no + fi + ;; + +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case "$host_os" in + aix3* | aix4*) + # On AIX, the GNU linker is very broken + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=yes + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + # Be careful not to strip the DATA tag left by newer dlltools. + export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' + + # If DATA tags from a recent dlltool are present, honour them! + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \$# in + 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done~ + test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' + + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' + # can we support soname and/or expsyms with a.out? -oliva + else + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + case $host_os in + cygwin* | mingw*) + # dlltool doesn't understand --whole-archive et. al. + whole_archive_flag_spec= + ;; + *) + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + ;; + esac + fi +else + # PORTME fill in a description of your system's linker (not GNU ld) + case "$host_os" in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4*) + hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' + hardcode_libdir_separator=':' + if test "$with_gcc" = yes; then + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + shared_flag='-shared' + else + shared_flag='${wl}-bM:SRE' + hardcode_direct=yes + fi + allow_undefined_flag=' ${wl}-berok' + archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' + archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' + case "$host_os" in aix4.[01]|aix4.[01].*) + # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on + always_export_symbols=yes ;; + esac + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + cygwin* | mingw*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs' + fix_srcfile_path='`cygpath -w $srcfile`' + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9* | hpux10* | hpux11*) + case "$host_os" in + hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; + esac + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + if test "$with_gcc" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF + fi + hardcode_libdir_flag_spec='${wl}-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + openbsd*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' + ;; + + osf3*) + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # As osf3* with the addition of the -msym flag + if test "$with_gcc" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + rhapsody*) + archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flags_spec='-L$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case "$host_os" in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' + else + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + unixware7*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac +fi +echo "$ac_t$ld_shlibs" 1>&6 +test "$ld_shlibs" = no && can_build_shared=no + +if test -z "$NM"; then + echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 + case "$NM" in + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + break + else + NM=${NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$NM" && NM=nm + ;; + esac + echo "$ac_t$NM" 1>&6 +fi + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" + +# Define system-specific variables. +case "$host_os" in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" + ;; +irix*) + symcode='[BCDEGRST]' + ;; +solaris*) + symcode='[BDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[ABCDGISTW]' +fi + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + $rm conftest* + cat > conftest.c <&5 + if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + # Now try to grab the symbols. + nlist=conftest.nm + if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.c +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' + + cat <> conftest.c +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$objext conftstm.$objext + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$objext" + CFLAGS="$CFLAGS$no_builtin_flag" + if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + LIBS="$save_LIBS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + global_symbol_pipe= + fi +done +if test "$pipe_works" = yes; then + echo "${ac_t}ok" 1>&6 +else + echo "${ac_t}failed" 1>&6 +fi + +if test -z "$global_symbol_pipe"; then + global_symbol_to_cdecl= +fi + +# Check hardcoding attributes. +echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$hardcode_shlibpath_var" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$ac_t$hardcode_action" 1>&6 + + +reload_flag= +reload_cmds='$LD$reload_flag -o $output$reload_objs' +echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 +# PORTME Some linkers may need a different reload flag. +reload_flag='-r' +echo "$ac_t$reload_flag" 1>&6 +test -n "$reload_flag" && reload_flag=" $reload_flag" + +# PORTME Fill in your ld.so characteristics +library_names_spec= +libname_spec='lib$name' +soname_spec= +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +file_magic_cmd= +file_magic_test_file= +deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. +echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 +case "$host_os" in +aix3*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so$major' + ;; + +aix4*) + version_type=linux + # AIX has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + # We preserve .a as extension for shared libraries though AIX4.2 + # and later linker supports .so + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' + shlibpath_var=LIBPATH + deplibs_check_method=pass_all + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}.so' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + deplibs_check_method=pass_all + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + export_dynamic_flag_spec=-rdynamic + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw*) + version_type=windows + need_version=no + need_lib_prefix=no + if test "$with_gcc" = yes; then + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' + else + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' + fi + dynamic_linker='Win32 ld.exe' + deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + file_magic_cmd='${OBJDUMP} -f' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case "$version_type" in + freebsd-elf*) + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + deplibs_check_method=unknown + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case "$host_os" in + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + dynamic_linker="$host_os dld.sl" + version_type=sunos + need_lib_prefix=no + need_version=no + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + case "$host_os" in + hpux10.20*) + # TODO: Does this work for hpux-11 too? + deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6*) + version_type=irix + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}.so.$major' + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' + case "$host_os" in + irix5*) + libsuff= shlibsuff= + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in # libtool.m4 will add one of these switches to LD + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib${libsuff}/libc.so*` + deplibs_check_method='pass_all' + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method=pass_all + + if test -f /lib/ld.so.1; then + dynamic_linker='GNU ld.so' + else + # Only the GNU ld.so supports shared libraries on MkLinux. + case "$host_cpu" in + powerpc*) dynamic_linker=no ;; + *) dynamic_linker='Linux ld.so' ;; + esac + fi + ;; + +netbsd*) + version_type=sunos + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' + soname_spec='${libname}${release}.so$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + ;; + +openbsd*) + version_type=sunos + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + need_version=no + fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + need_lib_prefix=no + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_version=no + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + shlibpath_var=LD_LIBRARY_PATH + # this will be overridden with pass_all, but let us keep it just in case + deplibs_check_method='file_magic COFF format alpha shared library' + file_magic_cmd=/usr/bin/file + file_magic_test_file=/shlib/libc.so + deplibs_check_method='pass_all' + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rhapsody*) + version_type=sunos + library_names_spec='${libname}.so' + soname_spec='${libname}.so' + shlibpath_var=DYLD_LIBRARY_PATH + deplibs_check_method=pass_all + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" + file_magic_cmd=/usr/bin/file + file_magic_test_file=/lib/libc.so + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + case "$host_vendor" in + sequent) + file_magic_cmd='/bin/file' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + ncr) + deplibs_check_method='pass_all' + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' + soname_spec='$libname.so.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t$dynamic_linker" 1>&6 +test "$dynamic_linker" = no && can_build_shared=no + +# Report the final consequences. +echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 + +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in +# configure.in, otherwise build static only libraries. +case "$host_os" in +cygwin* | mingw* | os2*) + if test x$can_build_shared = xyes; then + test x$enable_win32_dll = xno && can_build_shared=no + echo "checking if package supports dlls... $can_build_shared" 1>&6 + fi +;; +esac + +if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac +fi + +echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + test "$enable_shared" = yes && enable_static=no + ;; +esac + +echo "$ac_t$enable_shared" 1>&6 + +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes + +echo "checking whether to build static libraries... $enable_static" 1>&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +echo $ac_n "checking for objdir... $ac_c" 1>&6 +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +echo "$ac_t$objdir" 1>&6 + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else +if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then + lt_cv_dlopen=no lt_cv_dlopen_libs= +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "$progname:2248: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +echo "$progname:2288: checking for dlopen" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +dlopen(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_dlopen=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dlopen" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "$progname:2335: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +echo "$progname:2375: checking for shl_load" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +shl_load(); +#endif + +; return 0; } +EOF +if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shl_load=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +echo "$progname:2423: checking for shl_load in -ldld" >&5 +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +fi + + +fi + + +fi + +fi + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + fi + + case "$lt_cv_dlopen" in + dlopen) +for ac_hdr in dlfcn.h; do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "$progname:2488: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int fnord = 0; +EOF +ac_try="$ac_compile >/dev/null 2>conftest.out" +{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +done + + if test "x$ac_cv_header_dlfcn_h" = xyes; then + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + fi + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2526: checking whether a program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 + + if test "$lt_cv_dlopen_self" = yes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + lt_cv_dlopen_self_static=cross + else + cat > conftest.c < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LTDL_GLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LTDL_GLOBAL DL_GLOBAL +# else +# define LTDL_GLOBAL 0 +# endif +#endif + +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LTDL_LAZY_OR_NOW +# ifdef RTLD_LAZY +# define LTDL_LAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LTDL_LAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LTDL_LAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LTDL_LAZY_OR_NOW DL_NOW +# else +# define LTDL_LAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +fnord() { int i=42;} +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + +EOF +if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + lt_cv_dlopen_self_static=yes +else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + lt_cv_dlopen_self_static=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 +fi + ;; + esac + + case "$lt_cv_dlopen_self" in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case "$lt_cv_dlopen_self_static" in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + +# Copy echo and quote the copy, instead of the original, because it is +# used later. +ltecho="$echo" +if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ltecho="$CONFIG_SHELL \$0 --fallback-echo" +fi +LTSHELL="$SHELL" + +LTCONFIG_VERSION="$VERSION" + +# Only quote variables if we're using ltmain.sh. +case "$ltmain" in +*.sh) + # Now quote all the things that may contain metacharacters. + for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ + AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ + reload_flag reload_cmds wl \ + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ + library_names_spec soname_spec \ + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ + file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ + hardcode_libdir_flag_spec hardcode_libdir_separator \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do + + case "$var" in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case "$ltecho" in + *'\$0 --fallback-echo"') + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + + trap "$rm \"$ofile\"; exit 1" 1 2 15 + echo "creating $ofile" + $rm "$ofile" + cat < "$ofile" +#! $SHELL + +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. +# +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +### BEGIN LIBTOOL CONFIG +EOF + cfgfile="$ofile" + ;; + +*) + # Double-quote the variables that need it (for aesthetics). + for var in old_CC old_CFLAGS old_CPPFLAGS \ + old_LD old_LDFLAGS old_LIBS \ + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do + eval "$var=\\\"\$var\\\"" + done + + # Just create a config file. + cfgfile="$ofile.cfg" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + echo "creating $cfgfile" + $rm "$cfgfile" + cat < "$cfgfile" +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +EOF + ;; +esac + +cat <> "$cfgfile" +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ +# $0$ltconfig_args +# +# Compiler and other test output produced by $progname, useful for +# debugging $progname, is in ./config.log if it exists. + +# The version of $progname that generated this script. +LTCONFIG_VERSION=$LTCONFIG_VERSION + +# Shell to use when invoking shell scripts. +SHELL=$LTSHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$ltecho + +# The archiver. +AR=$AR + +# The default C compiler. +CC=$CC + +# The linker used to build libraries. +LD=$LD + +# Whether we need hard or soft links. +LN_S=$LN_S + +# A BSD-compatible nm program. +NM=$NM + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$reload_flag +reload_cmds=$reload_cmds + +# How to pass a linker flag through the compiler. +wl=$wl + +# Object file suffix (normally "o"). +objext="$objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$pic_flag + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$compiler_c_o + +# Can we write directly to a .lo ? +compiler_o_lo=$compiler_o_lo + +# Must we lock files when doing compilation ? +need_locks=$need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$link_static_flag + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$RANLIB +old_archive_cmds=$old_archive_cmds +old_postinstall_cmds=$old_postinstall_cmds +old_postuninstall_cmds=$old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$old_archive_from_new_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$archive_cmds +archive_expsym_cmds=$archive_expsym_cmds +postinstall_cmds=$postinstall_cmds +postuninstall_cmds=$postuninstall_cmds + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$global_symbol_to_cdecl + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$hardcode_libdir_separator + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$include_expsyms + +EOF + +case "$ltmain" in +*.sh) + echo '### END LIBTOOL CONFIG' >> "$ofile" + echo >> "$ofile" + case "$host_os" in + aix3*) + cat <<\EOF >> "$ofile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # Append the ltmain.sh script. + sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + + chmod +x "$ofile" + ;; + +*) + # Compile the libtool program. + echo "FIXME: would compile $ltmain" + ;; +esac + +test -n "$cache_file" || exit 0 + +# AC_CACHE_SAVE +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/contrib/idn/idnkit-1.0-src/ltmain.sh b/contrib/idn/idnkit-1.0-src/ltmain.sh new file mode 100644 index 0000000000..766732da84 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/ltmain.sh @@ -0,0 +1,4024 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# +# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + echo "$modename: not configured to build any kind of library" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +# Parse our command line options once, thoroughly. +while test $# -gt 0 +do + arg="$1" + shift + + case "$arg" in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + execute_dlfiles) + eval "$prev=\"\$$prev \$arg\"" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + exit 0 + ;; + + --config) + sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 + exit 0 + ;; + + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case "$arg" in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case "$mode" in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + lastarg= + srcfile="$nonopt" + suppress_output= + + user_target=no + for arg + do + # Accept any command-line options. + case "$arg" in + -o) + if test "$user_target" != "no"; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit 1 + fi + user_target=next + ;; + + -static) + build_old_libs=yes + continue + ;; + esac + + case "$user_target" in + next) + # The next one is the -o target name + user_target=yes + continue + ;; + yes) + # We got the output file + user_target=set + libobj="$arg" + continue + ;; + esac + + # Accept the current argument as the source file. + lastarg="$srcfile" + srcfile="$arg" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly in scan + # sets, so we specify it separately. + case "$lastarg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + done + + case "$user_target" in + set) + ;; + no) + # Get the name of the library object. + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + *) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit 1 + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSfmso]' + case "$libobj" in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case "$libobj" in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit 1 + ;; + esac + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $libobj" + else + removelist="$libobj" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit 1" 1 2 15 + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit 1" 1 2 15 + else + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until ln "$0" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + echo $srcfile > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + if test "$build_old_libs" = yes; then + lo_libobj="$libobj" + dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$libobj"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + + if test -d "$dir"; then + $show "$rm $libobj" + $run $rm $libobj + else + $show "$mkdir $dir" + $run $mkdir $dir + status=$? + if test $status -ne 0 && test ! -d $dir; then + exit $status + fi + fi + fi + if test "$compiler_o_lo" = yes; then + output_obj="$libobj" + command="$command -o $output_obj" + elif test "$compiler_c_o" = yes; then + output_obj="$obj" + command="$command -o $output_obj" + fi + + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + test -n "$output_obj" && $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed, then go on to compile the next one + if test x"$output_obj" != x"$libobj"; then + $show "$mv $output_obj $libobj" + if $run $mv $output_obj $libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # If we have no pic_flag, then copy the object into place and finish. + if test -z "$pic_flag" && test "$build_old_libs" = yes; then + # Rename the .lo from within objdir to obj + if test -f $obj; then + $show $rm $obj + $run $rm $obj + fi + + $show "$mv $libobj $obj" + if $run $mv $libobj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + # Now arrange that obj and lo_libobj become the same file + $show "(cd $xdir && $LN_S $baseobj $libobj)" + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then + exit 0 + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Allow error messages only from the first compilation. + suppress_output=' >/dev/null 2>&1' + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + command="$base_compile $srcfile" + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + output_obj="$obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed + if test x"$output_obj" != x"$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + else + # Move the .lo from within objdir + $show "$mv $libobj $lo_libobj" + if $run $mv $libobj $lo_libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + fi + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $rm "$lockfile" + fi + + exit 0 + ;; + + # libtool link mode + link) + modename="$modename: link" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invokation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + + # This is a source program that is used to create dlls on Windows + # Don't remove nor modify the starting and closing comments +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments +# /* impgen.c starts here */ +# /* Copyright (C) 1999 Free Software Foundation, Inc. +# +# This file is part of GNU libtool. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# */ +# +# #include /* for printf() */ +# #include /* for open(), lseek(), read() */ +# #include /* for O_RDONLY, O_BINARY */ +# #include /* for strdup() */ +# +# static unsigned int +# pe_get16 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[2]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 2); +# return b[0] + (b[1]<<8); +# } +# +# static unsigned int +# pe_get32 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[4]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 4); +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# static unsigned int +# pe_as32 (ptr) +# void *ptr; +# { +# unsigned char *b = ptr; +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# int +# main (argc, argv) +# int argc; +# char *argv[]; +# { +# int dll; +# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; +# unsigned long export_rva, export_size, nsections, secptr, expptr; +# unsigned long name_rvas, nexp; +# unsigned char *expdata, *erva; +# char *filename, *dll_name; +# +# filename = argv[1]; +# +# dll = open(filename, O_RDONLY|O_BINARY); +# if (!dll) +# return 1; +# +# dll_name = filename; +# +# for (i=0; filename[i]; i++) +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; +# +# pe_header_offset = pe_get32 (dll, 0x3c); +# opthdr_ofs = pe_header_offset + 4 + 20; +# num_entries = pe_get32 (dll, opthdr_ofs + 92); +# +# if (num_entries < 1) /* no exports */ +# return 1; +# +# export_rva = pe_get32 (dll, opthdr_ofs + 96); +# export_size = pe_get32 (dll, opthdr_ofs + 100); +# nsections = pe_get16 (dll, pe_header_offset + 4 +2); +# secptr = (pe_header_offset + 4 + 20 + +# pe_get16 (dll, pe_header_offset + 4 + 16)); +# +# expptr = 0; +# for (i = 0; i < nsections; i++) +# { +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } +# } +# +# expdata = (unsigned char*)malloc(export_size); +# lseek (dll, expptr, SEEK_SET); +# read (dll, expdata, export_size); +# erva = expdata - export_rva; +# +# nexp = pe_as32 (expdata+24); +# name_rvas = pe_as32 (expdata+32); +# +# printf ("EXPORTS\n"); +# for (i = 0; i&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + fi + build_libtool_libs=no + build_old_libs=yes + prefer_static_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test $# -gt 0; do + arg="$1" + shift + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case "$prev" in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case "$arg" in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit 1 + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case "$arg" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi + + prevarg="$arg" + + case "$arg" in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: not more than one -exported-symbols argument allowed" + exit 1 + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + absdir="$dir" + fi + dir="$absdir" + ;; + esac + case " $deplibs " in + *" $arg "*) ;; + *) deplibs="$deplibs $arg";; + esac + case " $lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir";; + esac + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` + case ":$dllsearchpath:" in + ::) dllsearchpath="$dllsearchdir";; + *":$dllsearchdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dllsearchdir";; + esac + ;; + esac + ;; + + -l*) + if test "$arg" = "-lc"; then + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # These systems don't actually have c library (as such) + continue + ;; + esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-beos*) + # These systems don't actually have math library (as such) + continue + ;; + esac + fi + deplibs="$deplibs $arg" + ;; + + -module) + module=yes + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # If we have no pic_flag, then this is the same as -all-static. + if test -z "$pic_flag" && test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + + *.o | *.obj | *.a | *.lib) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A library object. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` + prev= + fi + libobjs="$libobjs $arg" + ;; + + *.la) + # A libtool-controlled library. + + dlname= + libdir= + library_names= + old_library= + + # Check to see that this really is a libtool archive. + if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 + exit 1 + fi + + # If the library was installed with an old release of libtool, + # it will not redefine variable installed. + installed=yes + + # Read the .la file + # If there is no directory component, then add one. + case "$arg" in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 + exit 1 + fi + + # Find the relevant object directory and library name. + name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` + + if test "X$installed" = Xyes; then + dir="$libdir" + else + dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$arg"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + fi + + if test -n "$dependency_libs"; then + # Extract -R and -L from dependency_libs + temp_deplibs= + for deplib in $dependency_libs; do + case "$deplib" in + -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + case " $rpath $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + -L*) case "$compile_command $temp_deplibs " in + *" $deplib "*) ;; + *) temp_deplibs="$temp_deplibs $deplib";; + esac + temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` + case " $lib_search_path " in + *" $temp_dir "*) ;; + *) lib_search_path="$lib_search_path $temp_dir";; + esac + ;; + *) temp_deplibs="$temp_deplibs $deplib";; + esac + done + dependency_libs="$temp_deplibs" + fi + + if test -z "$libdir"; then + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$deplibs$dependency_libs" + compile_command="$compile_command $dir/$old_library$dependency_libs" + finalize_command="$finalize_command $dir/$old_library$dependency_libs" + continue + fi + + # This library was specified with -dlopen. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking statically, + # we need to preload. + prev=dlprefiles + else + # We should not create a dependency on this library, but we + # may need any libraries it requires. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + prev= + continue + fi + fi + + # The library was specified with -dlpreopen. + if test "$prev" = dlprefiles; then + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + dlprefiles="$dlprefiles $dir/$old_library" + else + dlprefiles="$dlprefiles $dir/$linklib" + fi + prev= + fi + + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + link_against_libtool_libs="$link_against_libtool_libs $arg" + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # We need an absolute path. + case "$dir" in + [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + absdir="$dir" + fi + ;; + esac + + # This is the magic to use -rpath. + # Skip directories that are in the system default run-time + # search path, unless they have been requested with -R. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + + lib_linked=yes + case "$hardcode_action" in + immediate | unsupported) + if test "$hardcode_direct" = no; then + compile_command="$compile_command $dir/$linklib" + deplibs="$deplibs $dir/$linklib" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + dllsearchdir=`cd "$dir" && pwd || echo "$dir"` + if test -n "$dllsearchpath"; then + dllsearchpath="$dllsearchpath:$dllsearchdir" + else + dllsearchpath="$dllsearchdir" + fi + ;; + esac + elif test "$hardcode_minus_L" = no; then + case "$host" in + *-*-sunos*) + compile_shlibpath="$compile_shlibpath$dir:" + ;; + esac + case "$compile_command " in + *" -L$dir "*) ;; + *) compile_command="$compile_command -L$dir";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = no; then + case ":$compile_shlibpath:" in + *":$dir:"*) ;; + *) compile_shlibpath="$compile_shlibpath$dir:";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -l$name" + else + lib_linked=no + fi + ;; + + relink) + if test "$hardcode_direct" = yes; then + compile_command="$compile_command $absdir/$linklib" + deplibs="$deplibs $absdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + case "$compile_command " in + *" -L$absdir "*) ;; + *) compile_command="$compile_command -L$absdir";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -L$absdir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case ":$compile_shlibpath:" in + *":$absdir:"*) ;; + *) compile_shlibpath="$compile_shlibpath$absdir:";; + esac + compile_command="$compile_command -l$name" + deplibs="$deplibs -l$name" + else + lib_linked=no + fi + ;; + + *) + lib_linked=no + ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + finalize_command="$finalize_command $libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + case "$finalize_command " in + *" -L$libdir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case ":$finalize_shlibpath:" in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:";; + esac + finalize_command="$finalize_command -l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + case "$finalize_command " in + *" -L$dir "*) ;; + *) finalize_command="$finalize_command -L$libdir";; + esac + finalize_command="$finalize_command -l$name" + fi + else + # Transform directly to old archives if we don't build new libraries. + if test -n "$pic_flag" && test -z "$old_library"; then + $echo "$modename: cannot find static library for \`$arg'" 1>&2 + exit 1 + fi + + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_command="$compile_command $dir/$linklib" + finalize_command="$finalize_command $dir/$linklib" + else + case "$compile_command " in + *" -L$dir "*) ;; + *) compile_command="$compile_command -L$dir";; + esac + compile_command="$compile_command -l$name" + case "$finalize_command " in + *" -L$dir "*) ;; + *) finalize_command="$finalize_command -L$dir";; + esac + finalize_command="$finalize_command -l$name" + fi + fi + + # Add in any libraries that this one depends upon. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + esac + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + case "$output" in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *.a | *.lib) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + ;; + + *.la) + # Make sure we only generate libraries of the form `libNAME.la'. + case "$outputname" in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + + if test -n "$objs"; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 + exit 1 + fi + + # How the heck are we supposed to write a wrapper for a shared library? + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 + exit 1 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test $# -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + libext=al + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + dependency_libs="$deplibs" + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + current="$2" + revision="$3" + age="$4" + + # Check that each of the things are valid numbers. + case "$current" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$revision" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$age" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test $age -gt $current; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case "$version_type" in + none) ;; + + irix) + major=`expr $current - $age + 1` + versuffix="$major.$revision" + verstring="sgi$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test $loop != 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="sgi$major.$iface:$verstring" + done + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test $loop != 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + windows) + # Like Linux, but with '-' rather than '.', since we only + # want one extension on Windows 95. + major=`expr $current - $age` + versuffix="-$major-$age-$revision" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + verstring="0.0" + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + dependency_libs="$deplibs" + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody*) + # rhapsody is a little odd... + deplibs="$deplibs -framework System" + ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" + ;; + esac + fi + + # Create the output directory, or remove our outputs if we need to. + if test -d $output_objdir; then + $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" + $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* + else + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + if test "$build_libtool_libs" = yes; then + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case "$deplibs_check_method" in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behaviour. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | sed 's/.* -> //'` + case "$potliblink" in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | sed 10q \ + | egrep "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | + grep . >/dev/null; then + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + echo "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Get the real and link names of the library. + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + lib="$output_objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Ensure that we have .o objects for linkers which dislike .lo + # (e.g. aix) in case we are running --disable-static + for obj in $libobjs; do + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + if test ! -f $xdir/$oldobj; then + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? + fi + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + eval cmds=\"$export_symbols_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linkopts="$linkopts $flag" + fi + + # Do each of the archive commands. + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + *.lo | *.o | *.obj) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case "$output" in + *.lo) + if test -n "$objs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + # Create the old-style object. + reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" + + output="$obj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + $show "echo timestamp > $libobj" + $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + else + # Just create a symlink. + $show $rm $libobj + $run $rm $libobj + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$libobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + $show "(cd $xdir && $LN_S $oldobj $baseobj)" + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + ;; + + # Anything else should be a program. + *) + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$compile_rpath " in + *" $libdir "*) ;; + *) compile_rpath="$compile_rpath $libdir" ;; + esac + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + + # Create the binary in the object directory, then wrap it. + if test ! -d $output_objdir; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status + fi + fi + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case "$dlsyms" in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$output.exp" + $run $rm $export_symbols + $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + else + $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`echo "$arg" | sed -e 's%^.*/%%'` + $run eval 'echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{\ +" + + sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ + -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ + < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr_t) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case "$host" in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case "$dir" in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case "$0" in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`echo $output|sed 's,.exe$,,'` ;; + esac + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + link_against_libtool_libs='$link_against_libtool_libs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + echo >> $output "\ + program=lt-'$outputname' + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if (cd \"\$thisdir\" && eval \$relink_command); then : + else + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # win32 systems need to use the prog path for dll + # lookup to work + *-*-cygwin*) + $echo >> $output "\ + exec \$progdir/\$program \${1+\"\$@\"} +" + ;; + + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \$progdir\\\\\$program \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + exec \$program \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test $status -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + case "$xlib" in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test $status -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` + done + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + # Ensure that we have .o objects in place in case we decided + # not to build a shared library, and have fallen back to building + # static libs even though --disable-static was passed! + for oldobj in $oldobjs; do + if test ! -f $oldobj; then + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$oldobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + $show "(cd $xdir && ${LN_S} $obj $baseobj)" + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? + fi + done + + eval cmds=\"$old_archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case "$output" in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + if test -n "$xrpath"; then + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + done + dependency_libs="$temp_xrpath $dependency_libs" + fi + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + fi + $rm $output + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$dlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Directory that this library needs to be installed in: +libdir='$install_libdir'\ +" + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case "$arg" in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test $# -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case "$file" in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case "$file" in + *.a | *.lib) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$realname $destdir/$realname" + $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? + + if test $# -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case "$destfile" in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.o | *.obj) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + link_against_libtool_libs= + relink_command= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Check the variables that should have been set. + if test -z "$link_against_libtool_libs"; then + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $link_against_libtool_libs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case "$lib" in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir="$tmpdir/libtool-$$" + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec $SHELL $0 --finish$current_libdirs + exit 1 + fi + + exit 0 + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + echo " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + echo "See any operating system documentation about shared libraries for" + echo "more information, such as the ld(1) and ld.so(8) manual pages." + echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case "$file" in + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case "$file" in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved enviroment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now actually exec the command. + eval "exec \$cmd$args" + + $echo "$modename: cannot exec \$cmd$args" + exit 1 + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool uninstall mode + uninstall) + modename="$modename: uninstall" + rm="$nonopt" + files= + + for arg + do + case "$arg" in + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + rmfiles="$file" + + case "$name" in + *.la) + # Possibly a libtool archive, so verify it. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $dir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" + + $show "$rm $rmfiles" + $run $rm $rmfiles + + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + # FIXME: should reinstall the best remaining shared library. + fi + ;; + + *.lo) + if test "$build_old_libs" = yes; then + oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` + rmfiles="$rmfiles $dir/$oldobj" + fi + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + + *) + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + esac + done + exit 0 + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 +fi # test -z "$show_help" + +# We need to display help for each of the modes. +case "$mode" in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + +MODE must be one of the following: + + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE." + exit 0 + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/contrib/idn/idnkit-1.0-src/make.wnt b/contrib/idn/idnkit-1.0-src/make.wnt new file mode 100644 index 0000000000..2b39acf9eb --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/make.wnt @@ -0,0 +1,76 @@ +# $Id: make.wnt,v 1.1 2003/06/04 00:25:03 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +all : force + copy include\config.h.win include\config.h + cd lib + $(MAKE) -f make.wnt + cd .. + cd tools + $(MAKE) -f make.wnt + cd .. + cd wsock + $(MAKE) -f make.wnt + cd .. + +install : all + cd lib + $(MAKE) -f make.wnt install + cd .. + cd tools + $(MAKE) -f make.wnt install + cd .. + cd wsock + $(MAKE) -f make.wnt install + cd .. + +clean : force + cd lib + $(MAKE) -f make.wnt clean + cd .. + cd tools + $(MAKE) -f make.wnt clean + cd .. + cd wsock + $(MAKE) -f make.wnt clean + cd .. + +force: diff --git a/contrib/idn/idnkit-1.0-src/man/Makefile.in b/contrib/idn/idnkit-1.0-src/man/Makefile.in new file mode 100644 index 0000000000..405418eb85 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/man/Makefile.in @@ -0,0 +1,116 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:27:14 marka Exp $ +# +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +top_builddir = .. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +sysconfdir = @sysconfdir@ +mandir = @mandir@ +man3dir = $(mandir)/man3 +man5dir = $(mandir)/man5 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ + +@LITEONLY_TRUE@all: libidnkitlite.3 idn.conf.5 idnrc.5 idnalias.conf.5 +@LITEONLY_FALSE@all: libidnkitlite.3 idn.conf.5 idnrc.5 idnalias.conf.5 libidnkit.3 + +libidnkit.3: libidnkit.3.in + sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/libidnkit.3.in > $@ +libidnkitlite.3: libidnkit.3.in + sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/libidnkit.3.in > $@ +idn.conf.5: idn.conf.5.in + sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/idn.conf.5.in > $@ +idnrc.5: idn.conf.5.in + sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/idn.conf.5.in > $@ +idnalias.conf.5: idn.conf.5.in + sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/idn.conf.5.in > $@ + +@LITEONLY_TRUE@@COMPAT_TRUE@install: all install-common install-compat-common +@LITEONLY_FALSE@@COMPAT_TRUE@install: all install-common install-nolite install-compat-common install-compat-nolite +@LITEONLY_TRUE@@COMPAT_FALSE@install: all install-common +@LITEONLY_FALSE@@COMPAT_FALSE@install: all install-common install-nolite + +install-common: + $(MKINSTALLDIRS) $(DESTDIR)$(man3dir) + $(INSTALL_DATA) libidnkitlite.3 $(DESTDIR)$(man3dir)/libidnkitlite.3 + $(MKINSTALLDIRS) $(DESTDIR)$(man5dir) + $(INSTALL_DATA) idn.conf.5 $(DESTDIR)$(man5dir)/idn.conf.5 + $(INSTALL_DATA) idnrc.5 $(DESTDIR)$(man5dir)/idnrc.5 + $(INSTALL_DATA) idnalias.conf.5 $(DESTDIR)$(man5dir)/idnalias.conf.5 + +install-nolite: + $(MKINSTALLDIRS) $(DESTDIR)$(man3dir) + $(INSTALL_DATA) libidnkit.3 $(DESTDIR)$(man3dir)/libidnkit.3 + +install-compat-common: + src=$(DESTDIR)$(man3dir)/libidnkitlite.3; \ + dst=$(DESTDIR)$(man3dir)/libmdnlite.3; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + src=$(DESTDIR)$(man5dir)/idn.conf.5; \ + dst=$(DESTDIR)$(man5dir)/mdn.conf.5; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + +install-compat-nolite: + src=$(DESTDIR)$(man3dir)/libidnkit.3; \ + dst=$(DESTDIR)$(man3dir)/libmdn.3; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + +clean: + rm -f idn.conf.5 idnrc.5 idnalias.conf.5 libidnkit.3 libidnkitlite.3 + rm -f *~ + +distclean: clean + rm -f Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/man/idn.conf.5.in b/contrib/idn/idnkit-1.0-src/man/idn.conf.5.in new file mode 100644 index 0000000000..700ced9b68 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/man/idn.conf.5.in @@ -0,0 +1,312 @@ +.\" $Id: idn.conf.5.in,v 1.1 2003/06/04 00:27:16 marka Exp $" +.\" +.\" Copyright (c) 2000,2001 Japan Network Information Center. +.\" All rights reserved. +.\" +.\" By using this file, you agree to the terms and conditions set forth bellow. +.\" +.\" LICENSE TERMS AND CONDITIONS +.\" +.\" The following License Terms and Conditions apply, unless a different +.\" license is obtained from Japan Network Information Center ("JPNIC"), +.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +.\" Chiyoda-ku, Tokyo 101-0047, Japan. +.\" +.\" 1. Use, Modification and Redistribution (including distribution of any +.\" modified or derived work) in source and/or binary forms is permitted +.\" under this License Terms and Conditions. +.\" +.\" 2. Redistribution of source code must retain the copyright notices as they +.\" appear in each source code file, this License Terms and Conditions. +.\" +.\" 3. Redistribution in binary form must reproduce the Copyright Notice, +.\" this License Terms and Conditions, in the documentation and/or other +.\" materials provided with the distribution. For the purposes of binary +.\" distribution the "Copyright Notice" refers to the following language: +.\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +.\" +.\" 4. The name of JPNIC may not be used to endorse or promote products +.\" derived from this Software without specific prior written approval of +.\" JPNIC. +.\" +.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +.\" +.TH idn.conf 5 "Mar 8, 2002" +.\" +.SH NAME +idn.conf, .idnrc, idnalias.conf \- configuration files for idnkit library +.\" +.SH SYNOPSIS +@sysconfdir@/idn.conf +.br +~/.idnrc +.br +@sysconfdir@/idnalias.conf +.\" +.SH DESCRIPTION +\fBidn.conf\fR and \fB.idnrc\fR are configuration files for idnkit +library which is a toolkit for handling internationalized domain names. +.PP +idnkit library tries to load the user's configuration file ~/.idnrc +first, and then tries the system configutation file +@sysconfdir@/idn.conf. +Note that idnkit library loads either, not both. +.PP +To use internationalized domain names in DNS or other protocols, they +must be converted to an appropriate format before further processing. +In idnkit, this conversion process is comprised of the following tasks. +.IP 1. 3 +Convert the given domain name in application's local codeset to Unicode, +and vice versa. +.IP 2. 3 +Map certain characters in the name to period character so that they are +treated as the domain name +delimiter (\fIdelimiter mapping\fR). +.IP 3. 3 +Map certain characters in the name to other characters or chracter sequences, +according to a mapping rule determined by its top level domain (TLD). +.IP 4. 3 +Perform NAMEPREP, which is a starndard name preparation process for +internationalized domain names. This process is composed of +the tree steps called mapping, normalization, prohibited character +checking and bidirectional string checking. +.IP 5. 3 +Convert the nameprepped name to IDN encoding, which is the standard encoding +for internationalized domain names (also known as ASCII-compatible encoding, +ACE), and vice versa. +.PP +The configuration file specifies the parameters for these tasks, such as: +.RS 2 +.IP \- 2 +the encoding of internationalized domain names (IDN encoding). +.IP \- 2 +NAMEPREP schemes. +.RE +.\" +.SH SYNTAX +The configuration file is a simple text files, and each line in the file +(other than comment lines, which begin with ``#'', and empty lines) +forms an entry of the following format: +.PP +.RS 4 +.nf +\fIkeyword\fP\ \fIvalue..\fP +.fi +.RE +\." +.SH "IDN-ENCODING ENTRY" +IDN encoding entry specifies the encoding name (codeset name) which +is used as the encoding of internationalized domain names. +.PP +The syntax of this entry is: +.PP +.RS 4 +.nf +\f(CWidn-encoding \fP\fIencoding\fP +.fi +.RE +.PP +\fIencoding\fP is the encoding name to be used, and any of the following +names can be specified. +.RS 2 +.IP "\(bu" 2 +``Punycode'' +.IP "\(bu" 2 +``UTF-8'' +.IP "\(bu" 2 +Codeset names which iconv_open() library function accepts. Please +consult iconv() documentation for the available codesets. +.IP "\(bu" 2 +Any alias names for the above, defined by the alias file. +(See section ``ENCODING-ALIAS-FILE'') +.RE +.PP +The standard encoding was determined as Punycode. +.\" +.SH "NAMEPREP ENTRY" +Nameprep entry specifies the version of NAMEPREP, which is a specification +of ``canonicalization'' process of internationalized domain name before +it is converted to the IDN encoding. +.PP +The syntax of this entry is: +.PP +.RS 4 +.nf +\f(CWnameprep \fP\fIversion\fP +.fi +.RE +.PP +\fIversion\fR is the version name of NAMEPREP specification, and currently +the following versions can be specified. +.RS 2 +.IP "\(bu" 2 +``RFC3491'' +.br +This version refers to RFC3491 ``rfc-3491.txt''. +.RE +.PP +The NAMEPREP process consists of the following 4 subprocesses. +.IP 1. 3 +mapping, which maps certain characters in a name to other characters, +possibly none. +.IP 2. 3 +normalization, which replaces character variants in a name to +a unique one. +.IP 3. 3 +prohibited character checking, which detects invalid characters in a name. +.IP 4. 3 +unassigned codepoint checking, which also invalid codepoints in a name. +.IP 5. 3 +bidirectional string checking, which detecs invalid string. +.\" +.SH "LOCAL-MAP ENTRY" +This entry specifies localized mapping phase before NAMEPREP takes place. +Different mapping rules can be specified for each TLD (top-level domain). +For example, you can have one mapping for ``.tw'' domain, and another for +``.jp'' domain. +.PP +The syntax of this entry is: +.PP +.RS 4 +.nf +\f(CWlocal-map \fItld\f(CW \fIscheme\fR [\fIscheme\fR..] +.fi +.RE +.PP +\fItld\fR specifies the TLD to which the mapping rule is to be applied, +and \fIscheme\fR specifies the mapping scheme, and currently available +schemes are: +.RS 2 +.TP 4 +\f(CWRFC3491\fP +Specify mapping defined by RFC3491. +.TP 4 +\f(CWfilemap:\fP\fIpathname\fP +Specify mapping defined by the file \fIpathname\fP. +See ``MAPFILE FORMAT'' for the format of this file. +.RE +.PP +There are two special \fItld\fRs for specifying the mapping rule for +local domain names (domain names without any dots in them), and the +default mapping rule. +If +\fItld\fR is ``-'', it matches domain names which do not contain any +dots. +If \fItld\fR is ``.'', it matches any domain names which don't match +to any other mapping rules specified by ``local-map'' entries. +.\" +.SH "MAPFILE FORMAT" +A mapfile defines a set of character mapping rules. It can define +unconditional one-character to N-character-sequence (N can be 0, 1 or more) +mappings. +.PP +A mapfile is a simple text file, and each line specifies a single mapping. +Each line is of the form: +.PP +.RS 4 +.nf +\fIsrc-codepoint\fR\f(CW; \fImapped-codepoint-seq\fR\f(CW;\fR +.fi +.RE +.PP +\fIsrc-codepoint\fR indicates source character of the mapping, and must +be a Unicode codepoint value in hexadecimal string. +\fImapped-codepoint-seq\fR is a sequence of characters which is the +outcome of the mapping, and must be a (possibly empty) list of Unicode +codepoint values in hexadecimal string, separated by spaces. +.PP +Lines which begin with ``#'' are treated as comments and ignored. +.PP +A sample mapfile is shown below. +.PP +.RS 4 +.nf +.ft CW +# map "A" to "a" +0041; 0061; +# map "#" to nothing +0023; ; +# map "@" to "at" +0040; 0061 0074; +.ft R +.fi +.RE +.\" +.SH "LOCAL CODESET" +\fBidn.conf\fR or \fB~/.idnrc\fR doesn't have an entry to specify the +local codeset, since it is determined from the application's current +locale information. +So each application can use different local codeset. +.PP +Although idnkit tries hard to find out the local codeset, sometimes it +fails. For example, there are applications which use non-ASCII codeset +but work in C locale. In this case, you can specify the application's +local codeset by an environment variable ``\fBIDN_LOCAL_CODESET\fR''. +Just set the codeset name (or its alias name) to the variable, and +idnkit will use the codeset as the local one, regardless of the locale +setting. +.\" +.SH "ENCODING-ALIAS-FILE" +Encoding alias file specifies codeset name aliases. It is located on +@sysconfdir@/idnalias.conf and always loaded automatically as idn.conf +and .idnrc. The aliases in this file can be used just as the real names. +.PP +The alias file is a simple text file, consisting of lines of the form: +.PP +.RS 4 +.nf +\fIalias-name\fP\ \fIname\fP +.fi +.RE +.PP +\fIalias-name\fR is the alias name to be defined, and \fIname\fR is +the real name or another alias name. +.\" +.SH "SAMPLE CONFIGURATION" +The following shows a sample configuration file. +.PP +.RS 4 +.ft CW +.nf +# +# a sample configuration. +# + +# Use Punycode as the IDN encoding. +idn-encoding Punycode + +# Use RFC3491 as NAMEPREP. +nameprep RFC3491 + +# Perform Japanese-specific mapping for .jp domain. +# assuming /usr/local/lib/idnkit/jp-map contains the mapping. +local-map .jp filemap:/usr/local/lib/idnkit/jp-map +.fi +.ft R +.RE +.\" +.SH FILES +.I @sysconfdir@/idn.conf +.br +.I ~/.idnrc +.br +.I @sysconfdir@/idnalias.conf +.br +.I @sysconfdir@/idn.conf.sample +\- sample configuration with comments +.br +.I @sysconfdir@/idnalias.conf.sample +\- sample alias file +.\" +.SH "SEE ALSO" +iconv(3) diff --git a/contrib/idn/idnkit-1.0-src/man/libidnkit.3.in b/contrib/idn/idnkit-1.0-src/man/libidnkit.3.in new file mode 100644 index 0000000000..66d756f0af --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/man/libidnkit.3.in @@ -0,0 +1,480 @@ +.\" $Id: libidnkit.3.in,v 1.1 2003/06/04 00:27:15 marka Exp $ +.\" +.\" Copyright (c) 2001,2002 Japan Network Information Center. +.\" All rights reserved. +.\" +.\" By using this file, you agree to the terms and conditions set forth bellow. +.\" +.\" LICENSE TERMS AND CONDITIONS +.\" +.\" The following License Terms and Conditions apply, unless a different +.\" license is obtained from Japan Network Information Center ("JPNIC"), +.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +.\" Chiyoda-ku, Tokyo 101-0047, Japan. +.\" +.\" 1. Use, Modification and Redistribution (including distribution of any +.\" modified or derived work) in source and/or binary forms is permitted +.\" under this License Terms and Conditions. +.\" +.\" 2. Redistribution of source code must retain the copyright notices as they +.\" appear in each source code file, this License Terms and Conditions. +.\" +.\" 3. Redistribution in binary form must reproduce the Copyright Notice, +.\" this License Terms and Conditions, in the documentation and/or other +.\" materials provided with the distribution. For the purposes of binary +.\" distribution the "Copyright Notice" refers to the following language: +.\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +.\" +.\" 4. The name of JPNIC may not be used to endorse or promote products +.\" derived from this Software without specific prior written approval of +.\" JPNIC. +.\" +.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +.\" +.TH libidnkit 3 "Mar 11, 2002" +.\" +.SH NAME +libidnkit, libidnkitlite \- Internationalized Domain Name Handling Libraries +.\" +.SH SYNOPSIS +.nf +#include + +idn_result_t +\fBidn_nameinit\fP(int\ load_file) + +idn_result_t +\fBidn_encodename\fP(int\ actions,\ const\ char\ *from,\ char\ *to,\ size_t\ tolen) + +idn_result_t +\fBidn_decodename\fP(int\ actions,\ const\ char\ *from,\ char\ *to,\ size_t\ tolen) + +idn_result_t +\fBidn_decodename2\fP(int\ actions,\ const\ char\ *from,\ char\ *to,\ size_t\ tolen, + const\ char\ *auxencoding) + +idn_result_t +\fBidn_enable\fP(int\ on_off) + +#include + +char * +\fBidn_result_tostring\fP(idn_result_t\ result) + +.\" +.SH OVERVIEW +The +\fBlibidnkit\fR and \fBlibidnkitlite\fR libraries support various +manipulations of internationalized domain names, including: +.RS 2 +.IP \- 2 +encoding convesion +.IP \- 2 +name preparation +.RE +.PP +They are designed according to IDNA framework where each application must +do necessary preparations for the internationalized domain names before +passing them to the resolver. +.PP +To help applications do the preparation, the libraries provide easy-to-use, +high-level interface for the work. +.PP +Both libraries provide almost the same API. +The difference between them is that \fBlibidnkit\fR internally uses +\fIiconv\fR function to provide encoding conversion from UTF-8 to the +local encoding +(such as iso-8859-1, usually determined by the current locale), and vise +versa. +\fBlibidnkitlite\fR is lightweight version of libidnkit. +It assumes local encoding is UTF-8 so that it never uses \fIiconv\fR. +.PP +This manual describes only a small subset of the API that the libraries +provide, most important functions for application programmers. +For other API, please refer to the idnkit's specification document +(which is not yet available) or the header files typically found under +`/usr/local/include/idn/' on your system. +.\" +.SH DESCRIPTION +.PP +The \fBidn_nameinit\fR function initializes the library. +It also sets default configuration if \fIload_file\fR is 0, otherwise +it tries to read a configuration file. +If \fBidn_nameinit\fR is called more than once, the library initialization +will take place only at the first call while the actual configuration +procedure will occur at every call. +.PP +If there are no errors, \fBidn_nameinit\fR returns \fBidn_success\fR. +Otherwise, the returned value indicates the cause of the error. +See the section ``RETURN VALUES'' below for the error codes. +.PP +Usually you don't have to call this function explicitly because +it is implicitly called when \fBidn_encodename\fR or \fBidn_decodename\fR +is first called without prior calling of \fBidn_nameinit\fR. +In such case, initialization without the configuration file +takes place. +.\" +.PP +\fBidn_encodename\fR function performs name preparation and encoding +conversion on the internationalized domain name specified by \fIfrom\fR, +and stores the result to \fIto\fR, whose length is specified by +\fItolen\fR. +\fIactions\fR is a bitwise-OR of the following macros, specifying which +subprocesses in the encoding process are to be employed. +.RS 2 +.nf +.ft CW +IDN_LOCALCONV Local encoding to UTF-8 conversion +IDN_DELIMMAP Delimiter mapping +IDN_LOCALMAP Local mapping +IDN_NAMEPREP NAMEPREP mapping, normalization, + prohibited character check and bidirectional + string check +IDN_UNASCHECK NAMEPREP unassigned codepoint check +IDN_ASCCHECK ASCII range character check +IDN_IDNCONV UTF-8 to IDN encoding conversion +IDN_LENCHECK Label length check +.ft R +.fi +.RE +.PP +Details of this encoding process can be found in the section ``NAME ENCODING''. +.PP +For convenience, also \fBIDN_ENCODE_QUERY\fR, \fBIDN_ENCODE_APP\fR +and \fBIDN_ENCODE_STORED\fR macros are provided. +\fBIDN_ENCODE_QUERY\fR is used to encode a ``query string'' +(see the IDNA specification). +It is equal to +.RS 4 +.nf +.ft CW +(IDN_LOCALCONV | IDN_DELIMMAP | IDN_LOCALMAP | IDN_NAMEPREP + | IDN_IDNCONV | IDN_LENCHECK) +.ft R +.fi +.RE +.PP +if you are using \fBlibidnkit\fR, and equal to +.RS 4 +.nf +.ft CW +(IDN_DELIMMAP | IDN_LOCALMAP | IDN_NAMEPREP | IDN_IDNCONV + | IDN_LENCHECK) +.ft R +.fi +.RE +.PP +if you are using \fBlibidnkitlite\fR. +.PP +\fBIDN_ENCODE_APP\fR is used for ordinary application to encode a +domain name. +It performs \fBIDN_ASCCHECK\fR in addition with \fBIDN_ENCODE_QUERY\fR. +\fBIDN_ENCODE_STORED\fR is used to encode a ``stored string'' +(see the IDNA specification). +It performs \fBIDN_ENCODE_APP\fR plus \fBIDN_UNASCHECK\fR. +.PP +\fBidn_decodename\fR function performs the reverse of \fBidn_encodename\fR. +It converts the internationalized domain name given by \fIfrom\fR, +which is represented in a special encoding called ACE, +to the application's local codeset and stores into \fIto\fR, +whose length is specified by \fItolen\fR. +As in \fBidn_encodename\fR, \fIactions\fR is a bitwise-OR of the following +macros. +.RS 2 +.nf +.ft CW +IDN_DELIMMAP Delimiter mapping +IDN_NAMEPREP NAMEPREP mapping, normalization, + prohibited character check and bidirectional + string check +IDN_UNASCHECK NAMEPREP unassigned codepoint check +IDN_IDNCONV UTF-8 to IDN encoding conversion +IDN_RTCHECK Round trip check +IDN_ASCCHECK ASCII range character check +IDN_LOCALCONV Local encoding to UTF-8 conversion +.ft R +.fi +.RE +.PP +Details of this decoding process can be found in the section ``NAME DECODING''. +.PP +For convenience, also \fBIDN_DECODE_QUERY\fR, \fBIDN_DECODE_APP\fR +and \fBIDN_DECODE_STORED\fR macros are provided. +\fBIDN_DECODE_QUERY\fR is used to decode a ``qeury string'' +(see the IDNA specification). +It is equal to +.RS 4 +.nf +.ft CW +(IDN_DELIMMAP | IDN_NAMEPREP | IDN_IDNCONV | IDN_RTCHECK + | IDN_LOCALCONV) +.ft R +.fi +.RE +.PP +if you are using \fBlibidnkit\fR, and equal to +.RS 4 +.nf +.ft CW +(IDN_DELIMMAP | IDN_NAMEPREP | IDN_IDNCONV | IDN_RTCHECK) +.ft R +.fi +.RE +.PP +if you are using \fBlibidnkitlite\fR. +.PP +\fBIDN_DECODE_APP\fR is used for ordinary application to decode a +domain name. +It performs \fBIDN_ASCCHECK\fR in addition with \fBIDN_DECODE_QUERY\fR. +\fBIDN_DECODE_STORED\fR is used to decode a ``stored string'' +(see the IDNA specification). +It performs \fBIDN_DECODE_APP\fR plus \fBIDN_UNASCHECK\fR. +.PP +\fBidn_decodename2\fR function provides the same functionality as +\fBidn_decodename\fR except that character encoding of \fIfrom\fR is +supposed to be \fIauxencoding\fR. +If IDN encoding is Punycode and \fIauxencoding\fR is ISO 8859-2 +for example, it is assumed that the Punycode string stored in +\fIfrom\fR is written in ISO 8859-2. +.PP +In the IDN decode procedure, \fBIDN_NAMEPREP\fR is done before +\fBIDN_IDNCONV\fR, and some non-ASCII characters are converted to +ASCII characters as the result of \fBIDN_NAMEPREP\fR. +Therefore, ACE string given by \fBfrom\fR may contains those non-ASCII +characters. +That is the reason \fBdocode_name2\fR exists. +.PP +All of the functions above return error code of type \fBidn_result_t\fR. +All codes other than \fBidn_success\fR indicates some kind of failure. +\fBidn_result_tostring\fR function takes an error code \fIresult\fR +and returns a pointer to the corresponding message string. +.\" +.SH "NAME ENCODING" +Name encoding is a process that transforms the specified +internationalized domain name to a certain string suitable for name +resolution. +For each label in a given domain name, the encoding processor performs: +.\" +.IP "(1) Convert to UTF-8 (IDN_LOCALCONV)" +Convert the encoding of the given domain name from application's local +encoding (e.g. ISO-8859-1) to UTF-8. +Note that \fBlibidnkitlite\fR doesn't support this step. +.\" +.IP "(2) Delimiter mapping (IDN_DELIMMAP)" +Map domain name delimiters to `.' (U+002E). +The recoginzed delimiters are: U+3002 (ideographic full stop), +U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic full stop). +.\" +.IP "(3) Local mapping (IDN_LOCALMAP)" +Apply character mapping whose rule is determined by the TLD of the name. +.\" +.IP "(4) NAMEPREP (IDN_NAMEPREP, IDN_UNASCHECK)" +Perform name preparation (NAMEPREP), which is a standard process for +name canonicalizaion of internationalized domain names. +.br +NAMEPREP consists of 5 steps: +mapping, normalization, prohibited character check, bidirectional +text check and unassigned codepoint check. +The first four steps are done by IDN_NAMEPREP, and the last step is +done by IDN_UNASCHECK. +.\" +.IP "(5) ASCII range character check (IDN_ASCCHECK)" +Checks if the domain name contains non-LDH ASCII character (not +alpha-numeric or hyphen), or it begins or end with hyphen. +.\" +.IP "(6) Convert to ACE (IDN_IDNCONV)" +Convert the NAMEPREPed name to a special encoding designed for representing +internationalized domain names. +.br +The encoding is also known as ACE (ASCII Compatible Encoding) since +a string in the encoding is just like a traditional ASCII domain name +consisting of only letters, numbers and hyphens. +.\" +.IP "(7) Label length check (IDN_LENCHECK)" +For each label, check the number of characters in it. +It must be in the range 1 to 63. +.PP +There are many configuration parameters for this process, such as the +ACE or the local mapping rules. These parameters are read from the +default idnkit's configuration file, \fBidn.conf\fR. +See idn.conf(5) for details. +.\" +.SH "NAME DECODING" +Name decoding is a reverse process of the name encoding. +It transforms the specified +internationalized domain name in a special encoding suitable for name +resolution to the normal name string in the application's current codeset. +However, name encoding and name decoding are not symmetric. +.PP +For each label in a given domain name, the decoding processor performs: +.\" +.IP "(1) Delimiter mapping (IDN_DELIMMAP)" +Map domain name delimiters to `.' (U+002E). +The recoginzed delimiters are: U+3002 (ideographic full stop), +U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic full stop). +.\" +.IP "(2) NAMEPREP (IDN_NAMEPREP, IDN_UNASCHECK)" +Perform name preparation (NAMEPREP), which is a standard process for +name canonicalizaion of internationalized domain names. +.\" +.IP "(3) Convert to UTF-8 (IDN_IDNCONV)" +Convert the encoding of the given domain name from ACE to UTF-8. +.\" +.IP "(4) Round trip check (IDN_RTCHECK)" +Encode the result of (3) using the ``NAME ENCODING'' scheme, and then +compare it with the result of the step (2). +If they are different, the check is failed. +If IDN_UNASCHECK, IDN_ASCCHECK or both are specified, also they are +done in the encoding processes. +.\" +.IP "(5) Convert to local encoding" +Convert the result of (3) from UTF-8 to the application's local +encoding (e.g. ISO-8859-1). +Note that \fBlibidnkitlite\fR doesn't support this step. +.PP +If prohibited character check, unassigned codepoint check or +bidirectional text check at step (2) is failed, or round trip check +at step (4) is failed, the original input label is returned. +.PP +The configuration parameters for this process, +are also read from the configuration file \fBidn.conf\fR. +.\" +.SH "IDN_DISABLE" +If the \fBIDN_DISABLE\fR environ variable is defined at run-time, +the libraries disable internationalized domain name support, by default. +In this case, \fBidn_encodename\fR and \fBidn_decodename\fR don't +encode/decode an input name, but instead they simply ouput a copy +of the input name as the result of encoding/decoding. +.PP +If your application should always enable mulitilingual domain name +support regardless of definition of \fBIDN_DISABLE\fR, call +.RS 4 +.nf +.ft CW +idn_enable(1) +.ft R +.fi +.RE +.PP +before performing encoding/decoding. +.\" +.SH "RETURN VALUES" +Most of the API functions return values of type \fBidn_result_t\fR in +order to indicate the status of the call. + +The following is a complete list of the status codes. Note that some +of them are never returned by the functions described in this manual. +.TP 15 +.SB idn_success +Not an error. The call succeeded. +.TP +.SB idn_notfound +Specified information does not exist. +.TP +.SB idn_invalid_encoding +The encoding of the specified string is invalid. +.TP +.SB idn_invalid_syntax +There is a syntax error in the configuration file. +.TP +.SB idn_invalid_name +The specified name is not valid. +.TP +.SB idn_invalid_message +The specified DNS message is not valid. +.TP +.SB idn_invalid_action +The specified action contains invalid flags. +.TP +.SB idn_invalid_codepoint +The specified Unicode code point value is not valid. +.TP +.SB idn_invalid_length +The number of characters in an ACE label is not in the range 1 to 63. +.TP +.SB idn_buffer_overflow +The specified buffer is too small to hold the result. +.TP +.SB idn_noentry +The specified key does not exist in the hash table. +.TP +.SB idn_nomemory +Memory allocation using malloc failed. +.TP +.SB idn_nofile +The specified file could not be opened. +.TP +.SB idn_nomapping +Some characters do not have the mapping to the target character set. +.TP +.SB idn_context_required +Context information is required. +.TP +.SB idn_prohibited +The specified string contains some prohibited characters. +.TP +.SB idn_failure +Generic error which is not covered by the above codes. +.\" +.SH EXAMPLES +To get the address of a internationalized domain name in the application's +local codeset, use \fBidn_encodename\fR to convert the name to the format +suitable for passing to resolver functions. +.RS 4 +.nf +.ft CW +idn_result_t r; +char ace_name[256]; +struct hostent *hp; + +\&... +r = idn_encodename(IDN_ENCODE_APP, name, ace_name, + sizeof(ace_name)); +if (r != idn_success) { + fprintf(stderr, "idn_encodename failed: %s\en", + idn_result_tostring(r)); + exit(1); +} + +hp = gethostbyname(ace_name); +\&... +.ft R +.fi +.RE +.PP +To decode the internationalized domain name returned from a resolver function, +use \fBidn_decodename\fR. +.RS 4 +.nf +.ft CW +idn_result_t r; +char local_name[256]; +struct hostent *hp; + +\&... +hp = gethostbyname(name); +r = idn_decodename(IDN_DECODE_APP, hp->h_name, local_name, + sizeof(local_name)); +if (r != idn_success) { + fprintf(stderr, "idn_decodename failed: %s\en", + idn_result_tostring(r)); + exit(1); +} +printf("name: %s\en", local_name); +\&... +.ft R +.fi +.RE +.\" +.SH "SEE ALSO" +idn.conf(5) diff --git a/contrib/idn/idnkit-1.0-src/map/Makefile.in b/contrib/idn/idnkit-1.0-src/map/Makefile.in new file mode 100644 index 0000000000..b986a6a5ff --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/map/Makefile.in @@ -0,0 +1,75 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:27:55 marka Exp $ +# +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +top_builddir = .. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +datadir = @datadir@ +mapdir = $(datadir)/idnkit + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ + +MAPS = jp.map + +all: + +install: + $(MKINSTALLDIRS) $(DESTDIR)$(mapdir) + for map in $(MAPS); do \ + $(INSTALL_DATA) $(srcdir)/$$map $(DESTDIR)$(mapdir)/$$map; \ + done + +clean: + rm -f *~ + +distclean: clean + rm -f Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/map/jp.map b/contrib/idn/idnkit-1.0-src/map/jp.map new file mode 100644 index 0000000000..3d98ccec08 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/map/jp.map @@ -0,0 +1,50 @@ +# $Id: jp.map,v 1.1 2003/06/04 00:27:55 marka Exp $ +# Copyright (c) 2001 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +# +# Local map table for JP domain. +# + +# version=1.0 + +2212; FF0D +309B; 3099 +309C; 309A diff --git a/contrib/idn/idnkit-1.0-src/mkinstalldirs b/contrib/idn/idnkit-1.0-src/mkinstalldirs new file mode 100755 index 0000000000..6e12439fc6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2003/06/04 00:25:33 marka Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.1-patch b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.1-patch new file mode 100644 index 0000000000..db98d6c96c --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.1-patch @@ -0,0 +1,5900 @@ +IDN patch for bind-9.2.1 +======================== + + +This is a patch file for ISC BIND 9.2.1 to make it work with +internationalized domain names. With this patch you'll get IDN-aware +dig/host/nslookup. + +To apply this patch, you should go to the top directory of the BIND +distribution (where you see `README' file), then invoke `patch' +command like this: + + % patch -p0 < this-file + +Then follow the instructions described in `README.idnkit' to compile +and install. + + +Index: README.idnkit +diff -c /dev/null mdn/othersrc/bind9/README.idnkit:1.2 +*** README.idnkit Mon May 27 16:53:24 2002 +--- README.idnkit Tue Mar 26 16:35:05 2002 +*************** +*** 0 **** +--- 1,113 ---- ++ ++ BIND-9 IDN patch ++ ++ Japan Network Information Center (JPNIC) ++ ++ ++ * What is this patch for? ++ ++ This patch adds internationalized domain name (IDN) support to BIND-9. ++ You'll get internationalized version of dig/host/nslookup commands. ++ ++ + internationalized dig/host/nslookup ++ dig/host/nslookup accepts non-ASCII domain names in the local ++ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by ++ the locale information. The domain names are normalized and ++ converted to the encoding on the DNS protocol, and sent to DNS ++ servers. The replies are converted back to the local codeset ++ and displayed. ++ ++ ++ * Compilation & installation ++ ++ 0. Prerequisite ++ ++ You have to build and install idnkit before building this patched version ++ of bind-9. ++ ++ 1. Running configure script ++ ++ Run `configure' in the top directory. See `README' for the ++ configuration options. ++ ++ This patch adds the following 4 options to `configure'. You should ++ at least specify `--with-idn' option to enable IDN support. ++ ++ --with-idn[=IDN_PREFIX] ++ To enable IDN support, you have to specify `--with-idn' option. ++ The argument IDN_PREFIX is the install prefix of idnkit. If ++ IDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') ++ is assumed. ++ ++ --with-libiconv[=LIBICONV_PREFIX] ++ Specify this option if idnkit you have installed links GNU ++ libiconv. The argument LIBICONV_PREFIX is install prefix of ++ GNU libiconv. If the argument is omitted, PREFIX (derived ++ from `--prefix=PREFIX') is assumed. ++ ++ `--with-libiconv' is shorthand option for GNU libiconv. ++ ++ --with-libiconv=/usr/local ++ ++ This is equivalent to: ++ ++ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' ++ ++ `--with-libiconv' assumes that your C compiler has `-R' ++ option, and that the option adds the specified run-time path ++ to an exacutable binary. If `-R' option of your compiler has ++ different meaning, or your compiler lacks the option, you ++ should use `--with-iconv' option instead. Binary command ++ without run-time path information might be unexecutable. ++ In that case, you would see an error message like: ++ ++ error in loading shared libraries: libiconv.so.2: cannot ++ open shared object file ++ ++ If both `--with-libiconv' and `--with-iconv' options are ++ specified, `--with-iconv' is prior to `--with-libiconv'. ++ ++ --with-iconv=ICONV_LIBSPEC ++ If your libc doens't provide iconv(), you need to specify the ++ library containing iconv() with this option. `ICONV_LIBSPEC' ++ is the argument(s) to `cc' or `ld' to link the library, for ++ example, `--with-iconv="-L/usr/local/lib -liconv"'. ++ You don't need to specify the header file directory for "iconv.h" ++ to the compiler, as it isn't included directly by bind-9 with ++ this patch. ++ ++ --with-idnlib=IDN_LIBSPEC ++ With this option, you can explicitly specify the argument(s) ++ to `cc' or `ld' to link the idnkit's library, `libidnkit'. If ++ this option is not specified, `-L${PREFIX}/lib -lidnkit' is ++ assumed, where ${PREFIX} is the installation prefix specified ++ with `--with-idn' option above. You may need to use this ++ option to specify extra argments, for example, ++ `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'. ++ ++ Please consult `README' for other configuration options. ++ ++ Note that if you want to specify some extra header file directories, ++ you should use the environment variable STD_CINCLUDES instead of ++ CFLAGS, as described in README. ++ ++ 2. Compilation and installation ++ ++ After running "configure", just do ++ ++ make ++ make install ++ ++ for compiling and installing. ++ ++ ++ * Contact information ++ ++ Please see http//www.nic.ad.jp/jp/research/mdn/ for the latest news ++ about idnkit and this patch. ++ ++ Bug reports and comments on this kit should be sent to ++ mdnkit-bugs@nic.ad.jp and mdn-cmt@nic.ad.jp, respectively. ++ ++ ++ ; $Id: bind-9.2.1-patch,v 1.1 2003/06/04 00:27:30 marka Exp $ +Index: config.h.in +diff -c mdn/othersrc/bind9/config.h.in:1.1.1.6 mdn/othersrc/bind9/config.h.in:1.12 +*** config.h.in Tue Nov 27 16:55:45 2001 +--- config.h.in Tue Mar 19 16:45:35 2002 +*************** +*** 141,146 **** +--- 141,149 ---- + /* define if you have strerror in the C library. */ + #undef HAVE_STRERROR + ++ /* Define if you have the setlocale function. */ ++ #undef HAVE_SETLOCALE ++ + /* Define if you have the header file. */ + #undef HAVE_DLFCN_H + +*************** +*** 150,155 **** +--- 153,161 ---- + /* Define if you have the header file. */ + #undef HAVE_LINUX_CAPABILITY_H + ++ /* Define if you have the header file. */ ++ #undef HAVE_LOCALE_H ++ + /* Define if you have the header file. */ + #undef HAVE_SYS_PRCTL_H + +*************** +*** 176,178 **** +--- 182,188 ---- + + /* Define if you have the socket library (-lsocket). */ + #undef HAVE_LIBSOCKET ++ ++ /* define if idnkit support is to be included. */ ++ #undef WITH_IDN ++ +Index: configure +diff -c mdn/othersrc/bind9/configure:1.1.1.9 mdn/othersrc/bind9/configure:1.15 +*** configure Wed May 22 17:14:53 2002 +--- configure Mon May 27 12:10:14 2002 +*************** +*** 369,374 **** +--- 369,382 ---- + --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]" + ac_help="$ac_help + --disable-linux-caps disable linux capabilities" ++ ac_help="$ac_help ++ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]" ++ ac_help="$ac_help ++ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]" ++ ac_help="$ac_help ++ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]" ++ ac_help="$ac_help ++ --with-idnlib=ARG specify libidnkit" + + # Initialize some variables set by options. + # The variables have the same names as the options, with +*************** +*** 911,917 **** + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +! echo "configure:915: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +--- 919,925 ---- + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 +! echo "configure:923: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in +*************** +*** 933,939 **** + + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +! echo "configure:937: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 941,947 ---- + + + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +! echo "configure:945: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 962,968 **** + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:966: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 970,976 ---- + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:974: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1001,1007 **** + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +! echo "configure:1005: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 1009,1015 ---- + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +! echo "configure:1013: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 1062,1068 **** + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1066: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1070,1076 ---- + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1074: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1121,1127 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1125: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1129,1135 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1133: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1163,1169 **** + # + if test "X$ETAGS" != "X"; then + echo $ac_n "checking for Exuberant Ctags etags""... $ac_c" 1>&6 +! echo "configure:1167: checking for Exuberant Ctags etags" >&5 + if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then + echo "$ac_t""yes" 1>&6 + ETAGS="$ETAGS -L" +--- 1171,1177 ---- + # + if test "X$ETAGS" != "X"; then + echo $ac_n "checking for Exuberant Ctags etags""... $ac_c" 1>&6 +! echo "configure:1175: checking for Exuberant Ctags etags" >&5 + if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then + echo "$ac_t""yes" 1>&6 + ETAGS="$ETAGS -L" +*************** +*** 1181,1187 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1185: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1189,1195 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1193: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1328,1334 **** + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1332: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1336,1342 ---- + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1340: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1358,1364 **** + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1362: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1366,1372 ---- + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1370: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1409,1415 **** + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1413: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1417,1423 ---- + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:1421: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1441,1447 **** + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +! echo "configure:1445: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +--- 1449,1455 ---- + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +! echo "configure:1453: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +*************** +*** 1452,1463 **** + + cat > conftest.$ac_ext << EOF + +! #line 1456 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +! if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +--- 1460,1471 ---- + + cat > conftest.$ac_ext << EOF + +! #line 1464 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +! if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +*************** +*** 1483,1494 **** + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +! echo "configure:1487: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +! echo "configure:1492: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1491,1502 ---- + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +! echo "configure:1495: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +! echo "configure:1500: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1497,1503 **** + yes; + #endif + EOF +! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +--- 1505,1511 ---- + yes; + #endif + EOF +! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +*************** +*** 1516,1522 **** + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +! echo "configure:1520: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 1524,1530 ---- + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +! echo "configure:1528: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 1549,1555 **** + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +! echo "configure:1553: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +--- 1557,1563 ---- + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +! echo "configure:1561: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +*************** +*** 1564,1576 **** + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +--- 1572,1584 ---- + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +*************** +*** 1581,1593 **** + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +--- 1589,1601 ---- + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +*************** +*** 1598,1610 **** + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +--- 1606,1618 ---- + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +*************** +*** 1629,1640 **** + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +! echo "configure:1633: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +--- 1637,1648 ---- + echo "$ac_t""$CPP" 1>&6 + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +! echo "configure:1641: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +*************** +*** 1642,1648 **** + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 1650,1656 ---- + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 1659,1665 **** + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +--- 1667,1673 ---- + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +*************** +*** 1677,1683 **** + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +--- 1685,1691 ---- + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +*************** +*** 1698,1704 **** + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +--- 1706,1712 ---- + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +*************** +*** 1709,1715 **** + exit (0); } + + EOF +! if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +--- 1717,1723 ---- + exit (0); } + + EOF +! if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +*************** +*** 1737,1753 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:1741: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 1745,1761 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:1749: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 1775,1786 **** + + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +! echo "configure:1779: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:1787: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +--- 1837,1843 ---- + + ; return 0; } + EOF +! if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +*************** +*** 1850,1870 **** + fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +! echo "configure:1854: checking for inline" >&5 + if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +--- 1858,1878 ---- + fi + + echo $ac_n "checking for inline""... $ac_c" 1>&6 +! echo "configure:1862: checking for inline" >&5 + if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break + else +*************** +*** 1890,1901 **** + esac + + echo $ac_n "checking for sysctlbyname""... $ac_c" 1>&6 +! echo "configure:1894: checking for sysctlbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:1902: checking for sysctlbyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysctlbyname=yes" + else +--- 1926,1932 ---- + + ; return 0; } + EOF +! if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysctlbyname=yes" + else +*************** +*** 1946,1954 **** + # is reported to not support "static inline" (RT #1212). + # + echo $ac_n "checking for static inline breakage""... $ac_c" 1>&6 +! echo "configure:1950: checking for static inline breakage" >&5 + cat > conftest.$ac_ext <&6 +! echo "configure:1958: checking for static inline breakage" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""no" 1>&6 + else +--- 1973,1979 ---- + + ; return 0; } + EOF +! if { (eval echo configure:1977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""no" 1>&6 + else +*************** +*** 1981,1992 **** + rm -f conftest* + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +! echo "configure:1985: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +--- 1989,2000 ---- + rm -f conftest* + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +! echo "configure:1993: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +*************** +*** 2014,2025 **** + fi + + echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +! echo "configure:2018: checking for ssize_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +--- 2022,2033 ---- + fi + + echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +! echo "configure:2026: checking for ssize_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +*************** +*** 2047,2058 **** + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +! echo "configure:2051: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +--- 2055,2066 ---- + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +! echo "configure:2059: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +*************** +*** 2061,2067 **** + struct tm *tp; + ; return 0; } + EOF +! if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +--- 2069,2075 ---- + struct tm *tp; + ; return 0; } + EOF +! if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +*************** +*** 2082,2097 **** + fi + + echo $ac_n "checking for long long""... $ac_c" 1>&6 +! echo "configure:2086: checking for long long" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" +--- 2090,2105 ---- + fi + + echo $ac_n "checking for long long""... $ac_c" 1>&6 +! echo "configure:2094: checking for long long" >&5 + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" +*************** +*** 2111,2119 **** + case $ac_cv_header_unistd_h in + yes) + echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 +! echo "configure:2115: checking if unistd.h defines fd_set" >&5 + cat > conftest.$ac_ext < +--- 2119,2127 ---- + case $ac_cv_header_unistd_h in + yes) + echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 +! echo "configure:2123: checking if unistd.h defines fd_set" >&5 + cat > conftest.$ac_ext < +*************** +*** 2121,2127 **** + fd_set read_set; return (0); + ; return 0; } + EOF +! if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" +--- 2129,2135 ---- + fd_set read_set; return (0); + ; return 0; } + EOF +! if { (eval echo configure:2133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" +*************** +*** 2163,2176 **** + # Find the machine's endian flavor. + # + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +! echo "configure:2167: checking whether byte ordering is bigendian" >&5 + if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_bigendian=unknown + # See if sys/param.h defines the BYTE_ORDER macro. + cat > conftest.$ac_ext < + #include +--- 2171,2184 ---- + # Find the machine's endian flavor. + # + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +! echo "configure:2175: checking whether byte ordering is bigendian" >&5 + if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_cv_c_bigendian=unknown + # See if sys/param.h defines the BYTE_ORDER macro. + cat > conftest.$ac_ext < + #include +*************** +*** 2181,2191 **** + #endif + ; return 0; } + EOF +! if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. + cat > conftest.$ac_ext < + #include +--- 2189,2199 ---- + #endif + ; return 0; } + EOF +! if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. + cat > conftest.$ac_ext < + #include +*************** +*** 2196,2202 **** + #endif + ; return 0; } + EOF +! if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes + else +--- 2204,2210 ---- + #endif + ; return 0; } + EOF +! if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes + else +*************** +*** 2216,2222 **** + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + else + cat > conftest.$ac_ext <&2; exit 1; } + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_bigendian=no + else +--- 2237,2243 ---- + exit (u.c[sizeof (long) - 1] == 1); + } + EOF +! if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_c_bigendian=no + else +*************** +*** 2257,2263 **** + # was --with-openssl specified? + # + echo $ac_n "checking for OpenSSL library""... $ac_c" 1>&6 +! echo "configure:2261: checking for OpenSSL library" >&5 + # Check whether --with-openssl or --without-openssl was given. + if test "${with_openssl+set}" = set; then + withval="$with_openssl" +--- 2265,2271 ---- + # was --with-openssl specified? + # + echo $ac_n "checking for OpenSSL library""... $ac_c" 1>&6 +! echo "configure:2269: checking for OpenSSL library" >&5 + # Check whether --with-openssl or --without-openssl was given. + if test "${with_openssl+set}" = set; then + withval="$with_openssl" +*************** +*** 2298,2304 **** + echo "$ac_t""using openssl from $use_openssl/lib and $use_openssl/include" 1>&6 + + echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 +! echo "configure:2302: checking OpenSSL library version" >&5 + saved_cflags="$CFLAGS" + saved_libs="$LIBS" + CFLAGS="$CFLAGS $DST_OPENSSL_INC" +--- 2306,2312 ---- + echo "$ac_t""using openssl from $use_openssl/lib and $use_openssl/include" 1>&6 + + echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 +! echo "configure:2310: checking OpenSSL library version" >&5 + saved_cflags="$CFLAGS" + saved_libs="$LIBS" + CFLAGS="$CFLAGS $DST_OPENSSL_INC" +*************** +*** 2307,2313 **** + echo "$ac_t""assuming target platform has compatible version" 1>&6 + else + cat > conftest.$ac_ext < +--- 2315,2321 ---- + echo "$ac_t""assuming target platform has compatible version" 1>&6 + else + cat > conftest.$ac_ext < +*************** +*** 2322,2328 **** + } + + EOF +! if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""ok" 1>&6 + else +--- 2330,2336 ---- + } + + EOF +! if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""ok" 1>&6 + else +*************** +*** 2387,2393 **** + # was --with-randomdev specified? + # + echo $ac_n "checking for random device""... $ac_c" 1>&6 +! echo "configure:2391: checking for random device" >&5 + # Check whether --with-randomdev or --without-randomdev was given. + if test "${with_randomdev+set}" = set; then + withval="$with_randomdev" +--- 2395,2401 ---- + # was --with-randomdev specified? + # + echo $ac_n "checking for random device""... $ac_c" 1>&6 +! echo "configure:2399: checking for random device" >&5 + # Check whether --with-randomdev or --without-randomdev was given. + if test "${with_randomdev+set}" = set; then + withval="$with_randomdev" +*************** +*** 2411,2417 **** + + ac_safe=`echo "$devrandom" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $devrandom""... $ac_c" 1>&6 +! echo "configure:2415: checking for $devrandom" >&5 + if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 2419,2425 ---- + + ac_safe=`echo "$devrandom" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $devrandom""... $ac_c" 1>&6 +! echo "configure:2423: checking for $devrandom" >&5 + if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 2463,2469 **** + # + + echo $ac_n "checking whether to build with thread support""... $ac_c" 1>&6 +! echo "configure:2467: checking whether to build with thread support" >&5 + + case $host in + *-dec-osf*) +--- 2471,2477 ---- + # + + echo $ac_n "checking whether to build with thread support""... $ac_c" 1>&6 +! echo "configure:2475: checking whether to build with thread support" >&5 + + case $host in + *-dec-osf*) +*************** +*** 2551,2557 **** + # experiment with it. + CC="gcc" + echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 +! echo "configure:2555: checking which NetBSD thread library to use" >&5 + + # Check whether --with-ptl2 or --without-ptl2 was given. + if test "${with_ptl2+set}" = set; then +--- 2559,2565 ---- + # experiment with it. + CC="gcc" + echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 +! echo "configure:2563: checking which NetBSD thread library to use" >&5 + + # Check whether --with-ptl2 or --without-ptl2 was given. + if test "${with_ptl2+set}" = set; then +*************** +*** 2590,2596 **** + ;; + *) + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +! echo "configure:2594: checking for pthread_create in -lpthread" >&5 + ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2598,2604 ---- + ;; + *) + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +! echo "configure:2602: checking for pthread_create in -lpthread" >&5 + ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2598,2604 **** + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2617,2623 ---- + pthread_create() + ; return 0; } + EOF +! if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2635,2641 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 +! echo "configure:2639: checking for __pthread_create in -lpthread" >&5 + ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2643,2649 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 +! echo "configure:2647: checking for __pthread_create in -lpthread" >&5 + ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2643,2649 **** + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2662,2668 ---- + __pthread_create() + ; return 0; } + EOF +! if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2680,2686 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 +! echo "configure:2684: checking for __pthread_create_system in -lpthread" >&5 + ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2688,2694 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 +! echo "configure:2692: checking for __pthread_create_system in -lpthread" >&5 + ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2688,2694 **** + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2707,2713 ---- + __pthread_create_system() + ; return 0; } + EOF +! if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2725,2731 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +! echo "configure:2729: checking for pthread_create in -lc_r" >&5 + ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2733,2739 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +! echo "configure:2737: checking for pthread_create in -lc_r" >&5 + ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2733,2739 **** + ac_save_LIBS="$LIBS" + LIBS="-lc_r $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2752,2758 ---- + pthread_create() + ; return 0; } + EOF +! if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2770,2776 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +! echo "configure:2774: checking for pthread_create in -lc" >&5 + ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2778,2784 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +! echo "configure:2782: checking for pthread_create in -lc" >&5 + ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2778,2784 **** + ac_save_LIBS="$LIBS" + LIBS="-lc $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2797,2803 ---- + pthread_create() + ; return 0; } + EOF +! if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2835,2841 **** + # We'd like to use sigwait() too + # + echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 +! echo "configure:2839: checking for sigwait in -lc" >&5 + ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2843,2849 ---- + # We'd like to use sigwait() too + # + echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 +! echo "configure:2847: checking for sigwait in -lc" >&5 + ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2843,2849 **** + ac_save_LIBS="$LIBS" + LIBS="-lc $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2862,2868 ---- + sigwait() + ; return 0; } + EOF +! if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2876,2882 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 +! echo "configure:2880: checking for sigwait in -lpthread" >&5 + ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2884,2890 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 +! echo "configure:2888: checking for sigwait in -lpthread" >&5 + ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2884,2890 **** + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2903,2909 ---- + sigwait() + ; return 0; } + EOF +! if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2917,2923 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 +! echo "configure:2921: checking for _Psigwait in -lpthread" >&5 + ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 2925,2931 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 +! echo "configure:2929: checking for _Psigwait in -lpthread" >&5 + ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 2925,2931 **** + ac_save_LIBS="$LIBS" + LIBS="-lpthread $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 2944,2950 ---- + _Psigwait() + ; return 0; } + EOF +! if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 2966,2977 **** + + + echo $ac_n "checking for pthread_attr_getstacksize""... $ac_c" 1>&6 +! echo "configure:2970: checking for pthread_attr_getstacksize" >&5 + if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:2978: checking for pthread_attr_getstacksize" >&5 + if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_pthread_attr_getstacksize=yes" + else +--- 3002,3008 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_pthread_attr_getstacksize=yes" + else +*************** +*** 3026,3032 **** + # + *-freebsd*) + echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 +! echo "configure:3030: checking for sigwait in -lc_r" >&5 + ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 3034,3040 ---- + # + *-freebsd*) + echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 +! echo "configure:3038: checking for sigwait in -lc_r" >&5 + ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 3034,3040 **** + ac_save_LIBS="$LIBS" + LIBS="-lc_r $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 3053,3059 ---- + sigwait() + ; return 0; } + EOF +! if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 3100,3111 **** + EOF + + echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 +! echo "configure:3104: checking for pthread_setconcurrency" >&5 + if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3112: checking for pthread_setconcurrency" >&5 + if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_pthread_setconcurrency=yes" + else +--- 3136,3142 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_pthread_setconcurrency=yes" + else +*************** +*** 3166,3177 **** + # Look for sysconf to allow detection of the number of processors. + # + echo $ac_n "checking for sysconf""... $ac_c" 1>&6 +! echo "configure:3170: checking for sysconf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3178: checking for sysconf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysconf=yes" + else +--- 3202,3208 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sysconf=yes" + else +*************** +*** 3275,3286 **** + # be defined. + # + echo $ac_n "checking for flockfile""... $ac_c" 1>&6 +! echo "configure:3279: checking for flockfile" >&5 + if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3287: checking for flockfile" >&5 + if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_flockfile=yes" + else +--- 3311,3317 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_flockfile=yes" + else +*************** +*** 3326,3337 **** + fi + + echo $ac_n "checking for getc_unlocked""... $ac_c" 1>&6 +! echo "configure:3330: checking for getc_unlocked" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getc_unlocked'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3338: checking for getc_unlocked" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getc_unlocked'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getc_unlocked=yes" + else +--- 3362,3368 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getc_unlocked=yes" + else +*************** +*** 3381,3387 **** + # Indicate what the final decision was regarding threads. + # + echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 +! echo "configure:3385: checking whether to build with threads" >&5 + if $use_threads; then + echo "$ac_t""yes" 1>&6 + else +--- 3389,3395 ---- + # Indicate what the final decision was regarding threads. + # + echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 +! echo "configure:3393: checking whether to build with threads" >&5 + if $use_threads; then + echo "$ac_t""yes" 1>&6 + else +*************** +*** 3457,3468 **** + # NLS + # + echo $ac_n "checking for catgets""... $ac_c" 1>&6 +! echo "configure:3461: checking for catgets" >&5 + if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3469: checking for catgets" >&5 + if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_catgets=yes" + else +--- 3493,3499 ---- + + ; return 0; } + EOF +! if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_catgets=yes" + else +*************** +*** 3523,3529 **** + ;; + *) + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +! echo "configure:3527: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 3531,3537 ---- + ;; + *) + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +! echo "configure:3535: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 3531,3537 **** + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 3550,3556 ---- + socket() + ; return 0; } + EOF +! if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 3570,3576 **** + fi + + echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 +! echo "configure:3574: checking for inet_ntoa in -lnsl" >&5 + ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 3578,3584 ---- + fi + + echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 +! echo "configure:3582: checking for inet_ntoa in -lnsl" >&5 + ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 3578,3584 **** + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 3597,3603 ---- + inet_ntoa() + ; return 0; } + EOF +! if { (eval echo configure:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 3623,3629 **** + # Purify support + # + echo $ac_n "checking whether to use purify""... $ac_c" 1>&6 +! echo "configure:3627: checking whether to use purify" >&5 + # Check whether --with-purify or --without-purify was given. + if test "${with_purify+set}" = set; then + withval="$with_purify" +--- 3631,3637 ---- + # Purify support + # + echo $ac_n "checking whether to use purify""... $ac_c" 1>&6 +! echo "configure:3635: checking whether to use purify" >&5 + # Check whether --with-purify or --without-purify was given. + if test "${with_purify+set}" = set; then + withval="$with_purify" +*************** +*** 3640,3646 **** + # Extract the first word of "purify", so it can be a program name with args. + set dummy purify; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3644: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_purify_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3648,3654 ---- + # Extract the first word of "purify", so it can be a program name with args. + set dummy purify; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:3652: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_purify_path'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3717,3728 **** + case $use_libtool in + yes) + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +! echo "configure:3721: checking for Cygwin environment" >&5 + if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:3729: checking for Cygwin environment" >&5 + if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes + else +--- 3741,3747 ---- + return __CYGWIN__; + ; return 0; } + EOF +! if { (eval echo configure:3745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes + else +*************** +*** 3750,3768 **** + CYGWIN= + test "$ac_cv_cygwin" = yes && CYGWIN=yes + echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +! echo "configure:3754: checking for mingw32 environment" >&5 + if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes + else +--- 3758,3776 ---- + CYGWIN= + test "$ac_cv_cygwin" = yes && CYGWIN=yes + echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +! echo "configure:3762: checking for mingw32 environment" >&5 + if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes + else +*************** +*** 3848,3854 **** + fi + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +! echo "configure:3852: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +--- 3856,3862 ---- + fi + + echo $ac_n "checking build system type""... $ac_c" 1>&6 +! echo "configure:3860: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in +*************** +*** 3877,3883 **** + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +! echo "configure:3881: checking for ld used by GCC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +--- 3885,3891 ---- + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +! echo "configure:3889: checking for ld used by GCC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw +*************** +*** 3907,3916 **** + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +! echo "configure:3911: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +! echo "configure:3914: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 3915,3924 ---- + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +! echo "configure:3919: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +! echo "configure:3922: checking for non-GNU ld" >&5 + fi + if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 3945,3951 **** + fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +! echo "configure:3949: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3953,3959 ---- + fi + test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +! echo "configure:3957: checking if the linker ($LD) is GNU ld" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3962,3968 **** + + + echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +! echo "configure:3966: checking for $LD option to reload object files" >&5 + if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3970,3976 ---- + + + echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +! echo "configure:3974: checking for $LD option to reload object files" >&5 + if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 3974,3980 **** + test -n "$reload_flag" && reload_flag=" $reload_flag" + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +! echo "configure:3978: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 3982,3988 ---- + test -n "$reload_flag" && reload_flag=" $reload_flag" + + echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +! echo "configure:3986: checking for BSD-compatible nm" >&5 + if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4012,4018 **** + echo "$ac_t""$NM" 1>&6 + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +! echo "configure:4016: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4020,4026 ---- + echo "$ac_t""$NM" 1>&6 + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +! echo "configure:4024: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4033,4039 **** + fi + + echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +! echo "configure:4037: checking how to recognise dependant libraries" >&5 + if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4041,4047 ---- + fi + + echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +! echo "configure:4045: checking how to recognise dependant libraries" >&5 + if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4206,4218 **** + deplibs_check_method=$lt_cv_deplibs_check_method + + echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +! echo "configure:4210: checking for object suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + rm -f conftest* + echo 'int i = 1;' > conftest.$ac_ext +! if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; +--- 4214,4226 ---- + deplibs_check_method=$lt_cv_deplibs_check_method + + echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +! echo "configure:4218: checking for object suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + rm -f conftest* + echo 'int i = 1;' > conftest.$ac_ext +! if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; +*************** +*** 4232,4238 **** + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +! echo "configure:4236: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4240,4246 ---- + + + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +! echo "configure:4244: checking for executable suffix" >&5 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4242,4251 **** + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= +! if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in +! *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done +--- 4250,4259 ---- + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= +! if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in +! *.c | *.C | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done +*************** +*** 4273,4279 **** + + # Check for command to grab the raw symbol name followed by C symbol from nm. + echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 +! echo "configure:4277: checking command to parse $NM output" >&5 + if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4281,4287 ---- + + # Check for command to grab the raw symbol name followed by C symbol from nm. + echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 +! echo "configure:4285: checking command to parse $NM output" >&5 + if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4349,4358 **** + int main(){nm_test_var='a';nm_test_func();return(0);} + EOF + +! if { (eval echo configure:4353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + # Now try to grab the symbols. + nlist=conftest.nm +! if { (eval echo configure:4356: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" +--- 4357,4366 ---- + int main(){nm_test_var='a';nm_test_func();return(0);} + EOF + +! if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + # Now try to grab the symbols. + nlist=conftest.nm +! if { (eval echo configure:4364: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" +*************** +*** 4403,4409 **** + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$no_builtin_flag" +! if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + fi + LIBS="$save_LIBS" +--- 4411,4417 ---- + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$no_builtin_flag" +! if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + fi + LIBS="$save_LIBS" +*************** +*** 4449,4465 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:4453: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 4457,4473 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:4461: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 4494,4500 **** + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +! echo "configure:4498: checking for ${ac_tool_prefix}file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4502,4508 ---- + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +! echo "configure:4506: checking for ${ac_tool_prefix}file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4556,4562 **** + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +! echo "configure:4560: checking for file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4564,4570 ---- + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +! echo "configure:4568: checking for file" >&5 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4627,4633 **** + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4631: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4635,4641 ---- + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4639: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4659,4665 **** + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4663: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4667,4673 ---- + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4671: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4694,4700 **** + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4698: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4702,4708 ---- + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4706: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4726,4732 **** + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4730: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4734,4740 ---- + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:4738: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4775,4782 **** + case $host in + *-*-irix6*) + # Find out which ABI we are using. +! echo '#line 4779 "configure"' > conftest.$ac_ext +! if { (eval echo configure:4780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" +--- 4783,4790 ---- + case $host in + *-*-irix6*) + # Find out which ABI we are using. +! echo '#line 4787 "configure"' > conftest.$ac_ext +! if { (eval echo configure:4788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" +*************** +*** 4797,4803 **** + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +! echo "configure:4801: checking whether the C compiler needs -belf" >&5 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4805,4811 ---- + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +! echo "configure:4809: checking whether the C compiler needs -belf" >&5 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 4810,4823 **** + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_needs_belf=yes + else +--- 4818,4831 ---- + cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_needs_belf=yes + else +*************** +*** 4932,4938 **** + ## FIXME: this should be a separate macro + ## + echo $ac_n "checking for objdir""... $ac_c" 1>&6 +! echo "configure:4936: checking for objdir" >&5 + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then +--- 4940,4946 ---- + ## FIXME: this should be a separate macro + ## + echo $ac_n "checking for objdir""... $ac_c" 1>&6 +! echo "configure:4944: checking for objdir" >&5 + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then +*************** +*** 4963,4969 **** + # in isolation, and that seeing it set (from the cache) indicates that + # the associated values are set (in the cache) correctly too. + echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +! echo "configure:4967: checking for $compiler option to produce PIC" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 4971,4977 ---- + # in isolation, and that seeing it set (from the cache) indicates that + # the associated values are set (in the cache) correctly too. + echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 +! echo "configure:4975: checking for $compiler option to produce PIC" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 5115,5135 **** + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 +! echo "configure:5119: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + case $host_os in + hpux9* | hpux10* | hpux11*) +--- 5123,5143 ---- + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 +! echo "configure:5127: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + case $host_os in + hpux9* | hpux10* | hpux11*) +*************** +*** 5185,5191 **** + ## FIXME: this should be a separate macro + ## + echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 +! echo "configure:5189: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 5193,5199 ---- + ## FIXME: this should be a separate macro + ## + echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 +! echo "configure:5197: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 + if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 5193,5206 **** + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_prog_cc_static_works=yes + else +--- 5201,5214 ---- + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_prog_cc_static_works=yes + else +*************** +*** 5231,5237 **** + ## + # Check to see if options -o and -c are simultaneously supported by compiler + echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +! echo "configure:5235: checking if $compiler supports -c -o file.$ac_objext" >&5 + if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 5239,5245 ---- + ## + # Check to see if options -o and -c are simultaneously supported by compiler + echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 +! echo "configure:5243: checking if $compiler supports -c -o file.$ac_objext" >&5 + if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 5250,5256 **** + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" + compiler_c_o=no +! if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then +--- 5258,5264 ---- + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" + compiler_c_o=no +! if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then +*************** +*** 5279,5285 **** + if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 +! echo "configure:5283: checking if $compiler supports -c -o file.lo" >&5 + if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 5287,5293 ---- + if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 +! echo "configure:5291: checking if $compiler supports -c -o file.lo" >&5 + if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 5288,5301 **** + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +--- 5296,5309 ---- + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +*************** +*** 5329,5335 **** + if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +! echo "configure:5333: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no +--- 5337,5343 ---- + if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 +! echo "configure:5341: checking if we can lock with hard links" >&5 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no +*************** +*** 5352,5371 **** + if test "$GCC" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 +! echo "configure:5356: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + echo "int some_variable = 0;" > conftest.$ac_ext + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" + compiler_rtti_exceptions=no + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +--- 5360,5379 ---- + if test "$GCC" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 +! echo "configure:5364: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + echo "int some_variable = 0;" > conftest.$ac_ext + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" + compiler_rtti_exceptions=no + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings +*************** +*** 5396,5402 **** + ## + # See if the linker supports building shared libraries. + echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 +! echo "configure:5400: checking whether the linker ($LD) supports shared libraries" >&5 + + allow_undefined_flag= + no_undefined_flag= +--- 5404,5410 ---- + ## + # See if the linker supports building shared libraries. + echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 +! echo "configure:5408: checking whether the linker ($LD) supports shared libraries" >&5 + + allow_undefined_flag= + no_undefined_flag= +*************** +*** 6016,6022 **** + ## + # Check hardcoding attributes. + echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +! echo "configure:6020: checking how to hardcode library paths into programs" >&5 + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then +--- 6024,6030 ---- + ## + # Check hardcoding attributes. + echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 +! echo "configure:6028: checking how to hardcode library paths into programs" >&5 + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then +*************** +*** 6048,6054 **** + striplib= + old_striplib= + echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 +! echo "configure:6052: checking whether stripping libraries is possible" >&5 + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +--- 6056,6062 ---- + striplib= + old_striplib= + echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 +! echo "configure:6060: checking whether stripping libraries is possible" >&5 + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" +*************** +*** 6066,6072 **** + ## + # PORTME Fill in your ld.so characteristics + echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +! echo "configure:6070: checking dynamic linker characteristics" >&5 + library_names_spec= + libname_spec='lib$name' + soname_spec= +--- 6074,6080 ---- + ## + # PORTME Fill in your ld.so characteristics + echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 +! echo "configure:6078: checking dynamic linker characteristics" >&5 + library_names_spec= + libname_spec='lib$name' + soname_spec= +*************** +*** 6456,6462 **** + ## + # Report the final consequences. + echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 +! echo "configure:6460: checking if libtool supports shared libraries" >&5 + echo "$ac_t""$can_build_shared" 1>&6 + ## + ## END FIXME +--- 6464,6470 ---- + ## + # Report the final consequences. + echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 +! echo "configure:6468: checking if libtool supports shared libraries" >&5 + echo "$ac_t""$can_build_shared" 1>&6 + ## + ## END FIXME +*************** +*** 6497,6503 **** + + *) + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +! echo "configure:6501: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 6505,6511 ---- + + *) + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +! echo "configure:6509: checking for dlopen in -ldl" >&5 + ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 6505,6511 **** + ac_save_LIBS="$LIBS" + LIBS="-ldl $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 6524,6530 ---- + dlopen() + ; return 0; } + EOF +! if { (eval echo configure:6528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 6535,6546 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +! echo "configure:6539: checking for dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 + echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +! echo "configure:6547: checking for dlopen" >&5 + if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" + else +--- 6571,6577 ---- + + ; return 0; } + EOF +! if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_dlopen=yes" + else +*************** +*** 6581,6592 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +! echo "configure:6585: checking for shl_load" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 + echo $ac_n "checking for shl_load""... $ac_c" 1>&6 +! echo "configure:6593: checking for shl_load" >&5 + if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" + else +--- 6617,6623 ---- + + ; return 0; } + EOF +! if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shl_load=yes" + else +*************** +*** 6627,6633 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 +! echo "configure:6631: checking for dlopen in -lsvld" >&5 + ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 6635,6641 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 +! echo "configure:6639: checking for dlopen in -lsvld" >&5 + ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 6635,6641 **** + ac_save_LIBS="$LIBS" + LIBS="-lsvld $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 6654,6660 ---- + dlopen() + ; return 0; } + EOF +! if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 6665,6671 **** + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +! echo "configure:6669: checking for shl_load in -ldld" >&5 + ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +--- 6673,6679 ---- + else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 +! echo "configure:6677: checking for shl_load in -ldld" >&5 + ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +*************** +*** 6673,6679 **** + ac_save_LIBS="$LIBS" + LIBS="-ldld $LIBS" + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +--- 6692,6698 ---- + shl_load() + ; return 0; } + EOF +! if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +*************** +*** 6737,6743 **** + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +! echo "configure:6741: checking whether a program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 6745,6751 ---- + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 +! echo "configure:6749: checking whether a program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 6747,6753 **** + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in +--- 6816,6822 ---- + exit (status); + } + EOF +! if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in +*************** +*** 6831,6837 **** + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +! echo "configure:6835: checking whether a statically linked program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 6839,6845 ---- + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 +! echo "configure:6843: checking whether a statically linked program can dlopen itself" >&5 + if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 6841,6847 **** + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in +--- 6910,6916 ---- + exit (status); + } + EOF +! if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in +*************** +*** 6953,6966 **** + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +! echo "configure:6957: checking whether -lc should be explicitly linked in" >&5 + if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + $rm conftest* + echo 'static int dummy;' > conftest.$ac_ext + +! if { (eval echo configure:6964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext +--- 6961,6974 ---- + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 +! echo "configure:6965: checking whether -lc should be explicitly linked in" >&5 + if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + $rm conftest* + echo 'static int dummy;' > conftest.$ac_ext + +! if { (eval echo configure:6972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext +*************** +*** 6973,6979 **** + libname=conftest + save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= +! if { (eval echo configure:6977: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + lt_cv_archive_cmds_need_lc=no + else +--- 6981,6987 ---- + libname=conftest + save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= +! if { (eval echo configure:6985: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } + then + lt_cv_archive_cmds_need_lc=no + else +*************** +*** 7630,7638 **** + # the right suffix on the files. + # + echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 +! echo "configure:7634: checking for IPv6 structures" >&5 + cat > conftest.$ac_ext < +--- 7638,7646 ---- + # the right suffix on the files. + # + echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 +! echo "configure:7642: checking for IPv6 structures" >&5 + cat > conftest.$ac_ext < +*************** +*** 7642,7648 **** + struct sockaddr_in6 sin6; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + found_ipv6=yes +--- 7650,7656 ---- + struct sockaddr_in6 sin6; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + found_ipv6=yes +*************** +*** 7660,7666 **** + # This is done before other IPv6 linking tests to LIBS is properly set. + # + echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 +! echo "configure:7664: checking for Kame IPv6 support" >&5 + # Check whether --with-kame or --without-kame was given. + if test "${with_kame+set}" = set; then + withval="$with_kame" +--- 7668,7674 ---- + # This is done before other IPv6 linking tests to LIBS is properly set. + # + echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 +! echo "configure:7672: checking for Kame IPv6 support" >&5 + # Check whether --with-kame or --without-kame was given. + if test "${with_kame+set}" = set; then + withval="$with_kame" +*************** +*** 7751,7759 **** + LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" + + echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 +! echo "configure:7755: checking for in6_addr" >&5 + cat > conftest.$ac_ext < +--- 7759,7767 ---- + LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" + + echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 +! echo "configure:7763: checking for in6_addr" >&5 + cat > conftest.$ac_ext < +*************** +*** 7766,7772 **** + struct in6_addr in6; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" +--- 7774,7780 ---- + struct in6_addr in6; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" +*************** +*** 7784,7792 **** + rm -f conftest* + + echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 +! echo "configure:7788: checking for in6addr_any" >&5 + cat > conftest.$ac_ext < +--- 7792,7800 ---- + rm -f conftest* + + echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 +! echo "configure:7796: checking for in6addr_any" >&5 + cat > conftest.$ac_ext < +*************** +*** 7800,7806 **** + struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); + ; return 0; } + EOF +! if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" +--- 7808,7814 ---- + struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); + ; return 0; } + EOF +! if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" +*************** +*** 7816,7824 **** + rm -f conftest* + + echo $ac_n "checking for in6addr_loopback""... $ac_c" 1>&6 +! echo "configure:7820: checking for in6addr_loopback" >&5 + cat > conftest.$ac_ext < +--- 7824,7832 ---- + rm -f conftest* + + echo $ac_n "checking for in6addr_loopback""... $ac_c" 1>&6 +! echo "configure:7828: checking for in6addr_loopback" >&5 + cat > conftest.$ac_ext < +*************** +*** 7832,7838 **** + struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); + ; return 0; } + EOF +! if { (eval echo configure:7836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" +--- 7840,7846 ---- + struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); + ; return 0; } + EOF +! if { (eval echo configure:7844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" +*************** +*** 7848,7856 **** + rm -f conftest* + + echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 +! echo "configure:7852: checking for sin6_scope_id in struct sockaddr_in6" >&5 + cat > conftest.$ac_ext < +--- 7856,7864 ---- + rm -f conftest* + + echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 +! echo "configure:7860: checking for sin6_scope_id in struct sockaddr_in6" >&5 + cat > conftest.$ac_ext < +*************** +*** 7863,7869 **** + struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" +--- 7871,7877 ---- + struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" +*************** +*** 7878,7886 **** + LWRES_HAVE_SIN6_SCOPE_ID="$result" + + echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 +! echo "configure:7882: checking for in6_pktinfo" >&5 + cat > conftest.$ac_ext < +--- 7886,7894 ---- + LWRES_HAVE_SIN6_SCOPE_ID="$result" + + echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 +! echo "configure:7890: checking for in6_pktinfo" >&5 + cat > conftest.$ac_ext < +*************** +*** 7893,7899 **** + struct in6_pktinfo xyzzy; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" +--- 7901,7907 ---- + struct in6_pktinfo xyzzy; return (0); + ; return 0; } + EOF +! if { (eval echo configure:7905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" +*************** +*** 7948,7956 **** + # + + echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 +! echo "configure:7952: checking for inet_ntop" >&5 + cat > conftest.$ac_ext < +--- 7956,7964 ---- + # + + echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 +! echo "configure:7960: checking for inet_ntop" >&5 + cat > conftest.$ac_ext < +*************** +*** 7960,7966 **** + inet_ntop(0, 0, 0, 0); return (0); + ; return 0; } + EOF +! if { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" +--- 7968,7974 ---- + inet_ntop(0, 0, 0, 0); return (0); + ; return 0; } + EOF +! if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" +*************** +*** 7981,7993 **** + # zeros should also be rejected. + + echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 +! echo "configure:7985: checking for inet_pton" >&5 + if test "$cross_compiling" = yes; then + echo "$ac_t""assuming target platform has working inet_pton" 1>&6 + ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" + else + cat > conftest.$ac_ext < +--- 7989,8001 ---- + # zeros should also be rejected. + + echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 +! echo "configure:7993: checking for inet_pton" >&5 + if test "$cross_compiling" = yes; then + echo "$ac_t""assuming target platform has working inet_pton" 1>&6 + ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" + else + cat > conftest.$ac_ext < +*************** +*** 7997,8003 **** + main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : + inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); } + EOF +! if { (eval echo configure:8001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" +--- 8005,8011 ---- + main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : + inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); } + EOF +! if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" +*************** +*** 8015,8023 **** + + + echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 +! echo "configure:8019: checking for inet_aton" >&5 + cat > conftest.$ac_ext < +--- 8023,8031 ---- + + + echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 +! echo "configure:8027: checking for inet_aton" >&5 + cat > conftest.$ac_ext < +*************** +*** 8027,8033 **** + struct in_addr in; inet_aton(0, &in); return (0); + ; return 0; } + EOF +! if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" +--- 8035,8041 ---- + struct in_addr in; inet_aton(0, &in); return (0); + ; return 0; } + EOF +! if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" +*************** +*** 8060,8068 **** + esac + + echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 +! echo "configure:8064: checking for sa_len in struct sockaddr" >&5 + cat > conftest.$ac_ext < +--- 8068,8076 ---- + esac + + echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 +! echo "configure:8072: checking for sa_len in struct sockaddr" >&5 + cat > conftest.$ac_ext < +*************** +*** 8071,8077 **** + struct sockaddr sa; sa.sa_len = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" +--- 8079,8085 ---- + struct sockaddr sa; sa.sa_len = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" +*************** +*** 8092,8100 **** + # Look for a 4.4BSD or 4.3BSD struct msghdr + # + echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 +! echo "configure:8096: checking for struct msghdr flavor" >&5 + cat > conftest.$ac_ext < +--- 8100,8108 ---- + # Look for a 4.4BSD or 4.3BSD struct msghdr + # + echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 +! echo "configure:8104: checking for struct msghdr flavor" >&5 + cat > conftest.$ac_ext < +*************** +*** 8103,8109 **** + struct msghdr msg; msg.msg_flags = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""4.4BSD" 1>&6 + ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" +--- 8111,8117 ---- + struct msghdr msg; msg.msg_flags = 0; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""4.4BSD" 1>&6 + ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" +*************** +*** 8121,8129 **** + # Look for in_port_t. + # + echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 +! echo "configure:8125: checking for type in_port_t" >&5 + cat > conftest.$ac_ext < +--- 8129,8137 ---- + # Look for in_port_t. + # + echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 +! echo "configure:8133: checking for type in_port_t" >&5 + cat > conftest.$ac_ext < +*************** +*** 8132,8138 **** + in_port_t port = 25; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" +--- 8140,8146 ---- + in_port_t port = 25; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" +*************** +*** 8150,8158 **** + # Check for addrinfo + # + echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 +! echo "configure:8154: checking for struct addrinfo" >&5 + cat > conftest.$ac_ext < +--- 8158,8166 ---- + # Check for addrinfo + # + echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 +! echo "configure:8162: checking for struct addrinfo" >&5 + cat > conftest.$ac_ext < +*************** +*** 8160,8166 **** + struct addrinfo a; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" +--- 8168,8174 ---- + struct addrinfo a; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" +*************** +*** 8182,8190 **** + # Check for rrsetinfo + # + echo $ac_n "checking for struct rrsetinfo""... $ac_c" 1>&6 +! echo "configure:8186: checking for struct rrsetinfo" >&5 + cat > conftest.$ac_ext < +--- 8190,8198 ---- + # Check for rrsetinfo + # + echo $ac_n "checking for struct rrsetinfo""... $ac_c" 1>&6 +! echo "configure:8194: checking for struct rrsetinfo" >&5 + cat > conftest.$ac_ext < +*************** +*** 8192,8198 **** + struct rrsetinfo r; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" +--- 8200,8206 ---- + struct rrsetinfo r; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" +*************** +*** 8207,8215 **** + + + echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 +! echo "configure:8211: checking for int sethostent" >&5 + cat > conftest.$ac_ext < +--- 8215,8223 ---- + + + echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 +! echo "configure:8219: checking for int sethostent" >&5 + cat > conftest.$ac_ext < +*************** +*** 8217,8223 **** + int i = sethostent(0); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" +--- 8225,8231 ---- + int i = sethostent(0); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" +*************** +*** 8232,8240 **** + + + echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 +! echo "configure:8236: checking for int endhostent" >&5 + cat > conftest.$ac_ext < +--- 8240,8248 ---- + + + echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 +! echo "configure:8244: checking for int endhostent" >&5 + cat > conftest.$ac_ext < +*************** +*** 8242,8248 **** + int i = endhostent(); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" +--- 8250,8256 ---- + int i = endhostent(); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" +*************** +*** 8257,8265 **** + + + echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 +! echo "configure:8261: checking for getnetbyaddr(in_addr_t, ...)" >&5 + cat > conftest.$ac_ext < +--- 8265,8273 ---- + + + echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 +! echo "configure:8269: checking for getnetbyaddr(in_addr_t, ...)" >&5 + cat > conftest.$ac_ext < +*************** +*** 8268,8274 **** + + ; return 0; } + EOF +! if { (eval echo configure:8272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" +--- 8276,8282 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" +*************** +*** 8283,8291 **** + + + echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 +! echo "configure:8287: checking for int setnetent" >&5 + cat > conftest.$ac_ext < +--- 8291,8299 ---- + + + echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 +! echo "configure:8295: checking for int setnetent" >&5 + cat > conftest.$ac_ext < +*************** +*** 8293,8299 **** + int i = setnetent(0); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" +--- 8301,8307 ---- + int i = setnetent(0); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" +*************** +*** 8308,8316 **** + + + echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 +! echo "configure:8312: checking for int endnetent" >&5 + cat > conftest.$ac_ext < +--- 8316,8324 ---- + + + echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 +! echo "configure:8320: checking for int endnetent" >&5 + cat > conftest.$ac_ext < +*************** +*** 8318,8324 **** + int i = endnetent(); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" +--- 8326,8332 ---- + int i = endnetent(); return(0); + ; return 0; } + EOF +! if { (eval echo configure:8330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" +*************** +*** 8333,8341 **** + + + echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 +! echo "configure:8337: checking for gethostbyaddr(const void *, size_t, ...)" >&5 + cat > conftest.$ac_ext < +--- 8341,8349 ---- + + + echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 +! echo "configure:8345: checking for gethostbyaddr(const void *, size_t, ...)" >&5 + cat > conftest.$ac_ext < +*************** +*** 8344,8350 **** + return(0); + ; return 0; } + EOF +! if { (eval echo configure:8348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" +--- 8352,8358 ---- + return(0); + ; return 0; } + EOF +! if { (eval echo configure:8356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" +*************** +*** 8359,8367 **** + + + echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 +! echo "configure:8363: checking for h_errno in netdb.h" >&5 + cat > conftest.$ac_ext < +--- 8367,8375 ---- + + + echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 +! echo "configure:8371: checking for h_errno in netdb.h" >&5 + cat > conftest.$ac_ext < +*************** +*** 8369,8375 **** + h_errno = 1; return(0); + ; return 0; } + EOF +! if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" +--- 8377,8383 ---- + h_errno = 1; return(0); + ; return 0; } + EOF +! if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" +*************** +*** 8384,8395 **** + + + echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 +! echo "configure:8388: checking for getipnodebyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8396: checking for getipnodebyname" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getipnodebyname=yes" + else +--- 8420,8426 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getipnodebyname=yes" + else +*************** +*** 8433,8444 **** + fi + + echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 +! echo "configure:8437: checking for getnameinfo" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8445: checking for getnameinfo" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getnameinfo=yes" + else +--- 8469,8475 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getnameinfo=yes" + else +*************** +*** 8482,8493 **** + fi + + echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 +! echo "configure:8486: checking for getaddrinfo" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8494: checking for getaddrinfo" >&5 + if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getaddrinfo=yes" + else +--- 8518,8524 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_getaddrinfo=yes" + else +*************** +*** 8535,8546 **** + fi + + echo $ac_n "checking for gai_strerror""... $ac_c" 1>&6 +! echo "configure:8539: checking for gai_strerror" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8547: checking for gai_strerror" >&5 + if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gai_strerror=yes" + else +--- 8571,8577 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gai_strerror=yes" + else +*************** +*** 8593,8601 **** + # Look for a sysctl call to get the list of network interfaces. + # + echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 +! echo "configure:8597: checking for interface list sysctl" >&5 + cat > conftest.$ac_ext < +--- 8601,8609 ---- + # Look for a sysctl call to get the list of network interfaces. + # + echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 +! echo "configure:8605: checking for interface list sysctl" >&5 + cat > conftest.$ac_ext < +*************** +*** 8632,8647 **** + # AC_CHECK_FUNC() incorrectly succeeds because it declares + # the function itself. + echo $ac_n "checking for correctly declared strsep()""... $ac_c" 1>&6 +! echo "configure:8636: checking for correctly declared strsep()" >&5 + cat > conftest.$ac_ext < + int main() { + char *sp; char *foo = strsep(&sp, "."); + ; return 0; } + EOF +! if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP" + else +--- 8640,8655 ---- + # AC_CHECK_FUNC() incorrectly succeeds because it declares + # the function itself. + echo $ac_n "checking for correctly declared strsep()""... $ac_c" 1>&6 +! echo "configure:8644: checking for correctly declared strsep()" >&5 + cat > conftest.$ac_ext < + int main() { + char *sp; char *foo = strsep(&sp, "."); + ; return 0; } + EOF +! if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP" + else +*************** +*** 8653,8664 **** + rm -f conftest* + + echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 +! echo "configure:8657: checking for vsnprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8665: checking for vsnprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vsnprintf=yes" + else +--- 8689,8695 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vsnprintf=yes" + else +*************** +*** 8706,8717 **** + + + echo $ac_n "checking for strerror""... $ac_c" 1>&6 +! echo "configure:8710: checking for strerror" >&5 + if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8718: checking for strerror" >&5 + if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_strerror=yes" + else +--- 8742,8748 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_strerror=yes" + else +*************** +*** 8768,8784 **** + # but that's defined elsewhere since we don't use configure on Win32. + # + echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6 +! echo "configure:8772: checking printf format modifier for 64-bit integers" >&5 + if test "$cross_compiling" = yes; then + echo "$ac_t""assuming target platform uses ll" 1>&6 + ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""l" 1>&6 + ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' +--- 8776,8792 ---- + # but that's defined elsewhere since we don't use configure on Win32. + # + echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6 +! echo "configure:8780: checking printf format modifier for 64-bit integers" >&5 + if test "$cross_compiling" = yes; then + echo "$ac_t""assuming target platform uses ll" 1>&6 + ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""l" 1>&6 + ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' +*************** +*** 8798,8809 **** + # Security Stuff + # + echo $ac_n "checking for chroot""... $ac_c" 1>&6 +! echo "configure:8802: checking for chroot" >&5 + if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&6 +! echo "configure:8810: checking for chroot" >&5 + if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_chroot=yes" + else +--- 8834,8840 ---- + + ; return 0; } + EOF +! if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_chroot=yes" + else +*************** +*** 8860,8876 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:8864: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:8874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 8868,8884 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:8872: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:8882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 8904,8920 **** + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:8908: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:8918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +--- 8912,8928 ---- + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +! echo "configure:8916: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +! { (eval echo configure:8926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +*************** +*** 8945,8953 **** + # BSD/OS, and perhaps some others, don't define rlim_t. + # + echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 +! echo "configure:8949: checking for type rlim_t" >&5 + cat > conftest.$ac_ext < +--- 8953,8961 ---- + # BSD/OS, and perhaps some others, don't define rlim_t. + # + echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 +! echo "configure:8957: checking for type rlim_t" >&5 + cat > conftest.$ac_ext < +*************** +*** 8957,8963 **** + rlim_t rl = 19671212; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" +--- 8965,8971 ---- + rlim_t rl = 19671212; return (0); + ; return 0; } + EOF +! if { (eval echo configure:8969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" +*************** +*** 8968,8979 **** + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking type of rlim_cur""... $ac_c" 1>&6 +! echo "configure:8972: checking type of rlim_cur" >&5 + if test "$cross_compiling" = yes; then + { echo "configure: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +--- 8976,8987 ---- + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking type of rlim_cur""... $ac_c" 1>&6 +! echo "configure:8980: checking type of rlim_cur" >&5 + if test "$cross_compiling" = yes; then + { echo "configure: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +*************** +*** 8981,8987 **** + #include + main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} + EOF +! if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" +--- 8989,8995 ---- + #include + main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} + EOF +! if { (eval echo configure:8993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" +*************** +*** 8994,9000 **** + { echo "configure: error: this cannot happen" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +--- 9002,9008 ---- + { echo "configure: error: this cannot happen" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +*************** +*** 9002,9008 **** + #include + main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} + EOF +! if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""long int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" +--- 9010,9016 ---- + #include + main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} + EOF +! if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""long int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" +*************** +*** 9015,9021 **** + { echo "configure: error: this cannot happen" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +--- 9023,9029 ---- + { echo "configure: error: this cannot happen" 1>&2; exit 1; } + else + cat > conftest.$ac_ext < +*************** +*** 9023,9029 **** + #include + main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} + EOF +! if { (eval echo configure:9027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""long long int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" +--- 9031,9037 ---- + #include + main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} + EOF +! if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + echo "$ac_t""long long int" 1>&6 + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" +*************** +*** 9147,9153 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9151: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_OPENJADE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 9155,9161 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9159: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_OPENJADE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 9194,9200 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9198: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 9202,9208 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9206: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 9237,9243 **** + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9241: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PDFJADETEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +--- 9245,9251 ---- + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +! echo "configure:9249: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_PDFJADETEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +*************** +*** 9293,9299 **** + + SGMLCATALOG="" + echo $ac_n "checking for catalog""... $ac_c" 1>&6 +! echo "configure:9297: checking for catalog" >&5 + for d in $sgmltrees + do + f=$d/catalog +--- 9301,9307 ---- + + SGMLCATALOG="" + echo $ac_n "checking for catalog""... $ac_c" 1>&6 +! echo "configure:9305: checking for catalog" >&5 + for d in $sgmltrees + do + f=$d/catalog +*************** +*** 9335,9341 **** + + HTMLSTYLE="" + echo $ac_n "checking for html/docbook.dsl""... $ac_c" 1>&6 +! echo "configure:9339: checking for html/docbook.dsl" >&5 + for d in $stylepath + do + f=$d/html/docbook.dsl +--- 9343,9349 ---- + + HTMLSTYLE="" + echo $ac_n "checking for html/docbook.dsl""... $ac_c" 1>&6 +! echo "configure:9347: checking for html/docbook.dsl" >&5 + for d in $stylepath + do + f=$d/html/docbook.dsl +*************** +*** 9356,9362 **** + + PRINTSTYLE="" + echo $ac_n "checking for print/docbook.dsl""... $ac_c" 1>&6 +! echo "configure:9360: checking for print/docbook.dsl" >&5 + for d in $stylepath + do + f=$d/print/docbook.dsl +--- 9364,9370 ---- + + PRINTSTYLE="" + echo $ac_n "checking for print/docbook.dsl""... $ac_c" 1>&6 +! echo "configure:9368: checking for print/docbook.dsl" >&5 + for d in $stylepath + do + f=$d/print/docbook.dsl +*************** +*** 9382,9388 **** + + XMLDCL="" + echo $ac_n "checking for docbook/dsssl/modular/dtds/decls/xml.dcl""... $ac_c" 1>&6 +! echo "configure:9386: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 + for d in $sgmltrees + do + f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl +--- 9390,9396 ---- + + XMLDCL="" + echo $ac_n "checking for docbook/dsssl/modular/dtds/decls/xml.dcl""... $ac_c" 1>&6 +! echo "configure:9394: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 + for d in $sgmltrees + do + f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl +*************** +*** 9408,9414 **** + + DOCBOOK2MANSPEC="" + echo $ac_n "checking for docbook2X/docbook2man-spec.pl""... $ac_c" 1>&6 +! echo "configure:9412: checking for docbook2X/docbook2man-spec.pl" >&5 + for d in $sgmltrees + do + f=$d/docbook2X/docbook2man-spec.pl +--- 9416,9422 ---- + + DOCBOOK2MANSPEC="" + echo $ac_n "checking for docbook2X/docbook2man-spec.pl""... $ac_c" 1>&6 +! echo "configure:9420: checking for docbook2X/docbook2man-spec.pl" >&5 + for d in $sgmltrees + do + f=$d/docbook2X/docbook2man-spec.pl +*************** +*** 9428,9433 **** +--- 9436,9631 ---- + + + # ++ # IDN support ++ # ++ # Check whether --with-idn or --without-idn was given. ++ if test "${with_idn+set}" = set; then ++ withval="$with_idn" ++ use_idn="$withval" ++ else ++ use_idn="no" ++ fi ++ ++ case "$use_idn" in ++ yes) ++ if test X$prefix = XNONE ; then ++ idn_path=/usr/local ++ else ++ idn_path=$prefix ++ fi ++ ;; ++ no) ++ ;; ++ *) ++ idn_path="$use_idn" ++ ;; ++ esac ++ ++ iconvinc= ++ iconvlib= ++ # Check whether --with-libiconv or --without-libiconv was given. ++ if test "${with_libiconv+set}" = set; then ++ withval="$with_libiconv" ++ use_libiconv="$withval" ++ else ++ use_libiconv="no" ++ fi ++ ++ case "$use_libiconv" in ++ yes) ++ if test X$prefix = XNONE ; then ++ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" ++ else ++ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" ++ fi ++ ;; ++ no) ++ iconvlib= ++ ;; ++ *) ++ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" ++ ;; ++ esac ++ ++ # Check whether --with-iconv or --without-iconv was given. ++ if test "${with_iconv+set}" = set; then ++ withval="$with_iconv" ++ iconvlib="$withval" ++ fi ++ ++ case "$iconvlib" in ++ no) ++ iconvlib= ++ ;; ++ yes) ++ iconvlib=-liconv ++ ;; ++ esac ++ ++ # Check whether --with-idnlib or --without-idnlib was given. ++ if test "${with_idnlib+set}" = set; then ++ withval="$with_idnlib" ++ idnlib="$withval" ++ else ++ idnlib="no" ++ fi ++ ++ if test "$idnlib" = yes; then ++ { echo "configure: error: You must specify ARG for --with-idnlib." 1>&2; exit 1; } ++ fi ++ ++ IDNLIBS= ++ if test "$use_idn" != no; then ++ cat >> confdefs.h <<\EOF ++ #define WITH_IDN 1 ++ EOF ++ ++ STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" ++ if test "$idnlib" != no; then ++ IDNLIBS="$idnlib $iconvlib" ++ else ++ IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" ++ fi ++ fi ++ ++ ++ for ac_hdr in locale.h ++ do ++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ++ echo "configure:9537: checking for $ac_hdr" >&5 ++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++ else ++ cat > conftest.$ac_ext < ++ EOF ++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ++ { (eval echo configure:9547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ++ if test -z "$ac_err"; then ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=yes" ++ else ++ echo "$ac_err" >&5 ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_header_$ac_safe=no" ++ fi ++ rm -f conftest* ++ fi ++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ++ cat >> confdefs.h <&6 ++ fi ++ done ++ ++ for ac_func in setlocale ++ do ++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++ echo "configure:9576: checking for $ac_func" >&5 ++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++ else ++ cat > conftest.$ac_ext < ++ /* Override any gcc2 internal prototype to avoid an error. */ ++ /* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++ char $ac_func(); ++ ++ int main() { ++ ++ /* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++ choke me ++ #else ++ $ac_func(); ++ #endif ++ ++ ; return 0; } ++ EOF ++ if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++ else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++ fi ++ rm -f conftest* ++ fi ++ ++ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.h <&6 ++ fi ++ done ++ ++ ++ # + # Substitutions + # + +*************** +*** 9799,9804 **** +--- 9997,10003 ---- + s%@PRINTSTYLE@%$PRINTSTYLE%g + s%@XMLDCL@%$XMLDCL%g + s%@DOCBOOK2MANSPEC@%$DOCBOOK2MANSPEC%g ++ s%@IDNLIBS@%$IDNLIBS%g + s%@BIND9_TOP_BUILDDIR@%$BIND9_TOP_BUILDDIR%g + s%@BIND9_ISC_BUILDINCLUDE@%$BIND9_ISC_BUILDINCLUDE%g + s%@BIND9_ISCCC_BUILDINCLUDE@%$BIND9_ISCCC_BUILDINCLUDE%g +*************** +*** 9828,9834 **** + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. +! ac_max_sed_cmds=50 # Maximum number of lines to put in a sed script. + ac_file=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_cmds # Line after last line for current file. +--- 10027,10033 ---- + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. +! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. + ac_file=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_cmds # Line after last line for current file. +Index: configure.in +diff -c mdn/othersrc/bind9/configure.in:1.1.1.9 mdn/othersrc/bind9/configure.in:1.15 +*** configure.in Wed May 22 17:14:53 2002 +--- configure.in Mon May 27 12:10:14 2002 +*************** +*** 1614,1619 **** +--- 1614,1695 ---- + NOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees) + + # ++ # IDN support ++ # ++ AC_ARG_WITH(idn, ++ [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]], ++ use_idn="$withval", use_idn="no") ++ case "$use_idn" in ++ yes) ++ if test X$prefix = XNONE ; then ++ idn_path=/usr/local ++ else ++ idn_path=$prefix ++ fi ++ ;; ++ no) ++ ;; ++ *) ++ idn_path="$use_idn" ++ ;; ++ esac ++ ++ iconvinc= ++ iconvlib= ++ AC_ARG_WITH(libiconv, ++ [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], ++ use_libiconv="$withval", use_libiconv="no") ++ case "$use_libiconv" in ++ yes) ++ if test X$prefix = XNONE ; then ++ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" ++ else ++ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" ++ fi ++ ;; ++ no) ++ iconvlib= ++ ;; ++ *) ++ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" ++ ;; ++ esac ++ ++ AC_ARG_WITH(iconv, ++ [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], ++ iconvlib="$withval") ++ case "$iconvlib" in ++ no) ++ iconvlib= ++ ;; ++ yes) ++ iconvlib=-liconv ++ ;; ++ esac ++ ++ AC_ARG_WITH(idnlib, ++ [ --with-idnlib=ARG specify libidnkit], ++ idnlib="$withval", idnlib="no") ++ if test "$idnlib" = yes; then ++ AC_MSG_ERROR([You must specify ARG for --with-idnlib.]) ++ fi ++ ++ IDNLIBS= ++ if test "$use_idn" != no; then ++ AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.]) ++ STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" ++ if test "$idnlib" != no; then ++ IDNLIBS="$idnlib $iconvlib" ++ else ++ IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" ++ fi ++ fi ++ AC_SUBST(IDNLIBS) ++ ++ AC_CHECK_HEADERS(locale.h) ++ AC_CHECK_FUNCS(setlocale) ++ ++ # + # Substitutions + # + AC_SUBST(BIND9_TOP_BUILDDIR) +Index: bin/dig/Makefile.in +diff -c mdn/othersrc/bind9/bin/dig/Makefile.in:1.1.1.6 mdn/othersrc/bind9/bin/dig/Makefile.in:1.3 +*** bin/dig/Makefile.in Tue Nov 27 16:55:50 2001 +--- bin/dig/Makefile.in Tue Mar 19 16:45:35 2002 +*************** +*** 36,42 **** + + DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} + +! LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ + + SUBDIRS = + +--- 36,42 ---- + + DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} + +! LIBS = ${DNSLIBS} ${ISCLIBS} @IDNLIBS@ @LIBS@ + + SUBDIRS = + +Index: bin/dig/dig.1 +diff -c mdn/othersrc/bind9/bin/dig/dig.1:1.1.1.2 mdn/othersrc/bind9/bin/dig/dig.1:1.4 +*** bin/dig/dig.1 Wed May 22 17:14:53 2002 +--- bin/dig/dig.1 Mon May 27 12:10:14 2002 +*************** +*** 349,354 **** +--- 349,365 ---- + \fI+noqr\fR which means that \fBdig\fR + will not print the initial query when it looks up the NS records for + isc.org. ++ .SH "IDN SUPPORT" ++ .PP ++ If \fBdig\fR has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ \fBdig\fR appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the \fBIDN_DISABLE\fR environment variable. ++ The IDN support is disabled if the the variable is set when ++ \fBdig\fR runs. + .SH "FILES" + .PP + \fI/etc/resolv.conf\fR +Index: bin/dig/dig.docbook +diff -c mdn/othersrc/bind9/bin/dig/dig.docbook:1.1.1.2 mdn/othersrc/bind9/bin/dig/dig.docbook:1.4 +*** bin/dig/dig.docbook Wed May 22 17:14:53 2002 +--- bin/dig/dig.docbook Mon May 27 12:10:15 2002 +*************** +*** 523,528 **** +--- 523,543 ---- + + + ++ IDN SUPPORT ++ ++ If dig has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ dig appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the IDN_DISABLE environment variable. ++ The IDN support is disabled if the the variable is set when ++ dig runs. ++ ++ ++ ++ + FILES + + /etc/resolv.conf +Index: bin/dig/dighost.c +diff -c mdn/othersrc/bind9/bin/dig/dighost.c:1.1.1.12 mdn/othersrc/bind9/bin/dig/dighost.c:1.32 +*** bin/dig/dighost.c Wed May 22 17:14:53 2002 +--- bin/dig/dighost.c Mon May 27 12:10:15 2002 +*************** +*** 32,37 **** +--- 32,48 ---- + #include + #include + ++ #ifdef HAVE_LOCALE_H ++ #include ++ #endif ++ ++ #ifdef WITH_IDN ++ #include ++ #include ++ #include ++ #include ++ #endif ++ + #include + #include + #include +*************** +*** 130,135 **** +--- 141,158 ---- + isc_mutex_t lookup_lock; + dig_lookup_t *current_lookup = NULL; + ++ #ifdef WITH_IDN ++ static void initialize_idn(void); ++ static isc_result_t output_filter(isc_buffer_t *buffer, ++ unsigned int used_org, ++ isc_boolean_t absolute); ++ static idn_result_t append_textname(char *name, const char *origin, ++ size_t namesize); ++ static void idn_check_result(idn_result_t r, const char *msg); ++ ++ #define MAXDLEN 256 ++ #endif ++ + /* + * Apply and clear locks at the event level in global task. + * Can I get rid of these using shutdown events? XXX +*************** +*** 648,653 **** +--- 671,680 ---- + ISC_LIST_APPEND(server_list, srv, link); + } + ++ #ifdef WITH_IDN ++ initialize_idn(); ++ #endif ++ + if (keyfile[0] != 0) + setup_file_key(); + else if (keysecret[0] != 0) +*************** +*** 1168,1173 **** +--- 1195,1208 ---- + isc_buffer_t b; + dns_compress_t cctx; + char store[MXNAME]; ++ #ifdef WITH_IDN ++ idn_result_t mr; ++ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; ++ #endif ++ ++ #ifdef WITH_IDN ++ dns_name_settotextfilter(output_filter); ++ #endif + + REQUIRE(lookup != NULL); + INSIST(!free_now); +*************** +*** 1196,1201 **** +--- 1231,1247 ---- + isc_buffer_init(&lookup->onamebuf, lookup->onamespace, + sizeof(lookup->onamespace)); + ++ #ifdef WITH_IDN ++ /* ++ * We cannot convert `textname' and `origin' separately. ++ * `textname' doesn't contain TLD, but local mapping needs ++ * TLD. ++ */ ++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname, ++ utf8_textname, sizeof(utf8_textname)); ++ idn_check_result(mr, "convert textname to UTF-8"); ++ #endif ++ + /* + * If the name has too many dots, force the origin to be NULL + * (which produces an absolute lookup). Otherwise, take the origin +*************** +*** 1204,1215 **** +--- 1250,1290 ---- + * is TRUE or we got a domain line in the resolv.conf file. + */ + /* XXX New search here? */ ++ #ifdef WITH_IDN ++ if ((count_dots(utf8_textname) >= ndots) || !usesearch) ++ lookup->origin = NULL; /* Force abs lookup */ ++ else if (lookup->origin == NULL && lookup->new_search && usesearch) { ++ lookup->origin = ISC_LIST_HEAD(search_list); ++ } ++ #else + if ((count_dots(lookup->textname) >= ndots) || !usesearch) + lookup->origin = NULL; /* Force abs lookup */ + else if (lookup->origin == NULL && lookup->new_search && usesearch) { + lookup->origin = ISC_LIST_HEAD(search_list); + } ++ #endif ++ ++ #ifdef WITH_IDN + if (lookup->origin != NULL) { ++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, ++ lookup->origin->origin, utf8_origin, ++ sizeof(utf8_origin)); ++ idn_check_result(mr, "convert origin to UTF-8"); ++ mr = append_textname(utf8_textname, utf8_origin, ++ sizeof(utf8_textname)); ++ idn_check_result(mr, "append origin to textname"); ++ } ++ mr = idn_encodename(IDN_LOCALMAP | IDN_NAMEPREP | IDN_ASCCHECK | ++ IDN_IDNCONV | IDN_LENCHECK, utf8_textname, ++ idn_textname, sizeof(idn_textname)); ++ idn_check_result(mr, "convert UTF-8 textname to IDN encoding"); ++ #endif ++ ++ #ifdef WITH_IDN ++ if (0) { ++ #else ++ if (lookup->origin != NULL) { ++ #endif + debug("trying origin %s", lookup->origin->origin); + result = dns_message_gettempname(lookup->sendmsg, + &lookup->oname); +*************** +*** 1254,1259 **** +--- 1329,1343 ---- + if (lookup->trace && lookup->trace_root) + dns_name_clone(dns_rootname, lookup->name); + else { ++ #ifdef WITH_IDN ++ len = strlen(idn_textname); ++ isc_buffer_init(&b, idn_textname, len); ++ isc_buffer_add(&b, len); ++ result = dns_name_fromtext(lookup->name, &b, ++ dns_rootname, ++ ISC_FALSE, ++ &lookup->namebuf); ++ #else + len = strlen(lookup->textname); + isc_buffer_init(&b, lookup->textname, len); + isc_buffer_add(&b, len); +*************** +*** 1261,1266 **** +--- 1345,1351 ---- + dns_rootname, + ISC_FALSE, + &lookup->namebuf); ++ #endif + } + if (result != ISC_R_SUCCESS) { + dns_message_puttempname(lookup->sendmsg, +*************** +*** 2591,2593 **** +--- 2676,2776 ---- + if (mctx != NULL) + isc_mem_destroy(&mctx); + } ++ ++ #ifdef WITH_IDN ++ static void ++ initialize_idn(void) { ++ idn_result_t r; ++ ++ #ifdef HAVE_SETLOCALE ++ /* Set locale */ ++ (void)setlocale(LC_ALL, ""); ++ #endif ++ /* Create configuration context. */ ++ r = idn_nameinit(1); ++ if (r != idn_success) ++ fatal("idn api initialization failed: %s", ++ idn_result_tostring(r)); ++ ++ /* Set domain name -> text post-conversion filter. */ ++ dns_name_settotextfilter(output_filter); ++ } ++ ++ static isc_result_t ++ output_filter(isc_buffer_t *buffer, unsigned int used_org, ++ isc_boolean_t absolute) ++ { ++ char tmp1[MAXDLEN], tmp2[MAXDLEN]; ++ size_t fromlen, tolen; ++ isc_boolean_t end_with_dot; ++ ++ /* ++ * Copy contents of 'buffer' to 'tmp1', supply trailing dot ++ * if 'absolute' is true, and terminate with NUL. ++ */ ++ fromlen = isc_buffer_usedlength(buffer) - used_org; ++ if (fromlen >= MAXDLEN) ++ return (ISC_R_SUCCESS); ++ memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); ++ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; ++ if (absolute && !end_with_dot) { ++ fromlen++; ++ if (fromlen >= MAXDLEN) ++ return (ISC_R_SUCCESS); ++ tmp1[fromlen - 1] = '.'; ++ } ++ tmp1[fromlen] = '\0'; ++ ++ /* ++ * Convert contents of 'tmp1' to local encoding. ++ */ ++ if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success) ++ return (ISC_R_SUCCESS); ++ strcpy(tmp1, tmp2); ++ ++ /* ++ * Copy the converted contents in 'tmp1' back to 'buffer'. ++ * If we have appended trailing dot, remove it. ++ */ ++ tolen = strlen(tmp1); ++ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') ++ tolen--; ++ ++ if (isc_buffer_length(buffer) < used_org + tolen) ++ return (ISC_R_NOSPACE); ++ ++ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); ++ memcpy(isc_buffer_used(buffer), tmp1, tolen); ++ isc_buffer_add(buffer, tolen); ++ ++ return (ISC_R_SUCCESS); ++ } ++ ++ static idn_result_t ++ append_textname(char *name, const char *origin, size_t namesize) { ++ size_t namelen = strlen(name); ++ size_t originlen = strlen(origin); ++ ++ /* Already absolute? */ ++ if (namelen > 0 && name[namelen - 1] == '.') ++ return idn_success; ++ ++ /* Append dot and origin */ ++ ++ if (namelen + 1 + originlen >= namesize) ++ return idn_buffer_overflow; ++ ++ name[namelen++] = '.'; ++ (void)strcpy(name + namelen, origin); ++ return idn_success; ++ } ++ ++ static void ++ idn_check_result(idn_result_t r, const char *msg) { ++ if (r != idn_success) { ++ exitcode = 1; ++ fatal("%s: %s", msg, idn_result_tostring(r)); ++ } ++ } ++ ++ #endif /* WITH_IDN */ +Index: bin/dig/host.1 +diff -c mdn/othersrc/bind9/bin/dig/host.1:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.1:1.3 +*** bin/dig/host.1 Tue Nov 27 16:55:51 2001 +--- bin/dig/host.1 Tue Mar 19 16:45:36 2002 +*************** +*** 120,125 **** +--- 120,136 ---- + effectively wait forever for a reply. The time to wait for a response + will be set to the number of seconds given by the hardware's maximum + value for an integer quantity. ++ .SH "IDN SUPPORT" ++ .PP ++ If \fBhost\fR has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ \fBhost\fR appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the \fBIDN_DISABLE\fR environment variable. ++ The IDN support is disabled if the the variable is set when ++ \fBhost\fR runs. + .SH "FILES" + .PP + \fI/etc/resolv.conf\fR +Index: bin/dig/host.docbook +diff -c mdn/othersrc/bind9/bin/dig/host.docbook:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.docbook:1.3 +*** bin/dig/host.docbook Tue Nov 27 16:55:51 2001 +--- bin/dig/host.docbook Tue Mar 19 16:45:36 2002 +*************** +*** 181,186 **** +--- 181,201 ---- + + + ++ IDN SUPPORT ++ ++ If host has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ host appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the IDN_DISABLE environment variable. ++ The IDN support is disabled if the the variable is set when ++ host runs. ++ ++ ++ ++ + FILES + + /etc/resolv.conf +Index: lib/dns/name.c +diff -c mdn/othersrc/bind9/lib/dns/name.c:1.1.1.10 mdn/othersrc/bind9/lib/dns/name.c:1.14 +*** lib/dns/name.c Wed May 22 17:15:27 2002 +--- lib/dns/name.c Mon May 27 12:10:15 2002 +*************** +*** 194,199 **** +--- 194,206 ---- + /* XXXDCL make const? */ + dns_name_t *dns_wildcardname = &wild; + ++ #ifdef WITH_IDN ++ /* ++ * dns_name_t to text post-conversion procedure. ++ */ ++ static dns_name_totextfilter_t totext_filter_proc = NULL; ++ #endif ++ + static void + set_offsets(const dns_name_t *name, unsigned char *offsets, + dns_name_t *set_name); +*************** +*** 1682,1687 **** +--- 1689,1697 ---- + unsigned int labels; + isc_boolean_t saw_root = ISC_FALSE; + char num[4]; ++ #ifdef WITH_IDN ++ unsigned int oused = target->used; ++ #endif + + /* + * This function assumes the name is in proper uncompressed +*************** +*** 1859,1864 **** +--- 1869,1878 ---- + + isc_buffer_add(target, tlen - trem); + ++ #ifdef WITH_IDN ++ if (totext_filter_proc != NULL) ++ return ((*totext_filter_proc)(target, oused, saw_root)); ++ #endif + return (ISC_R_SUCCESS); + } + +*************** +*** 3315,3317 **** +--- 3329,3337 ---- + return (ISC_R_SUCCESS); + } + ++ #ifdef WITH_IDN ++ void ++ dns_name_settotextfilter(dns_name_totextfilter_t proc) { ++ totext_filter_proc = proc; ++ } ++ #endif +Index: lib/dns/include/dns/name.h +diff -c mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.1.1.7 mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.10 +*** lib/dns/include/dns/name.h Wed May 22 17:15:29 2002 +--- lib/dns/include/dns/name.h Mon May 27 12:10:15 2002 +*************** +*** 219,224 **** +--- 219,235 ---- + */ + #define DNS_NAME_MAXWIRE 255 + ++ #ifdef WITH_IDN ++ /* ++ * Text output filter procedure. ++ * 'target' is the buffer to be converted. The region to be converted ++ * is from 'buffer'->base + 'used_org' to the end of the used region. ++ */ ++ typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, ++ unsigned int used_org, ++ isc_boolean_t absolute); ++ #endif ++ + /*** + *** Initialization + ***/ +*************** +*** 1244,1249 **** +--- 1255,1268 ---- + * 'size' > 0. + * + */ ++ ++ #ifdef WITH_IDN ++ void ++ dns_name_settotextfilter(dns_name_totextfilter_t proc); ++ /* ++ * Call 'proc' at the end of dns_name_totext. ++ */ ++ #endif /* WITH_IDN */ + + #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) + /* diff --git a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.2-patch b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.2-patch new file mode 100644 index 0000000000..151f9dd9d6 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.2.2-patch @@ -0,0 +1,1169 @@ +IDN patch for bind-9.2.2 +======================== + + +This is a patch file for ISC BIND 9.2.2 to make it work with +internationalized domain names. With this patch you'll get IDN-aware +dig/host/nslookup. + +To apply this patch, you should go to the top directory of the BIND +distribution (where you see `README' file), then invoke `patch' +command like this: + + % patch -p0 < this-file + +Then follow the instructions described in `README.idnkit' to compile +and install. + + +Index: README.idnkit +diff -c /dev/null mdn/othersrc/bind9/README.idnkit:1.3 +*** README.idnkit Tue Mar 11 08:55:20 2003 +--- README.idnkit Mon Mar 10 09:47:41 2003 +*************** +*** 0 **** +--- 1,113 ---- ++ ++ BIND-9 IDN patch ++ ++ Japan Network Information Center (JPNIC) ++ ++ ++ * What is this patch for? ++ ++ This patch adds internationalized domain name (IDN) support to BIND-9. ++ You'll get internationalized version of dig/host/nslookup commands. ++ ++ + internationalized dig/host/nslookup ++ dig/host/nslookup accepts non-ASCII domain names in the local ++ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by ++ the locale information. The domain names are normalized and ++ converted to the encoding on the DNS protocol, and sent to DNS ++ servers. The replies are converted back to the local codeset ++ and displayed. ++ ++ ++ * Compilation & installation ++ ++ 0. Prerequisite ++ ++ You have to build and install idnkit before building this patched version ++ of bind-9. ++ ++ 1. Running configure script ++ ++ Run `configure' in the top directory. See `README' for the ++ configuration options. ++ ++ This patch adds the following 4 options to `configure'. You should ++ at least specify `--with-idn' option to enable IDN support. ++ ++ --with-idn[=IDN_PREFIX] ++ To enable IDN support, you have to specify `--with-idn' option. ++ The argument IDN_PREFIX is the install prefix of idnkit. If ++ IDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') ++ is assumed. ++ ++ --with-libiconv[=LIBICONV_PREFIX] ++ Specify this option if idnkit you have installed links GNU ++ libiconv. The argument LIBICONV_PREFIX is install prefix of ++ GNU libiconv. If the argument is omitted, PREFIX (derived ++ from `--prefix=PREFIX') is assumed. ++ ++ `--with-libiconv' is shorthand option for GNU libiconv. ++ ++ --with-libiconv=/usr/local ++ ++ This is equivalent to: ++ ++ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' ++ ++ `--with-libiconv' assumes that your C compiler has `-R' ++ option, and that the option adds the specified run-time path ++ to an exacutable binary. If `-R' option of your compiler has ++ different meaning, or your compiler lacks the option, you ++ should use `--with-iconv' option instead. Binary command ++ without run-time path information might be unexecutable. ++ In that case, you would see an error message like: ++ ++ error in loading shared libraries: libiconv.so.2: cannot ++ open shared object file ++ ++ If both `--with-libiconv' and `--with-iconv' options are ++ specified, `--with-iconv' is prior to `--with-libiconv'. ++ ++ --with-iconv=ICONV_LIBSPEC ++ If your libc doens't provide iconv(), you need to specify the ++ library containing iconv() with this option. `ICONV_LIBSPEC' ++ is the argument(s) to `cc' or `ld' to link the library, for ++ example, `--with-iconv="-L/usr/local/lib -liconv"'. ++ You don't need to specify the header file directory for "iconv.h" ++ to the compiler, as it isn't included directly by bind-9 with ++ this patch. ++ ++ --with-idnlib=IDN_LIBSPEC ++ With this option, you can explicitly specify the argument(s) ++ to `cc' or `ld' to link the idnkit's library, `libidnkit'. If ++ this option is not specified, `-L${PREFIX}/lib -lidnkit' is ++ assumed, where ${PREFIX} is the installation prefix specified ++ with `--with-idn' option above. You may need to use this ++ option to specify extra argments, for example, ++ `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'. ++ ++ Please consult `README' for other configuration options. ++ ++ Note that if you want to specify some extra header file directories, ++ you should use the environment variable STD_CINCLUDES instead of ++ CFLAGS, as described in README. ++ ++ 2. Compilation and installation ++ ++ After running "configure", just do ++ ++ make ++ make install ++ ++ for compiling and installing. ++ ++ ++ * Contact information ++ ++ Please see http//www.nic.ad.jp/en/idn/ for the latest news ++ about idnkit and this patch. ++ ++ Bug reports and comments on this kit should be sent to ++ mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. ++ ++ ++ ; $Id: bind-9.2.2-patch,v 1.1 2003/06/04 00:27:32 marka Exp $ +Index: config.h.in +diff -c mdn/othersrc/bind9/config.h.in:1.1.1.6 mdn/othersrc/bind9/config.h.in:1.12 +*** config.h.in Tue Nov 27 16:55:45 2001 +--- config.h.in Tue Mar 19 16:45:35 2002 +*************** +*** 141,146 **** +--- 141,149 ---- + /* define if you have strerror in the C library. */ + #undef HAVE_STRERROR + ++ /* Define if you have the setlocale function. */ ++ #undef HAVE_SETLOCALE ++ + /* Define if you have the header file. */ + #undef HAVE_DLFCN_H + +*************** +*** 150,155 **** +--- 153,161 ---- + /* Define if you have the header file. */ + #undef HAVE_LINUX_CAPABILITY_H + ++ /* Define if you have the header file. */ ++ #undef HAVE_LOCALE_H ++ + /* Define if you have the header file. */ + #undef HAVE_SYS_PRCTL_H + +*************** +*** 176,178 **** +--- 182,188 ---- + + /* Define if you have the socket library (-lsocket). */ + #undef HAVE_LIBSOCKET ++ ++ /* define if idnkit support is to be included. */ ++ #undef WITH_IDN ++ +Index: configure +diff -c mdn/othersrc/bind9/configure:1.1.1.10 mdn/othersrc/bind9/configure:1.16 +*** configure Wed Mar 5 17:14:55 2003 +--- configure Thu Mar 6 20:10:05 2003 +*************** +*** 1007,1012 **** +--- 1007,1016 ---- + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-pic try to use only PIC/non-PIC objects default=use both + --with-kame=PATH use Kame IPv6 default path /usr/local/v6 ++ --with-idn=MPREFIX enable IDN support using idnkit default PREFIX ++ --with-libiconv=IPREFIX GNU libiconv are in IPREFIX default PREFIX ++ --with-iconv=LIBSPEC specify iconv library default -liconv ++ --with-idnlib=ARG specify libidnkit + + Some influential environment variables: + CC C compiler command +*************** +*** 7371,7377 **** + case $host in + *-*-irix6*) + # Find out which ABI we are using. +! echo '#line 7374 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +--- 7375,7381 ---- + case $host in + *-*-irix6*) + # Find out which ABI we are using. +! echo '#line 7378 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +*************** +*** 7914,7920 **** + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" + compiler_c_o=no +! if { (eval echo configure:7917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then +--- 7918,7924 ---- + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" + compiler_c_o=no +! if { (eval echo configure:7921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s out/conftest.err; then +*************** +*** 9599,9605 **** + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&5 ++ echo "$as_me: error: You must specify ARG for --with-idnlib." >&2;} ++ { (exit 1); exit 1; }; } ++ fi ++ ++ IDNLIBS= ++ if test "$use_idn" != no; then ++ ++ cat >>confdefs.h <<\_ACEOF ++ #define WITH_IDN 1 ++ _ACEOF ++ ++ STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" ++ if test "$idnlib" != no; then ++ IDNLIBS="$idnlib $iconvlib" ++ else ++ IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" ++ fi ++ fi ++ ++ ++ ++ for ac_header in locale.h ++ do ++ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++ if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ fi ++ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ else ++ # Is the header compilable? ++ echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 ++ cat >conftest.$ac_ext <<_ACEOF ++ #line $LINENO "configure" ++ #include "confdefs.h" ++ $ac_includes_default ++ #include <$ac_header> ++ _ACEOF ++ rm -f conftest.$ac_objext ++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_header_compiler=yes ++ else ++ echo "$as_me: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_header_compiler=no ++ fi ++ rm -f conftest.$ac_objext conftest.$ac_ext ++ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++ echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++ # Is the header present? ++ echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 ++ cat >conftest.$ac_ext <<_ACEOF ++ #line $LINENO "configure" ++ #include "confdefs.h" ++ #include <$ac_header> ++ _ACEOF ++ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 ++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++ ac_status=$? ++ egrep -v '^ *\+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null; then ++ if test -s conftest.err; then ++ ac_cpp_err=$ac_c_preproc_warn_flag ++ else ++ ac_cpp_err= ++ fi ++ else ++ ac_cpp_err=yes ++ fi ++ if test -z "$ac_cpp_err"; then ++ ac_header_preproc=yes ++ else ++ echo "$as_me: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ ac_header_preproc=no ++ fi ++ rm -f conftest.err conftest.$ac_ext ++ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++ echo "${ECHO_T}$ac_header_preproc" >&6 ++ ++ # So? What about this header? ++ case $ac_header_compiler:$ac_header_preproc in ++ yes:no ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; ++ no:yes ) ++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++ echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; ++ esac ++ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ++ if eval "test \"\${$as_ac_Header+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ else ++ eval "$as_ac_Header=$ac_header_preproc" ++ fi ++ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 ++ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ ++ fi ++ if test `eval echo '${'$as_ac_Header'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++ _ACEOF ++ ++ fi ++ ++ done ++ ++ ++ for ac_func in setlocale ++ do ++ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++ if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++ else ++ cat >conftest.$ac_ext <<_ACEOF ++ #line $LINENO "configure" ++ #include "confdefs.h" ++ /* From autoconf 2.57 */ ++ /* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++ #define $ac_func innocuous_$ac_func ++ ++ /* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++ #ifdef __STDC__ ++ # include ++ #else ++ # include ++ #endif ++ ++ #undef $ac_func ++ ++ /* Override any gcc2 internal prototype to avoid an error. */ ++ #ifdef __cplusplus ++ extern "C" ++ { ++ #endif ++ /* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++ char $ac_func (); ++ /* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++ choke me ++ #else ++ char (*f) () = $ac_func; ++ #endif ++ #ifdef __cplusplus ++ } ++ #endif ++ ++ #ifdef F77_DUMMY_MAIN ++ # ifdef __cplusplus ++ extern "C" ++ # endif ++ int F77_DUMMY_MAIN() { return 1; } ++ #endif ++ int ++ main () ++ { ++ return f != $ac_func; ++ ; ++ return 0; ++ } ++ _ACEOF ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++ else ++ echo "$as_me: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ eval "$as_ac_var=no" ++ fi ++ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ fi ++ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ++ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++ _ACEOF ++ ++ fi ++ done ++ ++ ++ # + # Substitutions + # + +*************** +*** 14061,14066 **** +--- 14371,14377 ---- + s,@PRINTSTYLE@,$PRINTSTYLE,;t t + s,@XMLDCL@,$XMLDCL,;t t + s,@DOCBOOK2MANSPEC@,$DOCBOOK2MANSPEC,;t t ++ s,@IDNLIBS@,$IDNLIBS,;t t + s,@BIND9_TOP_BUILDDIR@,$BIND9_TOP_BUILDDIR,;t t + s,@BIND9_ISC_BUILDINCLUDE@,$BIND9_ISC_BUILDINCLUDE,;t t + s,@BIND9_ISCCC_BUILDINCLUDE@,$BIND9_ISCCC_BUILDINCLUDE,;t t +Index: configure.in +diff -c mdn/othersrc/bind9/configure.in:1.1.1.10 mdn/othersrc/bind9/configure.in:1.16 +*** configure.in Wed Mar 5 17:14:56 2003 +--- configure.in Wed Mar 5 17:37:08 2003 +*************** +*** 1681,1686 **** +--- 1681,1762 ---- + NOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees) + + # ++ # IDN support ++ # ++ AC_ARG_WITH(idn, ++ [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]], ++ use_idn="$withval", use_idn="no") ++ case "$use_idn" in ++ yes) ++ if test X$prefix = XNONE ; then ++ idn_path=/usr/local ++ else ++ idn_path=$prefix ++ fi ++ ;; ++ no) ++ ;; ++ *) ++ idn_path="$use_idn" ++ ;; ++ esac ++ ++ iconvinc= ++ iconvlib= ++ AC_ARG_WITH(libiconv, ++ [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], ++ use_libiconv="$withval", use_libiconv="no") ++ case "$use_libiconv" in ++ yes) ++ if test X$prefix = XNONE ; then ++ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" ++ else ++ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" ++ fi ++ ;; ++ no) ++ iconvlib= ++ ;; ++ *) ++ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" ++ ;; ++ esac ++ ++ AC_ARG_WITH(iconv, ++ [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], ++ iconvlib="$withval") ++ case "$iconvlib" in ++ no) ++ iconvlib= ++ ;; ++ yes) ++ iconvlib=-liconv ++ ;; ++ esac ++ ++ AC_ARG_WITH(idnlib, ++ [ --with-idnlib=ARG specify libidnkit], ++ idnlib="$withval", idnlib="no") ++ if test "$idnlib" = yes; then ++ AC_MSG_ERROR([You must specify ARG for --with-idnlib.]) ++ fi ++ ++ IDNLIBS= ++ if test "$use_idn" != no; then ++ AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.]) ++ STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" ++ if test "$idnlib" != no; then ++ IDNLIBS="$idnlib $iconvlib" ++ else ++ IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" ++ fi ++ fi ++ AC_SUBST(IDNLIBS) ++ ++ AC_CHECK_HEADERS(locale.h) ++ AC_CHECK_FUNCS(setlocale) ++ ++ # + # Substitutions + # + AC_SUBST(BIND9_TOP_BUILDDIR) +Index: bin/dig/Makefile.in +diff -c mdn/othersrc/bind9/bin/dig/Makefile.in:1.1.1.6 mdn/othersrc/bind9/bin/dig/Makefile.in:1.3 +*** bin/dig/Makefile.in Tue Nov 27 16:55:50 2001 +--- bin/dig/Makefile.in Tue Mar 19 16:45:35 2002 +*************** +*** 36,42 **** + + DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} + +! LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ + + SUBDIRS = + +--- 36,42 ---- + + DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} + +! LIBS = ${DNSLIBS} ${ISCLIBS} @IDNLIBS@ @LIBS@ + + SUBDIRS = + +Index: bin/dig/dig.1 +diff -c mdn/othersrc/bind9/bin/dig/dig.1:1.1.1.3 mdn/othersrc/bind9/bin/dig/dig.1:1.5 +*** bin/dig/dig.1 Wed Mar 5 17:14:57 2003 +--- bin/dig/dig.1 Wed Mar 5 17:42:53 2003 +*************** +*** 349,354 **** +--- 349,365 ---- + \fI+noqr\fR which means that \fBdig\fR + will not print the initial query when it looks up the NS records for + isc.org. ++ .SH "IDN SUPPORT" ++ .PP ++ If \fBdig\fR has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ \fBdig\fR appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the \fBIDN_DISABLE\fR environment variable. ++ The IDN support is disabled if the the variable is set when ++ \fBdig\fR runs. + .SH "FILES" + .PP + \fI/etc/resolv.conf\fR +Index: bin/dig/dig.docbook +diff -c mdn/othersrc/bind9/bin/dig/dig.docbook:1.1.1.3 mdn/othersrc/bind9/bin/dig/dig.docbook:1.5 +*** bin/dig/dig.docbook Wed Mar 5 17:14:57 2003 +--- bin/dig/dig.docbook Wed Mar 5 17:42:53 2003 +*************** +*** 523,528 **** +--- 523,543 ---- + + + ++ IDN SUPPORT ++ ++ If dig has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ dig appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the IDN_DISABLE environment variable. ++ The IDN support is disabled if the the variable is set when ++ dig runs. ++ ++ ++ ++ + FILES + + /etc/resolv.conf +Index: bin/dig/dighost.c +diff -c mdn/othersrc/bind9/bin/dig/dighost.c:1.1.1.13 mdn/othersrc/bind9/bin/dig/dighost.c:1.33 +*** bin/dig/dighost.c Wed Mar 5 17:14:57 2003 +--- bin/dig/dighost.c Wed Mar 5 17:42:53 2003 +*************** +*** 32,37 **** +--- 32,48 ---- + #include + #include + ++ #ifdef HAVE_LOCALE_H ++ #include ++ #endif ++ ++ #ifdef WITH_IDN ++ #include ++ #include ++ #include ++ #include ++ #endif ++ + #include + #include + #include +*************** +*** 130,135 **** +--- 141,158 ---- + isc_mutex_t lookup_lock; + dig_lookup_t *current_lookup = NULL; + ++ #ifdef WITH_IDN ++ static void initialize_idn(void); ++ static isc_result_t output_filter(isc_buffer_t *buffer, ++ unsigned int used_org, ++ isc_boolean_t absolute); ++ static idn_result_t append_textname(char *name, const char *origin, ++ size_t namesize); ++ static void idn_check_result(idn_result_t r, const char *msg); ++ ++ #define MAXDLEN 256 ++ #endif ++ + /* + * Apply and clear locks at the event level in global task. + * Can I get rid of these using shutdown events? XXX +*************** +*** 648,653 **** +--- 671,680 ---- + ISC_LIST_APPEND(server_list, srv, link); + } + ++ #ifdef WITH_IDN ++ initialize_idn(); ++ #endif ++ + if (keyfile[0] != 0) + setup_file_key(); + else if (keysecret[0] != 0) +*************** +*** 1168,1173 **** +--- 1195,1208 ---- + isc_buffer_t b; + dns_compress_t cctx; + char store[MXNAME]; ++ #ifdef WITH_IDN ++ idn_result_t mr; ++ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; ++ #endif ++ ++ #ifdef WITH_IDN ++ dns_name_settotextfilter(output_filter); ++ #endif + + REQUIRE(lookup != NULL); + INSIST(!free_now); +*************** +*** 1196,1201 **** +--- 1231,1247 ---- + isc_buffer_init(&lookup->onamebuf, lookup->onamespace, + sizeof(lookup->onamespace)); + ++ #ifdef WITH_IDN ++ /* ++ * We cannot convert `textname' and `origin' separately. ++ * `textname' doesn't contain TLD, but local mapping needs ++ * TLD. ++ */ ++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname, ++ utf8_textname, sizeof(utf8_textname)); ++ idn_check_result(mr, "convert textname to UTF-8"); ++ #endif ++ + /* + * If the name has too many dots, force the origin to be NULL + * (which produces an absolute lookup). Otherwise, take the origin +*************** +*** 1204,1215 **** +--- 1250,1290 ---- + * is TRUE or we got a domain line in the resolv.conf file. + */ + /* XXX New search here? */ ++ #ifdef WITH_IDN ++ if ((count_dots(utf8_textname) >= ndots) || !usesearch) ++ lookup->origin = NULL; /* Force abs lookup */ ++ else if (lookup->origin == NULL && lookup->new_search && usesearch) { ++ lookup->origin = ISC_LIST_HEAD(search_list); ++ } ++ #else + if ((count_dots(lookup->textname) >= ndots) || !usesearch) + lookup->origin = NULL; /* Force abs lookup */ + else if (lookup->origin == NULL && lookup->new_search && usesearch) { + lookup->origin = ISC_LIST_HEAD(search_list); + } ++ #endif ++ ++ #ifdef WITH_IDN + if (lookup->origin != NULL) { ++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, ++ lookup->origin->origin, utf8_origin, ++ sizeof(utf8_origin)); ++ idn_check_result(mr, "convert origin to UTF-8"); ++ mr = append_textname(utf8_textname, utf8_origin, ++ sizeof(utf8_textname)); ++ idn_check_result(mr, "append origin to textname"); ++ } ++ mr = idn_encodename(IDN_LOCALMAP | IDN_NAMEPREP | IDN_ASCCHECK | ++ IDN_IDNCONV | IDN_LENCHECK, utf8_textname, ++ idn_textname, sizeof(idn_textname)); ++ idn_check_result(mr, "convert UTF-8 textname to IDN encoding"); ++ #endif ++ ++ #ifdef WITH_IDN ++ if (0) { ++ #else ++ if (lookup->origin != NULL) { ++ #endif + debug("trying origin %s", lookup->origin->origin); + result = dns_message_gettempname(lookup->sendmsg, + &lookup->oname); +*************** +*** 1254,1259 **** +--- 1329,1343 ---- + if (lookup->trace && lookup->trace_root) + dns_name_clone(dns_rootname, lookup->name); + else { ++ #ifdef WITH_IDN ++ len = strlen(idn_textname); ++ isc_buffer_init(&b, idn_textname, len); ++ isc_buffer_add(&b, len); ++ result = dns_name_fromtext(lookup->name, &b, ++ dns_rootname, ++ ISC_FALSE, ++ &lookup->namebuf); ++ #else + len = strlen(lookup->textname); + isc_buffer_init(&b, lookup->textname, len); + isc_buffer_add(&b, len); +*************** +*** 1261,1266 **** +--- 1345,1351 ---- + dns_rootname, + ISC_FALSE, + &lookup->namebuf); ++ #endif + } + if (result != ISC_R_SUCCESS) { + dns_message_puttempname(lookup->sendmsg, +*************** +*** 2663,2665 **** +--- 2748,2848 ---- + if (mctx != NULL) + isc_mem_destroy(&mctx); + } ++ ++ #ifdef WITH_IDN ++ static void ++ initialize_idn(void) { ++ idn_result_t r; ++ ++ #ifdef HAVE_SETLOCALE ++ /* Set locale */ ++ (void)setlocale(LC_ALL, ""); ++ #endif ++ /* Create configuration context. */ ++ r = idn_nameinit(1); ++ if (r != idn_success) ++ fatal("idn api initialization failed: %s", ++ idn_result_tostring(r)); ++ ++ /* Set domain name -> text post-conversion filter. */ ++ dns_name_settotextfilter(output_filter); ++ } ++ ++ static isc_result_t ++ output_filter(isc_buffer_t *buffer, unsigned int used_org, ++ isc_boolean_t absolute) ++ { ++ char tmp1[MAXDLEN], tmp2[MAXDLEN]; ++ size_t fromlen, tolen; ++ isc_boolean_t end_with_dot; ++ ++ /* ++ * Copy contents of 'buffer' to 'tmp1', supply trailing dot ++ * if 'absolute' is true, and terminate with NUL. ++ */ ++ fromlen = isc_buffer_usedlength(buffer) - used_org; ++ if (fromlen >= MAXDLEN) ++ return (ISC_R_SUCCESS); ++ memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); ++ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; ++ if (absolute && !end_with_dot) { ++ fromlen++; ++ if (fromlen >= MAXDLEN) ++ return (ISC_R_SUCCESS); ++ tmp1[fromlen - 1] = '.'; ++ } ++ tmp1[fromlen] = '\0'; ++ ++ /* ++ * Convert contents of 'tmp1' to local encoding. ++ */ ++ if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success) ++ return (ISC_R_SUCCESS); ++ strcpy(tmp1, tmp2); ++ ++ /* ++ * Copy the converted contents in 'tmp1' back to 'buffer'. ++ * If we have appended trailing dot, remove it. ++ */ ++ tolen = strlen(tmp1); ++ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') ++ tolen--; ++ ++ if (isc_buffer_length(buffer) < used_org + tolen) ++ return (ISC_R_NOSPACE); ++ ++ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); ++ memcpy(isc_buffer_used(buffer), tmp1, tolen); ++ isc_buffer_add(buffer, tolen); ++ ++ return (ISC_R_SUCCESS); ++ } ++ ++ static idn_result_t ++ append_textname(char *name, const char *origin, size_t namesize) { ++ size_t namelen = strlen(name); ++ size_t originlen = strlen(origin); ++ ++ /* Already absolute? */ ++ if (namelen > 0 && name[namelen - 1] == '.') ++ return idn_success; ++ ++ /* Append dot and origin */ ++ ++ if (namelen + 1 + originlen >= namesize) ++ return idn_buffer_overflow; ++ ++ name[namelen++] = '.'; ++ (void)strcpy(name + namelen, origin); ++ return idn_success; ++ } ++ ++ static void ++ idn_check_result(idn_result_t r, const char *msg) { ++ if (r != idn_success) { ++ exitcode = 1; ++ fatal("%s: %s", msg, idn_result_tostring(r)); ++ } ++ } ++ ++ #endif /* WITH_IDN */ +Index: bin/dig/host.1 +diff -c mdn/othersrc/bind9/bin/dig/host.1:1.1.1.2 mdn/othersrc/bind9/bin/dig/host.1:1.4 +*** bin/dig/host.1 Wed Mar 5 17:14:57 2003 +--- bin/dig/host.1 Wed Mar 5 17:42:53 2003 +*************** +*** 120,125 **** +--- 120,136 ---- + effectively wait forever for a reply. The time to wait for a response + will be set to the number of seconds given by the hardware's maximum + value for an integer quantity. ++ .SH "IDN SUPPORT" ++ .PP ++ If \fBhost\fR has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ \fBhost\fR appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the \fBIDN_DISABLE\fR environment variable. ++ The IDN support is disabled if the the variable is set when ++ \fBhost\fR runs. + .SH "FILES" + .PP + \fI/etc/resolv.conf\fR +Index: bin/dig/host.docbook +diff -c mdn/othersrc/bind9/bin/dig/host.docbook:1.1.1.2 mdn/othersrc/bind9/bin/dig/host.docbook:1.4 +*** bin/dig/host.docbook Wed Mar 5 17:14:57 2003 +--- bin/dig/host.docbook Wed Mar 5 17:42:53 2003 +*************** +*** 181,186 **** +--- 181,201 ---- + + + ++ IDN SUPPORT ++ ++ If host has been built with IDN (internationalized ++ domain name) support, it can accept and display non-ASCII domain names. ++ host appropriately converts character encoding of ++ domain name before sending a request to DNS server or displaying a ++ reply from the server. ++ If you'd like to turn off the IDN support for some reason, defines ++ the IDN_DISABLE environment variable. ++ The IDN support is disabled if the the variable is set when ++ host runs. ++ ++ ++ ++ + FILES + + /etc/resolv.conf +Index: lib/dns/name.c +diff -c mdn/othersrc/bind9/lib/dns/name.c:1.1.1.11 mdn/othersrc/bind9/lib/dns/name.c:1.15 +*** lib/dns/name.c Wed Mar 5 17:16:22 2003 +--- lib/dns/name.c Wed Mar 5 17:49:58 2003 +*************** +*** 194,199 **** +--- 194,206 ---- + /* XXXDCL make const? */ + dns_name_t *dns_wildcardname = &wild; + ++ #ifdef WITH_IDN ++ /* ++ * dns_name_t to text post-conversion procedure. ++ */ ++ static dns_name_totextfilter_t totext_filter_proc = NULL; ++ #endif ++ + static void + set_offsets(const dns_name_t *name, unsigned char *offsets, + dns_name_t *set_name); +*************** +*** 1684,1689 **** +--- 1691,1699 ---- + unsigned int labels; + isc_boolean_t saw_root = ISC_FALSE; + char num[4]; ++ #ifdef WITH_IDN ++ unsigned int oused = target->used; ++ #endif + + /* + * This function assumes the name is in proper uncompressed +*************** +*** 1861,1866 **** +--- 1871,1880 ---- + + isc_buffer_add(target, tlen - trem); + ++ #ifdef WITH_IDN ++ if (totext_filter_proc != NULL) ++ return ((*totext_filter_proc)(target, oused, saw_root)); ++ #endif + return (ISC_R_SUCCESS); + } + +*************** +*** 3325,3327 **** +--- 3339,3347 ---- + return (ISC_R_SUCCESS); + } + ++ #ifdef WITH_IDN ++ void ++ dns_name_settotextfilter(dns_name_totextfilter_t proc) { ++ totext_filter_proc = proc; ++ } ++ #endif +Index: lib/dns/include/dns/name.h +diff -c mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.1.1.7 mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.10 +*** lib/dns/include/dns/name.h Wed May 22 17:15:29 2002 +--- lib/dns/include/dns/name.h Mon May 27 12:10:15 2002 +*************** +*** 219,224 **** +--- 219,235 ---- + */ + #define DNS_NAME_MAXWIRE 255 + ++ #ifdef WITH_IDN ++ /* ++ * Text output filter procedure. ++ * 'target' is the buffer to be converted. The region to be converted ++ * is from 'buffer'->base + 'used_org' to the end of the used region. ++ */ ++ typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, ++ unsigned int used_org, ++ isc_boolean_t absolute); ++ #endif ++ + /*** + *** Initialization + ***/ +*************** +*** 1244,1249 **** +--- 1255,1268 ---- + * 'size' > 0. + * + */ ++ ++ #ifdef WITH_IDN ++ void ++ dns_name_settotextfilter(dns_name_totextfilter_t proc); ++ /* ++ * Call 'proc' at the end of dns_name_totext. ++ */ ++ #endif /* WITH_IDN */ + + #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) + /* diff --git a/contrib/idn/idnkit-1.0-src/tools/Makefile.in b/contrib/idn/idnkit-1.0-src/tools/Makefile.in new file mode 100644 index 0000000000..4ccc7e9d5b --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/Makefile.in @@ -0,0 +1,65 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:27:05 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +SUBDIRS = idnconv runidn + +SHELL = @SHELL@ + +all: all-subdirs +install: install-subdirs +clean: clean-subdirs +distclean: distclean-localdir distclean-subdirs +test check: test-subdirs + +all-subdirs install-subdirs clean-subdirs distclean-subdirs test-subdirs: + @target=`echo $@ | sed 's/-subdirs$$//'`; \ + for d in $(SUBDIRS); do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) $$target); \ + done + +distclean-localdir: + rm -f Makefile diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in b/contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in new file mode 100644 index 0000000000..72af9136fd --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in @@ -0,0 +1,116 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:27:05 marka Exp $ +# Copyright (c) 2000, 2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +top_builddir = ../.. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 + +CC = @CC@ +RANLIB = @RANLIB@ +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ +LIBTOOL = @LIBTOOL@ + +ICONVINC = @ICONVINC@ +ICONVLIB = @ICONVLIB@ +IDNLIB = ../../lib/libidnkit.la + +INCS = -I$(srcdir) -I$(srcdir)/../../include -I../../include $(ICONVINC) +DEFS = + +CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +SRCS = idnconv.c util.c selectiveencode.c +OBJS = idnconv.o util.o selectiveencode.o + +@LITEONLY_TRUE@all: +@LITEONLY_FALSE@all: idnconv idnslookup idnconv.1 + +idnconv: $(OBJS) $(IDNLIB) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ + $(OBJS) $(IDNLIB) $(ICONVLIB) + +idnslookup: $(srcdir)/idnslookup.in + sed -e 's%[@]bindir[@]%$(bindir)%' $(srcdir)/idnslookup.in > idnslookup + chmod 0755 idnslookup + +@LITEONLY_TRUE@install: +@LITEONLY_FALSE@@COMPAT_TRUE@install: all install-nolite install-compat +@LITEONLY_FALSE@@COMPAT_FALSE@install: all install-nolite + +install-nolite: + $(MKINSTALLDIRS) $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) idnconv \ + $(DESTDIR)$(bindir)/idnconv + $(MKINSTALLDIRS) $(DESTDIR)$(man1dir) + $(INSTALL_DATA) $(srcdir)/idnconv.1 $(DESTDIR)$(man1dir)/idnconv.1 + +install-compat: + src=$(DESTDIR)$(bindir)/idnconv; \ + dst=$(DESTDIR)$(bindir)/mdnconv; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + src=$(DESTDIR)$(man1dir)/idnconv.1; \ + dst=$(DESTDIR)$(man1dir)/mdnconv.1; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + +clean: + rm -f *.o idnconv idnslookup *.core core *~ + rm -fr .libs/ + +distclean: clean + rm -f Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.1 b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.1 new file mode 100644 index 0000000000..3ffe6b8709 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.1 @@ -0,0 +1,373 @@ +.\" $Id: idnconv.1,v 1.1 2003/06/04 00:27:10 marka Exp $ +.\" +.\" Copyright (c) 2000,2001,2002 Japan Network Information Center. +.\" All rights reserved. +.\" +.\" By using this file, you agree to the terms and conditions set forth bellow. +.\" +.\" LICENSE TERMS AND CONDITIONS +.\" +.\" The following License Terms and Conditions apply, unless a different +.\" license is obtained from Japan Network Information Center ("JPNIC"), +.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +.\" Chiyoda-ku, Tokyo 101-0047, Japan. +.\" +.\" 1. Use, Modification and Redistribution (including distribution of any +.\" modified or derived work) in source and/or binary forms is permitted +.\" under this License Terms and Conditions. +.\" +.\" 2. Redistribution of source code must retain the copyright notices as they +.\" appear in each source code file, this License Terms and Conditions. +.\" +.\" 3. Redistribution in binary form must reproduce the Copyright Notice, +.\" this License Terms and Conditions, in the documentation and/or other +.\" materials provided with the distribution. For the purposes of binary +.\" distribution the "Copyright Notice" refers to the following language: +.\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +.\" +.\" 4. The name of JPNIC may not be used to endorse or promote products +.\" derived from this Software without specific prior written approval of +.\" JPNIC. +.\" +.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +.\" +.TH IDNCONV 1 "Mar 3, 2001" +.\" +.SH NAME +idnconv \- codeset converter for named.conf and zone master files +.\" +.SH SYNOPSIS +\fBidnconv\fP [\fIoptions..\fP] [\fIfile\fP...] +.\" +.SH DESCRIPTION +\fBidnconv\fR is a codeset converter for named configuration files +and zone master files. +\fBidnconv\fR performs codeset conversion specified either +by the command-line arguments or by the configuration file, +and writes the converted text to stdout. +.PP +If file name is specified, \fBidnconv\fR converts the contents of +the file. +Otherwise, \fBidnconv\fR converts \fIstdin\fR. +.PP +Since \fBidnconv\fR is specifically designed for converting +internatinalized domain names, it may not be suitable as a general +codeset converter. +.\" +.SH "OPERATION MODES" +\fBidnconv\fR has two operation modes. +.PP +One is a mode to convert local-encoded domain names to IDN-encoded +one. Usually this mode is used for preparing domain names to be +listed in named configuration files or zone master files. +In this mode, the following processes are performed in addition to +the codeset (encoding) conversion. +.RS 2 +.IP \- 2 +local mapping +.IP \- 2 +standard domain name preperation (NAMEPREP) +.RE +.PP +The other mode is a reverse conversion, from IDN-encoded domain name to +local-encoded domain names. +In this mode, local mapping and NAMEPREP are not performed since +IDN-encoded names should already be normalized. +Instead, a check is done in order to make sure the IDN-encoded domain name +is properly NAMEPREP'ed. If it is not, the name will be output in +IDN encoding, not in the local encoding. +.\" +.SH OPTIONS +Normally \fBidnconv\fR reads system's default configuration file +(idn.conf) and performs conversion or name preparation according to +the parameters specified in the file. +You can override the setting in the configuration file by various +command line options below. +.TP 4 +\fB\-in\fP \fIin-code\fP, \fB\-i\fP \fIin-code\fP +Specify the codeset name of the input text. +Any of the following codeset names can be specified. +.RS 4 +.IP "\(bu" 2 +Any codeset names which \fIiconv_open()\fP library function accepts +.IP "\(bu" 2 +\f(CWPunycode\fR +.IP "\(bu" 2 +\f(CWUTF-8\fR +.IP "\(bu" 2 +Any alias names for the above, defined by the codeset alias file. +.RE +.IP "" 4 +If this option is not specified, the default codeset is determined +from the locale in normal conversion mode. +In reverse conversion mode, the default codeset is the IDN encoding +specified by the configuration file (``idn-encoding'' entry). +.TP 4 +\fB\-out\fP \fIout-code\fP, \fB\-o\fP \fIout-code\fP +Specify the codeset name of the output text. \fIout-code\fP can be any +codeset name that can be specified for \fB\-in\fR option. +.IP "" 4 +If this option is not specified, the default is the IDN encoding +specified by the configuration file (``idn-encoding'' entry) in +normal conversion mode. +In reverse conversion mode, the default codeset is determined from +the locale. +.TP 4 +\fB\-conf\fP \fIpath\fP, \fB\-c\fP \fIpath\fP +Specify the pathname of idnkit configuration file (``idn.conf''). +If not specified, system's default file is used, unless \-noconf +option is specified. +.TP 4 +\fB\-noconf\fP, \fB\-C\fP +Specify that no configuration file is to be used. +.TP 4 +\fB\-reverse\fP, \fB\-r\fP +Specify reverse conversion mode. +.br +If this option is not specified, the normal conversion mode is used. +.TP 4 +\fB\-nameprep\fR \fIversion\fR, \fB\-n\fR \fIversion\fR +Specify the version of NAMEPREP. +The following is a list of currently available versions. +.RS 4 +.IP \f(CWRFC3491\fR 4 +Perform NAMEPREP according to the RFC3491 +``rfc-3491.txt''. +.RE +.TP 4 +\fB\-nonameprep\fR, \fB\-N\fR +Specify to skip NAMEPREP process (or NAMEPREP verification process +in the reverse conversion mode). +This option implies -nounassigncheck and -nobidicheck. +.TP 4 +\fB\-localmap\fR \fImap\fR +Specify the name of local mapping rule. +Currently, following maps are available. +.RS 4 +.IP \f(CWRFC3491\fR 4 +Use the list of mappings specified by RFC3491. +.IP \f(CWfilemap:\fR\fIpath\fR 4 +Use list of mappings specified by mapfile \fIpath\fR. +See idn.conf(5) for the format of a mapfile. +.RE +.IP "" 4 +This option can be specified more than once. +In that case, each mapping will be performed in the order of the +specification. +.TP 4 +\fB\-nounassigncheck\fR, \fB\-U\fR +Skip unassigned codepoint check. +.TP 4 +\fB\-nobidicheck\fR, \fB\-B\fR +Skip bidi character check. +.TP 4 +\fB\-nolengthcheck\fR +Do not check label length of normal conversion result. +This option is only meaningful in the normal conversion mode. +.TP 4 +\fB\-noasciicheck\fR, \fB\-A\fR +Do not check ASCII range characters. +This option is only meaningful in the normal conversion mode. +.TP 4 +\fB\-noroundtripcheck\fR +Do not perform round trip check. +This option is only meaningful in the reverse conversion mode. +.TP 4 +\fB\-delimiter\fR \fIcodepoint\fP +Specify the character to be mapped to domain name delimiter (period). +This option can be specified more than once in order to specify multiple +characters. +.br +This option is only meaningful in the normal conversion mode. +.TP 4 +\fB\-whole\fP, \fB\-w\fP +Perform local mapping, nameprep and conversion to output codeset for the entire +input text. If this option is not specified, only non-ASCII characters +and their surrounding texts will be processed. +See ``NORAML CONVERSION MECHANISM'' and ``REVERSE CONVERSION MECHANISM'' +for details. +.TP 4 +\fB\-alias\fP \fIpath\fP, \fB\-a\fP \fIpath\fP +Specify a codeset alias file. It is a simple text file, where +each line has a pair of alias name and real name separated by one +or more white spaces like below: +.nf +.ft CW + + \fIalias-codeset-name\fP \fIreal-codeset-name\fP + +.ft R +.fi +Lines starting with ``#'' are treated as comments. +.TP 4 +\fB\-flush\fP +Force line-buffering mode. +.TP 4 +\fB\-version\fP, \fB\-v\fP +Print version information and quit. +.\" +.SH LOCAL CODESET +idnconv guesses local codeset from locale and environment variables. +See the ``LOCAL CODESET'' section in idn.conf(5) for more details. +.\" +.SH NORMAL CONVERSION MECHANISM +\fBidnconv\fR performs conversion line by line. +Here describes how \fBidnconv\fR does its job for each line. +.\" +.IP "1. read a line from input text" 4 +.IP "2. convert the line to UTF-8" 4 +\fBidnconv\fR converts the line from local encoding to UTF-8. +.IP "3. find internationalized domain names" 4 +If the \-whole\ (or \-w) option is specified, the entire line is +assumed as an internationalized domain name. +Otherwise, \fBidnconv\fR recognizes any character sequences having +the following properties in the line as internationalized domain names. +.RS 4 +.IP "\(bu" 2 +containing at least one non-ASCII character, and +.IP "\(bu" 2 +consisting of legal domain name characters (alphabets, digits, hypens), +non-ASCII characters and period. +.RE +.IP "4. convert internationalized domain names to ACE" 4 +For each internationalized domain name found in the line, +\fBidnconv\fR converts the name to ACE. +The details about the conversion procedure is: +.RS 4 +.IP "4.1. delimiter mapping" 4 +Substibute certain characters specified as domain name delimiter +with period. +.IP "4.2. local mapping" 4 +Perform local mapping. +If the local mapping is specified by command line option \-localmap, +the specified mapping rule is applied. Otherwise, find the mapping rule +from the configuration file which matches to the TLD of the name, +and perform mapping according to the matched rule. +.br +This step is skipped if the \-nolocalmap (or \-L) option is specified. +.IP "4.3. NAMEPREP" 4 +Perform name preparation (NAMEPREP). +Mapping, normalization, prohibited character checking, unassigned +codepoint checking, bidirectional character checking are done in +that order. +If the prohibited character check, unassigned codepoint check, or +bidi character check fails, the normal conversion procedure aborts. +.br +This step is skipped if the \-nonameprep (or \-N) option is specified. +.IP "4.4. ASCII character checking" 4 +Checks ASCII range character in the domain name. +the normal conversion procedure aborts, if the domain name has a label +beginning or end with hyphen (U+002D) or it contains ASCII range character +except for alphanumeric and hyphen, +.br +This step is skipped if the \-noasciicheck (or \-A) option is specified. +.IP "4.5. ACE conversion" 4 +Convert the string to ACE. +.IP "4.6. label length checking" 4 +The normal conversion procedure aborts, if the domain name has an empty +label or too long label (64 characters or more). +.br +This step is skipped if the \-nolengthcheck option is specified. +.RE +.IP "5. output the result" 4 +.PP +.\" +.SH REVERSE CONVERSION MECHANISM +This is like the normal conversion mechanism, but they are not symmetric. +\fBidnconv\fR does its job for each line. +.\" +.IP "1. read a line from input text" 4 +.IP "2. convert the line to UTF-8" 4 +\fBidnconv\fR converts the line from local encoding to UTF-8. +.IP "3. find internationalized domain names" 4 +If the \-whole\ (or \-w) option is specified, the entire line is +assumed as an internationalized domain name. +Otherwise, \fBidnconv\fR decodes any valid ASCII domain names +including ACE names in the line. +.IP "4. convert domain names to local encoding" +Then, \fBidnconv\fR decodes the domain names. +The decode procedure consists of the following steps. +.RS 4 +.IP "4.1. Delimiter mapping" 4 +Substibute certain characters specified as domain name delimiter +with period. +.br +.IP "4.2. NAMEPREP" 4 +Perform name preparation (NAMEPREP) for each label in the domain name. +Mapping, normalization, prohibited character checking, unassigned +codepoint checking, bidirectional character checking are done in +that order. +If the prohibited character check, unassigned codepoint check, or +bidi character check fails, disqualified labels are restored to +original input strings and further conversion on those labels are +not performed. +.br +This step is skipped if the \-nonameprep (or \-N) option is specified. +.IP "4.3. ACE conversion" 4 +Convert the string from ACE to UTF-8. +.IP "4.4. Round trip checkning" 4 +For each label, perform the normal conversion and compare it with +the result of the step 4.2. +This check succeeds, if they are equivalent strings. +In case of failure, disqualified labels are restored to original +input strings and further conversion on those labels are not +performed. +.br +This step is skipped if the \-noroundtripcheck option is specified. +.IP "4.5. local encoding conversion" 4 +Convert the result of the step 4.3. from UTF-8 to local encoding. +If a label in the domain name contains a character which cannot be +represented in the local encoding, the label is restored to the +original input string. +.RE +.IP "5. output the result" 4 +.PP +.\" +.SH FILE MANAGEMENT +Maybe the best way to manage named.conf or zone master files that contains +internationalized domain name is to keep them in your local codeset so that +they can be edited with your favorite editor, and generate a version in +the IDN encoding using \fBidnconv\fP. +.PP +`make' is a convenient tool for this purpose. +Suppose the local codeset version has suffix `.lc', and its ACE version +has suffix `.ace'. The following Makefile enables you to generate +ACE version from local codeset version by just typing `make'. +.RS 4 +.nf +.ft CW + +\&.SUFFIXES: .lc .ace +\&.lc.ace: + idnconv -in $(LOCALCODE) -out $(IDNCODE) \\ + $(IDNCONVOPT) $< > $@ + +LOCALCODE = EUC-JP +IDNCODE = Punycode +IDNCONVOPT = + +DESTFILES = db.zone1.ace db.zone2.ace + +all: $(DESTFILES) +.ft +.fi +.RE +.\" +.SH SEE ALSO +idn.conf(5), +iconv(3) +.\" +.SH BUGS +The automatic input-code selection depends on your system, and sometimes +it cannot guess or guess wrong. It is better to explicitly specify it +using \-in option. diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.c b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.c new file mode 100644 index 0000000000..f14fddccda --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnconv.c @@ -0,0 +1,803 @@ +#ifndef lint +static char *rcsid = "$Id: idnconv.c,v 1.1 2003/06/04 00:27:07 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +/* + * idnconv -- Codeset converter for named.conf and zone files + */ + +#include + +#include +#include +#include +#include +#include +#ifdef HAVE_LOCALE_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" + +#define MAX_DELIMITER 10 +#define MAX_LOCALMAPPER 10 +#define MAX_MAPPER 10 +#define MAX_NORMALIZER 10 +#define MAX_CHEKER 10 + +#define FLAG_REVERSE 0x0001 +#define FLAG_DELIMMAP 0x0002 +#define FLAG_LOCALMAP 0x0004 +#define FLAG_MAP 0x0008 +#define FLAG_NORMALIZE 0x0010 +#define FLAG_PROHIBITCHECK 0x0020 +#define FLAG_UNASSIGNCHECK 0x0040 +#define FLAG_BIDICHECK 0x0080 +#define FLAG_ASCIICHECK 0x0100 +#define FLAG_LENGTHCHECK 0x0200 +#define FLAG_ROUNDTRIPCHECK 0x0400 +#define FLAG_SELECTIVE 0x0800 + +#define FLAG_NAMEPREP \ + (FLAG_MAP|FLAG_NORMALIZE|FLAG_PROHIBITCHECK|FLAG_UNASSIGNCHECK|\ + FLAG_BIDICHECK) + +#define DEFAULT_FLAGS \ + (FLAG_LOCALMAP|FLAG_NAMEPREP|FLAG_ASCIICHECK|FLAG_LENGTHCHECK|\ + FLAG_ROUNDTRIPCHECK|FLAG_SELECTIVE|FLAG_DELIMMAP) + +int line_number; /* current input file line number */ +static int flush_every_line = 0; /* pretty obvious */ + +static int encode_file(idn_resconf_t conf1, idn_resconf_t conf2, + FILE *fp, int flags); +static int decode_file(idn_resconf_t conf1, idn_resconf_t conf2, + FILE *fp, int flags); +static int trim_newline(idnconv_strbuf_t *buf); +static idn_result_t convert_line(idnconv_strbuf_t *from, + idnconv_strbuf_t *to, + idn_resconf_t conf, + idn_action_t actions, int flags); +static void print_usage(char *cmd); +static void print_version(void); +static unsigned long get_ucs(const char *p); + +int +main(int ac, char **av) { + char *cmd = *av; + char *cname; + unsigned long delimiters[MAX_DELIMITER]; + char *localmappers[MAX_LOCALMAPPER]; + char *nameprep_version = NULL; + int ndelimiters = 0; + int nlocalmappers = 0; + char *in_code = NULL; + char *out_code = NULL; + char *resconf_file = NULL; + int no_resconf = 0; + char *encoding_alias = NULL; + int flags = DEFAULT_FLAGS; + FILE *fp; + idn_result_t r; + idn_resconf_t resconf1, resconf2; + idn_converter_t conv; + int exit_value; + +#ifdef HAVE_SETLOCALE + (void)setlocale(LC_ALL, ""); +#endif + + /* + * If the command name begins with 'r', reverse mode is assumed. + */ + if ((cname = strrchr(cmd, '/')) != NULL) + cname++; + else + cname = cmd; + if (cname[0] == 'r') + flags |= FLAG_REVERSE; + + ac--; + av++; + while (ac > 0 && **av == '-') { + +#define OPT_MATCH(opt) (strcmp(*av, opt) == 0) +#define MUST_HAVE_ARG if (ac < 2) print_usage(cmd) +#define APPEND_LIST(array, size, item, what) \ + if (size >= (sizeof(array) / sizeof(array[0]))) { \ + errormsg("too many " what "\n"); \ + exit(1); \ + } \ + array[size++] = item; \ + ac--; av++ + + if (OPT_MATCH("-in") || OPT_MATCH("-i")) { + MUST_HAVE_ARG; + in_code = av[1]; + ac--; + av++; + } else if (OPT_MATCH("-out") || OPT_MATCH("-o")) { + MUST_HAVE_ARG; + out_code = av[1]; + ac--; + av++; + } else if (OPT_MATCH("-conf") || OPT_MATCH("-c")) { + MUST_HAVE_ARG; + resconf_file = av[1]; + ac--; + av++; + } else if (OPT_MATCH("-nameprep") || OPT_MATCH("-n")) { + MUST_HAVE_ARG; + nameprep_version = av[1]; + ac--; + av++; + } else if (OPT_MATCH("-noconf") || OPT_MATCH("-C")) { + no_resconf = 1; + } else if (OPT_MATCH("-reverse") || OPT_MATCH("-r")) { + flags |= FLAG_REVERSE; + } else if (OPT_MATCH("-nolocalmap") || OPT_MATCH("-L")) { + flags &= ~FLAG_LOCALMAP; + } else if (OPT_MATCH("-nonameprep") || OPT_MATCH("-N")) { + flags &= ~FLAG_NAMEPREP; + } else if (OPT_MATCH("-unassigncheck") || OPT_MATCH("-u")) { + flags |= FLAG_UNASSIGNCHECK; + } else if (OPT_MATCH("-nounassigncheck") || OPT_MATCH("-U")) { + flags &= ~FLAG_UNASSIGNCHECK; + } else if (OPT_MATCH("-nobidicheck") || OPT_MATCH("-B")) { + flags &= ~FLAG_BIDICHECK; + } else if (OPT_MATCH("-noasciicheck") || OPT_MATCH("-A")) { + flags &= ~FLAG_ASCIICHECK; + } else if (OPT_MATCH("-nolengthcheck")) { + flags &= ~FLAG_LENGTHCHECK; + } else if (OPT_MATCH("-noroundtripcheck")) { + flags &= ~FLAG_ROUNDTRIPCHECK; + } else if (OPT_MATCH("-whole") || OPT_MATCH("-w")) { + flags &= ~FLAG_SELECTIVE; + } else if (OPT_MATCH("-localmap")) { + MUST_HAVE_ARG; + APPEND_LIST(localmappers, nlocalmappers, av[1], + "local maps"); + } else if (OPT_MATCH("-delimiter")) { + unsigned long v; + MUST_HAVE_ARG; + v = get_ucs(av[1]); + APPEND_LIST(delimiters, ndelimiters, v, + "delimiter maps"); + } else if (OPT_MATCH("-alias") || OPT_MATCH("-a")) { + MUST_HAVE_ARG; + encoding_alias = av[1]; + ac--; + av++; + } else if (OPT_MATCH("-flush")) { + flush_every_line = 1; + } else if (OPT_MATCH("-version") || OPT_MATCH("-v")) { + print_version(); + } else { + print_usage(cmd); + } +#undef OPT_MATCH +#undef MUST_HAVE_ARG +#undef APPEND_LIST + + ac--; + av++; + } + + if (ac > 1) + print_usage(cmd); + + /* Initialize. */ + if ((r = idn_resconf_initialize()) != idn_success) { + errormsg("error initializing library\n"); + return (1); + } + + /* + * Create resource contexts. + * `resconf1' and `resconf2' are almost the same but local and + * IDN encodings are reversed. + */ + resconf1 = NULL; + resconf2 = NULL; + if (idn_resconf_create(&resconf1) != idn_success || + idn_resconf_create(&resconf2) != idn_success) { + errormsg("error initializing configuration contexts\n"); + return (1); + } + + /* Load configuration file. */ + if (no_resconf) { + set_defaults(resconf1); + set_defaults(resconf2); + } else { + load_conf_file(resconf1, resconf_file); + load_conf_file(resconf2, resconf_file); + } + + /* Set encoding alias file. */ + if (encoding_alias != NULL) + set_encoding_alias(encoding_alias); + + /* Set input codeset. */ + if (flags & FLAG_REVERSE) { + if (in_code == NULL) { + conv = idn_resconf_getidnconverter(resconf1); + if (conv == NULL) { + errormsg("cannot get the IDN encoding.\n" + "please specify an appropriate one " + "with `-in' option.\n"); + exit(1); + } + idn_resconf_setlocalconverter(resconf2, conv); + idn_converter_destroy(conv); + } else { + set_idncode(resconf1, in_code); + set_localcode(resconf2, in_code); + } + } else { + if (in_code == NULL) { + conv = idn_resconf_getlocalconverter(resconf1); + if (conv == NULL) { + errormsg("cannot get the local encoding.\n" + "please specify an appropriate one " + "with `-in' option.\n"); + exit(1); + } + idn_resconf_setidnconverter(resconf2, conv); + idn_converter_destroy(conv); + } else { + set_localcode(resconf1, in_code); + set_idncode(resconf2, in_code); + } + } + + /* Set output codeset. */ + if (flags & FLAG_REVERSE) { + if (out_code == NULL) { + conv = idn_resconf_getlocalconverter(resconf1); + if (conv == NULL) { + errormsg("cannot get the local encoding.\n" + "please specify an appropriate one " + "with `-out' option.\n"); + exit(1); + } + idn_resconf_setidnconverter(resconf2, conv); + idn_converter_destroy(conv); + } else { + set_localcode(resconf1, out_code); + set_idncode(resconf2, out_code); + } + } else { + if (out_code == NULL) { + conv = idn_resconf_getidnconverter(resconf1); + if (conv == NULL) { + errormsg("cannot get the IDN encoding.\n" + "please specify an appropriate one " + "with `-out' option.\n"); + exit(1); + } + idn_resconf_setlocalconverter(resconf2, conv); + idn_converter_destroy(conv); + } else { + set_idncode(resconf1, out_code); + set_localcode(resconf2, out_code); + } + } + + /* Set delimiter map(s). */ + if (ndelimiters > 0) { + set_delimitermapper(resconf1, delimiters, ndelimiters); + set_delimitermapper(resconf2, delimiters, ndelimiters); + } + + /* Set local map(s). */ + if (nlocalmappers > 0) { + set_localmapper(resconf1, localmappers, nlocalmappers); + set_localmapper(resconf2, localmappers, nlocalmappers); + } + + /* Set NAMEPREP version. */ + if (nameprep_version != NULL) { + set_nameprep(resconf1, nameprep_version); + set_nameprep(resconf2, nameprep_version); + } + + idn_res_enable(1); + + /* Open input file. */ + if (ac > 0) { + if ((fp = fopen(av[0], "r")) == NULL) { + errormsg("cannot open file %s: %s\n", + av[0], strerror(errno)); + return (1); + } + } else { + fp = stdin; + } + + /* Do the conversion. */ + if (flags & FLAG_REVERSE) + exit_value = decode_file(resconf1, resconf2, fp, flags); + else + exit_value = encode_file(resconf1, resconf2, fp, flags); + + idn_resconf_destroy(resconf1); + idn_resconf_destroy(resconf2); + + return exit_value; +} + +static int +encode_file(idn_resconf_t conf1, idn_resconf_t conf2, FILE *fp, int flags) { + idn_result_t r; + idnconv_strbuf_t buf1, buf2; + idn_action_t actions1, actions2; + int nl_trimmed; + int local_ace_hack; + idn_converter_t conv; + + /* + * See if the input codeset is an ACE. + */ + conv = idn_resconf_getlocalconverter(conf1); + if (conv != NULL && idn_converter_isasciicompatible(conv) && + (flags & FLAG_SELECTIVE)) + local_ace_hack = 1; + else + local_ace_hack = 0; + if (conv != NULL) + idn_converter_destroy(conv); + + if (local_ace_hack) { + actions1 = IDN_IDNCONV; + if (flags & FLAG_ROUNDTRIPCHECK) + actions1 |= IDN_RTCHECK; + } else { + actions1 = IDN_LOCALCONV; + } + + actions2 = IDN_IDNCONV; + if (flags & FLAG_DELIMMAP) + actions2 |= IDN_DELIMMAP; + if (flags & FLAG_LOCALMAP) + actions2 |= IDN_LOCALMAP; + if (flags & FLAG_MAP) + actions2 |= IDN_MAP; + if (flags & FLAG_NORMALIZE) + actions2 |= IDN_NORMALIZE; + if (flags & FLAG_PROHIBITCHECK) + actions2 |= IDN_PROHCHECK; + if (flags & FLAG_UNASSIGNCHECK) + actions2 |= IDN_UNASCHECK; + if (flags & FLAG_BIDICHECK) + actions2 |= IDN_BIDICHECK; + if (flags & FLAG_ASCIICHECK) + actions2 |= IDN_ASCCHECK; + if (flags & FLAG_LENGTHCHECK) + actions2 |= IDN_LENCHECK; + + strbuf_init(&buf1); + strbuf_init(&buf2); + line_number = 1; + while (strbuf_getline(&buf1, fp) != NULL) { + /* + * Trim newline at the end. This is needed for + * those ascii-comatible encodings such as UTF-5 or RACE + * not to try converting newlines, which will result + * in `invalid encoding' error. + */ + nl_trimmed = trim_newline(&buf1); + + /* + * Convert input line to UTF-8. + */ + if (local_ace_hack) + r = convert_line(&buf1, &buf2, conf2, actions1, + FLAG_REVERSE|FLAG_SELECTIVE); + else + r = convert_line(&buf1, &buf2, conf1, actions1, + 0); + + if (r != idn_success) { + errormsg("conversion failed at line %d: %s\n", + line_number, + idn_result_tostring(r)); + goto error; + } + if (!idn_utf8_isvalidstring(strbuf_get(&buf2))) { + errormsg("conversion to utf-8 failed at line %d\n", + line_number); + goto error; + } + + /* + * Perform local mapping and NAMEPREP, and convert to + * the output codeset. + */ + r = convert_line(&buf2, &buf1, conf1, actions2, + flags & FLAG_SELECTIVE); + + if (r != idn_success) { + errormsg("error in nameprep or output conversion " + "at line %d: %s\n", + line_number, idn_result_tostring(r)); + goto error; + } + + fputs(strbuf_get(&buf1), stdout); + if (nl_trimmed) + putc('\n', stdout); + + if (flush_every_line) + fflush(stdout); + + line_number++; + } + + strbuf_reset(&buf1); + strbuf_reset(&buf2); + return (0); + + error: + strbuf_reset(&buf1); + strbuf_reset(&buf2); + return (1); +} + +static int +decode_file(idn_resconf_t conf1, idn_resconf_t conf2, FILE *fp, int flags) { + idn_result_t r; + idnconv_strbuf_t buf1, buf2; + idn_action_t actions1, actions2; + int nl_trimmed; + int local_ace_hack, idn_ace_hack; + idn_converter_t conv; + + /* + * See if the input codeset is an ACE. + */ + conv = idn_resconf_getidnconverter(conf1); + if (conv != NULL && idn_converter_isasciicompatible(conv) && + (flags & FLAG_SELECTIVE)) + idn_ace_hack = 1; + else + idn_ace_hack = 0; + if (conv != NULL) + idn_converter_destroy(conv); + + conv = idn_resconf_getlocalconverter(conf1); + if (conv != NULL && idn_converter_isasciicompatible(conv) && + (flags & FLAG_SELECTIVE)) + local_ace_hack = 1; + else + local_ace_hack = 0; + if (conv != NULL) + idn_converter_destroy(conv); + + actions1 = IDN_IDNCONV; + + if (local_ace_hack) { + actions2 = IDN_IDNCONV; + if (flags & FLAG_MAP) + actions2 |= IDN_MAP; + if (flags & FLAG_NORMALIZE) + actions2 |= IDN_NORMALIZE; + if (flags & FLAG_PROHIBITCHECK) + actions2 |= IDN_PROHCHECK; + if (flags & FLAG_UNASSIGNCHECK) + actions2 |= IDN_UNASCHECK; + if (flags & FLAG_BIDICHECK) + actions2 |= IDN_BIDICHECK; + if (flags & FLAG_ASCIICHECK) + actions2 |= IDN_ASCCHECK; + if (flags & FLAG_LENGTHCHECK) + actions2 |= IDN_LENCHECK; + } else { + actions2 = IDN_LOCALCONV; + } + + if (flags & FLAG_DELIMMAP) + actions1 |= IDN_DELIMMAP; + if (flags & FLAG_MAP) + actions1 |= IDN_MAP; + if (flags & FLAG_NORMALIZE) + actions1 |= IDN_NORMALIZE; + if (flags & FLAG_NORMALIZE) + actions1 |= IDN_NORMALIZE; + if (flags & FLAG_PROHIBITCHECK) + actions1 |= IDN_PROHCHECK; + if (flags & FLAG_UNASSIGNCHECK) + actions1 |= IDN_UNASCHECK; + if (flags & FLAG_BIDICHECK) + actions1 |= IDN_BIDICHECK; + if (flags & FLAG_ASCIICHECK) + actions1 |= IDN_ASCCHECK; + if (flags & FLAG_ROUNDTRIPCHECK) + actions1 |= IDN_RTCHECK; + + strbuf_init(&buf1); + strbuf_init(&buf2); + line_number = 1; + while (strbuf_getline(&buf1, fp) != NULL) { + /* + * Trim newline at the end. This is needed for + * those ascii-comatible encodings such as UTF-5 or RACE + * not to try converting newlines, which will result + * in `invalid encoding' error. + */ + nl_trimmed = trim_newline(&buf1); + + /* + * Treat input line as the string encoded in local + * encoding and convert it to UTF-8 encoded string. + */ + if (local_ace_hack) { + if (strbuf_copy(&buf2, strbuf_get(&buf1)) == NULL) + r = idn_nomemory; + else + r = idn_success; + } else { + r = convert_line(&buf1, &buf2, conf1, IDN_LOCALCONV, + 0); + } + if (r != idn_success) { + errormsg("conversion failed at line %d: %s\n", + line_number, idn_result_tostring(r)); + goto error; + } + + /* + * Convert internationalized domain names in the line. + */ + if (idn_ace_hack) { + r = convert_line(&buf2, &buf1, conf1, actions1, + FLAG_REVERSE|FLAG_SELECTIVE); + } else { + r = convert_line(&buf2, &buf1, conf1, actions1, + FLAG_REVERSE); + } + if (r != idn_success) { + errormsg("conversion failed at line %d: %s\n", + line_number, + idn_result_tostring(r)); + goto error; + } + if (!idn_utf8_isvalidstring(strbuf_get(&buf1))) { + errormsg("conversion to utf-8 failed at line %d\n", + line_number); + goto error; + } + + /* + * Perform round trip check and convert to the output + * codeset. + */ + if (local_ace_hack) { + r = convert_line(&buf1, &buf2, conf2, actions2, + FLAG_SELECTIVE); + } else { + r = convert_line(&buf1, &buf2, conf1, actions2, + FLAG_REVERSE); + } + + if (r != idn_success) { + errormsg("error in nameprep or output conversion " + "at line %d: %s\n", + line_number, idn_result_tostring(r)); + goto error; + } + + fputs(strbuf_get(&buf2), stdout); + if (nl_trimmed) + putc('\n', stdout); + + if (flush_every_line) + fflush(stdout); + + line_number++; + } + strbuf_reset(&buf1); + strbuf_reset(&buf2); + return (0); + + error: + strbuf_reset(&buf1); + strbuf_reset(&buf2); + return (1); +} + +static int +trim_newline(idnconv_strbuf_t *buf) { + /* + * If the string in BUF ends with a newline, trim it and + * return 1. Otherwise, just return 0 without modifying BUF. + */ + char *s = strbuf_get(buf); + size_t len = strlen(s); + + if (s[len - 1] == '\n') { + s[len - 1] = '\0'; + return (1); + } + + return (0); +} + +static idn_result_t +convert_line(idnconv_strbuf_t *from, idnconv_strbuf_t *to, + idn_resconf_t conf, idn_action_t actions, int flags) +{ + idn_result_t r = idn_success; + char *from_str = strbuf_get(from); + + for (;;) { + char *to_str = strbuf_get(to); + size_t to_size = strbuf_size(to); + + switch (flags & (FLAG_REVERSE|FLAG_SELECTIVE)) { + case 0: + r = idn_res_encodename(conf, actions, from_str, + to_str, to_size); + break; + case FLAG_REVERSE: + r = idn_res_decodename(conf, actions, from_str, + to_str, to_size); + break; + case FLAG_SELECTIVE: + r = selective_encode(conf, actions, from_str, + to_str, to_size); + break; + case FLAG_REVERSE|FLAG_SELECTIVE: + r = selective_decode(conf, actions, from_str, + to_str, to_size); + break; + } + if (r == idn_buffer_overflow) { + /* + * Conversion is not successful because + * the size of the target buffer is not enough. + * Double the size and retry. + */ + if (strbuf_double(to) == NULL) { + /* oops. allocation failed. */ + return (idn_nomemory); + } + } else { + break; + } + } + return (r); +} + +static char *options[] = { + "-in INPUT-CODESET : specifies input codeset name.", + "-i INPUT-CODESET : synonym for -in", + "-out OUTPUT-CODESET : specifies output codeset name.", + "-o OUTPUT-CODESET : synonym for -out", + "-conf CONF-FILE : specifies idnkit configuration file.", + "-c CONF-FILE : synonym for -conf", + "-noconf : do not load idnkit configuration file.", + "-C : synonym for -noconf", + "-reverse : specifies reverse conversion.", + " (i.e. IDN encoding to local encoding)", + "-r : synonym for -reverse", + "-nameprep VERSION : specifies version name of NAMEPREP.", + "-n VERSION : synonym for -nameprep", + "-nonameprep : do not perform NAMEPREP.", + "-N : synonym for -nonameprep", + "-localmap MAPPING : specifies local mapping.", + "-nolocalmap : do not perform local mapping.", + "-L : synonym for -nolocalmap", + "-nounassigncheck : do not perform unassigned codepoint check.", + "-U : synonym for -nounassigncheck", + "-nobidicheck : do not perform bidirectional text check.", + "-B : synonym for -nobidicheck", + "-nolengthcheck : do not check label length.", + "-noasciicheck : do not check ASCII range characters.", + "-A : synonym for -noasciicheck", + "-noroundtripcheck : do not perform round trip check.", + "-delimiter U+XXXX : specifies local delimiter code point.", + "-alias alias-file : specifies codeset alias file.", + "-a : synonym for -alias", + "-flush : line-buffering mode.", + "-whole : convert the whole region instead of", + " regions containing non-ascii characters.", + "-w : synonym for -whole", + "-version : print version number, then exit.", + "-v : synonym for -version", + "", + " The following options can be specified multiple times", + " -localmap, -delimiter", + NULL, +}; + +static void +print_version() { + fprintf(stderr, "idnconv (idnkit) version: %s\n" + "library version: %s\n", + IDNKIT_VERSION, + idn_version_getstring()); + exit(0); +} + +static void +print_usage(char *cmd) { + int i; + + fprintf(stderr, "Usage: %s [options..] [file]\n", cmd); + + for (i = 0; options[i] != NULL; i++) + fprintf(stderr, "\t%s\n", options[i]); + + exit(1); +} + +static unsigned long +get_ucs(const char *p) { + unsigned long v; + char *end; + + /* Skip optional 'U+' */ + if (strncmp(p, "U+", 2) == 0) + p += 2; + + v = strtoul(p, &end, 16); + if (*end != '\0') { + fprintf(stderr, "invalid UCS code point \"%s\"\n", p); + exit(1); + } + + return v; +} diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/idnslookup.in b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnslookup.in new file mode 100644 index 0000000000..65d0a3dd37 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/idnslookup.in @@ -0,0 +1,116 @@ +#! /bin/sh +# $Id: idnslookup.in,v 1.1 2003/06/04 00:27:10 marka Exp $ +# +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +USAGE="Usage: $0 domain-name DNS-server" + +# +# Parse command line arguments. +# +if [ $# -lt 2 ] ; then + echo "$0: too few argument" 1>&2 + echo $USAGE 1>&2 + exit 1 +fi + +if [ $# -gt 2 ] ; then + echo "$0: too many argument" 1>&2 + echo $USAGE 1>&2 + exit 1 +fi + +case "$1" in +-*) echo "$0: unknown option $1" 1>&2 + echo $USAGE 1>&2 + exit 1 + ;; +esac + +LOCAL_DOMAIN_NAME="$1" +NAME_SERVER="$2" + +# +# Append some directories to PATH. +# +[ -d /usr/sbin ] && PATH=$PATH:/usr/sbin +[ -d /sbin ] && PATH=$PATH:/sbin + +# +# Find `nslookup' command. +# +if [ x"$NSLOOKUP" = x ] ; then + for I in `echo $PATH | sed -e 's/:/ /g'` ; do + if [ -x $I/nslookup ] ; then + NSLOOKUP="$I/nslookup" + break + fi + done + if [ "$NSLOOKUP" = "" ] ; then + echo "$0: nslookup not found" 1>&2 + exit 1 + fi +fi +if [ ! -x "$NSLOOKUP" ] ; then + echo "$0: nslookup not found" 1>&2 + exit 1 +fi + +# +# Check if `idnconv' command exists. +# +IDNCONV=${IDNCONV-"@bindir@/idnconv"} +if [ ! -x "$IDNCONV" ] ; then + echo "$0: idnconv not found" 1>&2 + exit 1 +fi + +# +# Convert domain name to IDN encoding. +# +IDN_DOMAIN_NAME="`echo $LOCAL_DOMAIN_NAME | $IDNCONV -w`" || exit 1 + +# +# Invoke nslookup. +# +$NSLOOKUP $IDN_DOMAIN_NAME $NAME_SERVER < /dev/null || exit 1 + +exit 0 diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/make.wnt b/contrib/idn/idnkit-1.0-src/tools/idnconv/make.wnt new file mode 100644 index 0000000000..2f44114e10 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/make.wnt @@ -0,0 +1,72 @@ +# $Id: make.wnt,v 1.1 2003/06/04 00:27:06 marka Exp $ +# Makefile for idnconv, manually configured for WIN-NT (VC5.0) +# +# Copyright (c) 2000,2002 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +!include + +INCDIR = ..\..\include +ICONVDIR = ..\..\win +IDNLIBDIR = ..\..\lib +LIBS = $(IDNLIBDIR)\idnkit.lib $(ICONVDIR)\iconv.lib +SYSLIBS = $(conlibsdll) + +SRCS = idnconv.c util.c selectiveencode.c +OBJS = idnconv.obj util.obj selectiveencode.obj + +TARGET = idnconv.exe + +all: $(TARGET) + +idnconv.exe: $(OBJS) $(LIBS) + $(link) $(conflags) /out:idnconv.exe $(OBJS) $(LIBS) $(SYSLIBS) + +install: + +clean: + -del *.exe *.obj *.lib core *.core *~ + +idnconv.obj: idnconv.c + $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) $*.c +util.obj: util.c + $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) $*.c +selectiveencode.obj: selectiveencode.c + $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) $*.c diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.c b/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.c new file mode 100644 index 0000000000..eed4b34a93 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.c @@ -0,0 +1,127 @@ +#ifndef lint +static char *rcsid = "$Id: selectiveencode.c,v 1.1 2003/06/04 00:27:07 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include + +#include +#include +#include +#include +#include + +#include "selectiveencode.h" + +static int is_domain_delimiter(char c); +static char *find_nonascii(const char *s); + +idn_result_t +idn_selectiveencode_findregion(const char *s, + char **startp, char **endp) +{ + char *non_ascii; + char *start, *end; + + assert(s != NULL && startp != NULL && endp != NULL); + + TRACE(("idn_selectiveencode_findregion(s=\"%s\")\n", + idn__debug_xstring(s, 20))); + + /* + * Scan the specified string looking for non-ascii character. + */ + if ((non_ascii = find_nonascii(s)) == NULL) + return (idn_notfound); + + /* + * Non-ascii character found. + * Determine the region to encode. + */ + + /* + * First, we scan backwards to find the beginning of the region + * that should be converted. + */ + start = non_ascii; + while (start > s) { + char *prev = idn_utf8_findfirstbyte(start - 1, s); + if (is_domain_delimiter(*prev)) + break; /* Found */ + start = prev; + } + *startp = start; + + /* + * Next we scan forwards looking for the end of the region. + */ + end = non_ascii + idn_utf8_mblen(non_ascii); + while (!is_domain_delimiter(*end)) + end += idn_utf8_mblen(end); + *endp = end; + + return (idn_success); +} + +static int +is_domain_delimiter(char c) { + return ((unsigned char)c < 0x80 && + !('A' <= c && c <= 'Z') && + !('a' <= c && c <= 'z') && + !('0' <= c && c <= '9') && + c != '-' && c != '.'); +} + +static char * +find_nonascii(const char *s) { + while (*s != '\0' && (unsigned char)*s < 0x80) + s++; + if (*s == '\0') + return (NULL); + else + return ((char *)s); +} diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.h b/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.h new file mode 100644 index 0000000000..0006911d3e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/selectiveencode.h @@ -0,0 +1,70 @@ +/* $Id: selectiveencode.h,v 1.1 2003/06/04 00:27:08 marka Exp $ */ +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_SELECTIVENCODE_H +#define IDN_SELECTIVENCODE_H 1 + +/* + * Find where to convert. + * + * Find a substring for which IDN domain name codeset conversion is necessary. + */ + +#include + +/* + * Scan the given string 's' (in UTF-8 encoding) looking for a substring + * made of + * + at least one non-ascii character and + * + zero or more legitimate domain-name characters (i.e. ascii alphabets, + * digits and hyphens) and periods. + * + * Returns: + * idn_success -- ok, found. + * idn_notfound -- not found. + */ +extern idn_result_t +idn_selectiveencode_findregion(const char *s, char **startp, char **endp); + +#endif /* IDN_SELECTIVENCODE_H */ diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/util.c b/contrib/idn/idnkit-1.0-src/tools/idnconv/util.c new file mode 100644 index 0000000000..216b9f29c8 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/util.c @@ -0,0 +1,554 @@ +#ifndef lint +static char *rcsid = "$Id: util.c,v 1.1 2003/06/04 00:27:08 marka Exp $"; +#endif + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "util.h" +#include "selectiveencode.h" + +extern int line_number; + +idn_result_t +selective_encode(idn_resconf_t conf, idn_action_t actions, + char *from, char *to, int tolen) +{ + for (;;) { + int len; + char *region_start, *region_end; + idn_result_t r; + char save; + + /* + * Find the region that needs conversion. + */ + r = idn_selectiveencode_findregion(from, ®ion_start, + ®ion_end); + if (r == idn_notfound) { + /* + * Not found. Just copy the whole thing. + */ + if (tolen <= strlen(from)) + return (idn_buffer_overflow); + (void)strcpy(to, from); + return (idn_success); + } else if (r != idn_success) { + /* This should not happen.. */ + errormsg("internal error at line %d: %s\n", + line_number, idn_result_tostring(r)); + return (r); + } + + /* + * We have found a region to convert. + * First, copy the prefix part verbatim. + */ + len = region_start - from; + if (tolen < len) { + errormsg("internal buffer overflow at line %d\n", + line_number); + return (idn_buffer_overflow); + } + (void)memcpy(to, from, len); + to += len; + tolen -= len; + + /* + * Terminate the region with NUL. + */ + save = *region_end; + *region_end = '\0'; + + /* + * Encode the region. + */ + r = idn_res_encodename(conf, actions, region_start, to, tolen); + + /* + * Restore character. + */ + *region_end = save; + + if (r != idn_success) + return (r); + + len = strlen(to); + to += len; + tolen -= len; + + from = region_end; + } +} + +idn_result_t +selective_decode(idn_resconf_t conf, idn_action_t actions, + char *from, char *to, int tolen) +{ + char *domain_name; + char *ignored_chunk; + char save; + int len; + idn_result_t r; + + /* + * While `*from' points to a character in a string which may be + * a domain name, `domain_name' refers to the beginning of the + * domain name. + */ + domain_name = NULL; + + /* + * We ignore chunks matching to the regular expression: + * [\-\.][0-9A-Za-z\-\.]* + * + * While `*from' points to a character in such a chunk, + * `ignored_chunk' refers to the beginning of the chunk. + */ + ignored_chunk = NULL; + + for (;;) { + if (*from == '-') { + /* + * We don't recognize `.-' as a part of domain name. + */ + if (domain_name != NULL) { + if (*(from - 1) == '.') { + ignored_chunk = domain_name; + domain_name = NULL; + } + } else if (ignored_chunk == NULL) { + ignored_chunk = from; + } + + } else if (*from == '.') { + /* + * We don't recognize `-.' nor `..' as a part of + * domain name. + */ + if (domain_name != NULL) { + if (*(from - 1) == '-' || *(from - 1) == '.') { + ignored_chunk = domain_name; + domain_name = NULL; + } + } else if (ignored_chunk == NULL) { + ignored_chunk = from; + } + + } else if (('a' <= *from && *from <= 'z') || + ('A' <= *from && *from <= 'Z') || + ('0' <= *from && *from <= '9')) { + if (ignored_chunk == NULL && domain_name == NULL) + domain_name = from; + + } else { + if (ignored_chunk != NULL) { + /* + * `from' reaches the end of the ignored chunk. + * Copy the chunk to `to'. + */ + len = from - ignored_chunk; + if (tolen < len) + return (idn_buffer_overflow); + (void)memcpy(to, ignored_chunk, len); + to += len; + tolen -= len; + + } else if (domain_name != NULL) { + /* + * `from' reaches the end of the domain name. + * Decode the domain name, and copy the result + * to `to'. + */ + save = *from; + *from = '\0'; + r = idn_res_decodename(conf, actions, + domain_name, to, tolen); + *from = save; + + if (r == idn_success) { + len = strlen(to); + } else if (r == idn_invalid_encoding) { + len = from - domain_name; + if (tolen < len) + return (idn_buffer_overflow); + (void)memcpy(to, domain_name, len); + } else { + return (r); + } + to += len; + tolen -= len; + } + + /* + * Copy a character `*from' to `to'. + */ + if (tolen < 1) + return (idn_buffer_overflow); + *to = *from; + to++; + tolen--; + + domain_name = NULL; + ignored_chunk = NULL; + + if (*from == '\0') + break; + } + + from++; + } + + return (idn_success); +} + +void +set_defaults(idn_resconf_t conf) { + idn_result_t r; + + if ((r = idn_resconf_setdefaults(conf)) != idn_success) { + errormsg("error setting default configuration: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +load_conf_file(idn_resconf_t conf, const char *file) { + idn_result_t r; + + if ((r = idn_resconf_loadfile(conf, file)) != idn_success) { + errormsg("error reading configuration file: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_encoding_alias(const char *encoding_alias) { + idn_result_t r; + + if ((r = idn_converter_resetalias()) != idn_success) { + errormsg("cannot reset alias information: %s\n", + idn_result_tostring(r)); + exit(1); + } + + if ((r = idn_converter_aliasfile(encoding_alias)) != idn_success) { + errormsg("cannot read alias file %s: %s\n", + encoding_alias, idn_result_tostring(r)); + exit(1); + } +} + +void +set_localcode(idn_resconf_t conf, const char *code) { + idn_result_t r; + + r = idn_resconf_setlocalconvertername(conf, code, + IDN_CONVERTER_RTCHECK); + if (r != idn_success) { + errormsg("cannot create converter for codeset %s: %s\n", + code, idn_result_tostring(r)); + exit(1); + } +} + +void +set_idncode(idn_resconf_t conf, const char *code) { + idn_result_t r; + + r = idn_resconf_setidnconvertername(conf, code, + IDN_CONVERTER_RTCHECK); + if (r != idn_success) { + errormsg("cannot create converter for codeset %s: %s\n", + code, idn_result_tostring(r)); + exit(1); + } +} + +void +set_delimitermapper(idn_resconf_t conf, unsigned long *delimiters, + int ndelimiters) { + idn_result_t r; + + r = idn_resconf_addalldelimitermapucs(conf, delimiters, ndelimiters); + if (r != idn_success) { + errormsg("cannot add delimiter: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_localmapper(idn_resconf_t conf, char **mappers, int nmappers) { + idn_result_t r; + + /* Add mapping. */ + r = idn_resconf_addalllocalmapselectornames(conf, + IDN_MAPSELECTOR_DEFAULTTLD, + (const char **)mappers, + nmappers); + if (r != idn_success) { + errormsg("cannot add local map: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_nameprep(idn_resconf_t conf, char *version) { + idn_result_t r; + + r = idn_resconf_setnameprepversion(conf, version); + if (r != idn_success) { + errormsg("error setting nameprep %s: %s\n", + version, idn_result_tostring(r)); + exit(1); + } +} + +void +set_mapper(idn_resconf_t conf, char **mappers, int nmappers) { + idn_result_t r; + + /* Configure mapper. */ + r = idn_resconf_addallmappernames(conf, (const char **)mappers, + nmappers); + if (r != idn_success) { + errormsg("cannot add nameprep map: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_normalizer(idn_resconf_t conf, char **normalizers, int nnormalizer) { + idn_result_t r; + + r = idn_resconf_addallnormalizernames(conf, + (const char **)normalizers, + nnormalizer); + if (r != idn_success) { + errormsg("cannot add normalizer: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_prohibit_checkers(idn_resconf_t conf, char **prohibits, int nprohibits) { + idn_result_t r; + + r = idn_resconf_addallprohibitcheckernames(conf, + (const char **)prohibits, + nprohibits); + if (r != idn_success) { + errormsg("cannot add prohibit checker: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +set_unassigned_checkers(idn_resconf_t conf, char **unassigns, int nunassigns) { + idn_result_t r; + + r = idn_resconf_addallunassignedcheckernames(conf, + (const char **)unassigns, + nunassigns); + if (r != idn_success) { + errormsg("cannot add unassigned checker: %s\n", + idn_result_tostring(r)); + exit(1); + } +} + +void +errormsg(const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); +} + + +/* + * Dynamic Stirng Buffer Utility + */ + +void +strbuf_init(idnconv_strbuf_t *buf) { + /* + * Initialize the given string buffer. + * Caller must allocate the structure (idnconv_strbuf_t) + * as an automatic variable or by malloc(). + */ + buf->str = buf->local_buf; + buf->str[0] = '\0'; + buf->size = sizeof(buf->local_buf); +} + +void +strbuf_reset(idnconv_strbuf_t *buf) { + /* + * Reset the given string buffer. + * Free memory allocated by this utility, and + * re-initialize. + */ + if (buf->str != NULL && buf->str != buf->local_buf) { + free(buf->str); + } + strbuf_init(buf); +} + +char * +strbuf_get(idnconv_strbuf_t *buf) { + /* + * Get the pointer of the buffer. + */ + return (buf->str); +} + +size_t +strbuf_size(idnconv_strbuf_t *buf) { + /* + * Get the allocated size of the buffer. + */ + return (buf->size); +} + +char * +strbuf_copy(idnconv_strbuf_t *buf, const char *str) { + /* + * Copy STR to BUF. + */ + size_t len = strlen(str); + + if (strbuf_alloc(buf, len + 1) == NULL) + return (NULL); + strcpy(buf->str, str); + return (buf->str); +} + +char * +strbuf_append(idnconv_strbuf_t *buf, const char *str) { + /* + * Append STR to the end of BUF. + */ + size_t len1 = strlen(buf->str); + size_t len2 = strlen(str); + char *p; +#define MARGIN 50 + + p = strbuf_alloc(buf, len1 + len2 + 1 + MARGIN); + if (p != NULL) + strcpy(buf->str + len1, str); + return (p); +} + +char * +strbuf_alloc(idnconv_strbuf_t *buf, size_t size) { + /* + * Reallocate the buffer of BUF if needed + * so that BUF can hold SIZE bytes of data at least. + */ + char *p; + + if (buf->size >= size) + return (buf->str); + if (buf->str == buf->local_buf) { + if ((p = malloc(size)) == NULL) + return (NULL); + memcpy(p, buf->local_buf, sizeof(buf->local_buf)); + } else { + if ((p = realloc(buf->str, size)) == NULL) + return (NULL); + } + buf->str = p; + buf->size = size; + return (buf->str); +} + +char * +strbuf_double(idnconv_strbuf_t *buf) { + /* + * Double the size of the buffer of BUF. + */ + return (strbuf_alloc(buf, buf->size * 2)); +} + +char * +strbuf_getline(idnconv_strbuf_t *buf, FILE *fp) { + /* + * Read a line from FP. + */ + char s[256]; + + buf->str[0] = '\0'; + while (fgets(s, sizeof(s), fp) != NULL) { + if (strbuf_append(buf, s) == NULL) + return (NULL); + if (strlen(s) < sizeof(s) - 1 || s[sizeof(s) - 2] == '\n') + return (buf->str); + } + if (buf->str[0] != '\0') + return (buf->str); + return (NULL); +} diff --git a/contrib/idn/idnkit-1.0-src/tools/idnconv/util.h b/contrib/idn/idnkit-1.0-src/tools/idnconv/util.h new file mode 100644 index 0000000000..adc2196d98 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/idnconv/util.h @@ -0,0 +1,96 @@ +/* $Id: util.h,v 1.1 2003/06/04 00:27:09 marka Exp $ */ +/* + * Copyright (c) 2000,2001 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef IDN_IDNCONV_UTIL_H +#define IDN_IDNCONV_UTIL_H 1 + +#include + +#define IDNCONV_LOCALBUF_SIZE 512 + +typedef struct { + char *str; + size_t size; + char local_buf[IDNCONV_LOCALBUF_SIZE]; +} idnconv_strbuf_t; + +extern idn_result_t selective_encode(idn_resconf_t conf, + idn_action_t actions, char *from, + char *to, int tolen); +extern idn_result_t selective_decode(idn_resconf_t conf, + idn_action_t actions, char *from, + char *to, int tolen); +extern void set_defaults(idn_resconf_t conf); +extern void load_conf_file(idn_resconf_t conf, const char *file); +extern void set_encoding_alias(const char *encoding_alias); +extern void set_localcode(idn_resconf_t conf, const char *code); +extern void set_idncode(idn_resconf_t conf, const char *code); +extern void set_delimitermapper(idn_resconf_t conf, + unsigned long *delimiters, + int ndelimiters); +extern void set_localmapper(idn_resconf_t conf, + char **mappers, int nmappers); +extern void set_nameprep(idn_resconf_t conf, char *version); +extern void set_mapper(idn_resconf_t conf, + char **mappers, int nmappers); +extern void set_normalizer(idn_resconf_t conf, + char **normalizer, int nnormalizer); +extern void set_prohibit_checkers(idn_resconf_t conf, + char **prohibits, + int nprohibits); +extern void set_unassigned_checkers(idn_resconf_t conf, + char **unassigns, + int nunassigns); +extern void errormsg(const char *fmt, ...); +extern void strbuf_init(idnconv_strbuf_t *buf); +extern void strbuf_reset(idnconv_strbuf_t *buf); +extern char *strbuf_get(idnconv_strbuf_t *buf); +extern size_t strbuf_size(idnconv_strbuf_t *buf); +extern char *strbuf_copy(idnconv_strbuf_t *buf, const char *str); +extern char *strbuf_append(idnconv_strbuf_t *buf, const char *str); +extern char *strbuf_alloc(idnconv_strbuf_t *buf, size_t size); +extern char *strbuf_double(idnconv_strbuf_t *buf); +extern char *strbuf_getline(idnconv_strbuf_t *buf, FILE *fp); + +#endif /* IDN_IDNCONV_UTIL_H */ diff --git a/contrib/idn/idnkit-1.0-src/tools/make.wnt b/contrib/idn/idnkit-1.0-src/tools/make.wnt new file mode 100644 index 0000000000..1ea01c7a60 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/make.wnt @@ -0,0 +1,57 @@ +# $Id: make.wnt,v 1.1 2003/06/04 00:27:05 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +all : force + cd idnconv + $(MAKE) -f make.wnt + cd .. + +install : all + cd idnconv + $(MAKE) -f make.wnt install + cd .. + +clean : force + cd idnconv + $(MAKE) -f make.wnt clean + cd .. + +force: diff --git a/contrib/idn/idnkit-1.0-src/tools/rpm/idnkit.spec b/contrib/idn/idnkit-1.0-src/tools/rpm/idnkit.spec new file mode 100644 index 0000000000..c740570a27 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/rpm/idnkit.spec @@ -0,0 +1,142 @@ +%define prefix /usr +%define sysconfdir /etc +%define version 1.0 + +# official/beta release: +#define release 1 +#define distrel %{version} + +# release candidate: +%define release rc1 +%define distrel %{version}-%{release} + +%define serial 2002051501 + +%define name idnkit +%define distsrc %{name}-%{distrel}-src + +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: distributable +Group: System Environment +Source: %{distsrc}.tar.gz +BuildRoot: /var/tmp/%{name}-root +Serial: %{serial} +Summary: Internationalized Domain Name kit (idnkit/JPNIC) +Vendor: JPNIC +Packager: Japan Network Information Center + +%description +idnkit is a kit for handling Internationalized Domain Name. + +%package devel +Group: Development/Libraries +Summary: The development files for idnkit + +%description devel +The header files and libraries (libidnkit.a and libidnkitlite.a) +to develop applications that use the libraries. + +%prep +%setup -n %{distsrc} + +%build +if [ -f /usr/lib/libiconv.a -o -f /usr/lib/libiconv.so ] +then + if [ -f /lib/libc-2.0* ] + then + ICONV="--with-iconv=yes" + fi +fi + +CFLAGS="$RPM_OPT_FLAGS" ./configure \ + --prefix=%{prefix} --sysconfdir=%{sysconfdir} \ + --enable-runidn \ + $ICONV +make + +%install +rm -fr $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +mv $RPM_BUILD_ROOT/etc/idn.conf.sample $RPM_BUILD_ROOT/etc/idn.conf +mv $RPM_BUILD_ROOT/etc/idnalias.conf.sample $RPM_BUILD_ROOT/etc/idnalias.conf + +# devel kit +#install -c lib/libidnkit.a $RPM_BUILD_ROOT/usr/lib +#cp -r include/idn $RPM_BUILD_ROOT/usr/include + +# docs +mkdir rpm_docs +(cp NEWS INSTALL INSTALL.ja DISTFILES README.ja README LICENSE.txt \ + ChangeLog rpm_docs) +cp -r patch rpm_docs + +%clean +rm -fr $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +%{prefix}/bin/idnconv +%{prefix}/bin/runidn +%{prefix}/lib/libidnkit.so.* +%{prefix}/lib/libidnkitlite.so.* +%{prefix}/lib/libidnkitres.so.* +%{prefix}/share/idnkit/* +%config %{sysconfdir}/idn.conf +%config %{sysconfdir}/idnalias.conf +%attr(0644, root, root) %config(noreplace) +%attr(0644, root, man) %{prefix}/man/man1/* +%attr(0644, root, man) %{prefix}/man/man3/* +%attr(0644, root, man) %{prefix}/man/man5/* +%doc rpm_docs/* + +%files devel +%defattr(-, root, root) +%{prefix}/lib/libidnkit.a +%{prefix}/lib/libidnkit.la +%{prefix}/lib/libidnkit.so +%{prefix}/lib/libidnkitlite.a +%{prefix}/lib/libidnkitlite.la +%{prefix}/lib/libidnkitlite.so +%{prefix}/lib/libidnkitres.a +%{prefix}/lib/libidnkitres.la +%{prefix}/lib/libidnkitres.so +%{prefix}/include/idn/* + +%changelog +* Web May 15 2002 Motoyuki Kasahara +- 1.0beta2, experimental. + +* Mon May 28 2001 MANABE Takashi +- include runmdn, libmdnresolv + +* Mon Apr 4 2001 Motoyuki Kasahara +- 2.1 release + +* Mon Apr 4 2001 Motoyuki Kasahara +- 2.0.1 release + +* Mon Apr 2 2001 MANABE Takashi +- 2.0 release + +* Fri Mar 3 2001 MANABE Takashi +- 1.3 release + +* Mon Dec 6 2000 MANABE Takashi +- add brace/lace functions to libmdnresolv(mdnkit-1.2-runmdn.patch) +- include /var/dnsproxy +- change files section for compressed man pages + +* Mon Nov 27 2000 Makoto Ishisone +- 1.2 release + +* Thu Nov 2 2000 MANABE Takashi +- 1.1 release + +* Fri Oct 27 2000 MANABE Takashi +- dnsproxy.patch1 +- move libmdnresolv.{la,so} from mdnkit-devel to mdnkit package + +* Wed Oct 18 2000 MANABE Takashi +- 1.0 release diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/Makefile.in b/contrib/idn/idnkit-1.0-src/tools/runidn/Makefile.in new file mode 100644 index 0000000000..8e3875ff59 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/Makefile.in @@ -0,0 +1,167 @@ +# $Id: Makefile.in,v 1.1 2003/06/04 00:27:11 marka Exp $ +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +LIB_CURRENT = 1 +LIB_REVISION = 1 +LIB_AGE = 0 + +.SUFFIXES: +.SUFFIXES: .c .lo + +top_builddir = ../.. +subdir = tools/runidn + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +libdir = @libdir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 + +CC = @CC@ +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @top_srcdir@/mkinstalldirs +SHELL = @SHELL@ +LIBTOOL = @LIBTOOL@ + +ICONVINC = @ICONVINC@ +ICONVLIB = @ICONVLIB@ + +INCS = -I$(srcdir) -I$(srcdir)/../../include -I../../include $(ICONVINC) +DEFS = + +CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +LIB = libidnkitres +OBJS = rtresolver.lo stub.lo $(IDNOBJS) +SCRIPT = runidn +LIBDL = @LIBDL@ + +IDNDIR = ../../lib +IDNOBJS = \ + $(IDNDIR)/aliaslist.lo \ + $(IDNDIR)/api.lo \ + $(IDNDIR)/checker.lo \ + $(IDNDIR)/converter.lo \ + $(IDNDIR)/debug.lo \ + $(IDNDIR)/delimitermap.lo \ + $(IDNDIR)/filechecker.lo \ + $(IDNDIR)/filemapper.lo \ + $(IDNDIR)/localencoding.lo \ + $(IDNDIR)/log.lo \ + $(IDNDIR)/mapper.lo \ + $(IDNDIR)/mapselector.lo \ + $(IDNDIR)/nameprep.lo \ + $(IDNDIR)/normalizer.lo \ + $(IDNDIR)/punycode.lo \ + $(IDNDIR)/race.lo \ + $(IDNDIR)/res.lo \ + $(IDNDIR)/resconf.lo \ + $(IDNDIR)/result.lo \ + $(IDNDIR)/strhash.lo \ + $(IDNDIR)/ucsmap.lo \ + $(IDNDIR)/ucsset.lo \ + $(IDNDIR)/unicode.lo \ + $(IDNDIR)/unormalize.lo \ + $(IDNDIR)/ucs4.lo \ + $(IDNDIR)/utf8.lo \ + $(IDNDIR)/util.lo \ + $(IDNDIR)/version.lo + +.c.lo: + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< + +@RUNIDN_TRUE@all: $(LIB).la runidn +@RUNIDN_FALSE@all: + +rtresolver.lo: $(srcdir)/resolver.c + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DFOR_RUNIDN -o $@ \ + -c $(srcdir)/resolver.c + +$(LIB).la: $(OBJS) + $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ + -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ + -module -rpath $(libdir) $(OBJS) $(LIBDL) + +runidn: $(srcdir)/runidn.in + cd $(top_builddir) && \ + CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= \ + $(SHELL) ./config.status + +@RUNIDN_TRUE@@COMPAT_TRUE@install: all install-runidn install-compat +@RUNIDN_TRUE@@COMPAT_FALSE@install: all install-runidn +@RUNIDN_FALSE@install: + +install-runidn: + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIB).la \ + $(DESTDIR)$(libdir)/$(LIB).la + $(MKINSTALLDIRS) $(DESTDIR)$(bindir) + $(INSTALL_SCRIPT) $(SCRIPT) $(DESTDIR)$(bindir) + $(MKINSTALLDIRS) $(DESTDIR)$(man1dir) + $(INSTALL_DATA) $(srcdir)/runidn.1 $(DESTDIR)$(man1dir)/runidn.1 + +install-compat: + src=$(DESTDIR)$(bindir)/runidn; \ + dst=$(DESTDIR)$(bindir)/runmdn; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + src=$(DESTDIR)$(man1dir)/runidn.1; \ + dst=$(DESTDIR)$(man1dir)/runmdn.1; \ + rm -f $$dst; \ + ln $$src $$dst || cp $$src $$dst + +clean: + rm -f *.lo *.la *.o + rm -fr .libs/ + +distclean: clean + rm -f runidn Makefile + +test check: diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.c b/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.c new file mode 100644 index 0000000000..eaa932887a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.c @@ -0,0 +1,1056 @@ +#ifndef lint +static char *rcsid = "$Id: resolver.c,v 1.1 2003/06/04 00:27:12 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef FOR_RUNIDN +/* + * This file is specially compiled for runidn. + * runidn replaces existing resolver functions dynamically with ones + * with IDN processing (encoding conversion and normalization). + * So entry names must be same as the system's one. + */ +#include "stub.h" + +#define ENTRY(name) name +#define REAL(name) idn_stub_ ## name +#else +/* + * For normal use. All the entry names are prefixed with "idn_resolver_". + * has bunch of #defines to substitute the standard + * name resolver functions with ones provided here. + */ +#include "resolver.h" +#undef gethostbyname +#undef gethostbyname2 +#undef gethostbyaddr +#undef gethostbyname_r +#undef gethostbyname2_r +#undef gethostbyaddr_r +#undef getipnodebyname +#undef getipnodebyaddr +#undef getaddrinfo +#undef getnameinfo + +#define ENTRY(name) idn_resolver_ ## name +#define REAL(name) name +#endif + +#define IDN_NAME_SIZE 512 + +#define IDN_HOSTBUF_SIZE 2048 +typedef union { + char *dummy_for_alignment; + char data[IDN_HOSTBUF_SIZE]; +} hostbuf_t; + +typedef struct obj_lock { + void *key; + struct obj_lock *next; +} obj_lock_t; + +#define OBJLOCKHASH_SIZE 127 +static obj_lock_t *obj_lock_hash[OBJLOCKHASH_SIZE]; + +/* + * This variable is to prevent IDN processing occuring more than once for + * a single name resolution. This will happen if some resolver function + * is implemented using another function (e.g. gethostbyname() implemented + * using gethostbyname2()). + * No, using the static variable is not a correct thing to do for a multi- + * threading environment, but I don't think of a better solution.. + */ +static int idn_isprocessing = 0; + +static int obj_hash(void *key); +static int obj_islocked(void *key); +static void obj_lock(void *key); +static void obj_unlock(void *key); +static struct hostent *copy_decode_hostent_static(struct hostent *hp, + struct hostent *newhp, + char *buf, size_t buflen, + int *errp); +static char *decode_name_dynamic(const char *name); +static struct hostent *copy_decode_hostent_dynamic(struct hostent *hp, + int *errp); +static void free_copied_hostent(struct hostent *hp); +#ifdef HAVE_GETADDRINFO +static struct addrinfo *copy_decode_addrinfo_dynamic(struct addrinfo *aip); +#endif +#ifdef HAVE_FREEADDRINFO +static void free_copied_addrinfo(struct addrinfo *aip); +#endif + +/* + * Object locking facility. + */ + +static int +obj_hash(void *key) { + /* + * Hash function for obj_*. + * 'key' is supposed to be an address. + */ + unsigned long v = (unsigned long)key; + + return ((v >> 3) % OBJLOCKHASH_SIZE); +} + +static int +obj_islocked(void *key) +{ + /* + * Check if the object specified by 'key' is locked. + * Return 1 if so, 0 otherwise. + */ + int h = obj_hash(key); + obj_lock_t *olp = obj_lock_hash[h]; + + while (olp != NULL) { + if (olp->key == key) + return (1); + olp = olp->next; + } + return (0); +} + +static void +obj_lock(void *key) +{ + /* + * Lock an object specified by 'key'. + */ + int h = obj_hash(key); + obj_lock_t *olp; + + olp = malloc(sizeof(obj_lock_t)); + if (olp != NULL) { + olp->key = key; + olp->next = obj_lock_hash[h]; + obj_lock_hash[h] = olp; + } +} + +static void +obj_unlock(void *key) +{ + /* + * Unlock an object specified by 'key'. + */ + int h = obj_hash(key); + obj_lock_t *olp, *olp0; + + olp = obj_lock_hash[h]; + olp0 = NULL; + while (olp != NULL) { + if (olp->key == key) { + if (olp0 == NULL) + obj_lock_hash[h] = olp->next; + else + olp0->next = olp->next; + free(olp); + return; + } + olp0 = olp; + olp = olp->next; + } +} + +static struct hostent * +copy_decode_hostent_static(struct hostent *hp, struct hostent *newhp, + char *buf, size_t buflen, int *errp) +{ + /* + * Copy "struct hostent" data referenced by 'hp' to 'newhp'. + * It's a deep-copy, meaning all the data referenced by 'hp' are + * also copied. They are copied into 'buf', whose length is 'buflen'. + * The domain names ('hp->h_name' and 'hp->h_aliases') are + * decoded from ACE to the local encoding before they are copied. + * If 'buf' is too small to hold all the data, NULL will be + * returned and '*errp' is set to NO_RECOVERY. + */ + int naliases = 0; + int naddrs = 0; + + if (hp == NULL) + return (NULL); + + *newhp = *hp; + + if (hp->h_aliases != NULL) { + /* + * Allocate aliase table in 'buf'. + */ + size_t sz; + + while (hp->h_aliases[naliases] != NULL) + naliases++; + + newhp->h_aliases = (char **)buf; + sz = sizeof(char *) * (naliases + 1); + + if (buflen < sz) + goto overflow; + + buf += sz; + buflen -= sz; + } + + if (hp->h_addr_list != NULL) { + /* + * Allocate address table in 'buf'. + */ + size_t sz; + int i; + + while (hp->h_addr_list[naddrs] != NULL) + naddrs++; + + newhp->h_addr_list = (char **)buf; + sz = sizeof(char *) * (naddrs + 1); + + if (buflen < sz) + goto overflow; + + buf += sz; + buflen -= sz; + + /* + * Copy the addresses. + */ + sz = hp->h_length * naddrs; + if (buflen < sz) + goto overflow; + + for (i = 0; i < naddrs; i++) { + newhp->h_addr_list[i] = buf; + memcpy(buf, hp->h_addr_list[i], hp->h_length); + buf += hp->h_length; + } + newhp->h_addr_list[naddrs] = NULL; + + buf += sz; + buflen -= sz; + } + + if (hp->h_name != NULL) { + /* + * Decode the name in h_name. + */ + idn_result_t r; + size_t slen; + + idn_enable(1); + idn_nameinit(1); + r = idn_decodename(IDN_DECODE_APP, hp->h_name, + buf, buflen); + switch (r) { + case idn_success: + newhp->h_name = buf; + break; + default: + /* Copy hp->h_name verbatim. */ + if (strlen(hp->h_name) + 1 <= buflen) { + newhp->h_name = buf; + strcpy(buf, hp->h_name); + break; + } + /* falllthrough */ + case idn_buffer_overflow: + goto overflow; + } + + slen = strlen(buf) + 1; + buf += slen; + buflen -= slen; + } + + if (hp->h_aliases != NULL) { + /* + * Decode the names in h_aliases. + */ + char **aliases = hp->h_aliases; + char **newaliases = newhp->h_aliases; + int i; + + for (i = 0; i < naliases; i++) { + idn_result_t r; + size_t slen; + + idn_enable(1); + idn_nameinit(1); + r = idn_decodename(IDN_DECODE_APP, aliases[i], + buf, buflen); + + switch (r) { + case idn_success: + newaliases[i] = buf; + break; + default: + /* Copy hp->h_name verbatim. */ + if (strlen(aliases[i]) + 1 <= buflen) { + newaliases[i] = buf; + strcpy(buf, aliases[i]); + break; + } + /* falllthrough */ + case idn_buffer_overflow: + goto overflow; + } + + slen = strlen(buf) + 1; + buf += slen; + buflen -= slen; + } + newaliases[naliases] = NULL; + } + + return (newhp); + + overflow: + *errp = NO_RECOVERY; + return (NULL); +} + +static char * +decode_name_dynamic(const char *name) { + idn_result_t r; + char buf[IDN_NAME_SIZE]; + char *s; + + idn_enable(1); + idn_nameinit(1); + r = idn_decodename(IDN_DECODE_APP, name, buf, sizeof(buf)); + if (r == idn_success) { + name = buf; + } + s = malloc(strlen(name) + 1); + if (s == NULL) + return (NULL); + else + return (strcpy(s, name)); +} + +static struct hostent * +copy_decode_hostent_dynamic(struct hostent *hp, int *errp) { + /* + * Make a deep-copy of the data referenced by 'hp', and return + * a pointer to the copied data. + * All the data are dynamically allocated using malloc(). + * The domain names ('hp->h_name' and 'hp->h_aliases') are + * decoded from ACE to the local encoding before they are copied. + * If malloc() fails, NULL will be returned and '*errp' is set to + * NO_RECOVERY. + */ + struct hostent *newhp; + char **pp; + size_t alloc_size; + int naliases = 0; + int naddrs = 0; + int i; + + if (hp == NULL) + return (NULL); + + if (hp->h_aliases != NULL) { + while (hp->h_aliases[naliases] != NULL) + naliases++; + } + + if (hp->h_addr_list != NULL) { + while (hp->h_addr_list[naddrs] != NULL) + naddrs++; + } + + alloc_size = sizeof(struct hostent) + + sizeof(char *) * (naliases + 1) + + sizeof(char *) * (naddrs + 1) + + hp->h_length * naddrs; + + if ((newhp = malloc(alloc_size)) == NULL) { + return (hp); + } + + memset(newhp, 0, alloc_size); + + pp = (char **)(newhp + 1); + + if (hp->h_name != NULL) { + newhp->h_name = decode_name_dynamic(hp->h_name); + if (newhp->h_name == NULL) + goto alloc_fail; + } + + newhp->h_addrtype = hp->h_addrtype; + newhp->h_length = hp->h_length; + + if (hp->h_aliases != NULL) { + newhp->h_aliases = pp; + for (i = 0; i < naliases; i++) { + newhp->h_aliases[i] = + decode_name_dynamic(hp->h_aliases[i]); + if (newhp->h_aliases[i] == NULL) + goto alloc_fail; + } + newhp->h_aliases[naliases] = NULL; + pp += naliases + 1; + } + + if (hp->h_addr_list != NULL) { + char *p; + + newhp->h_addr_list = pp; + pp += naddrs + 1; + p = (char *)pp; + + for (i = 0; i < naddrs; i++) { + newhp->h_addr_list[i] = p; + memcpy(p, hp->h_addr_list[i], hp->h_length); + p += hp->h_length; + } + newhp->h_addr_list[naddrs] = NULL; + } + + return (newhp); + + alloc_fail: + free_copied_hostent(hp); + *errp = NO_RECOVERY; + return (NULL); +} + +static void +free_copied_hostent(struct hostent *hp) { + /* + * Free all the memory allocated by copy_decode_hostent_dynamic(). + */ + if (hp->h_name != NULL) + free(hp->h_name); + if (hp->h_aliases != NULL) { + char **pp = hp->h_aliases; + while (*pp != NULL) + free(*pp++); + } + free(hp); +} + +#ifdef HAVE_GETNAMEINFO +static struct addrinfo * +copy_decode_addrinfo_dynamic(struct addrinfo *aip) { + struct addrinfo *newaip; + + if (aip == NULL) + return (NULL); + + newaip = malloc(sizeof(struct addrinfo) + aip->ai_addrlen); + if (newaip == NULL) + return (NULL); + + *newaip = *aip; + newaip->ai_addr = (struct sockaddr *)(newaip + 1); + memcpy(newaip->ai_addr, aip->ai_addr, aip->ai_addrlen); + + if (newaip->ai_canonname != NULL) + newaip->ai_canonname = decode_name_dynamic(aip->ai_canonname); + + newaip->ai_next = copy_decode_addrinfo_dynamic(aip->ai_next); + return (newaip); +} +#endif + +#ifdef HAVE_FREEADDRINFO +static void +free_copied_addrinfo(struct addrinfo *aip) { + while (aip != NULL) { + struct addrinfo *next = aip->ai_next; + + if (aip->ai_canonname != NULL) + free(aip->ai_canonname); + free(aip); + aip = next; + } +} +#endif + +#ifdef HAVE_GETHOSTBYNAME +struct hostent * +ENTRY(gethostbyname)(const char *name) { + static hostbuf_t buf; + static struct hostent he; + idn_result_t r; + struct hostent *hp; + + if (idn_isprocessing) + return (REAL(gethostbyname)(name)); + + TRACE(("gethostbyname(name=%s)\n", idn__debug_xstring(name, 60))); + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, buf.data, sizeof(buf)); + if (r == idn_success) + name = buf.data; + + hp = copy_decode_hostent_static(REAL(gethostbyname)(name), + &he, buf.data, sizeof(buf), + &h_errno); + idn_isprocessing = 0; + return (hp); +} +#endif + +#ifdef HAVE_GETHOSTBYNAME2 +struct hostent * +ENTRY(gethostbyname2)(const char *name, int af) { + static hostbuf_t buf; + static struct hostent he; + idn_result_t r; + struct hostent *hp; + + if (idn_isprocessing) + return (REAL(gethostbyname2)(name, af)); + + TRACE(("gethostbyname2(name=%s)\n", idn__debug_xstring(name, 60), af)); + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, buf.data, sizeof(buf)); + if (r == idn_success) + name = buf.data; + + hp = copy_decode_hostent_static(REAL(gethostbyname2)(name, af), + &he, buf.data, sizeof(buf), + &h_errno); + idn_isprocessing = 0; + return (hp); +} +#endif + +#ifdef HAVE_GETHOSTBYADDR +struct hostent * +ENTRY(gethostbyaddr)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type) { + static hostbuf_t buf; + static struct hostent he; + struct hostent *hp; + + if (idn_isprocessing) + return (REAL(gethostbyaddr)(addr, len, type)); + + TRACE(("gethostbyaddr()\n")); + + idn_isprocessing = 1; + hp = copy_decode_hostent_static(REAL(gethostbyaddr)(addr, len, type), + &he, buf.data, sizeof(buf), + &h_errno); + idn_isprocessing = 0; + return (hp); +} +#endif + +#ifdef GETHOST_R_GLIBC_FLAVOR + +#ifdef HAVE_GETHOSTBYNAME_R +int +ENTRY(gethostbyname_r)(const char *name, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp) +{ + char namebuf[IDN_NAME_SIZE]; + char *data; + size_t datalen; + idn_result_t r; + struct hostent he; + hostbuf_t buf; + int n; + + if (idn_isprocessing) + return (REAL(gethostbyname_r)(name, result, buffer, + buflen, rp, errp)); + + TRACE(("gethostbyname_r(name=%s,buflen=%d)\n", + idn__debug_xstring(name, 60), buflen)); + + if (buflen <= sizeof(buf)) { + data = buf.data; + datalen = sizeof(buf); + } else { + data = malloc(buflen); + datalen = buflen; + if (data == NULL) { + *errp = NO_RECOVERY; + return (ENOMEM); + } + } + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); + if (r == idn_success) + name = namebuf; + + *errp = 0; + n = REAL(gethostbyname_r)(name, &he, data, datalen, rp, errp); + + if (n == 0 && *rp != NULL) + *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, + errp); + idn_isprocessing = 0; + + if (data != buf.data) + free(data); + + if (*errp != 0) + n = EINVAL; /* XXX */ + + return (n); +} +#endif + +#ifdef HAVE_GETHOSTBYNAME2_R +int +ENTRY(gethostbyname2_r)(const char *name, int af, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp) +{ + char namebuf[IDN_NAME_SIZE]; + char *data; + size_t datalen; + idn_result_t r; + struct hostent he; + hostbuf_t buf; + int n; + + if (idn_isprocessing) + return (REAL(gethostbyname2_r)(name, af, result, buffer, + buflen, rp, errp)); + + TRACE(("gethostbyname2_r(name=%s,buflen=%d)\n", + idn__debug_xstring(name, 60), buflen)); + + if (buflen <= sizeof(buf)) { + data = buf.data; + datalen = sizeof(buf); + } else { + data = malloc(buflen); + datalen = buflen; + if (data == NULL) { + *errp = NO_RECOVERY; + return (ENOMEM); + } + } + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); + if (r == idn_success) + name = namebuf; + + n = REAL(gethostbyname2_r)(name, af, &he, data, datalen, rp, errp); + + if (n == 0 && *rp != NULL) + *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, + errp); + idn_isprocessing = 0; + + if (data != buf.data) + free(data); + + if (*errp != 0) + n = EINVAL; /* XXX */ + + return (n); +} +#endif + +#ifdef HAVE_GETHOSTBYADDR_R +int +ENTRY(gethostbyaddr_r)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp) +{ + char *data; + size_t datalen; + struct hostent he; + hostbuf_t buf; + int n; + + if (idn_isprocessing) { + return (REAL(gethostbyaddr_r)(addr, len, type, result, + buffer, buflen, rp, errp)); + } + + TRACE(("gethostbyaddr_r(buflen=%d)\n", buflen)); + + if (buflen <= sizeof(buf)) { + data = buf.data; + datalen = sizeof(buf); + } else { + data = malloc(buflen); + datalen = buflen; + if (data == NULL) { + *errp = NO_RECOVERY; + return (ENOMEM); + } + } + + idn_isprocessing = 1; + n = REAL(gethostbyaddr_r)(addr, len, type, &he, + data, datalen, rp, errp); + + if (n == 0 && *rp != NULL) + *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, + errp); + idn_isprocessing = 0; + + if (data != buf.data) + free(data); + + if (*errp != 0) + n = EINVAL; /* XXX */ + + return (0); +} +#endif + +#else /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETHOSTBYNAME_R +struct hostent * +ENTRY(gethostbyname_r)(const char *name, struct hostent *result, + char *buffer, int buflen, int *errp) +{ + char namebuf[IDN_NAME_SIZE]; + char *data; + size_t datalen; + idn_result_t r; + struct hostent *hp, he; + hostbuf_t buf; + + if (idn_isprocessing) + return (REAL(gethostbyname_r)(name, result, buffer, + buflen, errp)); + + TRACE(("gethostbyname_r(name=%s,buflen=%d)\n", + idn__debug_xstring(name, 60), buflen)); + + if (buflen <= sizeof(buf)) { + data = buf.data; + datalen = sizeof(buf); + } else { + data = malloc(buflen); + datalen = buflen; + if (data == NULL) { + *errp = NO_RECOVERY; + return (NULL); + } + } + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); + if (r == idn_success) + name = namebuf; + + hp = REAL(gethostbyname_r)(name, &he, data, datalen, errp); + + if (hp != NULL) + hp = copy_decode_hostent_static(hp, result, buffer, buflen, + errp); + idn_isprocessing = 0; + + if (data != buf.data) + free(data); + + return (hp); +} +#endif + +#ifdef HAVE_GETHOSTBYADDR_R +struct hostent * +ENTRY(gethostbyaddr_r)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, + char *buffer, int buflen, int *errp) +{ + char *data; + size_t datalen; + struct hostent *hp, he; + hostbuf_t buf; + + if (idn_isprocessing) { + return (REAL(gethostbyaddr_r)(addr, len, type, result, + buffer, buflen, errp)); + } + + TRACE(("gethostbyaddr_r(buflen=%d)\n", buflen)); + + if (buflen <= sizeof(buf)) { + data = buf.data; + datalen = sizeof(buf); + } else { + data = malloc(buflen); + datalen = buflen; + if (data == NULL) { + *errp = NO_RECOVERY; + return (NULL); + } + } + + idn_isprocessing = 1; + hp = REAL(gethostbyaddr_r)(addr, len, type, &he, data, datalen, errp); + + if (hp != NULL) + hp = copy_decode_hostent_static(hp, result, buffer, buflen, + errp); + idn_isprocessing = 0; + + if (data != buf.data) + free(data); + + return (hp); +} +#endif + +#endif /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETIPNODEBYNAME +struct hostent * +ENTRY(getipnodebyname)(const char *name, int af, int flags, int *errp) { + char namebuf[IDN_NAME_SIZE]; + idn_result_t r; + struct hostent *hp; + + if (idn_isprocessing) + return (REAL(getipnodebyname)(name, af, flags, errp)); + + TRACE(("getipnodebyname(name=%s)\n", idn__debug_xstring(name, 60), af)); + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); + if (r == idn_success) + name = namebuf; + + hp = REAL(getipnodebyname)(name, af, flags, errp); + if (hp != NULL) { + struct hostent *newhp = copy_decode_hostent_dynamic(hp, errp); + if (newhp != hp) { + REAL(freehostent)(hp); + obj_lock(newhp); + hp = newhp; + } + } + idn_isprocessing = 0; + return (hp); +} +#endif + +#ifdef HAVE_GETIPNODEBYADDR +struct hostent * +ENTRY(getipnodebyaddr)(const void *src, size_t len, int af, int *errp) { + struct hostent *hp; + + if (idn_isprocessing) + return (REAL(getipnodebyaddr)(src, len, af, errp)); + + TRACE(("getipnodebyaddr()\n")); + + idn_isprocessing = 1; + hp = REAL(getipnodebyaddr)(src, len, af, errp); + if (hp != NULL) { + struct hostent *newhp = copy_decode_hostent_dynamic(hp, errp); + if (newhp != hp) { + REAL(freehostent)(hp); + obj_lock(newhp); + hp = newhp; + } + } + idn_isprocessing = 0; + return (hp); +} +#endif + +#ifdef HAVE_FREEHOSTENT +void +ENTRY(freehostent)(struct hostent *hp) { + TRACE(("freehostent(hp=%p)\n", (void *)hp)); + + if (obj_islocked(hp)) { + /* + * We allocated the data. + */ + obj_unlock(hp); + free_copied_hostent(hp); + } else { + /* + * It was allocated the original getipnodeby*(). + */ + REAL(freehostent)(hp); + } +} +#endif + +#ifdef HAVE_GETADDRINFO +int +ENTRY(getaddrinfo)(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res) +{ + char namebuf[IDN_NAME_SIZE]; + idn_result_t r; + struct addrinfo *aip; + int err; + + if (nodename == NULL || idn_isprocessing) + return (REAL(getaddrinfo)(nodename, servname, hints, res)); + + TRACE(("getaddrinfo(nodename=%s)\n", idn__debug_xstring(nodename, 60))); + + idn_isprocessing = 1; + idn_enable(1); + idn_nameinit(1); + r = idn_encodename(IDN_ENCODE_APP, nodename, + namebuf, sizeof(namebuf)); + if (r == idn_success) + nodename = namebuf; + + err = REAL(getaddrinfo)(nodename, servname, hints, &aip); + if (err == 0 && aip != NULL) { + *res = copy_decode_addrinfo_dynamic(aip); + if (*res == NULL) + err = EAI_FAIL; + else + obj_lock(*res); + if (aip != NULL) + REAL(freeaddrinfo)(aip); + } + idn_isprocessing = 0; + return (err); +} +#endif + +#ifdef HAVE_FREEADDRINFO +void +ENTRY(freeaddrinfo)(struct addrinfo *aip) { + TRACE(("freeaddrinfo(aip=%p)\n", (void *)aip)); + + if (obj_islocked(aip)) { + /* + * We allocated the data. + */ + obj_unlock(aip); + free_copied_addrinfo(aip); + } else { + /* + * It was allocated the original getaddrinfo(). + */ + REAL(freeaddrinfo)(aip); + } +} +#endif + +#ifdef HAVE_GETNAMEINFO +int +ENTRY(getnameinfo)(const struct sockaddr *sa, GNI_SALEN_T salen, + char *host, GNI_HOSTLEN_T hostlen, char *serv, + GNI_SERVLEN_T servlen, GNI_FLAGS_T flags) +{ + char name[IDN_NAME_SIZE]; + size_t namelen = sizeof(name); + int code; + idn_result_t r; + + if (host == NULL || hostlen == 0 || idn_isprocessing) { + return (REAL(getnameinfo)(sa, salen, host, hostlen, + serv, servlen, flags)); + } + + TRACE(("getnameinfo(hostlen=%u)\n", hostlen)); + + idn_isprocessing = 1; + code = REAL(getnameinfo)(sa, salen, name, namelen, + serv, servlen, flags); + if (code == 0 && name[0] != '\0') { + idn_enable(1); + idn_nameinit(1); + r = idn_decodename(IDN_DECODE_APP, name, host, hostlen); + switch (r) { + case idn_success: + code = 0; + break; + case idn_buffer_overflow: + case idn_nomemory: + code = EAI_MEMORY; + break; + default: + code = EAI_FAIL; + break; + } + } + idn_isprocessing = 0; + return (code); +} +#endif diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.h b/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.h new file mode 100644 index 0000000000..c11dab18d8 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/resolver.h @@ -0,0 +1,70 @@ +/* $Id: resolver.h,v 1.1 2003/06/04 00:27:13 marka Exp $ */ +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef RESOLVER_H +#define RESOLVER_H 1 + +#undef gethostbyname +#define gethostbyname idn_resolver_gethostbyname +#undef gethostbyname2 +#define gethostbyname2 idn_resolver_gethostbyname2 +#undef gethostbyname_r +#define gethostbyname_r idn_resolver_gethostbyname_r +#undef gethostbyaddr +#define gethostbyaddr idn_resolver_gethostbyaddr +#undef gethostbyaddr +#define gethostbyaddr_r idn_resolver_gethostbyaddr_r +#undef getipnodebyname +#define getipnodebyname idn_resolver_getipnodebyname +#undef getipnodebyaddr +#define getipnodebyaddr idn_resolver_getipnodebyaddr +#undef freehostent +#define freehostent idn_resolver_freehostent +#undef getaddrinfo +#define getaddrinfo idn_resolver_getaddrinfo +#undef freeaddrinfo +#define freeaddrinfo idn_resolver_freeaddrinfo +#undef getnameinfo +#define getnameinfo idn_resolver_getnameinfo + +#endif /* RESOLVER_H */ diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.1 b/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.1 new file mode 100644 index 0000000000..244e611184 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.1 @@ -0,0 +1,151 @@ +.\" $Id: runidn.1,v 1.1 2003/06/04 00:27:14 marka Exp $ +.\" +.\" Copyright (c) 2000,2001 Japan Network Information Center. +.\" All rights reserved. +.\" +.\" By using this file, you agree to the terms and conditions set forth bellow. +.\" +.\" LICENSE TERMS AND CONDITIONS +.\" +.\" The following License Terms and Conditions apply, unless a different +.\" license is obtained from Japan Network Information Center ("JPNIC"), +.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +.\" Chiyoda-ku, Tokyo 101-0047, Japan. +.\" +.\" 1. Use, Modification and Redistribution (including distribution of any +.\" modified or derived work) in source and/or binary forms is permitted +.\" under this License Terms and Conditions. +.\" +.\" 2. Redistribution of source code must retain the copyright notices as they +.\" appear in each source code file, this License Terms and Conditions. +.\" +.\" 3. Redistribution in binary form must reproduce the Copyright Notice, +.\" this License Terms and Conditions, in the documentation and/or other +.\" materials provided with the distribution. For the purposes of binary +.\" distribution the "Copyright Notice" refers to the following language: +.\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +.\" +.\" 4. The name of JPNIC may not be used to endorse or promote products +.\" derived from this Software without specific prior written approval of +.\" JPNIC. +.\" +.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +.\" +.TH RUNIDN 1 "April 6, 2001" +.\" +.SH NAME +runidn \- A script to allow applications to use internationalized domain names. +.\" +.SH SYNOPSIS +\fBrunidn\fP [\fB-e\fP \fIlocal-codeset\fP] \fIprogram-name\fP [\fIargs..\fP] +.\" +.SH DESCRIPTION +\fBrunidn\fP enables applications to use internationalized domain names +without recompilation. +Just add ``runidn'' before the application-name, and the application +can handle non-ASCII domain names. For example, you can do: +.PP +.RS 4 +.nf +\f(CW% runidn telnet \fInon-ASCII-hostname\fR +.fi +.RE +.PP +Before using runidn, you should set up properties related to +internationalized DNS by configuring idnkit's configuration file +\fBidn.conf\fP. +See idn.conf(5) which describes the configuration. +.\" +.SH OPTION +The following option is available: +.TP 4 +\fB\-e\fP \fIlocal-codeset\fP +Specify the application's local codeset. +If the option is not specified, \fBrunidn\fR guesses the codeset +from the current locale. +See the ``NOTE'' section for more details about local codeset. +.\" +.SH IMPLEMENTATION +\fBrunidn\fR is a small shell script that sets up an environment variable +called ``LD_PRELOAD'', so that an application dynamically links a shared +library ``libidnkitres'' before any other shared libraries. +.PP +The library ``libidnkitres'' provides a special version of resolver +functions which implement features for handling internationalized +domain names. +\fBrunidn\fR replaces the following functions with the special version: +.PP +.RS 4 +.nf +.ft CW +gethostbyname +gethostbyname2 +gethostbyaddr +gethostbyname_r +gethostbyname2_r +gethostbyaddr_r +getipnodebyname +getipnodebyaddr +freehostent +getaddrinfo +freeaddrinfo +getnameinfo +.ft R +.fi +.RE +.PP +By overriding them in the standard libraries with the special version +provided by ``libidnkitres'', +\fBrunidn\fR enables applications to use internationalized domain names. +.RS 4 +.IP \(bu 2 +These API functions accept non-ASCII domain names encoded +in the local codeset that the application is using. +Also the result from these APIs may contain non-ASCII domain names. +.IP \(bu 2 +The normalization and codeset conversion between application's local +codeset and the codeset used in DNS protocol data are handled +automatically, so users/applications need not worry about them. +.RE +.PP +Properties of internationalized DNS (such as the normalization or +the codeset used on DNS protocol data) can be configured with the +idnkit's configuration file (\fBidn.conf\fR). +See idn.conf(5) for details. +.\" +.SH NOTE +Unless \fB\-e\fP option is specified, \fBrunidn\fR tries to guess +the application's local codeset from the application's current locale. +However, sometimes it cannot guess the codeset correctly, for example +if the application does not set the locale appropriately by calling +`setlocale()'. +In that case, you can explicitly specify the local codeset by setting an +environment variable ``IDN_LOCAL_CODESET''. +See the section ``LOCAL CODESET'' in idn.conf(5) for details. +.PP +The idea of using ``LD_PRELOAD'' to replace some functions in the standard +library was taken from ``runsocks'' script distributed as part of SOCKS5 +reference implementation. +.SH BUGS +There are many cases where \fBrunidn\fR does not work. +.PP +Your system must support ``LD_PRELOAD'' mechanism in the first place. +.PP +Due to security reasons, ``LD_PRELOAD'' mechanism is disabled for +setuid programs in any sane systems. +So \fBrunidn\fR does not work for setuid programs such as ping or rsh. +.PP +If your application uses a function other than the ones runidn supports for +name resolution, you lose. +.SH "SEE ALSO" +idn.conf(5), runsocks(1) diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in b/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in new file mode 100644 index 0000000000..3ee6d873f9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in @@ -0,0 +1,109 @@ +#! /bin/sh +# $Id: runidn.in,v 1.1 2003/06/04 00:27:14 marka Exp $ +# +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +# Parse command line options. +usage="Usage: `basename $0` [-e local-encoding] command [argument..]" +while test $# -gt 0; do + case "$1" in + -e) + if test $# -le 1; then + echo $usage 1>&2 + exit 1 + fi + IDN_LOCAL_CODESET="$2" + export IDN_LOCAL_CODESET + shift + ;; + -) + break + ;; + -*) + echo $usage 1>&2 + exit 1 + ;; + *) + break + ;; + esac + shift +done +if test $# -eq 0; then + echo $usage 1>&2 + exit 1 +fi + +# Load library info. +preload= +iconv_file=@ICONVSOFILE@ +if test "$iconv_file" != none; then + preload="$iconv_file@PRELOAD_SEP@" +fi + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=`echo @libdir@` +if test ! -f $libdir/libidnkitres.la; then + cat <&2 +Have you installed idnkit? I cannot find libidnkitres.la. +EOF + exit 1 +fi +eval `grep '^dlname' $libdir/libidnkitres.la` +if test "$dlname" = ""; then + cat <&2 +Sorry, runidn won't work because libidnkitres is not dynamically loadable. +EOF + exit 1 +fi +preload=$preload$libdir/$dlname + +# Set @PRELOAD_VAR@. +if [ X$@PRELOAD_VAR@ = X ]; then + @PRELOAD_VAR@="$preload@PRELOAD_LAST@" +else + @PRELOAD_VAR@="$preload@PRELOAD_SEP@$@PRELOAD_VAR@@PRELOAD_LAST@" +fi +export @PRELOAD_VAR@ + +# Shoot. +exec "$@" diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/stub.c b/contrib/idn/idnkit-1.0-src/tools/runidn/stub.c new file mode 100644 index 0000000000..b5e203c334 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/stub.c @@ -0,0 +1,387 @@ +#ifndef lint +static char *rcsid = "$Id: stub.c,v 1.1 2003/06/04 00:27:13 marka Exp $"; +#endif + +/* + * Copyright (c) 2001 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_DLFCN_H +#include +#endif + +#include +#include + +#include "stub.h" + +#ifndef RTLD_NEXT +typedef struct { + const char *name; + void *handle; +} shared_obj_t; + +static shared_obj_t shobj[] = { +#ifdef SOPATH_LIBC + { SOPATH_LIBC }, +#endif +#ifdef SOPATH_LIBNSL + { SOPATH_LIBNSL }, +#endif + { NULL }, +}; +#endif + +static void *shared_obj_findsym(void *handle, const char *name); +static void *shared_obj_findsymx(void *handle, const char *name); +static void *get_func_addr(const char *name); + +#ifndef RTLD_NEXT +static void * +shared_obj_open(const char *path) { +#ifdef HAVE_DLOPEN + return (dlopen(path, RTLD_LAZY)); +#endif + FATAL(("stub: no way to load shared object file\n")); + return (NULL); +} +#endif + +static void * +shared_obj_findsym(void *handle, const char *name) { + char namebuf[100]; + void *addr; + static int need_leading_underscore = -1; + + /* Prepend underscore. */ + namebuf[0] = '_'; + (void)strcpy(namebuf + 1, name); + name = namebuf; + + if (need_leading_underscore < 0) { + /* First try without one. */ + if ((addr = shared_obj_findsymx(handle, name + 1)) != NULL) { + need_leading_underscore = 0; + return (addr); + } + /* Then try with one. */ + if ((addr = shared_obj_findsymx(handle, name)) != NULL) { + need_leading_underscore = 1; + return (addr); + } + } else if (need_leading_underscore) { + return (shared_obj_findsymx(handle, name)); + } else { + return (shared_obj_findsymx(handle, name + 1)); + } + return (NULL); +} + +static void * +shared_obj_findsymx(void *handle, const char *name) { +#ifdef HAVE_DLSYM + return (dlsym(handle, name)); +#endif + /* logging */ + FATAL(("stub: no way to get symbol address\n")); + return (NULL); +} + +static void * +get_func_addr(const char *name) { +#ifdef RTLD_NEXT + void *addr = shared_obj_findsym(RTLD_NEXT, name); + + if (addr != NULL) { + TRACE(("stub: %s found in the subsequent objects\n", name)); + return (addr); + } +#else + int i; + + for (i = 0; shobj[i].name != NULL; i++) { + if (shobj[i].handle == NULL) { + TRACE(("stub: loading %s\n", shobj[i].name)); + shobj[i].handle = shared_obj_open(shobj[i].name); + } + if (shobj[i].handle != NULL) { + void *addr = shared_obj_findsym(shobj[i].handle, name); + if (addr != NULL) { + TRACE(("stub: %s found in %s\n", + name, shobj[i].name)); + return (addr); + } + } + } +#endif + TRACE(("stub: %s not found\n", name)); + return (NULL); +} + +#ifdef HAVE_GETHOSTBYNAME +struct hostent * +idn_stub_gethostbyname(const char *name) { + static struct hostent *(*fp)(const char *name); + + if (fp == NULL) + fp = get_func_addr("gethostbyname"); + if (fp != NULL) + return ((*fp)(name)); + return (NULL); +} +#endif + +#ifdef HAVE_GETHOSTBYNAME2 +struct hostent * +idn_stub_gethostbyname2(const char *name, int af) { + static struct hostent *(*fp)(const char *name, int af); + + if (fp == NULL) + fp = get_func_addr("gethostbyname2"); + if (fp != NULL) + return ((*fp)(name, af)); + return (NULL); +} +#endif + +#ifdef HAVE_GETHOSTBYADDR +struct hostent * +idn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type) { + static struct hostent *(*fp)(GHBA_ADDR_T name, + GHBA_ADDRLEN_T len, int type); + + if (fp == NULL) + fp = get_func_addr("gethostbyaddr"); + if (fp != NULL) + return ((*fp)(addr, len, type)); + return (NULL); +} +#endif + +#ifdef GETHOST_R_GLIBC_FLAVOR + +#ifdef HAVE_GETHOSTBYNAME_R +int +idn_stub_gethostbyname_r(const char *name, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp) +{ + static int (*fp)(const char *name, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp); + + if (fp == NULL) + fp = get_func_addr("gethostbyname_r"); + if (fp != NULL) + return ((*fp)(name, result, buffer, buflen, rp, errp)); + return (ENOENT); /* ??? */ +} +#endif + +#ifdef HAVE_GETHOSTBYNAME2_R +int +idn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp) +{ + static int (*fp)(const char *name, int af, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp); + + if (fp == NULL) + fp = get_func_addr("gethostbyname2_r"); + if (fp != NULL) + return ((*fp)(name, af, result, buffer, buflen, rp, errp)); + return (ENOENT); /* ??? */ +} +#endif + +#ifdef HAVE_GETHOSTBYADDR_R +int +idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, char *buffer, + size_t buflen, struct hostent **rp, int *errp) +{ + static int (*fp)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, char *buffer, + size_t buflen, struct hostent **rp, int *errp); + + if (fp == NULL) + fp = get_func_addr("gethostbyaddr_r"); + if (fp != NULL) + return ((*fp)(addr, len, type, result, + buffer, buflen, rp, errp)); + return (ENOENT); /* ??? */ +} +#endif + +#else /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETHOSTBYNAME_R +struct hostent * +idn_stub_gethostbyname_r(const char *name, struct hostent *result, + char *buffer, int buflen, int *errp) +{ + static struct hostent *(*fp)(const char *name, struct hostent *result, + char *buffer, int buflen, int *errp); + + if (fp == NULL) + fp = get_func_addr("gethostbyname_r"); + if (fp != NULL) + return ((*fp)(name, result, buffer, buflen, errp)); + return (NULL); +} +#endif + +#ifdef HAVE_GETHOSTBYADDR_R +struct hostent * +idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, int len, int type, + struct hostent *result, char *buffer, + int buflen, int *errp) +{ + static struct hostent *(*fp)(GHBA_ADDR_T addr, int len, int type, + struct hostent *result, char *buffer, + int buflen, int *errp); + + if (fp == NULL) + fp = get_func_addr("gethostbyaddr_r"); + if (fp != NULL) + return ((*fp)(addr, len, type, result, buffer, buflen, errp)); + return (NULL); +} +#endif + +#endif /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETIPNODEBYNAME +struct hostent * +idn_stub_getipnodebyname(const char *name, int af, int flags, int *errp) { + static struct hostent *(*fp)(const char *name, int af, int flags, + int *errp); + + if (fp == NULL) + fp = get_func_addr("getipnodebyname"); + if (fp != NULL) + return ((*fp)(name, af, flags, errp)); + return (NULL); +} +#endif + +#ifdef HAVE_GETIPNODEBYADDR +struct hostent * +idn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp) { + static struct hostent *(*fp)(const void *src, size_t len, int af, + int *errp); + + if (fp == NULL) + fp = get_func_addr("getipnodebyaddr"); + if (fp != NULL) + return ((*fp)(src, len, af, errp)); + return (NULL); +} +#endif + +#ifdef HAVE_FREEHOSTENT +void +idn_stub_freehostent(struct hostent *hp) { + static void (*fp)(struct hostent *hp); + + if (fp == NULL) + fp = get_func_addr("freehostent"); + if (fp != NULL) + (*fp)(hp); +} +#endif + +#ifdef HAVE_GETADDRINFO +int +idn_stub_getaddrinfo(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res) +{ + static int (*fp)(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res); + + if (fp == NULL) + fp = get_func_addr("getaddrinfo"); + if (fp != NULL) + return ((*fp)(nodename, servname, hints, res)); + return (EAI_FAIL); +} +#endif + +#ifdef HAVE_FREEADDRINFO +void +idn_stub_freeaddrinfo(struct addrinfo *aip) { + static void (*fp)(struct addrinfo *aip); + + if (fp == NULL) + fp = get_func_addr("freeaddrinfo"); + if (fp != NULL) + (*fp)(aip); +} +#endif + +#ifdef HAVE_GETNAMEINFO +int +idn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen, + char *host, GNI_HOSTLEN_T hostlen, + char *serv, GNI_SERVLEN_T servlen, GNI_FLAGS_T flags) { + static int (*fp)(const struct sockaddr *sa, GNI_SALEN_T salen, + char *host, GNI_HOSTLEN_T hostlen, + char *serv, GNI_SERVLEN_T servlen, + GNI_FLAGS_T flags); + + if (fp == NULL) + fp = get_func_addr("getnameinfo"); + if (fp != NULL) + return ((*fp)(sa, salen, host, hostlen, serv, servlen, flags)); + return (EAI_FAIL); +} +#endif diff --git a/contrib/idn/idnkit-1.0-src/tools/runidn/stub.h b/contrib/idn/idnkit-1.0-src/tools/runidn/stub.h new file mode 100644 index 0000000000..bb4e3d267d --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/tools/runidn/stub.h @@ -0,0 +1,94 @@ +/* $Id: stub.h,v 1.1 2003/06/04 00:27:13 marka Exp $ */ + +#ifndef STUB_H +#define STUB_H + +#ifdef HAVE_GETHOSTBYNAME +extern struct hostent * +idn_stub_gethostbyname(const char *name); +#endif + +#ifdef GETHOST_R_GLIBC_FLAVOR +#ifdef HAVE_GETHOSTBYNAME_R +extern int +idn_stub_gethostbyname_r(const char *name, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp); +#endif +#else /* GETHOST_R_GLIBC_FLAVOR */ +#ifdef HAVE_GETHOSTBYNAME_R +extern struct hostent * +idn_stub_gethostbyname_r(const char *name, struct hostent *result, + char *buffer, int buflen, int *errp); +#endif +#endif /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETHOSTBYNAME2 +extern struct hostent * +idn_stub_gethostbyname2(const char *name, int af); +#endif + +#ifdef GETHOST_R_GLIBC_FLAVOR +#ifdef HAVE_GETHOSTBYNAME2_R +extern int +idn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result, + char *buffer, size_t buflen, + struct hostent **rp, int *errp); +#endif +#endif /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETHOSTBYADDR +extern struct hostent * +idn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type); +#endif + +#ifdef GETHOST_R_GLIBC_FLAVOR +#ifdef HAVE_GETHOSTBYADDR_R +extern int +idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, char *buffer, + size_t buflen, struct hostent **rp, int *errp); +#endif +#else /* GETHOST_R_GLIBC_FLAVOR */ +#ifdef HAVE_GETHOSTBYADDR_R +extern struct hostent * +idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, + struct hostent *result, char *buffer, + int buflen, int *errp); +#endif +#endif /* GETHOST_R_GLIBC_FLAVOR */ + +#ifdef HAVE_GETIPNODEBYNAME +extern struct hostent * +idn_stub_getipnodebyname(const char *name, int af, int flags, int *errp); +#endif + +#ifdef HAVE_GETIPNODEBYADDR +extern struct hostent * +idn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp); +#endif + +#ifdef HAVE_FREEHOSTENT +extern void +idn_stub_freehostent(struct hostent *hp); +#endif + +#ifdef HAVE_GETADDRINFO +extern int +idn_stub_getaddrinfo(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res); +#endif + +#ifdef HAVE_FREEADDRINFO +extern void +idn_stub_freeaddrinfo(struct addrinfo *aip); +#endif + +#ifdef HAVE_GETNAMEINFO +extern int +idn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen, + char *host, GNI_HOSTLEN_T hostlen, char *serv, + GNI_SERVLEN_T servlen, GNI_FLAGS_T flags); +#endif + +#endif /* STUB_H */ diff --git a/contrib/idn/idnkit-1.0-src/util/Makefile b/contrib/idn/idnkit-1.0-src/util/Makefile new file mode 100644 index 0000000000..9acbbc5d76 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/util/Makefile @@ -0,0 +1,43 @@ +# $Id: Makefile,v 1.1 2003/06/04 00:27:52 marka Exp $ + +PERL = /usr/local/bin/perl -w + +V301_NORM_DIR = data/unicode-3.0.0 +V310_NORM_DIR = data/unicode-3.1.0 +V320_NORM_DIR = data/unicode-3.2.0 +NORM_GENERATOR = ./generate_normalize_data.pl + +NAMEPREP_DIR = data/nameprep +NAMEPREP_FILES = \ + $(NAMEPREP_DIR)/nameprep.rfc3491.map \ + $(NAMEPREP_DIR)/nameprep.rfc3491.prohibited \ + $(NAMEPREP_DIR)/nameprep.rfc3491.unassigned \ + $(NAMEPREP_DIR)/nameprep.rfc3491.bidi +NAMEPREP_GENERATOR = ./generate_nameprep_data.pl +NAMEPREP_VERSIONS = rfc3491 + +all: normalize nameprep + +normalize: ../lib/unicodedata_320.c + +nameprep: ../lib/nameprepdata.c + +../lib/unicodedata_301.c: $(NORM_GENERATOR) + -rm -f $@.tmp + $(PERL) $(NORM_GENERATOR) -prefix v301_ -dir $(V301_NORM_DIR) \ + > $@.tmp && mv $@.tmp $@ + +../lib/unicodedata_310.c: $(NORM_GENERATOR) + -rm -f $@.tmp + $(PERL) $(NORM_GENERATOR) -prefix v310_ -dir $(V310_NORM_DIR) \ + > $@.tmp && mv $@.tmp $@ + +../lib/unicodedata_320.c: $(NORM_GENERATOR) + -rm -f $@.tmp + $(PERL) $(NORM_GENERATOR) -prefix v320_ -dir $(V320_NORM_DIR) \ + > $@.tmp && mv $@.tmp $@ + +../lib/nameprepdata.c: $(NAMEPREP_GENERATOR) $(NAMEPREP_FILES) + -rm -f $@.tmp + $(PERL) $(NAMEPREP_GENERATOR) -dir $(NAMEPREP_DIR) \ + $(NAMEPREP_VERSIONS) > $@.tmp && mv $@.tmp $@ diff --git a/contrib/idn/idnkit-1.0-src/util/SparseMap.pm b/contrib/idn/idnkit-1.0-src/util/SparseMap.pm new file mode 100644 index 0000000000..ca9933b74d --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/util/SparseMap.pm @@ -0,0 +1,575 @@ +# $Id: SparseMap.pm,v 1.1 2003/06/04 00:27:53 marka Exp $ +# +# Copyright (c) 2001 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# + +package SparseMap; + +use strict; +use Carp; + +my $debug = 0; + +sub new { + # common options are: + # BITS => [8, 7, 6], # 3-level map, 2nd level bits=7, 3rd = 6. + # MAX => 0x110000 # actually, max + 1. + my $class = shift; + my $self = {@_}; + + croak "BITS unspecified" unless exists $self->{BITS}; + croak "BITS is not an array reference" + unless ref($self->{BITS}) eq 'ARRAY'; + croak "MAX unspecified" unless exists $self->{MAX}; + + $self->{MAXLV} = @{$self->{BITS}} - 1; + $self->{FIXED} = 0; + + my $lv0size = (indices($self, $self->{MAX} - 1))[0] + 1; + + my @map = (undef) x $lv0size; + $self->{MAP} = \@map; + + bless $self, $class; +} + +sub add1 { + my ($self, $n, $val) = @_; + + croak "Already fixed" if $self->{FIXED}; + carp("data ($n) out of range"), return if $n >= $self->{MAX}; + + my @index = $self->indices($n); + my $r = $self->{MAP}; + my $maxlv = $self->{MAXLV}; + my $idx; + my $lv; + + for ($lv = 0; $lv < $maxlv - 1; $lv++) { + $idx = $index[$lv]; + $r->[$idx] = $self->create_imap($lv + 1, undef) + unless defined $r->[$idx]; + $r = $r->[$idx]; + } + $idx = $index[$lv]; + $r->[$idx] = $self->create_dmap() unless defined $r->[$idx]; + $self->add_to_dmap($r->[$idx], $index[$maxlv], $val); +} + +sub fix { + my $self = shift; + my $map = $self->{MAP}; + my $maxlv = $self->{MAXLV}; + my @tmp; + my @zero; + + carp "Already fixed" if $self->{FIXED}; + $self->collapse_tree(); + $self->fill_default(); + $self->{FIXED} = 1; +} + +sub indices { + my $self = shift; + my $v = shift; + my @bits = @{$self->{BITS}}; + my @idx; + + print "indices($v,", join(',', @bits), ") = " if $debug; + for (my $i = @bits - 1; $i >= 0; $i--) { + my $bit = $bits[$i]; + unshift @idx, $v & ((1 << $bit) - 1); + $v = $v >> $bit; + } + print "(", join(',', @idx), ")\n" if $debug; + @idx; +} + +sub get { + my $self = shift; + my $v = shift; + my $map = $self->{MAP}; + my @index = $self->indices($v); + + croak "Not yet fixed" unless $self->{FIXED}; + + my $lastidx = pop @index; + foreach my $idx (@index) { + return $map->{DEFAULT} unless defined $map->[$idx]; + $map = $map->[$idx]; + } + $map->[$lastidx]; +} + +sub indirectmap { + my $self = shift; + + croak "Not yet fixed" unless $self->{FIXED}; + + my @maps = $self->collect_maps(); + my $maxlv = $self->{MAXLV}; + my @bits = @{$self->{BITS}}; + + my @indirect = (); + for (my $lv = 0; $lv < $maxlv; $lv++) { + my $offset; + my $chunksz; + my $mapsz = @{$maps[$lv]->[0]}; + if ($lv < $maxlv - 1) { + # indirect map + $offset = @indirect + @{$maps[$lv]} * @{$maps[$lv]->[0]}; + $chunksz = (1 << $bits[$lv + 1]); + } else { + # direct map + $offset = 0; + $chunksz = 1; + } + my $nextmaps = $maps[$lv + 1]; + foreach my $mapref (@{$maps[$lv]}) { + croak "mapsize inconsistent ", scalar(@$mapref), + " should be ", $mapsz, " (lv $lv)\n" if @$mapref != $mapsz; + foreach my $m (@$mapref) { + my $idx; + for ($idx = 0; $idx < @$nextmaps; $idx++) { + last if $nextmaps->[$idx] == $m; + } + croak "internal error: map corrupted" if $idx >= @$nextmaps; + push @indirect, $offset + $chunksz * $idx; + } + } + } + @indirect; +} + +sub cprog_imap { + my $self = shift; + my %opt = @_; + my $name = $opt{NAME} || 'map'; + my @indirect = $self->indirectmap(); + my $prog; + my $i; + my ($idtype, $idcol, $idwid); + + my $max = 0; + $max < $_ and $max = $_ foreach @indirect; + + if ($max < 256) { + $idtype = 'char'; + $idcol = 8; + $idwid = 3; + } elsif ($max < 65536) { + $idtype = 'short'; + $idcol = 8; + $idwid = 5; + } else { + $idtype = 'long'; + $idcol = 4; + $idwid = 10; + } + $prog = "static const unsigned $idtype ${name}_imap[] = {\n"; + $i = 0; + foreach my $v (@indirect) { + if ($i % $idcol == 0) { + $prog .= "\n" if $i != 0; + $prog .= "\t"; + } + $prog .= sprintf "%${idwid}d, ", $v; + $i++; + } + $prog .= "\n};\n"; + $prog; +} + +sub cprog { + my $self = shift; + $self->cprog_imap(@_) . "\n" . $self->cprog_dmap(@_); +} + +sub stat { + my $self = shift; + my @maps = $self->collect_maps(); + my $elsize = $self->{ELSIZE}; + my $i; + my $total = 0; + my @lines; + + for ($i = 0; $i < $self->{MAXLV}; $i++) { + my $nmaps = @{$maps[$i]}; + my $mapsz = @{$maps[$i]->[0]}; + push @lines, "level $i: $nmaps maps (size $mapsz) "; + push @lines, "[", $nmaps * $mapsz * $elsize, "]" if $elsize; + push @lines, "\n"; + } + my $ndmaps = @{$maps[$i]}; + push @lines, "level $i: $ndmaps dmaps"; + my $r = $maps[$i]->[0]; + if (ref($r) eq 'ARRAY') { + push @lines, " (size ", scalar(@$r), ")"; + } + push @lines, "\n"; + join '', @lines; +} + +sub collapse_tree { + my $self = shift; + my @tmp; + + $self->_collapse_tree_rec($self->{MAP}, 0, \@tmp); +} + +sub _collapse_tree_rec { + my ($self, $r, $lv, $refs) = @_; + my $ref = $refs->[$lv]; + my $maxlv = $self->{MAXLV}; + my $found; + + return $r unless defined $r; + + $ref = $refs->[$lv] = [] unless defined $ref; + + if ($lv == $maxlv) { + $found = $self->find_dmap($ref, $r); + } else { + for (my $i = 0; $i < @$r; $i++) { + $r->[$i] = $self->_collapse_tree_rec($r->[$i], $lv + 1, $refs); + } + $found = $self->find_imap($ref, $r); + } + unless ($found) { + $found = $r; + push @$ref, $found; + } + return $found; +} + +sub fill_default { + my $self = shift; + my $maxlv = $self->{MAXLV}; + my $bits = $self->{BITS}; + my @zeros; + + $zeros[$maxlv] = $self->create_dmap(); + for (my $lv = $maxlv - 1; $lv >= 0; $lv--) { + my $r = $zeros[$lv + 1]; + $zeros[$lv] = $self->create_imap($lv, $r); + } + _fill_default_rec($self->{MAP}, 0, $maxlv, \@zeros); +} + +sub _fill_default_rec { + my ($r, $lv, $maxlv, $zeros) = @_; + + return if $lv == $maxlv; + for (my $i = 0; $i < @$r; $i++) { + if (defined($r->[$i])) { + _fill_default_rec($r->[$i], $lv + 1, $maxlv, $zeros); + } else { + $r->[$i] = $zeros->[$lv + 1]; + } + } +} + +sub create_imap { + my ($self, $lv, $v) = @_; + my @map; + @map = ($v) x (1 << $self->{BITS}->[$lv]); + \@map; +} + +sub find_imap { + my ($self, $maps, $map) = @_; + my $i; + + foreach my $el (@$maps) { + next unless @$el == @$map; + for ($i = 0; $i < @$el; $i++) { + last unless ($el->[$i] || 0) == ($map->[$i] || 0); + } + return $el if $i >= @$el; + } + undef; +} + +sub collect_maps { + my $self = shift; + my @maps; + _collect_maps_rec($self->{MAP}, 0, $self->{MAXLV}, \@maps); + @maps; +} + +sub _collect_maps_rec { + my ($r, $lv, $maxlv, $maps) = @_; + my $mapref = $maps->[$lv]; + + return unless defined $r; + foreach my $ref (@{$mapref}) { + return if $ref == $r; + } + push @{$maps->[$lv]}, $r; + if ($lv < $maxlv) { + _collect_maps_rec($_, $lv + 1, $maxlv, $maps) foreach @{$r}; + } +} + +sub add {confess "Subclass responsibility";} +sub create_dmap {confess "Subclass responsibility";} +sub add_to_dmap {confess "Subclass responsibility";} +sub find_dmap {confess "Subclass responsibility";} +sub cprog_dmap {confess "Subclass responsibility";} + +1; + +package SparseMap::Bit; + +use strict; +use vars qw(@ISA); +use Carp; +#use SparseMap; + +@ISA = qw(SparseMap); + +sub new { + my $class = shift; + my $self = $class->SUPER::new(@_); + $self->{DEFAULT} = 0; + bless $self, $class; +} + +sub add { + my $self = shift; + + $self->add1($_, undef) foreach @_; +} + +sub create_dmap { + my $self = shift; + my $bmbits = $self->{BITS}->[-1]; + + my $s = "\0" x (1 << ($bmbits - 3)); + \$s; +} + +sub add_to_dmap { + my ($self, $map, $idx, $val) = @_; + vec($$map, $idx, 1) = 1; +} + +sub find_dmap { + my ($self, $ref, $r) = @_; + foreach my $map (@$ref) { + return $map if $$map eq $$r; + } + return undef; +} + +sub cprog_dmap { + my $self = shift; + my %opt = @_; + my $name = $opt{NAME} || 'map'; + my @maps = $self->collect_maps(); + my @bitmap = @{$maps[-1]}; + my $prog; + my $bmsize = 1 << ($self->{BITS}->[-1] - 3); + + $prog = <<"END"; +static const struct { + unsigned char bm[$bmsize]; +} ${name}_bitmap[] = { +END + + foreach my $bm (@bitmap) { + my $i = 0; + $prog .= "\t{{\n"; + foreach my $v (unpack 'C*', $$bm) { + if ($i % 16 == 0) { + $prog .= "\n" if $i != 0; + $prog .= "\t"; + } + $prog .= sprintf "%3d,", $v; + $i++; + } + $prog .= "\n\t}},\n"; + } + $prog .= "};\n"; + $prog; +} + +1; + +package SparseMap::Int; + +use strict; +use vars qw(@ISA); +use Carp; +#use SparseMap; + +@ISA = qw(SparseMap); + +sub new { + my $class = shift; + my $self = $class->SUPER::new(@_); + $self->{DEFAULT} = 0 unless exists $self->{DEFAULT}; + bless $self, $class; +} + +sub add { + my $self = shift; + while (@_ > 0) { + my $n = shift; + my $val = shift; + $self->add1($n, $val); + } +} + +sub create_dmap { + my $self = shift; + my $tblbits = $self->{BITS}->[-1]; + my $default = $self->{DEFAULT}; + + my @tbl = ($default) x (1 << $tblbits); + \@tbl; +} + +sub add_to_dmap { + my ($self, $map, $idx, $val) = @_; + $map->[$idx] = $val; +} + +sub find_dmap { + my ($self, $ref, $r) = @_; + foreach my $map (@$ref) { + if (@$map == @$r) { + my $i; + for ($i = 0; $i < @$map; $i++) { + last if $map->[$i] != $r->[$i]; + } + return $map if $i == @$map; + } + } + return undef; +} + +sub cprog_dmap { + my $self = shift; + my %opt = @_; + my $name = $opt{NAME} || 'map'; + my @maps = $self->collect_maps(); + my @table = @{$maps[-1]}; + my $prog; + my $i; + my ($idtype, $idcol, $idwid); + my $tblsize = 1 << $self->{BITS}->[-1]; + + my ($min, $max); + foreach my $a (@table) { + foreach my $v (@$a) { + $min = $v if !defined($min) or $min > $v; + $max = $v if !defined($max) or $max < $v; + } + } + if (exists $opt{MAPTYPE}) { + $idtype = $opt{MAPTYPE}; + } else { + my $u = $min < 0 ? '' : 'unsigned '; + my $absmax = abs($max); + $absmax = abs($min) if abs($min) > $absmax; + + if ($absmax < 256) { + $idtype = "${u}char"; + } elsif ($absmax < 65536) { + $idtype = "${u}short"; + } else { + $idtype = "${u}long"; + } + } + + $idwid = decimalwidth($max); + $idwid = decimalwidth($min) if decimalwidth($min) > $idwid; + + $prog = <<"END"; +static const struct { + $idtype tbl[$tblsize]; +} ${name}_table[] = { +END + + foreach my $a (@table) { + my $i = 0; + my $col = 0; + $prog .= "\t{{\n\t"; + foreach my $v (@$a) { + my $s = sprintf "%${idwid}d, ", $v; + $col += length($s); + if ($col > 70) { + $prog .= "\n\t"; + $col = length($s); + } + $prog .= $s; + } + $prog .= "\n\t}},\n"; + } + $prog .= "};\n"; + $prog; +} + +sub decimalwidth { + my $n = shift; + my $neg = 0; + my $w; + + if ($n < 0) { + $neg = 1; + $n = -$n; + } + if ($n < 100) { + $w = 2; + } elsif ($n < 10000) { + $w = 4; + } elsif ($n < 1000000) { + $w = 6; + } elsif ($n < 100000000) { + $w = 8; + } else { + $w = 10; + } + $w + $neg; +} + +1; diff --git a/contrib/idn/idnkit-1.0-src/util/UCD.pm b/contrib/idn/idnkit-1.0-src/util/UCD.pm new file mode 100644 index 0000000000..24f02d6f00 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/util/UCD.pm @@ -0,0 +1,194 @@ +# $Id: UCD.pm,v 1.1 2003/06/04 00:27:53 marka Exp $ +# +# Copyright (c) 2000,2001 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# + +package UCD; + +# +# UCD.pm -- parser for Unicode Character Database files. +# +# This file is an aggregation of the following modules, each of which +# provides a parser for a specific data file of UCD. +# UCD::UnicodeData -- for UnicodeData.txt +# UCD::CaseFolding -- for CaseFolding.txt +# UCD::SpecialCasing -- for SpecialCasing.txt +# UCD::CompositionExclusions -- for CompositionExclusions-1.txt +# +# Each module provides two subroutines: +# +# $line = getline(\*HANDLE); +# reads next non-comment line from HANDLE, and returns it. +# undef will be returned upon EOF. +# +# %fields = parse($line); +# parses a line and extract fields, and returns a list of +# field name and its value, suitable for assignment to a hash. +# + +package UCD::UnicodeData; + +use strict; +use Carp; + +sub getline { + my $fh = shift; + my $s = <$fh>; + $s =~ s/\r?\n$// if $s; + $s; +} + +sub parseline { + my $s = shift; + + my @f = split /;/, $s, -1; + return (CODE => hex($f[0]), + NAME => $f[1], + CATEGORY => $f[2], + CLASS => $f[3]+0, + BIDI => $f[4], + DECOMP => dcmap($f[5]), + DECIMAL => dvalue($f[6]), + DIGIT => dvalue($f[7]), + NUMERIC => dvalue($f[8]), + MIRRORED => $f[9] eq 'Y', + NAME10 => $f[10], + COMMENT => $f[11], + UPPER => ucode($f[12]), + LOWER => ucode($f[13]), + TITLE => ucode($f[14])); +} + +sub dcmap { + my $v = shift; + return undef if $v eq ''; + $v =~ /^(?:(<[^>]+>)\s*)?(\S.*)/ + or croak "invalid decomposition mapping \"$v\""; + my $tag = $1 || ''; + [$tag, map {hex($_)} split(' ', $2)]; +} + +sub ucode { + my $v = shift; + return undef if $v eq ''; + hex($v); +} + +sub dvalue { + my $v = shift; + return undef if $v eq ''; + $v; +} + +package UCD::CaseFolding; + +use strict; + +sub getline { + my $fh = shift; + while (defined(my $s = <$fh>)) { + next if $s =~ /^\#/; + next if $s =~ /^\s*$/; + $s =~ s/\r?\n$//; + return $s; + } + undef; +} + +sub parseline { + my $s = shift; + my @f = split /;\s*/, $s, -1; + return (CODE => hex($f[0]), + TYPE => $f[1], + MAP => [map(hex, split ' ', $f[2])], + ); +} + +package UCD::SpecialCasing; + +use strict; + +sub getline { + my $fh = shift; + while (defined(my $s = <$fh>)) { + next if $s =~ /^\#/; + next if $s =~ /^\s*$/; + $s =~ s/\r?\n$//; + return $s; + } + undef; +} + +sub parseline { + my $s = shift; + + my @f = split /;\s*/, $s, -1; + my $cond = (@f > 5) ? $f[4] : undef; + return (CODE => hex($f[0]), + LOWER => [map(hex, split ' ', $f[1])], + TITLE => [map(hex, split ' ', $f[2])], + UPPER => [map(hex, split ' ', $f[3])], + CONDITION => $cond); +} + +package UCD::CompositionExclusions; + +use strict; + +sub getline { + my $fh = shift; + while (defined(my $s = <$fh>)) { + next if $s =~ /^\#/; + next if $s =~ /^\s*$/; + $s =~ s/\r?\n$//; + return $s; + } + undef; +} + +sub parseline { + my $s = shift; + m/^[0-9A-Fa-f]+/; + return (CODE => hex($&)); +} + +1; diff --git a/contrib/idn/idnkit-1.0-src/util/generate_nameprep_data.pl b/contrib/idn/idnkit-1.0-src/util/generate_nameprep_data.pl new file mode 100755 index 0000000000..c93f3aecc3 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/util/generate_nameprep_data.pl @@ -0,0 +1,405 @@ +#! /usr/local/bin/perl -w +# $Id: generate_nameprep_data.pl,v 1.1 2003/06/04 00:27:54 marka Exp $ +# +# Copyright (c) 2001 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# + +use v5.6.0; # for pack('U') +use bytes; + +use lib qw(.); + +use SparseMap; +use Getopt::Long; + +(my $myid = '$Id: generate_nameprep_data.pl,v 1.1 2003/06/04 00:27:54 marka Exp $') =~ s/\$([^\$]+)\$/\$-$1-\$/; + +my @map_bits = (9, 7, 5); +my @proh_bits = (7, 7, 7); +my @unas_bits = (7, 7, 7); +my @bidi_bits = (9, 7, 5); + +my @bidi_types = ('OTHERS', 'R_AL', 'L'); + +my $dir = '.'; +my @versions = (); + +GetOptions('dir=s', \$dir) or die usage(); +@versions = @ARGV; + +print_header(); + +bits_definition("MAP", @map_bits); +bits_definition("PROH", @proh_bits); +bits_definition("UNAS", @unas_bits); +bits_definition("BIDI", @bidi_bits); + +generate_data($_) foreach @ARGV; + +sub usage { + die "Usage: $0 [-dir dir] version..\n"; +} + +sub generate_data { + my $version = shift; + generate_mapdata($version, "$dir/nameprep.$version.map"); + generate_prohibiteddata($version, "$dir/nameprep.$version.prohibited"); + generate_unassigneddata($version, "$dir/nameprep.$version.unassigned"); + generate_bididata($version, "$dir/nameprep.$version.bidi"); +} + +# +# Generate mapping data. +# +sub generate_mapdata { + my $version = shift; + my $file = shift; + + my $map = SparseMap::Int->new(BITS => [@map_bits], + MAX => 0x110000, + MAPALL => 1, + DEFAULT => 0); + open FILE, $file or die "cannot open $file: $!\n"; + + my $mapbuf = "\0"; # dummy + my %maphash = (); + while () { + if ($. == 1 and /^%\s*SAME-AS\s+(\S+)/) { + my $same_as = $1; + if (grep {$_ eq $same_as} @versions > 0) { + generate_map_ref($version, $same_as); + close FILE; + return; + } + next; + } + next if /^\#/; + next if /^\s*$/; + register_map($map, \$mapbuf, \%maphash, $_); + } + close FILE; + generate_map($version, $map, \$mapbuf); +} + +# +# Generate prohibited character data. +# +sub generate_prohibiteddata { + my $version = shift; + my $file = shift; + + my $proh = SparseMap::Bit->new(BITS => [@proh_bits], + MAX => 0x110000); + open FILE, $file or die "cannot open $file: $!\n"; + while () { + if ($. == 1 and /^%\s*SAME-AS\s+(\S+)/) { + my $same_as = $1; + if (grep {$_ eq $same_as} @versions > 0) { + generate_prohibited_ref($version, $same_as); + close FILE; + return; + } + next; + } + next if /^\#/; + next if /^\s*$/; + register_prohibited($proh, $_); + } + close FILE; + generate_prohibited($version, $proh); +} + +# +# Generate unassigned codepoint data. +# +sub generate_unassigneddata { + my $version = shift; + my $file = shift; + + my $unas = SparseMap::Bit->new(BITS => [@unas_bits], + MAX => 0x110000); + open FILE, $file or die "cannot open $file: $!\n"; + while () { + if ($. == 1 and /^%\s*SAME-AS\s+(\S+)/) { + my $same_as = $1; + if (grep {$_ eq $same_as} @versions > 0) { + generate_unassigned_ref($version, $same_as); + close FILE; + return; + } + next; + } + next if /^\#/; + next if /^\s*$/; + register_unassigned($unas, $_); + } + close FILE; + generate_unassigned($version, $unas); +} + +# +# Generate data of bidi "R" or "AL" characters. +# +sub generate_bididata { + my $version = shift; + my $file = shift; + + my $bidi = SparseMap::Int->new(BITS => [@bidi_bits], + MAX => 0x110000); + open FILE, $file or die "cannot open $file: $!\n"; + + my $type = 0; + while () { + if ($. == 1 and /^%\s*SAME-AS\s+(\S+)/) { + my $same_as = $1; + if (grep {$_ eq $same_as} @versions > 0) { + generate_unassigned_ref($version, $same_as); + close FILE; + return; + } + next; + } + if (/^%\s*BIDI_TYPE\s+(\S+)$/) { + my $i = 0; + for ($i = 0; $i < @bidi_types; $i++) { + if ($1 eq $bidi_types[$i]) { + $type = $i; + last; + } + } + die "unrecognized line: $_" if ($i >= @bidi_types); + next; + } + next if /^\#/; + next if /^\s*$/; + register_bidi($bidi, $type, $_); + } + close FILE; + + generate_bidi($version, $bidi); +} + +sub print_header { + print <<"END"; +/* \$Id\$ */ +/* $myid */ +/* + * Do not edit this file! + * This file is generated from NAMEPREP specification. + */ + +END +} + +sub bits_definition { + my $name = shift; + my @bits = @_; + my $i = 0; + + foreach my $n (@bits) { + print "#define ${name}_BITS_$i\t$n\n"; + $i++; + } + print "\n"; +} + +sub register_map { + my ($map, $bufref, $hashref, $line) = @_; + + my ($from, $to) = split /;/, $line; + my @fcode = map {hex($_)} split ' ', $from; + my @tcode = map {hex($_)} split ' ', $to; + + my $ucs4 = pack('V*', @tcode); + $ucs4 =~ s/\000+$//; + + my $offset; + if (exists $hashref->{$ucs4}) { + $offset = $hashref->{$ucs4}; + } else { + $offset = length $$bufref; + $$bufref .= pack('C', length($ucs4)) . $ucs4; + $hashref->{$ucs4} = $offset; + } + + die "unrecognized line: $line" if @fcode != 1; + $map->add($fcode[0], $offset); +} + +sub generate_map { + my ($version, $map, $bufref) = @_; + + $map->fix(); + + print $map->cprog(NAME => "nameprep_${version}_map"); + print "\nstatic const unsigned char nameprep_${version}_map_data[] = \{\n"; + print_uchararray($$bufref); + print "};\n\n"; +} + +sub generate_map_ref { + my ($version, $refversion) = @_; + print <<"END"; +#define nameprep_${version}_map_imap nameprep_${refversion}_map_imap +#define nameprep_${version}_map_table nameprep_${refversion}_map_table +#define nameprep_${version}_map_data nameprep_${refversion}_map_data + +END +} + +sub print_uchararray { + my @chars = unpack 'C*', $_[0]; + my $i = 0; + foreach my $v (@chars) { + if ($i % 12 == 0) { + print "\n" if $i != 0; + print "\t"; + } + printf "%3d, ", $v; + $i++; + } + print "\n"; +} + +sub register_prohibited { + my $proh = shift; + register_bitmap($proh, @_); +} + +sub register_unassigned { + my $unas = shift; + register_bitmap($unas, @_); +} + +sub register_bidi { + my $bidi = shift; + my $type = shift; + register_intmap($bidi, $type, @_); +} + +sub generate_prohibited { + my ($version, $proh) = @_; + generate_bitmap($proh, "nameprep_${version}_prohibited"); + print "\n"; +} + +sub generate_prohibited_ref { + my ($version, $refversion) = @_; + print <<"END"; +#define nameprep_${version}_prohibited_imap nameprep_${refversion}_prohibited_imap +#define nameprep_${version}_prohibited_bitmap nameprep_${refversion}_prohibited_bitmap + +END +} + +sub generate_unassigned { + my ($version, $unas) = @_; + generate_bitmap($unas, "nameprep_${version}_unassigned"); + print "\n"; +} + +sub generate_unassigned_ref { + my ($version, $refversion) = @_; + print <<"END"; +#define nameprep_${version}_unassigned_imap nameprep_${refversion}_unassigned_imap +#define nameprep_${version}_unassigned_bitmap nameprep_${refversion}_unassigned_bitmap + +END +} + +sub generate_bidi { + my ($version, $bidi) = @_; + + $bidi->fix(); + + print $bidi->cprog(NAME => "nameprep_${version}_bidi"); + print "\n"; + print "static const unsigned char nameprep_${version}_bidi_data[] = \{\n"; + + foreach my $type (@bidi_types) { + printf "\tidn_biditype_%s, \n", lc($type); + } + print "};\n\n"; +} + +sub generate_bidi_ref { + my ($version, $refversion) = @_; + print <<"END"; +#define nameprep_${version}_bidi_imap nameprep_${refversion}_bidi_imap +#define nameprep_${version}_bidi_table nameprep_${refversion}_bidi_table + +END +} + +sub register_bitmap { + my $map = shift; + my $line = shift; + + /^([0-9A-Fa-f]+)(?:-([0-9A-Fa-f]+))?/ or die "unrecognized line: $line"; + my $start = hex($1); + my $end = defined($2) ? hex($2) : undef; + if (defined $end) { + $map->add($start .. $end); + } else { + $map->add($start); + } +} + +sub register_intmap { + my $map = shift; + my $value = shift; + my $line = shift; + + /^([0-9A-Fa-f]+)(?:-([0-9A-Fa-f]+))?/ or die "unrecognized line: $line"; + my $start = hex($1); + my $end = defined($2) ? hex($2) : $start; + for (my $i = $start; $i <= $end; $i++) { + $map->add($i, $value); + } +} + +sub generate_bitmap { + my $map = shift; + my $name = shift; + $map->fix(); + #$map->stat(); + print $map->cprog(NAME => $name); +} diff --git a/contrib/idn/idnkit-1.0-src/util/generate_normalize_data.pl b/contrib/idn/idnkit-1.0-src/util/generate_normalize_data.pl new file mode 100755 index 0000000000..2ba1a2f54a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/util/generate_normalize_data.pl @@ -0,0 +1,586 @@ +#! /usr/local/bin/perl -w +# $Id: generate_normalize_data.pl,v 1.1 2003/06/04 00:27:55 marka Exp $ +# +# Copyright (c) 2000,2001 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +# + +# +# Generate lib/unicodedata.c from UnicodeData.txt, +# CompositionExclusions-1.txt, SpecialCasing.txt and CaseFolding.txt, +# all of them available from ftp://ftp.unicode.org/Public/UNIDATA/. +# + +use strict; +use lib qw(.); + +use Getopt::Long; +use UCD; +use SparseMap; + +use constant UCS_MAX => 0x110000; +use constant END_BIT => 0x80000000; + +my $DECOMP_COMPAT_BIT = 0x8000; + +my $CASEMAP_FINAL_BIT = 0x1; +my $CASEMAP_NONFINAL_BIT = 0x2; +my $CASEMAP_LAST_BIT = 0x10; + +my $LETTER_BIT = 1; +my $NSPMARK_BIT = 2; + +(my $myid = '$Id: generate_normalize_data.pl,v 1.1 2003/06/04 00:27:55 marka Exp $') =~ s/\$([^\$]+)\$/\$-$1-\$/; + +my @default_bits = (9, 7, 5); +#my @default_bits = (7, 7, 7); +my @canon_class_bits = @default_bits; +my @decomp_bits = @default_bits; +my @comp_bits = @default_bits; +my @folding_bits = @default_bits; +my @casemap_bits = @default_bits; +my @casemap_ctx_bits = @default_bits; + +my $prefix = ''; +my $dir = '.'; +my $unicodedatafile = 'UnicodeData.txt'; +my $exclusionfile = 'CompositionExclusions.txt'; +my $specialcasefile = 'SpecialCasing.txt'; +my $casefoldingfile = 'CaseFolding.txt'; +my $verbose; + +GetOptions('dir|d=s' => \$dir, + 'unicodedata|u=s' => \$unicodedatafile, + 'exclude|e=s' => \$exclusionfile, + 'specialcase|s=s' => \$specialcasefile, + 'casefold|c=s' => \$casefoldingfile, + 'prefix|p=s' => \$prefix, + 'verbose|v' => \$verbose, +) or usage(); + +foreach my $r (\$unicodedatafile, \$exclusionfile, + \$specialcasefile, \$casefoldingfile) { + $$r = "$dir/$$r" unless $$r =~ m|^/|; +} + +my %exclusions; +my %lower_special; +my %upper_special; + +my @decomp_data; +my @comp_data; +my @toupper_data; +my @tolower_data; +my @folding_data; + +# +# Create Mapping/Bitmap objects. +# + +# canonical class +my $canon_class = SparseMap::Int->new(BITS => [@canon_class_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# canonical/compatibility decomposition +my $decomp = SparseMap::Int->new(BITS => [@decomp_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# canonical composition +my $comp = SparseMap::Int->new(BITS => [@comp_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# uppercase/lowercase +my $upper = SparseMap::Int->new(BITS => [@casemap_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); +my $lower = SparseMap::Int->new(BITS => [@casemap_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# final/nonfinal context +my $casemap_ctx = SparseMap::Int->new(BITS => [@casemap_ctx_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# casefolding +my $folding = SparseMap::Int->new(BITS => [@folding_bits], + MAX => UCS_MAX, + MAPALL => 1, + DEFAULT => 0); + +# +# Read datafiles. +# + +read_exclusion_file(); +read_specialcasing_file(); +read_unicodedata_file(); +read_casefolding_file(); + +print_header(); +print_canon_class(); +print_composition(); +print_decomposition(); +print_casemap(); +print_casemap_context(); +print_casefolding(); + +exit; + +sub usage { + print STDERR <<"END"; +Usage: $0 [options..] + options: + -d DIR directory where Unicode Character Data files resides [./] + -u FILE name of the UnicodeData file [UnicodeData.txt] + -e FILE name of the CompositionExclusion file [CompositionExclusions-1.txt] + -s FILE name of the SpecialCasing file [SpecialCasing.txt] + -c FILE name of the CaseFolding file [CaseFolding.txt] +END + exit 1; +} + +# +# read_exclusion_file -- read CompositionExclusions-1.txt. +# +sub read_exclusion_file { + open EXCLUDE, $exclusionfile or die "cannot open $exclusionfile: $!\n"; + while ($_ = UCD::CompositionExclusions::getline(\*EXCLUDE)) { + my %data = UCD::CompositionExclusions::parseline($_); + $exclusions{$data{CODE}} = 1; + } + close EXCLUDE; +} + +# +# read_specialcasing_file -- read SpecialCasing.txt +# +sub read_specialcasing_file { + open SPCASE, $specialcasefile or die "cannot open $specialcasefile: $!\n"; + while ($_ = UCD::SpecialCasing::getline(\*SPCASE)) { + my %data = UCD::SpecialCasing::parseline($_); + my $code = $data{CODE}; + my $lower = $data{LOWER}; + my $upper = $data{UPPER}; + my $cond = $data{CONDITION} || ''; + + next unless $cond eq '' or $cond =~ /^(NON_)?FINAL/; + + if (defined $cond && (@$lower > 1 || $lower->[0] != $code) + or @$lower > 1 or $lower->[0] != $code) { + $lower_special{$code} = [$lower, $cond]; + } + if (defined $cond && (@$upper > 1 || $upper->[0] != $code) + or @$upper > 1 or $upper->[0] != $code) { + $upper_special{$code} = [$upper, $cond]; + } + } + close SPCASE; +} + +# +# read_unicodedata_file -- read UnicodeData.txt +# +sub read_unicodedata_file { + open UCD, $unicodedatafile or die "cannot open $unicodedatafile: $!\n"; + + @decomp_data = (0); + @toupper_data = (0); + @tolower_data = (0); + + my @comp_cand; # canonical composition candidates + my %nonstarter; + + while ($_ = UCD::UnicodeData::getline(\*UCD)) { + my %data = UCD::UnicodeData::parseline($_); + my $code = $data{CODE}; + + # combining class + if ($data{CLASS} > 0) { + $nonstarter{$code} = 1; + $canon_class->add($code, $data{CLASS}); + } + + # uppercasing + if (exists $upper_special{$code} or defined $data{UPPER}) { + my $offset = @toupper_data; + my @casedata; + + $upper->add($code, $offset); + if (exists $upper_special{$code}) { + push @casedata, $upper_special{$code}; + } + if (defined $data{UPPER}) { + push @casedata, $data{UPPER}; + } + push @toupper_data, casemap_data(@casedata); + } + + # lowercasing + if (exists $lower_special{$code} or defined $data{LOWER}) { + my $offset = @tolower_data; + my @casedata; + + $lower->add($code, $offset); + if (exists $lower_special{$code}) { + push @casedata, $lower_special{$code}; + } + if (defined $data{LOWER}) { + push @casedata, $data{LOWER}; + } + push @tolower_data, casemap_data(@casedata); + } + + # composition/decomposition + if ($data{DECOMP}) { + my ($tag, @decomp) = @{$data{DECOMP}}; + my $offset = @decomp_data; + + # composition + if ($tag eq '' and @decomp > 1 and not exists $exclusions{$code}) { + # canonical composition candidate + push @comp_cand, [$code, @decomp]; + } + + # decomposition + if ($tag ne '') { + # compatibility decomposition + $offset |= $DECOMP_COMPAT_BIT; + } + $decomp->add($code, $offset); + push @decomp_data, @decomp; + $decomp_data[-1] |= END_BIT; + + } + + # final/nonfinal context + if ($data{CATEGORY} =~ /L[ult]/) { + $casemap_ctx->add($code, $LETTER_BIT); + } elsif ($data{CATEGORY} eq 'Mn') { + $casemap_ctx->add($code, $NSPMARK_BIT); + } + } + close UCD; + + # Eliminate composition candidates whose decomposition starts with + # a non-starter. + @comp_cand = grep {not exists $nonstarter{$_->[1]}} @comp_cand; + + @comp_data = ([0, 0, 0]); + my $last_code = -1; + my $last_offset = @comp_data; + for my $r (sort {$a->[1] <=> $b->[1] || $a->[2] <=> $b->[2]} @comp_cand) { + if ($r->[1] != $last_code) { + $comp->add($last_code, + ($last_offset | ((@comp_data - $last_offset)<<16))) + unless $last_code == -1; + $last_code = $r->[1]; + $last_offset = @comp_data; + } + push @comp_data, $r; + } + $comp->add($last_code, + ($last_offset | ((@comp_data - $last_offset)<<16))); +} + +sub casemap_data { + my @data = @_; + my @result = (); + while (@data > 0) { + my $r = shift @data; + my $flag = 0; + if (ref $r) { + if ($r->[1] eq 'FINAL') { + $flag |= $CASEMAP_FINAL_BIT; + } elsif ($r->[1] eq 'NON_FINAL') { + $flag |= $CASEMAP_NONFINAL_BIT; + } elsif ($r->[1] ne '') { + die "unknown condition \"", $r->[1], "\"\n"; + } + } + $flag |= $CASEMAP_LAST_BIT if @data == 0; + push @result, $flag; + push @result, (ref $r) ? @{$r->[0]} : $r; + $result[-1] |= END_BIT; + } + @result; +} + +# +# read_casefolding_file -- read CaseFolding.txt +# +sub read_casefolding_file { + open FOLD, $casefoldingfile or die "cannto open $casefoldingfile: $!\n"; + + # dummy. + @folding_data = (0); + + while ($_ = UCD::CaseFolding::getline(\*FOLD)) { + my %data = UCD::CaseFolding::parseline($_); + + $folding->add($data{CODE}, scalar(@folding_data)); + push @folding_data, @{$data{MAP}}; + $folding_data[-1] |= END_BIT; + } + close FOLD; +} + +sub print_header { + print <<"END"; +/* \$Id\$ */ +/* $myid */ +/* + * Do not edit this file! + * This file is generated from UnicodeData.txt, CompositionExclusions-1.txt, + * SpecialCasing.txt and CaseFolding.txt. + */ + +END +} + +# +# print_canon_class -- generate data for canonical class +# +sub print_canon_class { + $canon_class->fix(); + print STDERR "** cannon_class\n", $canon_class->stat() if $verbose; + + print <<"END"; + +/* + * Canonical Class + */ + +END + print_bits("CANON_CLASS", @canon_class_bits); + print "\n"; + print $canon_class->cprog(NAME => "${prefix}canon_class"); +} + +# +# print_composition -- generate data for canonical composition +# +sub print_composition { + $comp->fix(); + print STDERR "** composition\n", $comp->stat() if $verbose; + + print <<"END"; + +/* + * Canonical Composition + */ + +END + print_bits("CANON_COMPOSE", @comp_bits); + print "\n"; + print $comp->cprog(NAME => "${prefix}compose"); + print <<"END"; + +static const struct composition ${prefix}compose_seq[] = { +END + my $i = 0; + foreach my $r (@comp_data) { + if ($i % 2 == 0) { + print "\n" if $i != 0; + print "\t"; + } + printf "{ 0x%08x, 0x%08x }, ", $r->[2], $r->[0]; + $i++; + } + print "\n};\n\n"; +} + +# +# print_decomposition -- generate data for canonical/compatibility +# decomposition +# +sub print_decomposition { + $decomp->fix(); + print STDERR "** decomposition\n", $decomp->stat() if $verbose; + + print <<"END"; + +/* + * Canonical/Compatibility Decomposition + */ + +END + print_bits("DECOMP", @decomp_bits); + print "#define DECOMP_COMPAT\t$DECOMP_COMPAT_BIT\n\n"; + + print $decomp->cprog(NAME => "${prefix}decompose"); + + print "static const unsigned long ${prefix}decompose_seq[] = {\n"; + print_ulseq(@decomp_data); + print "};\n\n"; +} + +# +# print_casemap -- generate data for case mapping +# +sub print_casemap { + $upper->fix(); + $lower->fix(); + print STDERR "** upper mapping\n", $upper->stat() if $verbose; + print STDERR "** lower mapping\n", $lower->stat() if $verbose; + + print <<"END"; + +/* + * Lowercase <-> Uppercase mapping + */ + +/* + * Flags for special case mapping. + */ +#define CMF_FINAL $CASEMAP_FINAL_BIT +#define CMF_NONFINAL $CASEMAP_NONFINAL_BIT +#define CMF_LAST $CASEMAP_LAST_BIT +#define CMF_CTXDEP (CMF_FINAL|CMF_NONFINAL) + +END + print_bits("CASEMAP", @casemap_bits); + print "\n"; + print $upper->cprog(NAME => "${prefix}toupper"); + print $lower->cprog(NAME => "${prefix}tolower"); + + print "static const unsigned long ${prefix}toupper_seq[] = {\n"; + print_ulseq(@toupper_data); + print "};\n\n"; + + print "static const unsigned long ${prefix}tolower_seq[] = {\n"; + print_ulseq(@tolower_data); + print "};\n\n"; +} + +# +# print_casefolding -- generate data for case folding +# +sub print_casefolding { + $folding->fix(); + print STDERR "** case folding\n", $folding->stat() if $verbose; + + print <<"END"; + +/* + * Case Folding + */ + +END + print_bits("CASE_FOLDING", @folding_bits); + print "\n"; + print $folding->cprog(NAME => "${prefix}case_folding"); + + print "static const unsigned long ${prefix}case_folding_seq[] = {\n"; + print_ulseq(@folding_data); + print "};\n\n"; +} + +# +# print_casemap_context -- gerarate data for determining context +# (final/non-final) +# +sub print_casemap_context { + $casemap_ctx->fix(); + print STDERR "** casemap context\n", $casemap_ctx->stat() if $verbose; + + print <<"END"; + +/* + * Cased characters and non-spacing marks (for casemap context) + */ + +END + + print_bits("CASEMAP_CTX", @casemap_ctx_bits); + print <<"END"; + +#define CTX_CASED $LETTER_BIT +#define CTX_NSM $NSPMARK_BIT + +END + print $casemap_ctx->cprog(NAME => "${prefix}casemap_ctx"); +} + +sub sprint_composition_hash { + my $i = 0; + my $s = ''; + foreach my $r (@_) { + if ($i % 2 == 0) { + $s .= "\n" if $i != 0; + $s .= "\t"; + } + $s .= sprintf "{0x%04x, 0x%04x, 0x%04x}, ", @{$r}; + $i++; + } + $s; +} + +sub print_bits { + my $prefix = shift; + my $i = 0; + foreach my $bit (@_) { + print "#define ${prefix}_BITS_$i\t$bit\n"; + $i++; + } +} + +sub print_ulseq { + my $i = 0; + foreach my $v (@_) { + if ($i % 4 == 0) { + print "\n" if $i != 0; + print "\t"; + } + printf "0x%08x, ", $v; + $i++; + } + print "\n"; +} diff --git a/contrib/idn/idnkit-1.0-src/win/README.WIN b/contrib/idn/idnkit-1.0-src/win/README.WIN new file mode 100644 index 0000000000..425200bda5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/win/README.WIN @@ -0,0 +1,17 @@ +To build idnkit for Windows, follow the instruction below. + +To build Windows version, you need `iconv' library. A LGPL +implemenation is available from the following place. + + http://www.gnu.org/software/libiconv/ + +Follow the instructions described in README.woe32 file which can be +found in the distribution, and you'll get a DLL vesion of `libiconv'. +Copy the DLL (iconv.dll), the header (iconv.h) and the import library +(iconv.lib) here. + +Then go to the top directory and run the following command. + + nmake -f make.wnt + +; $Id: README.WIN,v 1.1 2003/06/04 00:27:32 marka Exp $ diff --git a/contrib/idn/idnkit-1.0-src/wsock/README.txt b/contrib/idn/idnkit-1.0-src/wsock/README.txt new file mode 100644 index 0000000000..e7723b4448 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/README.txt @@ -0,0 +1,665 @@ + + idn wrapper - Client Side IDN Conversion Software for Windows + + Copyright (c) 2000,2001,2002 Japan Network Information Center. + All rights reserved. + + *** NOTICE ****************************************************** + If you have installed mDN Wrapper (former version of idn wrapper) + on your system, you should unwrap all the programs before + installing idn wrapper. + ***************************************************************** + + +1. Introduction + + For supporting internationalized domain names, each client + application should convert domain names (their encodings) to that + DNS server accepts. This requires applications to handle + internationalized domain names in its core, and it is the vendor's + responsibility to make their programs IDN-compatible. + + Although there are ongoing efforts in IETF to standardize IDN + framework (architecture, encoding etc.) and several RFCs are + expected to be published soon as the result, not many applications + support IDN to this date. + + So, there are needs for some helper application which makes legacy + applications IDN-aware. `runidn' in idnkit is one of such + solutions for Unix-like operating systems, and this software, `idn + wrapper' is the one for Windows. + + On windows, name resolving request is passed to WINSOCK DLL. idn + wrapper replaces WINSOCK DLL with the one that can handle IDN, + which makes legacy windows applications compatible with IDN. + +2. Architecture + +2.1. Wrapper DLL + + Wrapper DLL resides between application and original DLL. It + intercept application's calls to original DLL, and preforms some + additional processing on those calls. + + +------------+ Call +------------+ Call +------------+ + | |------->| |------->| | + |Application | |Wrapper DLL | |Original DLL| + | |<-------| |<-------| | + +------------+ Return +------------+ Return +------------+ + additional + processing + here + + DLL call from apllication is passed to wrapper DLL. Wrapper DLL + then performs some additional processing on that call, and then + calls original DLL. Also, result from original DLL will once passed + to wrapper DLL and wrapper does additional process on that result, + and finally result will passed to the application. + + idn wrapper provides wrapper DLLs for WINSOCK, + + WSOCK32.DLL WINSOCK V1.1 + WS2_32.DLL WINSOCK V2.0 + + to resolve multi-lingual domain names. + +2.2. Wrapping APIs + + idn wrapper performs additional processing on name resolving APIs in + WINSOCK, listed below. + + both WINSOCK 1.1, WINSOCK 2.0 + + gethostbyaddr + gethostbyname + WSAAsyncGetHostByAddr + WSAAsyncGetHostByName + + only in WINSOCK 2.0 + + getaddrinfo + freeaddrinfo + getnameinfo + WSALookupServiceBeginA + WSALookupServiceNextA + WSALookupServiceEnd + + Some applications do not use these APIs to resolve domain names. + `nslookup' is one of those programs. `nslookup' builds and parse DNS + messages internally and does not use WINSOCK's name resolver APIs. + idn wrapper cannot make those programs IDN-aware. + + NOTE: + WINSOCK 2.0 also contains WIDE-CHARACTER based name resolution + APIs, + + WSALookupServiceBeginW + WSALookupServiceNextW + + idn wrapper does not wrap these APIs. These APIs are used in + Microsoft's own internationalization framework. It is dangerous + to convert to another internationalization framework. + +2.3. Other APIs in WINSOCK + + For other APIs in WINSOCK, idn wrapper does nothing, only calls + original DLL's entries. + + idn wrapper copies original WINSOCK DLLs with renaming + as below, and forward requests to them. + + wsock32.dll -> wsock32o.dll + ws2_32.dll -> ws2_32o.dll + + Wrappper DLL will be installed with original DLL names. So after + installation of idn wrapper, WINSOCK DLLs should be + + wsock32.dll idn wrapper for WINSOCK V1.1 + ws2_32.dll idn wrapper for WINSOCK V2.0 + wsock32o.dll Original WINSOCK V1.1 DLL + ws2_32o.dll Original WINSOCK V2.0 DLL + +2.4. Asynchronous API + + Domain name conversion take place on + + request to DNS + + convert from local encoding to DNS compatible encoding + + response from DNS + + convert from DNS encoding to local encoding + + For synchronous APIs, local to DNS conversion is done before calling + original API, and after return from original API, name should be + converted from DNS encoding to local encoding. + + But WINSOCK having some asynchronous APIs, such as + + WSAAsyncGetHostByAddr + WSAAsyncGetHostByName + + In these APIs, completion is notified with windows message. To + perform DNS to local conversion, wrapper should hook target window + procedure to capture those completion messages. + + So, if asynchronous API was called, idn wrapper set hook to target + window procedure (passed with API parameter). If hook found + notify message (also given with API parameter), then convert + resulting name (in DNS encoding) to local encoding. + +2.5. Installing Wrapper DLLs + + WINSOCK DLLs are placed at Windows's system directory. To wrap + WINSOCK DLLs, one could do following sequence at system directory. + + + Rename Original WINSOCK DLLs + + ren wsock32.dll wsock32o.dll + ren ws2_32.dll ws2_32o.dll + + + Install (copy in) Wrapper DLLs + + copy somewhere\wsock32.dll wsock32.dll + copy somewhere\ws2_32.dll ws2_32.dll + copy another DLLs also + + However, replacing DLLs in Window's system directory is very + dangerous: + + a) If you re-install idn wrapper again, original WINSOCK DLLs + may be lost. + + b) Some application or service pack will replace WINSOCK DLLs. It + may corrupt WINSOCK environment. + + If these happen, at least networking does not work, and worse, + Windows never startup again. + + So, idn wrapper usually does not wrap in the system directory, but wrap in + each indivisual application's directory. + + In Windows, DLL will be searched in the following places: + + Application's Load Directory + %SystemRoot%\System32 + %SystemRoot% + Directories in PATH + + and loaded & linked first found one. So if installed wrapper DLLs is + found on application's load directory, the application's call to + WINSOCK will wrapped. + + But some applications or DLLs are binded to specific DLL, they do + not rely on above DLL's search path. For those applcaitons or DLLs, + idn wrapper (in standard installation) cannot wrap them. + + NOTE: Netscape is one of those program. It cannot be wrapped if + installed to applications directory. Also WINSOCK DLLs are + also binded to related DLLs in system directory. On the + other hand, Internet Explore or Window Media Player relys on + standard DLL search path, and well wrapped with idn wrapper. + +2.6. At which point conversion applied + + If windows supporting WINSOCK 2.0, there are DLLs one for 1.1 and + another for 2.0, and call to WINSOCK 1.1 will redirected to 2.0 DLL. + + +------------+ Call +------------+ Call +------------+ + | |------->| |------->| | + |Application | |WINSOCK 1.1 | |WINSOCK 2.0 | + | |<-------| |<-------| | + +------------+ Return +------------+ Return +------------+ + + In this case, calls to 1.1 and 2.0 are both passed to 2.0 DLL. So + conversion will done in WINSOCK 2.0 DLL side. + + If windows only supports WINSOCK 1.1, there's 1.1 DLL only. + + +------------+ Call +------------+ + | |------->| | + |Application | |WINSOCK 1.1 | + | |<-------| | + +------------+ Return +------------+ + + In this case, conversion must done in 1.1 DLL. + + If idn wrapper was installed on system directory, DLLs will work as + described above. But if wrapper was installed on application's + directory, call/return sequence changes. Original WINSOCK 1.1 DLL + in windows seems binded to specific WINSOCK 2.0 DLL, placed at + window's system diretory. So call from WINSOCK 1.1 to WINSOCK 2.0 + will passed to original DLL (in system directory) and never passed + to wrapper DLL in application's directory. So in this case, both + 1.1 and 2.0 DLLs should coonvert domain name encodings. + + These DLL binding is not documented. It may be change on OS + versions or DLL versions. So, mDn wrapper determines place of + conversion on registry value. With this registry value, idn + wrappper absolb OS/DLL variations. + + Registry values for idn wrapper will placed under + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN + + Place of conversion is determined with registry value "Where", + + Registry Value "Where" REG_DWORD + + 0 both on WINSOCK 1.1 and WINSOCK 2.0 + 1 if WINSOCK 2.0 exist, only in WINSOCK 2.0 + otherwise, convert on WINSOCK 1.1 + 2 only in WINSOCK 1.1 + 3 only in WINSOCK 2.0 + + If you install idn wrapper into application's directory, use "0". + If you install idn wrapper into system directory, use "1". If there + are no "Where" value, idn wrapper uses "0" as default, it is suited + to installation into application's directory (default installation). + +2.7. Converting From/To + + Wrapper DLL convert resolving domain name encoded with local code to + DNS server's encoding. Also, wrapper DLL convert resulting name ( + encoded with DNS's encoding) back to local encoding. + + There are several proposals for DNS encodings to handle multi-lingual + domain names. Wrapper DLL should be configured to convert to one of + those encodings. This DNS side encoding will specified with + registry. When installing idn wrapper, this registry will set to + some (yet undefined) DNS encoding. + + Registry values for idn wrapper will placed under + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN + + DNS encoding name will given with registry value (REG_SZ) of "Encoding", + this name must be one of encoding names which 'libmdn' recognize. + + Registry Value "Encoding" REG_SZ + + Encoding name of DNS server accepts. + + Local encodings (Windows Apllication Encodings) is generally + acquired from process's code page. 'iconv' library, used for idn + wrapper, generally accepts MS's codepage names. + + Some windows apllication encode domain name with some specific multi- + lingual encoding. For example, if you configured IE to use UTF-8, + then domain names are encoded with UTF-8. UTF-8 is one of proposed + DNS encoding, but DNS server may expect another encoding. + + For those cases, idn wrapper accept program specific encoding as + local encoding. These program specific local encoding should be + marked in registry. + + Program specific registry setting will placed under + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN\PerProg + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN\PerProg + + using program name (executable file name) as key. For example, + setting specific to Internet Explore, it executable name is + "IEXPLORE", will plcaed at + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN\PerProg\IEXPLORE + + Local encoding name will specified with registry value (REG_SZ) of + "Encoding". This name must be one of encoding names which ' + recognize.libmdn' + + Registry Value "Encoding" REG_SZ + + Encoding name of application program encodes, if it is not + system's default encoding. + +3. Setup and Configuration + + idn wrapper wraps WINSOCK DLL by placing wrapper (fake) DLLs in + the application's directory. For the installation, idn wrapper + comes with a setup program and a configuration program. + + NOTE: You can also install idn wrapper DLLs in the Windows + system directory. But this installation is very dangerous + and may cause severe problems in your system. + You should try it at your own risk. + +3.1. Setup Program + + To install idn wrapper, run "setup.exe". Setup program will do: + + Installing Files + + Copy idn wrapper files (DLL, Program EXE, etc) into diretory + + "\Program Files\JPNIC\idn wrapper" + + This directory may be changed on setup sequence. + + Setting registry entries + + Setup program will create keys and values under registry: + + "HKEY_LOCAL_MACHINES\Software\JPNIC\IDN" + + InstallDir REG_SZ "" + Pathname of the idn wrapper's installation directory. + The installer makes copies of the original WINSOCK DLLs + in that directory, which is referenced by the idn wrapper's + fake DLLs. + + ConfFile REG_SZ "\idn.conf" + Name of the idnkit's configuration file, which defines + various parameter regarding multilingual domain name + handling. See the contents of the file for details. + This value can be changed with the Configuration Program + or the registry editor. + + LogFile REG_SZ "\idn_wrapper.log" + Name of the idn wrapper's log file. + This value can be changed with the Configuration Program + or the registry editor. + + LogLevel DWORD -1 + Logging level. Default is -1, which indicates no logging + is made. This value can be changed with the Configuration + Program or the registry editor. + + PerProg KEY + + Under this key, idn wrapper set program specific values. idn + wrapper uses program's executable name as key, and put + values under that key. + + PerProg\\Where REG_DWORD Encoding Position + PerProg\>progname>\Encoding REG_SZ Local Encoding Name + + Configuration program set local encpoding name. "Where" + value is usually not required in standard installation. If + you installed idn wrapper in system directory, chanage + "Where" values to fit your environment. + + Creating ICON + + Setup program will create program icon for idn wrapper's + configuration program, and put it into "Start Menu". You can + start configuration program with it. + +3.2. Configuration Program + + Configuration program is a tool for wrap specific program, or unwrap + programs. If you start "Configuration Program", you'll get window + like this. + + +---+-------------------------------------------------+---+---+---+ + | | idn wrapper - Configuration | _ | O | X | + +---+-------------------------------------------------+---+---+---+ + | idn wrapper Configuration Program version X.X | + +-----------------------------------------------------------------+ + | Wrapped Program +---------+ | + | +---------------------------------------------+---+ | Wrap.. | | + | | | A | +---------+ | + | | +---+ +---------+ | + | | | | | Unwrap..| | + | | | | +---------+ | + | | | | +---------+ | + | | | | |UnwrapAll| | + | | | | +---------+ | + | | | | +---------+ | + | | | | |RewrapAll| | + | | | | +---------+ | + | | | | +---------+ | + | | | | | Log.. | | + | | | | +---------+ | + | | | | +---------+ | + | | +---+ |Advanced.| | + | | | V | +---------+ | + | +---+-------------------------------------+---+---+ +---------+ | + | | < | | > | | Exit | | + | +---+-------------------------------------+---+ +---------+ | + +-----------------------------------------------------------------+ + + Listbox contains list of current wrapped programs. Initially it is + empty. + + To wrap a program, press button "wrap". You'll get following dialog. + + +---+-------------------------------------------------+---+---+---+ + | | idn wrapper - Wrap Executable | _ | O | X | + +---+-------------------------------------------------+---+---+---+ + | +----------------------------------------+ +--------+ | + | Program: | | |Browse..| | + | +----------------------------------------+ +--------+ | + | +----------+ | + | Encoding: | | o Default o UTF-8 | + | +----------+ | + | [] Force local DLL reference | + +-----------------------------------------------------------------+ + | +--------+ +--------+ | + | | Wrap | | Cancel | | + | +--------+ +--------+ | + +-----------------------------------------------------------------+ + + First, enter program (executable name with full path) or browse + wrapping exectable from file browser. Then set local encoding of + that program. Usually use "Default" as local encoding. If target + program uses internationalized encoding, then specify "UFT-8". + + The "Force local DLL reference" button controls the DLL search + order of the program to be wrapped (Windows95 does not have this + capability, hence this button does not appear). If it is checked, + DLLs in the local directory (the directory which the executable + file is in) are always preferred, even if the executable specifies + otherwise. If you have problem with wrapping, checking this + button may solve the problem, but it is also possible that it + causes other problem. + + Finally, put "wrap" button to wrap specified program with given + encoding. Wrapped program will be listed in listbox of the first + window. + + When you install a new version of idn wrapper, you have to re-wrap + your programs in order to update DLLs used for wrapping. "Rewrap + all" button is provided for this purpose. Just press the button, + and all the currently wrapped programs will be re-wrapped. + + To unwrap a program, press button "unwrap". You'll get following + confirmating dialog. + + +---+-------------------------------------------------+---+---+---+ + | | idn wrapper - Unwrap Executable | _ | O | X | + +---+-------------------------------------------------+---+---+---+ + | +---------------------------------------------------+ | + | Program: | | | + | +---------------------------------------------------+ | + +-----------------------------------------------------------------+ + | +--------+ +--------+ | + | | Unwrap | | Cancel | | + | +--------+ +--------+ | + +-----------------------------------------------------------------+ + + If you unwrap a program, the program will be vanished from listbox + of the first window. + + Also "Unwrap all" button is provided to unwrap all the programs + that are currently wrapped. + + To configure logging, press button "log". You'll get the following + dialog. + + +---+-------------------------------------------------+---+---+---+ + | | idn wrapper - Log Configuration | _ | O | X | + +---+-------------------------------------------------+---+---+---+ + | Log Level: o None o Fatal o Error o Warning o Info o Trace | + | | + | +------------------------------------+ +---------+ | + | Log File:| | | Browse..| | + | +------------------------------------+ +---------+ | + | +------+ +--------+ | + |Log Operation: | View | | Delete | | + | +------+ +--------+ | + +-----------------------------------------------------------------+ + | +--------+ +--------+ | + | | OK | | Cancel | | + | +--------+ +--------+ | + +-----------------------------------------------------------------+ + + Logging level can be selected from the followings. + None no logging at all + Fatal only records fatal errors + Error also records non-fatal errors + Warning also records warning mssages + Info also records informational messages + Trace also records trace information + Note that these levels are for log output from IDN library (idnkit.dll). + idn wrapper itself supports only off (None) and on (the rest). + + Pathname of the log file can also be specified with this dialog. + + You can view the current log file contents by pressing "View" button, + or delete it by "Delete" button. + + Note that log level and log file configuration doesn't affect already + running processes. + + Press "advanced" button to invoke the advanced configuration dialog. + This dialog is for advanced users and enables customization for + some basic parameters which normal users need not change, since + appropriate defaults are provided. + + +---+-------------------------------------------------+---+---+---+ + | | idn wrapper - Advanced Configuration | _ | O | X | + +---+-------------------------------------------------+---+---+---+ + | IDN Wrapping Mode | + | o Wrap both WINSOCK 1.1 and WINSOCK 2.0 | + | o Wrap only WINSOCK 1.1 | + | o Wrap only WINSOCK 2.0 | + | o Wrap only WINSOCK 2.0 if it exists. | + | Otherwise wrap only WINSOCK 1.1 | + +-----------------------------------------------------------------+ + | IDN Configuration | + | +--------------------------------+ +----------+ | + | Config File: | | | Browse.. | | + | +--------------------------------+ +----------+ | + | +------+ | + | | Edit | | + | +------+ | + +-----------------------------------------------------------------+ + | +--------+ +--------+ | + | | OK | | Cancel | | + | +--------+ +--------+ | + +-----------------------------------------------------------------+ + + With the dialog users can do the following configuration. + + Wrapping Mode + Customize wrapping mode. Normally the default item should be + appropriate. Changing it to other item may help when you + have problems. + + IDN Configuration + Set the configuration file for multilingual domain name handling. + By pressing "Edit" button, you can edit then contents of the file. + +4. Limitations + +4.1. DLL Versions + + Wrapper DLL is tightly coupled with specific DLL version, because + it must export all the entries including un-documented ones. + If WINSOCK DLL version changed, idn wrapper may not work correctly. + + Current idn wrapper is tested on + + Win2000 (WINSOCK 1.1 + 2.0) + WinME (WINSOCK 1.1 + 2.0) + + But there are no assuarance for future versions of Windows. + +4.2. DNS, WINS, LMHOSTS + + There are three name resolving methods in windows, DNS, WINS and + LMHOSTS. Using idn wrapper, domain name conversion will performed + on all of thoses methods. It may cause some trouble if windows + using WINS or LMHOSTS. We recommend use DNS oly if you want to use + idn wrapper. + +4.3. Converting Names other than Domain Name + + In WINSOCK 2.0, there are generic name resolution APIs are + introduced. + + WSALookupServiceBeginA + WSALookupServiceNextA + WSALookupServiceEnd + + They are use mainly domain name conversion now, but not limited to + resolving domain name. idn wrapper hooks this API and convert + given name anyway. This causes some trouble if conversion name is + not domain name. + +4.4. Applications don't use these APIa + + Some applications don't use these APIs to resolving domain names. + For example, 'nslookup' issue DNS request locally. For these + applications, idn wrapper does not work. + +4.5. Applications bound to specific WINSOCK DLL + + Some applications are bound to specific DLL, not relying on + standard DLL search path. Netscape Communicator seems to be one of + such programs. idn wrapper in standard installation cannot wrap + such programs. + + If you want to wrap those programs, you may use installation into + system directory. But this installation is very dangerous, for + it is possible that your system cannot boot again. + +5. Registry Setting - Summary + +5.1. Priority of Setting + + Settings of idn wrapper is placed on registry + + Software\JPNIC\IDN + + under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. idn wrapper first + read HKEY_LOCAL_MACHINE, and if HKEY_CURRENT_USER exist, overwrite + with this one. Usually set HKEY_LOCAL_MACHINE only. But if you + need per user setting, then set HKEY_CURRENT_USER. + + Note that the configuration program reads/writes only + HKEY_LOCAL_MACHINE. + +5.2. Registry Key + + There's common settings and per program settings. + +_Common Settings + + Software\JPNIC\IDN\InstallDir Installation directory + Software\JPNIC\IDN\Where Where to convert encoding + 0: both WINSOCK 1.1 and WINSOCK 2.0 + 1: if WINSOCK 2.0 exist, convert at 2.0 DLL + if WINSOCK 1.1 only, convert at 1.1 DLL + 2: only in WINSOCK1.1 + 3: only in WINSOCK2.0 + Software\JPNIC\IDN\ConfFile idnkit Configuration File + Software\JPNIC\IDN\LogFile Log File + Software\JPNIC\IDN\LogLevel Log Level + +_Per Program Settings + + Converting position and program's local encoding may be set per + program bases. + + Software\JPNIC\IDN\PerProg\\Where + Software\JPNIC\IDN\PerProg\\Encoding + + If not specified, the following values are assumed. + + Where 0 (both 1.1 DLL and 2.0 DLL) + Encoding [process's code page] diff --git a/contrib/idn/idnkit-1.0-src/wsock/README_j.txt b/contrib/idn/idnkit-1.0-src/wsock/README_j.txt new file mode 100644 index 0000000000..354f46ce7f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/README_j.txt @@ -0,0 +1,717 @@ + + idn wrapper - Windows ‚É‚¨‚¯‚éƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‚Ì IDN •ÏŠ·ƒ\ƒtƒgƒEƒFƒA + + Copyright (c) 2000,2001,2002 Japan Network Information Center. + All rights reserved. + + *** ’ˆÓ ********************************************************** + ‚à‚µ‚à‚·‚Å‚É mDN Wrapper (idn wrapper ‚Ì‘Og) ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä + ‚¢‚éƒ}ƒVƒ“‚É idn wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍAƒCƒ“ƒXƒg[ƒ‹‘O + ‚ÉAƒ‰ƒbƒv‚³‚ê‚Ä‚¢‚é‚·‚ׂẴvƒƒOƒ‰ƒ€‚ðƒAƒ“ƒ‰ƒbƒv‚µ‚Ä‚­‚¾‚³‚¢B + ******************************************************************* + + +1. ‚Í‚¶‚ß‚É + + Windows ‚őۉ»ƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂ɂÍAWindows ã‚Ì + ƒNƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚¨‚¢‚ÄA‰ðŒˆ‚µ‚悤‚Æ‚·‚é–¼‘O‚̃Gƒ“ƒR[ + ƒfƒBƒ“ƒO‚ðADNS ƒT[ƒo‚ªŽó•t‚¯‚éŒ`Ž®‚Ì‚à‚̂ɕϊ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B + ‚±‚ê‚ÍAWindows ã‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA‚«‚¿‚ñ‚Ƒۉ»ƒhƒƒCƒ“–¼‚ð + ˆµ‚¦‚邿‚¤‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃç‚È‚¢A‚Æ‚¢‚¤‚±‚Ƃł ‚èA–{—ˆ‚Í‚»‚ê + ‚¼‚ê‚̃vƒƒOƒ‰ƒ€‚Ì쬎҂ªs‚È‚¤‚ׂ«‚±‚Ƃł·B + + Œ»Ý IETF ‚ɂđۉ»ƒhƒƒCƒ“–¼‚̃tƒŒ[ƒ€ƒ[ƒN‚ð•W€‰»‚·‚é“w—Í‚ª‘± + ‚¯‚ç‚ê‚Ä‚¨‚èA‚»‚ÌŒ‹‰Ê‚Æ‚µ‚Ĉê˜A‚Ì RFC ‚ª‚à‚¤‚·‚®”­s‚³‚ê‚邱‚Æ‚É + ‚È‚Á‚Ä‚¢‚Ü‚·‚ªA‚»‚ê‚Å‚à‘Û‰»ƒhƒƒCƒ“–¼‚ɑΉž‚µ‚½ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ + ‚͂܂¾‚Ü‚¾­‚È‚¢‚Ì‚ªŒ»ó‚Å‚·B + + ‚»‚±‚ÅAŠù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ð‘Û‰»ƒhƒƒCƒ“–¼‚ɑΉž‚³‚¹‚邽‚ß‚Ì + ƒwƒ‹ƒp[ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª•K—v‚ɂȂè‚Ü‚·Bidnkit ‚Ɋ܂܂ê‚é runidn + ƒRƒ}ƒ“ƒh‚Í Unix Œn‚Ì OS ‚ł̈ê‚‚̉ðŒˆô‚Å‚·‚µAWindows ‚ɑ΂·‚é‰ð + Œˆô‚Æ‚µ‚Ă͂±‚±‚Åà–¾‚·‚é idn wrapper ‚ª‚ ‚è‚Ü‚·B + + Windows ‚É‚¨‚¢‚ÄA‘½‚­‚Ìê‡AƒhƒƒCƒ“–¼‰ðŒˆ‚Ì—v‹‚ÍWINSOCK DLL ‚É + “n‚³‚ê‚Ü‚·B‚»‚±‚ÅAWINSOCK DLL ‚ð‘Û‰»ƒhƒƒCƒ“–¼‘Ήž‚Ì‚à‚̂ɒu‚« + Š·‚¦‚Ä‚â‚ê‚ÎAŠù‘¶‚̃vƒƒOƒ‰ƒ€‚©‚ç‚Å‚à‘Û‰»ƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª + ‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B + +2. ŽÀŒ»•û–@ + +2.1. ƒ‰ƒbƒp[DLL + + ƒ‰ƒbƒp[DLL ‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÆŒ³‚ÌDLL ‚Ƃ̊ԂɊ„‚èž‚ñ‚ÅAƒAƒvƒŠ + ƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚ð‰¡Žæ‚肵‚ÄA–{—ˆ‚ÌDLL ‚Ƃ͈قȂÁ‚½ˆ + —‚ð‚³‚¹‚é‚à‚̂ł·B + + +------------+ Call +------------+ Call +------------+ + | |------->| |------->| | + |Application | |Wrapper DLL | |Original DLL| + | |<-------| |<-------| | + +------------+ Return +------------+ Return +------------+ + additional + processing + here + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚̓‰ƒbƒp[ DLL‚É“n‚³‚ê‚Ü‚·Bƒ‰ƒb + ƒp[ DLL‚Í‚»‚±‚ÅA•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄAŒ³‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño + ‚µ‚Ü‚·B‚Ü‚½AŒ³‚ÌDLL ‚̈—Œ‹‰Ê‚͈ê’Uƒ‰ƒbƒp[ DLL‚ɕԂ³‚êA‚±‚±‚Å‚à + •t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄAÅI“I‚ÈŒ‹‰Ê‚ªƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɕԂ³‚ê‚邱‚Æ + ‚ɂȂè‚Ü‚·B + + idn wrapper ‚Å‚ÍAWINSOCK DLL‚Ì + + WSOCK32.DLL WINSOCK V1.1 + WS2_32.DLL WINSOCK V2.0 + + ‚ɑ΂·‚郉ƒbƒp[DLL ‚ð’ñ‹Ÿ‚µ‚ÄA‘Û‰»ƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ‚ª‚Å‚«‚邿 + ‚¤‚É‚µ‚Ü‚·B16ƒrƒbƒg”Å‚ÌWINSOCK (WINSOCK.DLL) ‚Í‘ÎÛŠO‚Å‚·B + +2.2. ˆ—‘ÎÛ‚ÌAPI + + idn wrapper ‚ÍWINSOCK ‚Ì–¼‘O‰ðŒˆ‚ÉŠÖ˜A‚µ‚½API ‚ɂ‚¢‚Ă̂ݕt‰Á“I‚Ȉ + —‚ðs‚È‚¢‚Ü‚·Bˆ—‚Ì‘ÎۂƂȂéWINSOCK API‚͈ȉº‚Ì‚à‚̂ł·B + + WINSOCK 1.1, WINSOCK 2.0 ‚Ì—¼•û‚É‚ ‚é‚à‚Ì + + gethostbyaddr + gethostbyname + WSAAsyncGetHostByAddr + WSAAsyncGetHostByName + + WINSOCK 2.0 ‚¾‚¯‚É‚ ‚é‚à‚Ì + + WSALookupServiceBeginA + WSALookupServiceNextA + WSALookupServiceEnd + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚œƎ©‚ɃhƒƒCƒ“–¼ + ‚Ì‰ðŒˆ‚ðs‚È‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎAnslookup‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í + ‚È‚¢‚ÅA“à•”‚œƎ©‚ÉDNS ƒŠƒNƒGƒXƒg‚̶¬A‰ðŽß‚ðs‚È‚Á‚Ä‚¢‚Ü‚·B“–‘R + ‚Ì‚±‚ƂȂª‚çA‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍAidn wrapper ‚ł͑½ + Œ¾Œê‰»‘Ήž‚³‚¹‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB + + ’FWINSOCK 2.0 ‚É‚ÍAWIDE CHARACTER ƒx[ƒX‚Ì–¼‘O‰ðŒˆ‚ÌAPI ‚Æ‚µ‚Ä + + WSALookupServiceBeginW + WSALookupServiceNextW + + ‚à‚ ‚è‚Ü‚·‚ªA‚±‚ê‚ç‚ɂ‚¢‚Ă̓‰ƒbƒv‚µ‚Ü‚¹‚ñB‚±‚ê‚ç‚ÌAPI ‚̓} + ƒCƒNƒƒ\ƒtƒgŽd—l‚É‚æ‚é‘Û‰»‚ɑΉž‚µ‚½‚à‚̂ł·‚©‚çA‚»‚̃tƒŒ[ + ƒ€ƒ[ƒNã‚ÅŽg‚¤‚ׂ«‚à‚̂ł·B‚±‚ê‚ç‚ɂ‚¢‚Ă͑¼‚Ì‘½Œ¾Œê‰»ƒtƒŒ[ + ƒ€ƒ[ƒN‚ɕϊ·‚µ‚Ä‚µ‚Ü‚¤‚̂͊댯‚ł͂Ȃ¢‚Æ”»’f‚µ‚Ü‚µ‚½B + +2.3. ˆ—‘ÎÛŠO‚ÌAPI + + ã‹LˆÈŠO‚ÌWINSOCK API ‚ɂ‚¢‚Ä‚ÍAidn wrapper ‚Í‚È‚É‚à‚µ‚È‚¢‚ÅAŒ³‚Ì + WINSOCK API ‚ðŒÄ‚Ño‚µ‚Ü‚·B + + idn wrapper ‚Å‚ÍAŒ³‚ÌWINSOCK DLL ‚𖼑O‚ð•Ï‚¦‚ăRƒs[‚µA‚»‚ê‚ð + ŒÄ‚Ño‚·‚悤‚Éì‚ç‚ê‚Ä‚¢‚Ü‚·B + + wsock32.dll -> wsock32o.dll + ws2_32.dll -> ws2_32o.dll + + ƒ‰ƒbƒp[DLL ‚ÍŒ³‚ÌWINSOCK DLL ‚Æ“¯‚¶–¼‘O‚Å쬂³‚ê‚Ü‚·B]‚Á‚Äidn + wrapper ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ꂽó‘Ô‚Å‚ÍA + + wsock32.dll idn wrapper for WINSOCK V1.1 + ws2_32.dll idn wrapper for WINSOCK V2.0 + wsock32o.dll Original WINSOCK V1.1 DLL + ws2_32o.dll Original WINSOCK V2.0 DLL + + ‚ƂȂè‚Ü‚·B + +2.4. ”ñ“¯Šú API + + ƒhƒƒCƒ“–¼‚̕ϊ·‚ÍAˆÈ‰º‚̃^ƒCƒ~ƒ“ƒO‚Ås‚È‚í‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·B + + DNS ‚Ö‚ÌƒŠƒNƒGƒXƒgŽž + + ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO -> DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO + + DNS ‚©‚ç‚̉ž“šŽóMŽž + + DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO -> ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO + + “¯ŠúAPI ‚É‚¨‚¢‚Ä‚ÍAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO + ‚ւ̕ϊ·‚ÍAŒ³‚ÌAPI ‚ðŒÄ‚Ño‚·‘O‚És‚í‚êADNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ + ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍAŒ³‚ÌAPI ‚©‚畜‹A‚µ‚Ä‚«‚½‚Æ‚±‚ë‚Ås‚È + ‚í‚ê‚Ü‚·B + + ‚µ‚©‚µAWINSOCK ‚̈ȉº‚ÌAPI ‚Í”ñ“¯ŠúAPI ‚ÅADNS ‚©‚ç‚̉ž“šŽóM‘O‚É•œ + ‹A‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B + + WSAAsyncGetHostByAddr + WSAAsyncGetHostByName + + ‚±‚ê‚ç‚ÌAPI ‚É‚¨‚¢‚Ä‚ÍA–¼‘O‰ðŒˆ‚ÌŠ®—¹‚ÍAWindows ‚ւ̃ƒbƒZ[ƒW‚É‚æ‚Á + ‚Ä’Ê’m‚³‚ê‚Ü‚·B‚±‚Ì‚½‚ßADNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ + ƒO‚ւ̕ϊ·‚ðs‚È‚¤‚É‚ÍAƒ‰ƒbƒp[‚Í’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒ‚̃ƒb + ƒZ[ƒWƒLƒ…[‚ðƒtƒbƒN‚µ‚ÄA‚±‚ÌŠ®—¹ƒƒbƒZ[ƒW‚ð•ߊl‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B + + ‚»‚±‚ÅA”ñ“¯ŠúAPI ‚ªŒÄ‚Ño‚³‚ꂽꇂɂÍAidn wrapper ‚ÍA’Ê’mæ‚̃EƒBƒ“ + ƒhƒEƒvƒƒVƒWƒƒi‚±‚ê‚ÍAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ɃtƒbƒN‚ðݒ肵 + ‚Ü‚·BƒtƒbƒN‚ªŠ®—¹ƒƒbƒZ[ƒWi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ð + ŒŸo‚µ‚½‚È‚çAƒtƒbƒN‚ÍŒ‹‰Ê‚ÌŠi”[—̈æi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê + ‚Ä‚¢‚Ü‚·j‚̃hƒƒCƒ“–¼‚ðADNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ + ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‚à‚̂Ƃµ‚Ü‚·B + +2.5. Wrapper DLL ‚̃Cƒ“ƒXƒg[ƒ‹ + + WINSOCK DLL ‚ÍWindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É’u‚©‚ê‚Ä‚¢‚Ü‚·B + WINSOCK ‚ðŠmŽÀ‚Ƀ‰ƒbƒv‚·‚é‚É‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É‚¨‚¢‚Ä + + ƒIƒŠƒWƒiƒ‹WINSOCK DLL ‚Ì–¼‘O‚Ì•ÏX + + ren wsock32.dll wsock32o.dll + ren ws2_32.dll ws2_32o.dll + + ƒ‰ƒbƒp[DLL ‚Ì“±“ü + + copy somewhere\wsock32.dll wsock32.dll + copy somewhere\ws2_32.dll ws2_32.dll + copy another DLLs also + + ‚ðs‚È‚¤•K—v‚ª‚ ‚è‚Ü‚·B + + ‚µ‚©‚µAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚Å‚±‚̂悤‚ÈDLL ‚Ì’u‚«Š·‚¦‚ðs‚È‚¤‚̂͑å + •ϊ댯‚È‘€ì‚ɂȂè‚Ü‚·B + + a) DLL ‚ð“ü‚ê‘Ö‚¦‚½ó‘Ô‚ÅA‚à‚¤‚¢‚¿‚Ç“¯‚¶‘€ì‚ðs‚È‚¤‚ÆAƒIƒŠƒWƒiƒ‹ + ‚ÌWINSOCK DLL ‚ªŽ¸‚í‚ê‚Ä‚µ‚Ü‚¤‚±‚ƂɂȂè‚Ü‚·B + + b) ƒT[ƒrƒXƒpƒbƒN‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ȂǂÅAWINSOCK DLL ‚ðÄ“±“ü‚·‚é + ‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA‚±‚ê‚É‚æ‚Á‚Ä‚àWINSOCK ‚ª—˜—p•s”\‚ɂȂ邱‚Æ‚ª‚  + ‚è‚Ü‚·B + + ‚±‚̂悤‚Èó‘Ô‚É‚È‚é‚ÆAƒlƒbƒgƒ[ƒN‹@”\‚ª‘S‚­Žg‚¦‚È‚­‚È‚Á‚½‚èAň« + ‚ÍWindows ‚Ì‹N“®‚·‚ço—ˆ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B + + ‚»‚±‚ÅAidn wrapper ‚Å‚ÍAã‚̂悤‚ȃVƒXƒeƒ€ƒŒƒxƒ‹‚̃‰ƒbƒv‚ł͂Ȃ­A + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɑ΂·‚郉ƒbƒv‚ðŠî–{‹@”\‚Æ‚µ‚Ä’ñ‹Ÿ‚·‚é‚à‚̂Ƃµ‚Ü‚·B + + Windows ‚É‚¨‚¢‚ÄADLL ‚ÍAŠî–{“I‚É‚Í + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ + %SystemRoot%\System32 + %SystemRoot% + PATH ‚ÅŽwަ‚³‚ê‚éƒfƒBƒŒƒNƒgƒŠ + + ‚̇˜‚ÅŒŸõ‚³‚ê‚ÄAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚Ì‚ªƒ[ƒh‚³‚ê‚Ü‚·B‚Å‚·‚©‚çA + ˆê”Ê“I‚É‚ÍADLL ‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹ + ‚·‚ê‚ÎA‚»‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌWINSOCK ‚̌ĂÑo‚µ‚ðƒ‰ƒbƒv‚·‚邱‚Æ + ‚ª‚Å‚«‚Ü‚·B + + ‚½‚¾‚µA‚¢‚­‚‚©‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚Å‚ÍAŒŸõƒpƒX‚ðŒo—R‚¹‚¸‚É“Á + ’è‚ÌDLL ‚ðƒŠƒ“ƒN‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B‚±‚̂悤‚È\¬‚Ì + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚ªŽg‚í‚ê‚½ê‡‚É‚Í idn wrapper‚ł͑Έ‚·‚邱‚Æ + ‚͂ł«‚Ü‚¹‚ñB + + ’FNetscape‚Í“Á’èDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚ÅAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒB + ƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ł̓‰ƒbƒv‚Å‚«‚Ü‚¹‚ñBWINSOCK DLL Ž©‘Ì‚à + ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌŠÖ˜ADLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚Å‚·Bˆê•ûA + Internet Explore‚âWindows Media Player‚Í•W€‚̃T[ƒ`ƒpƒX‚É]‚Á‚Ä + ‚¢‚é‚Ì‚ÅAƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B + +2.6. ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ˆÊ’u + + WINSOCK 2.0 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚éWindows ‚É‚ÍAWINSOCK ‚Ì1.1 ‚Æ2.0 ‚Ì‚» + ‚ꂼ‚ê‚ɑΉž‚·‚éDLL ‚ª‚ ‚èAWINSOCK 1.1 ‚ÌAPI ‚̌ĂÑo‚µ‚Í2.0 ‚Ì“¯‚¶ + ƒGƒ“ƒgƒŠ‚ÉƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B + + +------------+ Call +------------+ Call +------------+ + | |------->| |------->| | + |Application | |WINSOCK 1.1 | |WINSOCK 2.0 | + | |<-------| |<-------| | + +------------+ Return +------------+ Return +------------+ + + ‚±‚ÌꇂɂÍ1.1 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚à2.0 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚àA‚Æ‚à‚ÉV2.0 + —p‚ÌDLL ‚É“n‚³‚ê‚é‚Ì‚ÅA2.0—p‚̃‰ƒbƒp[DLL ‘¤‚¾‚¯‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì + •ÏŠ·‚ðs‚È‚¤‚悤‚É‚·‚é‚ׂ«‚Å‚µ‚傤B + + ˆê•ûAWINSOCK 1.1 ‚µ‚©ƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡(Win95)‚É‚ÍA1.1 ‚ɑΉž‚µ + ‚½DLL ‚µ‚©‚ ‚è‚Ü‚¹‚ñB + + +------------+ Call +------------+ + | |------->| | + |Application | |WINSOCK 1.1 | + | |<-------| | + +------------+ Return +------------+ + + ‚±‚Ìꇂɂ͕K‘R“I‚É1.1 —p‚̃‰ƒbƒp[DLL ‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚È + ‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB + + idn Wrapepr ‚ªwindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚½ê‡ + ‚É‚ÍAã‚Ì’Ê‚è‚É“®ì‚·‚é‚Ì‚ÅA + + WINSOCK 2.0 ‚ ‚è 2.0 ƒ‰ƒbƒp[‚ŕϊ· + WINSOCK 1.1 ‚Ì‚Ý 1.1 ƒ‰ƒbƒp[‚ŕϊ· + + ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B + + ‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂ͓®ì + ‚ª•Ï‚í‚Á‚Ä‚«‚Ü‚·BWindows •t‘®‚Ì WINSOCK 1.1 DLL‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒN + ƒgƒŠ‚ÌWINSOCK 2.0 ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邽‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒN + ƒgƒŠ‘¤‚ÌWINSOCK 2.0 ƒ‰ƒbƒp[DLL ‚É‚ÍƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚Ä‚«‚Ü‚¹‚ñB‚±‚Ì + ‚½‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚É‚¨‚¢‚Ä‚ÍA1.1DLLA + 2.0DLL‚Ì—¼•û‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B + + ‚±‚̂悤‚ÈDLL ŠÔ‚̃oƒCƒ“ƒfƒBƒ“ƒO‚̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚ÅAŠÂ + ‹«Aƒo[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă͈قȂÁ‚½“®ì‚ð‚·‚é‚©‚à’m‚ê‚Ü‚¹‚ñB‚»‚±‚Åidn + wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ’l‚É‚æ‚Á‚ÄAƒ‰ƒbƒp[DLL ‚̂ǂ±‚ŕϊ·‚ðs‚È‚¤ + ‚©‚ðŒˆ’è‚·‚邿‚¤‚É‚µ‚ÄAƒCƒ“ƒXƒg[ƒ‹æ‚É‚æ‚é·ˆÙA‚ ‚é‚¢‚̓o[ƒWƒ‡ƒ“ + ‚É‚æ‚é·ˆÙ‚ð‹zŽû‚·‚邿‚¤‚É‚µ‚Ü‚·B + + idn wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN + + ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚È‚¤ˆÊ’u‚ɂ‚¢‚Ä‚ÍA‚±‚Ì + ’¼‰º‚̃ŒƒWƒXƒgƒŠ’l WhereiREG_DWORDj ‚É‚æ‚Á‚ÄŒˆ’肵‚Ü‚·B—LŒø‚È’l‚ÍA + + ƒŒƒWƒXƒgƒŠ Where (REG_DWORD) + + 0 WINSOCK 1.1AWINSOCK 2.0 ‚Ì—¼•û‚ŕϊ·‚·‚é + 1 WINSOCK 2.0 ‚ª‚ ‚ê‚ÎAWINSOCK 2.0‚¾‚¯‚ŕϊ·‚·‚é + WINSOCK 1.1 ‚¾‚¯‚Ìê‡‚É‚Í WINSOCK 1.1 ‚ŕϊ·‚·‚é + 2 WINSOCK 1.1 ‚¾‚¯‚ŕϊ·‚·‚é + 3 WINSOCK 2.0 ‚¾‚¯‚ŕϊ·‚·‚é + + ‚Ì‚S’Ê‚è‚Å‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éê‡‚É‚Í + u‚Ov‚ðAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Pv‚ðÝ’è + ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·BƒŒƒWƒXƒgƒŠ’l‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Íu‚Ov‚ð‘z’肵‚Ü + ‚·B‚±‚ê‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ð•W€‚Æ‚µ‚½‚à + ‚̂ł·B + +2.7. •ÏŠ·Œ³/æ‚̃Gƒ“ƒNƒR[ƒfƒBƒ“ƒO + + ƒ‰ƒbƒp[DLL ‚Å‚ÍA‰ðŒˆ‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚ðAƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ + ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚Ü‚½ADNS ‚ª•Ô + ‚µ‚Ä‚«‚½ƒhƒƒCƒ“–¼(DNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO)‚ðƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ + ƒR[ƒfƒBƒ“ƒO‚É–ß‚µ‚Ü‚·B + + Œ»ÝADNS ‘¤‚̑ۉ»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍA‚¢‚­‚‚à‚Ì•ûŽ®‚ª’ñ + ˆÄ‚³‚ê‚Ä‚¢‚Ü‚·Bƒ‰ƒbƒp[DLL ‚Í‚»‚ê‚ç‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂ǂꂩ + ‚ЂƂ‚ɕϊ·‚·‚邿‚¤‚É\¬‚³‚ê‚Ü‚·B‚±‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒW + ƒXƒgƒŠ‚ÅŽwަ‚³‚ê‚Ü‚·B‚±‚̃ŒƒWƒXƒgƒŠ‚É‚ÍAidn wrapper ‚̃Cƒ“ƒXƒg[ƒ‹ + Žž‚ÉiŒ»Žž“_‚ł͖¢’è‚ÌjƒfƒtƒHƒ‹ƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªÝ’肳‚ê‚Ü‚·B“– + ‘RA‚±‚̃ŒƒWƒXƒgƒŠ‚ÍAŒã‚Å‘¼‚Ì‚à‚̂ɕÏX‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B + + idn wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN + + ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BDNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ’l Encoding + iREG_SZj‚ÅŽwަ‚³‚ê‚Ü‚·B‚±‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAlibmdn‚Å”Fޝ‚³‚ê + ‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB + + ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) + DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðݒ肵‚Ü‚· + + ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA’Êí + ‚̓vƒƒZƒX‚̃R[ƒhƒy[ƒW‚©‚狂߂܂·Bƒ‰ƒbƒp[DLL ‚ªŽg—p‚·‚é 'iconv' + ƒ‰ƒCƒuƒ‰ƒŠ‚ÍAwindows ‚̃R[ƒhƒy[ƒW–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽó•t + ‚¯‚邱‚Æ‚ª‚Å‚«‚é‚Ì‚ÅAƒR[ƒhƒy[ƒW–¼‚ð‚»‚Ì‚Ü‚Üƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ + ƒO–¼‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B + + ‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA“Á’è‚̑ۉ»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å + ƒhƒƒCƒ“–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚Ä‚µ‚Ü‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎAIE‚Å‚Í + ƒhƒƒCƒ“–¼‚ðUTF-8 ‚Å•\‹L‚·‚邿‚¤‚ÉŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂÁ‚Ä‚¢ + ‚Ü‚·BUTF-8 ‚É‚æ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA’ñˆÄ‚³‚ê‚Ä‚¢‚é‘Û‰»•ûŽ®‚̂Р+ ‚Ƃ‚ł·‚ªA‘Û‰»‚³‚ꂽDNS ƒT[ƒo‚Í‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žó•t‚¯ + ‚È‚¢‚©‚à’m‚ê‚Ü‚¹‚ñB + + ‚±‚̂悤‚È󋵂ɑΈ‚·‚邽‚ßAidn ƒ‰ƒbƒp[‚ÍAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ + ƒO‚Æ‚µ‚ăvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚àŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É + ‚µ‚Ü‚·B‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€“Á—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒg + ƒŠ‹LÚ‚³‚ê‚é‚à‚̂Ƃµ‚Ü‚·B + + idn wrapper —p‚̃vƒƒOƒ‰ƒ€“Á—L‚̃ŒƒWƒXƒgƒŠÝ’è‚Í + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN\PerProg + HKEY_CURRENT_USER\SOFTWARE\JPNIC\IDN\PerProg + + ˆÈ‰º‚ÉAƒvƒƒOƒ‰ƒ€–¼iŽÀsƒ‚ƒWƒ…[ƒ‹ƒtƒ@ƒCƒ‹–¼j‚ðƒL[‚Æ‚µ‚Ä”z’u‚³‚ê + ‚Ü‚·B—Ⴆ‚ÎAInternet Explore ‚ÌꇂɂÍAŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚Ì + IEXPLORE‚ðƒL[‚Æ‚µ‚Ä + + HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\IDN\PerProg\IEXPLORE + + ˆÈ‰º‚É’u‚©‚ê‚Ü‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAƒŒƒWƒXƒgƒŠ’l + Encoding iREG_SZj‚ÅŽwަ‚µ‚Ü‚·B‚±‚ê‚àlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê + ‚΂Ȃè‚Ü‚¹‚ñB + + ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼iƒfƒtƒHƒ‹ + ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚ð•K—v‚Æ‚·‚éê‡j‚ðŽw’肵‚Ü‚·B + +3.ƒZƒbƒgƒAƒbƒv‚ƃRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ + + idn wrapper ‚ÍAŠî–{ƒCƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚Æ‚µ‚ÄAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒ + ƒNƒgƒŠ‚ÅWINSOCK ‚ðƒ‰ƒbƒv‚µ‚Ü‚·B‚±‚ê‚ɇ‚킹‚ÄAƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ + ƒ€‚ƃRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Æ‚ð’ñ‹Ÿ‚µ‚Ü‚·B + + ’FƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ł̃‰ƒbƒv‚à‰Â”\‚Å‚·‚ªA‚±‚ê‚͊댯‚ÈÝ’è‚Å‚· + ‚Ì‚ÅA•W€ƒCƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚Æ‚µ‚Ă͒ñ‹Ÿ‚µ‚Ü‚¹‚ñBƒVƒXƒeƒ€ƒfƒBƒŒ + ƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤ê‡‚É‚ÍAŽ©ŒÈÓ”C‚Å‚â‚Á‚Ä‚­‚¾‚³‚¢B + +3.1.ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€ + + idn wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚Í"setup.exe" ‚ðŽÀs‚µ‚Ü‚·BƒZƒbƒgƒAƒb + ƒvƒvƒƒOƒ‰ƒ€‚͈ȉº‚̈—‚ðŽÀs‚µ‚Ü‚·B + + ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ + + ƒfƒBƒŒƒNƒgƒŠu\Program Files\JPNIC\idn wrapperv i ƒZƒbƒgƒAƒbƒv + Žž“_‚Å•ÏX‰Â”\jˆÈ‰º‚ÉAidn wrapper ‚ð\¬‚·‚éƒtƒ@ƒCƒ‹‚ðƒRƒs[‚µ + ‚Ü‚·B + + ƒŒƒWƒXƒgƒŠ‚ÌÝ’è + + HKEY_LOCAL_MACHINE\Software\JPNIC\IDN ˆÈ‰º‚É•K—v‚ȃŒƒWƒXƒgƒŠƒL[A + ƒŒƒWƒXƒgƒŠ’l‚ðì¬Aݒ肵‚Ü‚·B + + InstallDir REG_SZ "<ƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ>" + idn wrapper ‚̃Cƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ‚̃pƒX–¼‚Å‚·BƒZƒbƒg + ƒAƒbƒvƒvƒƒOƒ‰ƒ€‚Í‚±‚̃fƒBƒŒƒNƒgƒŠ‚ɃIƒŠƒWƒiƒ‹‚ÌWINSOCK + DLL ‚̃Rƒs[‚ð쬂µ‚Ü‚·Bidn wrapper ‚̃‰ƒbƒp[ DLL ‚ÍŽÀ + sŽž‚É‚±‚Ì DLL ‚ðŽQÆ‚µ‚Ü‚·B + + ConfFile REG_SZ "<ƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ>\idn.conf" + idn wrapper ‚ª‘Û‰»ƒhƒƒCƒ“–¼‚̕ϊ·ˆ—‚ÉŽg—p‚µ‚Ä‚¢‚é + idnkit ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Ì–¼‘O‚Å‚·B‚±‚̃tƒ@ + ƒCƒ‹‚͑ۉ»ƒhƒƒCƒ“–¼‚̈—‚É•K—v‚ÈŠeŽí‚̃pƒ‰ƒ[ƒ^‚ðÝ’è + ‚·‚邽‚߂̂à‚̂ł·BÚ‚µ‚­‚̓tƒ@ƒCƒ‹‚Ì“à—e‚ð‚²——‚­‚¾‚³‚¢B + ‚±‚Ì’l‚ÍŒãq‚·‚éƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å•ÏX‚·‚é + ‚±‚Æ‚ª‚Å‚«‚Ü‚·B + + LogFile REG_SZ "<ƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ>\idn_wrapper.log" + idn wrapper ‚̃ƒOƒtƒ@ƒCƒ‹‚Ì–¼‘O‚Å‚·B‚±‚Ì’l‚àƒRƒ“ƒtƒBƒMƒ… + ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B + + LogLevel DWORD -1 + ƒƒOƒŒƒxƒ‹‚ÌŽw’è‚Å‚·BƒfƒtƒHƒ‹ƒg‚Í -1 ‚ÅA‚±‚ê‚Í‘S‚­ƒƒO‚ð + o—Í‚µ‚È‚¢‚Æ‚¢‚¤ˆÓ–¡‚Å‚·B‚±‚Ì’l‚àƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒv + ƒƒOƒ‰ƒ€‚Å•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B + + PerProg ƒL[ + + ƒvƒƒOƒ‰ƒ€–ˆ‚ÌÝ’è’l‚ðŠi”[‚·‚邽‚߂̃L[‚Å‚·B‚±‚̉º‚ÉAƒvƒ + ƒOƒ‰ƒ€‚ÌŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ðƒL[‚Æ‚µ‚ăvƒƒOƒ‰ƒ€ŒÂ•Ê‚Ìݒ肪‹L + ˜^‚³‚ê‚Ü‚·Bݒ肳‚ê‚éî•ñ‚͈ȉº‚Ì“ñ‚‚ł·B + + PerProg\\Where REG_DWORD •ÏŠ·ˆÊ’u + PerProg\\Encoding REG_SZ ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ + + ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í’ÊíƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚É‚æ‚Á + ‚Äݒ肳‚ê‚Ü‚·B•ÏŠ·ˆÊ’u‚ÍA•W€ƒCƒ“ƒXƒg[ƒ‹‚ł͕s—v‚Å‚·BƒV + ƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚Á‚½ê‡‚É‚ÍAƒŒƒWƒX + ƒgƒŠƒGƒfƒBƒ^‚Ŋ‹«‚ɇ‚킹‚ÄÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B + + ƒAƒCƒRƒ“‚Ìì¬ + + ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚̃AƒCƒRƒ“‚ð쬂µAƒXƒ^[ƒgƒƒjƒ…[ + ‚É“o˜^‚µ‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ăRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ð‹N“® + ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B + + ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚ÌuƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì’Ç + ‰Á‚Æíœv‚ÅAuidn wrapperv ‚ð‘I‘ð‚µ‚Äíœiu’ljÁ‚Æíœvƒ{ƒ^ƒ“j + ‚µ‚Ü‚·B + +3.2.ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€ + + ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð“Á’肵‚ă‰ƒbƒv + ‚µ‚½‚èAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃‰ƒbƒv‚ð‰ðœ‚·‚邽‚߂̃c[ƒ‹‚Å‚·B + + ‹N“®‚·‚邯ˆÈ‰º‚̂悤‚ȉæ–Ê‚ª•\ަ‚³‚ê‚Ü‚·B + + „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ + „ @„ idn wrapper - Configuration „ Q„  „ ~„  + „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ + „  idn wrapper Configuration Program version X.X „  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  Wrapped Program „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¢„  Wrap.. „ „  + „ „  „ È„ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „  „¥„Ÿ„§„¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „  „  „ „  Unwrap.. „ „  + „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „  „  „ „ UnwrapAll.„ „  + „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „  „  „ „ RewrapAll.„ „  + „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „  „  „ „  Log.. „ „  + „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „  „¥„Ÿ„§„ Advanced..„ „  + „ „  „ É„ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „ „¥„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„©„Ÿ„£„¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ „ q„  „ r„  „  Exit „ „  + „ „¤„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„£ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ + + ƒŠƒXƒgƒ{ƒbƒNƒX‚É‚ÍA‚»‚ÌŽž“_‚щƒbƒv‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ª•\ަ‚³‚ê‚Ü + ‚·Bʼn‚ÉŽÀs‚µ‚½ê‡‚ɂ͋ó‚ɂȂÁ‚Ä‚¢‚Ü‚·B + + ƒvƒƒOƒ‰ƒ€‚ðƒ‰ƒbƒv‚·‚é‚É‚ÍA"wrap"ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B"wrap"ƒ{ƒ^ƒ“‚ð‰Ÿ + ‚·‚ƈȉº‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B + + „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ + „ @„ idn wrapper - Wrap Executable „ Q„  „ ~„  + „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  Program: „  „ „ Browse..„ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „  „¡„Ÿ„Ÿ„Ÿ„¢ „  + „ Encoding: „  „  ›Default ›UTF-8 „  + „  „¤„Ÿ„Ÿ„Ÿ„£ „  + „    Force local DLL reference „  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  „  wrap „ „  cancel „ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ + + ʼn‚ÉAƒ‰ƒbƒv‚·‚éƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒtƒ@ƒCƒ‹–¼‚ðݒ肵‚Ü‚·B’¼Ú“ü—Í + ‚·‚é‚©Aƒuƒ‰ƒEƒYƒ{ƒ^ƒ“‚Ńtƒ@ƒCƒ‹‚ð’T‚µ‚Ä‚­‚¾‚³‚¢BŽŸ‚É‚»‚̃vƒƒOƒ‰ + ƒ€‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B’Êí‚ÍuDefaultv ‚Å‚©‚Ü + ‚¢‚Ü‚¹‚ñBƒvƒƒOƒ‰ƒ€‚ª‘Û‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É]‚Á‚Ä‚¢‚éê‡‚É‚Ì‚Ý + uUTF-8v ‚ðŽwަ‚µ‚Ü‚·B + + uForce local DLL referencevƒ{ƒ^ƒ“‚É‚æ‚èAƒ‰ƒbƒv‚·‚éƒvƒƒOƒ‰ƒ€‚Ì + DLL ‚Ì’Tõ‡˜‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚· (‚½‚¾‚µ Windows95 ‚ɂ͂±‚Ì + ‹@”\‚ª‚È‚¢‚½‚ßA‚±‚̃{ƒ^ƒ“‚à•\ަ‚³‚ê‚Ü‚¹‚ñ)B‚±‚̃{ƒ^ƒ“‚ðƒ`ƒFƒbƒN + ‚·‚邯A‚½‚Æ‚¦ƒvƒƒOƒ‰ƒ€‚ª•Ê‚ÌêŠ‚Ì DLL ‚ðŽw’肵‚Ä‚¢‚Ä‚àAí‚ÉŽÀ + sƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Ì DLL ‚ª—D悳‚ê‚邿‚¤‚ɂȂè‚Ü‚·B‚à + ‚µƒvƒƒOƒ‰ƒ€‚ª‚¤‚Ü‚­ƒ‰ƒbƒv‚Å‚«‚È‚¢ê‡‚É‚ÍA‚±‚̃{ƒ^ƒ“‚ðƒ`ƒFƒbƒN‚· + ‚邯‚¤‚Ü‚­‚¢‚­‚©‚à‚µ‚ê‚Ü‚¹‚ñB‚½‚¾‚µ“¯Žž‚É‘¼‚Ì–â‘肪”­¶‚·‚é‰Â”\« + ‚à‚ ‚è‚Ü‚·B + + ÅŒã‚Éuwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚ÎAƒvƒƒOƒ‰ƒ€‚ªAŽw’肳‚ꂽƒGƒ“ƒR[ƒfƒB + ƒ“ƒO‚щƒbƒv‚³‚ê‚Ü‚·Bƒ‰ƒbƒv‚³‚ꂽƒvƒƒOƒ‰ƒ€‚ÍAʼn‚̃EƒBƒ“ƒhƒE‚Ì + ƒŠƒXƒgƒ{ƒbƒNƒX‚É”½‰f‚³‚ê‚Ü‚·B + + idn wrapper ‚ðƒo[ƒWƒ‡ƒ“ƒAƒbƒv‚µ‚½ê‡‚É‚ÍAƒ‰ƒbƒv—p‚Ì DLL ‚ðƒAƒbƒv + ƒf[ƒg‚·‚邽‚ß‚ÉAƒvƒƒOƒ‰ƒ€‚ðă‰ƒbƒv‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚Ì‚½‚ß‚ÉA + Œ»Ýƒ‰ƒbƒv‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ɑ΂µ‚ÄÄ“xƒ‰ƒbƒv‚ðs‚¤‚½‚ß‚Ìurewrap + allvƒ{ƒ^ƒ“‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B + + ƒvƒƒOƒ‰ƒ€‚ɑ΂·‚郉ƒbƒv‚ð‰ðœ‚·‚é‚É‚ÍAƒŠƒXƒgƒ{ƒbƒNƒX‚ʼn𜂷‚éƒvƒ + ƒOƒ‰ƒ€‚ð‘I‘ð‚µ‚ÄAuunwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·BˆÈ‰º‚ÌŠm”F—p‚̃_ƒCƒAƒ + ƒO‚ª•\ަ‚³‚ê‚Ü‚·‚Ì‚ÅAŠÔˆá‚¢‚ª‚È‚¯‚ê‚Îuunwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³ + ‚¢B + + „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ + „ @„ idn wrapper - Unwrap Executable „ Q„  „ ~„  + „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „ Program: „  „ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  „  Unwrap „ „  Cancel „ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ + + ƒ‰ƒbƒv‚ª‰ðœ‚³‚ê‚邯A‚»‚̃vƒƒOƒ‰ƒ€‚Íʼn‚̃EƒBƒ“ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒN + ƒX‚©‚ç‚à휂³‚ê‚Ü‚·B + + ƒvƒƒOƒ‰ƒ€‚ɑ΂µ‚ÄŒ»Ýݒ肳‚ê‚Ä‚¢‚郉ƒbƒv‚ð‚·‚×‚Ä‰ðœ‚·‚邽‚ß‚Ì + uunwrap allvƒ{ƒ^ƒ“‚à—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B + + ƒƒO‚ÌÝ’è‚ðs‚¤‚É‚ÍA"log" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·BŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ª + •\ަ‚³‚ê‚Ü‚·B + + „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ + „ @„ idn wrapper - Log Configuration „ Q„  „ ~„  + „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ + „  Log Level: ›None ›Fatal ›Error ›Warning ›Info ›Trace „  + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  Log File:„  „ „ Browse..„ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „  „¡„Ÿ„Ÿ„Ÿ„¢ „¡„Ÿ„Ÿ„Ÿ„¢ „  + „ Log Operation:„  View „  „ Delete„  „  + „  „¤„Ÿ„Ÿ„Ÿ„£ „¤„Ÿ„Ÿ„Ÿ„£ „  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  „  OK „ „  Cancel „ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ + + ƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì’†‚©‚ç‘I‘ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B + None ƒƒO‚ðo—Í‚µ‚È‚¢ + Fatal ’v–½“IƒGƒ‰[‚̂݋L˜^‚·‚é + Error ’v–½“I‚łȂ¢ƒGƒ‰[‚à‹L˜^‚·‚é + Warning ŒxƒƒbƒZ[ƒW‚à‹L˜^‚·‚é + Info ‚»‚Ì‘¼‚Ìî•ñ‚à‹L˜^‚·‚é + Trace ƒgƒŒ[ƒXo—Í‚à‹L˜^‚·‚é + ‚±‚±‚É‚ ‚°‚½ƒƒOƒŒƒxƒ‹‚ÌÝ’è‚ÍAIDN ƒ‰ƒCƒuƒ‰ƒŠ (idnkit.dll) ‚ªo—Í‚·‚é + ƒƒO‚ɑ΂µ‚Ă̂ݗLŒø‚Å‚·Bidn wrapper Ž©g‚ªo—Í‚·‚郃O‚Í ON/OFF + ‚µ‚©‚Å‚«‚Ü‚¹‚ñBNone ‚ðŽw’è‚·‚邯 OFF ‚ÉA‚»‚êˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚邯 + ON ‚ɂȂè‚Ü‚·B + + ‚±‚̃_ƒCƒAƒƒO‚ð—p‚¢‚ÄAƒƒOƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B + + ‚Ü‚½AƒƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•\ަ‚³‚¹‚½‚èAƒƒOƒtƒ@ƒCƒ‹‚ð휂·‚邱‚Æ‚à + ‰Â”\‚Å‚·B + + ƒƒOƒŒƒxƒ‹‚⃃Oƒtƒ@ƒCƒ‹‚ÌÝ’è‚ÍAݒ莞‚É‚·‚łɓ®ì‚µ‚Ä‚¢‚éƒvƒƒZƒX + ‚ɂ͉e‹¿‚ð—^‚¦‚È‚¢‚±‚ƂɋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B + + "advanced" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚Æuadvanced configurationv—p‚̃_ƒCƒAƒƒO + ‚ª•\ަ‚³‚ê‚Ü‚·B‚±‚̃_ƒCƒAƒƒO‚Í㋉ƒ†[ƒU‚Ì‚½‚߂̂à‚Ì‚ÅA“K؂ȃf + ƒtƒHƒ‹ƒg‚ªÝ’肳‚ê‚Ä‚¢‚邽‚߂ɒÊ탆[ƒU‚ª•ÏX‚·‚é•K—v‚̂Ȃ¢‚悤‚È + Šî–{“I‚ȃpƒ‰ƒ[ƒ^‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B + + „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ + „ @„ idn wrapper - Advanced Configuration „ Q„  „ ~„  + „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ + „  IDN Wrapping Mode „  + „  ›Wrap both WINSOCK 1.1 and WINSOCK 2.0 „  + „  ›Wrap only WINSOCK 1.1 „  + „  ›Wrap only WINSOCK 2.0 „  + „  ›Wrap only WINSOCK 2.0 if it exists. „  + „  Otherwise wrap only WINSOCK 1.1 „  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  IDN Configuration „  + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  Log File:„  „ „ Browse..„ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „  „¡„Ÿ„Ÿ„Ÿ„¢ „  + „  „  Edit „  „  + „  „¤„Ÿ„Ÿ„Ÿ„£ „  + „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ + „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  + „  „  OK „ „  Cancel „ „  + „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  + „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ + + ‚±‚̃_ƒCƒAƒƒO‚ðŽg—p‚µ‚ÄAŽŸ‚Ì3Ží—Þ‚ÌÝ’è‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B + + Wrapping Mode + ƒ‰ƒbƒv•û–@‚ðݒ肵‚Ü‚·B’Êí‚̓fƒtƒHƒ‹ƒg‚Åݒ肳‚ê‚Ä‚¢‚逖ڂð + ‘I‘ð‚µ‚Ä‚¨‚¯‚΂悢‚Í‚¸‚Å‚·‚ªA–â‘肪‹N‚Á‚½‚Æ‚«‚ɂ͕ʂ̀–Ú‚É‚· + ‚邯“®‚­‚悤‚ɂȂ邩‚à‚µ‚ê‚Ü‚¹‚ñB + + IDN Configuration + ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B‚Ü‚½ "Edit" ƒ{ƒ^ + ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èAƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•ÒW‚·‚邱‚Æ‚à‰Â”\‚Å‚·B + +4. §ŒÀŽ–€ + +4.1. DLL ƒo[ƒWƒ‡ƒ“ + + ƒ‰ƒbƒp[DLL ‚ÍAŒ³‚ÌWINSOCK ‚ÌDLL ‚̃o[ƒWƒ‡ƒ“‚É‹­‚­ˆË‘¶‚µ‚Ü‚·B‚±‚ê + ‚ÍA”ñŒöŠJ‚̃Gƒ“ƒgƒŠ‚àŠÜ‚߂Ă·‚ׂẴGƒ“ƒgƒŠ‚ð’ñ‹Ÿ‚·‚é•K—v‚ª‚ ‚邽‚ß + ‚Å‚·B‚±‚Ì‚½‚ßWINSOCK DLL ‚̃o[ƒWƒ‡ƒ“‚ª•Ï‚í‚邯Aidn wrapper ‚ª“®ì + ‚µ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B + + ¡‰ñ쬂³‚ꂽidn wrapper ‚ÍA + + Win2000 (WINSOCK 1.1 + 2.0) + WinME (WINSOCK 1.1 + 2.0) + + ‚Å“®ì‚ðŠm”F‚µ‚Ä‚¢‚Ü‚·B‚½‚¾A«—ˆ‚ɂ킽‚Á‚Ä“®ì‚·‚é•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñB + +4.2. DNS, WINS, LMHOSTS + + Windows ‚Å‚ÍADNS ‚¾‚¯‚ł͂Ȃ­AWINS‚âLMHOSTS ‚É‚æ‚Á‚Ä‚àƒhƒƒCƒ“–¼A + ƒzƒXƒg–¼‚Ì‰ðŒˆ‚ªs‚È‚í‚ê‚Ü‚·Bidn wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍAƒhƒƒCƒ“ + –¼‚̕ϊ·‚ªA‚±‚ê‚ç‚Ì•ûŽ®‚ւ̃fƒBƒXƒpƒbƒ`‚ðs‚È‚¤êŠ‚æ‚è‚àãˆÊ‘w‚Ås + ‚È‚í‚ê‚é‚Ì‚ÅA‚±‚ê‚ç‚Ì‚·‚ׂĂ̕ûŽ®‚ɂ‚¢‚ÄAƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚Ì•Ï + Š·‚ªs‚È‚í‚ê‚邱‚ƂɂȂè‚Ü‚·B‚±‚Ì‚½‚ßAWindows ‚ªAWINS‚âLMHOSTS ‚ð + Žg‚Á‚Ä‚¢‚éꇂɂÍA—\Šú‚µ‚È‚¢–â‘肪”­¶‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B‚±‚ê‚É + ‚‚¢‚Ä‚ÍAidn wrapper ‚ðŽg‚¤ê‡‚É‚ÍA–¼‘O‰ðŒˆ‚ÉDNS ‚¾‚¯‚ðŽg—p‚·‚邱 + ‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B + +3.3. ƒhƒƒCƒ“–¼ˆÈŠO‚Ì–¼‘O‚Ì‰ðŒˆ + + WINSOCK 2.0 ‚Ì–¼‘O‰ðŒˆAPI + + WSALookupServiceBeginA + WSALookupServiceNextA + WSALookupServiceEnd + + ‚ÍAƒhƒƒCƒ“–¼ˆÈŠO‚Å‚àŽg—p‚Å‚«‚éA”Ä—p‚Ì–¼‘O‰ðŒˆ—p‚ÌAPI ‚Æ‚µ‚Ä’è‹`‚³ + ‚ê‚Ä‚¢‚Ü‚·BŒ»Žž“_‚Å‚ÍA‚±‚ê‚ç‚Í‚à‚Á‚Ï‚çƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ÅŽg—p‚³‚ê‚Ä + ‚¢‚Ü‚·‚ªA‘¼‚Ì–¼‘O(—Ⴆ‚΃T[ƒrƒX–¼)‚Ì‰ðŒˆ‚É‚àŽg—p‚Å‚«‚邱‚ƂɂȂÁ‚Ä + ‚¢‚Ü‚·B + + idn wrapper ‚ÍA–¼‘O‚Ì‘ÎÛ‚Ì”@‰½‚É‚©‚©‚í‚炸A–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO + ‚ð•ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA‚±‚ê‚ç‚ÌAPI ‚ªAƒhƒƒCƒ“–¼ˆÈŠO‚Ì‰ðŒˆ‚ÉŽg‚í‚ê‚Ä + ‚¢‚éꇂɂÍA–â‘è‚ðˆø‚«‹N‚±‚·‰Â”\«‚ª‚ ‚è‚Ü‚·B + +4.4. –¼‘O‰ðŒˆAPI ‚ðŽg‚í‚È‚¢ƒvƒƒOƒ‰ƒ€ + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍAƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚É‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È + ‚¢‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎA'nslookup'‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚ÅA + ’¼ÚDNS ƒT[ƒo‚Æ’ÊM‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B‚±‚̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢ + ‚Ä‚ÍAidn wrapper ‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB + +4.5. “Á’èWINSOCK DLL ‚ɃoƒCƒ“ƒh‚³‚ꂽƒAƒvƒŠƒP[ƒVƒ‡ƒ“ + + ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA•W€‚ÌDLL ƒT[ƒ`ƒpƒX‚É]‚í‚È‚¢‚ÅA“Á’è‚Ì + ƒpƒX‚ÌDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B‚æ‚­Žg‚í‚ê‚éƒvƒƒOƒ‰ƒ€ + ‚Ì’†‚Å‚ÍANetscape Communicator ‚ª‚»‚¤‚È‚Á‚Ä‚¢‚Ü‚·B‚±‚̂悤‚ȃvƒƒO + ƒ‰ƒ€‚ɂ‚¢‚Ä‚ÍA•W€‚̃Cƒ“ƒXƒg[ƒ‹^ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ł̓‰ƒbƒv + ‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB + + ‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚ÄA‚Ç‚¤‚µ‚Ä‚àƒ‰ƒbƒv‚·‚é•K—v‚ª‚ ‚é‚È‚çAƒV + ƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚½‚¾‚µA‚± + ‚̃Cƒ“ƒXƒg[ƒ‹‚Í‘å•ϊ댯‚ÅAꇂɂæ‚Á‚Ă̓VƒXƒeƒ€‚ðÄ‹N“®•s”\‚É‚µ‚Ä + ‚µ‚Ü‚¤‰Â”\«‚à‚ ‚è‚Ü‚·B + +5. ƒŒƒWƒXƒgƒŠÝ’è - ‚Ü‚Æ‚ß + +5.1. ƒŒƒWƒXƒgƒŠ‚Ì—Dæ‡ˆÊ + + idn wrapper ‚ÌÝ’èî•ñ‚ÍAHKEY_LOCAL_MACHINEAHKEY_CURRENT_USER‚Ì + + Software\JPNIC\IDN + + ˆÈ‰º‚ÉŠi”[‚³‚ê‚Ü‚·Bidn wrapper‚Íʼn‚ÉHKEY_LOCAL_MACHINE‚ÌÝ’è‚ð“Ç + ‚Ýž‚ÝAHKEY_CURRENT_USER‘¤‚É‚àݒ肪‚ ‚ê‚ÎA‚±‚ê‚Åã‘‚«‚µ‚Ü‚·B’Ê + í‚ÍAHKEY_LOCAL_MACHINE ‘¤‚¾‚¯‚ðݒ肵‚Ü‚·Bƒ†[ƒUŒÂ•ʂɈقȂÁ‚½Ý + ’è‚ðŽg‚¢‚½‚¢ê‡‚Ì‚ÝAHKEY_CURRENT_USER‚ðÝ’è‚·‚邿‚¤‚É‚µ‚Ä‚­‚¾‚³‚¢B + + ‚È‚¨AƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Í HKEY_LOCAL_MACHINE ‚ÌÝ’è + ‚¾‚¯‚ð“ǂݑ‚«‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B + +4.2. ƒŒƒWƒXƒgƒŠƒL[ + + ‘S‘̂̋¤’Ê‚ÌÝ’è‚ÆAƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è‚Æ‚ª‚ ‚è‚Ü‚·B + +Q‹¤’Ê’è‹` + + Software\JPNIC\IDN\InstallDir ƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ + Software\JPNIC\IDN\Where •ÏŠ·ˆÊ’u + 0:WINSOCK1.1 WINSOCK2.0‚Ì—¼•û‚Å + 1:WINSOCK2.0 ‚ª‚ ‚ê‚΂»‚¿‚ç‚Å + 2:WINSOCK1.1 ‚¾‚¯‚Å + 3:WINSOCK2.0 ‚¾‚¯‚Å + Software\JPNIC\IDN\ConfFile idnkit ‚ÌÝ’èƒtƒ@ƒCƒ‹ + Software\JPNIC\IDN\LogLevel ƒƒOƒŒƒxƒ‹ + Software\JPNIC\IDN\LogFile ƒƒOƒtƒ@ƒCƒ‹ + +QƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è + + •ÏŠ·ˆÊ’uA‚¨‚æ‚уvƒƒOƒ‰ƒ€‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓vƒƒOƒ‰ƒ€–ˆ‚É“Á’è‚· + ‚邱‚Æ‚à‚Å‚«‚Ü‚·B‚±‚ê‚ç‚ÍAˆÈ‰º‚̃L[ƒnƒCƒu‚̉º‚ÉAƒvƒƒOƒ‰ƒ€–¼‚ðƒL[ + ‚Æ‚·‚é’l‚Åݒ肵‚Ü‚·B + + Software\JPNIC\IDN\PerProg\\Where + Software\JPNIC\IDN\PerProg\\Encoding + + Žw’肳‚ê‚Ä‚¢‚È‚¢ê‡‚É‚ÍA + + Where 0 1.1A2.0 ‚Ì—¼•û‚ŕϊ· + Encoding ƒvƒƒZƒX‚̃R[ƒhƒy[ƒW + + ‚Ƃ݂Ȃµ‚Ü‚·B + diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/checkdll.c b/contrib/idn/idnkit-1.0-src/wsock/common/checkdll.c new file mode 100644 index 0000000000..a620cc9256 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/checkdll.c @@ -0,0 +1,242 @@ +/* + * checkdll.c - Winsock DLL/IDN processing status + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include "wrapcommon.h" + +static int winsock_idx; /* index of winsock_info[] */ + +static struct winsock_type { + char *version; /* winsock version */ + char *name; /* wrapper DLL name */ + char *original_name; /* original DLL name */ +} winsock_info[] = { +#define IDN_IDX_WS11 0 + { "1.1", "WSOCK32", "WSOCK32O" }, +#define IDN_IDX_WS20 1 + { "2.0", "WS2_32", "WS2_32O" }, + { NULL, NULL, NULL }, +}; + +static HINSTANCE load_original_dll(void); +static BOOL check_idn_processing(void); +static BOOL check_dll(const char *name); + +BOOL +idnWinsockVersion(const char *version) { + int i; + for (i = 0; winsock_info[i].version != NULL; i++) { + if (strcmp(winsock_info[i].version, version) == 0) { + winsock_idx = i; + idnLogPrintf(idn_log_level_trace, + "idnWinsockVersion: version %s\n", + version); + return (TRUE); + } + } + idnLogPrintf(idn_log_level_fatal, + "idnWinsockVersion: unknown winsock version %s\n", + version); + return (FALSE); +} + +HINSTANCE +idnWinsockHandle(void) { + static HINSTANCE dll_handle = NULL; + static int initialized = 0; + + if (!initialized) { + /* Get the handle of the original winsock DLL */ + idnLogPrintf(idn_log_level_trace, + "idnWinsockHandle: loading original DLL..\n"); + dll_handle = load_original_dll(); + } + initialized = 1; + return (dll_handle); +} + +idn_resconf_t +idnGetContext(void) { + static int initialized = 0; + static idn_resconf_t ctx = NULL; + + if (!initialized) { + /* + * Check whether IDN processing should be done + * in this wrapper DLL. + */ + idnLogPrintf(idn_log_level_trace, + "idnGetContext: checking IDN status..\n"); + if (check_idn_processing()) { + /* Initialize idnkit */ + ctx = idnConvInit(); + idnLogPrintf(idn_log_level_info, + "Processing context: %08x\n", ctx); + } else { + idnLogPrintf(idn_log_level_info, + "NOT process IDN here\n"); + ctx = NULL; + } + initialized = 1; + } + + return (ctx); +} + +static HINSTANCE +load_original_dll(void) { + /* + * Load Original DLL + */ + char dllpath[MAX_PATH]; + const char *dll_name = winsock_info[winsock_idx].original_name; + HINSTANCE handle; + + /* + * Get idn wrapper's install directory, where the copies of + * the original winsock DLLs are saved. + */ + dllpath[0] = '\0'; + if (idnGetInstallDir(dllpath, sizeof(dllpath)) != TRUE) { + idnLogPrintf(idn_log_level_fatal, + "idnWinsockHandle: cannot find idn wrapper's " + "install directory\n"); + abort(); + return (NULL); /* for lint */ + } + /* Strip the trailing backslash. */ + if (dllpath[0] != '\0' && + dllpath[strlen(dllpath) - 1] == '\\') { + dllpath[strlen(dllpath) - 1] = '\0'; + } + /* Is the pathname is insanely long? */ + if (strlen(dllpath) + strlen(dll_name) + 1 + 4 >= sizeof(dllpath)) { + idnLogPrintf(idn_log_level_fatal, + "idnWinsockHandle: idn wrapper's install path is " + "too long to be true\n"); + abort(); + return (NULL); /* for lint */ + } + /* Append the DLL name to form a full pathname of the DLL. */ + strcat(dllpath, "\\"); + strcat(dllpath, dll_name); + strcat(dllpath, ".DLL"); + + idnLogPrintf(idn_log_level_trace, + "idnWinsockHandle: loading original winsock DLL (%s)\n", + dllpath); + if ((handle = LoadLibrary(dllpath)) == NULL) { + idnLogPrintf(idn_log_level_fatal, + "idnWinsockHandle: no DLL %-.100s\n", dllpath); + abort(); + return (NULL); /* font lint */ + } + return (handle); +} + +static BOOL +check_idn_processing(void) { + int where = idnEncodeWhere(); + BOOL here = FALSE; + + idnLogPrintf(idn_log_level_trace, + "idnGetContext: Winsock%s, where=%d\n", + winsock_info[winsock_idx].version, where); + + switch (winsock_idx) { + case IDN_IDX_WS11: + switch (where) { + case IDN_ENCODE_ALWAYS: + case IDN_ENCODE_ONLY11: + return (TRUE); + case IDN_ENCODE_CHECK: + if (!check_dll(winsock_info[winsock_idx].name)) { + return (TRUE); + } + break; + } + break; + case IDN_IDX_WS20: + switch (where) { + case IDN_ENCODE_ALWAYS: + case IDN_ENCODE_ONLY20: + case IDN_ENCODE_CHECK: + return (TRUE); + break; + } + break; + } + return (FALSE); +} + +static BOOL +check_dll(const char *name) { + HINSTANCE hdll = NULL; + +#if 1 + hdll = LoadLibrary(name); +#else + /* + * Just check the existence of the named DLL, without taking + * the trouble of calling DllMain. + */ + hdll = LoadLibraryEx(name, NULL, LOAD_LIBRARY_AS_DATAFILE); +#endif + if (hdll == NULL) { + idnLogPrintf(idn_log_level_trace, + "idnGetContext: DLL %s does not exist\n"); + return (FALSE); + } else { + idnLogPrintf(idn_log_level_trace, + "idnGetContext: DLL %s exists\n"); + FreeLibrary(hdll); + return (TRUE); + } +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/convert.c b/contrib/idn/idnkit-1.0-src/wsock/common/convert.c new file mode 100644 index 0000000000..b2c202e49f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/convert.c @@ -0,0 +1,180 @@ +/* + * convert.c - convert domain name + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include + +#include "wrapcommon.h" + +/* + * prepare/dispose conversion context + */ + +void +idnConvDone(idn_resconf_t ctx) +{ + if (ctx != NULL) { + idnLogReset(); + idn_resconf_destroy(ctx); + } +} + +idn_resconf_t +idnConvInit(void) +{ + char encoding[256]; + idn_resconf_t ctx; + idn_result_t r; + + idnLogReset(); + + idnLogPrintf(idn_log_level_info, "idnkit version: %-.20s\n", + idn_version_getstring()); + + /* + * Initialize. + */ + if ((r = idn_resconf_initialize()) != idn_success) { + idnPrintf("idnConvInit: cannot initialize idn library: %s\n", + idn_result_tostring(r)); + return NULL; + } + if ((r = idn_resconf_create(&ctx)) != idn_success) { + idnPrintf("idnConvInit: cannot create context: %s\n", + idn_result_tostring(r)); + return NULL; + } + /* + * load configuration file. + */ + if ((r = idn_resconf_loadfile(ctx, NULL)) != idn_success) { + idnPrintf("idnConvInit: cannot read configuration file: %s\n", + idn_result_tostring(r)); + if ((r = idn_resconf_setdefaults(ctx)) != idn_success) { + idnPrintf("idnConvInit: setting default configuration" + " failed: %s\n", + idn_result_tostring(r)); + idnConvDone(ctx); + return (NULL); + } + idnPrintf("idnConvInit: using default configuration\n"); + } + /* + * Set local codeset. + */ + if (idnGetPrgEncoding(encoding, sizeof(encoding)) == TRUE) { + idnPrintf("Encoding PRG <%-.100s>\n", encoding); + r = idn_resconf_setlocalconvertername(ctx, encoding, + IDN_CONVERTER_RTCHECK); + if (r != idn_success) { + idnPrintf("idnConvInit: invalid local codeset " + "\"%-.100s\": %s\n", + encoding, idn_result_tostring(r)); + idnConvDone(ctx); + return NULL; + } + } + return ctx; +} + +/* + * idnConvReq - convert domain name in a DNS request + * + * convert local encoding to DNS encoding + */ + +BOOL +idnConvReq(idn_resconf_t ctx, const char FAR *from, char FAR *to, size_t tolen) +{ + idn_result_t r; + + idnLogReset(); + + idnLogPrintf(idn_log_level_trace, "idnConvReq(from=%-.100s)\n", from); + if (ctx == NULL) { + idnLogPrintf(idn_log_level_trace, "idnConvReq: ctx is NULL\n"); + if (strlen(from) >= tolen) + return FALSE; + strcpy(to, from); + return TRUE; + } + + r = idn_res_encodename(ctx, IDN_ENCODE_APP, from, to, tolen); + + if (r == idn_success) { + return TRUE; + } else { + return FALSE; + } +} + +/* + * idnConvRsp - convert domain name in a DNS response + * + * convert DNS encoding to local encoding + */ + +BOOL +idnConvRsp(idn_resconf_t ctx, const char FAR *from, char FAR *to, size_t tolen) +{ + idnLogReset(); + + idnLogPrintf(idn_log_level_trace, "idnConvRsp(from=%-.100s)\n", from); + if (ctx == NULL) { + if (strlen(from) >= tolen) + return FALSE; + strcpy(to, from); + return TRUE; + } else if (idn_res_decodename(ctx, IDN_DECODE_APP, + from, to, tolen) == idn_success) { + return TRUE; + } else { + return FALSE; + } +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/dump.c b/contrib/idn/idnkit-1.0-src/wsock/common/dump.c new file mode 100644 index 0000000000..1f16bd5c46 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/dump.c @@ -0,0 +1,118 @@ +/* + * dump.c - dump data + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include + +#include "wrapcommon.h" + +char * +dumpAddr(const char FAR *addr, int len, char *buff, size_t size) { + int i; + char *p; + + buff[0] = '\0'; + for (i = 0, p = buff; i < len; i++) { + char digits[8]; + + sprintf(digits, "%d", (addr[i] & 0xff)); + if (i + 1 < len) { + strcat(digits, "."); + } + if (strlen(digits) >= size) { + break; + } + strcpy(p, digits); + p += strlen(digits); + size -= strlen(digits); + } + return (buff); +} + +char * +dumpHost(const struct hostent FAR *hp, char *buff, size_t size) { + char *p = buff; + + p[0] = '\0'; + if (strlen(hp->h_name) + 1 < size) { + sprintf(p, "%s ", hp->h_name); + p += strlen(p); + size -= strlen(p); + } + dumpAddr(hp->h_addr_list[0], hp->h_length, p, size); + return (buff); +} + +char * +dumpName(const char *name, char *buff, size_t size) { + const char *sp; + char *dp; + + for (sp = name, dp = buff; *sp != '\0'; sp++) { + if (*sp >= 0x21 && *sp <= 0x7e) { + if (size < 2) { + break; + } + *dp++ = *sp; + size--; + } else { + if (size < 5) { + break; + } + dp[0] = '\\'; + dp[1] = 'x'; + sprintf(dp + 2, "%02x", *sp & 0xff); + dp += 4; + size -= 4; + } + } + *dp = '\0'; + + return (buff); +} + diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/encoding.c b/contrib/idn/idnkit-1.0-src/wsock/common/encoding.c new file mode 100644 index 0000000000..f8ad9e7c62 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/encoding.c @@ -0,0 +1,271 @@ +/* + * encoding.c - get DNS/Local encodings + * + * Software\JPNIC\IDN\Where + * \LogFile + * \LogLevel + * \InstallDir + * \PerProg\\Where + * \PerProg\\Encoding + */ + +/* + * Copyright (c) 2000,2001,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "wrapcommon.h" + +#define IDN_GLOBAL 1 +#define IDN_PERPROG 2 +#define IDN_CURUSER 4 + +/* + * Registry of Encodings + */ + +#define IDNKEY_WRAPPER "Software\\JPNIC\\IDN" +#define IDNKEY_PERPROG "Software\\JPNIC\\IDN\\PerProg" +#define IDNVAL_WHERE "Where" +#define IDNVAL_ENCODE "Encoding" +#define IDNVAL_LOGLVL "LogLevel" +#define IDNVAL_LOGFILE "LogFile" +#define IDNVAL_INSDIR "InstallDir" + +static int GetRegistry(HKEY top, const char *key, const char *name, + DWORD type, void *param, DWORD length); +static char *GetPerProgKey(char *buf, size_t len); +static int GetFromRegistry(const char *name, int where, DWORD type, + void *param, DWORD length); +static int GetIntFromRegistry(const char *name, int defvalue, int where); +static BOOL GetStringFromRegistry(const char *name, char *result, + size_t length, int where); + +static int +GetRegistry(HKEY top, const char *key, const char *name, DWORD type, + void *param, DWORD length) +{ + LONG stat; + HKEY hk; + DWORD realtype; + + stat = RegOpenKeyEx(top, key, 0, KEY_READ, &hk); + if (stat != ERROR_SUCCESS) { + return 0; + } + + stat = RegQueryValueEx(hk, (LPCTSTR)name, NULL, + &realtype, (LPBYTE)param, &length); + + RegCloseKey(hk); + + if (stat != ERROR_SUCCESS || realtype != type) + return 0; + + return 1; +} + +static char * +GetPerProgKey(char *buf, size_t len) +{ + char exename[256]; + char prgname[256]; + char *p, *last; + + GetModuleFileName(NULL, exename, 256); + + for (p = exename, last = NULL; *p != '\0'; p++) { + if (*p == '/' || *p == '\\') { + last = p; + } + } + strcpy(prgname, (last == NULL) ? exename : (last + 1)); + if ((p = strrchr(prgname, '.')) != NULL) { + *p = '\0'; + } + + if (strlen(IDNKEY_PERPROG) + 1 + strlen(prgname) >= len) { + return (NULL); + } + sprintf(buf, "%s\\%s", IDNKEY_PERPROG, prgname); + return buf; +} + +static int +GetFromRegistry(const char *name, int where, DWORD type, + void *param, DWORD length) +{ + if (where & IDN_PERPROG) { + /* + * First, try program specific setting. + */ + char keyname[256]; + + /* + * Try HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. + */ + if (GetPerProgKey(keyname, sizeof(keyname)) != NULL) { + if (((where & IDN_CURUSER) && + GetRegistry(HKEY_CURRENT_USER, keyname, name, + type, param, length)) || + GetRegistry(HKEY_LOCAL_MACHINE, keyname, name, + type, param, length)) { + return (1); + } + } + } + + if (where & IDN_GLOBAL) { + /* + * Try global setting. + */ + if (((where & IDN_CURUSER) && + GetRegistry(HKEY_CURRENT_USER, IDNKEY_WRAPPER, name, + type, param, length)) || + GetRegistry(HKEY_LOCAL_MACHINE, IDNKEY_WRAPPER, name, + type, param, length)) { + return (1); + } + } + + /* + * Not found. + */ + return (0); +} + +static int +GetIntFromRegistry(const char *name, int defvalue, int where) +{ + DWORD param; + + if (GetFromRegistry(name, where, REG_DWORD, ¶m, sizeof(param))) { + return ((int)param); + } + return (defvalue); +} + +static BOOL +GetStringFromRegistry(const char *name, char *result, size_t length, int where) +{ + if (GetFromRegistry(name, where, REG_SZ, result, (DWORD)length)) { + return (TRUE); + } + return (FALSE); +} + +/* + * idnEncodeWhere - which module should convert domain name + */ +int +idnEncodeWhere(void) +{ + int v = GetIntFromRegistry(IDNVAL_WHERE, IDN_ENCODE_ALWAYS, + IDN_GLOBAL|IDN_PERPROG|IDN_CURUSER); + + idnLogPrintf(idn_log_level_trace, "idnEncodeWhere: %d\n", v); + return (v); +} + +/* + * idnGetLogFile - refer to log file + */ +BOOL +idnGetLogFile(char *file, size_t len) +{ + BOOL v = GetStringFromRegistry(IDNVAL_LOGFILE, file, len, + IDN_GLOBAL|IDN_CURUSER); + + idnLogPrintf(idn_log_level_trace, "idnGetLogFile: %-.100s\n", + (v == TRUE) ? file : ""); + return (v); +} + +/* + * idnGetPrgEncoding - refer to Program's Local Encoding + * + * use program name as registry key + */ +BOOL +idnGetPrgEncoding(char *enc, size_t len) +{ + if (GetStringFromRegistry(IDNVAL_ENCODE, enc, len, + IDN_PERPROG|IDN_CURUSER) != TRUE || + enc[0] == '\0') { + sprintf(enc, "CP%d", GetACP()); + } + idnLogPrintf(idn_log_level_trace, + "idnGetPrgEncoding: %-.30s\n", enc); + return (TRUE); +} + +/* + * idnGetLogLevel + */ +int +idnGetLogLevel(void) +{ + int v = GetIntFromRegistry(IDNVAL_LOGLVL, 0, + IDN_GLOBAL|IDN_CURUSER); + + idnLogPrintf(idn_log_level_trace, "idnGetLogLevel: %d\n", v); + return (v); +} + +/* + * idnGetInstallDir - get idn wrapper install directory + */ +BOOL +idnGetInstallDir(char *dir, size_t len) +{ + /* No need to look at HKEY_CURRENT_USER */ + BOOL v = GetStringFromRegistry(IDNVAL_INSDIR, dir, len, IDN_GLOBAL); + + idnLogPrintf(idn_log_level_trace, "idnGetInstallDir: %-.100s\n", + (v == TRUE) ? dir : ""); + return (v); +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/hook.c b/contrib/idn/idnkit-1.0-src/wsock/common/hook.c new file mode 100644 index 0000000000..b520f10e77 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/hook.c @@ -0,0 +1,224 @@ +/* + * hook.c - Hooking Asynchronous Completion + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include + +#include "wrapcommon.h" + +/* + * Hook Managements + */ + +static HHOOK hookHandle = NULL ; + +typedef struct _HOOK *HOOKPTR; + +typedef struct _HOOK { + HOOKPTR prev; + HOOKPTR next; + idn_resconf_t ctx; + HWND hWnd; + u_int wMsg; + char FAR *pBuf; +} HOOKREC; + +static HOOKREC hookList = { 0 } ; + +static void +hookListInit(void) { + if (hookList.prev == NULL || hookList.next == NULL) { + hookList.prev = &hookList; + hookList.next = &hookList; + } +} + +static HOOKPTR +hookListSearch(HWND hWnd, u_int wMsg) { + HOOKPTR hp; + + for (hp = hookList.next ; hp != &hookList ; hp = hp->next) { + if (hp->hWnd == hWnd && hp->wMsg == wMsg) { + return (hp); + } + } + return (NULL); +} + +static BOOL +hookListAppend(HWND hWnd, u_int wMsg, char FAR *buf, idn_resconf_t ctx) { + HOOKPTR hp, prev, next; + + if ((hp = (HOOKPTR)malloc(sizeof(HOOKREC))) == NULL) { + idnPrintf("cannot create hook record\n"); + return (FALSE); + } + memset(hp, 0, sizeof(*hp)); + + hp->ctx = ctx; + hp->hWnd = hWnd; + hp->wMsg = wMsg; + hp->pBuf = buf; + + prev = hookList.prev; + next = prev->next; + prev->next = hp; + next->prev = hp; + hp->next = next; + hp->prev = prev; + + return (TRUE); +} + +static void +hookListDelete(HOOKPTR hp) +{ + HOOKPTR prev, next; + + prev = hp->prev; + next = hp->next; + prev->next = next; + next->prev = prev; + + free(hp); +} + +static void +hookListDone(void) +{ + HOOKPTR hp; + + while ((hp = hookList.next) != &hookList) { + hookListDelete(hp); + } +} + +/* + * idnHookInit - initialize Hook Management + */ +void +idnHookInit(void) { + hookListInit(); +} + +/* + * idnHookDone - finalize Hook Management + */ +void +idnHookDone(void) { + if (hookHandle != NULL) { + UnhookWindowsHookEx(hookHandle); + hookHandle = NULL; + } + hookListDone(); +} + +/* + * hookProc - hookprocedure, used as WH_GETMESSAGE hook + */ +LRESULT CALLBACK +hookProc(int nCode, WPARAM wParam, LPARAM lParam) { + MSG *pMsg; + HOOKPTR pHook; + struct hostent *pHost; + char nbuff[256]; + char hbuff[256]; + + if (nCode < 0) { + return (CallNextHookEx(hookHandle, nCode, wParam, lParam)); + } else if (nCode != HC_ACTION) { + return (0); + } + if ((pMsg = (MSG *)lParam) == NULL) { + return (0); + } + if ((pHook = hookListSearch(pMsg->hwnd, pMsg->message)) == NULL) { + return (0); + } + + /* + * Convert the Host Name + */ + pHost = (struct hostent *)pHook->pBuf; + idnPrintf("AsyncComplete Resulting <%s>\n", + dumpName(pHost->h_name, hbuff, sizeof(hbuff))); + if (idnConvRsp(pHook->ctx, pHost->h_name, + nbuff, sizeof(nbuff)) == TRUE) { + idnPrintf("AsyncComplete Converted <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(pHost->h_name, nbuff); + } + + /* + * Delete target + */ + hookListDelete(pHook); + + return (0); +} + +/* + * idnHook - hook async. completion message + */ +BOOL +idnHook(HWND hWnd, u_int wMsg, char FAR *buf, idn_resconf_t ctx) +{ + if (hookHandle == NULL) { + hookHandle = SetWindowsHookEx(WH_GETMESSAGE, hookProc, + NULL, GetCurrentThreadId()); + } + if (hookHandle == NULL) { + idnPrintf("idnHook: cannot set hook\n"); + return (FALSE); + } + if (hookListAppend(hWnd, wMsg, buf, ctx) != TRUE) { + return (FALSE); + } + return (TRUE); +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/make.wnt b/contrib/idn/idnkit-1.0-src/wsock/common/make.wnt new file mode 100644 index 0000000000..4dde4dd6e4 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/make.wnt @@ -0,0 +1,102 @@ +# +# Makefile for WinSock Wrapper (common part) +# + +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +!include + +SYSLIBS = $(libcdll) kernel32.lib advapi32.lib user32.lib + +# +# Files to use +# + +HDRS = wrapcommon.h +SRCS = printf.c dump.c checkdll.c encoding.c convert.c hook.c +OBJS = printf.obj dump.obj checkdll.obj encoding.obj convert.obj hook.obj +LIBS = ..\..\lib\idnkit.lib ..\..\win\iconv.lib + +cflags = $(cflags) -I..\..\include + +# +# Targets to Build +# + +TARGETS = wrapcommon.lib + +all : $(TARGETS) + +wrapcommon.lib : $(OBJS) + -del wrapcommon.lib + lib /out:wrapcommon.lib $(OBJS) + +install : + +clean : force + -del *.obj + -del *.lib + -del *.exp + +# +# Dependencies +# + +printf.obj : printf.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +dump.obj : dump.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +checkdll.obj : checkdll.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +encoding.obj : encoding.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +convert.obj : convert.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +hook.obj : hook.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +force : + diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/printf.c b/contrib/idn/idnkit-1.0-src/wsock/common/printf.c new file mode 100644 index 0000000000..7d6d2e4a60 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/printf.c @@ -0,0 +1,138 @@ +/* + * printf.c - printf like debug print function + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "wrapcommon.h" + +/* + * Debug Tracer for DLL + */ + +static char logfile_name[256]; +static int log_level = -1; +static char log_header[30]; + +void +idnPrintf(char *fmt, ...) { + va_list arg_ptr; + FILE *fp; + char msg[512]; + + if (log_level < 0 || logfile_name[0] == '\0') + return; + + va_start(arg_ptr, fmt); + vsprintf(msg, fmt, arg_ptr); + va_end(arg_ptr); + + if ((fp = fopen(logfile_name, "a")) != NULL) { + fputs(log_header, fp); + fputs(msg, fp); + fclose(fp); + } +} + +void +idnLogPrintf(int level, char *fmt, ...) { + va_list arg_ptr; + FILE *fp; + char msg[512]; + + if (level > log_level || logfile_name[0] == '\0') + return; + + va_start(arg_ptr, fmt); + vsprintf(msg, fmt, arg_ptr); + va_end(arg_ptr); + + if ((fp = fopen(logfile_name, "a")) != NULL) { + fputs(log_header, fp); + fputs(msg, fp); + fclose(fp); + } +} + +static void +log_proc(int level, const char *msg) { + FILE *fp; + + if (log_level < 0 || logfile_name[0] == '\0') + return; + + if ((fp = fopen(logfile_name, "a")) != NULL) { + fputs(msg, fp); + fclose(fp); + } +} + +void +idnLogInit(const char *title) { + log_level = idnGetLogLevel(); + /* If log file is not stored in the registry, don't do logging. */ + if (idnGetLogFile(logfile_name, sizeof(logfile_name)) == FALSE) { + log_level = -1; + } + sprintf(log_header, "%08x %-.16s: ", getpid(), title); + idn_log_setproc(log_proc); + idn_log_setlevel(log_level < 0 ? 0 : log_level); +} + +void +idnLogReset(void) { + idn_log_setproc(log_proc); +} + +void +idnLogFinish(void) { + idn_log_setproc(NULL); + /* idn_log_setlevel(0); */ +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/common/wrapcommon.h b/contrib/idn/idnkit-1.0-src/wsock/common/wrapcommon.h new file mode 100644 index 0000000000..c186a331ef --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/common/wrapcommon.h @@ -0,0 +1,109 @@ +/* + * wrapcommon.h + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef _WRAPCOMMON_H +#define _WRAPCOMMON_H + +#include +#include +#include + +#define WRAPPER_EXPORT extern __declspec(dllexport) + +extern void idnPrintf(char *fmt, ...); +extern void idnLogPrintf(int level, char *fmt, ...); +extern void idnLogInit(const char *title); +extern void idnLogReset(void); +extern void idnLogFinish(void); + +extern char *dumpAddr(const char FAR *addr, int len, char *buff, size_t size); +extern char *dumpHost(const struct hostent FAR *hp, char *buff, size_t size); +extern char *dumpName(const char *name, char *buff, size_t size); + +extern int idnEncodeWhere(void); + +#define IDN_ENCODE_ALWAYS 0 +#define IDN_ENCODE_CHECK 1 +#define IDN_ENCODE_ONLY11 2 +#define IDN_ENCODE_ONLY20 3 + +extern BOOL idnGetPrgEncoding(char *enc, size_t len); +extern BOOL idnGetLogFile(char *file, size_t len); + +extern int idnGetLogLevel(void); /* 0 : fatal */ + /* 1 : error */ + /* 2 : warning */ + /* 3 : info */ + /* 4 : trace */ + /* 5 : dump */ +extern int idnGetInstallDir(char *dir, size_t len); + +extern idn_resconf_t idnConvInit(void); +extern void idnConvDone(idn_resconf_t ctx); + +extern BOOL idnWinsockVersion(const char *version); +extern HINSTANCE idnWinsockHandle(void); +extern idn_resconf_t idnGetContext(void); + +/* + * Converting Request/Response + */ + +extern BOOL idnConvReq(idn_resconf_t ctx, const char FAR *from, + char FAR *to, size_t tolen); +extern BOOL idnConvRsp(idn_resconf_t ctx, const char FAR *from, + char FAR *to, size_t tolen); + +/* + * Hook for Asynchronouse Query + */ + +extern void idnHookInit(void); +extern void idnHookDone(void); +extern BOOL idnHook(HWND hWnd, u_int wMsg, char FAR *buf, idn_resconf_t ctx); + +#endif /* _WRAPCOMMON_H */ diff --git a/contrib/idn/idnkit-1.0-src/wsock/config/idnconf.tcl b/contrib/idn/idnkit-1.0-src/wsock/config/idnconf.tcl new file mode 100644 index 0000000000..a140ed20aa --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/config/idnconf.tcl @@ -0,0 +1,1123 @@ +# $Id: idnconf.tcl,v 1.1 2003/06/04 00:27:42 marka Exp $ +# +# idnconf.tcl - configure idn wrapper +# + +############################################################################# +# Copyright (c) 2000,2002 Japan Network Information Center. +# All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +############################################################################# + +global configFile configBack +global registryKey registryEnc registryDef +global filesCpy filesRen filesDel + +# idnkit version +set version "1.0" + +set configFile "idnconf.lst" ;# list of wrapped program +set configBack "idnconf.bak" ;# backup of previous data + +set serverKey "HKEY_LOCAL_MACHINE\\Software\\JPNIC\\IDN" +set serverLogLevel LogLevel +set serverLogLevelDef -1 +set serverLogLevelNone -1 +set serverLogFile LogFile +set serverLogFileDef {C:\idn_wrapper.log} +set serverConfFile ConfFile + +set perprogKey "HKEY_LOCAL_MACHINE\\Software\\JPNIC\\IDN\\PerProg\\" +set perprogEnc Encoding +set perprogDef Default + +set logFileNameDef idn_wrapper.log +set confFileNameDef idn.conf + +set filesCpy11 { "wsock32.dll" } +set filesCpy20 { "wsock32.dll" "ws2_32.dll" } +set filesDel11 { "wsock32.dll" } +set filesDel20 { "wsock32.dll" "ws2_32.dll" } + +set local_dll 0 + +######################################################################## +# +# OS version check +# + +proc get_os_version {} { + global os_version tcl_platform + + if {[llength [info globals os_version]] > 0} { + return $os_version + } + + switch -- $tcl_platform(os) { + "Windows 95" { + switch -- $tcl_platform(osVersion) { + 4.0 { + set os_version {Windows 95} + } + 4.10 { + set os_version {Windows 98} + } + 4.90 { + set os_version {Windows Me} + } + } + } + "Windows NT" { + switch -- $tcl_platform(osVersion) { + 3.51 - + 4.0 { + set os_version {Windows NT} + } + 5.0 { + set os_version {Windows 2000} + } + default { + # XP or .NET + set os_version {Windows XP} + } + } + } + "Win32s" { + error "idn wrapper does not support Windows 3.1" + } + default { + set os_version "Unknown" + } + } + set os_version +} + +proc support_dll_redirection {} { + global dll_redirection + + if {[llength [info globals dll_redirection]] > 0} { + return $dll_redirection + } + + switch -- [get_os_version] { + {Windows 95} - + {Windows NT} { + # cannot force local DLL reference by .local file. + set dll_redirection 0 + } + default { + set dll_redirection 1 + } + } + set dll_redirection +} + +######################################################################## +# +# handling pathname +# + +proc getExeName { prg } { + set elem [file split $prg] + set leng [expr {[llength $elem] - 1}] + set name [lindex $elem $leng] + set exe [file rootname $name] + return $exe +} + +proc getDirName { prg } { + file dirname $prg +} + +proc getSystemDir {} { + global env + switch -- [get_os_version] { + "Windows 95" - + "Windows 98" - + "Windows Me" { + set sysDir $env(windir)/system + } + default { + set sysDir $env(SystemRoot)/system32 + } + } + return $sysDir +} + +######################################################################## +# +# loadList / saveList +# +# loadList - load list of wrapped executables from $configFile +# saveList - save list of wrapped executables into $configFile +# + +proc loadList {} { + + global configFile configBack + + if { [file exists $configFile] } { + file copy -force $configFile $configBack + } + + set aList {} + set fd [open $configFile {CREAT RDONLY}] + while { ! [eof $fd]} { + set line [gets $fd] + if { [string length $line] > 0} { + lappend aList "$line" + } + } + close $fd + return $aList +} + +proc saveList { aList } { + global configFile + file delete -force $configFile + set fd [open $configFile {CREAT WRONLY}] + foreach e $aList { + puts $fd $e + } + close $fd +} + +######################################################################## +# +# putList / getList - set/get list to/from listbox +# + +proc putList { lb aList } { + foreach e $aList { + $lb insert end $e + } +} + +proc getList { lb } { + $lb get 0 end +} + +######################################################################## +# +# checkList / appendList / deleteList - check / append / delete program from/to listbox +# + +proc checkList { lb prg } { + set cnt 0 + set lst [getList $lb] + + foreach n $lst { + if { [string compare $prg $n] == 0 } { + incr cnt + } + } + return $cnt +} + +proc appendList { lb prg } { + + if { [checkList $lb $prg] == 0 } { + $lb insert end $prg + } +} + +proc deleteList { lb prg } { + set cnt 0 + set lst [getList $lb] + + foreach n $lst { + if { [string compare $n $prg] == 0 } { + $lb delete $cnt + } + incr cnt + } +} + +######################################################################## +# +# registry operations +# + +proc regGetEncode { prg } { + + global perprogKey perprogEnc perprogDef + + if { [string compare $prg "" ] == 0 } { + return $perprogDef + } + + if {![isWindows]} { + return $perprogDef + } + package require registry 1.0 + + set name [getExeName $prg] + set key $perprogKey$name + + if { [catch {set enc [registry get $key $perprogEnc]} err] } { + return $perprogDef + } + if { [string compare $enc ""] == 0 } { + return $perprogDef + } + return $enc +} + +proc regSetEncode { prg enc } { + + global perprogKey perprogEnc perprogDef + + if {![isWindows]} { + return 1 + } + + package require registry 1.0 + + set name [getExeName $prg] + set key $perprogKey$name + + if { [string compare $enc $perprogDef] == 0 } { + set enc "" + } + if { [catch {registry set $key $perprogEnc $enc sz} ] } { + return 2 + } + return 0 +} + +proc regGetLogLevel {} { + global serverKey serverLogLevel serverLogLevelDef + regGetValue $serverKey $serverLogLevel $serverLogLevelDef +} + +proc regSetLogLevel {level} { + global serverKey serverLogLevel + regSetValue $serverKey $serverLogLevel $level dword +} + +proc regGetLogFile {} { + global serverKey serverLogFile serverLogFileDef + set file [regGetValue $serverKey $serverLogFile $serverLogFileDef] + if {[catch {file attributes $file -longname} lfile]} { + # Maybe $file doesn't exist (yet). Get the longname of + # directory portion. + set dir [file dirname $file] + if {[catch {file attributes $dir -longname} ldir]} { + set ldir $dir + } + set lfile [file join $ldir [file tail $file]] + } + file nativename $lfile +} + +proc regSetLogFile {file} { + global serverKey serverLogFile + regSetValue $serverKey $serverLogFile [file nativename $file] +} + +proc regGetConfFile {} { + global serverKey serverConfFile + set file [regGetValue $serverKey $serverConfFile {}] + if {[string compare $file {}] == 0} { + return {} + } + if {[catch {file attributes $file -longname} lfile]} { + # Maybe $file doesn't exist (yet). Get the longname of + # directory portion. + set dir [file dirname $file] + if {[catch {file attributes $dir -longname} ldir]} { + set ldir $dir + } + set lfile [file join $ldir [file tail $file]] + } + file nativename $lfile +} + +proc regSetConfFile {file} { + global serverKey serverConfFile + regSetValue $serverKey $serverConfFile [file nativename $file] +} + +proc regGetWhere {} { + global serverKey + regGetValue $serverKey Where 0 +} + +proc regSetWhere {where} { + global serverKey + regSetValue $serverKey Where $where dword +} + +proc regGetValue {key name default} { + if {![isWindows]} { + puts "--regGetValue $key $name" + return $default + } + package require registry 1.0 + + if {[catch {registry get $key $name} value]} { + return $default + } + if {[string compare $value {}] == 0} { + return $default + } + return $value +} + +proc regSetValue {key name value {type sz}} { + if {![isWindows]} { + puts "--regSetValue $key $name $value" + return 1 + } + + package require registry 1.0 + + if {[catch {registry set $key $name $value $type}]} { + return 2 + } + return 0 +} + +######################################################################## +# +# install / uninstall DLL s +# + +proc fileInstall { prg } { + + global env + global filesCpy11 filesCpy20 + + if {![isWindows]} { + return 1 + } + + switch -- [get_os_version] { + "Windows 95" - + "Windows 98" - + "Windows Me" { + set winDir $env(windir) + set sysDir $winDir/system + set filesCpy $filesCpy11 + } + default { + set winDir $env(SystemRoot) + set sysDir $winDir/system32 + set filesCpy $filesCpy20 + } + } + + set toDir [getDirName $prg ] + + foreach n $filesCpy { + file copy -force $n $toDir + } + return 0 +} + +proc fileRemove { prg } { + + global filesDel11 filesDel20 + + if {![isWindows]} { + return 1 + } + + switch -- [get_os_version] { + "Windows 95" { + set filesDel $filesDel11 + } + "Windows 98" - + "Windows Me" { + set filesDel $filesDel20 + } + default { + set filesDel $filesDel20 + } + } + + set fromDir [getDirName $prg ] + + foreach n $filesDel { + file delete -force $fromDir/$n + } + return 0 +} + +######################################################################## +# +# Wrap/Unwrap program +# + +proc execWrap { pw lb dlg prg enc } { + + set prgName [$prg get] + set encName [$enc get] + + # Make sure the program name is not empty + if {[string compare $prgName {}] == 0} { + confErrorDialog $dlg "Program must be specified.\nClick \"Browse..\" button for browsing." + return + } + + # It is dangerous to wrap programs in the system directory. + set prgdir [file nativename [getDirName $prgName]] + set sysdir [file nativename [getSystemDir]] + if {[string compare -nocase $prgdir $sysdir] == 0} { + tk_messageBox -icon error -type ok -title "Directory Error" \ + -parent $dlg \ + -message "Cannot wrap applications in the system directory.\nPlease copy the EXE file to elsewhere and wrap the copied one." + destroy $dlg + return 1 + } + + # Okay, copy the wrapper DLLs. + if { [fileInstall $prgName] } { + tk_messageBox -icon warning -type ok \ + -title "Warning" \ + -message "Cannot install DLLs" \ + -parent $dlg + destroy $dlg + return 1 + } + if { [regSetEncode $prgName $encName] } { + tk_messageBox -icon warning -type ok \ + -title "Warning" \ + -message "Cannot set encoding" \ + -parent $dlg + fileRemove $prgName + destroy $dlg + return 2 + } + + # if local flag is on, create $prgName.local. + global local_dll + if {$local_dll} { + create_dot_local $prgName $dlg + } else { + remove_dot_local $prgName $dlg + } + + if { [checkList $lb $prgName] == 0 } { + appendList $lb $prgName + } + saveList [getList $lb] + destroy $dlg +} + +proc execUnwrap { pw lb dlg prg } { + + set prgName [$prg get] + + if {[support_dll_redirection] && [file exists $prgName.local]} { + set ans [tk_messageBox -icon question -type yesno \ + -title "Confirmation" \ + -message "Also remove $prgName.local file?" \ + -parent $dlg] + if {[string compare $ans yes] == 0} { + remove_dot_local $prgName $dlg + } + } + + if { [checkList $lb $prgName] == 1 } { + fileRemove $prgName + } + deleteList $lb $prgName + saveList [getList $lb] + destroy $dlg +} + +proc create_dot_local {path {parent .}} { + set dotlocal $path.local + if {[file exists $dotlocal]} { + return 0 + } + if {[catch {open $dotlocal w} fh]} { + tk_messageBox -icon warning -type ok -title "Warning" \ + -message "Cannot create $dotlocal" -parent $parent + return -1 + } + close $fh + return 0 +} + +proc remove_dot_local {path {parent .}} { + set dotlocal $path.local + if {[file exists $dotlocal] && [catch {file delete $dotlocal}]} { + tk_messageBox -icon warning -type ok -title "Warning" \ + -message "Cannot remove $dotlocal" -parent $parent + return -1 + } + return 0 +} + +######################################################################## +# +# dialog for Wrap / Unwrap +# + +proc syncEncode { v i op } { + global prgName encName + set enc [regGetEncode $prgName] + if { [string compare $encName $enc] != 0 } { + set encName $enc + } +} + +proc confBrowse { p ePrg eEnc } { + + set types { + { "Executable" .exe } + } + + set file [tk_getOpenFile -filetypes $types -parent $p ] + + if { [string compare $file ""] == 0 } { + return + } + set enc [regGetEncode $file] + $ePrg delete 0 end + $ePrg insert 0 $file +} + +proc confWrap { pw lb } { + + global prgName encName local_dll + + set idx [$lb curselection] + if { [llength $idx] == 1 } { + set prg [$lb get $idx] + set local_dll [file exists $prg.local] + } else { + set prg "" + } + + set top .wrap + toplevel $top + grab $top + wm title $top "idn wrapper - Wrap Executable" + + frame $top.f1 -bd 1 -relief raised + frame $top.f2 -bd 1 -relief raised + pack $top.f1 -side top -fill x -expand on + pack $top.f2 -side top -fill x -expand on + + frame $top.f1.f + pack $top.f1.f -fill both -expand on -padx 4 -pady 4 + + set w $top.f1.f + label $w.prgtitle -text "Program:" + label $w.enctitle -text "Encoding:" + + entry $w.prgname -relief sunken -width 56 -textvariable prgName + entry $w.encname -relief sunken -width 8 -textvariable encName + set w_prgname $w.prgname + set w_encname $w.encname + button $w.browse -text "Browse.." \ + -command [list confBrowse $w $w_prgname $w_encname] + + frame $w.rbf + radiobutton $w.rbf.encdef -text "Default" -variable encName \ + -value "Default" + radiobutton $w.rbf.encutf -text "UTF-8" -variable encName \ + -value "UTF-8" + pack $w.rbf.encdef $w.rbf.encutf -side left -padx 4 + + grid $w.prgtitle -row 0 -column 0 -sticky e + grid $w.enctitle -row 1 -column 0 -sticky e + grid $w.prgname -row 0 -column 1 -sticky we -pady 4 -padx 2 -columnspan 2 + grid $w.browse -row 0 -column 3 -sticky w -pady 4 -padx 4 + grid $w.encname -row 1 -column 1 -sticky we -pady 4 -padx 2 + grid $w.rbf -row 1 -column 2 -sticky w -padx 2 + if {[support_dll_redirection]} { + checkbutton $w.local -text "Force local DLL reference" \ + -variable local_dll + grid $w.local -row 2 -column 1 -sticky w -padx 4 -pady 4 + } + grid columnconfig $w 1 -weight 1 -minsize 20 + grid columnconfig $w 2 -weight 2 -minsize 20 + + trace variable prgName w syncEncode + + $w.prgname delete 0 end + $w.prgname insert 0 $prg + + focus $w.prgname + + set w $top.f2 + button $w.wrap -text "Wrap" \ + -command [list execWrap $pw $lb $top $w_prgname $w_encname] + button $w.cancel -text "Cancel" \ + -command [list destroy $top] + pack $w.cancel -side right -fill y -padx 12 -pady 4 + pack $w.wrap -side right -fill y -padx 12 -pady 4 + + tkwait window $top +} + +proc confUnwrap { pw lb } { + + set idx [$lb curselection] + if { [llength $idx] != 1 } { + tk_messageBox -icon warning -type ok \ + -title "Warning" \ + -message "first, select unwrapping executable" \ + -parent $pw + return 0 + } + set prg [$lb get $idx] + if { [string length $prg] == 0 } { + tk_messageBox -icon warning -type ok \ + -title "Warning" \ + -message "first, select unwrapping executable" \ + -parent $pw + return 0 + } + + set top .unwrap + toplevel $top + grab $top + wm title $top "idn wrapper - Unwrap Executable" + + frame $top.f1 -bd 1 -relief raised + frame $top.f2 -bd 1 -relief raised + pack $top.f2 -side bottom -fill x + pack $top.f1 -side bottom -fill x -expand on + + frame $top.f1.f + pack $top.f1.f -padx 4 -pady 4 -fill both -expand on + set w $top.f1.f + label $w.prgtitle -text "Program:" + entry $w.prgname -relief sunken -width 56 -textvariable prgName + $w.prgname delete 0 end + $w.prgname insert 0 $prg + + set w_prgname $w.prgname + + grid $w.prgtitle -row 0 -column 0 -sticky w + grid $w.prgname -row 0 -column 1 -sticky we -pady 4 + grid columnconfig $w 1 -weight 1 -minsize 20 + + set w $top.f2 + button $w.wrap -text "Unwrap" \ + -command [list execUnwrap $pw $lb $top $w_prgname] + button $w.cancel -text "Cancel" \ + -command [list destroy $top] + + pack $w.cancel -side right -padx 12 -pady 6 + pack $w.wrap -side right -padx 12 -pady 6 + + focus $w.wrap + tkwait window $top +} + +proc unwrapAll {pw lb} { + set ans [tk_messageBox -type yesno -default no -icon question \ + -parent $pw -title {idn wrapper Configuration} \ + -message {Really unwrap all programs?}] + if {[string compare $ans yes] != 0} { + return + } + + foreach prog [$lb get 0 end] { + fileRemove $prog + } + + if {[support_dll_redirection]} { + set delete_type yes + foreach prog [$lb get 0 end] { + if {![file exists $prog.local]} continue + switch -- $delete_type { + yes - + no { + set delete_type [dotLocalDialog $prog $delete_type] + } + } + switch -- $delete_type { + yes - + yesall { + remove_dot_local $prog $pw + } + } + } + } + + $lb delete 0 end + saveList {} +} + +proc rewrapAll {pw lb} { + set ans [tk_messageBox -type yesno -default yes -icon question \ + -parent $pw -title {idn wrapper Configuration} \ + -message {Really rewrap all programs?}] + if {[string compare $ans yes] != 0} { + return + } + foreach prog [$lb get 0 end] { + fileInstall $prog + } +} + +proc confLog {pw} { + global _logLevel _logFile + + set top .log + catch {destroy $top} + toplevel $top + wm title $top "idn wrapper - Log Configuration" + # wm transient $top $pw + + set _logLevel [regGetLogLevel] + set _logFile [regGetLogFile] + + frame $top.f1 -bd 1 -relief raised + frame $top.f2 -bd 1 -relief raised + pack $top.f2 -side bottom -fill x + pack $top.f1 -side top -fill both -expand on + + set w $top.f1 + label $w.lv_l -text "Log Level:" + frame $w.lv_v + global serverLogLevelNone + set i 0 + foreach {lvl text} [list $serverLogLevelNone None \ + 0 Fatal 1 Error 2 Warning 3 Info 4 Trace] { + radiobutton $w.lv_v.btn$i -text $text -value $lvl -variable _logLevel + pack $w.lv_v.btn$i -side left -padx 3 + incr i + } + label $w.ld_l -text "Log File:" + frame $w.ld_v + entry $w.ld_v.e -width 40 -textvariable _logFile + focus $w.ld_v.e + button $w.ld_v.b -text "Browse.." -command [list selectLog $top $w.ld_v.e] + pack $w.ld_v.b -side right -fill y -padx 6 + pack $w.ld_v.e -side left -fill both -expand yes + #label $w.lo_l -text "Log Operation:" + frame $w.lo_v + button $w.lo_v.show -text "View" -command [list showLog $top] + button $w.lo_v.delete -text "Delete" -command [list deleteLog $top] + pack $w.lo_v.show $w.lo_v.delete -side left -padx 4 + + grid $w.lv_l -row 0 -column 0 -sticky e -padx 4 + grid $w.ld_l -row 1 -column 0 -sticky e -padx 4 + #grid $w.lo_l -row 2 -column 0 -sticky e -padx 4 + grid $w.lv_v -row 0 -column 1 -sticky w -padx 4 -pady 4 + grid $w.ld_v -row 1 -column 1 -sticky we -padx 4 -pady 4 + grid $w.lo_v -row 2 -column 1 -sticky w -padx 4 -pady 4 + + set w $top.f2 + button $w.ok -text "OK" -command [list configureLog $top] + button $w.cancel -text "Cancel" -command [list destroy $top] + pack $w.cancel -side right -padx 12 -pady 6 + pack $w.ok -side right -padx 12 -pady 6 +} + +proc configureLog {top} { + global _logLevel _logFile + + if {$_logLevel != [regGetLogLevel] || + [string compare $_logFile [regGetLogFile]] != 0} { + set dir [file dirname $_logFile] + if {[string compare $dir {}]} { + if {![file exists $dir]} { + confErrorDialog $top "Directory $dir doesn't exist" + return + } elseif {![file isdirectory $dir]} { + confErrorDialog $top "$dir is not a directory" + return + } + } + regSetLogLevel $_logLevel + regSetLogFile $_logFile + tk_messageBox -type ok -default ok -icon info -parent $top \ + -title "idn wrapper Configuration" \ + -message "Changing log level or file does not affect already running processes." + } + destroy $top +} + +proc selectLog {top e} { + global logFileNameDef + set file [tk_getSaveFile -title {idn wrapper Logfile Selection} \ + -defaultextension .log \ + -filetypes {{{Log Files} .log} {{All Files} *}} \ + -initialfile $logFileNameDef \ + -parent $top] + if {[string compare $file {}]} { + $e delete 0 end + $e insert insert $file + } +} + +proc showLog {top} { + global _logFile + if {[catch {exec notepad.exe $_logFile &} r]} { + confErrorDialog $top "Cannot execute notepad" + } +} + +proc deleteLog {top} { + global _logFile + set ans [tk_messageBox -type yesno -default no -icon question \ + -parent $top -title "idn wrapper Configuration" \ + -message "Really delete $_logFile?"] + if {[string compare $ans yes] == 0} { + file delete $_logFile + } +} + +######################################################################## +# +# dialog for .local deletion +# + +proc dotLocalDialog {path {default yes}} { + set parent . + set dlg .dotlocaldlg + catch {destroy $dlg} + toplevel $dlg + + wm iconname $dlg Dialog + wm title $dlg Confirmation + wm transient $dlg $parent + wm protocol $dlg WM_DELETE_WINDOW {} + + frame $dlg.f1 -bd 1 -relief raised + frame $dlg.f2 -bd 1 -relief raised + pack $dlg.f1 -side top -fill x -expand on -ipadx 2m -ipady 4m + pack $dlg.f2 -side top -fill x -ipadx 2m + + label $dlg.f1.bm -bitmap question -bd 0 + label $dlg.f1.msg -text "Remove $path.local?" -wraplength 10c + pack $dlg.f1.bm -side left -padx 3m -pady 2m + pack $dlg.f1.msg -side left -padx 2m -pady 2m + + global dotlocal_selection + foreach {btn lbl} {yes Yes no No yesall {Yes to All} noall {No to All}} { + set bw $dlg.f2.btn$btn + button $bw -text $lbl -default normal \ + -command [list set dotlocal_selection $btn] + if {[string compare $default $btn] == 0} { + $bw configure -default active + focus $bw + } + bind $bw {%W flash; %W invoke} + pack $bw -side left -padx 3m -pady 2m + } + + grab $dlg + ::tk::PlaceWindow $dlg widget $parent + + vwait dotlocal_selection + destroy $dlg + return $dotlocal_selection +} + +######################################################################## +# +# dialog for advanced configuration +# + +proc advancedConf {pw} { + set top .adv + catch {destroy $top} + toplevel $top + wm title $top "idn wrapper - Advanced Configuration" + + global _mdnOperation _confFile + set _mdnOperation [regGetWhere] + set _confFile [regGetConfFile] + + foreach f {f1 f2 f3} { + frame $top.$f -bd 1 -relief raised + pack $top.$f -side top -fill x + } + + set f $top.f1 + label $f.lbl -text {IDN Wrapping Mode} + set w $f.f + frame $w + foreach {rb val txt} [list \ + rb1 0 {Wrap both WINSOCK 1.1 and WINSOCK 2.0} \ + rb2 2 {Wrap only WINSOCK 1.1} \ + rb3 3 {Wrap only WINSOCK 2.0} \ + rb4 1 "Wrap only WINSOCK2.0 if it exists.\nOtherwise wrap only WINSOCK1.1"] { + radiobutton $w.$rb -text $txt -variable _mdnOperation -value $val \ + -anchor w -justify left + pack $w.$rb -side top -fill x -pady 1 + } + pack $f.lbl -side top -fill x -pady 4 + pack $w -side top -fill both -padx 20 -pady 10 + + set f $top.f2 + label $f.lbl -text {IDN Configuration} + pack $f.lbl -side top -fill x -pady 6 + + set w $f.f + frame $w + pack $w -side top -fill both -padx 10 -pady 6 + label $w.l1 -text {Config File:} + #label $w.l2 -text {Config Operation:} + entry $w.e -width 40 -textvariable _confFile + focus $w.e + button $w.br -text "Browse.." -command [list selectConf $top $w.e] + button $w.b -text Edit -command [list editConf $top] + grid $w.l1 -row 0 -column 0 -sticky e -padx 4 + #grid $w.l2 -row 1 -column 0 -sticky e -padx 4 + grid $w.e -row 0 -column 1 -sticky we -padx 4 -pady 4 + grid $w.b -row 1 -column 1 -sticky w -padx 4 -pady 4 + grid $w.br -row 0 -column 2 -sticky w -padx 4 -pady 4 + + set w $top.f3 + button $w.ok -text "OK" -command [list advConf $top] + button $w.cancel -text "Cancel" -command [list destroy $top] + pack $w.cancel -side right -padx 12 -pady 8 + pack $w.ok -side right -padx 12 -pady 8 +} + +proc editConf {top} { + global _confFile + if {[catch {exec notepad.exe $_confFile &} r]} { + confErrorDialog $top "Cannot execute notepad" + } +} + +proc selectConf {top e} { + global confFileNameDef + set file [tk_getOpenFile -title {idn wrapper Config File Selection} \ + -defaultextension .conf \ + -filetypes {{{Config Files} .conf} {{All Files} *}} \ + -initialfile $confFileNameDef \ + -parent $top] + if {[string compare $file {}]} { + $e delete 0 end + $e insert insert $file + } +} + +proc advConf {top} { + global _mdnOperation _confFile + regSetWhere $_mdnOperation + regSetConfFile $_confFile + destroy $top +} + +######################################################################## +# +# utility +# + +proc confErrorDialog {top message} { + tk_messageBox -default ok -icon error -parent $top -type ok \ + -title {idn wrapper Configuration Error} -message $message +} + +proc isWindows {} { + global tcl_platform + expr {[string compare $tcl_platform(platform) "windows"] == 0} +} + +######################################################################## +# +# config program start here +# + +wm title . "idn wrapper - Configuration" +wm iconname . "idn wrapper - Configuration" + + +label .title -bd 1 -relief raised -pady 5 \ + -text "idn wrapper Configuration Program version $version" + +frame .left -bd 1 -relief raised +frame .right -bd 1 -relief raised + +frame .lst +label .lst.title -text "Wrapped Programs" -pady 3 +listbox .lst.list -width 64 -height 16 -setgrid 1 \ + -xscrollcommand ".lst.xscroll set" \ + -yscrollcommand ".lst.yscroll set" +scrollbar .lst.yscroll -orient vertical -command ".lst.list yview" +scrollbar .lst.xscroll -orient horizontal -command ".lst.list xview" +grid .lst.title -row 0 -column 0 -columnspan 2 -sticky news +grid .lst.list -row 1 -column 0 -sticky news +grid .lst.xscroll -row 2 -column 0 -sticky news +grid .lst.yscroll -row 1 -column 1 -sticky news +grid rowconfig .lst 1 -weight 1 +grid columnconfig .lst 0 -weight 1 + +frame .btn +button .btn.wrap -text "Wrap.." -command [list confWrap . .lst.list] +button .btn.unwrap -text "Unwrap.." -command [list confUnwrap . .lst.list] +button .btn.unwrapall -text "Unwrap All" -command [list unwrapAll . .lst.list] +button .btn.rewrapall -text "Rewrap All" -command [list rewrapAll . .lst.list] +frame .btn.spacing1 -width 1 -height 12 -bd 0 +button .btn.log -text "Log.." -command [list confLog .] +frame .btn.spacing2 -width 1 -height 12 -bd 0 +button .btn.adv -text "Advanced.." -command [list advancedConf .] +button .btn.exit -text Exit -command exit +pack .btn.wrap -side top -fill x -pady 4 +pack .btn.unwrap -side top -fill x -pady 4 +pack .btn.unwrapall -side top -fill x -pady 4 +pack .btn.rewrapall -side top -fill x -pady 4 +pack .btn.spacing1 -side top +pack .btn.log -side top -fill x -pady 4 +pack .btn.spacing2 -side top +pack .btn.adv -side top -fill x -pady 4 +pack .btn.exit -side bottom -fill x -pady 4 + +pack .lst -in .left -padx 4 -pady 4 -fill both -expand on +pack .btn -in .right -padx 6 -pady 4 -fill both -expand on + +pack .title -side top -fill x +pack .right -side right -fill y +pack .left -side left -fill y -expand on + +# +# then set current list into listbox +# + +set theList [loadList] +#saveList $theList +putList .lst.list $theList + +# +######################################################################## diff --git a/contrib/idn/idnkit-1.0-src/wsock/config/make.wnt b/contrib/idn/idnkit-1.0-src/wsock/config/make.wnt new file mode 100644 index 0000000000..1099fbe477 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/config/make.wnt @@ -0,0 +1,58 @@ +# +# Makefile for building mDNS Wrapper Configuration Tool +# + +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +TARGETS = idnconf.exe + +all : $(TARGETS) + +idnconf.exe : idnconf.tcl + freewrap idnconf.tcl + +install : $(TARGETS) + copy idnconf.exe ..\bin + +clean : force + -del idnconf.exe + +force : diff --git a/contrib/idn/idnkit-1.0-src/wsock/make.wnt b/contrib/idn/idnkit-1.0-src/wsock/make.wnt new file mode 100644 index 0000000000..3c454327c5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/make.wnt @@ -0,0 +1,97 @@ +# +# Top Level Makefile for building WINSOCK idn wrapper +# + +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +all : force + cd common + $(MAKE) -f make.wnt all + cd .. + cd wsock11 + $(MAKE) -f make.wnt all + cd .. + cd wsock20 + $(MAKE) -f make.wnt all + cd .. + cd config + $(MAKE) -f make.wnt all + cd .. + +install : force + copy ..\win\iconv.dll bin + copy ..\lib\idnkit.dll bin + copy ..\lib\idnkitlite.dll bin + copy ..\map\jp.map bin + cd common + $(MAKE) -f make.wnt install + cd .. + cd wsock11 + $(MAKE) -f make.wnt install + cd .. + cd wsock20 + $(MAKE) -f make.wnt install + cd .. + cd config + $(MAKE) -f make.wnt install + cd .. + +setup : force + cd bin + iscc idn_wrapper.iss + cd .. + +clean : force + cd common + $(MAKE) -f make.wnt clean + cd .. + cd wsock11 + $(MAKE) -f make.wnt clean + cd .. + cd wsock20 + $(MAKE) -f make.wnt clean + cd .. + cd config + $(MAKE) -f make.wnt clean + cd .. + +force : + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/dlldef.h b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dlldef.h new file mode 100644 index 0000000000..569a264eae --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dlldef.h @@ -0,0 +1,86 @@ +/* + * dlldef.h + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef _DLLDEF_H +#define _DLLDEF_H + +#include "../common/wrapcommon.h" + +/* + * Execution Tracing + */ + +extern int procPid; + +#ifdef DEBUG +#define TRACE idnPrintf +#define FATAL idnPrintf +#else +#define TRACE +#define FATAL idnPrintf +#endif + +/* + * Stub functions for calling original version. + */ +extern int PASCAL +_org_gethostname(char FAR * name, int namelen); + +extern struct hostent FAR * PASCAL +_org_gethostbyname(const char FAR * name); + +extern struct hostent FAR * PASCAL +_org_gethostbyaddr(const char FAR * addr, int len, int type); + +extern HANDLE PASCAL +_org_WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR * name, + char FAR * buf, int buflen); +extern HANDLE PASCAL +_org_WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, + int len, int type, char FAR * buf, int buflen); + + +#endif /* _DLLDEF_H */ diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllfunc.c b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllfunc.c new file mode 100644 index 0000000000..4b709f61be --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllfunc.c @@ -0,0 +1,212 @@ +/* + * dllfunc.c - wrapper functions + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "dlldef.h" + +WRAPPER_EXPORT int PASCAL FAR +gethostname(char FAR * name, int namelen) { + int ret; + + TRACE("ENTER gethostname\n"); + ret = _org_gethostname(name, namelen); + TRACE("LEAVE gethostname %d <%-.100s>\n", ret, name); + + return (ret); +} + +WRAPPER_EXPORT struct hostent FAR * PASCAL FAR +gethostbyname(const char FAR * name) { + struct hostent FAR *ret; + char nbuff[256]; + char hbuff[256]; + BOOL stat; + idn_resconf_t encodeCtx; + + TRACE("ENTER gethostbyname <%-.100s>\n", + (name != NULL ? name : "NULL")); + + encodeCtx = idnGetContext(); + + if (encodeCtx == NULL) { + TRACE("gethostbyname: not encode here\n"); + ret = _org_gethostbyname(name); + } else if (name == NULL) { + TRACE("gethostbyname: name is NULL\n"); + ret = _org_gethostbyname(name); + } else { + stat = idnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)); + if (stat == FALSE) { + TRACE("idnConvReq failed\n"); + ret = NULL; + } else { + TRACE("Converted Name <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + ret = _org_gethostbyname(nbuff); + } + } + + if (ret != NULL && encodeCtx != NULL) { + TRACE("Resulting Name <%s>\n", + dumpName(ret->h_name, hbuff, sizeof(hbuff))); + stat = idnConvRsp(encodeCtx, ret->h_name, nbuff, + sizeof(nbuff)); + if (stat == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + } else { + TRACE("Converted Back <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(ret->h_name, nbuff); + } + } + + if (ret == NULL) { + TRACE("LEAVE gethostbyname NULL\n"); + } else { + TRACE("LEAVE gethostbyname <%s>\n", + dumpHost(ret, hbuff, sizeof(hbuff))); + } + return (ret); +} + +WRAPPER_EXPORT struct hostent FAR * PASCAL FAR +gethostbyaddr(const char FAR * addr, int len, int type) { + struct hostent FAR *ret; + char nbuff[256]; + char abuff[256]; + char hbuff[256]; + BOOL stat; + idn_resconf_t encodeCtx; + + TRACE("ENTER gethostbyaddr <%s>\n", + dumpAddr(addr, len, abuff, sizeof(abuff))); + + encodeCtx = idnGetContext(); + + ret = _org_gethostbyaddr(addr, len, type); + + if (ret != NULL && encodeCtx != NULL) { + TRACE("Resulting Name <%s>\n", + dumpName(ret->h_name, hbuff, sizeof(hbuff))); + stat = idnConvRsp(encodeCtx, ret->h_name, + nbuff, sizeof(nbuff)); + if (stat == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + } else { + TRACE("Converted Back <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(ret->h_name, nbuff); + } + } + + if (ret == NULL) { + TRACE("LEAVE gethostbyaddr NULL\n") ; + } else { + TRACE("LEAVE gethostbyaddr <%s>\n", + dumpHost(ret, hbuff, sizeof(hbuff))); + } + return (ret); +} + +WRAPPER_EXPORT HANDLE PASCAL FAR +WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, + const char FAR * name, char FAR * buf, int buflen) +{ + HANDLE ret; + char nbuff[256]; + char hbuff[256]; + idn_resconf_t encodeCtx; + + TRACE("ENTER WSAAsyncGetHostByName <%-.100s>\n", name); + + encodeCtx = idnGetContext(); + + if (encodeCtx == NULL || name == NULL) { + ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, name, + buf, buflen); + } else { + idnHook(hWnd, wMsg, buf, encodeCtx); + idnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)); + TRACE("Converted Name <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, nbuff, + buf, buflen); + } + + TRACE("LEAVE WSAAsyncGetHostByName HANDLE %08x\n", ret); + + return (ret); +} + +WRAPPER_EXPORT HANDLE PASCAL FAR +WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, + int len, int type, char FAR * buf, int buflen) +{ + HANDLE ret; + char abuff[256]; + idn_resconf_t encodeCtx; + + encodeCtx = idnGetContext(); + + if (encodeCtx != NULL) { + idnHook(hWnd, wMsg, buf, encodeCtx); + } + + TRACE("ENTER WSAAsyncGetHostByAddr <%s>\n", + dumpAddr(addr, len, abuff, sizeof(abuff))); + ret = _org_WSAAsyncGetHostByAddr(hWnd, wMsg, addr, len, type, + buf, buflen); + TRACE("LEAVE WSAAsyncGetHostByAddr HANDLE %08x\n", ret); + + return (ret); +} + + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllload.c b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllload.c new file mode 100644 index 0000000000..68c2a7e874 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllload.c @@ -0,0 +1,63 @@ +/* + * dllload.c - load original entries + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "dlldef.h" + +/* + * Manages original DLL + */ + +#define DLLHANDLE idnWinsockHandle() + +#include "dllstub.c" diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllmain.c b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllmain.c new file mode 100644 index 0000000000..177f722957 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllmain.c @@ -0,0 +1,96 @@ +/* + * dllmain.c - entry for DLL + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "dlldef.h" + +/* + * Control Variables + */ + +int procPid = 0; + +static char procExe[256]; + +/* + * DLL Entry + */ + +BOOL APIENTRY +DllMain(HMODULE hmod, DWORD reason, LPVOID *resv) { + switch (reason) { + + case DLL_PROCESS_ATTACH: + procPid = getpid(); + GetModuleFileName(NULL, procExe, 256); + + idnLogInit("ws11"); + idnHookInit(); + + TRACE("Attached to Process <%s>\n", procExe); + return (idnWinsockVersion("1.1")); + + case DLL_PROCESS_DETACH: + idnConvDone(idnGetContext()); + idnHookDone(); + TRACE("Detached from Process\n"); + idnLogFinish(); + break; + + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + } + + return (TRUE); +} + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllstub.c b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllstub.c new file mode 100644 index 0000000000..af8a2b6704 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/dllstub.c @@ -0,0 +1,1541 @@ +/* $Id: dllstub.c,v 1.1 2003/06/04 00:27:45 marka Exp $ */ + +SOCKET PASCAL +accept(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static SOCKET (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub accept() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "accept")) == NULL) { + FATAL("cannot find entry accept (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +bind(SOCKET a0, const struct sockaddr* a1, int a2) +{ + static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub bind() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "bind")) == NULL) { + FATAL("cannot find entry bind (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +closesocket(SOCKET a0) +{ + static int (PASCAL *fp)(SOCKET a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub closesocket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "closesocket")) == NULL) { + FATAL("cannot find entry closesocket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +connect(SOCKET a0, const struct sockaddr* a1, int a2) +{ + static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub connect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "connect")) == NULL) { + FATAL("cannot find entry connect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getpeername(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getpeername() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getpeername")) == NULL) { + FATAL("cannot find entry getpeername (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getsockname(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getsockname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getsockname")) == NULL) { + FATAL("cannot find entry getsockname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getsockopt(SOCKET a0, int a1, int a2, char* a3, int* a4) +{ + static int (PASCAL *fp)(SOCKET a0, int a1, int a2, char* a3, int* a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getsockopt() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getsockopt")) == NULL) { + FATAL("cannot find entry getsockopt (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +u_long PASCAL +htonl(u_long a0) +{ + static u_long (PASCAL *fp)(u_long a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub htonl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "htonl")) == NULL) { + FATAL("cannot find entry htonl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +u_short PASCAL +htons(u_short a0) +{ + static u_short (PASCAL *fp)(u_short a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub htons() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "htons")) == NULL) { + FATAL("cannot find entry htons (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +unsigned long PASCAL +inet_addr(const char* a0) +{ + static unsigned long (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub inet_addr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "inet_addr")) == NULL) { + FATAL("cannot find entry inet_addr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + char * PASCAL +inet_ntoa(struct in_addr a0) +{ + static char * (PASCAL *fp)(struct in_addr a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub inet_ntoa() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "inet_ntoa")) == NULL) { + FATAL("cannot find entry inet_ntoa (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +ioctlsocket(SOCKET a0, long a1, u_long * a2) +{ + static int (PASCAL *fp)(SOCKET a0, long a1, u_long * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ioctlsocket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ioctlsocket")) == NULL) { + FATAL("cannot find entry ioctlsocket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +listen(SOCKET a0, int a1) +{ + static int (PASCAL *fp)(SOCKET a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub listen() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "listen")) == NULL) { + FATAL("cannot find entry listen (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +u_long PASCAL +ntohl(u_long a0) +{ + static u_long (PASCAL *fp)(u_long a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ntohl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ntohl")) == NULL) { + FATAL("cannot find entry ntohl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +u_short PASCAL +ntohs(u_short a0) +{ + static u_short (PASCAL *fp)(u_short a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ntohs() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ntohs")) == NULL) { + FATAL("cannot find entry ntohs (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +recv(SOCKET a0, char* a1, int a2, int a3) +{ + static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub recv() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "recv")) == NULL) { + FATAL("cannot find entry recv (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +recvfrom(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5) +{ + static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub recvfrom() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "recvfrom")) == NULL) { + FATAL("cannot find entry recvfrom (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +select(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4) +{ + static int (PASCAL *fp)(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub select() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "select")) == NULL) { + FATAL("cannot find entry select (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +send(SOCKET a0, const char* a1, int a2, int a3) +{ + static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub send() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "send")) == NULL) { + FATAL("cannot find entry send (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +sendto(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5) +{ + static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub sendto() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "sendto")) == NULL) { + FATAL("cannot find entry sendto (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +setsockopt(SOCKET a0, int a1, int a2, const char* a3, int a4) +{ + static int (PASCAL *fp)(SOCKET a0, int a1, int a2, const char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub setsockopt() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "setsockopt")) == NULL) { + FATAL("cannot find entry setsockopt (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +shutdown(SOCKET a0, int a1) +{ + static int (PASCAL *fp)(SOCKET a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub shutdown() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "shutdown")) == NULL) { + FATAL("cannot find entry shutdown (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +SOCKET PASCAL +socket(int a0, int a1, int a2) +{ + static SOCKET (PASCAL *fp)(int a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub socket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "socket")) == NULL) { + FATAL("cannot find entry socket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +MigrateWinsockConfiguration(int a0, int a1, int a2) +{ + static int (PASCAL *fp)(int a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub MigrateWinsockConfiguration() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "MigrateWinsockConfiguration")) == NULL) { + FATAL("cannot find entry MigrateWinsockConfiguration (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + + struct hostent * PASCAL +_org_gethostbyaddr(const char* a0, int a1, int a2) +{ + static struct hostent * (PASCAL *fp)(const char* a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostbyaddr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostbyaddr")) == NULL) { + FATAL("cannot find entry gethostbyaddr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + + struct hostent * PASCAL +_org_gethostbyname(const char* a0) +{ + static struct hostent * (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostbyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostbyname")) == NULL) { + FATAL("cannot find entry gethostbyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct protoent * PASCAL +getprotobyname(const char* a0) +{ + static struct protoent * (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getprotobyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getprotobyname")) == NULL) { + FATAL("cannot find entry getprotobyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct protoent * PASCAL +getprotobynumber(int a0) +{ + static struct protoent * (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getprotobynumber() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getprotobynumber")) == NULL) { + FATAL("cannot find entry getprotobynumber (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct servent * PASCAL +getservbyname(const char* a0, const char* a1) +{ + static struct servent * (PASCAL *fp)(const char* a0, const char* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getservbyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getservbyname")) == NULL) { + FATAL("cannot find entry getservbyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + + struct servent * PASCAL +getservbyport(int a0, const char* a1) +{ + static struct servent * (PASCAL *fp)(int a0, const char* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getservbyport() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getservbyport")) == NULL) { + FATAL("cannot find entry getservbyport (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +_org_gethostname(char* a0, int a1) +{ + static int (PASCAL *fp)(char* a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostname")) == NULL) { + FATAL("cannot find entry gethostname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WSAAsyncSelect(SOCKET a0, HWND a1, u_int a2, long a3) +{ + static int (PASCAL *fp)(SOCKET a0, HWND a1, u_int a2, long a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncSelect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncSelect")) == NULL) { + FATAL("cannot find entry WSAAsyncSelect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +HANDLE PASCAL +_org_WSAAsyncGetHostByAddr(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSAAsyncGetHostByAddr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByAddr")) == NULL) { + FATAL("cannot find entry WSAAsyncGetHostByAddr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +HANDLE PASCAL +_org_WSAAsyncGetHostByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSAAsyncGetHostByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetHostByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetProtoByNumber(HWND a0, u_int a1, int a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetProtoByNumber() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByNumber")) == NULL) { + FATAL("cannot find entry WSAAsyncGetProtoByNumber (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetProtoByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetProtoByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetProtoByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetServByPort(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetServByPort() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByPort")) == NULL) { + FATAL("cannot find entry WSAAsyncGetServByPort (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +HANDLE PASCAL +WSAAsyncGetServByName(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetServByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetServByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +WSACancelAsyncRequest(HANDLE a0) +{ + static int (PASCAL *fp)(HANDLE a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACancelAsyncRequest() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACancelAsyncRequest")) == NULL) { + FATAL("cannot find entry WSACancelAsyncRequest (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +FARPROC PASCAL +WSASetBlockingHook(FARPROC a0) +{ + static FARPROC (PASCAL *fp)(FARPROC a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetBlockingHook() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetBlockingHook")) == NULL) { + FATAL("cannot find entry WSASetBlockingHook (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +WSAUnhookBlockingHook(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAUnhookBlockingHook() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAUnhookBlockingHook")) == NULL) { + FATAL("cannot find entry WSAUnhookBlockingHook (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSAGetLastError(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetLastError() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetLastError")) == NULL) { + FATAL("cannot find entry WSAGetLastError (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +void PASCAL +WSASetLastError(int a0) +{ + static void (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetLastError() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetLastError")) == NULL) { + FATAL("cannot find entry WSASetLastError (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + (*fp)(a0); +} + +int PASCAL +WSACancelBlockingCall(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACancelBlockingCall() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACancelBlockingCall")) == NULL) { + FATAL("cannot find entry WSACancelBlockingCall (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +BOOL PASCAL +WSAIsBlocking(void) +{ + static BOOL (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAIsBlocking() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAIsBlocking")) == NULL) { + FATAL("cannot find entry WSAIsBlocking (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSAStartup(WORD a0, LPWSADATA a1) +{ + static int (PASCAL *fp)(WORD a0, LPWSADATA a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAStartup() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAStartup")) == NULL) { + FATAL("cannot find entry WSAStartup (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WSACleanup(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACleanup() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACleanup")) == NULL) { + FATAL("cannot find entry WSACleanup (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +__WSAFDIsSet(SOCKET a0, fd_set* a1) +{ + static int (PASCAL *fp)(SOCKET a0, fd_set* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub __WSAFDIsSet() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "__WSAFDIsSet")) == NULL) { + FATAL("cannot find entry __WSAFDIsSet (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WEP(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WEP() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WEP")) == NULL) { + FATAL("cannot find entry WEP (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSApSetPostRoutine(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSApSetPostRoutine() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSApSetPostRoutine")) == NULL) { + FATAL("cannot find entry WSApSetPostRoutine (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +WsControl(int a0, int a1, int a2, int a3, int a4, int a5) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WsControl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WsControl")) == NULL) { + FATAL("cannot find entry WsControl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +closesockinfo(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub closesockinfo() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "closesockinfo")) == NULL) { + FATAL("cannot find entry closesockinfo (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +Arecv(int a0, int a1, int a2, int a3) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub Arecv() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "Arecv")) == NULL) { + FATAL("cannot find entry Arecv (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +Asend(int a0, int a1, int a2, int a3) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub Asend() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "Asend")) == NULL) { + FATAL("cannot find entry Asend (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +WSHEnumProtocols(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSHEnumProtocols() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSHEnumProtocols")) == NULL) { + FATAL("cannot find entry WSHEnumProtocols (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +inet_network(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub inet_network() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "inet_network")) == NULL) { + FATAL("cannot find entry inet_network (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +getnetbyname(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getnetbyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getnetbyname")) == NULL) { + FATAL("cannot find entry getnetbyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +rcmd(int a0, int a1, int a2, int a3, int a4, int a5) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub rcmd() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "rcmd")) == NULL) { + FATAL("cannot find entry rcmd (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +rexec(int a0, int a1, int a2, int a3, int a4, int a5) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub rexec() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "rexec")) == NULL) { + FATAL("cannot find entry rexec (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +rresvport(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub rresvport() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "rresvport")) == NULL) { + FATAL("cannot find entry rresvport (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +sethostname(int a0, int a1) +{ + static int (PASCAL *fp)(int a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub sethostname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "sethostname")) == NULL) { + FATAL("cannot find entry sethostname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +dn_expand(int a0, int a1, int a2, int a3, int a4) +{ + static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub dn_expand() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "dn_expand")) == NULL) { + FATAL("cannot find entry dn_expand (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +WSARecvEx(SOCKET a0, char* a1, int a2, int* a3) +{ + static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int* a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSARecvEx() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSARecvEx")) == NULL) { + FATAL("cannot find entry WSARecvEx (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +s_perror(int a0, int a1) +{ + static int (PASCAL *fp)(int a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub s_perror() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "s_perror")) == NULL) { + FATAL("cannot find entry s_perror (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +INT PASCAL +GetAddressByNameA(DWORD a0, LPGUID a1, LPSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPSTR a8, LPDWORD a9) +{ + static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPSTR a8, LPDWORD a9); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetAddressByNameA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetAddressByNameA")) == NULL) { + FATAL("cannot find entry GetAddressByNameA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); +} + +INT PASCAL +GetAddressByNameW(DWORD a0, LPGUID a1, LPWSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPWSTR a8, LPDWORD a9) +{ + static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPWSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPWSTR a8, LPDWORD a9); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetAddressByNameW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetAddressByNameW")) == NULL) { + FATAL("cannot find entry GetAddressByNameW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); +} + +INT PASCAL +EnumProtocolsA(LPINT a0, LPVOID a1, LPDWORD a2) +{ + static INT (PASCAL *fp)(LPINT a0, LPVOID a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub EnumProtocolsA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "EnumProtocolsA")) == NULL) { + FATAL("cannot find entry EnumProtocolsA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT PASCAL +EnumProtocolsW(LPINT a0, LPVOID a1, LPDWORD a2) +{ + static INT (PASCAL *fp)(LPINT a0, LPVOID a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub EnumProtocolsW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "EnumProtocolsW")) == NULL) { + FATAL("cannot find entry EnumProtocolsW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT PASCAL +GetTypeByNameA(LPSTR a0, LPGUID a1) +{ + static INT (PASCAL *fp)(LPSTR a0, LPGUID a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetTypeByNameA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetTypeByNameA")) == NULL) { + FATAL("cannot find entry GetTypeByNameA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +INT PASCAL +GetTypeByNameW(LPWSTR a0, LPGUID a1) +{ + static INT (PASCAL *fp)(LPWSTR a0, LPGUID a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetTypeByNameW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetTypeByNameW")) == NULL) { + FATAL("cannot find entry GetTypeByNameW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +INT PASCAL +GetNameByTypeA(LPGUID a0, LPSTR a1, DWORD a2) +{ + static INT (PASCAL *fp)(LPGUID a0, LPSTR a1, DWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetNameByTypeA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetNameByTypeA")) == NULL) { + FATAL("cannot find entry GetNameByTypeA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT PASCAL +GetNameByTypeW(LPGUID a0, LPWSTR a1, DWORD a2) +{ + static INT (PASCAL *fp)(LPGUID a0, LPWSTR a1, DWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetNameByTypeW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetNameByTypeW")) == NULL) { + FATAL("cannot find entry GetNameByTypeW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT PASCAL +SetServiceA(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOA a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5) +{ + static INT (PASCAL *fp)(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOA a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub SetServiceA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "SetServiceA")) == NULL) { + FATAL("cannot find entry SetServiceA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +INT PASCAL +SetServiceW(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOW a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5) +{ + static INT (PASCAL *fp)(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOW a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub SetServiceW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "SetServiceW")) == NULL) { + FATAL("cannot find entry SetServiceW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +INT PASCAL +GetServiceA(DWORD a0, LPGUID a1, LPSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6) +{ + static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetServiceA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetServiceA")) == NULL) { + FATAL("cannot find entry GetServiceA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +INT PASCAL +GetServiceW(DWORD a0, LPGUID a1, LPWSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6) +{ + static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPWSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetServiceW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetServiceW")) == NULL) { + FATAL("cannot find entry GetServiceW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +int PASCAL +NPLoadNameSpaces(int a0, int a1, int a2) +{ + static int (PASCAL *fp)(int a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub NPLoadNameSpaces() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "NPLoadNameSpaces")) == NULL) { + FATAL("cannot find entry NPLoadNameSpaces (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +NSPStartup(int a0, int a1) +{ + static int (PASCAL *fp)(int a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub NSPStartup() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "NSPStartup")) == NULL) { + FATAL("cannot find entry NSPStartup (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +BOOL PASCAL +TransmitFile(SOCKET a0, HANDLE a1, DWORD a2, DWORD a3, LPOVERLAPPED a4, LPTRANSMIT_FILE_BUFFERS a5, DWORD a6) +{ + static BOOL (PASCAL *fp)(SOCKET a0, HANDLE a1, DWORD a2, DWORD a3, LPOVERLAPPED a4, LPTRANSMIT_FILE_BUFFERS a5, DWORD a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub TransmitFile() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "TransmitFile")) == NULL) { + FATAL("cannot find entry TransmitFile (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +BOOL PASCAL +AcceptEx(SOCKET a0, SOCKET a1, PVOID a2, DWORD a3, DWORD a4, DWORD a5, LPDWORD a6, LPOVERLAPPED a7) +{ + static BOOL (PASCAL *fp)(SOCKET a0, SOCKET a1, PVOID a2, DWORD a3, DWORD a4, DWORD a5, LPDWORD a6, LPOVERLAPPED a7); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub AcceptEx() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "AcceptEx")) == NULL) { + FATAL("cannot find entry AcceptEx (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); +} + +VOID PASCAL +GetAcceptExSockaddrs(PVOID a0, DWORD a1, DWORD a2, DWORD a3, struct sockaddr** a4, LPINT a5, struct sockaddr** a6, LPINT a7) +{ + static VOID (PASCAL *fp)(PVOID a0, DWORD a1, DWORD a2, DWORD a3, struct sockaddr** a4, LPINT a5, struct sockaddr** a6, LPINT a7); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub GetAcceptExSockaddrs() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "GetAcceptExSockaddrs")) == NULL) { + FATAL("cannot find entry GetAcceptExSockaddrs (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); +} + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/make.wnt b/contrib/idn/idnkit-1.0-src/wsock/wsock11/make.wnt new file mode 100644 index 0000000000..5543a6d205 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/make.wnt @@ -0,0 +1,98 @@ +# +# Makefile for WinSock Wrapper (for WinSock 1.1) +# + +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +!include + +SYSLIBS = $(libcdll) kernel32.lib advapi32.lib user32.lib + +# +# Files to use +# + +HDRS = dlldef.h ..\common\wrapcommon.h +SRCS = dllmain.c dllload.c dllfunc.c dllstub.c +OBJS = dllmain.obj dllload.obj dllfunc.obj +LIBS = ..\common\wrapcommon.lib ..\..\lib\idnkit.lib ..\..\win\iconv.lib + +cflags = $(cflags) -I..\..\include + +# +# Targets to Build +# + +TARGETS = wsock32.dll + +all : $(TARGETS) + +wsock32.dll : wsock32.def $(OBJS) $(LIBS) + $(link) $(dlllflags) /OUT:wsock32.dll /DEF:wsock32.def $(OBJS) $(LIBS) $(SYSLIBS) + +install : $(TARGETS) + copy wsock32.dll ..\bin + +clean : force + -del *.obj + -del *.lib + -del *.dll + -del *.exp + +# +# Dependencies +# + +dllmain.obj : dllmain.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +dllload.obj : dllload.c dllstub.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + + +dllfunc.obj : dllfunc.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +wsock32o.lib : wsock32o.def + LIB /DEF:wsock32o.def /MACHINE:IX86 + +force : + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock11/wsock32.def b/contrib/idn/idnkit-1.0-src/wsock/wsock11/wsock32.def new file mode 100644 index 0000000000..5501d26ac5 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock11/wsock32.def @@ -0,0 +1,87 @@ +; +; Library Defition for idn wrapper's wrapper DLL +; +LIBRARY wsock32 +DESCRIPTION "JPNIC idn wrapper DLL for WSOCK32" +EXPORTS + accept @1 + bind @2 + closesocket @3 + connect @4 + getpeername @5 + getsockname @6 + getsockopt @7 + htonl @8 + htons @9 + inet_addr @10 + inet_ntoa @11 + ioctlsocket @12 + listen @13 + ntohl @14 + ntohs @15 + recv @16 + recvfrom @17 + select @18 + send @19 + sendto @20 + setsockopt @21 + shutdown @22 + socket @23 + MigrateWinsockConfiguration @24 + gethostbyaddr @51 + gethostbyname @52 + getprotobyname @53 + getprotobynumber @54 + getservbyname @55 + getservbyport @56 + gethostname @57 + WSAAsyncSelect @101 + WSAAsyncGetHostByAddr @102 + WSAAsyncGetHostByName @103 + WSAAsyncGetProtoByNumber @104 + WSAAsyncGetProtoByName @105 + WSAAsyncGetServByPort @106 + WSAAsyncGetServByName @107 + WSACancelAsyncRequest @108 + WSASetBlockingHook @109 + WSAUnhookBlockingHook @110 + WSAGetLastError @111 + WSASetLastError @112 + WSACancelBlockingCall @113 + WSAIsBlocking @114 + WSAStartup @115 + WSACleanup @116 + __WSAFDIsSet @151 + WEP @500 + WSApSetPostRoutine @1000 + WsControl @1001 + closesockinfo @1002 + Arecv @1003 + Asend @1004 + WSHEnumProtocols @1005 + inet_network @1100 + getnetbyname @1101 + rcmd @1102 + rexec @1103 + rresvport @1104 + sethostname @1105 + dn_expand @1106 + WSARecvEx @1107 + s_perror @1108 + GetAddressByNameA @1109 + GetAddressByNameW @1110 + EnumProtocolsA @1111 + EnumProtocolsW @1112 + GetTypeByNameA @1113 + GetTypeByNameW @1114 + GetNameByTypeA @1115 + GetNameByTypeW @1116 + SetServiceA @1117 + SetServiceW @1118 + GetServiceA @1119 + GetServiceW @1120 + NPLoadNameSpaces @1130 + NSPStartup @1131 + TransmitFile @1140 + AcceptEx @1141 + GetAcceptExSockaddrs @1142 diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/dlldef.h b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dlldef.h new file mode 100644 index 0000000000..52a256783a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dlldef.h @@ -0,0 +1,123 @@ +/* + * dlldef.h + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef _DLLDEF_H +#define _DLLDEF_H + +#include "../common/wrapcommon.h" + +/* + * Execution Tracing + */ + +extern int procPid; + +#ifdef DEBUG +#define TRACE idnPrintf +#define FATAL idnPrintf +#else +#define TRACE +#define FATAL idnPrintf +#endif + +/* + * entry points to wrap + */ + +extern int WSAAPI +_org_gethostname(char FAR * name, int namelen); + +extern struct hostent FAR * WSAAPI +_org_gethostbyaddr(const char FAR * addr, int len, int type); + +extern struct hostent FAR * WSAAPI +_org_gethostbyname(const char FAR * name); + +extern HANDLE WSAAPI +_org_WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR * name, + char FAR * buf,int buflen); + +extern HANDLE WSAAPI +_org_WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, + int len, int type, char FAR * buf, int buflen); + +extern INT WSAAPI +_org_WSALookupServiceBeginA(LPWSAQUERYSETA lpqsRestrictions, + DWORD dwControlFlags, + LPHANDLE lphLookup); + +extern INT WSAAPI +_org_WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, + DWORD dwControlFlags, + LPHANDLE lphLookup); + +extern INT WSAAPI +_org_WSALookupServiceNextA(HANDLE hLookup, + DWORD dwControlFlags, + LPDWORD lpdwBufferLength, + LPWSAQUERYSETA lpqsResults); + +extern INT WSAAPI +_org_WSALookupServiceNextW(HANDLE hLookup, + DWORD dwControlFlags, + LPDWORD lpdwBufferLength, + LPWSAQUERYSETW lpqsResults); + +extern INT WSAAPI +_org_WSALookupServiceEnd(HANDLE hLookup); + +extern int WSAAPI +_org_getaddrinfo(const char *nodename, const char *servname, + LPVOID hints, LPVOID res); + +extern void WSAAPI +_org_freeaddrinfo(LPVOID aip); + +extern int WSAAPI +_org_getnameinfo(LPVOID sa, DWORD salen, char* host, DWORD hostlen, + char* serv, DWORD servlen, int flags); + +#endif /* _DLLDEF_H */ diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllfunc.c b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllfunc.c new file mode 100644 index 0000000000..cec2d06574 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllfunc.c @@ -0,0 +1,592 @@ +/* + * dllfunc.c - wrapper functions + */ + +/* + * Copyright (c) 2000,2002 Japan Network Information Center. + * All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include + +#include "dlldef.h" + +#ifndef EAI_MEMORY +#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY +#endif +#ifndef EAI_FAIL +#define EAI_FAIL WSANO_RECOVERY +#endif + +static GUID guid_habn = SVCID_INET_HOSTADDRBYNAME; +static GUID guid_habis = SVCID_INET_HOSTADDRBYINETSTRING; + +#define SVCID_IS_HABN(p) (memcmp(p, &guid_habn, sizeof(GUID)) == 0) +#define SVCID_IS_HABIS(p) (memcmp(p, &guid_habis, sizeof(GUID)) == 0) + +/* + * Rename addrinfo to my_addrinfo for avoiding possible name conflict. + */ +struct my_addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct my_addrinfo *ai_next; +}; + +typedef struct obj_lock { + void *key; + struct obj_lock *next; +} obj_lock_t; + +#define OBJLOCKHASH_SIZE 127 +static obj_lock_t *obj_lock_hash[OBJLOCKHASH_SIZE]; + +static int obj_hash(void *key); +static int obj_islocked(void *key); +static void obj_lock(void *key); +static void obj_unlock(void *key); +static char *decode_name_dynamic(const char *name, idn_resconf_t idnctx); +static struct my_addrinfo + *copy_decode_addrinfo_dynamic(struct my_addrinfo *aip, + idn_resconf_t idnctx); +static void free_copied_addrinfo(struct my_addrinfo *aip); + +WRAPPER_EXPORT int WSAAPI +gethostname(char FAR * name, int namelen) { + int ret; + + TRACE("ENTER gethostname\n"); + ret = _org_gethostname(name, namelen); + TRACE("LEAVE gethostname %d <%-.100s>\n", ret, name); + + return (ret); +} + +WRAPPER_EXPORT struct hostent FAR * WSAAPI +gethostbyname(const char FAR * name) { + struct hostent FAR *ret; + char nbuff[256]; + char hbuff[256]; + BOOL stat; + idn_resconf_t encodeCtx; + + TRACE("ENTER gethostbyname <%-.100s>\n", + (name != NULL ? name : "NULL")); + + encodeCtx = idnGetContext(); + + if (encodeCtx == NULL || name == NULL) { + ret = _org_gethostbyname(name); + } else { + stat = idnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)); + if (stat == FALSE) { + TRACE("idnConvReq failed\n"); + ret = NULL; + } else { + TRACE("Converted Name <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + ret = _org_gethostbyname(nbuff); + } + } + + if (ret != NULL && encodeCtx != NULL) { + TRACE("Resulting Name <%s>\n", + dumpName(ret->h_name, hbuff, sizeof(hbuff))); + stat = idnConvRsp(encodeCtx, ret->h_name, + nbuff, sizeof(nbuff)); + if (stat == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + } else { + TRACE("Converted Back <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(ret->h_name, nbuff); + } + } + + if (ret == NULL) { + TRACE("LEAVE gethostbyname NULL\n"); + } else { + TRACE("LEAVE gethostbyname <%s>\n", + dumpHost(ret, hbuff, sizeof(hbuff))); + } + return (ret); +} + +WRAPPER_EXPORT struct hostent FAR * WSAAPI +gethostbyaddr(const char FAR * addr, int len, int type) { + struct hostent FAR *ret; + char nbuff[256]; + char abuff[256]; + char hbuff[256]; + BOOL stat; + idn_resconf_t encodeCtx; + + TRACE("ENTER gethostbyaddr <%s>\n", + dumpAddr(addr, len, abuff, sizeof(abuff))); + + encodeCtx = idnGetContext(); + + ret = _org_gethostbyaddr(addr, len, type); + + if (ret != NULL && encodeCtx != NULL) { + TRACE("Resulting Name <%s>\n", + dumpName(ret->h_name, hbuff, sizeof(hbuff))); + stat = idnConvRsp(encodeCtx, ret->h_name, + nbuff, sizeof(nbuff)); + if (stat == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + } else { + TRACE("Converted Back <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(ret->h_name, nbuff); + } + } + + if (ret == NULL) { + TRACE("LEAVE gethostbyaddr NULL\n"); + } else { + TRACE("LEAVE gethostbyaddr <%s>\n", + dumpHost(ret, hbuff, sizeof(hbuff))); + } + return (ret); +} + +WRAPPER_EXPORT HANDLE WSAAPI +WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, + const char FAR * name, char FAR * buf, int buflen) +{ + HANDLE ret; + char nbuff[256]; + char hbuff[256]; + idn_resconf_t encodeCtx; + + TRACE("ENTER WSAAsyncGetHostByName <%-.100s>\n", name); + + encodeCtx = idnGetContext(); + + if (encodeCtx == NULL || name == NULL) { + ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, + name, buf, buflen); + } else { + idnHook(hWnd, wMsg, buf, encodeCtx); + idnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)); + TRACE("Converted Name <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, nbuff, + buf, buflen); + } + + TRACE("LEAVE WSAAsyncGetHostByName HANDLE %08x\n", ret); + + return (ret); +} + +WRAPPER_EXPORT HANDLE WSAAPI +WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, + int len, int type, char FAR * buf, int buflen) +{ + HANDLE ret; + char abuff[256]; + idn_resconf_t encodeCtx; + + encodeCtx = idnGetContext(); + + if (encodeCtx != NULL) { + idnHook(hWnd, wMsg, buf, encodeCtx); + } + + TRACE("ENTER WSAAsyncGetHostByAddr <%s>\n", + dumpAddr(addr, len, abuff, sizeof(abuff))); + ret = _org_WSAAsyncGetHostByAddr(hWnd, wMsg, addr, len, type, + buf, buflen); + TRACE("LEAVE WSAAsyncGetHostByAddr HANDLE %08x\n", ret); + + return (ret); +} + +WRAPPER_EXPORT INT WSAAPI +WSALookupServiceBeginA(LPWSAQUERYSETA lpqsRestrictions, + DWORD dwControlFlags, LPHANDLE lphLookup) +{ + INT ret; + char nbuff[256]; + char hbuff[256]; + LPSTR name = lpqsRestrictions->lpszServiceInstanceName; + LPGUID class = lpqsRestrictions->lpServiceClassId; + idn_resconf_t encodeCtx; + + TRACE("ENTER WSALookupServiceBeginA <%-.100s>\n", + name == NULL ? "" : name); + + encodeCtx = idnGetContext(); + + if (name != NULL && encodeCtx != NULL && SVCID_IS_HABN(class) == 0) { + idnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)); + TRACE("Converted Name <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + /* strcpy(lpqsRestrictions->lpszQueryString, nbuff); */ + lpqsRestrictions->lpszServiceInstanceName = nbuff; + } + ret = _org_WSALookupServiceBeginA(lpqsRestrictions, + dwControlFlags, lphLookup); + TRACE("LEAVE WSALookupServiceBeginA %d\n", ret); + + return (ret); +} + +WRAPPER_EXPORT INT WSAAPI +WSALookupServiceNextA(HANDLE hLookup, DWORD dwControlFlags, + LPDWORD lpdwBufferLength, LPWSAQUERYSETA lpqsResults) +{ + INT ret; + char nbuff[256]; + char hbuff[256]; + LPGUID class; + idn_resconf_t encodeCtx; + + TRACE("ENTER WSALookupServiceNextA\n"); + + encodeCtx = idnGetContext(); + + ret = _org_WSALookupServiceNextA(hLookup, dwControlFlags, + lpdwBufferLength, lpqsResults); + class = lpqsResults->lpServiceClassId; + + if (ret == 0 && + encodeCtx != NULL && + (dwControlFlags & LUP_RETURN_NAME) && + (SVCID_IS_HABN(class) || SVCID_IS_HABIS(class))) { + TRACE("Resulting Name <%s>\n", + dumpName(lpqsResults->lpszServiceInstanceName, + hbuff, sizeof(hbuff))); + if (idnConvRsp(encodeCtx, + lpqsResults->lpszServiceInstanceName, + nbuff, sizeof(nbuff)) == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + } else { + TRACE("Converted Back <%s>\n", + dumpName(nbuff, hbuff, sizeof(hbuff))); + strcpy(lpqsResults->lpszServiceInstanceName, nbuff); + } + } + TRACE("LEAVE WSALookupServiceNextA %d <%s>\n", ret, nbuff); + + return (ret); +} + +WRAPPER_EXPORT INT WSAAPI +WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, + DWORD dwControlFlags, LPHANDLE lphLookup) +{ + INT ret; + + TRACE("ENTER WSALookupServiceBeginW\n"); + ret = _org_WSALookupServiceBeginW(lpqsRestrictions, + dwControlFlags,lphLookup); + TRACE("LEAVE WSALookupServiceBeginW %d\n", ret); + + return (ret); +} + +WRAPPER_EXPORT INT WSAAPI +WSALookupServiceNextW(HANDLE hLookup, DWORD dwControlFlags, + LPDWORD lpdwBufferLength, LPWSAQUERYSETW lpqsResults) +{ + INT ret; + + TRACE("ENTER WSALookupServiceNextW\n"); + ret = _org_WSALookupServiceNextW(hLookup, dwControlFlags, + lpdwBufferLength, lpqsResults); + TRACE("LEAVE WSALookupServiceNextW %d\n", ret); + + return (ret); +} + +WRAPPER_EXPORT INT WSAAPI +WSALookupServiceEnd(HANDLE hLookup) { + INT ret; + + TRACE("ENTER WSALookupServiceEnd\n"); + ret = _org_WSALookupServiceEnd(hLookup); + TRACE("LEAVE WSALookupServiceEnd %d\n", ret); + + return (ret); +} + +static int +obj_hash(void *key) { + /* + * Hash function for obj_*. + * 'key' is supposed to be an address. + */ + unsigned long v = (unsigned long)key; + + return ((v >> 3) % OBJLOCKHASH_SIZE); +} + +static int +obj_islocked(void *key) +{ + /* + * Check if the object specified by 'key' is locked. + * Return 1 if so, 0 otherwise. + */ + int h = obj_hash(key); + obj_lock_t *olp = obj_lock_hash[h]; + + while (olp != NULL) { + if (olp->key == key) + return (1); + olp = olp->next; + } + return (0); +} + +static void +obj_lock(void *key) +{ + /* + * Lock an object specified by 'key'. + */ + int h = obj_hash(key); + obj_lock_t *olp; + + olp = malloc(sizeof(obj_lock_t)); + if (olp != NULL) { + olp->key = key; + olp->next = obj_lock_hash[h]; + obj_lock_hash[h] = olp; + } +} + +static void +obj_unlock(void *key) +{ + /* + * Unlock an object specified by 'key'. + */ + int h = obj_hash(key); + obj_lock_t *olp, *olp0; + + olp = obj_lock_hash[h]; + olp0 = NULL; + while (olp != NULL) { + if (olp->key == key) { + if (olp0 == NULL) + obj_lock_hash[h] = olp->next; + else + olp0->next = olp->next; + free(olp); + return; + } + olp0 = olp; + olp = olp->next; + } +} + +static char * +decode_name_dynamic(const char *name, idn_resconf_t idnctx) { + BOOL stat; + char buf[256], tmp[256]; + char *s; + + if (idnConvRsp(idnctx, name, buf, sizeof(buf)) == TRUE) { + TRACE("Converted Back <%s>\n", + dumpName(buf, tmp, sizeof(tmp))); + name = buf; + } else { + TRACE("Decoding failed - return the name verbatim\n"); + } + s = malloc(strlen(name) + 1); + if (s == NULL) + return (NULL); + else + return (strcpy(s, name)); +} + +static struct my_addrinfo * +copy_decode_addrinfo_dynamic(struct my_addrinfo *aip, idn_resconf_t idnctx) +{ + struct my_addrinfo *newaip; + + if (aip == NULL) + return (NULL); + + newaip = malloc(sizeof(struct my_addrinfo) + aip->ai_addrlen); + if (newaip == NULL) + return (NULL); + + *newaip = *aip; + newaip->ai_addr = (struct sockaddr *)(newaip + 1); + memcpy(newaip->ai_addr, aip->ai_addr, aip->ai_addrlen); + + if (newaip->ai_canonname != NULL) + newaip->ai_canonname = decode_name_dynamic(aip->ai_canonname, + idnctx); + + newaip->ai_next = copy_decode_addrinfo_dynamic(aip->ai_next, idnctx); + return (newaip); +} + +static void +free_copied_addrinfo(struct my_addrinfo *aip) { + while (aip != NULL) { + struct my_addrinfo *next = aip->ai_next; + + if (aip->ai_canonname != NULL) + free(aip->ai_canonname); + free(aip); + aip = next; + } +} + +WRAPPER_EXPORT int WSAAPI +getaddrinfo(const char *nodename, const char *servname, + const struct my_addrinfo *hints, struct my_addrinfo **res) +{ + char namebuf[256]; + BOOL stat; + struct my_addrinfo *aip; + int err; + idn_resconf_t encodeCtx; + + TRACE("ENTER getaddrinfo <%-.100s>\n", nodename ? nodename : "NULL"); + + encodeCtx = idnGetContext(); + + if (nodename == NULL || encodeCtx == NULL) { + TRACE("conversion unnecessary\n"); + err = _org_getaddrinfo(nodename, servname, hints, res); + } else { + stat = idnConvReq(encodeCtx, nodename, + namebuf, sizeof(namebuf)); + if (stat == TRUE) { + nodename = namebuf; + TRACE("Converted Name <%-.100s>\n", namebuf); + } + + err = _org_getaddrinfo(nodename, servname, hints, &aip); + if (err == 0 && aip != NULL) { + *res = copy_decode_addrinfo_dynamic(aip, encodeCtx); + if (*res == NULL) + err = EAI_FAIL; + else + obj_lock(*res); + if (aip != NULL) + _org_freeaddrinfo(aip); + } + } + + TRACE("LEAVE getaddrinfo %d\n", err); + return (err); +} + +WRAPPER_EXPORT void WSAAPI +freeaddrinfo(struct my_addrinfo *aip) { + TRACE("ENTER freeaddrinfo aip=%p\n", (void *)aip); + + if (obj_islocked(aip)) { + /* + * We allocated the data. + */ + obj_unlock(aip); + free_copied_addrinfo(aip); + } else { + /* + * It was allocated the original getaddrinfo(). + */ + TRACE("Not allocated by the wrapper\n"); + _org_freeaddrinfo(aip); + } + TRACE("LEAVE freeaddrinfo\n"); +} + +WRAPPER_EXPORT int WSAAPI +getnameinfo(const struct sockaddr *sa, DWORD salen, + char *host, DWORD hostlen, char *serv, + DWORD servlen, int flags) +{ + char name[256]; + size_t namelen = sizeof(name); + int code; + BOOL stat; + idn_resconf_t encodeCtx; + + TRACE("ENTER getnameinfo\n"); + + encodeCtx = idnGetContext(); + + if (host == NULL || hostlen == 0 || encodeCtx == NULL) { + TRACE("conversion unnecessary\n"); + code = _org_getnameinfo(sa, salen, host, hostlen, + serv, servlen, flags); + } else { + code = _org_getnameinfo(sa, salen, name, namelen, + serv, servlen, flags); + if (code == 0 && name[0] != '\0') { + stat = idnConvRsp(encodeCtx, name, host, hostlen); + if (stat == FALSE) { + TRACE("Decoding failed - return the name verbatim\n"); + if (strlen(name) >= hostlen) { + code = EAI_FAIL; + } else { + strcpy(host, name); + } + } else { + TRACE("Converted Back <%s>\n", + dumpName(host, name, sizeof(name))); + } + } + } + + TRACE("LEAVE getnameinfo %d\n", code); + return (code); +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllload.c b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllload.c new file mode 100644 index 0000000000..0f1257e7f9 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllload.c @@ -0,0 +1,62 @@ +/* + * dllload.c - load original entries + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include +#include + +#include "dlldef.h" + +/* + * Manages original DLL + */ + +#define DLLHANDLE idnWinsockHandle() + +#include "dllstub.c" diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllmain.c b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllmain.c new file mode 100644 index 0000000000..c6609bc32f --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllmain.c @@ -0,0 +1,94 @@ +/* + * dllmain.c - entry for DLL + */ + +/* + * Copyright (c) 2000 Japan Network Information Center. All rights reserved. + * + * By using this file, you agree to the terms and conditions set forth bellow. + * + * LICENSE TERMS AND CONDITIONS + * + * The following License Terms and Conditions apply, unless a different + * license is obtained from Japan Network Information Center ("JPNIC"), + * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, + * Chiyoda-ku, Tokyo 101-0047, Japan. + * + * 1. Use, Modification and Redistribution (including distribution of any + * modified or derived work) in source and/or binary forms is permitted + * under this License Terms and Conditions. + * + * 2. Redistribution of source code must retain the copyright notices as they + * appear in each source code file, this License Terms and Conditions. + * + * 3. Redistribution in binary form must reproduce the Copyright Notice, + * this License Terms and Conditions, in the documentation and/or other + * materials provided with the distribution. For the purposes of binary + * distribution the "Copyright Notice" refers to the following language: + * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." + * + * 4. The name of JPNIC may not be used to endorse or promote products + * derived from this Software without specific prior written approval of + * JPNIC. + * + * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +#include +#include +#include +#include +#include + +#include "dlldef.h" + +/* + * Control Variables + */ + +int procPid = 0; + +static char procExe[256]; + +/* + * DLL Entry + */ + +BOOL APIENTRY +DllMain(HMODULE hmod, DWORD reason, LPVOID *resv) { + switch (reason) { + case DLL_PROCESS_ATTACH: + procPid = getpid(); + GetModuleFileName(NULL, procExe, 256); + + idnLogInit("ws20"); + idnHookInit(); + + TRACE("Attached to Process <%s>\n", procExe); + return (idnWinsockVersion("2.0")); + + case DLL_PROCESS_DETACH: + idnConvDone(idnGetContext()); + idnHookDone(); + TRACE("Detached from Process\n"); + idnLogFinish(); + break; + + case DLL_THREAD_ATTACH: + break; + case DLL_THREAD_DETACH: + break; + } + + return (TRUE); +} diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllstub.c b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllstub.c new file mode 100644 index 0000000000..f3e695ed19 --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/dllstub.c @@ -0,0 +1,2168 @@ +/* $Id: dllstub.c,v 1.1 2003/06/04 00:27:51 marka Exp $ */ + +SOCKET PASCAL +accept(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static SOCKET (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub accept() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "accept")) == NULL) { + FATAL("cannot find entry accept (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +bind(SOCKET a0, const struct sockaddr* a1, int a2) +{ + static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub bind() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "bind")) == NULL) { + FATAL("cannot find entry bind (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +closesocket(SOCKET a0) +{ + static int (PASCAL *fp)(SOCKET a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub closesocket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "closesocket")) == NULL) { + FATAL("cannot find entry closesocket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +connect(SOCKET a0, const struct sockaddr* a1, int a2) +{ + static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub connect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "connect")) == NULL) { + FATAL("cannot find entry connect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getpeername(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getpeername() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getpeername")) == NULL) { + FATAL("cannot find entry getpeername (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getsockname(SOCKET a0, struct sockaddr* a1, int* a2) +{ + static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getsockname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getsockname")) == NULL) { + FATAL("cannot find entry getsockname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +getsockopt(SOCKET a0, int a1, int a2, char* a3, int* a4) +{ + static int (PASCAL *fp)(SOCKET a0, int a1, int a2, char* a3, int* a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getsockopt() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getsockopt")) == NULL) { + FATAL("cannot find entry getsockopt (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +u_long PASCAL +htonl(u_long a0) +{ + static u_long (PASCAL *fp)(u_long a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub htonl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "htonl")) == NULL) { + FATAL("cannot find entry htonl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +u_short PASCAL +htons(u_short a0) +{ + static u_short (PASCAL *fp)(u_short a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub htons() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "htons")) == NULL) { + FATAL("cannot find entry htons (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +ioctlsocket(SOCKET a0, long a1, u_long * a2) +{ + static int (PASCAL *fp)(SOCKET a0, long a1, u_long * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ioctlsocket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ioctlsocket")) == NULL) { + FATAL("cannot find entry ioctlsocket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +unsigned long PASCAL +inet_addr(const char* a0) +{ + static unsigned long (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub inet_addr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "inet_addr")) == NULL) { + FATAL("cannot find entry inet_addr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + char * PASCAL +inet_ntoa(struct in_addr a0) +{ + static char * (PASCAL *fp)(struct in_addr a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub inet_ntoa() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "inet_ntoa")) == NULL) { + FATAL("cannot find entry inet_ntoa (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +listen(SOCKET a0, int a1) +{ + static int (PASCAL *fp)(SOCKET a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub listen() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "listen")) == NULL) { + FATAL("cannot find entry listen (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +u_long PASCAL +ntohl(u_long a0) +{ + static u_long (PASCAL *fp)(u_long a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ntohl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ntohl")) == NULL) { + FATAL("cannot find entry ntohl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +u_short PASCAL +ntohs(u_short a0) +{ + static u_short (PASCAL *fp)(u_short a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub ntohs() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "ntohs")) == NULL) { + FATAL("cannot find entry ntohs (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +recv(SOCKET a0, char* a1, int a2, int a3) +{ + static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub recv() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "recv")) == NULL) { + FATAL("cannot find entry recv (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +recvfrom(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5) +{ + static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub recvfrom() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "recvfrom")) == NULL) { + FATAL("cannot find entry recvfrom (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +select(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4) +{ + static int (PASCAL *fp)(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub select() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "select")) == NULL) { + FATAL("cannot find entry select (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +send(SOCKET a0, const char* a1, int a2, int a3) +{ + static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub send() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "send")) == NULL) { + FATAL("cannot find entry send (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int PASCAL +sendto(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5) +{ + static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub sendto() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "sendto")) == NULL) { + FATAL("cannot find entry sendto (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +setsockopt(SOCKET a0, int a1, int a2, const char* a3, int a4) +{ + static int (PASCAL *fp)(SOCKET a0, int a1, int a2, const char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub setsockopt() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "setsockopt")) == NULL) { + FATAL("cannot find entry setsockopt (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +shutdown(SOCKET a0, int a1) +{ + static int (PASCAL *fp)(SOCKET a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub shutdown() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "shutdown")) == NULL) { + FATAL("cannot find entry shutdown (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +SOCKET PASCAL +socket(int a0, int a1, int a2) +{ + static SOCKET (PASCAL *fp)(int a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub socket() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "socket")) == NULL) { + FATAL("cannot find entry socket (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int PASCAL +WSApSetPostRoutine(int a0) +{ + static int (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSApSetPostRoutine() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSApSetPostRoutine")) == NULL) { + FATAL("cannot find entry WSApSetPostRoutine (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +WSAEVENT WSAAPI +WPUCompleteOverlappedRequest(SOCKET a0, LPWSAOVERLAPPED a1, DWORD a2, DWORD a3, LPINT a4) +{ + static WSAEVENT (WSAAPI *fp)(SOCKET a0, LPWSAOVERLAPPED a1, DWORD a2, DWORD a3, LPINT a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WPUCompleteOverlappedRequest() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WPUCompleteOverlappedRequest")) == NULL) { + FATAL("cannot find entry WPUCompleteOverlappedRequest (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +SOCKET WINAPI +WSAAccept(SOCKET a0, struct sockaddr * a1, LPINT a2, LPCONDITIONPROC a3, DWORD a4) +{ + static SOCKET (WINAPI *fp)(SOCKET a0, struct sockaddr * a1, LPINT a2, LPCONDITIONPROC a3, DWORD a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAccept() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAccept")) == NULL) { + FATAL("cannot find entry WSAAccept (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +INT WINAPI +WSAAddressToStringA(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOA a2, LPSTR a3, LPDWORD a4) +{ + static INT (WINAPI *fp)(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOA a2, LPSTR a3, LPDWORD a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAddressToStringA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAddressToStringA")) == NULL) { + FATAL("cannot find entry WSAAddressToStringA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +INT WINAPI +WSAAddressToStringW(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOW a2, LPWSTR a3, LPDWORD a4) +{ + static INT (WINAPI *fp)(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOW a2, LPWSTR a3, LPDWORD a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAddressToStringW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAddressToStringW")) == NULL) { + FATAL("cannot find entry WSAAddressToStringW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +BOOL WINAPI +WSACloseEvent(WSAEVENT a0) +{ + static BOOL (WINAPI *fp)(WSAEVENT a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACloseEvent() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACloseEvent")) == NULL) { + FATAL("cannot find entry WSACloseEvent (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int WINAPI +WSAConnect(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6) +{ + static int (WINAPI *fp)(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAConnect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAConnect")) == NULL) { + FATAL("cannot find entry WSAConnect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +WSAEVENT WINAPI +WSACreateEvent(void) +{ + static WSAEVENT (WINAPI *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACreateEvent() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACreateEvent")) == NULL) { + FATAL("cannot find entry WSACreateEvent (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int WINAPI +WSADuplicateSocketA(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOA a2) +{ + static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOA a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSADuplicateSocketA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSADuplicateSocketA")) == NULL) { + FATAL("cannot find entry WSADuplicateSocketA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSADuplicateSocketW(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOW a2) +{ + static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOW a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSADuplicateSocketW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSADuplicateSocketW")) == NULL) { + FATAL("cannot find entry WSADuplicateSocketW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +WSAEnumNameSpaceProvidersA(LPDWORD a0, LPWSANAMESPACE_INFOA a1) +{ + static INT (WINAPI *fp)(LPDWORD a0, LPWSANAMESPACE_INFOA a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEnumNameSpaceProvidersA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNameSpaceProvidersA")) == NULL) { + FATAL("cannot find entry WSAEnumNameSpaceProvidersA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +INT WINAPI +WSAEnumNameSpaceProvidersW(LPDWORD a0, LPWSANAMESPACE_INFOW a1) +{ + static INT (WINAPI *fp)(LPDWORD a0, LPWSANAMESPACE_INFOW a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEnumNameSpaceProvidersW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNameSpaceProvidersW")) == NULL) { + FATAL("cannot find entry WSAEnumNameSpaceProvidersW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int WINAPI +WSAEnumNetworkEvents(SOCKET a0, WSAEVENT a1, LPWSANETWORKEVENTS a2) +{ + static int (WINAPI *fp)(SOCKET a0, WSAEVENT a1, LPWSANETWORKEVENTS a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEnumNetworkEvents() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNetworkEvents")) == NULL) { + FATAL("cannot find entry WSAEnumNetworkEvents (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSAEnumProtocolsA(LPINT a0, LPWSAPROTOCOL_INFOA a1, LPDWORD a2) +{ + static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOA a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEnumProtocolsA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEnumProtocolsA")) == NULL) { + FATAL("cannot find entry WSAEnumProtocolsA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSAEnumProtocolsW(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2) +{ + static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEnumProtocolsW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEnumProtocolsW")) == NULL) { + FATAL("cannot find entry WSAEnumProtocolsW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSAEventSelect(SOCKET a0, WSAEVENT a1, long a2) +{ + static int (WINAPI *fp)(SOCKET a0, WSAEVENT a1, long a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAEventSelect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAEventSelect")) == NULL) { + FATAL("cannot find entry WSAEventSelect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +BOOL WINAPI +WSAGetOverlappedResult(SOCKET a0, LPWSAOVERLAPPED a1, LPDWORD a2, BOOL a3, LPDWORD a4) +{ + static BOOL (WINAPI *fp)(SOCKET a0, LPWSAOVERLAPPED a1, LPDWORD a2, BOOL a3, LPDWORD a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetOverlappedResult() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetOverlappedResult")) == NULL) { + FATAL("cannot find entry WSAGetOverlappedResult (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +BOOL WINAPI +WSAGetQOSByName(SOCKET a0, LPWSABUF a1, LPQOS a2) +{ + static BOOL (WINAPI *fp)(SOCKET a0, LPWSABUF a1, LPQOS a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetQOSByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetQOSByName")) == NULL) { + FATAL("cannot find entry WSAGetQOSByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +WSAGetServiceClassInfoA(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOA a3) +{ + static INT (WINAPI *fp)(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOA a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetServiceClassInfoA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassInfoA")) == NULL) { + FATAL("cannot find entry WSAGetServiceClassInfoA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +INT WINAPI +WSAGetServiceClassInfoW(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOW a3) +{ + static INT (WINAPI *fp)(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOW a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetServiceClassInfoW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassInfoW")) == NULL) { + FATAL("cannot find entry WSAGetServiceClassInfoW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +INT WINAPI +WSAGetServiceClassNameByClassIdA(LPGUID a0, LPSTR a1, LPDWORD a2) +{ + static INT (WINAPI *fp)(LPGUID a0, LPSTR a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetServiceClassNameByClassIdA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassNameByClassIdA")) == NULL) { + FATAL("cannot find entry WSAGetServiceClassNameByClassIdA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +WSAGetServiceClassNameByClassIdW(LPGUID a0, LPWSTR a1, LPDWORD a2) +{ + static INT (WINAPI *fp)(LPGUID a0, LPWSTR a1, LPDWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetServiceClassNameByClassIdW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassNameByClassIdW")) == NULL) { + FATAL("cannot find entry WSAGetServiceClassNameByClassIdW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSAHtonl(SOCKET a0, unsigned long a1, unsigned long * a2) +{ + static int (WINAPI *fp)(SOCKET a0, unsigned long a1, unsigned long * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAHtonl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAHtonl")) == NULL) { + FATAL("cannot find entry WSAHtonl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSAHtons(SOCKET a0, unsigned short a1, unsigned short * a2) +{ + static int (WINAPI *fp)(SOCKET a0, unsigned short a1, unsigned short * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAHtons() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAHtons")) == NULL) { + FATAL("cannot find entry WSAHtons (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +WSAInstallServiceClassA(LPWSASERVICECLASSINFOA a0) +{ + static INT (WINAPI *fp)(LPWSASERVICECLASSINFOA a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAInstallServiceClassA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAInstallServiceClassA")) == NULL) { + FATAL("cannot find entry WSAInstallServiceClassA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +INT WINAPI +WSAInstallServiceClassW(LPWSASERVICECLASSINFOW a0) +{ + static INT (WINAPI *fp)(LPWSASERVICECLASSINFOW a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAInstallServiceClassW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAInstallServiceClassW")) == NULL) { + FATAL("cannot find entry WSAInstallServiceClassW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int WINAPI +WSAIoctl(SOCKET a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) +{ + static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAIoctl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAIoctl")) == NULL) { + FATAL("cannot find entry WSAIoctl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); +} + + struct hostent * PASCAL +_org_gethostbyaddr(const char* a0, int a1, int a2) +{ + static struct hostent * (PASCAL *fp)(const char* a0, int a1, int a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostbyaddr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostbyaddr")) == NULL) { + FATAL("cannot find entry gethostbyaddr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + + struct hostent * PASCAL +_org_gethostbyname(const char* a0) +{ + static struct hostent * (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostbyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostbyname")) == NULL) { + FATAL("cannot find entry gethostbyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct protoent * PASCAL +getprotobyname(const char* a0) +{ + static struct protoent * (PASCAL *fp)(const char* a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getprotobyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getprotobyname")) == NULL) { + FATAL("cannot find entry getprotobyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct protoent * PASCAL +getprotobynumber(int a0) +{ + static struct protoent * (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getprotobynumber() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getprotobynumber")) == NULL) { + FATAL("cannot find entry getprotobynumber (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + + struct servent * PASCAL +getservbyname(const char* a0, const char* a1) +{ + static struct servent * (PASCAL *fp)(const char* a0, const char* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getservbyname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getservbyname")) == NULL) { + FATAL("cannot find entry getservbyname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + + struct servent * PASCAL +getservbyport(int a0, const char* a1) +{ + static struct servent * (PASCAL *fp)(int a0, const char* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub getservbyport() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getservbyport")) == NULL) { + FATAL("cannot find entry getservbyport (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +_org_gethostname(char* a0, int a1) +{ + static int (PASCAL *fp)(char* a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_gethostname() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "gethostname")) == NULL) { + FATAL("cannot find entry gethostname (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +SOCKET WINAPI +WSAJoinLeaf(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6, DWORD a7) +{ + static SOCKET (WINAPI *fp)(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6, DWORD a7); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAJoinLeaf() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAJoinLeaf")) == NULL) { + FATAL("cannot find entry WSAJoinLeaf (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); +} + +INT WINAPI +_org_WSALookupServiceBeginA(LPWSAQUERYSETA a0, DWORD a1, LPHANDLE a2) +{ + static INT (WINAPI *fp)(LPWSAQUERYSETA a0, DWORD a1, LPHANDLE a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSALookupServiceBeginA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceBeginA")) == NULL) { + FATAL("cannot find entry WSALookupServiceBeginA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +_org_WSALookupServiceBeginW(LPWSAQUERYSETW a0, DWORD a1, LPHANDLE a2) +{ + static INT (WINAPI *fp)(LPWSAQUERYSETW a0, DWORD a1, LPHANDLE a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSALookupServiceBeginW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceBeginW")) == NULL) { + FATAL("cannot find entry WSALookupServiceBeginW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +_org_WSALookupServiceEnd(HANDLE a0) +{ + static INT (WINAPI *fp)(HANDLE a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSALookupServiceEnd() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceEnd")) == NULL) { + FATAL("cannot find entry WSALookupServiceEnd (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +INT WINAPI +_org_WSALookupServiceNextA(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETA a3) +{ + static INT (WINAPI *fp)(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETA a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSALookupServiceNextA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceNextA")) == NULL) { + FATAL("cannot find entry WSALookupServiceNextA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +INT WINAPI +_org_WSALookupServiceNextW(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETW a3) +{ + static INT (WINAPI *fp)(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETW a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSALookupServiceNextW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceNextW")) == NULL) { + FATAL("cannot find entry WSALookupServiceNextW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int WINAPI +WSANtohl(SOCKET a0, unsigned long a1, unsigned long * a2) +{ + static int (WINAPI *fp)(SOCKET a0, unsigned long a1, unsigned long * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSANtohl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSANtohl")) == NULL) { + FATAL("cannot find entry WSANtohl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSANtohs(SOCKET a0, unsigned short a1, unsigned short * a2) +{ + static int (WINAPI *fp)(SOCKET a0, unsigned short a1, unsigned short * a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSANtohs() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSANtohs")) == NULL) { + FATAL("cannot find entry WSANtohs (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WSAAPI +WSAProviderConfigChange(LPHANDLE a0, LPWSAOVERLAPPED a1, LPWSAOVERLAPPED_COMPLETION_ROUTINE a2) +{ + static int (WSAAPI *fp)(LPHANDLE a0, LPWSAOVERLAPPED a1, LPWSAOVERLAPPED_COMPLETION_ROUTINE a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAProviderConfigChange() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAProviderConfigChange")) == NULL) { + FATAL("cannot find entry WSAProviderConfigChange (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +int WINAPI +WSARecv(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSARecv() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSARecv")) == NULL) { + FATAL("cannot find entry WSARecv (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +int WINAPI +WSARecvDisconnect(SOCKET a0, LPWSABUF a1) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSARecvDisconnect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSARecvDisconnect")) == NULL) { + FATAL("cannot find entry WSARecvDisconnect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int WINAPI +WSARecvFrom(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, struct sockaddr * a5, LPINT a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, struct sockaddr * a5, LPINT a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSARecvFrom() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSARecvFrom")) == NULL) { + FATAL("cannot find entry WSARecvFrom (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); +} + +INT WINAPI +WSARemoveServiceClass(LPGUID a0) +{ + static INT (WINAPI *fp)(LPGUID a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSARemoveServiceClass() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSARemoveServiceClass")) == NULL) { + FATAL("cannot find entry WSARemoveServiceClass (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +BOOL WINAPI +WSAResetEvent(WSAEVENT a0) +{ + static BOOL (WINAPI *fp)(WSAEVENT a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAResetEvent() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAResetEvent")) == NULL) { + FATAL("cannot find entry WSAResetEvent (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int WINAPI +WSASend(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASend() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASend")) == NULL) { + FATAL("cannot find entry WSASend (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +int WINAPI +WSASendDisconnect(SOCKET a0, LPWSABUF a1) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASendDisconnect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASendDisconnect")) == NULL) { + FATAL("cannot find entry WSASendDisconnect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int WINAPI +WSASendTo(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, const struct sockaddr * a5, int a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) +{ + static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, const struct sockaddr * a5, int a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASendTo() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASendTo")) == NULL) { + FATAL("cannot find entry WSASendTo (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); +} + +BOOL WINAPI +WSASetEvent(WSAEVENT a0) +{ + static BOOL (WINAPI *fp)(WSAEVENT a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetEvent() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetEvent")) == NULL) { + FATAL("cannot find entry WSASetEvent (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +INT WSAAPI +WSASetServiceA(LPWSAQUERYSETA a0, WSAESETSERVICEOP a1, DWORD a2) +{ + static INT (WSAAPI *fp)(LPWSAQUERYSETA a0, WSAESETSERVICEOP a1, DWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetServiceA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetServiceA")) == NULL) { + FATAL("cannot find entry WSASetServiceA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +INT WINAPI +WSASetServiceW(LPWSAQUERYSETW a0, WSAESETSERVICEOP a1, DWORD a2) +{ + static INT (WINAPI *fp)(LPWSAQUERYSETW a0, WSAESETSERVICEOP a1, DWORD a2); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetServiceW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetServiceW")) == NULL) { + FATAL("cannot find entry WSASetServiceW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2); +} + +SOCKET WINAPI +WSASocketA(int a0, int a1, int a2, LPWSAPROTOCOL_INFOA a3, GROUP a4, DWORD a5) +{ + static SOCKET (WINAPI *fp)(int a0, int a1, int a2, LPWSAPROTOCOL_INFOA a3, GROUP a4, DWORD a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASocketA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASocketA")) == NULL) { + FATAL("cannot find entry WSASocketA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +SOCKET WINAPI +WSASocketW(int a0, int a1, int a2, LPWSAPROTOCOL_INFOW a3, GROUP a4, DWORD a5) +{ + static SOCKET (WINAPI *fp)(int a0, int a1, int a2, LPWSAPROTOCOL_INFOW a3, GROUP a4, DWORD a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASocketW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASocketW")) == NULL) { + FATAL("cannot find entry WSASocketW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +INT WINAPI +WSAStringToAddressA(LPSTR a0, INT a1, LPWSAPROTOCOL_INFOA a2, LPSOCKADDR a3, LPINT a4) +{ + static INT (WINAPI *fp)(LPSTR a0, INT a1, LPWSAPROTOCOL_INFOA a2, LPSOCKADDR a3, LPINT a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAStringToAddressA() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAStringToAddressA")) == NULL) { + FATAL("cannot find entry WSAStringToAddressA (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +INT WINAPI +WSAStringToAddressW(LPWSTR a0, INT a1, LPWSAPROTOCOL_INFOW a2, LPSOCKADDR a3, LPINT a4) +{ + static INT (WINAPI *fp)(LPWSTR a0, INT a1, LPWSAPROTOCOL_INFOW a2, LPSOCKADDR a3, LPINT a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAStringToAddressW() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAStringToAddressW")) == NULL) { + FATAL("cannot find entry WSAStringToAddressW (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +DWORD WINAPI +WSAWaitForMultipleEvents(DWORD a0, const WSAEVENT * a1, BOOL a2, DWORD a3, BOOL a4) +{ + static DWORD (WINAPI *fp)(DWORD a0, const WSAEVENT * a1, BOOL a2, DWORD a3, BOOL a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAWaitForMultipleEvents() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAWaitForMultipleEvents")) == NULL) { + FATAL("cannot find entry WSAWaitForMultipleEvents (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int WINAPI +WSCDeinstallProvider(LPGUID a0, LPINT a1) +{ + static int (WINAPI *fp)(LPGUID a0, LPINT a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCDeinstallProvider() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCDeinstallProvider")) == NULL) { + FATAL("cannot find entry WSCDeinstallProvider (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int WINAPI +WSCEnableNSProvider(LPGUID a0, BOOL a1) +{ + static int (WINAPI *fp)(LPGUID a0, BOOL a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCEnableNSProvider() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCEnableNSProvider")) == NULL) { + FATAL("cannot find entry WSCEnableNSProvider (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int WINAPI +WSCEnumProtocols(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2, LPINT a3) +{ + static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2, LPINT a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCEnumProtocols() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCEnumProtocols")) == NULL) { + FATAL("cannot find entry WSCEnumProtocols (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int WINAPI +WSCGetProviderPath(LPGUID a0, LPWSTR a1, LPINT a2, LPINT a3) +{ + static int (WINAPI *fp)(LPGUID a0, LPWSTR a1, LPINT a2, LPINT a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCGetProviderPath() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCGetProviderPath")) == NULL) { + FATAL("cannot find entry WSCGetProviderPath (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +int WINAPI +WSCInstallNameSpace(LPWSTR a0, LPWSTR a1, DWORD a2, DWORD a3, LPGUID a4) +{ + static int (WINAPI *fp)(LPWSTR a0, LPWSTR a1, DWORD a2, DWORD a3, LPGUID a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCInstallNameSpace() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCInstallNameSpace")) == NULL) { + FATAL("cannot find entry WSCInstallNameSpace (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int WINAPI +WSCInstallProvider(const LPGUID a0, const LPWSTR a1, const LPWSAPROTOCOL_INFOW a2, DWORD a3, LPINT a4) +{ + static int (WINAPI *fp)(const LPGUID a0, const LPWSTR a1, const LPWSAPROTOCOL_INFOW a2, DWORD a3, LPINT a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCInstallProvider() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCInstallProvider")) == NULL) { + FATAL("cannot find entry WSCInstallProvider (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int WINAPI +WSCUnInstallNameSpace(LPGUID a0) +{ + static int (WINAPI *fp)(LPGUID a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCUnInstallNameSpace() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCUnInstallNameSpace")) == NULL) { + FATAL("cannot find entry WSCUnInstallNameSpace (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +WSAAsyncSelect(SOCKET a0, HWND a1, u_int a2, long a3) +{ + static int (PASCAL *fp)(SOCKET a0, HWND a1, u_int a2, long a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncSelect() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncSelect")) == NULL) { + FATAL("cannot find entry WSAAsyncSelect (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +HANDLE PASCAL +_org_WSAAsyncGetHostByAddr(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSAAsyncGetHostByAddr() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByAddr")) == NULL) { + FATAL("cannot find entry WSAAsyncGetHostByAddr (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + +HANDLE PASCAL +_org_WSAAsyncGetHostByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_WSAAsyncGetHostByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetHostByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetProtoByNumber(HWND a0, u_int a1, int a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetProtoByNumber() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByNumber")) == NULL) { + FATAL("cannot find entry WSAAsyncGetProtoByNumber (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetProtoByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetProtoByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetProtoByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +HANDLE PASCAL +WSAAsyncGetServByPort(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetServByPort() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByPort")) == NULL) { + FATAL("cannot find entry WSAAsyncGetServByPort (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +HANDLE PASCAL +WSAAsyncGetServByName(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5) +{ + static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAAsyncGetServByName() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByName")) == NULL) { + FATAL("cannot find entry WSAAsyncGetServByName (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5); +} + +int PASCAL +WSACancelAsyncRequest(HANDLE a0) +{ + static int (PASCAL *fp)(HANDLE a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACancelAsyncRequest() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACancelAsyncRequest")) == NULL) { + FATAL("cannot find entry WSACancelAsyncRequest (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +FARPROC PASCAL +WSASetBlockingHook(FARPROC a0) +{ + static FARPROC (PASCAL *fp)(FARPROC a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetBlockingHook() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetBlockingHook")) == NULL) { + FATAL("cannot find entry WSASetBlockingHook (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0); +} + +int PASCAL +WSAUnhookBlockingHook(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAUnhookBlockingHook() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAUnhookBlockingHook")) == NULL) { + FATAL("cannot find entry WSAUnhookBlockingHook (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSAGetLastError(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAGetLastError() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAGetLastError")) == NULL) { + FATAL("cannot find entry WSAGetLastError (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +void PASCAL +WSASetLastError(int a0) +{ + static void (PASCAL *fp)(int a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSASetLastError() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSASetLastError")) == NULL) { + FATAL("cannot find entry WSASetLastError (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + (*fp)(a0); +} + +int PASCAL +WSACancelBlockingCall(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACancelBlockingCall() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACancelBlockingCall")) == NULL) { + FATAL("cannot find entry WSACancelBlockingCall (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +BOOL PASCAL +WSAIsBlocking(void) +{ + static BOOL (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAIsBlocking() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAIsBlocking")) == NULL) { + FATAL("cannot find entry WSAIsBlocking (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSAStartup(WORD a0, LPWSADATA a1) +{ + static int (PASCAL *fp)(WORD a0, LPWSADATA a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSAStartup() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSAStartup")) == NULL) { + FATAL("cannot find entry WSAStartup (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WSACleanup(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSACleanup() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSACleanup")) == NULL) { + FATAL("cannot find entry WSACleanup (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +__WSAFDIsSet(SOCKET a0, fd_set* a1) +{ + static int (PASCAL *fp)(SOCKET a0, fd_set* a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub __WSAFDIsSet() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "__WSAFDIsSet")) == NULL) { + FATAL("cannot find entry __WSAFDIsSet (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WEP(void) +{ + static int (PASCAL *fp)(void); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WEP() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WEP")) == NULL) { + FATAL("cannot find entry WEP (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(); +} + +int PASCAL +WSCWriteNameSpaceOrder(int a0, int a1) +{ + static int (PASCAL *fp)(int a0, int a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCWriteNameSpaceOrder() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCWriteNameSpaceOrder")) == NULL) { + FATAL("cannot find entry WSCWriteNameSpaceOrder (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WSCWriteProviderOrder(LPDWORD a0, DWORD a1) +{ + static int (PASCAL *fp)(LPDWORD a0, DWORD a1); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCWriteProviderOrder() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCWriteProviderOrder")) == NULL) { + FATAL("cannot find entry WSCWriteProviderOrder (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1); +} + +int PASCAL +WSANSPIoctl(HANDLE a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPVOID a7) +{ + static int (PASCAL *fp)(HANDLE a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPVOID a7); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSANSPIoctl() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSANSPIoctl")) == NULL) { + FATAL("cannot find entry WSANSPIoctl (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); +} + +int PASCAL +WSCUpdateProvider(LPGUID a0, const WCHAR FAR* a1, const LPVOID a2, DWORD a3, LPINT a4) +{ + static int (PASCAL *fp)(LPGUID a0, const WCHAR FAR* a1, const LPVOID a2, DWORD a3, LPINT a4); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub WSCUpdateProvider() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "WSCUpdateProvider")) == NULL) { + FATAL("cannot find entry WSCUpdateProvider (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4); +} + +int PASCAL +_org_getaddrinfo(const char* a0, const char* a1, LPVOID a2, LPVOID a3) +{ + static int (PASCAL *fp)(const char* a0, const char* a1, LPVOID a2, LPVOID a3); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_getaddrinfo() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getaddrinfo")) == NULL) { + FATAL("cannot find entry getaddrinfo (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3); +} + +void PASCAL +_org_freeaddrinfo(LPVOID a0) +{ + static void (PASCAL *fp)(LPVOID a0); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_freeaddrinfo() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "freeaddrinfo")) == NULL) { + FATAL("cannot find entry freeaddrinfo (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + (*fp)(a0); +} + +int PASCAL +_org_getnameinfo(LPVOID a0, DWORD a1, char* a2, DWORD a3, char* a4, DWORD a5, int a6) +{ + static int (PASCAL *fp)(LPVOID a0, DWORD a1, char* a2, DWORD a3, char* a4, DWORD a5, int a6); + +#ifdef DEBUG_STUB + idnLogPrintf(idn_log_level_trace, "stub _org_getnameinfo() called\n"); +#endif + if (fp == NULL) { + void *p; + if ((p = GetProcAddress(DLLHANDLE, "getnameinfo")) == NULL) { + FATAL("cannot find entry getnameinfo (%d)\n", GetLastError()); + abort(); + } + fp = p; + } + return (*fp)(a0, a1, a2, a3, a4, a5, a6); +} + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/make.wnt b/contrib/idn/idnkit-1.0-src/wsock/wsock20/make.wnt new file mode 100644 index 0000000000..b5283aae8a --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/make.wnt @@ -0,0 +1,97 @@ +# +# Makefile for WinSock Wrapper (for WinSock 2.0) +# + +# Copyright (c) 2000 Japan Network Information Center. All rights reserved. +# +# By using this file, you agree to the terms and conditions set forth bellow. +# +# LICENSE TERMS AND CONDITIONS +# +# The following License Terms and Conditions apply, unless a different +# license is obtained from Japan Network Information Center ("JPNIC"), +# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +# Chiyoda-ku, Tokyo 101-0047, Japan. +# +# 1. Use, Modification and Redistribution (including distribution of any +# modified or derived work) in source and/or binary forms is permitted +# under this License Terms and Conditions. +# +# 2. Redistribution of source code must retain the copyright notices as they +# appear in each source code file, this License Terms and Conditions. +# +# 3. Redistribution in binary form must reproduce the Copyright Notice, +# this License Terms and Conditions, in the documentation and/or other +# materials provided with the distribution. For the purposes of binary +# distribution the "Copyright Notice" refers to the following language: +# "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved." +# +# 4. The name of JPNIC may not be used to endorse or promote products +# derived from this Software without specific prior written approval of +# JPNIC. +# +# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +!include + +SYSLIBS = $(libcdll) kernel32.lib advapi32.lib user32.lib + +# +# Files to use +# + +HDRS = dlldef.h ..\common\wrapcommon.h +SRCS = dllmain.c dllload.obj dllfunc.c dllstub.c +OBJS = dllmain.obj dllload.obj dllfunc.obj +LIBS = ..\common\wrapcommon.lib ..\..\lib\idnkit.lib ..\..\win\iconv.lib + +cflags = $(cflags) -I..\..\include + +# +# Targets to Build +# + +TARGETS = ws2_32.dll + +all : $(TARGETS) + +ws2_32.dll : ws2_32.def $(OBJS) $(LIBS) + $(link) $(dlllflags) /OUT:ws2_32.dll /DEF:ws2_32.def $(OBJS) $(LIBS) $(SYSLIBS) + +install : $(TARGETS) + copy ws2_32.dll ..\bin + +clean : force + -del *.obj + -del *.lib + -del *.dll + -del *.exp + +# +# Dependencies +# + +dllmain.obj : dllmain.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +dllload.obj : dllload.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +dllfunc.obj : dllfunc.c dllstub.c $(HDRS) + $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c + +ws2_32o.lib : ws2_32o.def + LIB /DEF:ws2_32o.def /MACHINE:IX86 + +force: + diff --git a/contrib/idn/idnkit-1.0-src/wsock/wsock20/ws2_32.def b/contrib/idn/idnkit-1.0-src/wsock/wsock20/ws2_32.def new file mode 100644 index 0000000000..ba9a44ce9e --- /dev/null +++ b/contrib/idn/idnkit-1.0-src/wsock/wsock20/ws2_32.def @@ -0,0 +1,120 @@ +; +; Library Defition for idn wrapper's wrapper DLL +; +LIBRARY ws2_32 +DESCRIPTION "JPNIC idn warpper DLL for WS2_32" +EXPORTS + accept @1 + bind @2 + closesocket @3 + connect @4 + getpeername @5 + getsockname @6 + getsockopt @7 + htonl @8 + htons @9 + ioctlsocket @10 + inet_addr @11 + inet_ntoa @12 + listen @13 + ntohl @14 + ntohs @15 + recv @16 + recvfrom @17 + select @18 + send @19 + sendto @20 + setsockopt @21 + shutdown @22 + socket @23 + WSApSetPostRoutine @24 + WPUCompleteOverlappedRequest @25 + WSAAccept @26 + WSAAddressToStringA @27 + WSAAddressToStringW @28 + WSACloseEvent @29 + WSAConnect @30 + WSACreateEvent @31 + WSADuplicateSocketA @32 + WSADuplicateSocketW @33 + WSAEnumNameSpaceProvidersA @34 + WSAEnumNameSpaceProvidersW @35 + WSAEnumNetworkEvents @36 + WSAEnumProtocolsA @37 + WSAEnumProtocolsW @38 + WSAEventSelect @39 + WSAGetOverlappedResult @40 + WSAGetQOSByName @41 + WSAGetServiceClassInfoA @42 + WSAGetServiceClassInfoW @43 + WSAGetServiceClassNameByClassIdA @44 + WSAGetServiceClassNameByClassIdW @45 + WSAHtonl @46 + WSAHtons @47 + WSAInstallServiceClassA @48 + WSAInstallServiceClassW @49 + WSAIoctl @50 + gethostbyaddr @51 + gethostbyname @52 + getprotobyname @53 + getprotobynumber @54 + getservbyname @55 + getservbyport @56 + gethostname @57 + WSAJoinLeaf @58 + WSALookupServiceBeginA @59 + WSALookupServiceBeginW @60 + WSALookupServiceEnd @61 + WSALookupServiceNextA @62 + WSALookupServiceNextW @63 + WSANtohl @64 + WSANtohs @65 + WSAProviderConfigChange @66 + WSARecv @67 + WSARecvDisconnect @68 + WSARecvFrom @69 + WSARemoveServiceClass @70 + WSAResetEvent @71 + WSASend @72 + WSASendDisconnect @73 + WSASendTo @74 + WSASetEvent @75 + WSASetServiceA @76 + WSASetServiceW @77 + WSASocketA @78 + WSASocketW @79 + WSAStringToAddressA @80 + WSAStringToAddressW @81 + WSAWaitForMultipleEvents @82 + WSCDeinstallProvider @83 + WSCEnableNSProvider @84 + WSCEnumProtocols @85 + WSCGetProviderPath @86 + WSCInstallNameSpace @87 + WSCInstallProvider @88 + WSCUnInstallNameSpace @89 + WSCWriteNameSpaceOrder @90 + WSCWriteProviderOrder @91 + freeaddrinfo @94 + getaddrinfo @95 + getnameinfo @96 + WSAAsyncSelect @101 + WSAAsyncGetHostByAddr @102 + WSAAsyncGetHostByName @103 + WSAAsyncGetProtoByNumber @104 + WSAAsyncGetProtoByName @105 + WSAAsyncGetServByPort @106 + WSAAsyncGetServByName @107 + WSACancelAsyncRequest @108 + WSASetBlockingHook @109 + WSAUnhookBlockingHook @110 + WSAGetLastError @111 + WSASetLastError @112 + WSACancelBlockingCall @113 + WSAIsBlocking @114 + WSAStartup @115 + WSACleanup @116 + __WSAFDIsSet @151 + WEP @500 + WSANSPIoctl @600 + WSCUpdateProvider @601 From 2610933abd985bdea28801c35d740d2cab2f137a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 4 Jun 2003 00:35:33 +0000 Subject: [PATCH 15/75] 1472. [contrib] idnkit-1.0 from JPNIC, replaces mdnkit. --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 2cd1b5d0b4..15f83e95a8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1472. [contrib] idnkit-1.0 from JPNIC, replaces mdnkit. + 1471. [bug] libbind: updated to BIND 8.4.0. 1470. [bug] Incorrect length passed to snprintf. [RT #5966] From 9c2a5c334b418e9f7c7debd4cd78b5aaa620afce Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 4 Jun 2003 00:39:15 +0000 Subject: [PATCH 16/75] mdnkit has been replace by idnkit --- contrib/idn/mdnkit/ChangeLog | 1534 ---- contrib/idn/mdnkit/DISTFILES | 200 - contrib/idn/mdnkit/INSTALL | 248 - contrib/idn/mdnkit/INSTALL.ja | 253 - contrib/idn/mdnkit/LICENSE.txt | 56 - contrib/idn/mdnkit/Makefile.in | 86 - contrib/idn/mdnkit/NEWS | 226 - contrib/idn/mdnkit/README | 262 - contrib/idn/mdnkit/README.ja | 254 - contrib/idn/mdnkit/acconfig.h | 69 - contrib/idn/mdnkit/aclocal.m4 | 557 -- contrib/idn/mdnkit/config.guess | 1317 --- contrib/idn/mdnkit/config.sub | 1411 --- contrib/idn/mdnkit/configure | 3848 -------- contrib/idn/mdnkit/configure.in | 692 -- contrib/idn/mdnkit/doc/LICENSE.txt | 55 - contrib/idn/mdnkit/doc/en/guide/bind9.html | 233 - .../idn/mdnkit/doc/en/guide/bindconfig.html | 403 - .../idn/mdnkit/doc/en/guide/clientconfig.html | 182 - contrib/idn/mdnkit/doc/en/guide/dnsproxy.html | 158 - contrib/idn/mdnkit/doc/en/guide/guide.html | 441 - contrib/idn/mdnkit/doc/en/guide/install.html | 649 -- .../idn/mdnkit/doc/en/guide/proxyconfig.html | 389 - .../idn/mdnkit/doc/en/guide/reference.html | 194 - .../idn/mdnkit/doc/en/guide/resolvconfig.html | 328 - contrib/idn/mdnkit/doc/en/guide/runmdn.html | 103 - contrib/idn/mdnkit/doc/en/guide/wrapper.html | 491 -- contrib/idn/mdnkit/doc/en/spec/bind9.html | 641 -- .../idn/mdnkit/doc/en/spec/clientconfig.html | 401 - contrib/idn/mdnkit/doc/en/spec/dnsproxy.html | 497 -- contrib/idn/mdnkit/doc/en/spec/index.html | 71 - contrib/idn/mdnkit/doc/en/spec/library.html | 3135 ------- contrib/idn/mdnkit/doc/en/spec/mdnconv.html | 287 - contrib/idn/mdnkit/doc/en/spec/runmdn.html | 165 - contrib/idn/mdnkit/doc/en/spec/spec.html | 181 - contrib/idn/mdnkit/doc/en/spec/wrapper.html | 728 -- contrib/idn/mdnkit/doc/index.html | 24 - contrib/idn/mdnkit/doc/ja/guide/bind9.html | 176 - .../idn/mdnkit/doc/ja/guide/bindconfig.html | 322 - .../idn/mdnkit/doc/ja/guide/clientconfig.html | 130 - contrib/idn/mdnkit/doc/ja/guide/dnsproxy.html | 122 - contrib/idn/mdnkit/doc/ja/guide/guide.html | 320 - .../idn/mdnkit/doc/ja/guide/img/dnsproxy.jpg | Bin 24235 -> 0 bytes .../idn/mdnkit/doc/ja/guide/img/mdnconv.jpg | Bin 18734 -> 0 bytes .../mdnkit/doc/ja/guide/img/method_bind9.jpg | Bin 18873 -> 0 bytes .../mdnkit/doc/ja/guide/img/method_named.jpg | Bin 14311 -> 0 bytes .../mdnkit/doc/ja/guide/img/method_proxy.jpg | Bin 20114 -> 0 bytes .../doc/ja/guide/img/method_resolver.jpg | Bin 14425 -> 0 bytes .../mdnkit/doc/ja/guide/img/method_runmdn.jpg | Bin 20995 -> 0 bytes .../doc/ja/guide/img/method_wrapper.jpg | Bin 14693 -> 0 bytes .../doc/ja/guide/img/wrapper_config1.jpg | Bin 15783 -> 0 bytes .../doc/ja/guide/img/wrapper_config2.jpg | Bin 20918 -> 0 bytes .../doc/ja/guide/img/wrapper_config3.jpg | Bin 36290 -> 0 bytes .../doc/ja/guide/img/wrapper_config4.jpg | Bin 22510 -> 0 bytes .../doc/ja/guide/img/wrapper_config5.jpg | Bin 18183 -> 0 bytes .../doc/ja/guide/img/wrapper_config6.jpg | Bin 27773 -> 0 bytes .../doc/ja/guide/img/wrapper_config7.jpg | Bin 19159 -> 0 bytes .../doc/ja/guide/img/wrapper_config8.jpg | Bin 25806 -> 0 bytes .../doc/ja/guide/img/wrapper_config9.jpg | Bin 38239 -> 0 bytes contrib/idn/mdnkit/doc/ja/guide/install.html | 614 -- .../idn/mdnkit/doc/ja/guide/proxyconfig.html | 332 - .../idn/mdnkit/doc/ja/guide/reference.html | 183 - .../idn/mdnkit/doc/ja/guide/resolvconfig.html | 294 - contrib/idn/mdnkit/doc/ja/guide/runmdn.html | 111 - contrib/idn/mdnkit/doc/ja/guide/wrapper.html | 412 - contrib/idn/mdnkit/doc/ja/index.html | 42 - contrib/idn/mdnkit/doc/ja/spec/bind9.html | 476 - .../idn/mdnkit/doc/ja/spec/clientconfig.html | 281 - contrib/idn/mdnkit/doc/ja/spec/dnsproxy.html | 379 - .../idn/mdnkit/doc/ja/spec/img/bind9_arch.jpg | Bin 38313 -> 0 bytes .../idn/mdnkit/doc/ja/spec/img/components.jpg | Bin 48119 -> 0 bytes .../mdnkit/doc/ja/spec/img/components2.jpg | Bin 40075 -> 0 bytes .../doc/ja/spec/img/libmdn_callgraph.jpg | Bin 44317 -> 0 bytes .../idn/mdnkit/doc/ja/spec/img/translator.jpg | Bin 49308 -> 0 bytes .../idn/mdnkit/doc/ja/spec/img/winsock1.jpg | Bin 5067 -> 0 bytes .../idn/mdnkit/doc/ja/spec/img/winsock2.jpg | Bin 8253 -> 0 bytes .../idn/mdnkit/doc/ja/spec/img/wrapper.jpg | Bin 11992 -> 0 bytes contrib/idn/mdnkit/doc/ja/spec/library.html | 2573 ------ contrib/idn/mdnkit/doc/ja/spec/mdnconv.html | 218 - contrib/idn/mdnkit/doc/ja/spec/runmdn.html | 127 - contrib/idn/mdnkit/doc/ja/spec/spec.html | 136 - contrib/idn/mdnkit/doc/ja/spec/wrapper.html | 518 -- contrib/idn/mdnkit/include/Makefile.in | 75 - contrib/idn/mdnkit/include/config.h.in | 245 - contrib/idn/mdnkit/include/config.h.win | 85 - contrib/idn/mdnkit/include/mdn/Makefile.in | 129 - contrib/idn/mdnkit/include/mdn/ace.h | 130 - contrib/idn/mdnkit/include/mdn/altdude.h | 88 - contrib/idn/mdnkit/include/mdn/amcacem.h | 85 - contrib/idn/mdnkit/include/mdn/amcaceo.h | 85 - contrib/idn/mdnkit/include/mdn/amcacer.h | 86 - contrib/idn/mdnkit/include/mdn/amcacev.h | 85 - contrib/idn/mdnkit/include/mdn/amcacew.h | 85 - contrib/idn/mdnkit/include/mdn/amcacez.h | 86 - contrib/idn/mdnkit/include/mdn/api.h | 229 - contrib/idn/mdnkit/include/mdn/assert.h | 69 - contrib/idn/mdnkit/include/mdn/brace.h | 84 - contrib/idn/mdnkit/include/mdn/checker.h | 178 - contrib/idn/mdnkit/include/mdn/converter.h | 262 - contrib/idn/mdnkit/include/mdn/debug.h | 72 - contrib/idn/mdnkit/include/mdn/delimitermap.h | 148 - contrib/idn/mdnkit/include/mdn/dn.h | 117 - contrib/idn/mdnkit/include/mdn/dude.h | 86 - contrib/idn/mdnkit/include/mdn/filechecker.h | 144 - contrib/idn/mdnkit/include/mdn/filemapper.h | 145 - contrib/idn/mdnkit/include/mdn/lace.h | 82 - .../idn/mdnkit/include/mdn/localencoding.h | 85 - contrib/idn/mdnkit/include/mdn/log.h | 113 - contrib/idn/mdnkit/include/mdn/logmacro.h | 80 - contrib/idn/mdnkit/include/mdn/mace.h | 86 - contrib/idn/mdnkit/include/mdn/mapper.h | 166 - contrib/idn/mdnkit/include/mdn/mapselector.h | 162 - contrib/idn/mdnkit/include/mdn/msgheader.h | 113 - contrib/idn/mdnkit/include/mdn/msgtrans.h | 90 - contrib/idn/mdnkit/include/mdn/nameprep.h | 155 - contrib/idn/mdnkit/include/mdn/normalizer.h | 163 - contrib/idn/mdnkit/include/mdn/race.h | 83 - contrib/idn/mdnkit/include/mdn/res.h | 240 - contrib/idn/mdnkit/include/mdn/resconf.h | 290 - contrib/idn/mdnkit/include/mdn/result.h | 91 - .../idn/mdnkit/include/mdn/selectiveencode.h | 85 - contrib/idn/mdnkit/include/mdn/strhash.h | 131 - contrib/idn/mdnkit/include/mdn/ucsmap.h | 138 - contrib/idn/mdnkit/include/mdn/ucsset.h | 152 - contrib/idn/mdnkit/include/mdn/unicode.h | 243 - contrib/idn/mdnkit/include/mdn/unormalize.h | 106 - contrib/idn/mdnkit/include/mdn/utf5.h | 96 - contrib/idn/mdnkit/include/mdn/utf6.h | 82 - contrib/idn/mdnkit/include/mdn/utf8.h | 143 - contrib/idn/mdnkit/include/mdn/util.h | 111 - contrib/idn/mdnkit/include/mdn/version.h | 76 - contrib/idn/mdnkit/install-sh | 250 - contrib/idn/mdnkit/lib/Makefile.in | 224 - contrib/idn/mdnkit/lib/ace.c | 291 - contrib/idn/mdnkit/lib/altdude.c | 306 - contrib/idn/mdnkit/lib/amcacem.c | 829 -- contrib/idn/mdnkit/lib/amcaceo.c | 656 -- contrib/idn/mdnkit/lib/amcacer.c | 449 - contrib/idn/mdnkit/lib/amcacev.c | 545 -- contrib/idn/mdnkit/lib/amcacew.c | 459 - contrib/idn/mdnkit/lib/amcacez.c | 484 - contrib/idn/mdnkit/lib/api.c | 215 - contrib/idn/mdnkit/lib/brace.c | 666 -- contrib/idn/mdnkit/lib/checker.c | 553 -- contrib/idn/mdnkit/lib/converter.c | 1223 --- contrib/idn/mdnkit/lib/debug.c | 180 - contrib/idn/mdnkit/lib/delimitermap.c | 360 - contrib/idn/mdnkit/lib/dn.c | 341 - contrib/idn/mdnkit/lib/dude.c | 305 - contrib/idn/mdnkit/lib/filechecker.c | 324 - contrib/idn/mdnkit/lib/filemapper.c | 404 - contrib/idn/mdnkit/lib/lace.c | 448 - contrib/idn/mdnkit/lib/localencoding.c | 195 - contrib/idn/mdnkit/lib/log.c | 231 - contrib/idn/mdnkit/lib/mace.c | 506 -- contrib/idn/mdnkit/lib/make.wnt | 302 - contrib/idn/mdnkit/lib/mapper.c | 599 -- contrib/idn/mdnkit/lib/mapselector.c | 430 - contrib/idn/mdnkit/lib/mdn.conf.sample.in | 151 - contrib/idn/mdnkit/lib/msgheader.c | 147 - contrib/idn/mdnkit/lib/msgtrans.c | 665 -- contrib/idn/mdnkit/lib/nameprep.c | 301 - contrib/idn/mdnkit/lib/nameprep_template.c | 136 - contrib/idn/mdnkit/lib/nameprepdata.c | 2726 ------ contrib/idn/mdnkit/lib/normalizer.c | 769 -- contrib/idn/mdnkit/lib/race.c | 462 - contrib/idn/mdnkit/lib/res.c | 890 -- contrib/idn/mdnkit/lib/resconf.c | 1379 --- contrib/idn/mdnkit/lib/result.c | 91 - contrib/idn/mdnkit/lib/selectiveencode.c | 141 - contrib/idn/mdnkit/lib/strhash.c | 299 - contrib/idn/mdnkit/lib/ucsmap.c | 393 - contrib/idn/mdnkit/lib/ucsset.c | 382 - contrib/idn/mdnkit/lib/unicode.c | 531 -- contrib/idn/mdnkit/lib/unicode_template.c | 145 - contrib/idn/mdnkit/lib/unicodedata_301.c | 6803 -------------- contrib/idn/mdnkit/lib/unicodedata_310.c | 7796 ----------------- contrib/idn/mdnkit/lib/unormalize.c | 471 - contrib/idn/mdnkit/lib/utf5.c | 175 - contrib/idn/mdnkit/lib/utf6.c | 551 -- contrib/idn/mdnkit/lib/utf8.c | 292 - contrib/idn/mdnkit/lib/util.c | 227 - contrib/idn/mdnkit/lib/version.c | 70 - contrib/idn/mdnkit/ltconfig | 3114 ------- contrib/idn/mdnkit/ltmain.sh | 4024 --------- contrib/idn/mdnkit/make.wnt | 92 - contrib/idn/mdnkit/man/Makefile.in | 96 - contrib/idn/mdnkit/man/libmdn.3.in | 417 - contrib/idn/mdnkit/man/mdn.conf.5.in | 562 -- contrib/idn/mdnkit/map/Makefile.in | 87 - contrib/idn/mdnkit/map/jp.map | 66 - contrib/idn/mdnkit/mdnsproxy/Makefile.in | 154 - contrib/idn/mdnkit/mdnsproxy/acl.c | 388 - contrib/idn/mdnkit/mdnsproxy/logging.c | 584 -- contrib/idn/mdnkit/mdnsproxy/make.wnt | 128 - contrib/idn/mdnkit/mdnsproxy/mdnsproxy.8.in | 314 - .../mdnkit/mdnsproxy/mdnsproxy.conf.sample | 149 - contrib/idn/mdnkit/mdnsproxy/mdnsproxy.def | 3 - contrib/idn/mdnkit/mdnsproxy/mdnsproxy.h | 211 - contrib/idn/mdnkit/mdnsproxy/message.c | 627 -- contrib/idn/mdnkit/mdnsproxy/os2main.c | 166 - contrib/idn/mdnkit/mdnsproxy/proxycnf.c | 944 -- contrib/idn/mdnkit/mdnsproxy/proxycnf.h | 151 - contrib/idn/mdnkit/mdnsproxy/server.c | 1457 --- contrib/idn/mdnkit/mdnsproxy/translate.c | 291 - contrib/idn/mdnkit/mdnsproxy/unxmain.c | 325 - contrib/idn/mdnkit/mdnsproxy/winmain.c | 178 - contrib/idn/mdnkit/mdnsproxy/winserv.c | 451 - contrib/idn/mdnkit/mdnsproxy/winserv.h | 72 - contrib/idn/mdnkit/mkinstalldirs | 40 - .../idn/mdnkit/patch/bind8/bind-8.2.3-patch | 2429 ----- .../idn/mdnkit/patch/bind9/bind-9.1.3-patch | 4442 ---------- .../idn/mdnkit/patch/bind9/bind-9.2.0-patch | 6047 ------------- .../idn/mdnkit/patch/bind9/patch.configure | 0 contrib/idn/mdnkit/patch/bind9/patch.most | 910 -- .../patch/libiconv/libiconv-1.6.1.patch | 71 - .../patch/squid/squid-2.4.STABLE1-patch | 32 - contrib/idn/mdnkit/tools/Makefile.in | 75 - contrib/idn/mdnkit/tools/mdnconv/Makefile.in | 114 - contrib/idn/mdnkit/tools/mdnconv/mdnconv.1 | 501 -- contrib/idn/mdnkit/tools/mdnconv/mdnconv.c | 546 -- .../idn/mdnkit/tools/mdnconv/mdnslookup.in | 132 - contrib/idn/mdnkit/tools/mdnconv/util.c | 439 - contrib/idn/mdnkit/tools/mdnconv/util.h | 89 - contrib/idn/mdnkit/tools/rpm/mdnkit.spec | 146 - contrib/idn/mdnkit/tools/rpm/mdnsproxy.init | 42 - contrib/idn/mdnkit/tools/runmdn/Makefile.in | 182 - contrib/idn/mdnkit/tools/runmdn/resolver.c | 1049 --- contrib/idn/mdnkit/tools/runmdn/runmdn.1 | 179 - contrib/idn/mdnkit/tools/runmdn/runmdn.in | 125 - contrib/idn/mdnkit/tools/runmdn/stub.c | 389 - contrib/idn/mdnkit/tools/runmdn/stub.h | 94 - contrib/idn/mdnkit/util/SparseMap.pm | 591 -- contrib/idn/mdnkit/util/UCD.pm | 210 - .../idn/mdnkit/util/generate_nameprep_data.pl | 320 - .../mdnkit/util/generate_normalize_data.pl | 602 -- contrib/idn/mdnkit/win/README.WIN | 24 - contrib/idn/mdnkit/wsock/README.txt | 642 -- contrib/idn/mdnkit/wsock/README_j.txt | 707 -- contrib/idn/mdnkit/wsock/common/checkdll.c | 83 - contrib/idn/mdnkit/wsock/common/convert.c | 195 - contrib/idn/mdnkit/wsock/common/dllmain.c | 79 - contrib/idn/mdnkit/wsock/common/dump.c | 119 - contrib/idn/mdnkit/wsock/common/encoding.c | 325 - contrib/idn/mdnkit/wsock/common/hook.c | 239 - contrib/idn/mdnkit/wsock/common/jpnicmdn.def | 21 - contrib/idn/mdnkit/wsock/common/jpnicmdn.h | 133 - contrib/idn/mdnkit/wsock/common/make.wnt | 125 - contrib/idn/mdnkit/wsock/common/printf.c | 137 - contrib/idn/mdnkit/wsock/config/make.wnt | 74 - contrib/idn/mdnkit/wsock/config/mdnconf.tcl | 943 -- contrib/idn/mdnkit/wsock/make.wnt | 106 - contrib/idn/mdnkit/wsock/wsock11/dlldef.h | 116 - contrib/idn/mdnkit/wsock/wsock11/dllfunc.c | 205 - contrib/idn/mdnkit/wsock/wsock11/dllload.c | 114 - contrib/idn/mdnkit/wsock/wsock11/dllmain.c | 144 - contrib/idn/mdnkit/wsock/wsock11/dllstub.c | 1541 ---- contrib/idn/mdnkit/wsock/wsock11/make.wnt | 114 - contrib/idn/mdnkit/wsock/wsock11/wsock32.def | 87 - contrib/idn/mdnkit/wsock/wsock11/wsock32o.def | 88 - contrib/idn/mdnkit/wsock/wsock20/dlldef.h | 143 - contrib/idn/mdnkit/wsock/wsock20/dllfunc.c | 308 - contrib/idn/mdnkit/wsock/wsock20/dllload.c | 113 - contrib/idn/mdnkit/wsock/wsock20/dllmain.c | 136 - contrib/idn/mdnkit/wsock/wsock20/dllstub.c | 2035 ----- contrib/idn/mdnkit/wsock/wsock20/make.wnt | 113 - contrib/idn/mdnkit/wsock/wsock20/ws2_32.def | 113 - contrib/idn/mdnkit/wsock/wsock20/ws2_32o.def | 115 - 268 files changed, 116747 deletions(-) delete mode 100644 contrib/idn/mdnkit/ChangeLog delete mode 100644 contrib/idn/mdnkit/DISTFILES delete mode 100644 contrib/idn/mdnkit/INSTALL delete mode 100644 contrib/idn/mdnkit/INSTALL.ja delete mode 100644 contrib/idn/mdnkit/LICENSE.txt delete mode 100644 contrib/idn/mdnkit/Makefile.in delete mode 100644 contrib/idn/mdnkit/NEWS delete mode 100644 contrib/idn/mdnkit/README delete mode 100644 contrib/idn/mdnkit/README.ja delete mode 100644 contrib/idn/mdnkit/acconfig.h delete mode 100644 contrib/idn/mdnkit/aclocal.m4 delete mode 100644 contrib/idn/mdnkit/config.guess delete mode 100644 contrib/idn/mdnkit/config.sub delete mode 100644 contrib/idn/mdnkit/configure delete mode 100644 contrib/idn/mdnkit/configure.in delete mode 100644 contrib/idn/mdnkit/doc/LICENSE.txt delete mode 100644 contrib/idn/mdnkit/doc/en/guide/bind9.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/bindconfig.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/clientconfig.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/dnsproxy.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/guide.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/install.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/proxyconfig.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/reference.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/resolvconfig.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/runmdn.html delete mode 100644 contrib/idn/mdnkit/doc/en/guide/wrapper.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/bind9.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/clientconfig.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/dnsproxy.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/index.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/library.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/mdnconv.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/runmdn.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/spec.html delete mode 100644 contrib/idn/mdnkit/doc/en/spec/wrapper.html delete mode 100644 contrib/idn/mdnkit/doc/index.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/bind9.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/bindconfig.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/clientconfig.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/dnsproxy.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/guide.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/dnsproxy.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/mdnconv.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_bind9.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_named.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_proxy.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_resolver.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_runmdn.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/method_wrapper.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config1.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config2.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config3.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config4.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config5.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config6.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config7.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config8.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config9.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/install.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/proxyconfig.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/reference.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/resolvconfig.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/runmdn.html delete mode 100644 contrib/idn/mdnkit/doc/ja/guide/wrapper.html delete mode 100644 contrib/idn/mdnkit/doc/ja/index.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/bind9.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/clientconfig.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/dnsproxy.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/bind9_arch.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/components.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/components2.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/libmdn_callgraph.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/translator.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/winsock1.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/winsock2.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/img/wrapper.jpg delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/library.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/mdnconv.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/runmdn.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/spec.html delete mode 100644 contrib/idn/mdnkit/doc/ja/spec/wrapper.html delete mode 100644 contrib/idn/mdnkit/include/Makefile.in delete mode 100644 contrib/idn/mdnkit/include/config.h.in delete mode 100644 contrib/idn/mdnkit/include/config.h.win delete mode 100644 contrib/idn/mdnkit/include/mdn/Makefile.in delete mode 100644 contrib/idn/mdnkit/include/mdn/ace.h delete mode 100644 contrib/idn/mdnkit/include/mdn/altdude.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcacem.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcaceo.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcacer.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcacev.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcacew.h delete mode 100644 contrib/idn/mdnkit/include/mdn/amcacez.h delete mode 100644 contrib/idn/mdnkit/include/mdn/api.h delete mode 100644 contrib/idn/mdnkit/include/mdn/assert.h delete mode 100644 contrib/idn/mdnkit/include/mdn/brace.h delete mode 100644 contrib/idn/mdnkit/include/mdn/checker.h delete mode 100644 contrib/idn/mdnkit/include/mdn/converter.h delete mode 100644 contrib/idn/mdnkit/include/mdn/debug.h delete mode 100644 contrib/idn/mdnkit/include/mdn/delimitermap.h delete mode 100644 contrib/idn/mdnkit/include/mdn/dn.h delete mode 100644 contrib/idn/mdnkit/include/mdn/dude.h delete mode 100644 contrib/idn/mdnkit/include/mdn/filechecker.h delete mode 100644 contrib/idn/mdnkit/include/mdn/filemapper.h delete mode 100644 contrib/idn/mdnkit/include/mdn/lace.h delete mode 100644 contrib/idn/mdnkit/include/mdn/localencoding.h delete mode 100644 contrib/idn/mdnkit/include/mdn/log.h delete mode 100644 contrib/idn/mdnkit/include/mdn/logmacro.h delete mode 100644 contrib/idn/mdnkit/include/mdn/mace.h delete mode 100644 contrib/idn/mdnkit/include/mdn/mapper.h delete mode 100644 contrib/idn/mdnkit/include/mdn/mapselector.h delete mode 100644 contrib/idn/mdnkit/include/mdn/msgheader.h delete mode 100644 contrib/idn/mdnkit/include/mdn/msgtrans.h delete mode 100644 contrib/idn/mdnkit/include/mdn/nameprep.h delete mode 100644 contrib/idn/mdnkit/include/mdn/normalizer.h delete mode 100644 contrib/idn/mdnkit/include/mdn/race.h delete mode 100644 contrib/idn/mdnkit/include/mdn/res.h delete mode 100644 contrib/idn/mdnkit/include/mdn/resconf.h delete mode 100644 contrib/idn/mdnkit/include/mdn/result.h delete mode 100644 contrib/idn/mdnkit/include/mdn/selectiveencode.h delete mode 100644 contrib/idn/mdnkit/include/mdn/strhash.h delete mode 100644 contrib/idn/mdnkit/include/mdn/ucsmap.h delete mode 100644 contrib/idn/mdnkit/include/mdn/ucsset.h delete mode 100644 contrib/idn/mdnkit/include/mdn/unicode.h delete mode 100644 contrib/idn/mdnkit/include/mdn/unormalize.h delete mode 100644 contrib/idn/mdnkit/include/mdn/utf5.h delete mode 100644 contrib/idn/mdnkit/include/mdn/utf6.h delete mode 100644 contrib/idn/mdnkit/include/mdn/utf8.h delete mode 100644 contrib/idn/mdnkit/include/mdn/util.h delete mode 100644 contrib/idn/mdnkit/include/mdn/version.h delete mode 100644 contrib/idn/mdnkit/install-sh delete mode 100644 contrib/idn/mdnkit/lib/Makefile.in delete mode 100644 contrib/idn/mdnkit/lib/ace.c delete mode 100644 contrib/idn/mdnkit/lib/altdude.c delete mode 100644 contrib/idn/mdnkit/lib/amcacem.c delete mode 100644 contrib/idn/mdnkit/lib/amcaceo.c delete mode 100644 contrib/idn/mdnkit/lib/amcacer.c delete mode 100644 contrib/idn/mdnkit/lib/amcacev.c delete mode 100644 contrib/idn/mdnkit/lib/amcacew.c delete mode 100644 contrib/idn/mdnkit/lib/amcacez.c delete mode 100644 contrib/idn/mdnkit/lib/api.c delete mode 100644 contrib/idn/mdnkit/lib/brace.c delete mode 100644 contrib/idn/mdnkit/lib/checker.c delete mode 100644 contrib/idn/mdnkit/lib/converter.c delete mode 100644 contrib/idn/mdnkit/lib/debug.c delete mode 100644 contrib/idn/mdnkit/lib/delimitermap.c delete mode 100644 contrib/idn/mdnkit/lib/dn.c delete mode 100644 contrib/idn/mdnkit/lib/dude.c delete mode 100644 contrib/idn/mdnkit/lib/filechecker.c delete mode 100644 contrib/idn/mdnkit/lib/filemapper.c delete mode 100644 contrib/idn/mdnkit/lib/lace.c delete mode 100644 contrib/idn/mdnkit/lib/localencoding.c delete mode 100644 contrib/idn/mdnkit/lib/log.c delete mode 100644 contrib/idn/mdnkit/lib/mace.c delete mode 100644 contrib/idn/mdnkit/lib/make.wnt delete mode 100644 contrib/idn/mdnkit/lib/mapper.c delete mode 100644 contrib/idn/mdnkit/lib/mapselector.c delete mode 100644 contrib/idn/mdnkit/lib/mdn.conf.sample.in delete mode 100644 contrib/idn/mdnkit/lib/msgheader.c delete mode 100644 contrib/idn/mdnkit/lib/msgtrans.c delete mode 100644 contrib/idn/mdnkit/lib/nameprep.c delete mode 100644 contrib/idn/mdnkit/lib/nameprep_template.c delete mode 100644 contrib/idn/mdnkit/lib/nameprepdata.c delete mode 100644 contrib/idn/mdnkit/lib/normalizer.c delete mode 100644 contrib/idn/mdnkit/lib/race.c delete mode 100644 contrib/idn/mdnkit/lib/res.c delete mode 100644 contrib/idn/mdnkit/lib/resconf.c delete mode 100644 contrib/idn/mdnkit/lib/result.c delete mode 100644 contrib/idn/mdnkit/lib/selectiveencode.c delete mode 100644 contrib/idn/mdnkit/lib/strhash.c delete mode 100644 contrib/idn/mdnkit/lib/ucsmap.c delete mode 100644 contrib/idn/mdnkit/lib/ucsset.c delete mode 100644 contrib/idn/mdnkit/lib/unicode.c delete mode 100644 contrib/idn/mdnkit/lib/unicode_template.c delete mode 100644 contrib/idn/mdnkit/lib/unicodedata_301.c delete mode 100644 contrib/idn/mdnkit/lib/unicodedata_310.c delete mode 100644 contrib/idn/mdnkit/lib/unormalize.c delete mode 100644 contrib/idn/mdnkit/lib/utf5.c delete mode 100644 contrib/idn/mdnkit/lib/utf6.c delete mode 100644 contrib/idn/mdnkit/lib/utf8.c delete mode 100644 contrib/idn/mdnkit/lib/util.c delete mode 100644 contrib/idn/mdnkit/lib/version.c delete mode 100644 contrib/idn/mdnkit/ltconfig delete mode 100644 contrib/idn/mdnkit/ltmain.sh delete mode 100644 contrib/idn/mdnkit/make.wnt delete mode 100644 contrib/idn/mdnkit/man/Makefile.in delete mode 100644 contrib/idn/mdnkit/man/libmdn.3.in delete mode 100644 contrib/idn/mdnkit/man/mdn.conf.5.in delete mode 100644 contrib/idn/mdnkit/map/Makefile.in delete mode 100644 contrib/idn/mdnkit/map/jp.map delete mode 100644 contrib/idn/mdnkit/mdnsproxy/Makefile.in delete mode 100644 contrib/idn/mdnkit/mdnsproxy/acl.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/logging.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/make.wnt delete mode 100644 contrib/idn/mdnkit/mdnsproxy/mdnsproxy.8.in delete mode 100644 contrib/idn/mdnkit/mdnsproxy/mdnsproxy.conf.sample delete mode 100644 contrib/idn/mdnkit/mdnsproxy/mdnsproxy.def delete mode 100644 contrib/idn/mdnkit/mdnsproxy/mdnsproxy.h delete mode 100644 contrib/idn/mdnkit/mdnsproxy/message.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/os2main.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/proxycnf.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/proxycnf.h delete mode 100644 contrib/idn/mdnkit/mdnsproxy/server.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/translate.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/unxmain.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/winmain.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/winserv.c delete mode 100644 contrib/idn/mdnkit/mdnsproxy/winserv.h delete mode 100644 contrib/idn/mdnkit/mkinstalldirs delete mode 100644 contrib/idn/mdnkit/patch/bind8/bind-8.2.3-patch delete mode 100644 contrib/idn/mdnkit/patch/bind9/bind-9.1.3-patch delete mode 100644 contrib/idn/mdnkit/patch/bind9/bind-9.2.0-patch delete mode 100644 contrib/idn/mdnkit/patch/bind9/patch.configure delete mode 100644 contrib/idn/mdnkit/patch/bind9/patch.most delete mode 100644 contrib/idn/mdnkit/patch/libiconv/libiconv-1.6.1.patch delete mode 100644 contrib/idn/mdnkit/patch/squid/squid-2.4.STABLE1-patch delete mode 100644 contrib/idn/mdnkit/tools/Makefile.in delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/Makefile.in delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/mdnconv.1 delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/mdnconv.c delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/mdnslookup.in delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/util.c delete mode 100644 contrib/idn/mdnkit/tools/mdnconv/util.h delete mode 100644 contrib/idn/mdnkit/tools/rpm/mdnkit.spec delete mode 100644 contrib/idn/mdnkit/tools/rpm/mdnsproxy.init delete mode 100644 contrib/idn/mdnkit/tools/runmdn/Makefile.in delete mode 100644 contrib/idn/mdnkit/tools/runmdn/resolver.c delete mode 100644 contrib/idn/mdnkit/tools/runmdn/runmdn.1 delete mode 100644 contrib/idn/mdnkit/tools/runmdn/runmdn.in delete mode 100644 contrib/idn/mdnkit/tools/runmdn/stub.c delete mode 100644 contrib/idn/mdnkit/tools/runmdn/stub.h delete mode 100644 contrib/idn/mdnkit/util/SparseMap.pm delete mode 100644 contrib/idn/mdnkit/util/UCD.pm delete mode 100644 contrib/idn/mdnkit/util/generate_nameprep_data.pl delete mode 100644 contrib/idn/mdnkit/util/generate_normalize_data.pl delete mode 100644 contrib/idn/mdnkit/win/README.WIN delete mode 100644 contrib/idn/mdnkit/wsock/README.txt delete mode 100644 contrib/idn/mdnkit/wsock/README_j.txt delete mode 100644 contrib/idn/mdnkit/wsock/common/checkdll.c delete mode 100644 contrib/idn/mdnkit/wsock/common/convert.c delete mode 100644 contrib/idn/mdnkit/wsock/common/dllmain.c delete mode 100644 contrib/idn/mdnkit/wsock/common/dump.c delete mode 100644 contrib/idn/mdnkit/wsock/common/encoding.c delete mode 100644 contrib/idn/mdnkit/wsock/common/hook.c delete mode 100644 contrib/idn/mdnkit/wsock/common/jpnicmdn.def delete mode 100644 contrib/idn/mdnkit/wsock/common/jpnicmdn.h delete mode 100644 contrib/idn/mdnkit/wsock/common/make.wnt delete mode 100644 contrib/idn/mdnkit/wsock/common/printf.c delete mode 100644 contrib/idn/mdnkit/wsock/config/make.wnt delete mode 100644 contrib/idn/mdnkit/wsock/config/mdnconf.tcl delete mode 100644 contrib/idn/mdnkit/wsock/make.wnt delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/dlldef.h delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/dllfunc.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/dllload.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/dllmain.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/dllstub.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/make.wnt delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/wsock32.def delete mode 100644 contrib/idn/mdnkit/wsock/wsock11/wsock32o.def delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/dlldef.h delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/dllfunc.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/dllload.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/dllmain.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/dllstub.c delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/make.wnt delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/ws2_32.def delete mode 100644 contrib/idn/mdnkit/wsock/wsock20/ws2_32o.def diff --git a/contrib/idn/mdnkit/ChangeLog b/contrib/idn/mdnkit/ChangeLog deleted file mode 100644 index da26f2b48f..0000000000 --- a/contrib/idn/mdnkit/ChangeLog +++ /dev/null @@ -1,1534 +0,0 @@ -2001-12-06 - * 2.2.3 release. - - * lib/uticode.c: fix a bug in mdn__unicode_decompose() that assumes - sizeof(size_t) equals to sizeof(int). - * lib/converter.c: always include . - -2001-12-03 - * DISTFILES: add patch/bind9/bind-9.2.0.patch. - - * lib/checker.c, lib/mapper.c, lib/nameprep.c, lib/nameprepdata.c, - lib/normalizer.c: recognize "nameprep-06". - * lib/mdn.conf.sample.in, man/mdn.conf.5.in, tools/mdnconv/mdnconv.1: - add description about "nameprep-06". - -2001-11-28 - - * lib/Makefile.in, tools/runmdn/Makefile.in: Change LIB_REVISION - from 2 to 3. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2.3". - -2001-11-21 - * tools/runmdn/stub.c: fix type mismatch bug of `fp'. - * lib/converter.c: always include . - -2001-10-31 - * 2.2.2 release. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2.3". - - * configure.in: on NetBSD, use `:' as a separator of LD_PRELOAD - if /usr/bin/grep is ELF binary, use ` ' otherwise. - * wsock/config/mdnconf.tcl: update version number to 2.2.2. - - * README, README.ja: update the list of supported systems. - -2001-10-30 - * wsock/config/mdnconf.tcl: update version number to 2.2.1. - -2001-10-29 - * 2.2.1 release. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2.1". - - * lib/Makefile.in, tools/runmdn/Makefile.in: Change LIB_REVISION - from 1 to 2. - -2001-10-17 - * lib/checker.c (mdn_checker_lookup): Fix a serious bug that the - function overlooks a prohibited character. - -2001-09-19 - * 2.2 release. - -2001-09-17 - * NEWS: add description about deletion of `allow-utf8' to "Major - changes in version 2.1". - - * README, README.ja: add some platforms to the list of supported - systems. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2". - -2001-09-14 - * lib/amcacez.c, include/mdn/amcacez.h: update draft version. - -2001-09-12 - * wsock/config/mdnconf.tcl: update version number. - -2001-09-11 - * INSTALL.ja: The title is fixed. - -2001-09-10 - * Makefile.in: add dummy target 'force' to work around a problem - in cygwin, where the existance of "INSTALL" file disturbs - "make install". - * lib/make.wnt: add rules for amcace[vwz].o and mace.o. - * util/SparseMap.pm, util/generate_nameprep_data.pl, - util/generate_normalize_data.pl: add 'const' qualification to - the generated (large) constant tables, for better data sharing. - * lib/nameprepdata.c, lib/unicodedata_301.c, lib/unicodedata_310.c: - regenerated using above scripts. - * lib/nameprep.c, lib/nameprep_template.c, lib/unicode.c, - lib/unicode_template.c: accommodate declarations to the above - changes. - -2001-08-28 - * 2.2rc1 release. - - * DISTFILES: delete patch/bind9/bind-9.1.2-patch. - - * include/mdn/version.h: set MDNKIT_VERSION to 2.2rc1. - -2001-08-27 - * include/mdn/amcacez.h, lib/amcacez.c: update to conform to - version 0.3.0 (draft-ietf-idn-amc-ace-z-00.txt). - - * configure.in, lib/amcacez.c, INSTALL, INSTALL.ja: define "zq--" - as new default ACE prefix for AMC-ACE-Z. - -2001-08-21 - * lib/mdn.conf.sample.in, man/mdn.conf.5.in, tools/mdnconv/mdnconv.1: - undocument unicode-form-{c,d,kd}, unicode-{upper,lower,fold}case, - ascii-{upper,lower}case and nameprep-{02,04}. - -2001-08-20 - * tools/runmdn/runmdn.1: Use the term "codeset" rather than - "encoding". - -2001-08-17 - * INSTALL: fix typo. - -2001-08-15 - * README, README.ja: show a list of supported systems as a table. - - * tools/runmdn/runmdn.in: parse command line options, and recognize - option `-e' which sets local encoding. - * tools/runmdn/runmdn.1: add description about `-e' option. - * tools/runmdn/Makefile.in: update `runmdn' if it is older than - `runmdn.in'. - - * INSTALL and INSTALL.ja: new files. - * README, README.ja: `Compilation and Intallation' section is moved - to INSTALL and INSTALL.ja. - * DISTFILES: add INSTALL and INSTALL.ja. - - * lib/converter.c, README, README.ja: unless --enable-extra-ace - option to configure is specified, support only three ACEs: - AMC-ACE-Z, RACE and DUDE. - - * lib/namrprep.c, lib/converter.c, lib/checker.c, lib/mapper.c: - delete `nameprep-02' and `nameprep-04' supports. - - * lib/mdn.conf.sample.in, man/mdn.conf.5.in, tools/mdnconv/mdnconv.1: - delete description about `nameprep-02', `nameprep-04' and extra ACEs. - -2001-08-14 - * README, README.ja: update information about compilation problem - of libiconv-1.6.1 on NetBSD. - -2001-08-13 - * README, README.ja: revise description of compilation and - installation process. - * tools/mdnconv/mdnconv.c: revise error messages displayed - when default input/output codeset is wrong. - -2001-08-06 - * 2.2beta3 release. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2beta3". - - * README, README.ja: describe CPU architure of FreeBSD on which - we have tested. - -2001-08-01 - * util/generate_nameprep_data.pl: add pragma 'use bytes;' to - avoid outputing incorrect map data when perl 5.6.1 is used. - * lib/nameprepdata.c: add data for nameprep-04 and -05. - * lib/nameprep.c: add support for 'nameprep-04' and 'nameprep-05'. - current version is now nameprep-05. - * lib/checker.c, lib/mapper.c: add 'nameprep-04' and 'nameprep-05'. - * lib/unicodedata.c: removed. - * lib/unicodedata_301.c, lib/unicodedata_310.c: created. - both contains various Unicode table of version 3.0.1 and 3.1.0. - * lib/unicode_template.c: created. contains helper functions for - each Unicode versions. - * include/mdn/unicode.h, lib/unicode.c: add new interface - functions 'mdn__unicode_create' and 'mdn__unicode_destroy'. - now all existing functions take an extra argument which specifies - the version of Unicode standard. - * include/mdn/unicode.h, lib/unicode.c - * include/mdn/unormalize.h, lib/unormalize.c: change interface - so that the version of Unicode standard can be specified. - * lib/normalizer.c: add bunch of normalization schemes, - unicode-from-{c,d,kc,kd}/{3.0.1,3.1.0}, nameprep-{04,05}. - use new unormalize module interface. - * DISTFILES, lib/Makefile.in: add unicode_template.c, - unicodedata_301.c and unicodedata_310.c. remove unicodedata.c. - * util/generate_normalize_data.pl: add -prefix option. - * man/mdn.conf.5.in, tools/mdnconv/mdnconv.1: add description of - newly added schemes. - * lib/mdn.conf.sample.in: likewise. - -2001-07-31 - * include/mdn/res.h, lib/res.c: add new functions and macros - mdn_res_nameprep() and mdn_res_nameprepcheck(). - * include/mdn/api.h: add new macro mdn_nameprepcheck(). - -2001-07-27 - * README, README.ja: describe `--with-utf-6-prefix'. - -2001-07-26 - * tools/mdnconv/mdnconv.1: add a description on the nameprep check - performed in reverse conversion mode. - * tools/mdnconv/util.c: fix typo in comment. - - * tools/mdnconv/mdnconv.c: don't perform selective-decode or - selective-decode if both `-whole' and `-reverse' options are specified. - * tools/mdnconv/mdnconv.c: perform NAMEPREP unassigned check if both - `-reverse' and `-unassigncheck' options are specified - - * tools/mdnconv/mdnslookup.in: add missing quotation. - - * DISTFILES: add patch/bind9/bind-9.1.3-patch. - -2001-07-25 - * tools/mdnconv/mdnslookup.in: new file. - * tools/mdnconv/Makefile.in: `all' target also depends on `mdnslookup'. - generate `mdnslookup' from `mdnslookup.in'. - * README, README.ja: add the ``Check your configuration'' section. - * DISTFILES: add tools/mdnconv/mdnslookup.in. - - * tools/mdnconv/Makefile.in: honor LDFLAGS. - * lib/amcacez.c: do some optimization. - -2001-07-24 - * README, README.ja: add TOC, ``Supported systems'' section and - ``Other configure options'' subsection. - -2001-07-23 - * tools/mdnconv/mdnconv.1, tools/runmdn/runmdn.1: add the ``LOCAL - CODESET'' section. - -2001-07-18 - * 2.2beta2 release. - - * README, README.ja: update version number in the title. - -2001-07-17 - * include/mdn/version.h: set MDNKIT_VERSION to "2.2beta2". - - * configure.in: fix result messages of cheking gethostbyaddr() - and getnameinfo() flavors. display "none" if the function is - not found. - -2001-07-16 - * include/mdn/amcacez.h, lib/amcacez.c: update to conform to - version 0.2.1, which is the version of -00 draft. - -2001-07-12 - * README, README.ja: explain `--enable-debug' option. - -2001-07-11 - * configure.in: add `--enable-debug' option. - if this option is specified, add "-DDEBUG" to CFLAGS. - -2001-07-10 - * configure.in: check flavor of getnameinfo(). - * configure.in: test program for checking flavor of gethostbyaddr() - includes and , since some system defines - `socklen_t' in either file. - * configure.in: define GNI_SALEN_T, GNI_HOSTLEN_T, GNI_SERVLEN_T - and GNI_FLAGS_T. - * tools/runmdn/resolver.c, tools/runmdn/stub.c, tools/runmdn/stub.h: - use GNI_SALEN_T, GNI_HOSTLEN_T, GNI_SERVLEN_T and GNI_FLAGS_T to - represent types of arguments to getnameinfo(). - - * include/mdn/logmacro.h: enable trace-level log even if compiled - without DEBUG option. - * lib/log.c: slightly optimize mdn_log_getlevel(), as it is called - number of times from everywhere. - -2001-07-09 - * lib/res.c: in mdn_res_nameconv(), procedures of insn `!m', `!n' - and `!N' converted an input string into a result of NAMEPREP, but - it must do NAMEPREP check only. fixed. - -2001-07-06 - * lib/msgtrans.c: perform NAMEPREP check at decoding a name. - * lib/api.c, include/mdn/api.h: mdn_decodename() accepts - MDN_UNASCHECK action. - - * mdnsproxy/translate.c: fix typo in a warning message. - - * include/mdn/res.h, lib/mdn/res.c: conversion to alternate encoding - is no longer supported. - * include/mdn/resconf.h, lib/resconf.c: no longer support - alternate encoding, though functions related to alternate encoding - such as mdn_resconf_setalternateconverter() are still remained. - ignore `alternate-encoding' entry in a configuration file. - * lib/mdn.conf.sample.in: delete `alternate-encoding' entry. - * man/mdn.conf.5.in: delete "ALTERNATE-ENCODING ENTRY" section. - delete `alternate-encoding' entry in the sample configuration. - * man/libmdn.3.in: delete description about alternate encoding. - - * lib/res.c: mdn_res_nameconv() doesn't support insn `a' or `A' - any longer. nameconv_A() and nameconv_a() are removed. - -2001-07-05 - * include/mdn/version.h: set MDNKIT_VERSION to "2.2snap0705". - -2001-07-04 - * include/mdn/amcacez.h, lib/amcacez.c: created. - * include/mdn/Makefile.in, lib/Makefile.in, tools/runmdn/Makefile.in: - add above new files. - * DISTFILES: add above new files. - * lib/converter.c: add AMC-ACE-Z. - * configure.in: add prefix configuration option - (--with-amc-ace-z-prefix) for this ACE. - * configure: rebuilt. - * lib/amcacew.c: correct a bug in input range check. - - * include/mdn/api.h: add MDN_NAMEPREP to MDN_DECODE_APP. - * lib/mdn/api.c: mdn_decodename() recognizes MDN_NAMEPREP action. - - * include/mdn/converter.h: define encoding types: MDN_NONACE, - MDN_ACE_STRICTCASE and MDN_ACE_LOOSECASE. - * include/mdn/converter.h, lib/converter.c: add new function - mdn_converter_encodingtype(). - * include/mdn/converter.h, lib/converter.c: 3rd argument of - mdn_converter_register() is now `encoding_type'. - - * include/mdn/res.h, lib/mdn/res.c: add new insn `!m', `!n', `!p', - `!N' and `!u' to mdn_res_nameconv(). - * include/mdn/res.h, lib/mdn/res.c: mdn_res_dnstoucs(...) is - equivalent to mdn_res_nameconv("i!N", ...). - - * lib/checker.c, lib/mapper.c: fix a bug that allocated memory is - not disposed if input name is too long. - - * lib/checker.c: mdn_checker_lookup() returns `mdn_success' if - registered character is found in an input string. - -2001-07-03 - * configure.in: check if the codeset name for UTF-8 encoding (`UTF-8', - which is default, or the one specified with --with-utf8 option) is - valid, and give a warning message if it doesn't seem so. - * configure: rebuilt. - -2001-07-02 - * configure.in: check if `iconv.h' exists in the directory specified - by --with-iconv-include=DIR, or in the `PREFIX/include' directory - specified by --with-libiconv=PREFIX. - * configure.in: check if C compiler can find `iconv.h'. - -2001-06-25 - * 2.2beta1 release. - - * include/mdn/version.h: set MDNKIT_VERSION to "2.2beta1", and set - MDNKIT_MINOR_VERSION to 2. - * lib/Makefile.in, tools/runmdn/Makefile.in: Set library version - (LIB_CURRENT:LIB_REVISION:LIB_AGE) to 7:1:0. - -2001-06-19 - * configure.in: add missing double quotation mark (") in - AC_OUTPUT_COMMANDS. - * include/mdn/dude.h, lib/dude.c: update to conform to -02 spec. - * include/mdn/amcacev.h, lib/amcacev.c: created. - * include/mdn/amcacew.h, lib/amcacew.c: created. - * include/mdn/mace.h, lib/mace.c: created. - * include/mdn/Makefile.in, lib/Makefile.in, tools/runmdn/Makefile.in: - add above new files. - * DISTFILES: add above new files. - * lib/converter.c: add AMC-ACE-V, AMC-ACE-W and MACE. - * configure.in: add prefix configuration options (--with-*-prefix) - for these new ACEs. - * configure: rebuilt. - * include/mdn/version.h: set MDNKIT_VERSION to "2.2snap0619". - - * configure.in: add `--with-iconv-include' and `--with-libiconv' - options. - * lib/Makefile.in, mdnsproxy/Makefile.in, tools/mdnconv/Makefile.in, - tools/runmnd/Makefile.in: define ICONVINC and append its value to - INCS. - -2001-06-18 - * mdnsproxy/logging.c: fix a bug that whether libmdn message is - logged or not is determined by `log-level', not `libmdn-log-level'. - - * configure.in: also check glib-2.2 flavor of gethostbyaddr(). - * configure.in, include/config.h: define GHBA_ADDR_T which is - type of 1st argument to gethostbyaddr() and gethostbyaddr_r(). - * configure.in, tools/Makefile.in: if parameter type list of - gethostbyaddr() is unknown, nothing will be built in `tools/runmdn' - directory. - * tools/runmdn/resolver.c, tools/runmdn/stub.c, tools/runmdn/stub.h: - use GHBA_ADD_T as type of 1st parameter to gethostbyaddr() and - gethostbyaddr_r(). - * acconfig.h: delete GETHOST_R_GLIBC_FLAVOR and GHBA_ADDRLEN_T. - -2001-06-14 - * mdnsproxy/logging.c: shorten a program. use vfprintf() rather - than vsprintf()+fputs(). - -2001-06-12 - * lib/converter.c: output warning message if iconv() or iconv_open() - fails. - * lib/api.c, lib/res.c: output 256 characters maximum, when they - output a string to be translated and its result as trace message. - * lib/msgtrans.c: log a string to be translated and its result with - the priority INFO. - - * lib/res.c, include/mdn/res.h: use the term `insn' rather than - `action', for the 2nd argument to mdn_res_nameconv(). - -2001-06-07 - * include/mdn/amcacer.h, lib/amcacer.c: update to meet -01 spec. - -2001-06-04 - * mdnsproxy/mdnsproxy.h: define LOGMODE_STDERR. - * mdnsproxy/logging.c: output messages to standard error if the - configuration entry `log-file' is set to `stderr'. - * mdsproxy/logging.c: merge libmdn_logproc_syslog() and - libmdn_logproc_file() into libmdn_logproc(). - * mdsproxy/logging.c: insert date string to log messages if - mdnsproxy logs events to regular file. - * mdnsproxy/logging.c: fix a bug that mdnsproxy doesn't turn over - a log file correctly. - * mdnsproxy/unxmain.c: do not close file descriptor 2. - - * lib/resconf.c: 2nd arguemnt to the following functions can be NULL: - mdn_resconf_setalternateconverter(), mdn_resconf_setdelimitermap(), - mdn_resconf_setidnconverter(), mdn_resconf_setlocalconverter(), - mdn_resconf_setlocalmapselector(), mdn_resconf_setmapper(), - mdn_resconf_setnormalizer(), mdn_resconf_setprohibitchecker(), - mdn_resconf_setunassignedchecker(). - -2001-06-01 - * 2.1 release. - - * patch/libiconv/libiconv-1.6.1.patch: created. this patch fixes - a bug in ltconfig included in libiconv-1.6.1 distribution. similar - fix is already incorporated in mDNkit (see 2001-05-21 entry). - * DISTFILES: add above file to the distribution list. - * README, README.ja: add note for the libiconv patch. - * tools/rpm/mdnkit.spec: update for 2.1 release. - * include/mdn/version.h: set MDNKIT_VERSION to `2.1'. - -2001-05-31 - * lib/normalizer.c: create a new typedef for the function pointer - used in normalizer_unicode_caseconv() with argument prototype - so that compiler can detect argument mismatch. - * lib/selectiveencode.c, lib/util.c: include - and respectively, which should obviously have been - included. - * mdnsproxy/logging.c: make log_strtofacility() static. - * mdnsproxy/mdnsproxy.h: add declaration of translate_finish(). - * mdnsproxy/Makefile.in: remove extra `/' from CONFIG_PATH. just - a cosmetic change. - -2001-05-30 - * lib/normalizer.c: fix a bug in normalizer_unicode_caseconv(). - It might pass a pointer of incompatible sized object to - mdn__unicode_toupper(). - -2001-05-21 - * 2.1beta2 release. - - * ltconfig: fix a bug that caused runtime link error in NetBSD 1.5. - * include/mdn/version.h: set MDNKIT_VERSION to `2.1beta2'. - - * patch/bind9/bind-9.1.2-patch: created. - * DISTFILES: replace patch/bind9/bind-9.1.1-patch with the above - file. - -2001-05-18 - * configure.in: fix a bug that makes --with-logdir option ignored. - * configure.in: add --with-preference option to specify preference - of the default configuration. - * configure: rebuilt. - * lib/mdn.conf.sample.in: add configuration data for preference "jp". - * lib/Makefile.in: tailor mdn.conf.sample to the preference. - install default mdn.conf (if not exists) when a preference is - specified. - * README, README.ja: add description on --with-preference. - * tools/mdnconv/mdnconv.c: provide single character options - (such as -i) for frequently used ones. - * tools/mdnconv/mdnconv.1: list those options. - * tools/mdnconv/mdnconv.c: assume -reverse option if the command - name begins with `r' (like `rmdnconv'). - -2001-05-15 - * man/libmdn.3.in: created. - * man/Makefile.in: generate and install libmdn.3 from libmdn.3.in. - * DISTFILES: add man/libmdn.3.in to the distribution list. - * lib/res.c: make sure convesion actually takes place when - converting from alternate encoding to utf8. - -2001-05-10 - * make.os2, include/config.h.os2, lib/make.os2, mdnsproxy/make.os2: - removed, since they are no longer maintained. - * win/iconv.dll, win/iconv.h, win/iconv.lib: removed, since - it is easy to create them using libiconv and VC++. - * DISTFILES: delete above files from the distribution. - * win/README.WIN: update description appropriately. - -2001-05-07 - * mdnsproxy/mdnsproxy.8.in: fix typo in FILES. - * lib/Makefile.in: ignore exit status of a command sequence - combined with `&&' so that `make install' correctly works - when `--disable-static' option is specified to `configure'. - * wsock/README.txt, wsock/README_j.txt: change `dnsproxy' to - `mdnsproxy'. - -2001-05-02 - * patch/squid/squid-2.4.STABLE1-patch: created. - * DISTFILES: replace squid-2.3.STABLE3-patch with the above one. - * README, README.ja: update squid patch version. - -2001-04-26 - * patch/bind9/bind-9.1.1-patch: clean up and remove unnecessary - modifications. - -2001-04-24 - * 2.1beta1 release. - - * lib/mapselector.c: fix TLD-mapping routine so that domain - name like `foo.' is not recognized as a local domain name. - * lib/mdn.conf.sample.in: revise comments on local-map entry. - * man/mdn.conf.5.in: add description on the special - TLD patterns `-' and `.' in local-map entry. - - * include/mdn/version.h: Set MDNKIT_VERSION to `2.1beta1'. - - * tools/rpm/mdnkit.spec: Set version to `2.1', and serial to - `2001042501'. - -2001-04-23 - * tools/runmdn/runmdn.1: add a note on guessing local codeset. - - * mdnsproxy/proxycnf.h, mdnsproxy/unxmain.c: implement - `-version' option. - * mdnsproxy/mdnsproxy.8.in: add description of `-version' - option. - -2001-04-20 - * include/mdn/version.h, lib/version.c: created. implement - `mdn_version_getstring()'. - * include/mdn/util.h, lib/util.c: remove `mdn_get_version()'. - * lib/Makefile.in, lib/make.wnt, tools/runmdn/Makefile.in: - add `version.c' to the source file list. - * tools/mdnconv/mdnconv.c: replace `mdn_get_version()' with - `mdn_version_getstring()'. print both mdnconv's version and - library version. - * DISTFILES: add `lib/version.c' to the distribution list. - - * wsock/config/mdnconf.tcl: display the name of the program and - its version at the top of the window. - * wsock/common/convert.c: log the version number if the log level - is `info' or higher. - * wsock/common/jpnicmdn.h: include for getting - version string. - * wsock/common/encoding.c: do not create unnecessary registry - keys. - - * tools/mdnconv/mdnconv.1: add description on `-version' option. - - * tools/runmdn/stub.h: fix typo. - - * mdnsproxy/logging.c: fix a bug that mdnsproxy doesn't output - libmdn log message to log file. - * mdnsproxy/logging.c: output version information to the log. - - * configure.in: substitute @LIBDL@ to -ldl if libdl exists. - * configure: rebuilt. - * tools/runmdn/Makefile.in: add @LIBDL@ to the dependency - library for libmdnresolv, so that dlopen is available when - libmdnresolv is loaded. - - * README, README.ja: update for version 2.1. - -2001-04-19 - * DISTFILES: Add `patch/bind9/bind-9.1.1-patch'. - - * aclocal.m4: add AC_ACE_PREFIX, AC_ACE_SUFFIX, AC_ACE_SIGNATURE - macro for dealing with ACE signature options. - * configure.in: use the above macro. add new options - `--with-utf-6-prefix', `--with-dude-prefix', `--with-altdude-prefix', - `--with-altdude-suffix', `--with-amc-ace-m-prefix', - `--with-amc-ace-m-suffix', `--with-amc-ace-o-prefix', - `--with-amc-ace-o-suffix' and `--with-amc-ace-r-prefix'. - * README, README.ja: add description for these options. - * configure, include/config.h.in: rebuilt. - - * lib/filechecker.c: relax the setfile syntax check so that - lines like `XXXX;' becomes valid. - * tools/mdnconv/mdnconv.c: fix a bug in parsing `-alias' option. - -2001-04-18 - * configure.in: check the type of the 2nd argument of gethostbyaddr, - which is either `int' or `size_t' depending on your system, - and define `GHBA_ADDRLEN_T' appropriately. - * acconfig.h: add `GHBA_ADDRLEN_T'. - * configure, include/config.h.in: rebuilt. - * tools/runmdn/resolver.c, tools/runmdn/stub.c, tools/runmdn/stub.h: - make use of `GHBA_ADDRLEN_T'. - -2001-04-17 - * lib/converter.c: incorporate AltDUDE, AMC-ACE-{M,O,R} with - normal configuration. - * lib/mak.wnt: add altdude.c, amcace{m,o,r}.c. - * man/mdn.conf.5.in, tools/mdnconv/mdnconv.1,lib/mdn.conf.sample.in: - add AltDUDE, AMC-ACE-{M,O,R} to the list of available encodings. - - * include/mdn/version.h.in, include/mdn/version.h: delete - `include/mdn/version.h.in' and instead add `include/mdn/version.h'. - * DISTFILES: likewise. - * configure.in: delete definition of VERSION, PREV_VERSION and - PREV_TAG. - * Makefile.in: get version number from `include/mdn/version.h', - when making a source package. - * Makefile.in: delete the `patch' rule. - - * lib/util.c: include . - get version number from the cpp macro `MDNKIT_VERSION', not `VERSION'. - - * configure.in: check existance of gethostbyname2_r. check - the flavor of gethostbyXXX_r functions. define - GETHOST_R_GLIBC_FLAVOR if the flavor is glibc. - * acconfig.h: add GETHOST_R_GLIBC_FLAVOR. - * configure, include/config.h.in: rebuilt. - * tools/runmdn/resolver.c, tools/runmdn/stub.c: support glibc - style gethostXXX_r functions. - * tools/runmdn/runmdn.1: add gethostbyname2_r to the list of - functions replaced by runmdn. - - * lib/amcacer.c: change the default ACE signature of AMC-ACE-R - from suffix (-amc3) to prefix (amc3-) in order for the converted - names not to begin with a hyphen. - - * tools/runmdn/resolver.c: include . - * tools/runmdn/stub.c: ditto. - * tools/runmdn/stub.h: add declaration of mdn_stub_gethostbyname_r(), - mdn_stub_gethostbyname2_r() and mdn_stub_gethostbyaddr_r() for glibc. - -2001-04-16 - * lib/delimitermap.c: not to use the ucsset module to simplify - API for the Perl modules. - - * tools/mdnconv/util.c: fix the number of arguments passed to - errormsg(). - - * configure.in: define VERSION, PREV_VERSION and PREV_TAG. - * Makefile.in: refer to @VERSION@, @PREV_VERSION@ and @PREV_TAG@. - * lib/util.c, include/mdn/util.h: add mdn_get_version(). - * tools/mdnconv/mdnconv.c: add `-version' option. - - * include/mdn/version.h.in: new file. - * include/mdn/Makefile.in: add version.h to HDRS. - * DISTFILES: add include/mdn/version.h.in. - * configure.in: add include/mdn/version.h to AC_OUTPUT. - * configure.in: get MAJOR_VERSION and MINOR_VERSION from VERSION, - and substitute them using AC_SUBST. - -2001-04-13 - * tools/runmdn/resolver.c: increase static buffer size. - better error handling. add comments. - * configure.in: use space character for the separator in - LD_PRELOAD on linux. - * wsock/wsock11/dllstub.c, wsock/wsock20/dllstub.c: disable - outputing trace messages unless DEBUG_STUB is defined. - -2001-04-11 - * tools/mdnconv/mdnconv.c: fix a bug in parsing an argument to - -delimitermap option. - - * lib/resoconf.c: mdn_resconf_setlocalconverter() rejects NULL - encoding name. fixed. - -2001-04-10 - * tools/runmdn/resolver.c: fix bugs in wrappers for - getipnodebyname() and getipnodebyaddr(). - * tools/mdnconv/mdnconv.c: fix a bug that makes -reverse - operation (decoding) sometimes fail. - -2001-04-06 - * include/mdn/amcaceo.h, lib/amcaceo.c: created. implement - "AMC-ACE-O". - * DISTFILES: add above new files. - * include/mdn/Makefile.in, lib/Makefile.in: ditto. - * lib/converter.c: add new converter for "AMC-ACE-O". - * lib/amcacer.c: rewrite refpoint update routine so that it's - easier to understand. - * include/mdn/api.h: fix incorrect comment for mdn_decodename. - * mdnsproxy/translate.c: remove obsolete functions. - * tools/runmdn/resolver.c: created. implement resolver API - (such as gethostbyname) with MDN capability. - * tools/runmdn/stub.c, tools/runmdn/stub.h: created. provide - stub functions for calling orginal resolver API functions. - * tools/runmdn/res_comp.c, tools/runmdn/ns_name.c: removed. - * tools/runmdn/Makefile.in: change to use above new files. - * tools/runmdn/runmdn.1: revised. - * configure.in, acconfig.h: add new tests for checking the - existance of various resolver functions/libraries. - * aclocal.m4: add a new macro to find the pathname of a shared - library object. - * configure, include/config.h.in: updated. - * DISTFILES, tools/Makefile.in: bring back runmdn. - -2001-04-04 - * 2.0.1 release. - - * mdnsproxy/Makefile.in: fix typo. - * lib/amcacem.c: fix a bug in computing a reference code point for - compression. - - * DISTFILES: rename tools/rpm/dnsproxy.init to - tools/rpm/mdnsproxy.init. - -2001-03-30 - * 2.0 release. - - * include/mdn/amcacem.h, lib/amcacem.c: created. implement a - new ACE called "AMC-ACE-M". - * include/mdn/amcacer.h, lib/amcacer.c: created. implement a - new ACE called "AMC-ACE-R". - * DISTFILES: add above new files. - * include/mdn/Makefile.in, lib/Makefile.in, tools/runmdn/Makefile.in: - add above new files. - * lib/converter.c: add new converters for "AMC-ACE-M" and "AMC-ACE-R". - -2001-03-28 - * Makefile.in, include/mdn/Makefile.in, man/Makefile.in, - map/Makefile.in, tools/Makefile.in: define SHELL. - - * include/mdn/Makefile.in, lib/Makefile.in, man/Makefile.in, - man/mdn.conf.5.in tools/Makefile.in, tools/mdnconv/Makefile.in: - unify variable names for install directory. - - * lib/Makefile.in: generate mdn.conf.sample from mdn.conf.sample.in. - * DISTFILES: distribute mdn.conf.sample.in, not mdn.conf.sample. - - * lib/lace.c: Set max run-length to 254. - * lib/autdude.c: fix decoding bug. - - * lib/res.c: fix a bug that nameconv("m") cannot map a domain name - which ends with ".". - -2001-03-27 - * tools/mdnconv/mdnconv.c: fix help message. - - * mdnsproxy/logging.c: don't reopen syslog when receives SIGHUP. - -2001-03-26 - * 2.0beta3 release. - - * Makefile.in: set CUR_VERSION to 2.0beta3. - - * configure.in: remove --enable-zld option because ZLD is no longer - supported, and add --enable-extra-ace option to incorporate - undocumented extra ACE converters. - * include/mdn/dude.h, lib/dude.c: change slightly to conform to - -01 draft. - * include/mdn/altdude.h, lib/altdude.c: created. implement a new - ACE called "AltDUDE". - * include/mdn/Makefile.in, lib/Makefile.in, tools/runmdn/Makefile.in: - add altdude.{c,h,lo}. - * DISTFILES: add altdude.{c,h} - -2001-03-21 - * 2.0beta2 release. - - * wsock/wsock11/wsock32.def, wsock/wsock20/ws2_32.def: remove - function forwarders. - * wsock/wsock11/dllload.c, wsock/wsock20/dllload.c: use explicit - link for calling WINSOCK API. - * wsock/wsock11/dllstub.c, wsock/wsock20/dllstub.c: created. - stub functions for WINSOCK API. - * wsock/wsock11/dlldef.h, wsock/wsock11/dllfunc.c, - wsock/wsock20/dlldef.h, wsock/wsock20/dllfunc.c: use stub functions - for calling original API. - * wsock/wsock11/make.wnt, wsock/wsock20/make.wnt: adjust to the - above changes. - * wsock/common/jpnicmdn.def, wsock/common/jpnicmdn.h, - wsock/common/printf.c: add and export mdnLogPrintf(). - * wsock/README.txt, wsock/README_j.txt: revise for version 2.0. - -2001-03-15 - * mdnsproxy/make.wnt: add acl.c/acl.o. - * win/iconv.h, win/iconv.lib, win/iconv.dll: update to version 1.6. - * win/README.WIN: revise description. - * DISTFILES: add files relating mDN Wrapper, which were temporaly - removed form distribution. - - * mdnsproxy/mdnsproxy.conf.sample: fix an erratum in client-encoding. - - * include/mdn/api.h: fix typo in comment. - -2001-03-14 - * wsock/common/convert.c, wsock/wsock11/dllmain.c, - wsock/wsock20/dllmain.c: use the new API. - * wsock/common/encoding.c: remove functions to access registry - entries no longer needed. add a function to get configuration - file path. - * wsock/common/jpnicmdn.def, wsock/common/jpnicmdn.h, - wsock/wsock11/dlldef.h, wsock/wsock20/dlldef.h: remove old - definitions. - * wsock/config/mdnconv.tcl: update for version 2.0. - * make.wnt, mdnsproxy/make.wnt: update for version 2.0. - * lib/res.c, lib/resconf.c, mdnsproxy/translate.c: remove - inclusion of old header files which no longer exist. - - * mdnsproxy/logging.c, mdnsproxy/translate.c: mdn log level and log - handler are set by log_configure(), not by translate_initialize(). - - * mdnsproxy/logging.c: Don't use syslog if HAVE_SYSLOG is undefined. - * configure.in: add `syslog' to AC_CHECK_FUNCS. - -2001-03-13 - * Makefile.in: set CUR_VERSION to 2.0beta2. - - * configure.in: fix a bug in libiconv check. add ICONVLIB to - LIBS, not to LDFLAGS. - * mdnsproxy/Makefile.in, tools/mdnconv/Makefile.in: set LIBS to - @LIBS@, MDNLIB to @MDNLIB@ and ICONVLIB to @ICONVLIB@. - * README.ja: update for version 2.0. - * README: revised. - - * mdnsproxy/logging.c: syslog support. - * mdnsproxy/proxycnf.c, mdnsproxy/proxycnf.h: recognize new command - `syslog-facility'. - * mdnsproxy/mdnsproxy.8.in, mdnsproxy/mdnsproxy.conf.sample: add - description of syslog support. - - * include/mdn/resconf.h, lib/resconf.c: delete - mdn_resconf_adddelimitermapucs(), - mdn_resconf_addlocalmapselectorname(), - mdn_resconf_addmappername(), - mdn_resconf_addnormalizername(), - mdn_resconf_addprohibitcheckername() and - mdn_resconf_addunassignedcheckername(). - - * lib/converter.c: converter_iconv_convert() appends reset-state - sequence to the output string. - -2001-03-09 - * mdnsproxy/mdnsproxy.conf.sample: fix typo in mdn-conf-file entry. - - * lib/mdn.conf.sample: fix typo in local-map entry. - -2001-03-08 - * 2.0beta1 release. - - * Makefile.in: set CUR_VERSION to 2.0beta1. - - * README: update for version 2.0. - - * lib/converter.c: fix a bug in converter_iconv_close(). - private data area was disposed twice. - - * map/Makefile.in, map/jp.map: new files. - * configure.in: add map/Makefile to AC_OUTPUT. - * Makefile.in: add map to SUBDIRS. - * DISTFILES: add map/Makefile.in and map/jp.map. - - * DISTFILES: add `man/mdn.conf.5.in', and delete - `man/mdnres.conf.5.in'. - - * configure.in: temporary delete `tools/runmdn/Makefile' and - `tools/runmdn/runmdn' from AC_OUTPUT. - -2001-03-07 - * lib/ace.c, include/mdn/ace.h: created. - * include/mdn/Makefile.in, lib/Makefile.in, tools/runmdn/Makefile.in: - add ace.c and ace.h. - * lib/brace.c, lib/dude.c, lib/lace.c, lib/race.c, lib/utf6.c: - rewrite using ace utility module. - * DISTFILES: add ace.c and ace.h. - * lib/nameprep_template.c: remove duplicated macro defininition - (UNICODE_MAX). - * tools/mdnconv/mdnconv.c: avoid assertion fail when libmdn cannot - guess the local codeset. - - * mdnsproxy/loggin.c: open a log file before chroot(). - * mdnsproxy/loggin.c fix a but that log file name specified in the - configuration file is ignored. - -2001-03-06 - * man/mdn.conf.5.in, tools/mdnconv/mdnconv.1: add description for - `nameprep-03'. - * lib/mdn.conf.sample: ditto. - * DISTFILES: update for version 2.0 release. bind9-patch, - mDN Wrapper and runmdn are removed (temporary) from the - distribution list. - * lib/Makefile.in: change install filename from `mdnres.conf.sample' - to `mdn.conf.sample'. - * lib/brace.c, lib/dude.c, lib/lace.c, lib/race.c, lib/utf6.c: - fix behavior for converting null labels. - * lib/converter.c: fix bug in calling free(). - * tools/mdnconv/util.c: include more info in error messages. - * tools/Makefile.in: remove runmdn temporary from subdirectory list. - -2001-03-05 - * man/mdn.conf.5.in: created. - * man/mdnres.conf.5.in: removed. - * man/Makefile.in: change mdnres.conf -> mdn.conf. - * tools/mdnconv/mdnconv.1: updated. existing sections are rewritten - according to the new spec, and some new sections are added. - - * DISTFILES: add `mdn.conf.sample' and delete `mdnres.conf.sample'. - * lib/mdnres.conf.sample: deleted. - * lib/mdn.conf.sample: added. - * lib/Makefile.in: install `mdn.conf.sample', not `mdnres.conf.sample'. - - * util/generate_nameprep_data.pl: add a feature of data sharing - among nameprep versions. - * lib/nameprepdata.c, lib/nameprep.c: add data for nameprep-03. - * lib/checker.c, lib/mapper.c, lib/normalizer.c: add `nameprep-03' - scheme. - -2001-03-01 - * lib/resconf.c: fix a bug in mdn_resconf_setlocalconvertername(). - - * lib/res.c: fix a bug in `n' action of mdn_res_nameconv(). - The result string is not terminted if the input string is ".". - -2001-02-27 - * lib/Makefile.in, tools/runmdn/Makefile.in: Change library - version info from 5:0:1 to 6:0:0. - -2001-02-26 - * lib/res.c: cosmetic changes. split static function nameconv() - to 11 functions, a function per action. - - * lib/resconf.c: mdn_resconf_setidnconvertername() accepts - ASCII uncompatible encoding name. - - * lib/converter.h: change the type definition of - mdn_converter_openproc_t, mdn_converter_closeproc_t and - mdn_converter_convertproc_t. `privdata' is added to their argument - list. - * lib/converter.c: conform openproc, closeproc, and convertproc - interfaces of the standard converters (iconv, utf5 and none) to - those of the converter module. - * lib/brace.c, lib/dude.c, lib/lace.c, lib/race.c, lib/utf6.c: ditto. - -2001-02-23 - * tools/mdnconv/mdnconv.c, tools/mdnconv/util.c: add -delimiter, - -delimitermap and -nameprep optinos. - - * lib/nameprep.c, lib/filemapper.c: add functions compatible with - mdn_mapper_createproc_t, mdn_mapper_destroyproc_t and - mdn_mapper_mapproct_t. - * lib/nameprep.c, lib/filechecker.c: add functions suitable for - mdn_checker_createproc_t, mdn_checker_destroyproc_t and - mdn_checker_lookupproct_t. - - * lib/mapselector.c: map_selector_map() didn't get TLD from a given - domain name. fixed. - - * mdnsproxy/proxycnf.c: fix typo. - - * lib/checker.c, lib/delimitermap.c, lib/mapper.c, - lib/mapselector.c, lib/nameprep.c, lib/normalizer.c: add _addall() - functions. - * include/mdn/checker.h, include/mdn/delimitermap.h, - include/mdn/mapper.h, include/mdn/mapselector.h, - include/mdn/normalizer.h: likewise. - - * lib/Makefile.in, mdnxproxy/Makefile.in, tools/mdnconv/Makefile.in, - tools/runmdn/Makefile.in: remove .libs at make clean. - - * lib/resconf.c, include/mdn/resconf.h: add set-by-name functions - for convinience. - - * lib/res.c: don't perform NAMEPREP against a domain label which - conforms STD13. - - * lib/util.c: extend mdn_util_validstd13(). - If the 2nd argument `end' is NULL, end of the 1st argument is - assumed. - -2001-02-22 - * lib/resconf.c, include/mdn/resconf.h: add - mdn_resconf_setnameprepversion(). - - * lib/Makefile.in: add api.c to SRCS and api.lo to OBJS. - * include/mdn/Makefile.in: add api.h to HDRS. - * DISTFILES: add lib/api.c, lib/delimitermap.c, lib/filechecker.c, - lib/filemapper.c, lib/mapper.c, lib/mapselector.c, lib/nameprep.c, - lib/nameprep_template.c, lib/nameprepdata.c, lib/ucsmap.c, - lib/ucsset.c, include/mdn/api.h, include/mdn/checker.h, - include/mdn/delimitermap.h, include/mdn/filechecker.h, - include/mdn/filemapper.h, include/mdn/mapper.h, - include/mdn/mapselector.h, include/mdn/nameprep.h, - include/mdn/ucsmap.h, include/mdn/ucsset.h. - - * tools/runmdn/ns_name.c: use api modoule to convert domain name. - * tools/runmdn/Makefile.in: add api.lo, checker.lo, delimitermap.lo, - mapper.lo and mapselector.lo MDNOBJS. - -2001-02-21 - * fix a bug in command line option parser. - - * lib/msgtrans.c: don't include resolv.h or arpa/nameser.h if system - doesn't have it. - -2001-02-20 - * acconfig.h: diet. Description of cpp macro defined in config.h.in - is now given by the 3rd argument of AC_DEFINE or AC_DEFINE_UNQUOTED. - - * tools/runmdn/ns_name.c, tools/runmdn/res_comp.c: include config.h. - * tools/runmdn/res_comp.c: don't include resolv.h or arpa/nameser.h - if system doesn't have it. - - * lib/utf6.c: fix a decoder bug. - -2001-02-19 - * lib/normalizer.c: remove ja-* schemes, and add `nameprep-02' as an - alias of `unicode-form-kc'. - * lib/filemapper.c, lib/filechecker.c: add partial support of - draft-ietf-idn-version-00.txt i.e. allow version specification - line at the top of the map/check files. if those files begin - with a line of the form `version=...', ignore the line. - * lib/filechecker.c: allow lines that end with semicolons. - - * dnsproxy/proxycnf.c: dnsproxy rejected bind4compat option to - `forward'. Fixed. - - * configure.in: check for a `iconv' function. - - * dnsproxy: the directory name is renamed to `mdnsproxy'. - - * configure.in, Makefile.in, dnsproxy/Makefile.in, - dnsproxy/dnsproxy.8.in, dnsproxy/dnsproxy.conf.sample, - dnsproxy/dnsproxy.def, dnsproxy/dnsproxy.h: rename `dnsproxy' to - `mdnsproxy'. - * dnsproxy/acl.c, dnsproxy/logging.c, dnsproxy/message.c, - * dnsproxy/os2main.c, dnsproxy/proxyconf.c, dnsproxy/translate.c, - * dnsproxy/unxmain.c, dnsproxy/winmain.c, dnsproxy/winserv.c: - include `dnsproxy.h' not `mdnsproxy.h'. - - * mdnsproxy/mdnsproxy.8.in, mdnsproxy/mdnsproxy.conf.sample: - corresponds to mDNkit-2.0. - - * lib/translator.c, lib/zldrule.c: removed. - * lib/Makefile.in: remove translator.c and zldrule.c from SRCS, - translator.lo and zldrule.lo from OBJS. - * include/mdn/translator.h, include/mdn/zldrule.h: removed. - * include/mdn/Makefile.in: remove translator.h and zldrule.h from - HDRS. - * tools/runmdn/Makefile.in: remove translator.lo and zldrule.lo from - OBJS. - -2001-02-16 - * lib/checker.c: mdn_checker_lookup() doesn't think `.' as prohibited - character. - * lib/res.c: fix a bug of the nameconv action `L'. - - * configure.in: add `--with-logdir=DIR' option. - - * dnsproxy/Makefile.in: rename variable names; from `SBINDIR' to - `sbindir', from `ETCDIR' to `sysconfdir', from `MANDIR' to `mandir'. - * dnsproxy/Makefile.in: define `sysconfdir' and `logdir'. - * dnsproxy/Makefile.in: delete `CONFIG_PATH'. - * dnsproxy/Makefile.in: add `-DLOGDIR=...' option to DEFS. - * dnsproxy/Makefile.in: replace `@sysconfdir@' and `@logdir' in - dnsproxy.8.in. - * dnsproxy/dnsproxy.8.in: use @sysconfdir@ and @logdir@. - * dnsproxy/logging.c: default log file is set to LOGDIR/mdnsproxy.conf. - - * dnsproxy/proxycnf.h: define all configuration commands as cpp macros - with the prefix KW_. - * dnsproxy/proxycnf.h: define all command line options as cpp macros - with the prefix CMDOPT_. - - * dnsproxy/dnsproxy.h: include proxycnf.h. - * dnsproxy/dnsproxy.h: delete `zld' and `cconverter' from - translation_context_t. - - * dnsproxy/proxycnf.c: record line numbers of commands when reading - a configuration file. - * dnsproxy/proxycnf.c: don't expand $(...) in a configuration file - name. - * dnsproxy/proxycnf.c: reject obsolete and unknown commands. - - * dnsproxy/translate.c: use the resconf module in libmdn, and - and pass the resconf object to mdn_msgtrans_translate() to convert - DNS request and query data. - * dnsproxy/translate.c: ZLD is no longer supported. - - * include/mdn/Makefile.in: add nameprep.h to HDRS. - -2001-02-15 - * lib/msgtrans.c: re-implement using res and resconf module. - also change API. - * include/mdn/msgtrans.h: change API. - * tools/mdnconv/mdnconv.c, tools/mdnconv/util.c, tools/mdnconv/util.h: - re-implement using new res module interface. - - * lib/res.c, include/mdn/res.h: rename the action characters. - Now, conversion from UTF-8 to ACE is done by `I', and conversion - from ACE to UTF-8 is done by `i'. - - * include/mdn/checker.h: define MDN_CHECKER_PROHIBIT_PREFIX and - MDN_CHECKER_UNASSIGNED_PREFIX. - - * lib/resconf.c: update the local converter each time - mdn_resconf_getlocalconverter() is called, if the converter is not - set by mdn_resconf_setlocalconverter(). - - * lib/res.c: fix a bug in mdn_res_nameconv() that it returns - `mdn_invalid_action' for a valid action sequence. - - * dnsproxy/Makefile.in, lib/Makefile.in, man/Makefile.in, - include/mdn/Makefile.in, tools/mdnconv/Makefile.in, - tools/runmdn/Makefile.in: use `mkinstalldirs' to create missing - install directories. - * mkinstalldirs: new file. - -2001-02-14 - * lib/unicode.c: fix typo. - * lib/normalizer.c: fix type confliction. - * wsock/README.txt, wsock/README_j.txt: remove a notice that - uninstallation of older version is needed before installing a - new version of mDN Wrapper, since it is not necessary any more. - also add a short description of "rewrap all" button. - - * inclde/mdn/resconf.h: define the following macros for backward - compatibility; mdn_resconf_localconverter, mdn_resconf_idnconverter, - mdn_resconf_getalternateconverter, mdn_resconf_getnormalizer, - mdn_resconf_mapper, mdn_resconf_delimitermap, - mdn_resconf_localmapselector, mdn_resconf_prohibitchecker and - mdn_resconf_unassignedchecker. - - * lib/resconf.c: fix a bug that parse_delimiter_map() might returns - incorrect return value. - - * lib/utf6.c: fix a bug that the decoder might cause buffer overflow. - - * lib/race.c, lib/utf6.c: delete comma at end of enumerator list. - - * lib/res.c, include/mdn/res.h: revised for version 2.0. - - * dnsproxy/unxmain.c, dnsproxy/os2main.c: reject unknown command line - options. - - * lib/resconf.c: detect unbalanced quotation in configuration. - - * lib/resconf.c: fix a serious bug that cannot read a configuration - file without a newline character at end of the file. - - * lib/res.c: in mdn_res_nameconv(), action `l' tries to convert a - string using the alternate_encoder, and then tries using the - local_converter. - - * configure.in: fix help message. - - * lib/converter.c: register UTF-6. - * tools/mdnconv/mdnconv.1: Add UTF-6 to the ACE list. - * tools/runmdn/Makefile.in: Support UTF-6. - -2001-02-13 - * util/UCD.pm, util/SparseMap.pm: created. - * util/generate_normalize_data.pl: wholly rewritten using above - two perl modules. - * util/generate_nameprep_data.pl: created. - * lib/unicodedata.c: re-generated. - * lib/unicode.c: change the basic lookup algorithm so that it should - adapt to the forthcoming new unicode standard easily. - * lib/unicode.c, include/mdn/unicode.h: implement unicode case - folding. - * lib/nameprepdata.c: fix a bug. - * lib/normalizer.c: add 'unicode-foldcase' normalization scheme. - - * lib/resconf.c, include/mdn/resconf.h: revised for version 2.0. - - * lib/delimitermap.c, include/mdn/delimitermap.h: new flies. - * lib/Makefile.in: add `delimitermap.c' to `SRCS'. - add `delimitermap.lo' to `OBJS'. - * include/mdn/Makefile.in: add `delimitermap.h' to `HDRS'. - * include/mdn/api.h, lib/api.c: created. - -2001-02-09 - * dnsproxy/unxmain.c: fix a bug that 'group-id' entry in the - configuration file causes an error, if specified together with - 'user-id'. - - * dnsproxy/dnsproxy.8.in, dnsproxy/dnsproxy.conf.sample: - Use the term `IP prefix' to an IP address followed by a slash - and netmask. - - * lib/checker.c, include/mdn/checker.h: new files. - * lib/Makefile.in: add `checker.c' to `SRCS'. - add `checker.lo' to `OBJS'. - * include/mdn/Makefile.in: add `checker.h' to `HDRS'. - -2001-02-08 - * lib/mapper.c, include/mdn/mapper.h: new files. - * lib/mapselector.c, include/mdn/mapselector.h: new files. - * lib/Makefile.in: add `mapper.c' and `mapselector.c' to `SRCS'. - add `mapper.lo' and `mapselector.lo' to `OBJS'. - * include/mdn/Makefile.in: add `mapper.h' and `mapselector.h' to - `HDRS'. - -2001-02-07 - * lib/filechecker.c, include/mdn/filechecker.h: created. - * lib/filemapper.c, include/mdn/filemapper.h: created. - * lib/nameprep.c, lib/nameprepdata.c, lib/nameprep_template.c: - created. - * lib/Makefile.in, include/mdn/Makefile.in, tools/runmdn/Makefile.in: - incorporates newly created files above. - * dnsproxy/proxycnf.c, dnsproxy/dnsproxy.h: change variable name - 'restrict' to 'src_restrict', since the next C standard makes - 'restrict' a keyword, and there are some compilers already - implement the new spec. - -2001-02-05 - * lib/converter.c, lib/normalizer.c: reference count support. - * include/mdn/converter.h: add the declaration of - mdn_converter_incrref(). - * include/mdn/normalizer.h: add the declaration of - mdn_normalizer_incrref(). - * include/mdn/result.h, lib/result.c : add new result codes - * (mdn_invalid_action, mdn_invalid_codepoint and mdn_prohibited). - * lib/ucsmap.c, include/mdn/ucsmap.h: created. - * lib/ucsset.c, include/mdn/ucsset.h: created. - * lib/Makefile.in: add ucsmap.c and ucsset.c. - * tools/runmdn/Makefile.in: add ucsmap.lo and ucsset.lo. - * include/mdn/Makefile.in: add ucsmap.h and ucsset.h. - -2001-02-02 - * wsock/config/mdnconf.tcl: add `rewrap' button. - -2001-02-01 - * Makefile.in: update for 1.3. - * README, README.ja: ditto. - * lib/Makefile.in, tools/runmdn/Makefile.in: update library version. - - * patch/bind8/bind-8.2.3-patch: created. - * patch/bind8/bind-8.2.2-P7-patch: removed. - * patch/bind8/bind-8.2.3-T9B-patch: removed. - * patch/bind9/bind-9.1.0-patch: created. - * DISTFILES: remove bind-8.2.2-P7-patch and bind-8.2.3-T9B-patch, - and then add bind-8.2.3-patch and bind-9.1.0-patch. - -2000-12-28 - * Makefile.in: update for 1.2.1-rc2. - * README, README.ja: update for 1.2.1-rc2 release. - -2001-01-30 - * lib/Makefile.in: add `utf6.c' to SRCS. add `utf6.o' to OBJS. - * include/mdn/Makefile.in: add `utf6.h' to HDRS. - * lib/utf6.c, include/mdn/utf6.h: new files. - * DISTFILES: add lib/utf6.c and include/mdn/utf6.h. - -2001-01-29 - * tools/runmdn/ns_name.c: include resolv.h and arpa/nameser.h only - if they exist. - * configure.in: add check for resolv.h and arpa/nameser.h. - * configure, include/config.h.in: re-generated. - * include/mdn/dude.h: add a comment about conformance. - -2001-01-22 - * lib/brace.c, lib/dude.c, lib/lace.c, lib/race.c: fix a bug that - ACE encoders cannot encode a domain name which ends with `.'. - * dnsproxy/acl.c: fix a bug of ACL initialization. - -2001-01-18 - * lib/lace.c: catch up with draft-ietf-idn-lace-01.txt. - -2001-01-16 - * dnsproxy/proxycnf.c: rewrite getHostPort(), and define - getHostPort2(). They parse `host:port' string more stritctly. - * dnsproxy/acl.c: fix error messages. - * DISTFILES: add dnsproxy/acl.c. - * lib/util.c, include/mdn/util.h: defines mdn_util_validstd13(). - * lib/brace.c, lib/dude.c, lib/lace.c, lib/race.c: use - mdn_util_validstd13() to test whether a domain name conforms STD-13. - -2001-01-15 - * lib/dude.c, include/mdn/dude.h: created. - * lib/converter.c: add DUDE encoding. - * lib/Makefile.in, include/mdn/Makefile.in: add dude.[ch]. - * tools/runmdn/Makefile.in: add dude.lo. - * DISTFILES: add dude.[ch]. - - * dnsproxy/logging.c: log_configure() returns BOOL. - * dnsproxy/unxmain.c, dnsproxy/os2main.c, dnsproxy/winmain.c, - dnsproxy/winserv.c: exit if a configuration file has an invalid - `log-level' line. - * dnsproxy/proxycnf.c, dnsproxy/logging.c: fix error and warning - messages. - -2001-01-12 - * dnsproxy/acl.c: new file. - * dnsproxy/server.c: add access control feature. - * dnsproxy/server.c: sockAccept(), sockRecvTcp() and sockRecvUdp() - returns `int', not `BOOL'. The return value from the functions is - SUCESS, FAILURE, or DENIED. - * dnsproxy/proxycnf.c: define config_query_log_on_denied(). - * dnsproxy/dnsproxy.h: add declaration of config_query_log_on_denied(), - acl_initialize(), acl_test() and acl_finalize(). - * dnsproxy/Makefile.in: add `acl.c' to SRCS, and `acl.o' to OBJS. - * dnsproxy/dnsproxy.conf.sample: add `allow-access' and `log-on-denied' - entires. - * dnsproxy/dnsproxy.8.in: likewise. - -2001-01-12 - * Makefile.in: update for 1.2.1. - * version 1.2.1 release - -2000-12-28 - * Makefile.in: update for 1.2.1-rc2. - * README, README.ja: update for 1.2.1-rc2 release. - -2000-12-26 - * lib/race.c: fix a bug that causes incorrect decoding of RACE- - encoded names if they contain any of uppercase characters. - * patch/bind8/bind-8.2.3-T6B-patch: removed. - * patch/bind8/bind-8.2.3-T9B-patch: created. - * DISTFILES: replace bind-8.2.3-T6B-patch with bind-8.2.3-T9B-patch. - -2000-12-22 - * tools/rpm/mdnkit.spec: update for 1.2.1. - * patch/bind8/bind-8.2.2-P7-patch, patch/bind8/bind-8.2.3-T6B-patch: - add more 8bit-through fixes. previous versions have problems when - domain name string contains some special characters, especially - backslash. - -2000-12-21 - * lib/Makefile.in, tools/runmdn/Makefile.in: increment revision - number of libraries for the next public release. - -2000-12-20 - * README, README.ja: update for 1.2.1 release. - * Makerfile.in: update for 1.2.1-rc1. - -2000-12-14 - * patch/bind9/bind-9.0.0-patch: removed. - * patch/bind9/bind-9.0.1-patch: created. - * DISTFILES: replace bind-9.0.0-patch with bind-9.0.1-patch. - * lib/race.c: fix an encoding (compression) bug, regarding - 0xff handling. actually the old behavior was in accordance with - the obsolete -00 draft. - -2000-12-08 - * lib/race.c: catch up with draft-ietf-idn-race-03.txt. - check an input string severely. - -2000-12-07 - * tools/mdnconv/util.c: remove find_prefix(). - -2000-12-06 - * tools/mdnconv/mdnconv.c, tools/mdnconv/util.c, tools/mdnconv/util.h: - change ACE decoding strategy. - -2000-12-04 - * tools/runmdn/Makefile.in: add missing brace.lo and lace.lo - to the list of object files. - -2000-11-27 - * wsock/config/mdnconf.tcl: implement "unwrap all" button. - * wsock/README.txt, wsock/README_j.txt: add description on "unwrap - all" button. add important notice on installing a new version - to the top of each file. - * Makefile.in, tools/rpm/mdnkit.spec: update for version 1.2. - * wsock/bin/README_e.txt, wsock/bind/README_j.txt: updated. - * version 1.2 release. - -2000-11-22 - * lib/brace.c, lib/lace.c, lib/race.c: keep lint happy. - * lib/brace.c: fix a bug that the encoder outputs a broken string. - * dnsproxy/dnsproxy.conf.sample, lib/mdnres.conf.sample: add - description of new normalization schemes. - -2000-11-21 - * lib/translator.c, include/mdn/translator.h: add new parameter - "local_alternate_converter" to mdn_translator_translate(), to - accept and correctly process names encoded in alternate-encoding. - * lib/msgtrans.c, include/mdn/msgtrans.h: add a new parameter - to mdn_msgtrans_param_t which is required for the new - mdn_translator_translate() above. - * dnsproxy/translate.c, wsock/common/convert.c: according to the - changes above. - * DISTFILES: replace patch/bind8/bind-8.2.2-P5-patch with - patch/bind8/bind-8.2.2-P7-patch. - * lib/Makefile.in, tools/runmdn/Makefile.in: increase version - number. - * lib/brace.c, lib/lace.c, lib/race.c: fix buffer overrun bugs. - * wsock/README.txt, wsock/README_j.txt: updated. - * README, README.ja: updated for version 1.2 release. - * Makefile.in: updated for version 1.2-rc1. - -2000-11-20 - * lib/race.c: fix a buffer overrun bug. - * patch/bind8/bind-8.2.2-P5-patch: removed. - * patch/bind8/bind-8.2.2-P7-patch: created. - -2000-11-17 - * lib/normalizer.c: add normalize scheme "ja-kana-fullwidth" - as an alias of "ja-fullwidth". also add new scheme - "ja-alnum-halfwidth". - * lib/normalizer.c: make the size of intermediate buffer used for - normalization grow dynamically. previously, the size was a fixed - value based on the size of the input string and overflow was - possible. - * lib/brace.c: add internal error checking. keep lint happy. - * dnsproxy/config.c, dnsproxy/config.h: removed (renamed to - proxycnf.[ch], in order to avoid confusion with include/config.h). - * dnsproxy/proxycnf.c, dnsproxy/proxycnf.h: created. - * DISTFILES, dnsproxy/Makefile.in, dnsproxy/make.os2, - dnsproxy/make.wnt: remove dnsproxy/config.[ch], add - dnsproxy/proxycnf.[ch] - * dnsproxy/logging.c, dnsproxy/message.c dnsproxy/proxycnf.c: - include . - * configure.in, configure, acconfig.h, include/config.h.in: - add checking whether the system defines BOOL type or not. - add configuration option --with-brace-suffix and --with-lace-prefix. - * README, README.ja: mention about new configuration options above. - * dnsproxy/dnsproxy.h: take the definition of BOOL out. use own - version of TRUE/FALSE, instead of system-supplied ones. - * wsock/config/mdnconf.tcl: add log configuration feature (log level - and log file). implement log file operation (view/delete). - change widgets layout so that they look neater. - * wsock/common/encoding.c, wsock/common/jpnicmdn.h: add new - function for retrieving the pathname of the log file from the - registry. - * wsock/common/printf.c: retrieve log file pathname from the - registry. stop writing log if the log level is negative. - * tools/mdnconv/Makefile.in: add dependency to libmdn.la. - * man/mdnres.conf.5.in, tools/mdnconv/mdnconv.1: add description - on the new encodings and normalization schemes. - * dnsproxy/dnsproxy.8: removed. - * dnsproxy/dnsproxy.8.in: created. - * dnsproxy/Makefile.in: generate dnsproxy.8 from dnsproxy.8.in, - reflecting correct path. - * DISTFILES: replace dnsproxy/dnsproxy.8 with dnsproxy/dnsproxy.8.in. - -2000-11-16 - * lib/brace.c: fix buffer-overrun bugs. - -2000-11-14 - * include/mdn/brace.h, lib/mdn/brace.c: created. (for BRACE encoding) - * include/mdn/lace.h, lib/mdn/lace.c: created. (for LACE encoding) - * include/mdn/util.h, lib/util.c: incorporate some functionalities - from race.c, such as UTF-8 <-> UTF-16 conversion. - * lib/race.c: move some functionalities shared with brace.c and - lace.c out to util.c. - * lib/converter.c: add BRACE and LACE converters. - * include/mdn/Makefile.in: add brace.h and lace.h to the intall files. - * lib/Makefile.in: add brace.c and lace.c. - * DISTFILES: add include/mdn/{brace,lace}.h, lib/{brace,lace}.c. - -2000-11-10 - * lib/normalizer.c: add normalize scheme - "ja-compose-voiced-sound". - -2000-11-06 - * wsock/common/printf.c: mDN Wrapper enable libmdn trace - * wsock/wsock11/dllmain.c: mDN Wrapper enable libmdn trace - * wsock/wsock20/dllmain.c: mDN Wrapper enable libmdn trace - * wsock/common/jpnicmdn.h: mDN Wrapper enable libmdn trace - * wsock/common/jpnicmdn.def: mDN Wrapper enable libmdn trace - * wsock/wsock11/dllfunc.c: check status of conversion - * wsock/wsock20/dllfunc.c: check status of conversion - * wsock/common/encoding.c: Fixed query on program side encoding - * wsock/common/convert.c : Fixed setting program side encoding - -2000-11-02 - * lib/util.c, include/mdn/util.h: created. - * lib/race.c, tools/mdnconv/util.c: make use of the above util - module. - * DISTFILES, include/mdn/Makefile.in, lib/Makefile.in, - tools/runmdn/Makefile.in, lib/make.wnt, lib/make.os2: add - util.[ch]. - * lib/Makefile.in, tools/runmdn/Makefile.in: increase revision - number. - * tools/runmdn/Makefile.in: use INSTALL_SCRIPT rather than - INSTALL_PROGRAM for shell script installation. - * tools/rpm/mdnkit.spec: increase version and serial. - * Makefile.in: change package name to mdnkit-1.1-src. add patch - target. - * DISTFILES: add ChangeLog and NEWS. - * lib/msgtrans.c: remove extra semicolon at the end of #undef - line. - * tools/rpm/mdnkit.spec: update for version 1.1. - * README, README.ja: update for version 1.1. - * version 1.1 release. - -2000-11-01 - * lib/race.c, tools/mdnconv/util.c: fix race prefix matching bug. - Previously, matching failed if the prefix contains any uppercase - letters (such as Bq--), - -2000-10-31 - * dnsproxy/dnsproxy.8: fix typo. - * dnsproxy/dnsproxy.conf.sample: add log-level entry. correct - description of the behavior when log-file is not specified. - * NEWS: created. - -2000-10-30 - * patch/bind9/bind-9.0.0-patch (lib/dns/config/confparser.y): - typo fixed. - -2000-10-27 - * dnsproxy/Makefile.in: remove -DDEBUG. - * dnsproxy/logging.c: supply default log file if not specfied. - * dnsproxy/translate.c: make the log correctly display "tcp" or - "udp" instead of "unknown". fix typo. - * dnsproxy/winserv.c: comment out message logging code because - they are also recorded in event logger. - -2000-10-26 - * dnsproxy/config.c: stop redefining logging macros (since it's - not needed). use fprintf instead of log_printf for logging (since - log file is not yet determined at this stage). - * dnsproxy/dnsproxy.8: add description on log-level entry. - mention about SIGHUP feature. - * dnsproxy/dnsproxy.h: add log-level constants. change log macro - definitions. add prototypes for new logging functions. - * dnsproxy/logging.c: add log-level setting feature, including new - logging interface functions and log-level entry in the - configuration file. add log file turnover support - (close and reopen the file when receiving SIGHUP) - * dnsproxy/server.c: ignore transient errors such as EAGAIN or - EINTR. do not quit server process even if recvfrom returns - ECONNREFUSED, which seems to happen on Linux. Same for - ENETUNREACH and EHOSTUNREACH. - * dnsproxy/translate.c: make mdn_log_level_info messages are - logged at 'warn' level instead of 'trace' level. - * dnsproxy/unxmain.c: add handler for SIGHUP. - -2000-10-25 - * lib/utf8.c: fix mdn_utf8_getmb so that it returns correct - value. - -2000-10-24 - * dnsproxy/server.c: don't terminate server process even if - recvfrom (on UDP socket) returns 0. - * tools/mdnconv/mdnconv.1: correct syntax of -noconf option. - -2000-10-23 - * dnsproxy/message.c: fix DNS message ID allocation bug (only - 4096 IDs out of 65536 could be used before). release internal - data structure for each request when receiving reply (previously - it is kept for 10 minutes, causing large memory footprint for - busy servers). add some debug statements. - * dnsproxy/server.c: increase interval for calling timer dispatch - routine (1sec -> 10sec). - -2000-10-08 - * version 1.0 release diff --git a/contrib/idn/mdnkit/DISTFILES b/contrib/idn/mdnkit/DISTFILES deleted file mode 100644 index 8a6a4c2eb0..0000000000 --- a/contrib/idn/mdnkit/DISTFILES +++ /dev/null @@ -1,200 +0,0 @@ -# $Id: DISTFILES,v 1.1 2002/02/08 05:38:30 marka Exp $ -README -README.ja -INSTALL -INSTALL.ja -ChangeLog -DISTFILES -LICENSE.txt -Makefile.in -NEWS -make.wnt -acconfig.h -aclocal.m4 -config.guess -config.sub -ltconfig -ltmain.sh -configure.in -configure -install-sh -mkinstalldirs -include/Makefile.in -include/config.h.in -include/config.h.win -include/mdn/Makefile.in -include/mdn/ace.h -include/mdn/altdude.h -include/mdn/amcacem.h -include/mdn/amcaceo.h -include/mdn/amcacer.h -include/mdn/amcacev.h -include/mdn/amcacew.h -include/mdn/amcacez.h -include/mdn/api.h -include/mdn/assert.h -include/mdn/brace.h -include/mdn/checker.h -include/mdn/converter.h -include/mdn/debug.h -include/mdn/delimitermap.h -include/mdn/dn.h -include/mdn/dude.h -include/mdn/filechecker.h -include/mdn/filemapper.h -include/mdn/lace.h -include/mdn/localencoding.h -include/mdn/log.h -include/mdn/logmacro.h -include/mdn/mace.h -include/mdn/mapper.h -include/mdn/mapselector.h -include/mdn/msgheader.h -include/mdn/msgtrans.h -include/mdn/nameprep.h -include/mdn/normalizer.h -include/mdn/race.h -include/mdn/res.h -include/mdn/resconf.h -include/mdn/result.h -include/mdn/selectiveencode.h -include/mdn/strhash.h -include/mdn/ucsmap.h -include/mdn/ucsset.h -include/mdn/unicode.h -include/mdn/unormalize.h -include/mdn/utf5.h -include/mdn/utf6.h -include/mdn/utf8.h -include/mdn/util.h -include/mdn/version.h -lib/Makefile.in -lib/ace.c -lib/altdude.c -lib/amcacem.c -lib/amcaceo.c -lib/amcacer.c -lib/amcacev.c -lib/amcacew.c -lib/amcacez.c -lib/api.c -lib/brace.c -lib/checker.c -lib/converter.c -lib/debug.c -lib/delimitermap.c -lib/dn.c -lib/dude.c -lib/filechecker.c -lib/filemapper.c -lib/lace.c -lib/localencoding.c -lib/log.c -lib/make.wnt -lib/mace.c -lib/mapper.c -lib/mapselector.c -lib/msgheader.c -lib/msgtrans.c -lib/nameprep.c -lib/nameprep_template.c -lib/nameprepdata.c -lib/normalizer.c -lib/race.c -lib/res.c -lib/resconf.c -lib/result.c -lib/selectiveencode.c -lib/strhash.c -lib/ucsmap.c -lib/ucsset.c -lib/unicode.c -lib/unicode_template.c -lib/unicodedata_301.c -lib/unicodedata_310.c -lib/unormalize.c -lib/utf5.c -lib/utf6.c -lib/utf8.c -lib/util.c -lib/version.c -lib/mdn.conf.sample.in -mdnsproxy/Makefile.in -mdnsproxy/acl.c -mdnsproxy/logging.c -mdnsproxy/make.wnt -mdnsproxy/mdnsproxy.8.in -mdnsproxy/mdnsproxy.conf.sample -mdnsproxy/mdnsproxy.def -mdnsproxy/mdnsproxy.h -mdnsproxy/message.c -mdnsproxy/os2main.c -mdnsproxy/proxycnf.c -mdnsproxy/proxycnf.h -mdnsproxy/server.c -mdnsproxy/translate.c -mdnsproxy/unxmain.c -mdnsproxy/winmain.c -mdnsproxy/winserv.c -mdnsproxy/winserv.h -tools/Makefile.in -tools/mdnconv/Makefile.in -tools/mdnconv/mdnconv.c -tools/mdnconv/util.c -tools/mdnconv/util.h -tools/mdnconv/mdnconv.1 -tools/mdnconv/mdnslookup.in -tools/rpm/mdnsproxy.init -tools/rpm/mdnkit.spec -tools/runmdn/Makefile.in -tools/runmdn/resolver.c -tools/runmdn/stub.c -tools/runmdn/stub.h -tools/runmdn/runmdn.1 -tools/runmdn/runmdn.in -man/Makefile.in -man/libmdn.3.in -man/mdn.conf.5.in -patch/bind8/bind-8.2.3-patch -patch/bind9/bind-9.1.3-patch -patch/bind9/bind-9.2.0-patch -patch/libiconv/libiconv-1.6.1.patch -patch/squid/squid-2.4.STABLE1-patch -win/README.WIN -wsock/README.txt -wsock/README_j.txt -wsock/make.wnt -wsock/common/checkdll.c -wsock/common/convert.c -wsock/common/dllmain.c -wsock/common/dump.c -wsock/common/encoding.c -wsock/common/hook.c -wsock/common/jpnicmdn.def -wsock/common/jpnicmdn.h -wsock/common/make.wnt -wsock/common/printf.c -wsock/config/make.wnt -wsock/config/mdnconf.tcl -wsock/wsock11/dlldef.h -wsock/wsock11/dllfunc.c -wsock/wsock11/dllload.c -wsock/wsock11/dllmain.c -wsock/wsock11/dllstub.c -wsock/wsock11/make.wnt -wsock/wsock11/wsock32.def -wsock/wsock11/wsock32o.def -wsock/wsock20/dlldef.h -wsock/wsock20/dllfunc.c -wsock/wsock20/dllload.c -wsock/wsock20/dllmain.c -wsock/wsock20/dllstub.c -wsock/wsock20/make.wnt -wsock/wsock20/ws2_32.def -wsock/wsock20/ws2_32o.def -util/SparseMap.pm -util/UCD.pm -util/generate_nameprep_data.pl -util/generate_normalize_data.pl -map/Makefile.in -map/jp.map diff --git a/contrib/idn/mdnkit/INSTALL b/contrib/idn/mdnkit/INSTALL deleted file mode 100644 index 1a047e4ec6..0000000000 --- a/contrib/idn/mdnkit/INSTALL +++ /dev/null @@ -1,248 +0,0 @@ - - mDNkit - Compilation and Installation - Japan Network Information Center (JPNIC) - - -This file explains how to compile and install the source package. -These procedures take the following steps: - - + Prerequisite: making iconv() available - + System Configuration: running `configure' script - + Compilation: running `make' - + Installation: running `make install' - + Site Configuration: tailoring `mdn.conf' - + Configuration Check (optional) - - -0. Prerequisite - -If your system's library does not have iconv() function, which is a -general codeset conversion utility, install it as an external library. -You also need external library if the system's implementation cannot -handle UTF-8 encoding, or it doesn't support some encodings which your -client applications uses. - -You can get a free version of iconv() implementation (under LGPL -license, aka GNU libiconv) from: - - http://clisp.cons.org/~haible/packages-libiconv.html - -*Note* - GNU libiconv-1.6.1 have a compilation problem on NetBSD 1.5. There - is a patch file for the bug under patch/libiconv directory. If you - are a NetBSD 1.5 user and found a problem in compiling libiconv, - apply the patch and try again. The patch file contains brief - instructions on how to apply it at the beginning. - - -1. Running configure script - -Run `configure' script in the top directory. This checks various -characteristics of your system and it will create Makefiles and -config.h appropriate for your system. - - % ./configure - -`configure' accepts many options. Here is a list of some important -options. - - --prefix=PREFIX - Specifies the prefix of install directories of mDNkit. The - default is /usr/local. - - --with-libiconv=LIBICONV_PREFIX - If you have installed GNU libiconv and would like to link it - to mDNkit, specify this option. The argument LIBICONV_PREFIX - is install prefix of GNU libiconv. If the argument is omitted, - PREFIX (derived from --prefix=PREFIX option) is assumed. - - --with-libiconv is shorthand option for GNU libiconv. - - --with-libiconv=/usr/local - - This is equivalent to: - - --with-iconv-include='-I/usr/local/include' - --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' - - If both the shorthand option (--with-libiconv) and longhand - options (--with-iconv-include and/or --with-iconv) are specified, - the longhand options have priority. - - --with-iconv-include=ICONV_INCDIR - If the header file "iconv.h" resides in a directory where your - C compiler doesn't search by default, specify the directory as - DIR like this: - - --with-iconv-include=/usr/local/include - - --with-iconv=ICONV_LIB - If your libc doesn't contain iconv(), specify the library - that contains iconv(). For example, if iconv() is libiconv - in /usr/local/lib, you should specify: - - --with-iconv="-L/usr/local/lib -liconv" - - Note that if the library is a shared one, you might also want - to specify -R option, like: - - --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv" - - --with-iconv-sofile=SOFILE_PATH - ``runmdn'' command in this kit needs to know the pathname of - shared library file that contains iconv(), if iconv() is not - part of libc. mDNkit tries to find out the pathname from the - informaiton provided by ``--with-iconv'' option described - above. But when it fails, you have to specify it with this - option, like: - - --with-iconv-sofile=/usr/local/lib/libiconv.so.2.0 - - --with-utf8=UTF8_NAME - If your iconv() (precisely, iconv_open()) does not accept - "UTF-8" as the name of UTF-8 encoding, specify the name for - it. For example if your iconv() uses "utf8" instead, you - should specify: - - --with-utf8=utf8 - - -2. Other configure options - -The configure script has many other options though they are not widely -used: - - --with-preference=PREFERENCE - This option sets the preference for the sample mDNkit - configuration file (mdn.conf.sample). Also this option - enables to install default configuration file (mdn.conf) - if the file didn't exist. - The only preference supported by this version is "jp". - - --with-amc-ace-z-prefix=AMCZ_PREFIX - AMC-ACE-Z is a proposed encoding for multilingual domain name - in DNS protocol data. It requires a specific prefix string - to distinguish domain names encoded by them from normal ASCII - domain names, but the current Internet draft of AMC-ACE-Z - doesn't define prefix. You can specify the prefix with this - option. Otherwise mDNkit defines "zq--" as the prefix. - - --with-race-prefix=RACE_PREFIX - --with-dude-prefix=DUDE_PREFIX - Also RACE and DUDE are encodings for multilingual domain name, - but they are obsolete. Since Internet drafts for these - encodings defines ACE prefixes, mDNkit uses them by default, - but you can specify prefix with these options. - - --exec-prefix=EXEC_PREFIX - Specifies the prefix of install directories for machine-specific - files. The default is PREFIX (derived from ``--prefix=PREFIX'' - and its default is /usr/local). - - --sbindir=SBINDIR - Specifies the install directory for mdnsproxy. The default is - EXEC_PREFIX/sbin. - - --bindir=BINDIR - Specifies the install directory for mdnconv and runmdn. - The default is EXEC_PREFIX/bin. - - --libdir=LIBDIR - Specifies the install directory for the MDN library (libmdn). - The default is EXEC_PREFIX/lib. - - --includedir=INCDIR - Specifies the install directory for the header files of the MDN - library. The default is PREFIX/include. - - --sysconfdir=SYSCONFDIR - Specifies the install directory for sample configuration files - of the MDN Library and mdnsproxy. The default is PREFIX/etc. - - --mandir=MANDIR - Specifies the base install directory for online manuals. - The default is PREFIX/man. - - --datadir=DATADIR - Specifies the base install directory for machine independent - data files. The default is PREFIX/share. Some data files for - mDNkit will be put under the DATADIR/mdnkit directory. - - --localstatedir=LOCALSTATEDIR - --with-logdir=LOGDIR - LOGDIR specifies the directory where mdnsproxy outputs log - files by default. Its default value is LOCALSTATEDIR/mdnsproxy, - and the default value of LOCALSTATEDIR is PREFIX/var. - - --enable-debug - Enable debugging codes. The fault is "no". - - --enable-shared - Build shared library. The fault is "yes". - - --enable-static - Build static library. The fault is "yes". - -To see the list of available options, you should run it with --help -option. - - % ./configure --help - - -3. Compiling - -Run `make' for compilation. - - % make - - -4. Installation - -Run `make install' to install binaries and manuals. Don't forget to -become a super-user before the installation. - - % su - # make install - - -5. Configuration and usage - -mDNkit needs a configuration file `mdn.conf' to work properly. Unless -you specified --with-preference option to the `configure' script, you -have to create the file. Please refer the manual for `mdn.conf' for -details. A sample configuration (`mdn.conf.sample') is also provided -for your convenience. - -Also online manuals for `mdnsproxy', `mdnconv' and `runmdn' commands -are available. Please refer them for the usage and configuration of -these commands. - - % man mdn.conf - % man mdnsproxy - % man mdnconv - % man runmdn - - -6. Check your configuration - -A simple shell script `mdnslookup' is available in the directory -`tools/mdnconv', with which you can make queries for multilingual -domain names. It may help you check your configuration. - -The usage of `mdnslookup' is: - - % tools/mdnconv/mdnslookup - -Suppose that is an internationalized domain name written -in the local codeset (see ``LOCAL CODESET'' in the `mdn.conf' man page -for details), and is a hostname or IP address of DNS -server. - -`mdnslookup' inquires from , using -`mdnconv' and `nslookup' commands. If something is wrong, you will -see an error message output by `mdnconv', `nslookup' or `mdnslookup' -itself. - - -; $Id: INSTALL,v 1.1 2002/02/08 05:38:30 marka Exp $ diff --git a/contrib/idn/mdnkit/INSTALL.ja b/contrib/idn/mdnkit/INSTALL.ja deleted file mode 100644 index 0edec71e32..0000000000 --- a/contrib/idn/mdnkit/INSTALL.ja +++ /dev/null @@ -1,253 +0,0 @@ - - mDNkit - $B%3%s%Q%$%k$H%$%s%9%H!<%k$NJ}K!(B - ($BJN,2D(B) - - -0. $BA0=`Hw(B - -$B$b$7$"$J$?$N;HMQ$7$F$$$k%7%9%F%`$N%i%$%V%i%j$K(B iconv() $B$,$J$$>l9g!"$"(B -$B$k$$$O$"$C$F$b(B UTF-8 $B$r07$&$3$H$,$G$-$J$$>l9g$K$O$"$i$+$8$a(B iconv() $B$r(B -$B%$%s%9%H!<%k$7$F$*$$$F$/$@$5$$!#(Biconv() $B$O!"Nc$($P(B GNU libiconv $B$H8F$P(B -$B$l$k%U%j!<(B (LGPL) $B$Nl9g$K$O(B libiconv $B$K%Q%C%A$rEv$F$F:F%$%s%9%H!<%k$7$F$/$@$5$$!#(B - $B$J$*!"%Q%C%A$NEv$FJ}$O%Q%C%A%U%!%$%k$N@hF,$K=q$+$l$F$$$^$9!#(B - - -1. configure $B%9%/%j%W%H$Nl9g$O!"$3$N%*%W%7%g%s$r;XDj$7$F2<$5$$!#0z?t(B LIBICONV_PREFIX - $B$K$O!"(BGNU libiconv $B$,%$%s%9%H!<%k$5$l$F$$$k0LCV$r;XDj$7$^$9!#(B - $B0z?t$r>JN,$9$k$H!"(BPREFIX (PREFIX $B$NCM$O(B --prefix=PREFIX $B$+$i(B - $BF3=P$5$l$^$9(B) $B$r;XDj$7$?$b$N$H8+$J$5$l$^$9!#(B - - --with-libiconv $B$O(B GNU libiconv $BMQ$NC;=L7A$N%*%W%7%g%s$G(B - - --with-libiconv=/usr/local - - $B$3$l$OoMQ$N%*%W%7%g%s(B - (--with-iconv-include, --with-iconv) $B$rN>J}$H$b;XDj$7$?>l9g$O!"(B - $BDL>oMQ$N%*%W%7%g%s$[$&$,M%@h$5$l$^$9!#(B - - --with-iconv-include=ICONV_INCDIR - C $B%3%s%Q%$%i$,DL>o$G$O8!:w$7$J$$%G%#%l%/%H%j$K(B "iconv.h" $B$,CV(B - $B$+$l$F$$$k>l9g!"l9g(B ($B>e5-$N%Q%C%1!<%8$rF~$l$?(B - $B>l9g$J$I(B) $B$K!"(Biconv $B$N%i%$%V%i%j$r;XDj$7$^$9!#Nc$($P(B - - --with-iconv="-L/usr/local/lib -liconv" - - $B$N$h$&$K;XDj$7$^$9!#$b$7(B iconv $B$,6&M-%i%$%V%i%j$K$J$C$F$$$k(B - $B>l9g$K$O!"(B-R $B%*%W%7%g%s$b;XDj$7$F(B - - --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv" - - $B$H$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#(B - - --with-iconv-sofile=SOFILE_PATH - mDNkit $B$K4^$^$l$F$$$k(B runmdn $B%3%^%s%I$O!"(Biconv() $B$,(B libc $B$N0l(B - $BIt$H$7$FDs6!$5$l$J$$$H$-$K!"(Biconv() $B$r4^$`6&M-%i%$%V%i%j$X$N%Q(B - $B%9L>$rCN$kI,MW$,$"$j$^$9!#(BmDNkit $B$O!"(B--with-iconv $B%*%W%7%g%s$N(B - $B5-=R$r4p$K%Q%9L>$r8!:w$7$^$9$,!"$3$l$K<:GT$7$?$H$-$K!"0J2<$N$h(B - $B$&$K6&M-%i%$%V%i%j$r;XDj$9$k$3$H$,$G$-$^$9!#(B - - --with-iconv-sofile=/usr/local/lib/libiconvv.so.2.0 - - --with-utf8=UTF8_NAME - iconv $B$K(B utf-8 $B%(%s%3!<%G%#%s%0$r;XDj$9$k>l9g!"K\%i%$%V%i%j$O(B - $B%G%U%)%k%H$G$O(B "UTF-8" $B$H$$$&L>A0$r;XDj$7$^$9!#$b$7$"$J$?$N(B - $B%7%9%F%`$N(B iconv $B$,(B "UTF-8" $B$H$$$&L>A0$rl9g$K$O!"(B - $BBe$j$NL>A0$r;XDj$7$^$9!#Nc$($P(B "UTF-8" $B$G$O$J$/(B "utf8" $B$N(B - $B>l9g$K$O$N(B configure $B$N%*%W%7%g%s(B - -$B$=$l$[$I$h$/;H$&$o$1$G$O$"$j$^$;$s$,!"(Bconfigure $B$K$OA09`$N$b$N0J30$K(B -$B$bMM!9$J%*%W%7%g%s$,MQ0U$5$l$F$$$^$9!#(B - - --with-preference=PREFERENCE - mDNkit $B$N%5%s%W%k%3%s%U%#%.%e%l!<%7%g%s%U%!%$%k(B (mdn.conf.sample) - $B$N@_Dj$r(B PREFERENCE $B8~$1$N$b$N$K$7$^$9!#$^$?$3$N%*%W%7%g%s$r;XDj(B - $B$9$k$H%G%U%)%k%H$N%3%s%U%#%.%e%l!<%7%g%s%U%!%$%k(B (mdn.conf) $B$,(B - $B%$%s%9%H!<%k$5$l$^$9!#$?$@$7%U%!%$%k$,$9$G$KB8:_$7$F$$$k>l9g$K$O(B - $B%$%s%9%H!<%k$7$^$;$s!#(B - $B8=:_$N$H$3$m!";XDj$G$-$k(B PREFERENCE $B$O(B "jp" $B$N$_$G$9!#(B - - --with-amc-ace-z-prefix=AMCZ_PREFIX - AMC-ACE-Z $B$O(B DNS $B%W%m%H%3%k>e$G;HMQ$5$l$kB?8@8l%I%a%$%sL>$K4X$7(B - $B$FDs0F$5$l$F$$$k%(%s%3!<%G%#%s%0J}<0$G$9!#$3$N%(%s%3!<%G%#%s%0(B - $B$G%3%s%3!<%I$5$l$?%I%a%$%sL>$H=>Mh$N(B ASCII $B%I%a%$%sL>$H6hJL$9(B - $B$k$?$a$K$O!"8GDj$N@\F,<-$rMQ0U$9$kI,MW$,$"$j$^$9!#$7$+$7$J$,$i!"(B - $B8=:_$N(B AMCE-ACE-Z $B$N%$%s%?!<%M%C%H%I%i%U%H$G$O@\F,<-$rDj5A$7$F(B - $B$$$^$;$s!#$3$N%*%W%7%g%s$rMQ$$$k$3$H$G!"@\F,<-$r;XDj$9$k$3$H$,(B - $B$G$-$^$9!#;XDj$7$J$1$l$P!"(B"zq--" $B$,@\F,<-$H$7$FDj5A$5$l$^$9!#(B - - --with-race-prefix=RACE_PREFIX - --with-dude-prefix=DUDE_PREFIX - RACE $B$b(B DUDE $B$b(B DNS $B%W%m%H%3%k>e$G;HMQ$5$l$kB?8@8l%I%a%$%sL>$K(B - $B4X$7$FDs0F$5$l$F$$$k%(%s%3!<%G%#%s%0J}<0$G$9$,!"$9$G$KGQ$l$?$b(B - $B$N$H$J$C$F$$$^$9!#%(%s%3!<%G%#%s%0J}<0$K$D$$$F5-=R$7$?%$%s%?!<(B - $B%M%C%H%I%i%U%H$K$O@\F,<-$,Dj5A$5$l$F$$$^$9$,!"$3$l$i$N%*%W%7%g(B - $B%s$rMQ$$$F@\F,<-$rJQ99$9$k$3$H$b2DG=$G$9!#(B - - --exec-prefix=EXEC_PREFIX - $B%^%7%s8GM-$N%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$N%Q%9$r;XDj(B - $B$7$^$9!#%G%U%)%k%H$O(B PREFIX (``--prefix=PREFIX'' $B$K$h$C$F;XDj(B - $B2DG=!"(BPREFIX $B$N%G%U%)%k%H$O(B /usr/local) $B$K$J$j$^$9!#(B - - --sbindir=SBINDIR - mdnsproxy $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#%G%U%)%k(B - $B%H$G$O(B EXEC_PREFIX/sbin $B$G$9!#(B - - --bindir=BINDIR - mdnconv $B$H(B runmdn $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#(B - $B%G%U%)%k%H$G$O(B EXEC_PREFIX/bin $B$G$9!#(B - - --libdir=LIBDIR - MDN $B%i%$%V%i%j(B (libmdn) $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7(B - $B$^$9!#%G%U%)%k%H$G$O(B EXEC_PREFIX/lib $B$G$9!#(B - - --includedir=INCDIR - MDN $B%i%$%V%i%j$N%X%C%@%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j$r(B - $B;XDj$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/include $B$G$9!#(B - - --sysconfdir=SYSCONFDIR - MDN $B%i%$%V%i%j$*$h$S(B mdnsproxy $B$N@_Dj%U%!%$%k$N%5%s%W%k$r%$%s(B - $B%9%H!<%k$9$k%G%#%l%/%H%j$r;XDj$7$^$9!#%G%U%)%k%H$G$O(B PREFIX/etc - $B$G$9!#(B - - --mandir=MANDIR - $B%*%s%i%$%s%^%K%e%"%k$N%$%s%9%H!<%k%G%#%l%/%H%j$r;XDj$7$^$9!#(B - $B%G%U%)%k%H$G$O(B PREFIX/man $B$G$9!#(B - - --datadir=DATADIR - $B0[$J$k%^%7%s$G6&M-2DG=$J%U%!%$%k$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j(B - $B$r;XDj$7$^$9!#%G%U%)%k%H$O(B PREFIX/share $B$G$9!#(BDATADIR/mdnkit - $B$N2<$K!"(BmDNkit $B$G;HMQ$9$k4v$D$+$N%G!<%?%U%!%$%k$,%$%s%9%H!<%k(B - $B$5$l$^$9!#(B - - --localstatedir=LOCALSTATEDIR - --with-logdir=LOGDIR - LOGDIR $B$O(B mdnsproxy $B$N%m%0%U%!%$%k$r=PNO$9$kI8=`$N%G%#%l%/%H%j(B - $B$r;XDj$7$^$9!#(BLOGDIR $B$N%G%U%)%k%H$O(B LOLOCALSTATEDIR/mdnsproxy - $B$G!"(BLOLOCALSTATEDIR $B$N%G%U%)%k%H$O(B PREFIX/var $B$G$9!#(B - - --enable-debug - $B%G%P%C%0MQ$N%3!<%I$rM-8z$K$7$^$9!#%G%U%)%k%H$O(B "no" ($BL58z(B) $B$G$9!#(B - - --enable-shared - $B6&M-%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B - - --enable-static - $B@EE*%i%$%V%i%j$r:n@.$7$^$9!#%G%U%)%k%H$O(B "yes" ($B:n@.$9$k(B) $B$G$9!#(B - -configure $B$K$OB>$K$bB?$/$N%*%W%7%g%s$,$"$j$^$9$,!";D$j$O0lHLE*$J%*%W%7%g(B -$B%s$J$N$G@bL@$O>J$-$^$9!#(B - - % ./configure --help - -$B$rl(B -$B9g$K$O$3$N%U%!%$%k$r:n@.$9$kI,MW$,$"$j$^$9!#$3$N@_Dj%U%!%$%k$N>\:Y$K$D(B -$B$$$F$O(Bmdn.conf $B$N%*%s%i%$%s%^%K%e%"%k$r$4Mw$/$@$5$$!#$^$?@_DjNc$,=q$+(B -$B$l$?%5%s%W%k%U%!%$%k(B (mdn.conf.sample) $B$b%$%s%9%H!<%k$5$l$^$9$N$G$4Mx(B -$BMQ$/$@$5$$!#(B - -$B$^$?!"(Bmdnsproxy$B!"(Bmdnconv$B!"(Brunmdn $B$H$$$C$?%D!<%k$N%*%s%i%$%s%^%K%e%"%k(B -$B$bDs6!$5$l$F$$$^$9!#$3$l$i$N%3%^%s%I$N;H$$J}!"@_DjJ}K!$K4X$7$F$O$=$A$i(B -$B$r;2>H$7$F$/$@$5$$!#(B - - % man mdn.conf - % man mdnsproxy - % man mdnconv - % man runmdn - - -6. $B@_Dj$N3NG'(B - -`mdnsproxy' $B$H$$$&4JC1$J%7%'%k%9%/%j%W%H$,(B tools/mdnconv $B%G%#%l%/%H%j(B -$B$KMQ0U$5$l$F$$$^$9!#$3$N%9%/%j%W%H$r;H$&$H(B DNS $B%5!<%P$KBP$7$FB?8@8l%I(B -$B%a%$%sL>$rLd$$9g$o$;$k$3$H$,$G$-$^$9!#@_Dj%U%!%$%k$N3NG'$KLrN)$D$+$bCN(B -$B$l$^$;$s!#(B - -`mdnslookup' $B$N;HMQJ}K!$O!" - -$B$3$3$G(B $B$O%m!<%+%k%3!<%I%;%C%H(B ($B>\$7$/$O(B mdn.conf $B$N%^%K%e(B -$B%"%k$N(B ``LOCAL CODESET'' $B$r;2>H$N$3$H(B) $B$G=q$+$l$?B?8@8l%I%a%$%sL>$G!"(B - $B$O(B DNS $B%5!<%P$N%[%9%HL>$b$7$/$O(B IP $B%"%I%l%9$G$9!#(B - -`mdnslookup' $B$O(B `mdnconv' $B$*$h$S(B `nslookup' $B%3%^%s%I$rMQ$$$F!"(B - $B$KBP$7$F(B $B$r0z$-$K9T$-$^$9!#@_Dj$K2?$+4V0c$$(B -$B$,$"$l$P!"(B`mdnconv', `nslookup', $B$"$k$$$O(B `mdnslookup' $B<+?H$K$h$k%(%i!<(B -$B%a%C%;!<%8$,=PNO$5$l$^$9!#(B - - -; $Id: INSTALL.ja,v 1.1 2002/02/08 05:38:30 marka Exp $ diff --git a/contrib/idn/mdnkit/LICENSE.txt b/contrib/idn/mdnkit/LICENSE.txt deleted file mode 100644 index e2e0b79fae..0000000000 --- a/contrib/idn/mdnkit/LICENSE.txt +++ /dev/null @@ -1,56 +0,0 @@ -Copyright (c) 2000, 2001 Japan Network Information Center. - All rights reserved. - -By using this file, you agree to the terms and conditions set forth bellow. - - LICENSE TERMS AND CONDITIONS - -The following License Terms and Conditions apply, unless a different -license is obtained from Japan Network Information Center ("JPNIC"), -a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -Chiyoda-ku, Tokyo 101-0047, Japan. - -1. Use, Modification and Redistribution (including distribution of any - modified or derived work) in source and/or binary forms is permitted - under this License Terms and Conditions. - -2. Redistribution of source code must retain the copyright notices as they - appear in each source code file, this License Terms and Conditions. - -3. Redistribution in binary form must reproduce the Copyright Notice, - this License Terms and Conditions, in the documentation and/or other - materials provided with the distribution. For the purposes of binary - distribution the "Copyright Notice" refers to the following language: - "Copyright (c) Japan Network Information Center. All rights reserved." - -4. Neither the name of JPNIC may be used to endorse or promote products - derived from this Software without specific prior written approval of - JPNIC. - -5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -6. Indemnification by Licensee - Any person or entities using and/or redistributing this Software under - this License Terms and Conditions shall defend indemnify and hold - harmless JPNIC from and against any and all judgements damages, - expenses, settlement liabilities, cost and other liabilities of any - kind as a result of use and redistribution of this Software or any - claim, suite, action, litigation or proceeding by any third party - arising out of or relates to this License Terms and Conditions. - -7. Governing Law, Jurisdiction and Venue - This License Terms and Conditions shall be governed by and and - construed in accordance with the law of Japan. Any person or entities - using and/or redistributing this Software under this License Terms and - Conditions hereby agrees and consent to the personal and exclusive - jurisdiction and venue of Tokyo District Court of Japan. diff --git a/contrib/idn/mdnkit/Makefile.in b/contrib/idn/mdnkit/Makefile.in deleted file mode 100644 index f005bbefa0..0000000000 --- a/contrib/idn/mdnkit/Makefile.in +++ /dev/null @@ -1,86 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:46:20 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -PERL = perl -MKTARPKG = ../util/mktarpkg -SHELL = @SHELL@ - -SUBDIRS = include lib mdnsproxy man tools map - -all: force - for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done - -install: force - for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done - -clean: force - for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done - -dist: force - @v=`sed -ne '/^# *define *MDNKIT_VERSION/s/^.*"\([^"]*\)".*$$/\1/p' \ - $(srcdir)/include/mdn/version.h`; \ - echo generate mdnkit-$$v-src.tar.gz; \ - cd $(srcdir); \ - $(PERL) $(MKTARPKG) --gzip=9 mdnkit-$$v-src - -force: diff --git a/contrib/idn/mdnkit/NEWS b/contrib/idn/mdnkit/NEWS deleted file mode 100644 index ce287bb69e..0000000000 --- a/contrib/idn/mdnkit/NEWS +++ /dev/null @@ -1,226 +0,0 @@ -; $Id: NEWS,v 1.1 2002/01/02 02:46:20 marka Exp $ - -Major changes in version 2.2.3: - -* BIND-9 patch for BIND-9.2.0 is available. - -* NAMEPREP draft -06 is supported. - -* Problems on Tru64 are fixed. - -Major changes in version 2.2.2: - -* Now runmdn can work on NetBSD-1.5 or later. - -Major changes in version 2.2.1: - -* Fix a bug that the MDN library misses prohibited characters. - -Major changes in version 2.2: - -* Alternate encoding is no longer supported. - mDNkit now follows IDNA-03 which says in the section 2.1.2 that An - IDNA-aware application MUST NOT do any preparation or conversion to - ACE on any non-internationalized name part. `alternate-encoding' - entry in configuration file is simply ignored. - -* The MDN library (libmdn) performs NAMEPREP check at decoding an ACE - name. If the name is not NAMEPREPed, libmdn returns a name with ACE - encoding instead of local encoding. - -* Supported ACEs are now AMC-ACE-Z, RACE and DUDE only. - Since the IDN working group has chosen AMC-ACE-Z, most of other ACEs - are no longer supported by default. If you wanted to use those - ACEs, specify `--enable-extra-ace' option of configure. - -* mdnsproxy can output log messages to standard error. - -* mdnsproxy adds date and time string to a message logged to a regular - file. - -* `--with-iconv-include', `--with-libiconv' and `--enable-debug' - options are added to `configure'. - -* `--with-libiconv' option is also added to `configure' in BIND-9 patch. - -* A build problem on Linux with glibc-2.2 is fixed. - -* The base version of BIND-9 patch is now 9.1.3. - -* Supported NAMEPREP drafts are -03 and -05. - -02 and -04 are not supported. - -* `-e' option is added to runmdn to set local encoding. - -* `dig', `host' and `nslookup' of BIND-9 with MDN support patch - recognize the MDN_DISABLE environment variable. Those commands turn - off MDN support if the variable is defined. - -Major changes in version 2.1: - -* BIND-9 patch is back. The patch adds encoding conversion and - NAMEPREP capability to `dig', `host' and `nslookup'. - Since mDNkit version 2 adopts IDNA, in which all the MDN processing - are performed in the application layer before calling the resolver - layer, the patch no longer contains modification of the light-weight - resolver or `allow-utf8' extension of `named' configuration syntax - found in mDNkit version 1.x. - -* Runmdn is back. The strategy for making resolver MDN-aware has been - changed from replacing low-level resolver functions to wrapping - resolver API functions, so that it should also work for exotic - resolver implementations such as Solaris's. - -* Several new ACEs are supported. These are `AltDUDE', `AMC-ACE-M', - `AMC-ACE-O' and `AMC-ACE-R'. - -* `-version' option is added to mdnconv and mdnsproxy. When the option - is specified, the command prints its version number and exits - immediately. - -* For some of frequently used options, single-character short-cut options - are provided for mdnconv. - -* The base versions of Squid patch is now 2.4.STABLE1. - -* A build problem on NetBSD 1.5 is fixed. - - -Major changes in version 2.0.1: - -* A bug in mdnsproxy/Makefile.in is fixed. Now mdnsproxy 2.X can be - built on Solaris. - - -Major changes in version 2.0: - -* The MDN library (libmdn) performs domain name preparation (NAMEPREP) - according to the current Internet Draft. Currently nameprep-02 and - nameprep-03 are supported. Also additional local name preparation - can be performed before NAMEPREP. Along with this change, command - line options of `mdnconv' are greatly changed. See the man page - mdnconv(1) for more details. - -* mDNkit adopts IDNA, which is an architecture for handling - multilingual domain names currently being discussed at IETF IDN - working group. MDN library provides new API in accordance with this - IDNA, and NAMEPREP. - -* The default configuration file name for the MDN Library is changed - from `mdnres.conf' to `mdn.conf'. Note that syntax of the file has - some incompatible changes. See the man page mdn.conf(5). - -* dnsproxy is renamed to `mdnsproxy'. The default configuration file - is also renamed from `dnsproxy.conf' to `mdnsproxy.conf', and its - syntax is revised. Unlike dnsproxy which only reads `dnsproxy.conf', - mdnsproxy also reads mdn.conf. The path name of `mdn.conf' can be - specified in mdnsproxy.conf. See mdnsproxy.conf(5) for more details. - -* For security reason, default directory where mdnsproxy outputs log - files is moved from `/tmp' to `/var/log/mdnsproxy'. `--with-logdir' - option to configure can customize the directory location. - -* mdnsproxy can output log messages with syslog. - -* DUDE converter is revised and now conforms to -01 draft. - -* This release doesn't contain runmdn and bind9 patch. They are - expected to appear again in future versions. - - -Major changes in version 1.3: - -* dnsproxy supports access control. dnsproxy now recognizes - `allow-access' and `log-on-denied' entries in a configuration file. - See dnsproxy.8 and dnsproxy.conf.sample for more details. - -* LACE converter incorporates numeral checks introduced by -01 draft. - -* New encoding converters for `DUDE' and `UTF-6' are implemented. - -* Whether a given name conforms the host name requirement in STD13 or - not is checked more strictly by the MDN library. A name starting - or ending with hypen is not considered as STD13 conformed name, even - if the name consists exclusively of alphabets, digits and hypens. - -* The base versions of BIND-9 patch are now 9.0.1 and 9.1.0. - -* The base versions of BIND-8 patch is now 8.2.3 only. - - -Major changes in version 1.2.1: - -* RACE converter incorporates numeral checks introduced by -03 draft. - Also a bug, which produces incorrectly encoded string (actually - encoded in the way -00 draft specifies), is fixed. - -* The base version of BIND-9 patch has changed from 9.0.0 to 9.0.1. - -* The base versions of BIND-8 patch are now 8.2.2-P7 and 8.2.3-T9B. - -* runmdn now works again. - -* mdnconv is improved so that it can nicely convert ACE-encoded text - to other encodings. It detects ACE portions of the input string and - converts only them, leaving non-ACE portions intact. Previously - only RACE had such capability, but now other ACEs also have this - capability as long as they have certain prefix/suffix ("bq--" for - RACE, for example). - - -Major changes in version 1.2: - -* New encoding converters for `BRACE' and `LACE' are implemented. - -* New normalize schemes `ja-compose-voiced-sound', 'ja-kana-fullwidth' - and 'ja-alnum-halfwidth' introduced. - -* mDN Wrapper is thoroughly overhauled. - - Log level can be specified by using GUI (or directly editing the - registry Software\JPNIC\MDN\LogLevel). Note that fine grain - control over logging is supported only by the MDN library (libmdn). - Log output from mDN Wrapper itself can be turned on or off, but - no log level support. - - Log file can also specified. - - Some serious bugs are fixed, including incorrect program-side - encoding (codeset) detection. - - Advanced configuration feature implemented. Now DNS encoding and - normalization can be customizable. Also you can configure which - winsock DLL to be wrapped. - -* dnsproxy and mDN Wrapper now correctly accept and process client- - supplied domain names encoded in the alternate encoding. Previously - worked correctly only when the alternate encoding happened to be the - same as the server encoding. - -* 8bit-through patch for BIND-8.2.2-P5 is replaced by a new patch - for BIND-8.2.2-P7. - -* A buffer overrun bug in RACE converter is fixed. - - -Major changes in version 1.1: - -* Log level of dnsproxy can be specified with ``log-level'' entry. - available levels are `none', `fatal', `warning' and `trace'. See - dnsproxy.8 or dnsproxy.conf.sample for details. - -* Sending SIGHUP to dnsproxy causes it to close and re-open the log file. - Useful for log file turnover. - -* If log file is not specified, dnsproxy uses the default log file - /tmp/dnsproxy.log. Previously behavior was that no logging was done - at all, conflicting with what document says. - -* dnsproxy won't terminate even if recvfrom() returns unexpected - errors such as `connection refused (ECONNREFUSED)'. On Linux, it is - reported that it sometimes returns this error even for - connection-less (ie UDP) sockets. - -* DNS message ID allocation/release bugs in dnsproxy are fixed. - Previously dnsproxy seems to stop working if it receives more than - 4096 requests in 10 minutes. - -* RACE conversion bug is fixed. Previously, if the prefix part contains - any uppercase letters (such as "Bq--"), it is not recognized as a - RACE prefix. diff --git a/contrib/idn/mdnkit/README b/contrib/idn/mdnkit/README deleted file mode 100644 index 398005775d..0000000000 --- a/contrib/idn/mdnkit/README +++ /dev/null @@ -1,262 +0,0 @@ - - mDNkit - -- multilingual domain name toolkit -- - version 2.2.3 - Japan Network Information Center (JPNIC) - - -Table of contents of this file: - - 1. Overview - 2. Directory structure of this distribution - 3. Applying patches - 4. Supported systems - 5. Contact information - -See the file INSTALL for compilation and installation instructions. -See the file NEWS for a list of major changes in the current release. - - -1. Overview - -mDNkit is a toolkit for handling multilingualized/internationalized -domain names. To handle such names, the following features are required: - - + Encoding conversion - Multilingualized domain names have to be converted from - the encoding application uses (local encoding) to - the encoding used for name resolution (IDN encoding), and - vice versa. Since domain names in IDN encoding just look - like good old ASCII domain names, the encoding is also known - as ASCII-compatible encoding (ACE). - - + NAMEPREP - Name preparation of domain names before converting to - IDN encoding. Basically this is a normalization process - of the domain names. - -These conversion/nameprep processes to domain names have to be -performed before they are sent to DNS servers. And since the -processed domain names (in IDN encoding) consist of only legal ASCII -characters, no changes are required to DNS servers. - -mDNkit provides several ways for adding these features. - -This kit consists of following components. - - + library for handling multilingual domain names (libmdn) - This is a library implementing encoding conversion and - nameprep. The library provides easy-to-use API for these - features, so it should be easy to add capability of handling - multilingual domain name to your applications using this - library. - This library is also used for implementing various commands in - this toolkit (such as mdnsproxy and mdnconv). - - + DNS proxy server (mdnsproxy) - This works as a fake DNS server for the clients. It receives - DNS request containing domain names in the client's local - encoding (e.g. Shift_JIS), translates them into the encoding - on DNS protocol (e.g. UTF-8 or RACE), and forwards to the real - DNS server. Also the response from the server is converted - back to the client's local encoding and returned. See - ``2. using mdnsproxy'' below. - - + a command dynamically adds MDN feature to unix applications (runmdn) - This command enables normal applications to handle - multilingual domain names by dynamically attaching special - library to them. See ``3. using runmdn'' below. - - + a patch for BIND-9 that adds MDN capability - This patch adds MDN capability to BIND9. It adds encoding - conversion and nameprep features to `dig', `host' and - `nslookup'. With the patch, those commands become capable of - multilingual domain names. - - + mDN wrapper for Windows applications - On windows, name resolving request is passed to WINSOCK DLL. So, - replacing WINSOCK DLL with multi-lingual domain name version - makes legacy windows applications compatible with mDN. This is - wrapper DLL for WINSOCK's name resolving functions. See - ``4. using mDN wrapper'' below. - - + a codeset converter for named.conf/zone master files (mdnconv) - This is a codeset (encoding) converter specially designed for - converting named.conf and zone master files from your local - encoding (e.g. EUC-JP) to the encoding which internationalized - DNS servers employ (e.g. RACE). - - + a patch that makes BIND-8 8-bit through - This is needed in order for named and resolver to handle - non-ascii domain names encoded in local encoding or UTF-8. - The patch is rudimentary; it makes almost any byte sequence - legal as a domain name (which is what 8-bit through is for). - - + a patch for making Squid cache server 8-bit through - This is a simple patch that disables Squid's validity check - for host name part in URLs. Without this patch, Squid rejects - URLs containing multilingual domain name (correctly). - - -This kit provides several ways to handle multilingual domain names -using above components. - - ** 1. using API - This is the preferred way to handle multilingual domain names, - applications are required to explicitly call the name conversion - API mDNkit provides. - - domain name - +-----------+-------+--------+ in ACE - | | | | encoding +------------+ - | client | mdn |system's|----------->| DNS server | - |application|library|resolver|<-----------| | - | | | | +------------+ - +-----------+-------+--------+ - - ** 2. using mdnsproxy - In case the application cannot be modified to use the above API, - you can still be able to use multilingual domain names using - mdnsproxy, provided that the application uses 8bit-through - resolver. - - domain name encoding domain name - in local conversion and in ACE - +------------+ encoding nameprep endoding - | client | +----------------+ +----------+ - |application |------------>| mdnsproxy |------------>|DNS server| - | with |<------------| |<------------| | - |8bit through| +----------------+ +----------+ - | resolver | - +------------+ - - ** 3. using runmdn - Or if the client application dynamically links resolver API (such as - gethostbyname) and the OS supports certain features, you can use - runmdn. By replacing the resolver API with a version which performs - encoding conversion and nameprep, runmdn enables normal applications - to resolve multilingual domain names. - - encoding domain name - conversion and in ACE - nameprep encoding - +-----------+-------------+ +----------+ - | client | dynamically |---------------->|DNS server| - |application| attached |<----------------| | - | | library | +----------+ - +-----------+-------------+ - - ** 4. using mDN wrapper - By wrapping WINSOCK DLL, mDN Wrapper enables Windows applications - to resolve multilingual domain names. - - domain name nameprep domain name - in local and encoding in ACE - +-----------+ encoding conversion encoding - | legacy | +---------+---------+ +----------+ - | windows |------------>| mDN | orignal |---------->|DNS server| - | network |<------------| wrapper | winsock |<----------| | - |application| +---------+---------+ +----------+ - +-----------+ - - -2. Directory structure of this distribution - -Below is a directory structure of this distribution with some -important files and their brief description. - - +README this file - +README.ja .. in Japanese - +INSTALL compilation and installation instructions. - +INSTALL.ja .. in Japanese - +DISTFILES list of files in this distribution - +NEWS what's new in this version - +ChangeLog list of changes - +Makefile.in toplevel makefile template - +configure a `configure' script - +include/ - | +config.h.in template header file for configuration - | +mdn/ header files for mdn library - +lib/ source directory for mdn library - +mdnsproxy/ source directory for DNS proxy server - +patch/ various patch files - | +bind8/ bind-8 patch directory - | +bind9/ bind-9 patch directory - | +libiconv/ libiconv patch directory - | +squid/ squid patch directory - +tools/ source directory for tools - | +mdnconv/ source directory for codeset converter - | +runmdn/ source directory for runmdn command - +util/ utilities - +wsock/ source directory for mDN wrapper - - -3. Applying patches - -This distribution also contains patches for BIND 9.1.3, BIND 8.2.3 and -Squid 2.4.STABLE1. The top of these patch files describe how to apply -the patch and (re)install. - -Note that on Solaris, "patch" command that comes with the system -sometimes doesn't work correctly. You may want to install the GNU -version of the command (http://www.gnu.org/software/patch/) and use -it. - - -4. Supported systems - -We've had successful builds on the following systems: - - ------------------------------------------------------------------- - OS iconv library configure options - =================================================================== - FreeBSD 4.4-RELEASE GNU libiconv --with-libiconv - for Intel 1.6.1 - ------------------------------------------------------------------- - FreeBSD 3.5.1-RELEASE GNU libiconv --with-libiconv - for Intel 1.7 - ------------------------------------------------------------------- - NetBSD 1.5.2 GNU libiconv --with-libiconv - for Intel 1.7 - ------------------------------------------------------------------- - Red Hat Linux 7.1 standard library none - for Intel (glibc) - ------------------------------------------------------------------- - Red Hat Linux 7.0 standard library none - for Intel (glibc) - ------------------------------------------------------------------- - Debian/GNU Linux 2.2r3 standard library none - for Intel (glibc) - ------------------------------------------------------------------- - Solaris 2.6 standard library none - for Sparc (libc) - ------------------------------------------------------------------- - Windows2000 GNU libiconv --with-libiconv - (cygwin-1.3.2) *1 1.7 - ------------------------------------------------------------------- - - *1: Only mdnconv can work on that system. - -The latest information about supported/unsupported systems will be -found at the mDNkit FAQ page linked from: - - http://www.nic.ad.jp/jp/research/idn/ - - -5. Contact information - -Please see - - http://www.nic.ad.jp/jp/research/idn/ - -for the latest news about this kit. -Bug reports and comments on this kit should be sent to - - mdnkit-bugs@nic.ad.jp -and - idn-cmt@nic.ad.jp - -respectively. - - -; $Id: README,v 1.1 2002/01/02 02:46:21 marka Exp $ diff --git a/contrib/idn/mdnkit/README.ja b/contrib/idn/mdnkit/README.ja deleted file mode 100644 index 0effa902de..0000000000 --- a/contrib/idn/mdnkit/README.ja +++ /dev/null @@ -1,254 +0,0 @@ - - mDNkit - -- ¿¸À¸ì¥É¥á¥¤¥ó̾¥Ä¡¼¥ë¥­¥Ã¥È -- - ¥Ð¡¼¥¸¥ç¥ó 2.2.3 - (¼Ò) ÆüËܥͥåȥ¥¯¥¤¥ó¥Õ¥©¥á¡¼¥·¥ç¥ó¥»¥ó¥¿¡¼ (JPNIC) - - -¤³¤Î¥Õ¥¡¥¤¥ë¤ÎÌܼ¡: - - 1. ³µÍ× - 2. ¥Ç¥£¥ì¥¯¥È¥ê¹½À® - 3. ¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý - 4. ËÜ¥­¥Ã¥È¤¬Âбþ¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à - 5. ËÜ¥­¥Ã¥È¤Ë´Ø¤¹¤ëºÇ¿·¾ðÊó¡¢Ì䤤¹ç¤ï¤»¤Ë¤Ä¤¤¤Æ - -¥³¥ó¥Ñ¥¤¥ë¤ª¤è¤Ó¥¤¥ó¥¹¥È¡¼¥ëÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢INSTALL.ja ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò -¤´Í÷²¼¤µ¤¤¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Î¼ç¤ÊÊѹ¹ÅÀ¤ËÉÕ¤¤¤Æ¤Ï¡¢(±Ñʸ¤Ç¤¹¤¬) NEWS -¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò¤´Í÷²¼¤µ¤¤¡£ - - -1. ³µÍ× - -mDNkit ¤È¤Ï¿¸À¸ì¥É¥á¥¤¥ó̾¤ò°·¤¦¤¿¤á¤Î¥Ä¡¼¥ë¥­¥Ã¥È¤Ç¤¹¡£Â¿¸À¸ì¥É¥á¥¤ -¥ó̾¤ò°·¤¦¤¿¤á¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Êµ¡Ç½¤¬Í׵ᤵ¤ì¤Þ¤¹¡£ - -¡¦¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹ - ¿¸À¸ì¥É¥á¥¤¥ó̾¤ËÂФ·¤Æ¡¢¤½¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬»È - ÍѤ·¤Æ¤¤¤ë¤â¤Î (¥í¡¼¥«¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) ¤«¤é̾Á°²ò·è¤ËÍѤ¤¤é¤ì¤ë¤â - ¤Î (IDN ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) ¤Ø¤ÎÊÑ´¹¡¢¤Þ¤¿¤½¤ÎµÕÊý¸þ¤ÎÊÑ´¹¤ò¹Ô¤¤¤Þ¤¹¡£ - ¥É¥á¥¤¥ó̾¤ò IDN ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ë¤·¤¿·ë²Ì¤Ï¡¢½¾Íè¤Î¥É¥á¥¤¥ó̾¤ÈƱ - ¤¸¤¯ ASCII ʸ»ú¤Î¤ß¤Ç¹½À®¤µ¤ì¤ë¤Î¤Ç¡¢IDN ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ÏASCII ¸ß - ´¹¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° (ACE) ¤È¤â¸Æ¤Ð¤ì¤Þ¤¹¡£ - -¡¦NAMEPREP - ¥É¥á¥¤¥ó̾¤ò IDN ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ËÊÑ´¹¤¹¤ëÁ°¤Ë¡¢Ì¾Á°¤ÎÀµµ¬²½¤ò¹Ô¤¤ - ¤Þ¤¹¡£¤³¤ì¤ò NAMEPREP ¤È¸Æ¤Ó¤Þ¤¹¡£ - -¾åµ­¤Î½èÍý¤Ï¥É¥á¥¤¥ó̾¤ò DNS ¥µ¡¼¥Ð¤ËÁ÷¤ëÁ°¤Ë¼Â¹Ô¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ -½èÍýºÑ¤Î¥É¥á¥¤¥ó̾¤Ï ASCII ʸ»ú¤«¤é¹½À®¤µ¤ì¡¢½¾Íè¤Î ASCII ¥É¥á¥¤¥ó̾¤È -¤·¤Æ¤âÀµ¤·¤¤·Á¼°¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢DNS ¥µ¡¼¥Ð¦¤Ë¤Ï¤Ê¤ó¤ÎÊѹ¹¤âɬÍפ¢¤ê -¤Þ¤»¤ó¡£ - -¤³¤ÎÇÛÉÛ¥­¥Ã¥È¤Ë¤Ï¼¡¤Î¤è¤¦¤Ê¤â¤Î¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ - -¡¦Â¿¸À¸ì¥É¥á¥¤¥ó̾¤ò½èÍý¤¹¤ë¤¿¤á¤Î¥é¥¤¥Ö¥é¥ê (libmdn) - ¤³¤ì¤Ï¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹¤ä NAMEPREP ¤Îµ¡Ç½¤ò¼ÂÁõ¤·¤¿¥é¥¤¥Ö¥é¥ê¤Ç¤¹¡£ - ¤³¤Î¥é¥¤¥Ö¥é¥ê¤Ï¤³¤ì¤é¤Îµ¡Ç½¤ò»È¤¦¤¿¤á¤Î¥·¥ó¥×¥ë¤Ê API ¤òÈ÷¤¨¤Æ¤¤¤ë¤Î¤Ç¡¢ - ¤³¤Î¥é¥¤¥Ö¥é¥ê¤ò»ÈÍѤ¹¤ì¤Ð¡¢Â¿¸À¸ì¥É¥á¥¤¥ó̾¤ò°·¤¦µ¡Ç½¤ò´Êñ¤Ë - ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËÄɲ乤뤳¤È¤¬¤Ç¤­¤Þ¤¹¡£ - ¤Þ¤¿¤³¤Î¥é¥¤¥Ö¥é¥ê¤ÏËܥġ¼¥ë¥­¥Ã¥È¤Ë´Þ¤Þ¤ì¤ë¤µ¤Þ¤¶¤Þ¤Ê¥³¥Þ¥ó¥É - (mdnsproxy ¤ä mdnconv ¤Ê¤É) ¤ò¼ÂÁõ¤¹¤ë¤Î¤Ë¤â»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£ - -¡¦DNS¥×¥í¥­¥·¥µ¡¼¥Ð (mdnsproxy) - ¥É¥á¥¤¥ó̾ÊÑ´¹µ¡Ç½¤ò¤â¤Ä DNS ¤Î¥×¥í¥­¥·¥µ¡¼¥Ð¤Ç¤¹¡£¥¯¥é¥¤¥¢¥ó¥È¤«¤é - ¼õ¿®¤·¤¿ DNS ¥á¥Ã¥»¡¼¥¸Ãæ¤Î¥É¥á¥¤¥ó̾¤ò¥¯¥é¥¤¥¢¥ó¥È¤Î¥í¡¼¥«¥ë¥¨¥ó¥³¡¼ - ¥Ç¥£¥ó¥°¤«¤é DNS ¥µ¡¼¥Ð¤Î»ÈÍѤ¹¤ë DNS ¥×¥í¥È¥³¥ë¾å¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° - ¤Ø¤ÈÊÑ´¹¤·¤Æ DNS ¥µ¡¼¥Ð¤ËÁ÷¿®¤·¤Þ¤¹¡£¤Þ¤¿ DNS ¥µ¡¼¥Ð¤«¤éÊÖ¤µ¤ì¤¿DNS - ¥á¥Ã¥»¡¼¥¸Ãæ¤Î¥É¥á¥¤¥ó̾¤ò¥¯¥é¥¤¥¢¥ó¥È¤Î¥í¡¼¥«¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ËÌá - ¤·¤Æ¥¯¥é¥¤¥¢¥ó¥È¤ËÊÖ¤·¤Þ¤¹¡£¾Ü¤·¤¯¤Ï¡¢¸å½Ò¤Î¡Ö2. mdnsproxy ¤ò»È¤¦¡× - ¤ò¸æÍ÷¤¯¤À¤µ¤¤¡£ - -¡¦UNIX ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë MDN µ¡Ç½¤òưŪ¤ËÄɲ乤륳¥Þ¥ó¥É (runmdn) - UNIX ¤ÎÄ̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¿¸À¸ì¥É¥á¥¤¥ó̾¤ò¼è¤ê°·¤¦¤¿¤á¤Ë¡¢ÆÃ - Ê̤ʥ饤¥Ö¥é¥ê¤òưŪ¤Ë¥ê¥ó¥¯¤¹¤ë¤¿¤á¤Î¥³¥Þ¥ó¥É¤Ç¤¹¡£¾Ü¤·¤¯¤Ï¡¢¸å½Ò¤Î - ¡Ö3. runmdn ¤ò»È¤¦¡×¤ò¸æÍ÷¤¯¤À¤µ¤¤¡£ - -¡¦bind-9 ¤Ë MDN µ¡Ç½¤òÄɲ乤ë¥Ñ¥Ã¥Á - bind-9 ¤Ë MDN ¤Îµ¡Ç½¤òÄɲ乤ë¥Ñ¥Ã¥Á¤Ç¤¹¡£`dig'¡¢`host'¡¢`nslookup' - ¤Ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹¤È NAMEPREP ¤Îµ¡Ç½¤òÄɲä·¡¢Â¿¸À¸ì¥É¥á¥¤¥ó̾¤¬ - °·¤¨¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£ - -¡¦Windows ¥¢¥×¥ê¥±¡¼¥·¥ç¥óÍѤΠmDN ¥é¥Ã¥Ñ¡¼ - WINSOCK ¤Î̾Á°²ò·èµ¡Ç½¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼ DLL ¤Ç¤¹¡£Windows ¾å¤Ç¤Ï¡¢Ì¾ - Á°²ò·è¤ÎÍ×µá¤Ï¡¢WINSOCK DLL ¤òÄ̤·¤Æ¹Ô¤ï¤ì¤Þ¤¹¡£¤½¤³¤Ç¡¢¤³¤ì¤ò¿¸À¸ì - ¥É¥á¥¤¥óÍѤΠWINSOCK DLL ¤ËÃÖ¤­´¹¤¨¤ë¤³¤È¤Ç¡¢½¾Íè¤Î Windows ¥¢¥×¥ê¥±¡¼ - ¥·¥ç¥ó¤Ç¤â mDN µ¡Ç½¤ò»ÈÍѤǤ­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£¾Ü¤·¤¯¤Ï¡¢¸å½Ò¤Î - ¡Ö4. mDN ¥é¥Ã¥Ñ¡¼¤ò»È¤¦¡×¤ò¸æÍ÷¤¯¤À¤µ¤¤¡£ - -¡¦named.conf ¤ª¤è¤Ó¥¾¡¼¥ó¥Þ¥¹¥¿¥Õ¥¡¥¤¥ëÍÑ¥³¡¼¥É¥»¥Ã¥È¥³¥ó¥Ð¡¼¥¿ (mdnconv) - named.conf ¤ª¤è¤Ó¥¾¡¼¥ó¥Þ¥¹¥¿¥Õ¥¡¥¤¥ë¤òÂоݤȤ·¤¿¥³¡¼¥É¥»¥Ã¥È (¥¨¥ó - ¥³¡¼¥Ç¥£¥ó¥°) ÊÑ´¹Íѥġ¼¥ë¤Ç¤¹¡£SJIS ¤Ê¤É¤Î¥í¡¼¥«¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° - ¤Ç½ñ¤«¤ì¤¿¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò¡¢IDN ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° (Î㤨¤Ð RACE) ¤Ø - ¤ÈÊÑ´¹¤·¤Þ¤¹¡£ - -¡¦bind-8 ¤ò 8 ¥Ó¥Ã¥È¥¹¥ë¡¼²½¤¹¤ë¥Ñ¥Ã¥Á - named ¤ä¥ê¥¾¥ë¥Ð¤Ç¥í¡¼¥«¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ä UTF-8 ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° - ¤Î¥É¥á¥¤¥ó̾¤ò»ÈÍѲÄǽ¤Ë¤¹¤ë¤¿¤á¤Î¥Ñ¥Ã¥Á¤Ç¤¹¡£8¥Ó¥Ã¥È¥¹¥ë¡¼¤Ê¤Î¤Ç¤Û - ¤È¤ó¤É¤É¤ó¤Ê¥³¡¼¥É¤Ç¤âÄ̤äƤ·¤Þ¤¤¤Þ¤¹¡£ - -¡¦squid ¤ò 8 ¥Ó¥Ã¥È¥¹¥ë¡¼²½¤¹¤ë¥Ñ¥Ã¥Á - URL Ãæ¤Î¥Û¥¹¥È̾¤Ë´Ø¤¹¤ëÀµÅöÀ­¥Á¥§¥Ã¥¯¤ò³°¤¹¤¿¤á¤Î¥Ñ¥Ã¥Á¤Ç¤¹¡£¤³¤Î¥Ñ¥Ã - ¥Á¤òÅö¤Æ¤Ê¤¤¤È Squid ¤Ï¿¸À¸ì¥É¥á¥¤¥ó̾¤ò´Þ¤à URL ¤ò¥¨¥é¡¼¤È¤·¤Æ¤Ï¤¸ - ¤¤¤Æ¤·¤Þ¤¤¤Þ¤¹¡£ - - -¤³¤ÎÇÛÉÛ¥­¥Ã¥È¤Ï¡¢°Ê¾å¤Î¤â¤Î¤òÍѤ¤¤Æ¡¢Â¿¸À¸ì¥É¥á¥¤¥ó̾¤ò°·¤¦¤¿¤á¤ÎÊ£¿ô -¤ÎÊýË¡¤òÄ󶡤·¤Æ¤¤¤Þ¤¹¡£ - - ** 1. API ¤ò»È¤¦ - ¿¸À¸ì¥É¥á¥¤¥ó̾¤ò°·¤¦¤¿¤á¤ÎÊý¼°¤È¤·¤Æ¤Ï¤³¤ÎÊýË¡¤¬¿ä¾©¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ - ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï mDNkit ¤ÎÄ󶡤¹¤ë API ¤òÌÀ¼¨Åª¤Ë¸Æ¤Ó½Ð¤·¤Æ - ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹¤ä NAMEPREP ¤ò¹Ô¤¤¤Þ¤¹¡£ - - ACE ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Î - +----------------+-------+--------+ ¥É¥á¥¤¥ó̾ - | | | | +------------+ - | ¥¯¥é¥¤¥¢¥ó¥È | mdn |¥·¥¹¥Æ¥à|----------->| DNS ¥µ¡¼¥Ð | - |¥¢¥×¥ê¥±¡¼¥·¥ç¥ó|library| ÉÕ°¤Î |<-----------| | - | | |¥ê¥¾¥ë¥Ð| +------------+ - +----------------+-------+--------+ - - ** 2. mdnsproxy ¤ò»È¤¦ - ¾åµ­¤Î API ¤ò»È¤¦¤è¤¦¤Ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½¤Àµ¤Ç¤­¤Ê¤¤¾ì¹ç¤Ç¤â¡¢ - mdnsproxy ¤ò»ÈÍѤ¹¤ì¤Ð¿¸À¸ì¥É¥á¥¤¥ó̾¤Î̾Á°²ò·è¤ò¹Ô¤¦¤³¤È¤¬ - ²Äǽ¤Ç¤¹¡£¤¿¤À¤·¤³¤Î¾ì¹ç¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬ 8 ¥Ó¥Ã¥È¥¹¥ë¡¼¤Î - ¥ê¥¾¥ë¥Ð¤ò»È¤Ã¤Æ¤¤¤ë¤³¤È¤¬Á°Äó¤È¤Ê¤ê¤Þ¤¹¡£ - - ¥í¡¼¥«¥ë¥¨¥ó ¥¨¥ó¥³¡¼¥Ç¥£¥ó ACE¥¨¥ó¥³¡¼¥Ç¥£ - ¥³¡¼¥É¥£¥ó¥° ¥°ÊÑ´¹¤ª¤è¤ÓÀµ ¥ó¥°¤Î¥É¥á¥¤¥ó̾ - +----------------+¤Î¥É¥á¥¤¥ó̾ µ¬²½ - | ¥¯¥é¥¤¥¢¥ó¥È | +--------------+ +------+ - |¥¢¥×¥ê¥±¡¼¥·¥ç¥ó|------------>| mdnsproxy |------------>| DNS | - |¤È 8¥Ó¥Ã¥È¥¹¥ë¡¼|<------------| |<------------|¥µ¡¼¥Ð| - | ²½¤·¤¿¥ê¥¾¥ë¥Ð | +--------------+ +------+ - +----------------+ - - ** 3. runmdn ¤ò»È¤¦ - ¤¢¤ë¤¤¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬Ì¾Á°²ò·è ÍѤΠAPI - (gethostbyname ¤Ê¤É) ¤òưŪ¤Ë¥ê¥ó¥¯¤·¡¢¤«¤Ä OS ¤¬Å¬Àڤʵ¡Ç½¤ò - È÷¤¨¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï runmdn ¤ò»È¤¦¤³¤È¤â¤Ç¤­¤Þ¤¹¡£Ì¾Á°²ò·èÍѤΠ- API ¤ò¡¢¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹¤ä NAMEPREP µ¡Ç½¤òÈ÷¤¨¤¿¥Ð¡¼¥¸¥ç¥ó¤Î - ¤â¤Î¤ËưŪ¤ËÃÖ´¹¤¨¤ë¤³¤È¤Ë¤è¤ê¡¢Ä̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬Â¿¸À¸ì - ¥É¥á¥¤¥ó̾¤ò̾Á°²ò·è¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£ - - ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹ ACE¥¨¥ó¥³¡¼¥Ç¥£ - ¤ª¤è¤ÓÀµµ¬²½ ¥ó¥°¤Î¥É¥á¥¤¥ó̾ - +----------------+------------------+ - | ¥¯¥é¥¤¥¢¥ó¥È |ưŪ¤Ë¥ê¥ó¥¯¤µ¤ì¤¿| +------+ - |¥¢¥×¥ê¥±¡¼¥·¥ç¥ó| ¥é¥¤¥Ö¥é¥ê |---------------->| DNS | - |¤ÈÄ̾ï¤Î¥ê¥¾¥ë¥Ð| |<----------------|¥µ¡¼¥Ð| - +----------------+------------------+ +------+ - - ** 4. mDN ¥é¥Ã¥Ñ¡¼¤ò»È¤¦ - WINSOCK DLL ¤ò¥é¥Ã¥×¤¹¤ë¤³¤È¤Ë¤è¤ê¡¢mDN ¥é¥Ã¥Ñ¡¼¤Ï Windows ¤Î - ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬Â¿¸À¸ì¥É¥á¥¤¥ó̾¤ò̾Á°²ò·è¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£ - - ¥í¡¼¥«¥ë¥¨ Àµµ¬²½¤ª¤è¤Ó ACE¥¨¥ó¥³¡¼¥Ç¥£ - ¥ó¥³¡¼¥Ç¥£ ¥¨¥ó¥³¡¼¥Ç¥£ ¥ó¥°¤Î¥É¥á¥¤¥ó̾ - +----------------+ ¥ó¥°¤Î¥É¥á ¥ó¥°ÊÑ´¹ - |½¾Íè¤Î Windows | ¥¤¥ó̾ +---------+------------+ +------+ - |¥Í¥Ã¥È¥ï¡¼¥¯ |---------->| mDN | ¥ª¥ê¥¸¥Ê¥ë |---------->| DNS | - |¥¢¥×¥ê¥±¡¼¥·¥ç¥ó|<----------| ¥é¥Ã¥Ñ¡¼| winsock |<----------|¥µ¡¼¥Ð| - +----------------+ +---------+------------+ +------+ - - -2. ¥Ç¥£¥ì¥¯¥È¥ê¹½À® - -ÇÛÉÛ¥­¥Ã¥È¤Î¥Ç¥£¥ì¥¯¥È¥ê¹½À®¤È¡¢¼çÍפʥե¡¥¤¥ë¤ò¼¨¤·¤Þ¤¹¡£ - - README ±Ñ¸ìÈǤΠREADME - README.ja ¤³¤Î¥Õ¥¡¥¤¥ë - INSTALL ±Ñ¸ìÈǤΠINSTALL - INSTALL.ja ¥³¥ó¥Ñ¥¤¥ë¤È¥¤¥ó¥¹¥È¡¼¥ëÊýË¡ - DISTFILES ÇÛÉÛ¤µ¤ì¤ë¥Õ¥¡¥¤¥ë°ìÍ÷ - NEWS ¼ç¤ÊÊѹ¹ - ChangeLog Êѹ¹¾ÜºÙ - configure configure ¥¹¥¯¥ê¥×¥È - Makefile.in ¥È¥Ã¥×¥ì¥Ù¥ë¤Î Makefile ¤Î¥Æ¥ó¥×¥ì¡¼¥È - include/ ¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¥Ç¥£¥ì¥¯¥È¥ê - config.h.in config.h ¤Î¥Æ¥ó¥×¥ì¡¼¥È - mdn/ mdn ¥é¥¤¥Ö¥é¥êÍÑ¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë - lib/ mdn ¥é¥¤¥Ö¥é¥ê¥½¡¼¥¹ - mdnsproxy/ DNS ¥×¥í¥­¥·¥µ¡¼¥Ð¥½¡¼¥¹ - patch/ ³Æ¼ï¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë - bind8/ bind8 ÍѥѥåÁ - bind9/ bind9 ÍѥѥåÁ - libiconv/ libiconv ÍѥѥåÁ - squid/ squid ÍѥѥåÁ - tools/ ¼þÊեġ¼¥ë - mdnconv/ ¥³¡¼¥É¥»¥Ã¥È¥³¥ó¥Ð¡¼¥¿¥½¡¼¥¹ - runmdn/ runmdn ¥³¥Þ¥ó¥É¥½¡¼¥¹ - util/ ¥æ¡¼¥Æ¥£¥ê¥Æ¥£ - wsock/ mDN ¥é¥Ã¥Ñ¡¼¥½¡¼¥¹ - - -4. ¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý - -¤³¤ÎÇÛÉÛ¥­¥Ã¥È¤Ë¤Ï¡¢bind-9.1.3¡¢bind-8.2.3 ¤ª¤è¤Ó squid-2.4-STABLE1 ¤Ë -ÂФ¹¤ë¥Ñ¥Ã¥Á¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¥Ñ¥Ã¥Á¤ÎÅö¤ÆÊý¤Ï¡¢¥Ñ¥Ã¥Á¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤Ë -½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¤½¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ - -Solaris ¤Ç¤Ï¡¢¥·¥¹¥Æ¥àÉÕ°¤Î patch ¥³¥Þ¥ó¥É¤¬Àµ¾ï¤Ëưºî¤·¤Ê¤¤¤³¤È¤¬¤¢ -¤ê¤Þ¤¹¡£¤½¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¡¢GNU ¥Ð¡¼¥¸¥ç¥ó¤Î patch -(http://www.gnu.org/software/patch/) ¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¡¢¤³¤ì¤ò»ÈÍѤ· -¤Æ¤¯¤À¤µ¤¤¡£ - - -5. ËÜ¥­¥Ã¥È¤¬Âбþ¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à - -Àµ¾ï¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤Ç¤­¤ë¤³¤È¤¬³Îǧ¤Ç¤­¤Æ¤¤¤ë¤Î¤Ï¡¢¼¡¤Î¥·¥¹¥Æ¥à¤Ç¤¹¡£ - - ------------------------------------------------------------------ - OS iconv configure ¤Î¥ª¥×¥·¥ç¥ó - ================================================================== - FreeBSD 4.4-RELEASE GNU libiconv --with-libiconv - Intel 1.6.1 - ------------------------------------------------------------------- - FreeBSD 3.5.1-RELEASE GNU libiconv --with-libiconv - Intel 1.7 - ------------------------------------------------------------------- - NetBSD 1.5.2 GNU libiconv --with-libiconv - Intel 1.7 - ------------------------------------------------------------------ - Red Hat Linux 7.1 ɸ½à¥é¥¤¥Ö¥é¥ê ¤Ê¤· - Intel (glibc) - ------------------------------------------------------------------ - Red Hat Linux 7.0 ɸ½à¥é¥¤¥Ö¥é¥ê ¤Ê¤· - Intel (glibc) - ------------------------------------------------------------------- - Debian/GNU Linux 2.2r3 ɸ½à¥é¥¤¥Ö¥é¥ê ¤Ê¤· - Intel (glibc) - ------------------------------------------------------------------ - Solaris 2.6 ɸ½à¥é¥¤¥Ö¥é¥ê ¤Ê¤· - Sparc (libc) - ------------------------------------------------------------------ - Windows 2000 GNU libiconv --with-libiconv - (cygwin-1.3.2) *1 1.7 - ------------------------------------------------------------------- - - *1: ưºî¤¹¤ë¤Î¤Ï mdnconv ¤À¤±¤Ç¤¹¡£ - -ËÜ¥­¥Ã¥È¤¬Âбþ¤·¤Æ¤¤¤ë/¤·¤Æ¤¤¤Ê¤¤¥·¥¹¥Æ¥à¤Ë´Ø¤¹¤ëºÇ¿·¤Î¾ðÊó¤Ï¡¢¼¡¤Î¤È -¤³¤í¤«¤éé¤ì¤ë mDNkit FAQ ¤Î¥Ú¡¼¥¸¤Ëµ­¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ - - http://www.nic.ad.jp/jp/research/idn/ - - -6. ËÜ¥­¥Ã¥È¤Ë´Ø¤¹¤ëºÇ¿·¾ðÊó¡¢Ì䤤¹ç¤ï¤»¤Ë¤Ä¤¤¤Æ - -ËÜ¥­¥Ã¥È¤Ë´Ø¤¹¤ëºÇ¿·¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢ - - http://www.nic.ad.jp/jp/research/idn/ - -¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤ -ËÜ¥­¥Ã¥È¤Ë´Ø¤¹¤ë¥Ð¥°¥ì¥Ý¡¼¥È¤ª¤è¤Ó¥³¥á¥ó¥È¤Ï¡¢¤½¤ì¤¾¤ì - - mdnkit-bugs@nic.ad.jp -¤ª¤è¤Ó - idn-cmt@nic.ad.jp - -¤Ø¤ª´ê¤¤¤·¤Þ¤¹¡£ - - -; $Id: README.ja,v 1.1 2002/01/02 02:46:21 marka Exp $ diff --git a/contrib/idn/mdnkit/acconfig.h b/contrib/idn/mdnkit/acconfig.h deleted file mode 100644 index d0b1671fef..0000000000 --- a/contrib/idn/mdnkit/acconfig.h +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id: acconfig.h,v 1.1 2002/01/02 02:46:21 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ -@TOP@ - -/* Define as an appropriate type (ex. int) if your system doesn't have. */ -#undef BOOL - -@BOTTOM@ -/* Define as the pathname of the shared libc object if your system has one. */ -#undef SOPATH_LIBC - -/* Define as the pathname of the shared libnsl object if your system has one. */ -#undef SOPATH_LIBNSL diff --git a/contrib/idn/mdnkit/aclocal.m4 b/contrib/idn/mdnkit/aclocal.m4 deleted file mode 100644 index 7e35578c1f..0000000000 --- a/contrib/idn/mdnkit/aclocal.m4 +++ /dev/null @@ -1,557 +0,0 @@ -## -## $Id: aclocal.m4,v 1.1 2002/01/02 02:46:21 marka Exp $ -## -dnl -dnl AC_ACE_PREFIX(ace-name, default) -dnl AC_ACE_SUFFIX(ace-name, default) -dnl AC_ACE_SIGNATURE(ace-name, prefix-default, suffix-default) -dnl -define([AC_ACE_PREPARE], [dnl -undefine([ACE_ID])undefine([ACE_PSYM])undefine([ACE_SSYM])dnl -define([ACE_ID],translit($1,[A-Z_],[a-z-]))dnl -define([ACE_PSYM],[MDN_]translit(ACE_ID,[a-z-],[A-Z])[_PREFIX])dnl -define([ACE_SSYM],[MDN_]translit(ACE_ID,[a-z-],[A-Z])[_SUFFIX])])dnl -dnl -AC_DEFUN([AC_ACE_PREFIX],[AC_ACE_PREPARE($1)dnl -ace_prefix=no -AC_ARG_WITH(ACE_ID-prefix, -[ --with-]ACE_ID[-prefix=PREFIX prefix for $1 encoding [$2]], - ace_prefix=$withval) -case "${ace_prefix}" in -no) - ace_prefix="$2" - ;; -yes) - AC_MSG_ERROR([You must specify PREFIX to --with-ACE_ID-prefix option.]) - ;; -esac -if test "${ace_prefix}" != ""; then - AC_DEFINE_UNQUOTED(ACE_PSYM, "${ace_prefix}", - [Define if the prefix of $1 encoding differs from '$2'.]) -fi -]) -AC_DEFUN([AC_ACE_SUFFIX],[AC_ACE_PREPARE($1)dnl -ace_suffix=no -AC_ARG_WITH(ACE_ID-suffix, -[ --with-]ACE_ID[-suffix=SUFFIX suffix for $1 encoding [$2]], - ace_suffix=$withval) -case "${ace_suffix}" in -no) - ace_suffix="$2" - ;; -yes) - AC_MSG_ERROR([You must specify SUFFIX to --with-ACE_ID-suffix option.]) - ;; -esac -if test "${ace_suffix}" != ""; then - AC_DEFINE_UNQUOTED(ACE_SSYM, "${ace_suffix}", - [Define if the suffix of $1 encoding differs from '$2'.]) -fi -]) -AC_DEFUN([AC_ACE_SIGNATURE],[AC_ACE_PREPARE($1)dnl -ace_prefix=no -ace_suffix=no -AC_ARG_WITH(ACE_ID-prefix, -[ --with-]ACE_ID[-prefix=PREFIX prefix for $1 encoding [$2]], - ace_prefix=$withval) -case "${ace_prefix}" in -no) - ace_prefix="" - ;; -yes) - AC_MSG_ERROR([You must specify PREFIX to --with-ACE_ID-prefix option.]) - ;; -esac -AC_ARG_WITH(ACE_ID-suffix, -[ --with-]ACE_ID[-suffix=SUFFIX suffix for $1 encoding [$3]], - ace_suffix=$withval) -case "${ace_suffix}" in -no) - ace_suffix="" - ;; -yes) - AC_MSG_ERROR([You must specify SUFFIX to --with-ACE_ID-suffix option.]) - ;; -esac -if test "${ace_prefix}${ace_suffix}" = ""; then - ace_prefix="$2" - ace_suffix="$3" -fi -if test "${ace_prefix}" != ""; then - AC_DEFINE_UNQUOTED(ACE_PSYM, "${ace_prefix}", - [Define if the prefix of $1 encoding differs from '$2'.]) -elif test "${ace_suffix}" != ""; then - AC_DEFINE_UNQUOTED(ACE_SSYM, "${ace_suffix}", - [Define if the suffix of $1 encoding differs from '$3'.]) -fi -]) - -AC_DEFUN(AC_FIND_SYSTEM_SHOBJ,[ -AC_MSG_CHECKING(for $1 shared object) -shobj_name=$1 -shobj_path= -case "$host" in -*-hpux*) - SOEXT=sl - ;; -*) - SOEXT=so - ;; -esac -for shobj_libdir in /lib /usr/lib; do - if test -f $shobj_libdir/$shobj_name.$SOEXT; then - shobj_path=$shobj_libdir/$shobj_name.$SOEXT - else - shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` - if test "$shobj_path" != "" -a -f "$shobj_path"; then - : - else - shobj_path= - fi - fi - if test "$shobj_path" != ""; then - AC_MSG_RESULT($shobj_path) - shobj_pathsymbol=SOPATH_`echo $shobj_name | tr a-z A-Z` - AC_DEFINE_UNQUOTED($shobj_pathsymbol, "$shobj_path") - break - fi -done -if test "$shobj_path" = ""; then - AC_MSG_RESULT(no) -fi -])dnl - -## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- -## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library and INCLTDL to the include flags for -# the libltdl header and adds --enable-ltdl-convenience to the -# configure arguments. Note that LIBLTDL and INCLTDL are not -# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not -# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed -# with '${top_builddir}/' and INCLTDL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library and INCLTDL to the include flags for -# the libltdl header and adds --enable-ltdl-install to the configure -# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is -# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed -# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed -# with '${top_srcdir}/' (note the single quotes!). If your package is -# not flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl diff --git a/contrib/idn/mdnkit/config.guess b/contrib/idn/mdnkit/config.guess deleted file mode 100644 index dff9e481b7..0000000000 --- a/contrib/idn/mdnkit/config.guess +++ /dev/null @@ -1,1317 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. - -timestamp='2001-09-04' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# Please send patches to . -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - - -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - rm -f $dummy.c $dummy.o $dummy.rel ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - sparc*:NetBSD:*) - echo `uname -p`-unknown-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - esac ;; - esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; - esac - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then - UNAME_MACHINE=pc - fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/contrib/idn/mdnkit/config.sub b/contrib/idn/mdnkit/config.sub deleted file mode 100644 index 393f13d373..0000000000 --- a/contrib/idn/mdnkit/config.sub +++ /dev/null @@ -1,1411 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. - -timestamp='2001-09-07' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit 0;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ - | mn10200 | mn10300 \ - | ns16k | ns32k \ - | openrisc \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | s390 | s390x \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | stormy16 | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 \ - | we32k \ - | x86 | xscale \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i686-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sparclite-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=t3e-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh3 | sh4 | sh3eb | sh4eb) - basic_machine=sh-unknown - ;; - sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto*) - os=-nto-qnx - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/contrib/idn/mdnkit/configure b/contrib/idn/mdnkit/configure deleted file mode 100644 index 3f51ec916f..0000000000 --- a/contrib/idn/mdnkit/configure +++ /dev/null @@ -1,3848 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --enable-debug enable debug codes [default=no]" -ac_help="$ac_help - --with-logdir=DIR mdnsproxy's log files are in DIR. - [default=LOCALSTATEDIR/mdnsproxy]" -ac_help="$ac_help - --enable-extra-ace enable additional ACE converters. [default=no]" -ac_help="$ac_help - --with-utf8=NAME codeset name for UTF-8 encoding [UTF-8]" -ac_help="$ac_help - --with-race-prefix=PREFIX prefix for RACE encoding [bq--]" -ac_help="$ac_help - --with-brace-suffix=SUFFIX suffix for BRACE encoding [-8q9]" -ac_help="$ac_help - --with-lace-prefix=PREFIX prefix for LACE encoding [lq--]" -ac_help="$ac_help - --with-utf-6-prefix=PREFIX prefix for UTF-6 encoding [wq--]" -ac_help="$ac_help - --with-dude-prefix=PREFIX prefix for DUDE encoding [dq--]" -ac_help="$ac_help - --with-altdude-prefix=PREFIX prefix for AltDUDE encoding [a---]" -ac_help="$ac_help - --with-altdude-suffix=SUFFIX suffix for AltDUDE encoding []" -ac_help="$ac_help - --with-amc-ace-m-prefix=PREFIX prefix for AMC-ACE-M encoding []" -ac_help="$ac_help - --with-amc-ace-m-suffix=SUFFIX suffix for AMC-ACE-M encoding [-amc1]" -ac_help="$ac_help - --with-amc-ace-o-prefix=PREFIX prefix for AMC-ACE-O encoding []" -ac_help="$ac_help - --with-amc-ace-o-suffix=SUFFIX suffix for AMC-ACE-O encoding [-amc2]" -ac_help="$ac_help - --with-amc-ace-r-prefix=PREFIX prefix for AMC-ACE-R encoding [amc3-]" -ac_help="$ac_help - --with-amc-ace-v-prefix=PREFIX prefix for AMC-ACE-V encoding [amc4-]" -ac_help="$ac_help - --with-amc-ace-w-prefix=PREFIX prefix for AMC-ACE-W encoding [amc5-]" -ac_help="$ac_help - --with-amc-ace-z-prefix=PREFIX prefix for AMC-ACE-Z encoding [zq--]" -ac_help="$ac_help - --with-mace-prefix=PREFIX prefix for MACE encoding [mq--]" -ac_help="$ac_help - --with-libiconv=IPREFIX GNU libiconv are installed in IPREFIX [PREFIX]" -ac_help="$ac_help - --with-iconv-include=DIR iconv include files are in DIR []" -ac_help="$ac_help - --with-iconv=LIB special library for iconv []" -ac_help="$ac_help - --with-iconv-sofile=PATH shared library file for libiconv []" -ac_help="$ac_help - --with-preference=ARG change the default configuration to the one - suitable for ARG." -ac_help="$ac_help - --enable-shared[=PKGS] build shared libraries [default=yes]" -ac_help="$ac_help - --enable-static[=PKGS] build static libraries [default=yes]" -ac_help="$ac_help - --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" -ac_help="$ac_help - --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -ac_help="$ac_help - --disable-libtool-lock avoid locking (might break parallel builds)" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=include/mdn/converter.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:614: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - - -debug=no -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - debug=$enableval -fi - -case "$enableval" in -yes) - CFLAGS="$CFLAGS -DDEBUG" - ;; -esac - -logdir=no -# Check whether --with-logdir or --without-logdir was given. -if test "${with_logdir+set}" = set; then - withval="$with_logdir" - logdir=$withval -fi - -case "$logdir" in -no) - logdir='${localstatedir}/mdnsproxy' - ;; -yes) - { echo "configure: error: You must specify DIR to --with-logdir option." 1>&2; exit 1; } - ;; -esac - - -extraace=no -# Check whether --enable-extra-ace or --disable-extra-ace was given. -if test "${enable_extra_ace+set}" = set; then - enableval="$enable_extra_ace" - extraace=$enableval -fi - -case "$extraace" in -no) - ;; -yes) - cat >> confdefs.h <<\EOF -#define MDN_EXTRA_ACE 1 -EOF - - ;; -*) - { echo "configure: error: You must specify yes or no to --enable-extra-ace option." 1>&2; exit 1; } - ;; -esac - -utf8name=no -# Check whether --with-utf8 or --without-utf8 was given. -if test "${with_utf8+set}" = set; then - withval="$with_utf8" - utf8name=$withval -fi - -case "$utf8name" in -no) - utf8name=UTF-8 - ;; -yes) - { echo "configure: error: You must specify NAME to --with-utf8 option." 1>&2; exit 1; } - ;; -*) - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_suffix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -# Check whether --with-altdude-suffix or --without-altdude-suffix was given. -if test "${with_altdude_suffix+set}" = set; then - withval="$with_altdude_suffix" - ace_suffix=$withval -fi - -case "${ace_suffix}" in -no) - ace_suffix="" - ;; -yes) - { echo "configure: error: You must specify SUFFIX to --with-altdude-suffix option." 1>&2; exit 1; } - ;; -esac -if test "${ace_prefix}${ace_suffix}" = ""; then - ace_prefix="a---" - ace_suffix="" -fi -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <> confdefs.h <&2; exit 1; } - ;; -esac -# Check whether --with-amc-ace-m-suffix or --without-amc-ace-m-suffix was given. -if test "${with_amc_ace_m_suffix+set}" = set; then - withval="$with_amc_ace_m_suffix" - ace_suffix=$withval -fi - -case "${ace_suffix}" in -no) - ace_suffix="" - ;; -yes) - { echo "configure: error: You must specify SUFFIX to --with-amc-ace-m-suffix option." 1>&2; exit 1; } - ;; -esac -if test "${ace_prefix}${ace_suffix}" = ""; then - ace_prefix="" - ace_suffix="-amc1" -fi -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <> confdefs.h <&2; exit 1; } - ;; -esac -# Check whether --with-amc-ace-o-suffix or --without-amc-ace-o-suffix was given. -if test "${with_amc_ace_o_suffix+set}" = set; then - withval="$with_amc_ace_o_suffix" - ace_suffix=$withval -fi - -case "${ace_suffix}" in -no) - ace_suffix="" - ;; -yes) - { echo "configure: error: You must specify SUFFIX to --with-amc-ace-o-suffix option." 1>&2; exit 1; } - ;; -esac -if test "${ace_prefix}${ace_suffix}" = ""; then - ace_prefix="" - ace_suffix="-amc2" -fi -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2; exit 1; } - ;; -esac -if test "${ace_prefix}" != ""; then - cat >> confdefs.h <&2 - ICONVINC= - ;; -*) - ICONVINC="-I$iconv_include" - ;; -esac - -if test "X$ICONVINC" != X ; then - iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`" - if test ! -f "$iconv_include/iconv.h" ; then - { echo "configure: error: iconv.h doesn't exist in $iconv_include" 1>&2; exit 1; } - fi -fi - - - -iconv=unspec -# Check whether --with-iconv or --without-iconv was given. -if test "${with_iconv+set}" = set; then - withval="$with_iconv" - iconv=$withval -fi - -case "$iconv" in -unspec) - ;; -no) - ICONVLIB= - ;; -yes) - echo "configure: warning: You must supply LIB to --with-iconv option. - -liconv is assumed." 1>&2 - ICONVLIB=-liconv - ;; -*) - ICONVLIB=$iconv - ;; -esac - - -# Check whether --with-iconv-sofile or --without-iconv-sofile was given. -if test "${with_iconv_sofile+set}" = set; then - withval="$with_iconv_sofile" - iconv_file=$withval -else - iconv_file=guess -fi - -ICONVSOFILE= -case "$iconv_file" in -no) - ICONVSOFILE=none - ;; -yes) - { echo "configure: error: You must supply PATH to --with-iconv-sofile option." 1>&2; exit 1; } - ;; -guess) - if test "$ICONVLIB" = ""; then - ICONVSOFILE=none - else - echo $ac_n "checking pathname of iconv shared library""... $ac_c" 1>&6 -echo "configure:1176: checking pathname of iconv shared library" >&5 - ic_libdir= - ic_libname= - case "$host" in - *-hpux*) - SO=sl - ;; - *) - SO=so - ;; - esac - for arg in $ICONVLIB; do - case "$arg" in - -L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;; - -l*) ic_libname=`echo $arg | sed s/-l//` ;; - /*.$SO*) ICONVSOFILE=$arg ;; - esac - done - if test "$ICONVSOFILE" = ""; then - if test "$ic_libname" = ""; then - echo "$ac_t""unknown" 1>&6 - echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2 - ICONVSOFILE=none - else - if test "$ic_libdir" = ""; then - # Standard (and semi-standard) library directories - ic_libdir="/lib /usr/lib /usr/local/lib" - fi - for dir in $ic_libdir; do - ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1` - if test "$ICONVSOFILE" != ""; then - break - fi - done - if test "$ICONVSOFILE" != ""; then - echo "$ac_t""$ICONVSOFILE" 1>&6 - else - echo "$ac_t""unknown" 1>&6 - echo "configure: warning: use --with-iconv-sofile for specifying iconv shared library file" 1>&2 - ICONVSOFILE=none - fi - fi - fi - fi - ;; -*) - ICONVSOFILE=$iconv_file - ;; -esac - - -CONF_PREFERENCE=no -INSTALL_DEFAULT_CONF=yes -# Check whether --with-preference or --without-preference was given. -if test "${with_preference+set}" = set; then - withval="$with_preference" - CONF_PREFERENCE=$withval -fi - -CONF_PREFERENCE=`echo $CONF_PREFERENCE | tr A-Z a-z` -case "$CONF_PREFERENCE" in -no) - CONF_PREFERENCE=default - INSTALL_DEFAULT_CONF=no - ;; -yes) - { echo "configure: error: You must specify ARG to --with-preference option." 1>&2; exit 1; } - ;; -jp) - ;; -*) - { echo "configure: error: Unknown ARG for --with-preference option." 1>&2; exit 1; } - ;; -esac - - - -PRELOAD_VAR="LD_PRELOAD" -PRELOAD_SEP=":" -PRELOAD_LAST="" -case "$host" in -*-solaris*) - PRELOAD_SEP=" " - ;; -*-linux*) - PRELOAD_SEP=" " - ;; -*-osf*) - PRELOAD_VAR="_RLD_LIST" - PRELOAD_LAST=":DEFAULT" - ;; -*-netbsd*) - if test -x /usr/bin/file -a -x /usr/bin/grep ; then - case "`/usr/bin/file /usr/bin/grep`" in - *ELF*) - PRELOAD_SEP=" " - ;; - esac - fi - ;; -esac - - - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1285: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1315: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1366: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1398: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1409 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1440: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1445: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1473: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1516: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_shared=yes -fi - -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_static=yes -fi - -# Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_fast_install=yes -fi - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1638: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1658: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1697: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1721: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1724: checking for non-GNU ld" >&5 -fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$ac_cv_path_LD" -if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1759: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 - - -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1775: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi -fi - -NM="$ac_cv_path_NM" -echo "$ac_t""$NM" 1>&6 - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1811: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" - - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - : -fi - -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 1860 "configure"' > conftest.$ac_ext - if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1882: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - lt_cv_cc_needs_belf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - - -esac - - -# Save cache, so that ltconfig can load it -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } - -# Reload cache, that may have been modified by ltconfig -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1997: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_hdr in unistd.h locale.h langinfo.h resolv.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2080: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/select.h arpa/nameser.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2120: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in dlfcn.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2160: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $ICONVINC" -ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for iconv.h""... $ac_c" 1>&6 -echo "configure:2201: checking for iconv.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: iconv.h doesn't exist" 1>&2; exit 1; } -fi - -CPPFLAGS=$saved_CPPFLAGS - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2236: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2270: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -echo $ac_n "checking for BOOL""... $ac_c" 1>&6 -echo "configure:2374: checking for BOOL" >&5 -if eval "test \"`echo '$''{'ac_cv_type_BOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])BOOL[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_BOOL=yes -else - rm -rf conftest* - ac_cv_type_BOOL=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_BOOL" 1>&6 -if test $ac_cv_type_BOOL = no; then - cat >> confdefs.h <<\EOF -#define BOOL int -EOF - -fi - - -echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2408: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:2455: checking for inet_addr in -lnsl" >&5 -ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2502: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - LIBS="-ldl $LIBS" - LIBDL="-ldl" - cat >> confdefs.h <<\EOF -#define HAVE_LIBDL 1 -EOF - - - -else - echo "$ac_t""no" 1>&6 -fi - - -for ac_func in vsnprintf setvbuf setlocale nl_langinfo memmove bcopy syslog -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2553: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in gethostbyname gethostbyname2 gethostbyaddr -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2608: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in gethostbyname_r gethostbyname2_r gethostbyaddr_r -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2663: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getipnodebyname getipnodebyaddr freehostent -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2718: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getaddrinfo freeaddrinfo getnameinfo -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2773: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in dlopen dlsym -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2828: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking flavor of gethostbyaddr""... $ac_c" 1>&6 -echo "configure:2882: checking flavor of gethostbyaddr" >&5 -if eval "test \"`echo '$''{'ac_cv_flavor_gethostbyaddr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_flavor_gethostbyaddr=unknown -if test "$cross_compiling" = yes; then - ac_cv_flavor_gethostbyaddr=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_gethostbyaddr=glibc2_2 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$cross_compiling" = yes; then - ac_cv_flavor_gethostbyaddr=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -struct hostent *gethostbyaddr(const char *addr, size_t len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_gethostbyaddr=glibc -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$cross_compiling" = yes; then - ac_cv_flavor_gethostbyaddr=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -struct hostent *gethostbyaddr(const char *addr, int len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_gethostbyaddr=traditional -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$ac_cv_func_gethostbyaddr" = no ; then - ac_cv_flavor_gethostbyaddr=none -fi -fi - -echo "$ac_t""$ac_cv_flavor_gethostbyaddr" 1>&6 - -case "$ac_cv_flavor_gethostbyaddr" in -glibc2_2) - ac_cv_type_ghba_addr_t='const void *' - ac_cv_type_ghba_addrlen_t='socklen_t' - ;; -glibc) - ac_cv_type_ghba_addr_t='const char *' - ac_cv_type_ghba_addrlen_t='size_t' - ;; -traditional | none) - ac_cv_type_ghba_addr_t='const char *' - ac_cv_type_ghba_addrlen_t='int' - ;; -*) - echo "configure: warning: runmdn command will not be built." 1>&2 - ;; -esac -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:3011: checking flavor of getnameinfo" >&5 -if eval "test \"`echo '$''{'ac_cv_flavor_getnameinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_flavor_getnameinfo=unknown -if test "$cross_compiling" = yes; then - ac_cv_flavor_getnameinfo=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - socklen_t hostlen, char *serv, socklen_t servlen, - unsigned int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_getnameinfo=glibc2_2_2 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$cross_compiling" = yes; then - ac_cv_flavor_getnameinfo=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - socklen_t hostlen, char *serv, socklen_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_getnameinfo=rfc2553bis_03 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$cross_compiling" = yes; then - ac_cv_flavor_getnameinfo=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_getnameinfo=rfc2553 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$cross_compiling" = yes; then - ac_cv_flavor_getnameinfo=unknown -else - cat > conftest.$ac_ext < -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} - -EOF -if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_getnameinfo=rfc2133 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - -if test "$ac_cv_func_getnameinfo" = no ; then - ac_cv_flavor_getnameinfo=none -fi -fi - -echo "$ac_t""$ac_cv_flavor_getnameinfo" 1>&6 - -case "$ac_cv_flavor_getnameinfo" in -glibc2_2_2) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='socklen_t' - ac_cv_type_gni_servlen_t='socklen_t' - ac_cv_type_gni_flags_t='unsigned int' - ;; -rfc2553bis_03) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='socklen_t' - ac_cv_type_gni_servlen_t='socklen_t' - ac_cv_type_gni_flags_t='int' - ;; -rfc2553) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='size_t' - ac_cv_type_gni_servlen_t='size_t' - ac_cv_type_gni_flags_t='int' - ;; -rfc2133 | none) - ac_cv_type_gni_salen_t='size_t' - ac_cv_type_gni_hostlen_t='size_t' - ac_cv_type_gni_servlen_t='size_t' - ac_cv_type_gni_flags_t='int' - ;; -*) - echo "configure: warning: runmdn command will not be built." 1>&2 - ;; -esac - -cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:3206: checking flavor of gethostbyname_r" >&5 -if eval "test \"`echo '$''{'ac_cv_flavor_gethost_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_flavor_gethost_r=sun -else - cat > conftest.$ac_ext < -#include -#include -#include -#include -int main() -{ - int err = 0; - struct hostent hebuf, *hp; - char buf[10]; - /* Try resolving a invalid name using glibc flavor. */ - (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err); - if (err != 0) - return 0; /* glibc flavor */ - else - return 1; /* Sun flavor */ -} - -EOF -if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_flavor_gethost_r=glibc -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_flavor_gethost_r=sun -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_flavor_gethost_r" 1>&6 - if test "$ac_cv_flavor_gethost_r" = "glibc"; then - cat >> confdefs.h <<\EOF -#define GETHOST_R_GLIBC_FLAVOR 1 -EOF - - fi -fi - - -echo $ac_n "checking for libc shared object""... $ac_c" 1>&6 -echo "configure:3261: checking for libc shared object" >&5 -shobj_name=libc -shobj_path= -case "$host" in -*-hpux*) - SOEXT=sl - ;; -*) - SOEXT=so - ;; -esac -for shobj_libdir in /lib /usr/lib; do - if test -f $shobj_libdir/$shobj_name.$SOEXT; then - shobj_path=$shobj_libdir/$shobj_name.$SOEXT - else - shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` - if test "$shobj_path" != "" -a -f "$shobj_path"; then - : - else - shobj_path= - fi - fi - if test "$shobj_path" != ""; then - echo "$ac_t""$shobj_path" 1>&6 - shobj_pathsymbol=SOPATH_`echo $shobj_name | tr a-z A-Z` - cat >> confdefs.h <&6 -fi - - -echo $ac_n "checking for libnsl shared object""... $ac_c" 1>&6 -echo "configure:3299: checking for libnsl shared object" >&5 -shobj_name=libnsl -shobj_path= -case "$host" in -*-hpux*) - SOEXT=sl - ;; -*) - SOEXT=so - ;; -esac -for shobj_libdir in /lib /usr/lib; do - if test -f $shobj_libdir/$shobj_name.$SOEXT; then - shobj_path=$shobj_libdir/$shobj_name.$SOEXT - else - shobj_path=`ls -r $shobj_libdir/$shobj_name.$SOEXT* 2>/dev/null | head -1` - if test "$shobj_path" != "" -a -f "$shobj_path"; then - : - else - shobj_path= - fi - fi - if test "$shobj_path" != ""; then - echo "$ac_t""$shobj_path" 1>&6 - shobj_pathsymbol=SOPATH_`echo $shobj_name | tr a-z A-Z` - cat >> confdefs.h <&6 -fi - - -echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:3337: checking for iconv" >&5 -saved_CPPFLAGS=$CPPFLAGS -saved_LIBS=$LIBS -CPPFLAGS="$CPPFLAGS $ICONVINC" -LIBS="$LIBS $ICONVLIB" -cat > conftest.$ac_ext < - -int main() { - - iconv_t i; - i = iconv_open("ISO-8859-1", "UTF-8"); - -; return 0; } -EOF -if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - iconv_try_link=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - iconv_try_link=no -fi -rm -f conftest* -LIBS=$saved_LIBS -CPPFLAGS=$saved_CPPFLAGS -echo "$ac_t""$iconv_try_link" 1>&6 -if test "$iconv_try_link" = no ; then - { echo "configure: error: iconv function not available" 1>&2; exit 1; } -fi - -echo $ac_n "checking for codeset name $utf8name""... $ac_c" 1>&6 -echo "configure:3373: checking for codeset name $utf8name" >&5 -saved_CPPFLAGS=$CPPFLAGS -saved_LIBS=$LIBS -CPPFLAGS="$CPPFLAGS $ICONVINC" -LIBS="$LIBS $ICONVLIB" -if test "$cross_compiling" = yes; then - utf8_name_valid=unknown -else - cat > conftest.$ac_ext < -#include -#include -#define UTF8_NAME "$utf8name" -#define ICONV_FAIL ((iconv_t)(-1)) -/* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */ -int main() { - int i; - /* list of codeset names likely to exist */ - static char *codeset[] = { - "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1", - "Shift_JIS", "SJIS", "sjis", NULL, - }; - - /* First try null conversion. */ - if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0; - - /* Unfortunately, above check fails on certain systems, such as Solaris. */ - for (i = 0; codeset[i] != NULL; i++) { - if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0; - } - return 1; -} - -EOF -if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - utf8_name_valid=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - utf8_name_valid=no -fi -rm -fr conftest* -fi - -LIBS=$saved_LIBS -CPPFLAGS=$saved_CPPFLAGS -echo "$ac_t""$utf8_name_valid" 1>&6 - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile - include/Makefile - include/mdn/Makefile - lib/Makefile - mdnsproxy/Makefile - man/Makefile - tools/Makefile - tools/mdnconv/Makefile - tools/runmdn/Makefile - tools/runmdn/runmdn - map/Makefile - include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@logdir@%$logdir%g -s%@ICONVINC@%$ICONVINC%g -s%@ICONVLIB@%$ICONVLIB%g -s%@ICONVSOFILE@%$ICONVSOFILE%g -s%@CONF_PREFERENCE@%$CONF_PREFERENCE%g -s%@INSTALL_DEFAULT_CONF@%$INSTALL_DEFAULT_CONF%g -s%@PRELOAD_VAR@%$PRELOAD_VAR%g -s%@PRELOAD_SEP@%$PRELOAD_SEP%g -s%@PRELOAD_LAST@%$PRELOAD_LAST%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@RANLIB@%$RANLIB%g -s%@LN_S@%$LN_S%g -s%@LIBTOOL@%$LIBTOOL%g -s%@CPP@%$CPP%g -s%@LIBDL@%$LIBDL%g -s%@RUNMDN_SUBDIR@%$RUNMDN_SUBDIR%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - -if test "$ac_cv_flavor_gethostbyaddr" = unknown ; then - echo - echo "NOTICE: runmdn command will not be built, since parameter type" - echo " list of gethostbyaddr() is unknown to configure." -fi -if test "$ac_cv_flavor_getnameinfo" = unknown ; then - echo - echo "NOTICE: runmdn command will not be built, since parameter type" - echo " list of getnameinfo() is unknown to configure." -fi -if test "$utf8_name_valid" = no ; then - echo - echo "WARNING: It seems that iconv does not accept codeset name $utf8name," - echo " which is supposed to refer to UTF-8 encoding." - echo " Please make sure it is indeed correct." -fi - - diff --git a/contrib/idn/mdnkit/configure.in b/contrib/idn/mdnkit/configure.in deleted file mode 100644 index ec4c02af2f..0000000000 --- a/contrib/idn/mdnkit/configure.in +++ /dev/null @@ -1,692 +0,0 @@ -dnl $Id: configure.in,v 1.1 2002/01/02 02:46:23 marka Exp $ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (c) 2000 Japan Network Information Center. All rights reserved. -dnl -dnl By using this file, you agree to the terms and conditions set forth bellow. -dnl -dnl LICENSE TERMS AND CONDITIONS -dnl -dnl The following License Terms and Conditions apply, unless a different -dnl license is obtained from Japan Network Information Center ("JPNIC"), -dnl a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -dnl Chiyoda-ku, Tokyo 101-0047, Japan. -dnl -dnl 1. Use, Modification and Redistribution (including distribution of any -dnl modified or derived work) in source and/or binary forms is permitted -dnl under this License Terms and Conditions. -dnl -dnl 2. Redistribution of source code must retain the copyright notices as they -dnl appear in each source code file, this License Terms and Conditions. -dnl -dnl 3. Redistribution in binary form must reproduce the Copyright Notice, -dnl this License Terms and Conditions, in the documentation and/or other -dnl materials provided with the distribution. For the purposes of binary -dnl distribution the "Copyright Notice" refers to the following language: -dnl "Copyright (c) Japan Network Information Center. All rights reserved." -dnl -dnl 4. Neither the name of JPNIC may be used to endorse or promote products -dnl derived from this Software without specific prior written approval of -dnl JPNIC. -dnl -dnl 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -dnl BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -dnl ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -dnl -dnl 6. Indemnification by Licensee -dnl Any person or entities using and/or redistributing this Software under -dnl this License Terms and Conditions shall defend indemnify and hold -dnl harmless JPNIC from and against any and all judgements damages, -dnl expenses, settlement liabilities, cost and other liabilities of any -dnl kind as a result of use and redistribution of this Software or any -dnl claim, suite, action, litigation or proceeding by any third party -dnl arising out of or relates to this License Terms and Conditions. -dnl -dnl 7. Governing Law, Jurisdiction and Venue -dnl This License Terms and Conditions shall be governed by and and -dnl construed in accordance with the law of Japan. Any person or entities -dnl using and/or redistributing this Software under this License Terms and -dnl Conditions hereby agrees and consent to the personal and exclusive -dnl jurisdiction and venue of Tokyo District Court of Japan. - -AC_INIT(include/mdn/converter.h) - -AC_CANONICAL_HOST - -debug=no -AC_ARG_ENABLE(debug, -[ --enable-debug enable debug codes [default=no]], - debug=$enableval) -case "$enableval" in -yes) - CFLAGS="$CFLAGS -DDEBUG" - ;; -esac - -logdir=no -AC_ARG_WITH(logdir, -[ --with-logdir=DIR mdnsproxy's log files are in DIR. - [default=LOCALSTATEDIR/mdnsproxy]], - logdir=$withval) -case "$logdir" in -no) - logdir='${localstatedir}/mdnsproxy' - ;; -yes) - AC_MSG_ERROR([You must specify DIR to --with-logdir option.]) - ;; -esac -AC_SUBST(logdir) - -extraace=no -AC_ARG_ENABLE(extra-ace, -[ --enable-extra-ace enable additional ACE converters. [default=no]], - extraace=$enableval) -case "$extraace" in -no) - ;; -yes) - AC_DEFINE(MDN_EXTRA_ACE, 1, - [Define if you want additional ACE converters compiled in.]) - ;; -*) - AC_MSG_ERROR([You must specify yes or no to --enable-extra-ace option.]) - ;; -esac - -utf8name=no -AC_ARG_WITH(utf8, -[ --with-utf8=NAME codeset name for UTF-8 encoding [UTF-8]], - utf8name=$withval) -case "$utf8name" in -no) - utf8name=UTF-8 - ;; -yes) - AC_MSG_ERROR([You must specify NAME to --with-utf8 option.]) - ;; -*) - AC_DEFINE_UNQUOTED(MDN_UTF8_ENCODING_NAME, "$utf8name", - [Define if your iconv() does not accept "UTF-8" as the codeset name for utf-8.]) - ;; -esac - -AC_ACE_PREFIX(RACE, [bq--]) -AC_ACE_SUFFIX(BRACE, [-8q9]) -AC_ACE_PREFIX(LACE, [lq--]) -AC_ACE_PREFIX(UTF-6, [wq--]) -AC_ACE_PREFIX(DUDE, [dq--]) -AC_ACE_SIGNATURE(AltDUDE, [a---], []) -AC_ACE_SIGNATURE(AMC-ACE-M, [], [-amc1]) -AC_ACE_SIGNATURE(AMC-ACE-O, [], [-amc2]) -AC_ACE_PREFIX(AMC-ACE-R, [amc3-]) -AC_ACE_PREFIX(AMC-ACE-V, [amc4-]) -AC_ACE_PREFIX(AMC-ACE-W, [amc5-]) -AC_ACE_PREFIX(AMC-ACE-Z, [zq--]) -AC_ACE_PREFIX(MACE, [mq--]) - -ICONVINC= -ICONVLIB= - -libiconv=unspec -AC_ARG_WITH(libiconv, -[ --with-libiconv=IPREFIX GNU libiconv are installed in IPREFIX [PREFIX]], - libiconv=$withval) -case "$libiconv" in -unspec) - ;; -no) - ICONVINC= - ICONVLIB= - ;; -yes) - if test X$prefix = XNONE ; then - libiconv=$ac_default_prefix - else - libiconv=$prefix - fi - ICONVINC="-I$libiconv/include" - ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" - ;; -*) - ICONVINC="-I$libiconv/include" - ICONVLIB="-L$libiconv/lib -R$libiconv/lib -liconv" - ;; -esac - -iconv_include=unspec -AC_ARG_WITH(iconv-include, -[ --with-iconv-include=DIR iconv include files are in DIR []], - iconv_include=$withval) -case "$iconv_include" in -unspec) - ;; -no) - ICONVINC= - ;; -yes) - AC_MSG_WARN([You must supply DIR to --with-iconv-include option. - Ignored.]) - ICONVINC= - ;; -*) - ICONVINC="-I$iconv_include" - ;; -esac - -if test "X$ICONVINC" != X ; then - iconv_include="`echo X$ICONVINC | sed -e 's/^X-I//'`" - if test ! -f "$iconv_include/iconv.h" ; then - AC_MSG_ERROR([iconv.h doesn't exist in $iconv_include]) - fi -fi - -AC_SUBST(ICONVINC) - -iconv=unspec -AC_ARG_WITH(iconv, -[ --with-iconv=LIB special library for iconv []], - iconv=$withval) -case "$iconv" in -unspec) - ;; -no) - ICONVLIB= - ;; -yes) - AC_MSG_WARN([You must supply LIB to --with-iconv option. - -liconv is assumed.]) - ICONVLIB=-liconv - ;; -*) - ICONVLIB=$iconv - ;; -esac -AC_SUBST(ICONVLIB) - -AC_ARG_WITH(iconv-sofile, -[ --with-iconv-sofile=PATH shared library file for libiconv []], - iconv_file=$withval, iconv_file=guess) -ICONVSOFILE= -case "$iconv_file" in -no) - ICONVSOFILE=none - ;; -yes) - AC_MSG_ERROR([You must supply PATH to --with-iconv-sofile option.]) - ;; -guess) - if test "$ICONVLIB" = ""; then - ICONVSOFILE=none - else - AC_MSG_CHECKING(pathname of iconv shared library) - ic_libdir= - ic_libname= - case "$host" in - *-hpux*) - SO=sl - ;; - *) - SO=so - ;; - esac - for arg in $ICONVLIB; do - case "$arg" in - -L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;; - -l*) ic_libname=`echo $arg | sed s/-l//` ;; - /*.$SO*) ICONVSOFILE=$arg ;; - esac - done - if test "$ICONVSOFILE" = ""; then - if test "$ic_libname" = ""; then - AC_MSG_RESULT(unknown) - AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file]) - ICONVSOFILE=none - else - if test "$ic_libdir" = ""; then - # Standard (and semi-standard) library directories - ic_libdir="/lib /usr/lib /usr/local/lib" - fi - for dir in $ic_libdir; do - ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1` - if test "$ICONVSOFILE" != ""; then - break - fi - done - if test "$ICONVSOFILE" != ""; then - AC_MSG_RESULT($ICONVSOFILE) - else - AC_MSG_RESULT(unknown) - AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file]) - ICONVSOFILE=none - fi - fi - fi - fi - ;; -*) - ICONVSOFILE=$iconv_file - ;; -esac -AC_SUBST(ICONVSOFILE) - -CONF_PREFERENCE=no -INSTALL_DEFAULT_CONF=yes -AC_ARG_WITH(preference, -[ --with-preference=ARG change the default configuration to the one - suitable for ARG.], - CONF_PREFERENCE=$withval) -CONF_PREFERENCE=`echo $CONF_PREFERENCE | tr A-Z a-z` -case "$CONF_PREFERENCE" in -no) - CONF_PREFERENCE=default - INSTALL_DEFAULT_CONF=no - ;; -yes) - AC_MSG_ERROR([You must specify ARG to --with-preference option.]) - ;; -jp) - ;; -*) - AC_MSG_ERROR([Unknown ARG for --with-preference option.]) - ;; -esac -AC_SUBST(CONF_PREFERENCE) -AC_SUBST(INSTALL_DEFAULT_CONF) - -dnl Figure out preload stuff. -PRELOAD_VAR="LD_PRELOAD" -PRELOAD_SEP=":" -PRELOAD_LAST="" -case "$host" in -*-solaris*) - PRELOAD_SEP=" " - ;; -*-linux*) - PRELOAD_SEP=" " - ;; -*-osf*) - PRELOAD_VAR="_RLD_LIST" - PRELOAD_LAST=":DEFAULT" - ;; -*-netbsd*) - if test -x /usr/bin/file -a -x /usr/bin/grep ; then - case "`/usr/bin/file /usr/bin/grep`" in - *ELF*) - PRELOAD_SEP=" " - ;; - esac - fi - ;; -esac - -AC_SUBST(PRELOAD_VAR) -AC_SUBST(PRELOAD_SEP) -AC_SUBST(PRELOAD_LAST) - -dnl Checks for standard tools. -AC_PROG_CC -AC_PROG_INSTALL -AM_PROG_LIBTOOL - -dnl Checks for header files. -AC_CHECK_HEADERS(unistd.h locale.h langinfo.h resolv.h) -AC_CHECK_HEADERS(sys/select.h arpa/nameser.h) -AC_CHECK_HEADERS(dlfcn.h) - -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $ICONVINC" -AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR([iconv.h doesn't exist])]) -CPPFLAGS=$saved_CPPFLAGS - -dnl Checks for data types. -AC_TYPE_UID_T -dnl for dnsproxy. -AC_CHECK_TYPE(BOOL, int) - -dnl Checks for libraries. -AC_CHECK_LIB(socket, socket) -AC_CHECK_LIB(nsl, inet_addr) -AC_CHECK_LIB(dl, dlopen, [ - LIBS="-ldl $LIBS" - LIBDL="-ldl" - AC_DEFINE(HAVE_LIBDL, 1, [Define if you have the dl library (-ldl).]) - AC_SUBST(LIBDL) -]) - -dnl Checks for library functions. -AC_CHECK_FUNCS(vsnprintf setvbuf setlocale nl_langinfo memmove bcopy syslog) -AC_CHECK_FUNCS(gethostbyname gethostbyname2 gethostbyaddr) -AC_CHECK_FUNCS(gethostbyname_r gethostbyname2_r gethostbyaddr_r, find_gethost_r=yes) -AC_CHECK_FUNCS(getipnodebyname getipnodebyaddr freehostent) -AC_CHECK_FUNCS(getaddrinfo freeaddrinfo getnameinfo) -AC_CHECK_FUNCS(dlopen dlsym) - -dnl Checks the flavor of gethostbyaddr* functions. -AC_CACHE_CHECK(flavor of gethostbyaddr, ac_cv_flavor_gethostbyaddr, -[ac_cv_flavor_gethostbyaddr=unknown -AC_TRY_RUN( -[ -#include -#include -#include -#include -struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} -], ac_cv_flavor_gethostbyaddr=glibc2_2,, - ac_cv_flavor_gethostbyaddr=unknown) -AC_TRY_RUN( -[ -#include -#include -#include -#include -struct hostent *gethostbyaddr(const char *addr, size_t len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} -], ac_cv_flavor_gethostbyaddr=glibc,, - ac_cv_flavor_gethostbyaddr=unknown) -AC_TRY_RUN( -[ -#include -#include -#include -#include -struct hostent *gethostbyaddr(const char *addr, int len, int type) { - return NULL; -} -int main() { - (void)gethostbyaddr(NULL, 0, 0); - return 0; -} -], ac_cv_flavor_gethostbyaddr=traditional,, - ac_cv_flavor_gethostbyaddr=unknown) -if test "$ac_cv_func_gethostbyaddr" = no ; then - ac_cv_flavor_gethostbyaddr=none -fi]) - -case "$ac_cv_flavor_gethostbyaddr" in -glibc2_2) - ac_cv_type_ghba_addr_t='const void *' - ac_cv_type_ghba_addrlen_t='socklen_t' - ;; -glibc) - ac_cv_type_ghba_addr_t='const char *' - ac_cv_type_ghba_addrlen_t='size_t' - ;; -traditional | none) - ac_cv_type_ghba_addr_t='const char *' - ac_cv_type_ghba_addrlen_t='int' - ;; -*) - AC_MSG_WARN([runmdn command will not be built.]) - ;; -esac -AC_DEFINE_UNQUOTED(GHBA_ADDR_T, $ac_cv_type_ghba_addr_t, - [Define as the type of the 1st argument of gethostbyaddr.]) -AC_DEFINE_UNQUOTED(GHBA_ADDRLEN_T, $ac_cv_type_ghba_addrlen_t, - [Define as the type of the 2nd argument of gethostbyaddr.]) - -dnl Checks the flavor of getnameinfo functions. -AC_CACHE_CHECK(flavor of getnameinfo, ac_cv_flavor_getnameinfo, -[ac_cv_flavor_getnameinfo=unknown -AC_TRY_RUN( -[ -#include -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - socklen_t hostlen, char *serv, socklen_t servlen, - unsigned int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} -], ac_cv_flavor_getnameinfo=glibc2_2_2,, - ac_cv_flavor_getnameinfo=unknown) -AC_TRY_RUN( -[ -#include -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - socklen_t hostlen, char *serv, socklen_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} -], ac_cv_flavor_getnameinfo=rfc2553bis_03,, - ac_cv_flavor_getnameinfo=unknown) -AC_TRY_RUN( -[ -#include -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} -], ac_cv_flavor_getnameinfo=rfc2553,, - ac_cv_flavor_getnameinfo=unknown) -AC_TRY_RUN( -[ -#include -#include -#include -#include -int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) { - return NULL; -} -int main() { - (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0); - return 0; -} -], ac_cv_flavor_getnameinfo=rfc2133,, - ac_cv_flavor_getnameinfo=unknown) -if test "$ac_cv_func_getnameinfo" = no ; then - ac_cv_flavor_getnameinfo=none -fi]) - -case "$ac_cv_flavor_getnameinfo" in -glibc2_2_2) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='socklen_t' - ac_cv_type_gni_servlen_t='socklen_t' - ac_cv_type_gni_flags_t='unsigned int' - ;; -rfc2553bis_03) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='socklen_t' - ac_cv_type_gni_servlen_t='socklen_t' - ac_cv_type_gni_flags_t='int' - ;; -rfc2553) - ac_cv_type_gni_salen_t='socklen_t' - ac_cv_type_gni_hostlen_t='size_t' - ac_cv_type_gni_servlen_t='size_t' - ac_cv_type_gni_flags_t='int' - ;; -rfc2133 | none) - ac_cv_type_gni_salen_t='size_t' - ac_cv_type_gni_hostlen_t='size_t' - ac_cv_type_gni_servlen_t='size_t' - ac_cv_type_gni_flags_t='int' - ;; -*) - AC_MSG_WARN([runmdn command will not be built.]) - ;; -esac -AC_SUBST(RUNMDN_SUBDIR) -AC_DEFINE_UNQUOTED(GNI_SALEN_T, $ac_cv_type_gni_salen_t, - [Define as the type of the 2nd argument of getnameinfo.]) -AC_DEFINE_UNQUOTED(GNI_HOSTLEN_T, $ac_cv_type_gni_hostlen_t, - [Define as the type of the 4th argument of getnameinfo.]) -AC_DEFINE_UNQUOTED(GNI_SERVLEN_T, $ac_cv_type_gni_servlen_t, - [Define as the type of the 6th argument of getnameinfo.]) -AC_DEFINE_UNQUOTED(GNI_FLAGS_T, $ac_cv_type_gni_flags_t, - [Define as the type of the 7th argument of getnameinfo.]) - -dnl Check whether building runmdn or not. -RUNMDN_SUBDIR=runmdn -if test "$ac_cv_flavor_gethostbyaddr" = unknown ; then - RUNMDN_SUBDIR= -fi -if test "$ac_cv_flavor_getnameinfo" = unknown ; then - RUNMDN_SUBDIR= -fi -AC_SUBST(RUNMDN_SUBDIR) - -dnl Checks the flavor of gethost*_r functions. -if test "$find_gethost_r" = yes; then - AC_CACHE_CHECK(flavor of gethostbyname_r, ac_cv_flavor_gethost_r, - [AC_TRY_RUN( -changequote(<<, >>)dnl -<< -#include -#include -#include -#include -#include -int main() -{ - int err = 0; - struct hostent hebuf, *hp; - char buf[10]; - /* Try resolving a invalid name using glibc flavor. */ - (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err); - if (err != 0) - return 0; /* glibc flavor */ - else - return 1; /* Sun flavor */ -} ->>, -changequote([, ])dnl - ac_cv_flavor_gethost_r=glibc, - ac_cv_flavor_gethost_r=sun, - ac_cv_flavor_gethost_r=sun)]) - if test "$ac_cv_flavor_gethost_r" = "glibc"; then - AC_DEFINE(GETHOST_R_GLIBC_FLAVOR, 1, - [Define if the prototype of gethost*_r is glibc flavor.]) - fi -fi - -dnl Find system shared object paths. -AC_FIND_SYSTEM_SHOBJ(libc) -AC_FIND_SYSTEM_SHOBJ(libnsl) - -dnl Checks for iconv library. -AC_MSG_CHECKING(for iconv) -saved_CPPFLAGS=$CPPFLAGS -saved_LIBS=$LIBS -CPPFLAGS="$CPPFLAGS $ICONVINC" -LIBS="$LIBS $ICONVLIB" -AC_TRY_LINK([ -#include -], [ - iconv_t i; - i = iconv_open("ISO-8859-1", "UTF-8"); -], [iconv_try_link=yes], [iconv_try_link=no]) -LIBS=$saved_LIBS -CPPFLAGS=$saved_CPPFLAGS -AC_MSG_RESULT($iconv_try_link) -if test "$iconv_try_link" = no ; then - AC_MSG_ERROR(iconv function not available) -fi - -dnl Check for codeset name for UTF-8. -AC_MSG_CHECKING([for codeset name $utf8name]) -saved_CPPFLAGS=$CPPFLAGS -saved_LIBS=$LIBS -CPPFLAGS="$CPPFLAGS $ICONVINC" -LIBS="$LIBS $ICONVLIB" -AC_TRY_RUN([ -#include -#include -#include -#define UTF8_NAME "$utf8name" -#define ICONV_FAIL ((iconv_t)(-1)) -/* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */ -int main() { - int i; - /* list of codeset names likely to exist */ - static char *codeset[] = { - "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1", - "Shift_JIS", "SJIS", "sjis", NULL, - }; - - /* First try null conversion. */ - if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0; - - /* Unfortunately, above check fails on certain systems, such as Solaris. */ - for (i = 0; codeset[i] != NULL; i++) { - if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0; - } - return 1; -} -], utf8_name_valid=yes, utf8_name_valid=no, utf8_name_valid=unknown) -LIBS=$saved_LIBS -CPPFLAGS=$saved_CPPFLAGS -AC_MSG_RESULT($utf8_name_valid) - -dnl Output. -AC_CONFIG_HEADER(include/config.h) -AC_OUTPUT( - Makefile - include/Makefile - include/mdn/Makefile - lib/Makefile - mdnsproxy/Makefile - man/Makefile - tools/Makefile - tools/mdnconv/Makefile - tools/runmdn/Makefile - tools/runmdn/runmdn - map/Makefile -) -AC_OUTPUT_COMMANDS([ -if test "$ac_cv_flavor_gethostbyaddr" = unknown ; then - echo - echo "NOTICE: runmdn command will not be built, since parameter type" - echo " list of gethostbyaddr() is unknown to configure." -fi -if test "$ac_cv_flavor_getnameinfo" = unknown ; then - echo - echo "NOTICE: runmdn command will not be built, since parameter type" - echo " list of getnameinfo() is unknown to configure." -fi -if test "$utf8_name_valid" = no ; then - echo - echo "WARNING: It seems that iconv does not accept codeset name $utf8name," - echo " which is supposed to refer to UTF-8 encoding." - echo " Please make sure it is indeed correct." -fi -]) diff --git a/contrib/idn/mdnkit/doc/LICENSE.txt b/contrib/idn/mdnkit/doc/LICENSE.txt deleted file mode 100644 index 0e33381338..0000000000 --- a/contrib/idn/mdnkit/doc/LICENSE.txt +++ /dev/null @@ -1,55 +0,0 @@ -Copyright (c) 2000 Japan Network Information Center. All rights reserved. - -By using this file, you agree to the terms and conditions set forth bellow. - - LICENSE TERMS AND CONDITIONS - -The following License Terms and Conditions apply, unless a different -license is obtained from Japan Network Information Center ("JPNIC"), -a Japanese association, Fuundo Bldg., 1-2 Kanda Ogawamachi, Chiyoda-ku, -Tokyo, Japan. - -1. Use, Modification and Redistribution (including distribution of any - modified or derived work) in source and/or binary forms is permitted - under this License Terms and Conditions. - -2. Redistribution of source code must retain the copyright notices as they - appear in each source code file, this License Terms and Conditions. - -3. Redistribution in binary form must reproduce the Copyright Notice, - this License Terms and Conditions, in the documentation and/or other - materials provided with the distribution. For the purposes of binary - distribution the "Copyright Notice" refers to the following language: - "Copyright (c) Japan Network Information Center. All rights reserved." - -4. Neither the name of JPNIC may be used to endorse or promote products - derived from this Software without specific prior written approval of - JPNIC. - -5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -6. Indemnification by Licensee - Any person or entities using and/or redistributing this Software under - this License Terms and Conditions shall defend indemnify and hold - harmless JPNIC from and against any and all judgements damages, - expenses, settlement liabilities, cost and other liabilities of any - kind as a result of use and redistribution of this Software or any - claim, suite, action, litigation or proceeding by any third party - arising out of or relates to this License Terms and Conditions. - -7. Governing Law, Jurisdiction and Venue - This License Terms and Conditions shall be governed by and and - construed in accordance with the law of Japan. Any person or entities - using and/or redistributing this Software under this License Terms and - Conditions hereby agrees and consent to the personal and exclusive - jurisdiction and venue of Tokyo District Court of Japan. diff --git a/contrib/idn/mdnkit/doc/en/guide/bind9.html b/contrib/idn/mdnkit/doc/en/guide/bind9.html deleted file mode 100644 index c47b82f3fd..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/bind9.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - -bind9 patch - - - - -

bind9 ƒpƒbƒ`

-

bind9 patch

- - - -
-

ŠT—v

-

Overview

- -

-mDNkit ‚Å‚Í bind9 —p‚̃pƒbƒ`ƒtƒ@ƒCƒ‹‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B -‚±‚̃pƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA -bind9 ‚É‚¨‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -

-The mDNkit provides a patch file for bind9. -This patch file enables bind9 to support multilingual domain names. - -

-‹ï‘Ì“I‚É‚ÍA‚±‚̃pƒbƒ`‚Í bind9 ‚ÉŽŸ‚̂悤‚È‹@”\‚ð’ljÁ‚µ‚Ü‚·B -

-The patch adds the following functionality to bind9. -

    -
  • bind9 ‚Ì DNS ƒT[ƒo (named) ‚É‚¨‚¢‚ÄAƒhƒƒCƒ“–¼‚ðƒeƒLƒXƒg‚É - •ÏŠ·‚·‚éÛ‚ÉUTF-8 •¶Žš‚ª‚»‚Ì‚Ü‚Ü’Ê‚é‚æ‚¤‚ɂȂè‚Ü‚·B -
  • When a domain name is converted to text in bind9 DNS servers (named), UTF-8 characters will be allowed to pass. -
  • bind9 ‚ÌƒŠƒ]ƒ‹ƒo (lightweight resolver) ‚Ì’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì -API ŠÖ”‚ÉAƒzƒXƒg–¼‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒzƒXƒg–¼‚ð -Žw’è‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
  • It will enable the name resolving API function provided with the bind9 resolver -(a lightweight resolver) to denote host names in local encoding to be specified as host names. -
  • “¯‚¶‚­–¼‘O‰ðŒˆŒ‹‰Ê‚Æ‚µ‚ÄAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽ -ƒzƒXƒg–¼‚ª•Ô‚³‚ê‚邿‚¤‚ɂȂè‚Ü‚·B -
  • Host names denoted in local encoding can be returned as a result of name resolution. -
  • digAhostAnslookup ƒRƒ}ƒ“ƒh‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -Žó‚¯•t‚¯A‚Ü‚½–â‚¢‡‚킹Œ‹‰Ê‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\ަ‚·‚邿‚¤‚ɂȂè‚Ü‚·B -
  • The dig, host and nslookup commands will accept locally encoded domain names and display domain names included in the result of a query in local encoding. -
- -

bind9 ‚ւ̃pƒbƒ`‚Ì“K—p•û–@‚ÍAƒpƒbƒ`ƒtƒ@ƒCƒ‹‚Ìæ“ª‚É‹LÚ‚µ‚Ä‚ ‚è‚Ü‚·B -ƒCƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚à -‚²——‚­‚¾‚³‚¢B -

Instructions for how to install this patch to bind9 are given at the beginning of the patch file. -Refer also to the section "Adding and installing the bind9 patch"in the Installation guide. - -

- -


-

named

-

named

- -

‚±‚̃pƒbƒ`‚Ì“K—p‚É‚æ‚èADNS ƒT[ƒo‚Å‚ ‚é named ‚ɑ΂µ‚ÄA -UTF-8 •¶Žš‚Ì“§‰ß‹@”\‚ª’ljÁ‚³‚ê‚Ü‚·B -

A UTF-8 character pass functionš(“§‰ß‹@”\)š will be added to the named DNS server by installing this patch. - -

bind9 ‚Ì named ‚ł̓hƒƒCƒ“–¼‚̈—‚͂قƂñ‚Ç8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä -‚¢‚é‚̂ł·‚ªAnamed “à‚̃hƒƒCƒ“–¼‚Ì“à•”•\Œ»‚©‚çƒeƒLƒXƒg•\Œ»‚Ö‚Ì -•ÏŠ·•”•ª‚Í8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚炸AASCII •¶ŽšˆÈŠO -‚̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚ŃNƒH[ƒg‚³‚êA\DDD ‚Æ‚¢‚¤Œ`Ž®‚Ì•\Œ»‚É -•ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -

Although most domain name processing under bind9 named is 8-bit through, the conversion of the internal expression of domain names to text in named is not 8-bit through. Therefore, non-ASCII characters are quoted with backslashes as \DDD. - -

‚±‚ê‚Í DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð -Žg—p‚·‚éꇂɖâ‘è‚Æ‚È‚è‚Ü‚·B -

This makes it difficult to use UTF-8 for encoding DNS protocols. - -

–{ƒpƒbƒ`‚Å‚ÍA•ÏŠ·‚µ‚悤‚Æ‚·‚é•¶Žš‚ªUTF-8 •¶Žš‚Ì -ꇂɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒg‚ð‚¹‚¸‚»‚̂܂ܓ§‰ß‚³‚¹‚é‹@”\‚ð -’ljÁ‚µ‚Ü‚µ‚½B -‚±‚Ì“®ì‚Í named ‚ÌÝ’èƒtƒ@ƒCƒ‹ (named.conf) ‚ÅØ‚è‘Ö‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚͌݊·«‚Ì‚½‚ß“§‰ß‚µ‚È‚¢Ý’è‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚à‚µDNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð—p‚¢‚éꇂɂÍA -Ý’èƒtƒ@ƒCƒ‹‚Ì options ƒZƒNƒVƒ‡ƒ“‚Ì allow-utf8 ƒpƒ‰ƒ[ƒ^‚ð -ŽŸ‚̂悤‚ÉŽw’肵‚Ä‚­‚¾‚³‚¢B -

This patch contains a function that allow UTF-8 characters to pass through, so that they are not converted and quoted with backslashes. -This function can be turned on or off in the named configuration file (named.conf). -For the sake of compatibility, in the default setting UTF-8 characters are not let through. -When UTF-8 characters are to be used as encoding in a DNS protocol, change the options section allow-utf8 parameter in the configuration file as follows: - -

-
-options {
-    ...
-    allow-utf8 yes;
-    ...
-};
-
-
- -

DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE “™‚Ì -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -Žg—p‚·‚éꇂɂÍA‚±‚ÌÝ’è‚Í•s—v‚Å‚·B -

This setting is not required when RACE or other ASCII compatible encoding is used as encoding in a DNS protocol. - -


-

ƒŠƒ]ƒ‹ƒo

-

Resolver

- -

bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚ÍAbind8 ‚܂ł̂à‚̂Ƃ͑S‚­ˆÙ‚È‚èA -lightweight resolver ƒ‰ƒCƒuƒ‰ƒŠ‚ƌĂ΂ê‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É -ƒŠƒ“ƒN‚³‚ê‚郉ƒCƒuƒ‰ƒŠ‚ÆAlightweight resolver ƒf[ƒ‚ƒ“‚ƌĂ΂ê‚é -ƒT[ƒo‚©‚ç\¬‚³‚ê‚Ä‚¢‚Ü‚·B -

The bind9 resolver differs greatly from any resolver up to bind8, in that it is comprised of a library, linked to an application referred to as a lightweight resolver library, and a server called a lightweight resolver daemon. - -

–{ƒpƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA‚±‚ÌƒŠƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‹@”\‚ª‰Á‚í‚è‚Ü‚·B‹ï‘Ì“I‚ɂ͎Ÿ‚̂悤‚È‹@”\‚ª’ljÁ‚³‚ê‚Ü‚·B -

The use of this patch enables the resolver to handle multilingual domain names. It specifically adds the following functions. - -

    -
  • ‘½Œ¾ŒêƒzƒXƒg–¼‚ÌŽw’è
    -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚ɑ΂µ‚ÄA -ƒzƒXƒg–¼ˆø”‚Ƀ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒzƒXƒg–¼‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å“ü—Í‚³‚ꂽ‚±‚ê‚ç‚̃hƒƒCƒ“–¼‚Í -Ž©“®“I‚É DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚êA -DNS ƒT[ƒo‚Ö‚Ì–â‚¢‡‚킹‚ªs‚í‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ÌÛ‚É‚Í -“¯Žž‚ɳ‹K‰»‚às‚í‚ê‚Ü‚·B -
  • Specifying Multilingual host name
    -It allows the name resolving API function provided by the resolver library to specify host names whose host name argument contains local encoding. -Locally encoded domain names can automatically be converted to the encoding used in a DNS protocol and be used for querying DNS servers. -The encoding is normalized when it is converted.

    - -

  • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ԋp
    -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚ªA -–¼‘O‰ðŒˆŒ‹‰Ê‚̃f[ƒ^‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒzƒXƒg–¼‚ð -•Ô‚·‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
  • Multilingual domain names returned
    -The name resolving API function provided by the resolver library can return host names denoted in local encoding as a result of the resolved data. -
- -

DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚âŽg—p‚·‚鳋K‰»•ûŽ®‚ÌŽw’è‚Í -‚ ‚ç‚©‚¶‚߃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Åݒ肵‚Ä‚¨‚«‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B -

The encoding and the normalization scheme to be used in DNS protocol should first be set in the configuration file. -Refer to the mDNkit resolver configuration -for information on how to set up this file. - -

ˆÈ‰º‚ÉAƒpƒbƒ`‚É‚æ‚Á‚Ä‘½Œ¾Œê‰»‚³‚ê‚é–¼‘O‰ðŒˆ—p API ŠÖ”‚̈ꗗ‚ðŽ¦‚µ‚Ü‚·B -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÍA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII ƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

Name-resolving API functions that the patch enables to handle multilingual domain names are listed below. -Multilingual API functions can handle non-ASCII domain names in addition to traditional ASCII domain names. - -

    -
  • lwres_getaddrinfo() -
  • lwres_getnameinfo() -
  • lwres_gethostbyname() -
  • lwres_gethostbyname2() -
  • lwres_gethostbyname_r() -
  • lwres_gethostbyaddr() -
  • lwres_gethostbyaddr_r() -
  • lwres_getipnodebyname() -
  • lwres_getipnodebyaddr() -
- -

ˆø”‚ÌŒ^‚â•Ô‚è’l‚ÌŒ^‚É•ÏX‚Í‚ ‚è‚Ü‚¹‚ñB -ƒpƒbƒ`‚ð“–‚Ä‚é‘O‚Æ“¯—l‚̌ĂÑo‚µ•û–@‚ÅA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÆA -”ñ ASCII ƒhƒƒCƒ“–¼‚Ì—¼•û‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

Argument types and returned value types do not change. -Both regular ASCII domain names and non-ASCII domain names can be handled through the call up methods used prior to patch installation. - -

–{ƒpƒbƒ`‚ð“K—p‚µ‚½ bind9 ƒŠƒ]ƒ‹ƒo‚Í -MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚ð—˜—p‚µ‚ăGƒ“ƒR[ƒfƒBƒ“ƒO -•ÏŠ·‚ⳋK‰»‚ðs‚¢‚Ü‚·B]‚Á‚Ä bind9 ƒŠƒ]ƒ‹ƒo‚ðŽg—p‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚ð -ƒRƒ“ƒpƒCƒ‹‚·‚éê‡AMDN ‚̃‰ƒCƒuƒ‰ƒŠ libmdn ‚ðƒŠƒ“ƒN‚·‚é•K—v‚ª -‚ ‚è‚Ü‚·B‚à‚µ‚ ‚È‚½‚̃VƒXƒeƒ€‚ª iconv() ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ -ꇂɂÍAiconv() ‚̃‰ƒCƒuƒ‰ƒŠ‚à‡‚í‚¹‚ÄƒŠƒ“ƒN‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

A bind9 resolver with this patch installed utilizes the MDN library for encoding, conversion and normalization. Thus when compiling clients that use the bind9 resolver, the MDN library libmdn must be linked. If your system does not support iconv(), the iconv() library must also be linked. - -

- -


-

dig/host/nslookup

-

dig/host/nslookup

- -

bind9 ‚É‚Í DNS ‚Ì–â‚¢‡‚킹ƒc[ƒ‹‚Æ‚µ‚Ä digAhostAnslookup ‚Æ‚¢‚¤ -ƒRƒ}ƒ“ƒh‚ª•t‘®‚µ‚Ü‚·Bbind9 ƒpƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA‚±‚ê‚ç‚Í‚¢‚¸‚ê‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B‹ï‘Ì“I‚ɂ͈ȉº‚Ì‹@”\‚ª -•t‰Á‚³‚ê‚Ü‚·B -

Included within bind9 are the dig, host and nslookup commands for querying DNS. These commands can support multilingual domain names when the bind9 patch is installed. -The following functions have been added. -

    -
  • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì“ü—Í
    -ƒRƒ}ƒ“ƒhˆø”A‚ ‚é‚¢‚Í•W€“ü—Í‚ÅAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\Œ»‚³‚ꂽ”ñ ASCII ‚̃hƒƒCƒ“–¼‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å“ü—Í‚³‚ꂽ‚±‚ê‚ç‚̃hƒƒCƒ“–¼‚Í -Ž©“®“I‚É DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚êA -DNS ƒT[ƒo‚Ö‚Ì–â‚¢‡‚킹‚ªs‚í‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ÌÛ‚É‚Í -“¯Žž‚ɳ‹K‰»‚às‚í‚ê‚Ü‚·B -
  • Entry of multilingual domain names
    -Non-ASCII domain names in local encoding can be specified by command arguments and standard input. -Locally encoded domain names are automatically converted to encoding used in a DNS protocol and are used for querying DNS servers. -The encoding is normalized as it is converted.

    - -

  • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•\ަ
    -DNS ƒT[ƒo‚©‚ç‚̕ԓš‚Ɋ܂܂ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚³‚êA•\ަ‚³‚ê‚邿‚¤‚ɂȂè‚Ü‚·B -
  • Display of multilingual domain names
    -Multilingual domain names that are part of a response from a DNS server are converted to local encoding before being displayed. -
- -

DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚âŽg—p‚·‚鳋K‰»•ûŽ®‚ÌŽw’è‚Í -‚ ‚ç‚©‚¶‚߃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Åݒ肵‚Ä‚¨‚«‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B -

The encoding and the normalization scheme to be used in a DNS protocol shoud first be set in the configuration file. -Refer to the mDNkit resolver configuration for information on how to configure this file. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/bindconfig.html b/contrib/idn/mdnkit/doc/en/guide/bindconfig.html deleted file mode 100644 index 9822165caf..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/bindconfig.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - -mDNkit BIND configuration guide - - - - - -

DNSƒT[ƒo‚ÌÝ’è

-

DNS server setup

- -

DNSƒT[ƒo‚ɂđ½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚ß‚ÌÝ’è•û–@‚ɂ‚¢‚Ä -‰ðà‚µ‚Ü‚·B‚Ƃ͂¢‚Á‚Ä‚à]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÌꇂÌÝ’è•û–@‚Æ -‘å‚«‚­•Ï‚í‚é‚킯‚ł͂ ‚è‚Ü‚¹‚ñB’ˆÓ‚·‚ׂ«“_‚ÍŽŸ‚Ì2“_‚¾‚¯‚Å‚·B -

This document describes how to configure a DNS server to enable handling of multilingual domain names. This configuration procedure does not differ greatly from that used for configuring ASCII domain names. However, two points have to be borne in mind. -

    -
  • DNS ƒT[ƒo‚Ƀpƒbƒ`‚𓖂ĂȂ¯‚ê‚΂Ȃç‚È‚¢ê‡‚ª‚ ‚邱‚Æ -
  • A patch may have to be installed in the DNS server -
  • ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚邱‚Æ -
  • Zone master file and other encoding must be converted -
- -

DNSƒT[ƒo‚ÌÝ’è‚̎臂ÍA‚¨‚æ‚»ˆÈ‰º‚Ì’Ê‚è‚Å‚·B -

Configure a DNS server according to the following procedure. - -

    -
  1. ƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ðŒˆ‚ß‚éB -
    Determine the encoding and normalization scheme. -
  2. DNS ƒT[ƒo‚ð—pˆÓ‚·‚éB -
    Set a DNS server. -
  3. named.confAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚ð쬂·‚éB -
    Create named.conf, a zone master file. -
- -

ÅŒã‚̃tƒ@ƒCƒ‹ì¬‚ÉŠÖ‚µ‚Ä‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-5 ‚ð -Žg—p‚µ‚½‚Æ‚«‚É“Á—L‚Ì–â‘肪‚ ‚èA‚±‚ê‚ð -

When UTF-5 is used for encoding during file generation, the last item, specific problems occur. These problems are discussed in the following section. -

-‚Æ‚µ‚Ă܂Ƃ߂Ă ‚è‚Ü‚·B - -

Ý’è‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·ƒc[ƒ‹ mdnconv ‚ÌŠO•”Žd—l -‚¨‚æ‚Ñ“à•”ˆ—‚ÌÚׂɊւµ‚Ä‚ÍA -mdnconv ‚ÌŽd—l‘‚ð‚²——‚­‚¾‚³‚¢B -

For information on external specifications and internal processing of mdnconv, the encoding conversion tool, used in the setup, refer to the mdnconv specifications. - -

‚Ü‚½AƒNƒ‰ƒCƒAƒ“ƒg‚©‚炱‚ê‚ç‚Ì DNS ƒT[ƒo‚ɃAƒNƒZƒX‚·‚邽‚߂ɂÍA -‘½Œ¾ŒêƒhƒƒCƒ“–¼—pƒpƒbƒ`‚ð“–‚Ä‚½ bind9A -runmdn ƒRƒ}ƒ“ƒhA -mDN Wrapper ‚ȂǂðŽg—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒg‘¤‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤‚©A‚ ‚é‚¢‚Í -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚¤ƒvƒƒLƒVƒT[ƒo‚Å‚ ‚é dnsproxy ‚ð’Ê‚·•K—v‚ª‚ ‚è‚Ü‚·B -dnsproxy ‚ÌÝ’è‚ɂ‚¢‚Ä‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Åà–¾‚µ‚Ü‚·B -

To enable the client to access these DNS servers, encoding, conversion and normalization using bind9 with a multilingual domain name patch installedAthe runmdn commandAthe mDN Wrapper or similar tool must be used on the client side or access has to be made via dnsproxy, a proxy server that performs encoding and conversion. -dnsproxy configuration is described in DNS Proxy Server configuration. - -

- -


- -

ƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ÌŒˆ’è

-

Determining Encoding and Normalization Scheme

- -

‚Ü‚¸ DNS ‚ÌÝ’è‚Éæ‚¾‚Á‚ÄADNS ƒT[ƒo‚ÅŽg—p‚·‚éƒhƒƒCƒ“–¼‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚¨‚æ‚ѳ‹K‰»•ûŽ®‚ðŒˆ‚ß‚é•K—v‚ª‚ ‚è‚Ü‚·B -

The encoding and normalization scheme to be used for a DNS server must be determined prior to DNS setup. - -

•]‰¿‚µ‚悤‚Æ‚·‚é DNS ‚Ì‘½Œ¾Œê‰»•ûŽ®‚ªŒˆ‚Ü‚Á‚Ä‚¢‚ê‚ÎA -‚»‚Ì•ûŽ®‚ɇ‚킹‚邱‚ƂɂȂè‚Ü‚·B -Œ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚Ì’†‚©‚çAŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»‚ð -‚¢‚­‚‚©Ð‰î‚µ‚Ü‚·B‚±‚êˆÈŠO‚Ì•ûŽ®‚à‘½”’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·BÚ‚µ‚­‚Í -ŽQl•¶Œ£‚ð‚²——‚­‚¾‚³‚¢B -

Encoding scheme should be selected to suit a DNS multilingual system to be assessed. -The following are some of the currently proposed encoding and normalization schemes. Various other systems are also being proposed. For details, see -reference document. - -

    -
  • RACE: Row-based ASCII Compatible Encoding for IDN
    - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í RACE ‚Å‚·B‚±‚̃vƒƒ|[ƒUƒ‹‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO - ‚݂̂̃vƒƒ|[ƒUƒ‹‚Ȃ̂ų‹K‰»•ûŽ®‚Í‹K’肵‚Ä‚¢‚Ü‚¹‚ñB -
    - The encoding scheme is RACE. Since this is only an encoding proposal, it does not prescribe normalization. -

    -

  • Using the UTF-8 Character Set in the Domain Name System
    - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-8 ‚Å‚·B - ³‹K‰»‚Í ``locale-sensitive downcasing'' ‚Å‚·‚ªA - ‚±‚Ì•ûŽ®‚̓ƒP[ƒ‹ˆË‘¶‚ɂȂé‚̂ŠmDNkit ‚ł̓Tƒ|[ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB - Å‚à‹ß‚¢‚̂̓ƒP[ƒ‹”ñˆË‘¶‚Ì‘å•¶Žš¨¬•¶Žšƒ}ƒbƒsƒ“ƒO‚Å‚ ‚é - unicode-lowercase ‚Å‚µ‚傤B -
    - The encoding scheme is UTF-8 while the normalization scheme is``locale-sensitive downcasing'', which is locale dependent and is not supported by the mDNkit. - The closest resembling system is unicode-lowercase, a non-locale dependent uppercase-to-lowercase mapping scheme. -

    -

  • Using the Universal Character Set in the Domain Name System (UDNS)
    - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-8A³‹K‰»‚Í unicode-form-c ‚¨‚æ‚Ñ - unicode-lowercase ‚Å‚·B -
    - The encoding scheme is UTF-8 and normalization is unicode-form-c and unicode-lowercase. -

    -

  • UTF-5, a transformation format of Unicode and ISO 10646
    - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-5 ‚Å‚·B‚±‚̃vƒƒ|[ƒUƒ‹‚àƒGƒ“ƒR[ƒfƒBƒ“ƒO - ‚݂̂̃vƒƒ|[ƒUƒ‹‚Ȃ̂ų‹K‰»•ûŽ®‚Í‹K’肵‚Ä‚¢‚Ü‚¹‚ñB -
    - The encoding scheme is UTF-5. Since this, also, is only an encoding proposal, it does not prescribe normalization. -
- -

ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-5 ‚ðÌ—p‚µ‚½ê‡‚É‚ÍA -ZLD (zero level domain) ‚ð•t‚¯‚邱‚Æ‚Å]—ˆ‚̃hƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚é•K—v‚ª -‚ ‚è‚Ü‚·B‚µ‚½‚ª‚Á‚Ä ZLD ‚ð‰½‚É‚·‚é‚©‚àŒˆ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

When UTF-5 encoding is employed, it is essential to distinguish it from traditional domain names by adding ZLD (zero level domain). Consequently, it is necessary to determine which type of ZLD is to be used.šZLD ‚ð‰½‚É‚·‚é‚©š - -

‚»‚Ì‘¼ mDNkit ‚ªƒTƒ|[ƒg‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ɂ‚¢‚Ä‚Í -MDN ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŽd—l‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

Refer to the MDN library specifications for information on other encoding and normalization schemes supported by the mDNkit. -

- -

‚à‚¿‚ë‚ñA1‘ä‚Ì DNS ƒT[ƒo‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ‚½‚¹‚邱‚Æ‚à‰Â”\ -‚Å‚·B‚±‚Ìꇂ̓][ƒ“–ˆ‚ɈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŠ„‚è“–‚Ă邱‚ƂɂȂé -‚Å‚µ‚傤B‚½‚¾‚µ mDNkit ‚ð—p‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈µ‚¢‚ð‰Â”\‚É‚µ‚½ -ƒNƒ‰ƒCƒAƒ“ƒg‚â dnsproxy ‚Í DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª’Pˆê‚Å‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚é‚Ì‚ÅA—Ⴆ‚Î dnsproxy ‚Ìꇂɂ̓Gƒ“ƒR[ƒfƒBƒ“ƒO–ˆ‚É -•¡”‚Ì dnsproxy ‚ð‹N“®‚·‚é‚Ȃǂ̃eƒNƒjƒbƒN‚ª•K—v‚Å‚·B -

Of course, multiple types of encoding schemes can be employed for one DNS server.In such a case, a different type of encoding would be assigned to each zone. However, a client or dnsproxy enabled to support multilingual domain names through mDNkit assumes that a DNS server employs a single encoding scheme. Such techniques that start up multiple dnsproxies to handle all encodings would have to be used for dnsproxy. - -

- -


- -

DNS ƒT[ƒo‚Ì—pˆÓ

-

Setting up a DNS server

- -

ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE: ASCII Compatible -Encoding) ‚Å‚ ‚é RACEAUTF-5 ‚ð—p‚¢‚éꇂɂÍAƒGƒ“ƒR[ƒhŒ‹‰Ê‚Í]—ˆ‚Ì -ƒzƒXƒg–¼‚Æ‚µ‚ij“–‚È•¶Žš—ñ‚ɂȂé‚Ì‚ÅAŒ»ÝŽg—p’†‚Ì DNS ƒT[ƒo‚ð‚»‚Ì‚Ü‚Ü -Žg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚µ‚©‚µ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOA -“Á‚É UTF-8 ‚ð—p‚¢‚éꇂɂÍA‘½Œ¾ŒêƒhƒƒCƒ“ˆ—‚ð•t‰Á‚·‚éƒpƒbƒ`‚ð“–‚Ä‚½ -bind9 ‚Ì DNS ƒT[ƒo (named) ‚ðŽg—p‚·‚é‚©A -8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚ð“–‚Ä‚½ bind8 ‚Ì DNS ƒT[ƒo‚ð—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

When ASCII compatible encoding (ACE: ASCII Compatible Encoding) such as RACE or UTF-5 is used, the encoding results legal characters in traditional host names and allow use of current DNS servers. -However, the other encoding schemes, especially UTF-8, requires the use of a bind9 DNS server (named) with a multilingual domain patch installed, or a bind8 DNS server with an 8-bit through patch installed. - -

‚»‚ꂼ‚ê‚̃pƒbƒ`‚Ì“–‚Ä•û‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹‚Ì•û–@‚ɂ‚¢‚Ä‚Í -bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹ ‚¨‚æ‚Ñ -bind8 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹ ‚ð -‚²——‚­‚¾‚³‚¢B -

For information on procedures for adding or installing these patches, refer to Adding and installing bind9 patch and -Adding and installing bind8 patch. - -

- -


- -

named.confAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ìì¬

-

Creating named.conf and a zone master file

- -

named.conf ‚âƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‘‚«•ûŽ©‘Ì‚ÍA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚̃hƒƒCƒ“–¼‚ŕςí‚邯‚±‚ë‚Í‚ ‚è‚Ü‚¹‚ñB -’P‚ɃhƒƒCƒ“–¼‚ÉŠ¿Žš‚ȂǂðŠÜ‚߂邱‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©‚¾‚¯‚̈Ⴂ‚Å‚·B -

The writing of named.conf and zone master files for multilingual domain names does not differ from those of traditional domain names. -The only difference is that the domain names contain kanji or other non-ASCII characters. - -

DNS ƒT[ƒoŽ©‘̂ɃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‹@”\‚Í”õ‚í‚Á‚Ä‚¢‚È‚¢‚Ì‚ÅA -DNS ‚̓ǂݞ‚Þ named.conf ƒtƒ@ƒCƒ‹‚âƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓Gƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ÌŒˆ’è‚Å -Œˆ’肵‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɇ‚킹‚é•K—v‚ª‚ ‚è‚Ü‚·B -mdnconv ‚Í‚±‚̂悤‚È–Ú“I‚Ì‚½‚ß‚ÉÝŒv‚³‚ꂽƒR[ƒh•ÏŠ·ƒc[ƒ‹‚Å‚·B -

Since the DNS server does not contain the encoding coversion function, the encoding of the named.conf file and zone master file read by DNS must be adjusted to encoding determined by the encoding and normalization scheme. -mdnconv is the code conversion tool designed to solve this problem. - -

RACE ‚â UTF-5 ‚È‚çAASCII •¶Žš‚ª•ÒW‚Å‚«‚éƒGƒfƒBƒ^‚ª‚ ‚ê‚Î’¼Ú“ü—Í -‚·‚邱‚Æ‚à‰Â”\‚Å‚·‚ªA—Ⴆ‚Îu‚±‚ñ‚É‚¿‚Í.¢ŠE.v‚Æ“ü—Í‚·‚é‘ã‚í‚è‚É -bq--gbjzg23bn4.bq--3bhbm5km. -‚ȂǂƂ¢‚Á‚½ˆÃ†‚̂悤‚È•¶Žš—ñ‚ð (‚µ‚©‚ೊm‚É) “ü—Í‚µ‚È‚¯‚ê‚΂Ȃ炸A -•ÏŠ·ƒc[ƒ‹‚ðŽg—p‚·‚é‚Ù‚¤‚ª‚͂邩‚ɂɊȒP‚Å‚·B -

Although an ASCII character editor allows direct entries with RACE and UTF-5, you would be forced to accurately enter code strings such as bq--gbjzg23bn4.bq--3bhbm5km. for u‚±‚ñ‚É‚¿‚Í.¢ŠE.v. Thus the conversion tool radically simplifies the character entry task. - -

UTF-8 ‚È‚ç‚΃GƒfƒBƒ^‚É‚æ‚Á‚Ă͒¼Ú•ÒW‰Â”\‚È‚à‚Ì‚ª‚ ‚é‚Ì‚ÅA‚»‚ê‚ð -Žg‚¤‚±‚Æ‚à‚Å‚«‚Ü‚·B‚µ‚©‚µ‚»‚̃GƒfƒBƒ^‚ೋK‰»‚܂ł͑½•ª‚µ‚Ä‚­‚ê‚È‚¢ -‚Å‚µ‚傤‚©‚çA‚â‚Í‚èƒc[ƒ‹‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚·‚邱‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

Editors that allow direct editing with UTF-8 can also be used. -However, since such editors will probably not support normalization; encoding conversion is again the recommended procedure. - -

—Ⴆ‚ÎŽŸ‚̂悤‚ȃRƒ}ƒ“ƒh‚ðŽÀs‚·‚邯 EUC-JP ‚Å‘‚©‚ꂽƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ -db.somezone.euc ‚ð RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì db.somezone.race -‚ɕϊ·‚µA“¯Žž‚É Unicode Normalization Form C ‚É‚æ‚鳋K‰»‚ð“K—p‚·‚é -‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

For example when the following command is executed, the db.somezone.euc zone master file is converted to db.somezone.race RACE encoding and is simultaneously normalized according to Unicode Normalization Form C. - -

-
-% mdnconv -noconf -in EUC-JP -out RACE -normalize unicode-form-c \
-	db.foo.euc > db.foo.race
-
-
- -

-in ƒIƒvƒVƒ‡ƒ“‚Å“ü—̓eƒLƒXƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðA --out ‚Åo—̓eƒLƒXƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðA -‚»‚µ‚Ä -normalize ‚ų‹K‰»•ûŽ®‚ðŽw’肵‚Ü‚·B -ƒIƒvƒVƒ‡ƒ“‚̈ꗗ‚Ƃǂ̂悤‚È’l‚ªŽw’è‚Å‚«‚é‚©‚ɂ‚¢‚Ä‚ÍA -mdnconv ‚ÌŽd—l‘‚ð‚²——‚­‚¾‚³‚¢B -

-in option specifies encoding of input text, -out specifies output text encoding and -normalize specifies the normalization scheme.Refer to mdnconv specifications for a list of options and other values. - -

‚ł͂±‚Ì‹t‚É RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç EUC-JP ‚ւ̕ϊ·‚ª‚Å‚«‚é‚©‚Æ‚¢‚¤‚ÆA -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ìꇂɂ͉”\‚Å‚·B‚½‚¾‚µ‚±‚ê‚Í mdnconv ‚ª -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒOê—p‚Ì“Á•ʂȈ—‚ð”õ‚¦‚Ä‚¢‚邽‚ß‚ÅA -ˆê”Ê“I‚É‚Í ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚Í -‚Å‚«‚È‚¢‚Æ‚¢‚¤‚±‚Æ‚ðŠo‚¦‚Ä‚¨‚¢‚Ä‚­‚¾‚³‚¢B -‚±‚ê‚ÍA“ü—Í‚³‚ꂽ•¶Žš—ñ‚Ì’†‚Å ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä -•\‹L‚³‚ê‚Ä‚¢‚éŒÂŠ‚Æ‚»‚¤‚łȂ¢’Êí‚Ì ASCII •\‹L‚ÌêŠ‚ð‹æ•Ê‚Å‚«‚È‚¢‚©‚ç‚Å‚·B -‚±‚ê‚ɂ‚¢‚Ä‚Í mdnconv ‚ÌŽd—l‘‚Ì -•ÏŠ·ˆ—‚ÌÚׂðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

RACE encoding also allows you to do the opposite; to convert from RACE encoding to EUC-JP encoding. But note that this is only because mdnconv is provided with RACE encoding specific processing; normally, it is not possible to convert from ASCII compatible encoding to local encoding. The reason is that it is not possible to distinguish between characters denoted in ASCII compatible encoding and those that use normal ASCII encoding in entered character strings. -Refer to the conversion information, the mdnconv specifications, for details. - -

ˆÈã‚Ì‚±‚Æ‚©‚çAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™ DNS ƒT[ƒo‚ª“ǂݞ‚Þƒtƒ@ƒCƒ‹ -‚Ì쬂ƊǗ‚ɂ͎Ÿ‚̂悤‚È•û–@‚ð‚Æ‚é‚Ì‚ª‚æ‚¢‚Æl‚¦‚ç‚ê‚Ü‚·B -‚Ü‚¸ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä‹Lq‚µ‚½”Å‚ð—pˆÓ‚µ‚ÄA‚±‚ê‚ɑ΂µ‚Ä -•ÒW‚âƒo[ƒWƒ‡ƒ“ŠÇ—‚ðs‚¢‚Ü‚·B -‚»‚µ‚Ä mdnconv ‚ð—p‚¢‚ăGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ƴ‹K‰»‚ðs‚¢A -DNS ƒT[ƒo‚ÌŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚𶬂µ‚ÄA‚±‚ê‚ð -DNS ƒT[ƒo‚ª“ǂݞ‚Þ‚½‚߂̃tƒ@ƒCƒ‹‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B -

Consequently, the following procedure should be adhered to in creating and maintaining zone master files and other files that are to be read by a DNS server.First, create a file version in local encoding that is edited under version control. -Then use mdnconv to convert encoding and normalize the file to generate a file with the encoding employed by a DNS server and use it as the file the DNS server will read. - -

‚Ƃ͂¢‚Á‚Ä‚àƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚ð‰ü’ù‚·‚邽‚Ñ‚É -mdnconv ‚ðŽÀs‚µ‚ăT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚ðì‚é‚͖̂ʓ|‚Å‚·B -‚±‚ÌꇗႦ‚Î make ƒRƒ}ƒ“ƒh‚ðŽg—p‚·‚ê‚Εϊ·‚ðŽ©“®‰»‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

However, executing mdnconv each time a locally encoded file has to be converted to a server encoded file is time-consuming. -In this situation, use the make command to automate conversion. - -

—Ⴆ‚΃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹–¼‚ɃTƒtƒBƒbƒNƒX .lcA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO”łɃTƒtƒBƒbƒNƒX .utf8A -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO”łɃTƒtƒBƒbƒNƒX .race ‚ð‚‚¯‚邯‚µ‚Ü‚·B -‚·‚é‚ÆŽŸ‚̂悤‚È Makefile ‚ð‘‚­‚±‚Ƃɂæ‚èAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”Å‚ð -XV‚µ‚½‚ç make ‚ðŽÀs‚·‚邾‚¯‚ŕϊ·‚ðŽ©“®“I‚És‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

For example, let's assume that a file in local encoding has the suffix .lc, a UTF-8 encoding file the suffix .utf8 and a RACE encoding version file the suffix tt>.race. -Then the following type of Makefile could be written to allow automatic conversion using make when a file in local encoding is updated. - -

-
-.SUFFIXES: .lc .utf8 .race
-
-.lc.utf8:
-	mdnconv -in $(LOCALCODE) -out UTF-8 $(NORMALIZE) $< > $@
-.lc.race:
-	mdnconv -in $(LOCALCODE) -out RACE $(NORMALIZE) $< > $@
-
-LOCALCODE = EUC-JP
-NORMALIZE = -normalize unicode-form-c -normalize unicode-lowercase
-
-TARGETS = db.foo.utf8 db.bar.race
-
-all: $(TARGETS)
-
-
- -

1‚Â‚Ì DNS ƒT[ƒo‚ɈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¡”‚̃][ƒ“‚̃}ƒXƒ^‚ð -‚³‚¹‚悤‚Æ‚µ‚½ê‡Anamed.conf ‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð -¬Ý‚³‚¹‚È‚­‚Ă͂Ȃç‚È‚¢ó‹µ‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·BŽc”O‚È‚ª‚炱‚ê‚Í -mdnconv ‚ł͖³—‚Ȃ̂ÅAinclude ƒfƒBƒŒƒNƒeƒBƒu“™‚ðŽg‚Á‚Ä -ƒtƒ@ƒCƒ‹‚𕪊„‚µA1‚‚̃tƒ@ƒCƒ‹‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª -¬Ý‚µ‚È‚¢‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢B -

When multiple zone master files with different encoding schemes are attempted in a single DNS server, it may be necessary to include multiple encoding schemes in named.conf. Unfortunately, this cannot be handled with mdnconv so the include directive or similar command must be used to split the file so that each file does not contain multiple encoding schemes. - -

ÅŒã‚É‚à‚¤1‚ÂAUTF-5 “Á—L‚Ì–â‘è‚ɂ‚¢‚Äà–¾‚µ‚Ü‚·B -

Finally, we will discuss UTF-5 specific problems. - -

- -


- -

UTF-5 “Á—L‚Ì–â‘è

-

UTF-5 specific problems

- -

DNS ƒT[ƒo‚ÅŽg—p‚·‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð UTF-5 ‚É‚µ‚½ê‡‚É‚Í -‚¢‚­‚‚©‚Ì–â‘肪¶‚¶‚Ü‚·B -

A number of problems occur when UTF-5 encoding is used as the domain name encoding of a DNS server. - -

- -

ZLD ‚ÌŽw’è

-

ZLD specification

- -

UTF-5 ‚Í ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚Ȃ̂ÅAUTF-5 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ -ƒhƒƒCƒ“–¼‚Í‚»‚̂܂܂łÍ]—ˆ‚Ì ASCII ‚̃hƒƒCƒ“–¼‚Æ‹æ•ʂł«‚Ü‚¹‚ñB -“¯‚¶‚­ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚Å‚ÍAƒhƒƒCƒ“–¼‚Ì -Šeƒ‰ƒxƒ‹‚Ìæ“ª‚É“Á’è‚̃vƒŠƒtƒBƒbƒNƒX (bq--) ‚ð‚‚¯‚邱‚Ƃɂæ‚Á‚Ä -]—ˆ‚̃hƒƒCƒ“–¼‚Æ (ˆê‰ž) ޝ•ʂł«‚é‚̂ł·‚ªA -UTF-5 ‚ɂ͂±‚̂悤‚È‹@\‚ª‚È‚¢‚½‚ßAZLD ‚Æ‚¢‚¤ŠT”O‚ðŽg—p‚µ‚Ä]—ˆ‚̃hƒƒCƒ“ -–¼‚Ƃ̎¯•Ê‚ð‰Â”\‚É‚µ‚Ä‚¢‚Ü‚·B -

-Since UTF-5 is an ASCII compatible encoding scheme, domain names encoded in UTF-5 cannot be distinguished from regular ASCII domain names. -By contrast, RACE, another ASCII compatible encoding scheme, appends (bq--), a prefix, to the beginning of each domain name label to allow differentiation from traditional domain names. But since UTF-5 does not have this feature a concept called ZLD is used to identify traditional domain names. - -

ZLD (zero level domain) ‚Ƃ̓hƒƒCƒ“–¼‚ÌÅŒã‚ɂ‚¯‚é -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚Ì‚±‚Æ‚ÅA—Ⴆ‚Î utf5. ‚Æ‚¢‚¤ -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚ðì‚èA -UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚Í‚·‚ׂñ‚̃hƒƒCƒ“‚̃TƒuƒhƒƒCƒ“‚Æ‚·‚é -‚±‚Æ‚ÅA]—ˆ‚̃hƒƒCƒ“–¼‚Ƃ̋æ•Ê‚ð‰Â”\‚É‚µ‚Ü‚·BŽÀÛ‚É‚Í ‚±‚̃gƒbƒvƒŒƒxƒ‹ -ƒhƒƒCƒ“‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ðs‚¤ -êŠ (Œ»Ý‚Ì mDNkit ‚Å‚Í dnsproxy) ‚ÅŽ©“®“I‚É•t‰Á‚³‚êA‚Ü‚½ UTF-5 ‚©‚ç -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚·‚Æ‚«‚ÉŽ©“®“I‚Éœ‹Ž‚³‚ê‚é‚̂Š-ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ͂±‚̃hƒƒCƒ“‚ÍŒ©‚¦‚Ü‚¹‚ñBƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂƂÁ‚Ä‚Ì -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚æ‚肳‚ç‚ÉãˆÊƒhƒƒCƒ“‚Ɉʒu‚·‚é‚̂Šzero level domain -‚Ȃ킯‚Å‚·B‚à‚¿‚ë‚ñ DNS ƒT[ƒo‚©‚ç‚Í ZLD ‚͉B‚³‚ê‚Ä‚¨‚炸A‚µ‚½‚ª‚Á‚Ä -DNS ƒT[ƒo‚ÌÝ’è‚Å‚Í ZLD ‚ðˆÓޝ‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

ZLD (zero level domain) is the top level domain appended at the end of a domain name. For example, when a utf5. top level domain is created, all UTF-5 encoded domain names can be made the subdomains of this top level domain making it possible to distinguish them from traditional domain names. -Since this top level domain is automatically added to the area (dnsproxy in current mDNkit) where conversion from local encoding to UTF-5 encoding takes place and is automatically deleted when coding is returned from UTF-5 to local encoding, the application does not see this level. -The top level domain to an application is at a still higher level, hence the name zero level domain. ZLD is of course visible to a DNS server, so DNS server settings must take ZLD into account. - -

‚³‚ÄA‚±‚̂悤‚É UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚Í ZLD ‚ª•K{‚Å‚·‚ªA -mdnconv ‚É‚æ‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ· -‚ÌÛ‚É‚ÍAƒhƒƒCƒ“–¼‚Ì ZLD ‚Ì•”•ª‚Æ‚»‚¤‚łȂ¢•”•ª‚𖾊m‚É‹æ•Ê‚·‚é -•K—v‚ª‚ ‚è‚Ü‚·B—Ⴆ‚Î www.ƒjƒbƒN.“ú–{.utf5. ‚Æ‚¢‚¤ƒhƒƒCƒ“–¼‚ð -UTF-5 ‚ɕϊ·‚·‚邯 N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5 ‚ƂȂè‚Ü‚· -(‚½‚¾‚µ ZLD ‚Í utf5. ‚¾‚Æ‚µ‚Ü‚·)B擪‚Ì www ‚Í -UTF-5 ‚ɕϊ·‚µ‚Ü‚·‚ªAZLD •”•ª‚͕ϊ·‚µ‚Ü‚¹‚ñB‚±‚Ì‚½‚ß mdnconv ‚Í -ZLD ‚ª‚È‚ñ‚Å‚ ‚é‚©‚ð‚ ‚ç‚©‚¶‚ß’m‚Á‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B‚±‚Ì‚½‚ß‚É --zld ‚Æ‚¢‚¤ƒIƒvƒVƒ‡ƒ“‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -‚±‚̃IƒvƒVƒ‡ƒ“‚ÍAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚É‘‚©‚ꂽƒhƒƒCƒ“–¼‚ª -Žw’肳‚ꂽ ZLD ‚Ƀ}ƒbƒ`‚µ‚½Žž‚ÉAƒ}ƒbƒ`‚µ‚½•”•ª‚ðo—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·‘ÎÛ‚©‚çŠO‚·‚Æ‚¢‚¤“­‚«‚ð‚µ‚Ü‚·B‚½‚¾‚µƒhƒƒCƒ“–¼‚Æ ZLD ‚ªƒ}ƒbƒ`‚·‚é‚Ì‚Í -

Thus ZLD is required in UTF-5 encoding, whereas conversion from local encoding to UTF-5 encoding using mdncon requires that the ZLD part of the domain name is distinguished from other parts. -For example when the domain name www.ƒjƒbƒN.“ú–{.utf5. is converted to UTF-5, it beccomes N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5 (but ZLD is utf5.). -Thus mdnconv must know what ZLD is. The option -zld is provided for this reason. -When a domain name written in a zone master file or other file matches a specified ZLD, this option removes the matching portion from@conversion to output encoding.šƒ}ƒbƒ`‚µ‚½•”•ª‚ðo—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‘ÎÛ‚©‚çŠO‚·‚Æ‚¢‚¤“­‚«‚ð‚µ‚Ü‚·š -The conditions for a domain name and ZLD match are as follows: -

    -
  1. ƒhƒƒCƒ“–¼‚ÌŌオƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¢‚邱‚Æ -
    The domain name ends in a period -
  2. ZLD ‚ªƒhƒƒCƒ“–¼‚ÌÅŒã‚Ì•”•ª‚ƈê’v‚µ‚Ä‚¢‚邱‚Æ -
    ZLD matches the last part of the domain name -
-‚Æ‚¢‚¤ðŒ‚ð–ž‚½‚µ‚Ä‚¢‚邯‚«‚¾‚¯‚Å‚·B—Ⴆ‚Î ZLD ‚ª utf5. ‚¾‚Æ‚·‚邯 -ZLD ‚ƃ}ƒbƒ`‚·‚é‚͎̂Ÿ‚ÉŽ¦‚·3‚‚̃hƒƒCƒ“–¼‚Ì’†‚Åʼn‚Ì‚à‚Ì‚¾‚¯‚Å‚·B -
For example if ZLD is utf5., only the first of the following three domain names matches ZLD. -
-
-www.ƒjƒbƒN.“ú–{.utf5.
-www.ƒjƒbƒN.“ú–{
-utf5.ƒjƒbƒN.“ú–{.
-
-
- -

‚³‚ç‚É mdnconv ‚Ì -auto ƒIƒvƒVƒ‡ƒ“ -‚𕹗p‚·‚邯‚ ‚é’ö“x ZLD ‚ðŽ©“®•t‰Á‚³‚¹‚邱‚Æ‚ª‚Å‚«A -‚±‚Ìꇃ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚É‚¢‚¿‚¢‚¿ ZLD ‚ð‘‚­•K—v‚ª‚È‚­‚È‚è‚Ü‚·B -‚½‚¾‚µŠmŽÀ‚É•t‰Á‚Å‚«‚é‚킯‚ł͂Ȃ¢‚Ì‚ÅA‚±‚̃IƒvƒVƒ‡ƒ“‚É‚Í—Š‚ç‚È‚¢•û‚ª -‚æ‚¢‚Å‚µ‚傤B -

Also, if used with the mdnconv option -auto, ZLD is often automatically added in which case there is no need to write ZLD in each zone master file. -However, as addition of this option is not guaranteed, it may be best not to rely on it. - -

- -

’P“Æ‚ÅoŒ»‚·‚é ASCII ƒ‰ƒxƒ‹

-

Single ASCII labels

- -

mdnconv ‚ÍAƒfƒtƒHƒ‹ƒg‚ł͔ñ ASCII •¶Žš‚ð1•¶ŽšˆÈãŠÜ‚ÞƒhƒƒCƒ“–¼‚݂̂ð -o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ü‚·B‚‚܂è ASCII ‚݂̂©‚ç‚È‚éƒhƒƒCƒ“–¼‚Í -•ÏŠ·‚µ‚Ü‚¹‚ñB‚±‚ê‚Í]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð¬Ý‚³‚¹‚½ -Žž‚ÉAASCII ƒhƒƒCƒ“–¼‚܂łª UTF-5 ‚Ȃǂɕϊ·‚³‚ê‚Ä‚µ‚Ü‚¤‚Ì‚ð–h‚®‚½‚ß‚Ì -ˆ’u‚Å‚·B -

By default, mdnconv converts to output encoding only domain names that contain two or more non-ASCII characters. Consequently, it does not convert domain names that are entirely made up of ASCII characters. This is to prevent ASCII domain names from being converted to UTF-5 when there are both ASCII domain names and multilingual domain names. - -

‚Æ‚±‚낪‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì’†‚É ASCII •¶Žš‚݂̂©‚ç\¬‚³‚ê‚郉ƒxƒ‹‚ª -‚ ‚éê‡A‚»‚ꂪ’P“ƂŃ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚ÉoŒ»‚·‚邯‚±‚̈’u‚Ì‚½‚ß‚É -‚»‚̃‰ƒxƒ‹‚ª UTF-5 ‚ɕϊ·‚³‚ê‚È‚¢‚Æ‚¢‚¤–â‘肪¶‚¶‚Ü‚·B -—Ⴆ‚΃hƒƒCƒ“–¼ www.ƒjƒbƒN.“ú–{.utf5. ‚Ì A ƒŒƒR[ƒh‚ð -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚É‹Lq‚·‚邯‚«‚ÉAŽŸ‚̂悤‚É‘‚¢‚Ä‚µ‚Ü‚¤‚Æ -www ‚Ì•”•ª‚ª UTF-5 ‚ɕϊ·‚³‚ê‚Ü‚¹‚ñB -

However, this gives rise to the following problem. A label containing only ASCII characters in a multilingual domain name that occurs independently in the zone master file is not converted to UTF-5. For example when the A record of the domain name www.ƒjƒbƒN.“ú–{.utf5. is denoted in the zone master file as shown below the www part is not converted to UTF-5. -

-
-$ORIGIN ƒjƒbƒN.“ú–{.utf5.
-...
-www	IN A 10.9.8.7
-
-
- -

‚±‚̂悤‚Èê‡AFQDN ‚Å‹Lq‚·‚é‚Ȃǂµ‚ÄA”ñ ASCII •¶Žš‚ªŠÜ‚Ü‚ê‚é -‚悤‚É‚µ‚Ä‚â‚é•K—v‚ª‚ ‚è‚Ü‚·B -

In this case, use FQDN, for example, to add non-ASCII characters. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/clientconfig.html b/contrib/idn/mdnkit/doc/en/guide/clientconfig.html deleted file mode 100644 index 31c4deeab4..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/clientconfig.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - -Configuring Your Clients - - - - -

ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌÝ’è

-

Client configuration

-

-DNS Proxy Server (dnsproxy) ‚ÍAŠî–{“I‚É‚Í -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç -‘½Œ¾Œê‰»‘Ήž‚µ‚½DNSƒT[ƒo‚ð—˜—p‚Å‚«‚邿‚¤‚É‚·‚é‚à‚̂ł·B -

-The DNS Proxy Server (dnsproxy) enables clients that basically do not support multilingual domain names the use of multilingual compatible DNS servers. -

-‚ ‚éŽè–@‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚éƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç -‘¼‚ÌŽè–@‚Å‘½Œ¾Œê‰»‘Ήž‚µ‚½DNSƒT[ƒo‚ð—˜—p‚·‚邽‚߂ɂàŽg—p‚Å‚«‚Ü‚·B -
-
-This enables clients that use a specific type of multilingual domain name support procedure to access a DNS server with a different multilingual support procedure. -
-

-ŽÀÛ‚É‚ ‚éƒNƒ‰ƒCƒAƒ“ƒg‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©‚ÍA -‚»‚̃Nƒ‰ƒCƒAƒ“ƒg‚ªƒhƒƒCƒ“–¼‚ð‚ǂ̂悤‚Ɉµ‚¤‚©‚É‚æ‚è‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‚ªAƒhƒƒCƒ“–¼‚ðAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å -‚Ȃɂàƒ`ƒFƒbƒN^‰ÁH‚µ‚È‚¢‚ÅŽg—p‚µ‚Ä‚¢‚é‚È‚çA -dnsproxy‚ðŒo—R‚·‚邱‚Ƃɂæ‚Á‚ÄA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ª—˜—p‰Â”\‚ɂȂè‚Ü‚·B -‚µ‚©‚µAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ŃhƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðŒµ–§‚Ƀ`ƒFƒbƒN‚µ‚Ä‚¢‚½‚èA -‚ ‚éŽí‚̕ϊ·‚ðs‚È‚Á‚Ä‚¢‚邿‚¤‚ÈꇂɂÍAdnsproxy‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB -

-Whether or not multlingual domain names can be used with a specific client depends on how that client handles domain names. -When a client uses domain names without checking or processing the encoding, multilingual domain names can be used via dnsproxy. -But if the domain name syntax is carefully checked or conversion is performed on the client side, dnsproxy is not useful. -

-‚±‚±‚Å‚ÍA‚¢‚­‚‚©‚Ì‘ã•\“I‚ȃNƒ‰ƒCƒAƒ“ƒg‚ɂ‚¢‚ÄA -dnsproxy‚É‚æ‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ªŽg‚¤‚±‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©A -‚Ç‚¤‚·‚ê‚Α½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂ邩A -‚ðà–¾‚µ‚Ü‚·B -

-This document will identify a number of major clients that will allow multilingual domain names when used with dnsproxy or what you have to do to use multilingual domain names. -

- -


- -

UNIX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“

-

UNIX applications

-

- -

resolver‚Ì–â‘è

-

resolver problems

-

-UNIX‚Ìê‡ADNS‚Ö‚Ì—v‹‚ÍA‘½‚­‚Ìê‡resolver‚ðŒo—R‚µ‚Ä‘—‚ç‚ê‚Ü‚·B -‚µ‚©‚µA•W€“I‚Èresolver‚Ínon-ASCII‚̃hƒƒCƒ“–¼‚ðŽó•t‚¯‚Ü‚¹‚ñB -‚±‚Ì–â‘è‚ɑΈ‚·‚邽‚ßAmDNkit‚É‚Íbin8‚Ìresolver -(‚¨‚æ‚ÑnslookupAnamed)‚ð8-bit through‚É‚·‚邽‚߂̃pƒbƒ`‚ª -•t‘®‚µ‚Ä‚¢‚Ü‚·B‚Ü‚¸‚ÍAbind8‚É‚±‚̃pƒbƒ`‚ð“K—p‚µA -8-bit through‚Ìresolver‚ðŽg‚Á‚ÄÄƒŠƒ“ƒN‚µ‚Ä‚­‚¾‚³‚¢B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -bind —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B -

-UNIX often sends DNS queries via a resolver. -The problem is that standard resolvers do not accept non-ASCII domain names. -To cope with this problem, mDNkit is provided with a patch that makes the bind8 resolver (nslookup and named) 8-bit through. First, install this patch in bind8 and use the 8-bit through resolver to relink. -For details, refer to Preparations and Applying and Installing the Bind Patch in the Installation Guide. -

- -

nslookup

-

-•W€“I‚Ènslookup‚Ínon-ASCII‚̃hƒƒCƒ“–¼‚ðŽó•t‚¯‚Ü‚¹‚ñB -mDNkit‚Ìbind8‚Ö‚Ì8-bit throughƒpƒbƒ`‚ð“K—p‚µ‚Ä쬂³‚ꂽ -nslookup‚È‚çA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg—p‚·‚邱‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -bind —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B -

-Standard inslookup does not support non-ASCII domain names. -nslookup generated by applying the bind8 8-bit through patch in mDNkit can use multilingual domain names. -For details, refer to Preparations and Applying and Installing the Bind Patch in the Installation Guide. - -

Squid

-

-SquidŒo—R‚ÅWeb‚ɃAƒNƒZƒX‚·‚邿‚¤‚ÈꇂɂÍAnon-ASCII•¶Žš‚ðŠÜ‚Þ -ƒhƒƒCƒ“–¼‚Ísquid‚É‚æ‚Á‚ăGƒ‰[‚Æ‚³‚ê‚Ü‚·B -mDNkit‚É‚Ísquid‚ð8-bit through ‚É‚·‚é -(ƒVƒ“ƒ^ƒbƒNƒXƒ`ƒFƒbƒN‚ðŠO‚·)ƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -‚±‚ê‚ð“K—p‚µ‚½squid‚Å‚ ‚ê‚ÎA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽó•t‚¯‚邿‚¤‚ɂȂè‚Ü‚·B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -squid —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B -

-When the Web is accessed via Squid, domain names that contain non-ASCII characters generate an error. -mDNkit includes a patch that makes squid 8-bit through (by removing the syntax check). - -squid with this patch installed accepts multilingual domain names. -For details, refer to Preparations and Applying and Installing the squid Patch in the Installation Guide. - -

Netscape

-

-Žc”O‚È‚ª‚çA“ü—ÍŽž“_‚Ånon-ASCII•¶Žš‚Í‹‘”Û‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -

-Unfortunately, non-ASCII characters are rejected when entered. -

- -


- -

Windows‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“

-

Windows applications

-

-Windows‚Ìresolver(WINSOCK)‚ÍAnon-ASCII‚̃hƒƒCƒ“–¼‚ð’Ê‚·‚悤‚Å‚·B -ƒNƒ‰ƒCƒAƒ“ƒg“à‚ł̃`ƒFƒbƒNA•ÏŠ·‚ªs‚È‚í‚ê‚È‚¯‚ê‚Ζâ‘è‚È‚­ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B’Êí‚Í -

-The Windows resolver (WINSOCK) passes non-ASCII domain names. -So long as no checks or conversions are performed in the client, multilingual domain names can be used without a problem. Usually, -

-    client-translation . Shift_JIS
-
-‚Æ‚·‚ê‚ÎOK‚Å‚·B -

is OK. -

- -

nslookup

-

-Žc”O‚È‚ª‚çAƒzƒXƒg–¼‚Ì“ü—ÍŽž“_‚ÅAnon-ASCII•¶Žš‚ðŠÜ‚ÞƒzƒXƒg–¼‚Í -‹‘”Û‚³‚ê‚邿‚¤‚Å‚·Bls ‚É‚æ‚éˆê——•\ަ‚Í“®ì‚µ‚Ü‚·B -

-Unfortunately, domain names that contain non-ASCII characters are rejected upon entry. ls works as usual. - -

Netscape Communicator

-

-Version 4.7 ‚Í–â‘è‚È‚­“®ì‚µ‚Ü‚µ‚½B -

-Version 4.7 works without any problems. -

-‚½‚¾AHTTPƒvƒƒLƒVƒT[ƒo‚ðŽg‚í‚ê‚Ä‚¢‚éꇂɂÍA‚»‚Ì -ƒvƒƒLƒVƒT[ƒo‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚é‚©‚Ç‚¤‚©‚ª -–â‘è‚ɂȂè‚Ü‚·‚̂ł²’ˆÓ‚­‚¾‚³‚¢B -

However, when an HTTP proxy server is used, operation depends on whether or not that proxy server supports multilingual domain names. -

- -

Internet Explrore

-

-IE‚ɂ͑½Œ¾ŒêƒhƒƒCƒ“–¼‚ւ̑Ήž‚ªˆê•”ŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -

-Some IE features support multilingual domain names. -

-    ƒc[ƒ‹
-        ƒCƒ“ƒ^[ƒlƒbƒgƒIƒvƒVƒ‡ƒ“
-	    ‚¢‚‚àUTF-8‚Æ‚µ‚ÄURL‚ð‘—M‚·‚é
-
-
-    tool
-        Internet option
-	    URLs are always sent as UTF-8
-
-‚µ‚©‚µA‚±‚ê‚ðŽg‚¤‚ÆA—]•ª‚ȂƂ±‚ë‚Ü‚ÅUTF-8‚Å -ƒGƒ“ƒR[ƒh‚µ‚Ä‚µ‚Ü‚¤‚悤‚ÅAdnsproxy‚ł͎g—p‚Å‚«‚Ü‚¹‚ñB -‹t‚ÉA‚±‚ê‚ðƒIƒt‚É‚µ‚ÄA -
However, this function encodes more than is required with the result that dnsproxy cannot be used. Instead, turn it off, -
-    client-translation . Shift_JIS
-
-‚Æ‚·‚ê‚ÎAdnsproxyŒo—R‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªŽg‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -
then multilingual domain names can be used via dnsproxy. -

-‚Å‚·‚ªAIE‚ÌꇂɂÍAwebƒy[ƒW“à‚É–„‚ßž‚܂ꂽURL‚ɂ‚¢‚Ä‚ÍA -‚»‚̃y[ƒW‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɇ‚킹‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ä -DNS‚̖⇂¹‚ðs‚È‚¤‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·‚Ì‚ÅAShift_JISˆÈŠO‚Å -‹Lq‚³‚ꂽWebƒy[ƒWã‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɂ‚¢‚Ă̓NƒGƒŠ[‚ª -ޏ”s‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B -

-But for URLs embedded in a web page IE converts to encoding that suits the encoding on that page and bases DNS queries on this so entries that use characters other than Shift_JIS fail. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/dnsproxy.html b/contrib/idn/mdnkit/doc/en/guide/dnsproxy.html deleted file mode 100644 index d829441382..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/dnsproxy.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -dnsproxy - - - - -

dnsproxy

- - - -
-

ŠT—v

-

Overview

- -

dnsproxy ‚Í•¶Žš’Ê‚è DNS ‚̃vƒƒLƒVƒT[ƒo‚Æ‚µ‚Ä“®ì‚·‚é -ƒvƒƒOƒ‰ƒ€‚Å‚·BƒNƒ‰ƒCƒAƒ“ƒg‚Æ–{•¨‚Ì DNS ƒT[ƒo‚ÌŠÔ‚Å—¼ŽÒ‚ÌŠÔ‚Ì -’ÊMƒf[ƒ^ (DNS ƒvƒƒgƒRƒ‹ƒƒbƒZ[ƒW) ‚̕ϊ·‚ðs‚¢‚Ü‚·B -

As the name implies, dnsproxy is a program that operates as a DNS proxy server. It converts communications data (DNS protocol messages) between clients and real DNS servers. - -

ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒh‚³‚ꂽ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠÜ‚Þ -DNS—v‹‚ðŽó‚¯Žæ‚邯ADNSƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ð -‘½Œ¾Œê‰»‘Ήž‚µ‚½DNS ƒT[ƒo‚ªŽó•t‚¯‚ç‚ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -DNS ƒT[ƒo‚É‘—o‚µ‚Ü‚·B -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚Æ“¯Žž‚ɳ‹K‰»‚às‚¢‚Ü‚·B -‚Ü‚½‹t‚É DNS ƒT[ƒo‚©‚ç‚̉ž“šƒƒbƒZ[ƒW‚ðŽóM‚·‚邯A‚»‚Ì’†‚É -ŠÜ‚Ü‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éƒ[ƒJƒ‹ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAƒNƒ‰ƒCƒAƒ“ƒg‚ɕԂµ‚Ü‚·B -

When DNS queries that contain multlingual domain names in local encoding are received from a client, it is converted to standard encoding that can be accepted by a DNS server that supports. -Normalization is performed at the same time as the encoding is converted. -On the other hand, when a response message from a DNS server is received, the multilingual domain names in the message are converted to local encoding that is understood by the client before it is returned to the client. - -

dnsproxy ‚Í‚±‚̂悤‚ȃƒJƒjƒYƒ€‚É‚æ‚Á‚Ĉê”ʂ̃Nƒ‰ƒCƒAƒ“ƒg‚ª -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ð‰Â”\‚É‚µ‚Ü‚·B -

dnsproxy uses this mechanism to enable regular clients to handle multilingual domain names. - -

‹ï‘Ì“I‚É‚ÍA -

Specifically, -

    -
  • “ú–{Œê‚È‚ÇA”ñ ASCII •¶Žš‚Ì“ü‚Á‚½ƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
  • It is possible to resolve host names that contain Japanese and other non-ASCII characters. -
  • ”ñ ASCII •¶Žš‚Ì“ü‚Á‚½ƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚ÌŒ‹‰Ê‚Æ‚µ‚Ď󂯎æ‚ê‚邿‚¤‚É - ‚È‚è‚Ü‚·B -
  • Thus host names containing non-ASCII characters can be received as a result of name resoving. -
- -

- -


-

Ý’è

-

Setup

- -

dnsproxy ‚ðŽg—p‚·‚é‚É‚ÍAê—p‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å -Žg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚Ì•û–@‚ðݒ肵‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B -

To use dnsproxy, the encoding and normalization method must be set up using a special configuration file. -Refer to DNS Proxy Server Configuration for information on how to configure this file. - -

- -


-

Žg—p–@

-

Usage

- -

dnsproxy ‚ðŽg—p‚·‚邽‚߂ɂ͂ ‚ç‚©‚¶‚ßݒ肪•K—v‚Å‚·B -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B -

Use of dnsproxy requires prior setup. -Refer to DNS Proxy Server Configuration. - -

dnsproxy ‚͈ȉº‚̃Rƒ}ƒ“ƒhsƒIƒvƒVƒ‡ƒ“‚ðŽó‚¯•t‚¯‚Ü‚·B -

dnsproxy accepts the following command line options. -

-
-daemon -
dnsproxy ‚ðƒf[ƒ‚ƒ“‚Æ‚µ‚Ä‹N“®‚µ‚Ü‚·B -
Starts up dnsproxy as a daemon. -
-config config-file -
config-file ‚ðƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B - ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚ɂ̓fƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ - ƒtƒ@ƒCƒ‹ (’Êí‚Í /usr/local/etc/dnsproxy.conf) ‚ªŽg—p‚³‚ê‚Ü‚·B -
Uses config-file as a configuration file. - When this option is not specified, the default configuration file (usually, /usr/local/etc/dnsproxy.conf) is used. -
-logfile log-file -
ƒƒO‚ðƒtƒ@ƒCƒ‹ log-file ‚Éo—Í‚µ‚Ü‚·B‚±‚̃IƒvƒVƒ‡ƒ“‚ª - Žw’肳‚ê‚È‚©‚Á‚½ê‡‚ɂ̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÅŽw’肳‚ꂽ - ƒƒOƒtƒ@ƒCƒ‹A‚Ü‚½‚̓fƒtƒHƒ‹ƒg‚̃ƒOƒtƒ@ƒCƒ‹‚Éo—Í‚³‚ê‚Ü‚·B -
Outputs the log to log-file. When this option is not specified, the log is output to the file specified by the configuration file or to the default log file. -
- -
-

§ŒÀŽ–€

-

Limitations

- -

dnsproxy ‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ðŽ‚½‚È‚¢ -ˆê”ʂ̃Nƒ‰ƒCƒAƒ“ƒg‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ð‰Â”\‚É‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‚ł̓[ƒJƒ‹ƒR[ƒh‚Å‹Lq‚³‚ꂽƒhƒƒCƒ“–¼‚ðA -‚»‚̂܂ܑ½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

dnsproxy enables ordinary clients without encoding conversion and normalization functions to handle multilingual domain names. -Clients can use domain names in local codes as multilingual domain names. - -

‚µ‚©‚µ‚»‚ê‚ɂ̓Nƒ‰ƒCƒAƒ“ƒg‚ªƒhƒƒCƒ“–¼‚ɑ΂µ‚ēƎ©‚̃`ƒFƒbƒN‚â•ÏŠ·‚ð -s‚È‚Á‚Ä‚¢‚È‚¯‚ê‚ÎA‚Æ‚¢‚¤‘O’ñðŒ‚ª‚ ‚è‚Ü‚·B -–â‘è‚Í‚±‚Ì“_‚É‚ ‚èA -ƒNƒ‰ƒCƒAƒ“ƒg‚É‚æ‚Á‚Ä‚ÍAƒhƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðŒµ–§‚Ƀ`ƒFƒbƒN‚µ‚Ä‚¢‚½‚èA -“ÆŽ©‚ÌŽè–@‚Å•”•ª“I‚É‘½Œ¾Œê‰»‚µ‚Ä‚¢‚½‚è‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚±‚̂悤‚ȃNƒ‰ƒCƒAƒ“ƒg‚Å‚ ‚ê‚ÎAdnsproxy‚ðŽg‚Á‚Ä‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñB -

However, this is on condition that the client does not check or convert the domain names. -This is a problem since some clients make strict checks of domain name syntax or use proprietary methods to perform partial multilingual encoding. -Multilingual domain names cannot be handled by such clients through dnsproxy. - -

UNIX‚ÌꇂÍADNS‚Ö‚Ì—v‹‚Í’Ê탊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŒo—R‚µ‚Ä‘—‚ç‚ê‚Ü‚·‚ªA -Šù‘¶‚ÌƒŠƒ]ƒ‹ƒo‚̓hƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðƒ`ƒFƒbƒN‚µ‚Ä‚¢‚ÄA -ƒhƒƒCƒ“–¼‚Énon-ASCIIƒR[ƒh‚ªŠÜ‚Ü‚ê‚Ä‚¢‚邯ƒGƒ‰[‚Æ‚µ‚Ä -‚Í‚¶‚©‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -‚±‚Ì–â‘è‚ɑΈ‚·‚邽‚ß‚ÉAmDNkit‚É‚ÍAbind8•t‘®‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð -8ƒrƒbƒg“§‰ß‚É‚·‚邽‚߂̃pƒbƒ`‚ª•t‘®‚µ‚Ä‚¢‚Ü‚·B‚±‚̃pƒbƒ`‚ð“K—p‚µ‚½ -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð‘g‚Ýž‚ß‚ÎAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃[ƒJƒ‹ƒR[ƒh‚É‚æ‚é -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªdnsproxy‚É“n‚³‚ê‚ÄA‘½Œ¾Œê‰»DNSƒT[ƒo‚Æ‘g‚݇‚킹‚Ä -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -Windows‚ÌꇂɂÍAƒŠƒ]ƒ‹ƒo(WINSOCK)‚Í8ƒrƒbƒg“§‰ß‚ɂȂÁ‚Ä‚¢‚Ü‚·‚Ì‚ÅA -‚±‚Ì–â‘è‚Í‚ ‚è‚Ü‚¹‚ñB -

UNIX usually sends DNS queries to the resolver library and current resolvers checks the syntax of domain names and rejects non-ASCII code as an error. -To cope with this problem, the bind8 resolver library in mDNkit has been provided with an 8-bit through patch. -By installing a resolver library with this patch the local encoding of multilingual domain names handled by clients is submitted to dnsproxy and can be used with multilingual DNS servers. -The Windows resolver (WINSOCK) is already 8-bit through so this is not a problem. - -

Žc‚é–â‘è‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ł̃`ƒFƒbƒN‚â•ÏŠ·‚Å‚·‚ªA -‚±‚ê‚Í‘ÎۂƂȂéƒNƒ‰ƒCƒAƒ“ƒg‚ª‘½”‚ ‚è‚Ü‚·‚µA‚Ü‚½A -ƒ\[ƒX‚ªŒöŠJ‚³‚ê‚Ä‚¢‚È‚¢‚à‚̂ɂ‚¢‚Ă͎è‚Ìo‚µ‚悤‚ª‚ ‚è‚Ü‚¹‚ñ‚Ì‚ÅA -Šî–{“I‚É‚ÍAmDNkit‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚¹‚ñB‚µ‚©‚µA -DNS‚̃`ƒFƒbƒN‚É‘½—p‚³‚ê‚énslookup(in bind8)‚ÆA -”Ä—p‚Ìproxy‚Æ‚µ‚ÄŽg—p‚³‚ê‚邱‚Ƃ̑½‚¢squid‚ɂ‚¢‚Ä‚ÍA -ƒhƒƒCƒ“–¼‚̃`ƒFƒbƒN‚ðŠO‚·‚½‚߂̃pƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -

The remaining problem, i.e. checks and conversions performed by the application, a problem that affects many clients and which little can be done about when sources are not made public. Functions are not provided in mDNkit to handle this issue. However, a patch that removes the check of domain names from nslookup(in bind8), an often used DNS check tool, and squid, an often used as a general-purpose proxy, are included. - -

dnsproxy ‚ðŽg—p‚µ‚Ăǂ̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ˆµ‚¦‚邿‚¤‚ɂȂé‚Ì‚©‚ð‚܂Ƃ߂½ -•¶‘‚ð—pˆÓ‚µ‚Ä‚ ‚è‚Ü‚·‚Ì‚ÅA -‚±‚¿‚ç‚ð‚²——‚­‚¾‚³‚¢B -

Refer to document for information on which applications dnsproxy can enable to handle multilingual domain names. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/guide.html b/contrib/idn/mdnkit/doc/en/guide/guide.html deleted file mode 100644 index 5137775bcb..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/guide.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - -Introduction to mDNkit - - - - -

ƒKƒCƒhˆê——

-

Guide List

-

-mDNkit‚̃KƒCƒh‚͈ȉº‚̃hƒLƒ…ƒƒ“ƒg‚©‚ç\¬‚³‚ê‚Ä‚¢‚Ü‚·B -

-The mDNkit guide is comprised of the following documents. -

- -

-ˆê”ʃ†[ƒU‚Ì•û‚͂܂¸mDNkit‚ÌЉî‚ð‚²——‚­‚¾‚³‚¢B -‚»‚Ì‚ ‚ÆAŽg—p‚·‚鑽Œ¾ŒêƒhƒƒCƒ“ˆ—•ûŽ® (‚ ‚È‚½‚̃VƒXƒeƒ€‚Å -—˜—p‚Å‚«‚鈗•ûŽ®‚ɂ‚¢‚Ă̓VƒXƒeƒ€ŠÇ—ŽÒ‚É‚¨q‚Ë‚­‚¾‚³‚¢) ‚ɉž‚¶‚Ä -bind9 ƒpƒbƒ`A -runmdnA -mDN WrapperA -dnsproxy ‚Ì‚¢‚¸‚ê‚©‚ð‚²——‚­‚¾‚³‚¢B -

-Ordinary users should refer to Introduction to mDNkit. -Depending on the method of processing multilingual domain names (ask the system administrator which method your system uses) refer to@bind9 patch, runmdn, mDN WrapperAor dnsproxy. - -

-–{ƒLƒbƒg‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒVƒXƒeƒ€ŠÇ—ŽÒ‚Ì•û‚Í‚·‚ׂẴKƒCƒh‚É -ˆê’Ê‚è–Ú‚ð’Ê‚µ‚Ä‚¨‚­‚±‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

-It is recommended that the system administrator that installs this kit carefully reads through all the guides. - -

-–{ƒLƒbƒg‚̓tƒŠ[ƒ\ƒtƒgƒEƒFƒA‚Å‚·B–{ƒLƒbƒg‚ÌŽg—pAÄ”z•z“™‚ÉŠÖ‚·‚é -ðŒ‚ɂ‚¢‚Ä‚Í LICENSE.txt ‚ð -‚²——‚­‚¾‚³‚¢B -

-This kit is free software. Read the LICENSE.txt for information on the redistribution conditions of this kit. - -


-

mDNkit ‚ÌЉî

-

Introduction to mDNkit

-

-mDNkit‚ÍAŠù‘¶‚ÌDNSƒT[ƒo(bind8/9)AŠù‘¶‚̃Nƒ‰ƒCƒAƒ“ƒg‚ÅA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚½‚߂ɒñˆÄ‚³‚ê‚Ä‚¢‚éŠeŽí‚Ì•ûŽ®‚ðŽŽŒ±“I‚É -•]‰¿‚µ‚Ă݂邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚·‚邽‚ß‚Ì -ƒpƒbƒ`Aƒc[ƒ‹Aƒ‰ƒCƒuƒ‰ƒŠ‚ð‚܂Ƃ߂½‚à‚̂ł·B -

-The mDNkit comprises all the patches, tools and libraries to experimentally assess the variety of systems that enable existing DNS servers (bind8, bind9) to use multilingual domain names with current clients. -

-]—ˆAƒhƒƒCƒ“–¼‚É‚ÍA‰pŽšA”Žš(‚¨‚æ‚уnƒCƒtƒ“)‚µ‚©Žg‚¦‚Ü‚¹‚ñ‚Å‚µ‚½B -‘½Œ¾Œê‰»‚³‚ꂽƒhƒƒCƒ“–¼‚Æ‚ÍAƒhƒƒCƒ“–¼‚Æ‚µ‚Ä‚±‚ê‚ç‚ɉÁ‚¦‚Ä“ú–{Œê‚È‚Ç -‚¢‚ë‚¢‚ë‚ÈŒ¾Œê‚Ì•¶Žš‚ðŽg‚¦‚邿‚¤‚É‚µ‚½‚à‚̂ł·B -‚»‚ÌŽÀŒ»•ûŽ®‚Æ‚µ‚ÄAŒ»ÝƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚¢‚­‚‚©‚Ì -’ñˆÄ‚ª‚È‚³‚ê‚Ä‚¢‚Ü‚·B(ŽQl•¶Œ£ ŽQÆ) -

-Traditional domain names can only use alphabetic characters, numerics and hyphe ns. -In addition to these characters, multilingual domain names can also handle Japanese and a great number of characters from other languages. -A number of recommendations for how these are to be implemented are offered in the form of drafts on the Internet. See (Reference.) -

- -

ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·

-

Encoding Conversion

- -

-DNS ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¦‚邿‚¤‚É‚·‚é‚É‚ÍA‚Ü‚¸ DNS ƒT[ƒoŠÔ‚Å -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‚·‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) ‚ð -Œˆ‚ß‚é•K—v‚ª‚ ‚è‚Ü‚·B -Œ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚ÍA‚¢‚¸‚ê‚àISO10646 ‚ðƒx[ƒX‚Æ‚µ‚½ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÅA‘å‚«‚­ŽŸ‚Ì2‚‚ɕª‚¯‚ç‚ê‚Ü‚·B -

-First, the standard encoding (code set) to be used for multilingual domain names between DNS servers must be determined to enable use of multilingual names in DNS. -Currently recommended systems are all based on ISO10646 encoding and are basically of the following two types. -

    -
  1. ]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Ƃ̂ł«‚é•¶Žš‚¾‚¯‚ðŽg‚Á‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO -
    Encoding that uses only characters that can be used in traditional domain names -
  2. UTF-8 ‚̂悤‚ÉA]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚Ăͳ‚µ‚­‚È‚¢•¶Žš—ñ‚ƂȂé - ƒGƒ“ƒR[ƒfƒBƒ“ƒO -
    Encoding that uses characters that are not legal in traditional domain names such as UTF-8 -
-

-1. ‚Ì•û–@‚ÍAƒGƒ“ƒR[ƒhŒ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚Ä‚àŽg‚¦‚é•¶Žš—ñ‚ɂȂé‚Ì‚ÅA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠù‘¶‚ÌDNS‚ªŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚é•¶Žš—ñ‚Å -•\Œ»‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‚±‚Ìê‡ADNSƒT[ƒoŽ©‘Ì‚Í -Šù‘¶‚Ì‚à‚Ì‚ª‚»‚̂܂܎g‚¦‚Ü‚·B -

-With method 1, the encoded result are character strings that could also be used in traditional domain names, allowing you to use a multilingual domain name in the existing DNS server. Existing DNS servers can be used with this method. -

-2.‚Ì•û–@‚Å‚ÍADNS ƒT[ƒo‚ð‚»‚ÌƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɑΉž‚·‚邿‚¤‚É -‰ü‘¢‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

-With method 2, the DNS server has to be modified to support the encoding. -

-‚¢‚¸‚ê‚Ì•ûŽ®‚ÉŠÖ‚µ‚Ä‚àADNS ƒT[ƒo‚ÌŽ‚ƒhƒƒCƒ“–¼‚̃f[ƒ^‚Í‚ ‚ç‚©‚¶‚ß -‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

-Whichever method is selected, the domain name data held by a DNS server has to be prepared in that encoding. -

-ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚͈ê”Ê“I‚É‚Í SJIS “™‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -Žg—p‚·‚é‚Ì‚ÅA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¦‚邿‚¤‚É‚·‚邽‚߂ɂ͂ǂ±‚©‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ŠŒÝ•ÏŠ·‚ð‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

-On the other hand, applications normally use SJIS or other local encoding so some type of interconversion must be performed at some point to enable the use of multilingual domain names. -

-‚‚܂èƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -ˆµ‚¢ADNS ƒT[ƒo‚Í•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ňµ‚¤‚Ì‚ÅA -ƒNƒ‰ƒCƒAƒ“ƒg‚Æ DNS ƒT[ƒo‚̊Ԃ̂ǂ±‚©‚ŃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽw’肵‚½ -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚Ö -•ÏŠ·‚µA -‚Ü‚½ DNS ƒT[ƒo‚©‚ç‚̉ž“š‚Ɋ܂܂ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -ƒNƒ‰ƒCƒAƒ“ƒg‚Å•\ަ‰Â”\‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚³‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

-Thus applications handle multilingual domain names in local encoding, whereas the DNS server handles them in standard encoding. This requires that at some point between the client and the DNS server that domain names in local encoding specified by an application be converted to domain names in standard encoding, and that domain names in standard encoding in the response from the DNS server be returned to local encoding that can be displayed by the client. -

-‚±‚Ì‚½‚߂ɂ͎Ÿ‚Ì3Ží—Þ‚Ì•û–@‚ªl‚¦‚ç‚ê‚Ü‚·B -

-The following three methods have been proposed to implement this. -

-
a. ƒNƒ‰ƒCƒAƒ“ƒg‚ł̕ϊ·
- ƒNƒ‰ƒCƒAƒ“ƒg‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚éB -
a. Conversion is performed by the client
- Encoding is converted by the client. - client-side conversion -

-

b. DNS ƒT[ƒo‚ł̕ϊ·
- DNS ƒT[ƒo‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚éB -
b. Conversion is performed by the DNS server
- Encoding is converted by the DNS server. - server-side conversion -

-

c. ƒvƒƒLƒVƒT[ƒo‚ł̕ϊ·
- ƒNƒ‰ƒCƒAƒ“ƒg‚Æ DNS ƒT[ƒo‚̊ԂɃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·—p‚Ì’†ŒpƒT[ƒo‚ð - Ý‚¯‚éB -
c. Conversion is performed by a proxy server
- An intermediate server is set up between the client and the DNS server to handle encoding conversions. - proxy conversion -
-

- -‚½‚¾‚µ b. ‚Ì•ûŽ®‚Í DNS ƒT[ƒo‚É•s•K—v‚É•¡ŽG‚È‹@\‚ðŽ‚¿ž‚Þ‚±‚ÆA•‰ -‰×‚ð‚‚߂邱‚ƂȂǂ̖â‘肪‚ ‚èD‚Ü‚µ‚­‚È‚¢‚½‚ßA–{ƒLƒbƒg‚Å‚Í a. ‚Æ -c. ‚Ì2’Ê‚è‚Ì•û–@‚ð’ñ‹Ÿ‚µ‚Ü‚·B -
System b. unduly increases the complexity of DNS server configuration and thereby its load making it less desirable, therefore, methods a. and c. are recommended for use with this kit. -

-mDNkit‚ÍAŠù‘¶‚ÌDNSƒT[ƒoAƒNƒ‰ƒCƒAƒ“ƒg‚ðAŬŒÀ‚̉ü‘¢‚Å -•¡”‚Ì•ûŽ®‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ŽÀÛ‚ÉŽŽ‚µ‚Ă݂邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚·‚é‚à‚̂ł·B -

-mDNkit requires a minimum of modifications to allow experimental use of multiple multilingual domain name systems with existing DNS servers and clients. -

- -

³‹K‰»

-

Normalization

- -

‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚߂ɂÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‘¼‚É‚àd—v‚È -‹@”\‚ª‚ ‚è‚Ü‚·B‚»‚ê‚̓hƒƒCƒ“–¼‚̳‹K‰»‚Å‚·B -

In addition to encoding conversion, normalization is another vital function to enable handling of multilingual domain names. - -

‚·‚Å‚Éq‚ׂ½‚悤‚ÉADNS ƒT[ƒoŠÔ‚ÅŽg—p‚³‚ê‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚Í‚¢‚¸‚ê‚à ISO10646 ‚ðƒx[ƒX‚Æ‚µ‚Ä‚¢‚Ü‚·‚ªA -ISO10646 ‚ł͌©‚©‚¯ã‘S‚­“¯ˆê‚Ì•¶Žš‚ð•\‚·•û–@‚ª•¡”‚ ‚éꇂª‚ ‚è‚Ü‚·B -‚±‚̂悤‚È•¶Žš‚ɑ΂µ‚Ä‚»‚Ì•\Œ»•û–@‚ð1‚‚ɓˆê‚µ‚È‚¢‚ÆAƒ†[ƒU‚ª -³‚µ‚¢ (‚ÆŽv‚¦‚é) ƒhƒƒCƒ“–¼‚ð“ü—Í‚µ‚½‚É‚àŠÖ‚í‚炸A–¼‘O‰ðŒˆ‚ª‚Å‚«‚È‚¢ -‚Æ‚¢‚¤•s“s‡‚ª¶‚¶‚邱‚ƂɂȂè‚Ü‚·B -

As stated above, the recommended encoding of domain names to be used between DNS servers are all based on ISO10646, the problem is that a number of characters that look identical can be denoted in a number of different ways. -Unless a single unique method of notation is found for such characters, what a user thinks is a correctly entered domain name may not be possible to resolve. - -

‚Ü‚½A]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Å‚ÍAƒhƒƒCƒ“–¼‚̃}ƒbƒ`ƒ“ƒO‚ÌÛ‚É‘å•¶Žš‚Æ -¬•¶Žš‚Í“¯ˆêŽ‹‚³‚ê‚Ä‚¢‚Ü‚µ‚½B‚±‚ê‚ð‚»‚Ì‚Ü‚Ü‘½Œ¾ŒêƒhƒƒCƒ“–¼‚É‚à“K—p‚·‚é -‚±‚Æ‚ÍAƒ}ƒbƒ`ƒ“ƒO‚̈—Œø—¦‚Ȃǂ̓_‚Å–â‘肪‚ ‚èA‚ ‚ç‚©‚¶‚ß‚·‚ׂĬ•¶Žš -‚ ‚é‚¢‚Í‘å•¶Žš‚É“ˆê‚·‚é‚Ì‚ª‚æ‚èŒø—¦“I‚¾‚Æl‚¦‚ç‚ê‚Ü‚·B -

Another problem is that upper case and lower case characters in domain name matching of traditional ASCII domain names are handled as equivalents. If this method is carried over to the handling of multilingual domain names in its present form, the matching process will be slowed down. To ensure higher efficiency, it may a good idea to use only lower case or upper case letters. - -

‚±‚̂悤‚ɃhƒƒCƒ“–¼‚ð‚ ‚ç‚©‚¶‚ßݒ肵‚½Šî€‚É‚µ‚½‚ª‚Á‚Ä•W€Œ`‚ɕϊ·‚·‚é‚Ì‚ª -³‹K‰»‚Å‚·BŠî–{“I‚ɂͳ‹K‰»‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯Žž‚És‚í‚ê‚é‚Ì‚ÅA -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯‚¶‚­ -

Normalization is the method used to convert domain names to standard encoding using a set standard. Normalization is normally performed simultaneous with encoding conversion and just like encoding conversion there are the following three types. -

    -
  • ƒNƒ‰ƒCƒAƒ“ƒg‚ł̳‹K‰» -
  • Normalization performed by the client -
  • DNS ƒT[ƒo‚ł̳‹K‰» -
  • Normalization performed by the DNS server -
  • ƒvƒƒLƒVƒT[ƒo‚ł̳‹K‰» -
  • Normalization performed by a proxy server -
-‚Ì3Ží—Þ‚Ì•û–@‚ªl‚¦‚ç‚ê‚Ü‚·B‚»‚µ‚Ä2”Ô–Ú‚Ì•ûŽ®‚ªD‚Ü‚µ‚­‚È‚¢‚±‚Æ‚à -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯‚¶‚Å‚·B -

Like encode conversion, the second option is not desirable. - -

ƒNƒ‰ƒCƒAƒ“ƒg‚ł̕ϊ·E³‹K‰»

-

Conversiona and normalization performed by the client

- -

‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤•û–@‚Ì‚ ‚é‚ׂ«Žp‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ȂǂɃGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ⳋK‰»‚Ì‹@”\‚ð -Ž‚½‚¹‚邱‚Ƃɂæ‚Á‚ÄADNS ƒvƒƒgƒRƒ‹‚ɂ̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -ƒf[ƒ^‚ðˆêØÚ‚¹‚È‚¢‚±‚Æ‚¾‚Æl‚¦‚ç‚ê‚Ü‚·B -‚±‚̈—•û–@‚ðŽÀŒ»‚·‚邽‚ß‚É mDNkit ‚ł͂¢‚­‚‚©‚Ì•ûŽ®‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B -

The ideal method of handling multilingual domain names is thought to be to leave the conversion and normalization of encoding to resolver libraries and other features on the client side and let no local encoding data be handled by the DNS protocol. - -mDNkit provides a number of methods to implement this type of processing. - -

- -
bind9 ‚ɑ΂·‚éƒpƒbƒ`
-
bind9 patch
-‚±‚̃pƒbƒ`‚Í bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚ɃGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚¨‚æ‚Ñ -³‹K‰»‚Ì‹@”\‚ðŽ‚½‚¹‚é‚à‚̂ł·B -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Í‚±‚̃pƒbƒ`‚ð“K—p‚µ‚½ bind9 ‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð -ƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚èA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -

This patch enables the bind9 resolver to convert and normalize encoding. -An application can handle multilingual domain names by linking to a bind9 resolver library where this patch has been installed. -

-conversion/normalization by bind9 patch -
-

- -

runmdn ƒRƒ}ƒ“ƒh
-
runmdn command
-‚±‚̃Rƒ}ƒ“ƒh‚ÍAbind4 ‚ ‚é‚¢‚Í bind8 ƒx[ƒX‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚Â -Unix ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðAăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É -‚µ‚Ü‚·B‚±‚ê‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—˜—p‚µ‚ÄAƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ì -’ñ‹Ÿ‚·‚éˆê•”‚ÌŠÖ”‚𑽌¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð•t‰Á‚µ‚½ƒo[ƒWƒ‡ƒ“‚É -“®“I‚É’u‚«Š·‚¦‚邱‚ƂŎÀŒ»‚³‚ê‚Ü‚·B -

This command allows Unix applications with bind4 or bind8 based resolver libraries to handle multilingual domain names without the need for recompiling. -The command does this by utilizing the dynamic link of shared libraries to dynamically replace some of the functions of the resolver library with versions added to enable multilingual domain name processing. -

-conversion/normalization by runmdn -
-

- -

mDN Wrapper
-‚±‚ê‚Í Windows ƒNƒ‰ƒCƒAƒ“ƒg‚ðA‚â‚Í‚èăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ˆµ‚¦‚邿‚¤‚É‚·‚é‚à‚̂ł·BDLL ‚Ì‹@\‚ð—˜—p‚µ‚ÄA–¼‘O‰ðŒˆ‚ðs‚¤ WINSOCK -‚̈ꕔ‚ÌŠÖ”‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð•t‰Á‚·‚邱‚ƂŎÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B -

This function is provided to enable Windows clients handle multilingual domain names without the need for recompiling. It utilizes the DLL mechanism to add multilingual domain name processing capability to some of the functions of WINSOCK, the name resolver. -

-conversion/normalization by winsock wrapper -
- -
- -

runmdn ƒRƒ}ƒ“ƒh‚Æ mDN Wrapper ‚ÍAŠù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ð•ÏX‚¹‚¸‚É -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‹@”\‚ð•t‰Á‚µ‚悤‚Æ‚·‚é‚à‚̂ł·‚ªAŽÀۂɂ͂¢‚­‚‚©‚Ì -§ŒÀŽ–€‚ª‚ ‚èA‚ǂ̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚à“K—p‚Å‚«‚é‚à‚̂ł͂ ‚è‚Ü‚¹‚ñB -Ú‚µ‚­‚Í‚»‚ꂼ‚ê‚̉ðà‚ð‚²——‚­‚¾‚³‚¢B -

The rundmdn command and mDN Wrapper attempt to add multilingual domain name functions to existing applications without making any modifications, but there are a number of limitations and they cannot be used with any application. -Refer to respective instructions for details. - -

‚Ü‚½ bind9 ƒpƒbƒ`‚Æ‚¢‚¦‚Ç‚àA—Ⴆ‚΃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª“ÆŽ©‚É -ƒhƒƒCƒ“–¼‚Ì•¶Žšƒ`ƒFƒbƒN‚ðŽÀs‚µ‚ĉp”Žš‚ƃnƒCƒtƒ“ˆÈŠO‚Ì•¶Žš‚ðŠÜ‚Þ -ƒhƒƒCƒ“–¼‚ðƒGƒ‰[‚É‚µ‚Ä‚¢‚½‚è‚·‚éꇂɂ͖³—͂ł·B -

For example if the application checks domain name characters, characters other than alphanumerics and hyphens will generate an error regardless of the bind9 patch. - -

ƒvƒƒLƒVƒT[ƒo‚ł̕ϊ·E³‹K‰»

-

Conversion and Normalization via a proxy server

- -

‚·‚Å‚Éq‚ׂ½‚悤‚ÉAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Í -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÅŽÀs‚·‚é‚Ì‚ª—‘z“I‚¾‚Æl‚¦‚ç‚ê‚Ü‚·‚ªA -ŽÀÛ–â‘è‚Æ‚µ‚ă\[ƒX‚ªŒöŠJ‚³‚ê‚Ä‚¢‚È‚¢‚½‚ß‚»‚̂悤‚ȉü—ǂ̂ł«‚È‚¢ -ƒNƒ‰ƒCƒAƒ“ƒg‚âA“ÁŽê‚ÈƒŠƒ]ƒ‹ƒo‚ðŽ‚Á‚Ä‚¢‚Ä runmdn ‚ª“K—p‚Å‚«‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ª -‘¶Ý‚µ‚Ü‚·B -

As stated above, conversion and normalization of encoding should ideally be performed on the client side. The problem is that there are clients that do not admit to such modifications because the source is not made public or it uses special resolvers that do not allow the use of runmdn. - -

‚»‚±‚Å mDNkit ‚Å‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒh‚³‚ꂽ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠÜ‚ÞDNS—v‹‚ðŽó‚¯Žæ‚èA‘½Œ¾Œê‰»‘Ήž‚µ‚½ -DNS ƒT[ƒo‚ªŽó•t‚¯‚ç‚ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ɕϊ·‚µA -‚Ü‚½‹t‚É DNS ƒT[ƒo‚©‚ç‚̉ž“š‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éŒ`Ž®‚É–ß‚· DNS proxy ƒT[ƒo‚ð -—pˆÓ‚µ‚Ü‚µ‚½B -

To cope with such situations, the mDNkit provides a DNS proxy server that receives DNS queries that include multilingual domain names in local encoding from a client and converts these to standard encoding acceptable to a DNS server supporting multilingual domain names, and conversly, returns multilingual domain names in the DNS server response to a format that is understood by the client. - -

dnsproxy‚ðŽg‚¤‚ÆA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ªƒhƒƒCƒ“–¼‚̃`ƒFƒbƒN‚â•ÏŠ·‚ð -s‚È‚Á‚Ä‚¢‚È‚¯‚ê‚ÎAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃[ƒJƒ‹ƒR[ƒh‚Å‹Lq‚³‚ꂽ -ƒhƒƒCƒ“–¼‚ðA‚»‚̂܂ܑ½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Æ‚ª‚Å‚«‚é -‚悤‚ɂȂè‚Ü‚·B -

When dnsproxyis used, the domain names in the local code of the client side can be used as multilingual domain names without modification if domain names are checked and converted on the client side. -

-mDNkit - DNS Proxy Server -
- -

- -

DNS‘¤‚ł̃hƒƒCƒ“–¼‚̕ϊ·

-

Domain Name Conversion on the DNS Side

-

-DNS ƒT[ƒo‘¤‚̃][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚â named.conf ƒtƒ@ƒCƒ‹ã‚̃hƒƒCƒ“–¼‚ÍA -‚ ‚ç‚©‚¶‚ßA‹K’肳‚ꂽƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚· -(‘Oq‚Ì——R‚É‚æ‚è -DNS ƒT[ƒo‚ɕϊ·‹@”\‚ðŽ‚½‚¹‚é•û–@‚Í‚±‚±‚Å‚Íl‚¦‚Ü‚¹‚ñ)B -

-The domain names in the zone master file and named.conf file on the DNS server side must be converted to the prescribed encoding. -(the above reason i.e. adding conversion functionality to the DNS server is not considered here). -

-mDNkit‚Å‚ÍAŠÇ—ŽÒ‚Í‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -쬂µ‚Ä•K—v‚ɉž‚¶‚ĕϊ·‚µ‚ÄŽg‚¤‚à‚̂Ƒz’肵A -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Å•K—v‚Æ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·ƒc[ƒ‹mdnconv‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

-mDNkit assumes that the administrator generate these files in local encoding and only convert them as need dictates and to this end provides mdnconv, a conversion tool to handle conversion from local encoding to multilingual domain names. - -

-mDNkit - mDN converter -
- - - - - - - - - - -
’: - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽƒ][ƒ“ƒ}ƒXƒ^ - ƒtƒ@ƒCƒ‹‚𑽌¾ŒêƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö•ÏŠ·‚·‚邱‚Ƃ͂ł«‚Ü‚·‚ªA - ‘½Œ¾ŒêƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ă͋t•ÏŠ·‚ª - ‚Å‚«‚È‚¢‚±‚Æ‚ª‚ ‚è‚Ü‚·B - ‚±‚ê‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ă͂»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å - ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Æ’Êí‚Ì ASCII •¶Žš—ñ‚ª - ‹æ•ʂł«‚¸Aƒtƒ@ƒCƒ‹‚̂ǂ̕”•ª‚ð‹t•ÏŠ·‚·‚ׂ«‚©”»’è‚Å‚«‚È‚¢ - ‚à‚Ì‚ª‚ ‚邽‚߂ł·B - ‚µ‚©‚µADNS‚ÌŠÇ—‚Ì‚½‚߂ɂÍA - ‹t•ûŒü‚̕ϊ·‚à•K—v‚É‚È‚é‚ÆŽv‚¢‚Ü‚·‚Ì‚ÅAˆê•”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - ‘΂µ‚Ă͋t•ÏŠ·‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -
Note: - Zone master fils in local encoding can be converted to multilingual encoding, but some multilingual encoding may not be possible to return to local encoding. - This is because the encoded character strings in some encoding schemes it cannot be distinguished from normal ASCII character strings making it impossible to know which part of the file should be converted back to local encoding. - Still, since backward conversion is regarded as essential for the sake of DNS management, backward conversion is supported for some encoding. -
-

- -

DNSŽ©‘̂̑½Œ¾Œê‰»

-

Multilingual support by DNS

- -

-DNS ƒT[ƒo‚ÌŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ä‚ÍA -DNSƒT[ƒoŽ©‘Ì‚ªƒhƒƒCƒ“–¼‚ð8ƒrƒbƒg“§‰ß‚ňµ‚¤‚±‚Æ‚ð -—v‹‚·‚é‚à‚Ì‚à‚ ‚è‚Ü‚·B -‚±‚̂悤‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̑Έ‚Ì‚½‚ß‚É -mDNkit‚É‚Íbind8‚ð8ƒrƒbƒg“§‰ß‚É‚·‚邽‚߂̃pƒbƒ`‚ª -ŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B‚±‚̃pƒbƒ`‚Íbind8‚Ɋ܂܂ê‚Ä‚¢‚é -nslookupAresolver‚ɂ‚¢‚Ä‚à8ƒrƒbƒg“§‰ß‚É‚µ‚Ü‚·B -

-Some encoding used by DNS servers requires that the DNS server itself handles domain names as 8-bit through. To handle such encoding, mDNkit is provided with a patch that makes bind8 8-bit through. -This patch also turns nslookup and resolver provided with bind8 into 8-bit through. - -

bind9 ‚Ì DNS ƒT[ƒo‚Í–{—ˆ8ƒrƒbƒg“§‰ß‚ɂȂÁ‚Ä‚¢‚Ü‚·‚ªA -ƒhƒƒCƒ“–¼‚ð“à•”Œ`Ž®‚©‚çƒeƒLƒXƒgŒ`Ž®‚ɕϊ·‚·‚éÛA8ƒrƒbƒg•¶Žš‚ð -`\DDD' ‚Æ‚¢‚¤•\Œ»‚ɕϊ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA‚±‚ê‚ð—}§‚µ‚Ä UTF-8 •¶Žš‚Í -‚»‚̂܂ܓ§‰ß‚·‚邿‚¤‚É‚·‚é‹@”\‚ª bind9 ƒpƒbƒ`‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚·B -

Although bind9 DNS servers are 8-bit through, when domain names are converted from the internal format to text format, 8-bit characters are converted to "\DDD". To suppress this and allow UTF-8 characters through, a bind9 patch has been provided. - -

- -

•â‘«

-

Notes

-ŽÀÛ‚ÉmDNkit‚ðŽg—p‚·‚é‚É‚ÍAˆÈ‰º‚̃hƒLƒ…ƒƒ“ƒg‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -
Refer to the following documents for information on mDNkit usage. - -‚»‚ꂼ‚ê‚̃vƒƒOƒ‰ƒ€Aƒ‰ƒCƒuƒ‰ƒŠA‚¨‚æ‚ÑÝ’èƒtƒ@ƒCƒ‹‚ÌŽd—l‚ɂ‚¢‚Ä‚Í -ˆÈ‰º‚̃hƒLƒ…ƒƒ“ƒg‚ð‚²——‚ɂȂÁ‚Ä‚­‚¾‚³‚¢B -
Refer to the documents listed below for the specifications of these programs, libraries and configuration files. - - - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/install.html b/contrib/idn/mdnkit/doc/en/guide/install.html deleted file mode 100644 index f8cfc5298b..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/install.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - -mDNkit installation guide - - - - -

ƒCƒ“ƒXƒg[ƒ‹

-

Install

-

-mDNkit ‚̃Rƒ“ƒpƒCƒ‹‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚ĉðà‚µ‚Ü‚·B -‚±‚±‚ł̓\[ƒX‚©‚ç‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Äà–¾‚µ‚Ü‚·B -ƒoƒCƒiƒŠƒpƒbƒP[ƒW‚Ì”z•z‚à—\’肳‚ê‚Ä‚¢‚Ü‚·‚ªA -‚»‚ê‚ç‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ÉŠÖ‚µ‚Ă͂»‚ꂼ‚ê‚̃pƒbƒP[ƒW‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

This document describes mDNkit compiling and installation procedures. -Procedures for how to install from the source is described here. -Distribution of binary packages is planned; refer to the instructions that accompany each package. - -

-–{ƒhƒLƒ…ƒƒ“ƒg‚Å‚Í Unix —p‚̃Rƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Ä -à–¾‚µ‚Ü‚·BWindows —p‚Ì mDN Wrapper ‚̃Cƒ“ƒXƒg[ƒ‹ -•û–@‚ÉŠÖ‚µ‚Ä‚Í mDN Wrapper ‚̃ZƒbƒgƒAƒbƒv‚Ì -€‚ð‚²——‚­‚¾‚³‚¢B -

-This document describes the compiling and installing procedures for Unix. Refer to the section Setup in mDN Wrapper for information on procedures to install in Windows mDN Wrapper. - -

-ƒ\[ƒX”z•z‚©‚ç‚̃Cƒ“ƒXƒg[ƒ‹Žè‡‚Í‚¨‚æ‚»ŽŸ‚̂悤‚ɂȂè‚Ü‚·B -

-Installation procedure from source distribution is implemented as follows. - -

    -
  1. ‘O€”õ -
  2. Prepare -
  3. ”z•zƒ\[ƒX‚Ì“WŠJ -
  4. Extract distribution source -
  5. configure ŽÀs -
  6. Configure Execute -
  7. ƒRƒ“ƒpƒCƒ‹ -
  8. Compile -
  9. ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ -
  10. Install file -
- -

-ƒCƒ“ƒXƒg[ƒ‹‚ÌŒã‚ÍADNS ƒT[ƒo‚ÌÝ’è -‚¨‚æ‚Ñ mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -A‚³‚ç‚É dnsproxy ‚ðŽg—p‚·‚éê‡‚É‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ðŽQÆ‚µ‚ÄÝ’è‚ðs‚Á‚Ä‚­‚¾‚³‚¢B -

-After installation, refer to and set up DNS server configuration, mDNkit resolver configuration, and if dnsproxy is to be used DNS Proxy Server configuration. -

ƒ\[ƒX”z•z‚Ɋ܂܂ê‚Ä‚¢‚éƒpƒbƒ`‚ð“K—p‚·‚éꇂɂÍA -‚»‚ꂼ‚ꎟ‚̎臂ɂµ‚½‚ª‚Á‚Ä‚­‚¾‚³‚¢B -

To install the patch included in source distribution, refer to the following instructions. -

- -
- -

‘O€”õ

-

Preparations

- -

iconv ‚̃Cƒ“ƒXƒg[ƒ‹

-

iconv installation

- -

mDNkit ‚Í EUC ‚â SJIS ‚ȂǗlX‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽ -ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚邽‚ß‚ÉA”Ä—p‚̃R[ƒhƒZƒbƒg•ÏŠ· -ƒ†[ƒeƒBƒŠƒeƒB‚Å‚ ‚é iconv() ‚ðŽg—p‚µ‚Ü‚·B -‚»‚±‚ÅAFreeBSD ‚È‚Ç iconv() ‚ª•W€‚Å‘g‚Ýž‚Ü‚ê‚Ä‚¢‚È‚¢ƒVƒXƒeƒ€‚Å‚ÍA -mDNkit ‚̃Cƒ“ƒXƒg[ƒ‹‚Éæ—§‚Á‚Ä iconv() ‚ðƒCƒ“ƒXƒg[ƒ‹ -‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚Ü‚½AmDNkit ‚Í iconv() ‚ª -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚邱‚Æ‚ð—v‹‚µ‚Ü‚·BƒVƒXƒeƒ€•t‘®‚Ì -iconv() ‚ª UTF-8 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡‚ɂ͂â‚Í‚è -ŠO•”‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

mDNkit uses iconv(), a general-purpose utility, to convert domain name encoding of EUC, SJIS or other local encoding. -iconv() must be installed prior to mDNkit installation in those systems that do not have iconv() as a standard package, such as FreeBSD. Also, the mDNkit requires that iconv() should support UTF-8 encoding. An external package must be installed if the provided iconv() in the system does not support UTF-8. - -

iconv() ‚̃tƒŠ[‚ÈŽÀ‘•‚Æ‚µ‚Ä‚ÍA—Ⴆ‚Î libiconv -

There are free versions of iconv(), for example, libiconv. -

-

‚ª‚ ‚èAƒ\[ƒX‚ðã‹L‚̃y[ƒW‚©‚ç“üŽè‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -‚±‚ê‚Í LGPL ‚ÉŠî‚¢‚½ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚ÅA‘½‚­‚Ì Unix Œn OS ‚Ì -‚à‚Æ‚Å“®ì‚µ‚Ü‚·B‚±‚̃pƒbƒP[ƒW‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Ä‚ÍAã‹Lƒy[ƒW‚©A -‚ ‚é‚¢‚̓\[ƒX”z•z‚Ɋ܂܂ê‚é INSTALL.generic ƒtƒ@ƒCƒ‹‚ð‚²——‚­‚¾‚³‚¢B -

This source can be downloaded from the above page. -This is an LGPL-based free software package that runs on a variety of Unix operating systems. Refer to the above page or the INSTALL.generic file that accompanies the source distribution for information on installation procedures. - -

- -

bind9 ƒ\[ƒX‚Ì“üŽè

-

Obtaining the bind9 source

- -

mDNkit ‚Í bind9 ‚ɑ΂·‚éƒpƒbƒ`‚ð’ñ‹Ÿ‚µ‚Ä‚¨‚èA‚±‚ê‚É‚æ‚Á‚Ä -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Ƃ̂ł«‚é bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚¨‚æ‚уT[ƒo‚ð -쬂·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B–{ƒLƒbƒg‚Ɋ܂܂ê‚éƒpƒbƒ`‚Í BIND 9.0.0 ‚É -‘΂·‚é‚à‚̂ł·Bƒ\[ƒX‚͈ȉº‚Ìꊂ©‚çƒ_ƒEƒ“ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

The mDNkit provides a bind9 patch that can be used to generate bind9 resolvers and servers that can support multilingual domain names. The patch in this kit is for BIND 9.0.0. The source can be downloaded from the following page. - -

-

- -

bind8 ƒ\[ƒX‚Ì“üŽè

-

Obtaining the bind8 source

- -

dnsproxy ‚ð—˜—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg—p‚Å‚«‚邿‚¤‚É‚·‚邽‚߂ɂÍA -–¼‘O‰ðŒˆ‚ðs‚¤ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð 8bit ƒXƒ‹[‚É‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚Ü‚½ DNS ƒT[ƒo‚Å‚àA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é UTF-5 ‚â RACE ˆÈŠO‚ÌA -—Ⴆ‚Î UTF-8 ‚Ȃǂ̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚·‚邽‚߂ɂÍA -8bit ƒXƒ‹[‚Ì DNS ƒT[ƒo‚ðŽg—p‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

To use dnsproxy to enable client applications to support multilingual domain names, the resolver library that resolves names must be made 8-bit through. -Also, 8-bit through DNS servers must be used to enable a DNS server to use encodings other than UTF-5, RACE or other ASCII compatible encoding (as multilingual domain name encoding), for example, UTF-8. - -

mDNkit ‚ɂ͂±‚Ì‚½‚ß‚É -BIND 8.2.2-P7 ‚¨‚æ‚Ñ BIND 8.2.3-T6B ‚ð 8bit ƒXƒ‹[‚É‚·‚é -ƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·Bƒpƒbƒ`‚ð“K—p‚µ‚½ bind8 ‚ðŽg—p‚µ‚½‚¢ê‡‚É‚Í -‚ ‚ç‚©‚¶‚ß‚¢‚¸‚ê‚©‚̃o[ƒWƒ‡ƒ“‚̃\[ƒX‚ð—pˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -ƒ\[ƒX‚͈ȉº‚Ìꊂ©‚çƒ_ƒEƒ“ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

The mDNkit for that reason supplies a patch that makes BIND 8.2.2-P7 and BIND 8.2.3-T6B 8-bit through. To use bind8 with a patch installed, obtain the source of the desired version. -Sources can be downloaded from the following page. - -

- -

- -

Squid ƒ\[ƒX‚Ì“üŽè

-

Obtaining Squid

- -

Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚ÍA‚»‚̂܂܂ł͑½Œ¾Œê -ƒhƒƒCƒ“–¼‚ª“ü—Í‚³‚ê‚邯‚»‚ê‚ðƒGƒ‰[‚É‚µ‚Ä‚µ‚Ü‚¢AŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB -‚±‚Ì‚½‚ßmDNkit ‚É‚Í -Squid-2.3.STABLE3 ‚ð -8bit ƒXƒ‹[‚É‚·‚éƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·BSquid ‚𑽌¾ŒêƒhƒƒCƒ“–¼‚ÅŽg—p -‚µ‚½‚¢ê‡‚ɂ͂±‚̃\[ƒX‚à—pˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -

Squid, a Web cache server, cannot be used as is, because it will generate an error when entering multilingual domain names. -mDNkit comes with a patch that makes Squid-2.3.STABLE3 8-bit through. Obtain this source if you wish to make Squid support multilingual domain names. - -

- -


- -

”z•zƒ\[ƒX‚Ì“WŠJ

-

Extracting distribution source

- -

mDNkit ‚ÉŠÖ‚·‚éÅVî•ñ‚͈ȉº‚Ìꊂ©‚ç“üŽè‰Â”\‚ÅA -ÅV‚Ì”z•zƒ\[ƒX‚̃_ƒEƒ“ƒ[ƒh‚à‚Å‚«‚Ü‚·B -

The latest information regarding the mDNkit is available on the following site. The most recent distribution source can also be downloaded from the following page. -

- -

“üŽè‚µ‚½ mDNkit ‚Ì”z•zƒ\[ƒX‚ð“WŠJ‚µ‚Ü‚·B -”z•zƒ\[ƒX‚̃tƒ@ƒCƒ‹–¼‚ð mdnkit-X.Y.tar.gz‚Æ‚·‚邯 -ŽŸ‚̂悤‚É‚µ‚Ä“WŠJ‚Å‚«‚Ü‚·B -

Extracting the obtained mDNkit distribution source. -Distribution sources with file names such as mdnkit-X.Y.tar.gz are extracted as shown below. - -

-
-% gunzip mdnkit-X.Y.tar.gz
-% tar -xf mdnkit-X.Y.tar
-
-
- -

“WŠJ‚·‚邯Amdnkit-X.Y‚Æ‚¢‚¤ƒfƒBƒŒƒNƒgƒŠ‚ªì‚ç‚ê‚Ü‚·‚Ì‚ÅA -‚»‚±‚Ɉړ®‚µ‚Ä‚­‚¾‚³‚¢B -

When extracted, a mdnkit-X.Y directory is generated. Move to this directory. -

-
-% cd mdnkit-X.Y
-
-
- -

ˆÈ~‚Ìà–¾‚Å‚ÍA‚±‚̃fƒBƒŒƒNƒgƒŠ‚ð $MDNTOP ‚Æ‚¢‚¤–¼‘O‚Å -ŽQÆ‚µ‚Ü‚·BŠÂ‹«•Ï” $MDNTOP ‚ðݒ肵‚Ä‚¨‚­‚ƕ֗˜‚Å‚µ‚傤B -

In the following descriptions, this directory is referred to as $MDNTOP. Setting the environment variable $MDNTOP makes it easier to use. -

-
-% setenv MDNTOP `pwd`         (csh Œn‚̃VƒFƒ‹‚Ìê‡)
-% MDNTOP=`pwd`; export MDNTOP (sh Œn‚̃VƒFƒ‹‚Ìê‡)
-% setenv MDNTOP `pwd`         (for a csh system shell)
-% MDNTOP=`pwd`; export MDNTOP (for a sh system shell)
-
-
- -

- -


- -

configure ŽÀs

-

Running Configure

- -

‚Ü‚¸ mDNkit ‚Ì–{‘̂ł ‚éA -

First compile the following that form the major part of the mDNkit. -

    -
  • MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) -
  • MDN library (libmdn) -
  • DNS ƒvƒƒLƒVƒT[ƒo (dnsproxy) -
  • DNS proxy server (dnsproxy) -
  • ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ƒR[ƒh•ÏŠ·ƒc[ƒ‹ (mdnconv) -
  • Zone master file code conversion tool (mdnconv) -
  • runmdn ƒRƒ}ƒ“ƒh -
  • runmdn command -
- -

‚Ü‚¸AmDNkit ‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ -($MDNTOP ‚ÌŽw‚·ƒfƒBƒŒƒNƒgƒŠ) ‚Ɉړ®‚µA -configure ƒXƒNƒŠƒvƒg‚ðŽÀs‚µ‚Ü‚·B -configure ‚̓wƒbƒ_ƒtƒ@ƒCƒ‹‚⃉ƒCƒuƒ‰ƒŠ‚Ì—L–³‚È‚ÇAƒVƒXƒeƒ€–ˆ‚Ì -“Á’¥‚𒲂×AƒRƒ“ƒpƒCƒ‹ŠÂ‹«‚ð“KØ‚ÉÝ’è‚·‚邽‚߂̃c[ƒ‹‚Å‚·B -

First move to the mDNkit top directory (the directory that $MDNTOP points to) and execute the configure script. -Configure is a tool that checks the header file and libraries to learn the features of the system to configure the optimum compiler environment. - -

-
-% cd $MDNTOP
-% ./configure
-
-
- -

ƒVƒXƒeƒ€‚É iconv() ‚ª‘g‚Ýž‚Ü‚ê‚Ä‚¢‚ÄA‚©‚ƒRƒ“ƒpƒCƒ‹Žž‚É -“Á•ʂȃIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚È‚¢‚È‚çã‹L‚̂悤‚É‚È‚É‚àˆø”‚ðŽw’肹‚¸‚É -ŽÀs‚·‚ê‚΂悢‚̂ł·‚ªA‚»‚¤‚ł͂Ȃ¢ê‡AƒIƒvƒVƒ‡ƒ“‚âŠÂ‹«•Ï”‚Å -configure ‚Ì“®ì‚ð•Ï‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

When iconv() is included with the system and no special options are used during compilation, it can be executed like above without the need to specify any arguments. In other cases, operation of configure can be changed using options and environment variables. - -

configure ‚ÉŽw’è‚Å‚«‚éƒIƒvƒVƒ‡ƒ“‚Ì’†‚Å mDNkit ‚É -’¼ÚŠÖŒW‚·‚é‚à‚͈̂ȉº‚Ì’Ê‚è‚Å‚·B -

The following options that can be set by configure are directly related to mDNkit. - -

-
--with-iconv=LIB -
ƒVƒXƒeƒ€‚É iconv() ‚ª‘g‚Ýž‚Ü‚ê‚Ä‚¢‚È‚¢A‚ ‚é‚¢‚Í - ƒVƒXƒeƒ€‚Ì iconv() ‚ðŽg‚¢‚½‚­‚È‚¢‚Ȃǂ̗—R‚ÅV‚½‚É - iconv() ‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ê‡‚ÉA‚±‚̃IƒvƒVƒ‡ƒ“‚ð - —p‚¢‚Ä iconv() ‚̃‰ƒCƒuƒ‰ƒŠ‚ðŽw’肵‚Ü‚·BLIB ‚Å - ƒ‰ƒCƒuƒ‰ƒŠ‚ðŽw’肵‚Ü‚·Bƒ‰ƒCƒuƒ‰ƒŠƒtƒ@ƒCƒ‹‚ðƒtƒ‹ƒpƒX‚ÅŽw’è‚·‚é‚©A - ‚ ‚é‚¢‚Í C ƒRƒ“ƒpƒCƒ‰‚É—^‚¦‚éƒIƒvƒVƒ‡ƒ“‚ÌŒ`Ž®‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B
-When the iconv() package is installed either because it is not included with the system or because you do not wish to use the existing iconv() in the system, use this option to configure the iconv() library. Use LIB to specify the library. Use the full path to specify the library or specify it using an option format assigned to the C compiler. -

—Ⴆ‚ΑO€”õ‚É‹“‚°‚½ - iconv ‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ê‡AƒfƒtƒHƒ‹ƒg‚Å‚Í - /usr/local/lib ‚Ì libiconv ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚é‚Ì‚ÅA
-For example, when the iconv package mentioned in Preparations is installed, it is by default installed in libiconv of /usr/local/lib, so it is a good idea to make the following entry. -

-
---with-iconv="-L/usr/local/lib -liconv"
-
-
- ‚ÆŽw’è‚·‚ê‚΂悢‚Å‚µ‚傤Blibiconv ‚ª‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ÌŽž‚É‚ÍA - -R ƒIƒvƒVƒ‡ƒ“‚àŽw’肵‚Ä
-When libiconv is shared library, it may also be necessary to specify the -R option: -
-
---with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
-
-
- -
--with-utf8=NAME -
UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð iconv() ‚ÉŽw’è‚·‚éê‡A - mDNkit ‚̓fƒtƒHƒ‹ƒg‚Å UTF-8 ‚Æ‚¢‚¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼Ì‚ð - Žg—p‚µ‚Ü‚·B‚à‚µ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’è‚·‚é‚Ì‚É UTF-8 ˆÈŠO‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼Ì‚ðŽg—p‚·‚é•K—v‚ª‚ ‚ê‚ÎA‚±‚̃IƒvƒVƒ‡ƒ“‚Å NAME - ‚É‚»‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B‘O€”õ‚É‚ ‚°‚½ - iconv ‚̃pƒbƒP[ƒW‚ðŽg—p‚·‚éꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ÌŽw’è‚Í - •s—v‚Å‚·B
-When UTF-8 encoding is specified using iconv(), mDNkit uses UTF-8 to encoding names by default. If other names must be used when UTF-8 encoding is specified, specify the name in NAME using this option. This is not required when using iconvpackage mentioned in Preparations. -

- -

--with-race-prefix=PREFIX -
DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® - ‚Æ‚µ‚Ä RACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚Í - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì - 1‚‚ł·‚ªAƒhƒƒCƒ“–¼‚É“Á’è‚̃vƒŠƒtƒBƒbƒNƒX‚ð•t‚¯‚邱‚ƂŒÊí‚Ì - ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚邱‚Æ‚ª‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B‚±‚̃vƒŠƒtƒBƒbƒNƒX‚Í - Œ»Ý‚Ì - ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "bq--" ‚Å‚·‚ªA«—ˆ•ÏX‚³‚ê‚é - ‰Â”\«‚ª‚ ‚è‚Ü‚·B•ÏX‚³‚ꂽꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ - ƒvƒŠƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B -
RACE is proposed as one of the encoding system to be used for multilingual domain names in DNS protocols. RACE is an ASCII compatible encoding scheme and adds a specific prefix to the domain name to distinguish it from an ordinary ASCII domain name. This prefix is "bq--" in current Internet Drafts, but this may change in future. Use this option to enter the new prefix when a change is made. -

- -

--with-brace-suffix=SUFFIX -
RACE ‚Æ“¯‚¶‚­ DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚Æ‚µ‚Ä BRACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚à - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì - 1‚‚ł·‚ªARACE ‚ƈقȂèAƒhƒƒCƒ“–¼‚É“Á’è‚̃TƒtƒBƒbƒNƒX‚ð•t‚¯‚邱‚ƂŒÊí‚Ì - ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚邱‚Æ‚ª‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B‚±‚̃TƒtƒBƒbƒNƒX‚Í - Œ»Ý‚Ì - ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "-8q9" ‚Å‚·‚ªA«—ˆ•ÏX‚³‚ꂽ - ꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ƒTƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B
-Like RACE, BRACE is being proposed as an encoding scheme for multilingual domain names to be used in DNS protocols. It is also an ASCII compatible encoding scheme, but differs from RACE in that it adds a suffix to the domain name to distinguish from normal ASCII domain names. This suffix is "-8q9" in the current Internet Draft, but this may change in future. Use this option to enter the correct suffix when a change is made. -

- -

--with-lace-prefix=PREFIX -
-RACE ‚â BRACE ‚Æ“¯‚¶‚悤‚È ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚Ƃµ‚ÄLACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·BRACE ‚Æ“¯—lALACE ‚à’Êí‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚½‚߂ɓÁ•ʂȃvƒŠƒtƒBƒbƒNƒX‚ðŽg—p‚µ‚Ü‚·B - Œ»Ý‚̃Cƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "bq--" ‚Å‚·‚ªA«—ˆ‚±‚ꂪ•ÏX‚³‚ꂽꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ƒvƒŠƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B -

-

Like RACE and BRACE, LACE is another ASCII compatible encoding scheme and like, RACE, it adds a special prefix to distinguish it from ordinary ASCII domain names. -In the current Internet Draft the prefix is "bq--", but this may change in the future; if it does, use this option to enter the correct prefix. -

-

--enable-zld -
ZLD (Zero Level Domain) ‹@”\‚̃Tƒ|[ƒg‚ð’ljÁ‚µ‚Ü‚·B - ZLD ‚Æ‚Í DNS ƒT[ƒo‚Å—p‚¢‚ç‚ê‚éˆê•”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É‚¨‚¢‚ÄA’Êí‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚߂ɗp‚¢‚ç‚ê‚é“ÁŽê‚ȃhƒƒCƒ“–¼‚Å‚·B - DNS ƒvƒƒgƒRƒ‹ã‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä ZLD ‚ð•K—v‚Æ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð‘I‘ð‚µ‚È‚¯‚ê‚ÎA‚±‚̃IƒvƒVƒ‡ƒ“‚ÌŽw’è‚Í•s—v‚Å‚·B -

This option adds ZLD (Zero Level Domain) function support. ZLD is a special domain name used to differentiate standard ASCII domain names from multilingual domain names in some encodings used in a DNS server. This option need not be set unless ZLD is selected as the required encoding in a DNS protocol.

- -

‚È‚¨AZLD ‹@”\‚̃Tƒ|[ƒg‚Ì—L–³‚Í dnsproxy ‚â runmdn ‚ªÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚ÞÛ‚ÌU‚é•‘‚¢ (ZLD ‚ÌŽw’è‚𖳎‹‚·‚é‚©‚Ç‚¤‚©) ‚ɉe‹¿‚µ‚Ü‚·B - mDNkit ‚ª’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠŽ©‘Ì‚ÍA(Ý’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‚½‚߂̈ꕔ‚̃‚ƒWƒ…[ƒ‹‚𜂢‚Ä)‚±‚̃IƒvƒVƒ‡ƒ“‚É‚æ‚Á‚Ä“®ì‚ª•Ï‚í‚邱‚Ƃ͂Ȃ­Aí‚É ZLD ‚̈—‚ðs‚¤‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -

The support of the ZLD function affects operation (i.e. whether or not the ZLD setting is ignored) when configuration files are read in using the dnsproxy or runmdn command. The operation of the library provided by the mDNkit does not change with this option (except some modules used for reading in configuration files), but performs ZLD processing at all times.

- -

--sbindir=DIR -
DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/sbin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-Specifies the directory where dnsproxy, the DNS proxy server, is installed. /usr/local/sbin is the default directory.

-

--bindir=DIR -
ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ƒR[ƒh•ÏŠ·ƒc[ƒ‹ mdnconv ‚¨‚æ‚уNƒ‰ƒCƒAƒ“ƒg‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼ˆ—‚ð•t‰Á‚·‚é runmdn ƒRƒ}ƒ“ƒh‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-

-

Specifies the directory where the mdnconv command, a tool for converting zone master file code, and the runmdn command that adds multilingual domain name processing capability to a client, are installed. /usr/local/bin is the default directory.

-

--libdir=DIR -
dnsproxy ‚â mdnconv “™‚ªŽg—p‚·‚é mDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/lib ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-

Specifies the directory where the basic mDNkit and other basic libraries employed by dnsproxy or mdnconv are installed. -/usr/local/lib is the default directory.

-

-

--includedir=DIR -
mDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚ðŽg—p‚·‚é‚̂ɕK—v‚ȃwƒbƒ_ƒtƒ@ƒCƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/include ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-

Specifies the directory where the header file required for use of the basic mDNkit library is installed. /usr/local/include is the default directory.

- -

--sysconfdir=DIR -
DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ÌÝ’èƒtƒ@ƒCƒ‹A‚¨‚æ‚ÑmDNkit ‚̃Nƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/etc ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-

Specifies the directory where dnsproxy, the DNS proxy server, configuration files and shared client configuration files for mDNkit are installed. -/usr/local/etc is the default directory.

-

-

--mandir=DIR -
ƒIƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒx[ƒXƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/man ‚Å‚·BŽÀۂɂ͂±‚̃fƒBƒŒƒNƒgƒŠ‚̃TƒuƒfƒBƒŒƒNƒgƒŠ‚Ì man1 ‚â man8 ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

-

Specifies the base directory where the online manuals are installed. -/usr/local/man is the default directory. In fact, they are installed in its man1 or man8 subdirectory.

-

- -

‚±‚Ì‘¼‚É‚à configure ‚ɂ͂¢‚ë‚¢‚ë‚ȃIƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

A number of other options can be specified using configure.

-

-
-% ./configure --help
-
-
-

‚ÅŽw’è‰Â”\‚ȃIƒvƒVƒ‡ƒ“‚̈ꗗ‚ð•\ަ‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

The above is used to display a list of specifiable options.

- -

‚Ü‚½AŠÖŒW‚·‚éŠÂ‹«•Ï”‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

The related environment variables are as follows.

- -

-
CFLAGS -
CƒRƒ“ƒpƒCƒ‰‚É“n‚·ƒIƒvƒVƒ‡ƒ“‚ðŽw’肵‚Ü‚·B—Ⴆ‚ΊO•”‚Ìiconv ƒpƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚Æ‚«‚ÉAƒCƒ“ƒNƒ‹[ƒhƒtƒ@ƒCƒ‹iconv.h ‚ª•W€ˆÈŠO‚̃fƒBƒŒƒNƒgƒŠA—Ⴆ‚Î/usr/local/include ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽ‚Æ‚µ‚Ü‚·B‚±‚̂悤‚Èê‡‚É‚Í CFLAGS ‚É -I/usr/local/include ‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‹ï‘Ì“I‚É‚ÍAcsh Œn‚̃VƒFƒ‹‚Ìê‡‚É‚Í -

-

Specifies options passed to the C compiler. Let's assume that when an external iconv package is installed, iconv.h, the include file is installed in a directory other than the standard directory, for example, /usr/local/include. This requires that -I/usr/local/include be configured in CFLAGS. The following configuration is required in a csh shell.

-

-
-% setenv CFLAGS -I/usr/local/include
-
-
-

‚Ü‚½ sh Œn‚̃VƒFƒ‹‚Ìê‡‚É‚Í -

An sh shell requires the following configuration. -

-
-% CFLAGS=-I/usr/local/include; export CFLAGS
-
-
-

‚Æ‚µ‚Ü‚·B -

CFLAGS ‚Í‚±‚Ì‘¼‚É‚à C ƒRƒ“ƒpƒCƒ‰‚ÌÅ“K‰»ƒIƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚邽‚߂ɂàŽg‚¦‚Ü‚·BCFLAGS ‚É -O ‚ðŽw’è‚·‚ê‚ÎÅ“K‰»‚ ‚è‚ŃRƒ“ƒpƒCƒ‹‚³‚ê‚Ü‚·B -

CFLAGS can be used in other situations to specify the optimum C compiler options. When -O is specified in CFLAGS compilation is optimized. -

- -

configure ‚ðŽÀs‚·‚邱‚Ƃɂæ‚èA‚ ‚È‚½‚̃VƒXƒeƒ€ŠÂ‹«‚ɇ‚킹‚Ä’²®‚³‚ꂽ Makefile ‚»‚Ì‘¼‚̃tƒ@ƒCƒ‹‚ª¶¬‚³‚ê‚Ü‚·B -

When configure is executed, Makefile and other files are generated and adapted to your system environment. -

- -


- -

ƒRƒ“ƒpƒCƒ‹

-

Compile

- -

configure ŽÀs‚É‚æ‚Á‚ÄAƒVƒXƒeƒ€ŠÂ‹«‚ɇ‚Á‚½ Makefile ‚ª¶¬‚³‚ê‚Ä‚¢‚é‚Ì‚ÅAƒRƒ“ƒpƒCƒ‹‚̓gƒbƒvƒfƒBƒŒƒNƒgƒŠ($MDNTOP ‚ÌŽw‚·ƒfƒBƒŒƒNƒgƒŠ) ‚Åmake ƒRƒ}ƒ“ƒh‚ðŽÀs‚·‚邾‚¯‚Å‚·B -

Since configure generates a Makefile tailored to the system environment, all that compile needs to do is to execute the make command in the top directory (the directory pointing to $MDNTOP). -

-
-% make
-
-
- -

- -


- -

ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹

-

Installing Files

-

ƒRƒ“ƒpƒCƒ‹‚ªI—¹‚µ‚½‚çAŽÀsƒtƒ@ƒCƒ‹‚Ȃǂ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚¢‚Ü‚·B -ƒCƒ“ƒXƒg[ƒ‹‚Ì‘O‚ɃX[ƒp[ƒ†[ƒU‚ɂȂÁ‚Ä‚­‚¾‚³‚¢B -

When compiling is finished, install the executable files and other files. Become a superuser prior to installation.

-

-
-% su
-
-
- -

‚ ‚Æ‚Í make install ‚ðŽÀs‚·‚ê‚ÎA•K—v‚ȃtƒ@ƒCƒ‹‚ªƒVƒXƒeƒ€‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

Then execute make install to install all the required files in the system.

-

-
-# make install
-
-
- -

ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚éƒtƒ@ƒCƒ‹‚͈ȉº‚Ì’Ê‚è‚Å‚·B -

The following files will be installed.

-

-
ŽÀsƒtƒ@ƒCƒ‹ -

Executable files -
ˆÈ‰º‚ÌŽÀsƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

The following executable files will be installed. -
-
dnsproxy -
DNS ƒvƒƒLƒVƒT[ƒo‚Å‚·B -
The DNS proxy server.

-

mdnconv -
ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹—p‚̃R[ƒh•ÏŠ·ƒc[ƒ‹‚Å‚·B -
The code conversion tool for zone master files.

-

runmdn -
ƒNƒ‰ƒCƒAƒ“ƒg‚ðăRƒ“ƒpƒCƒ‹‚·‚邱‚ƂȂµ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ‹@”\‚ð•t‰Á‚·‚éƒRƒ}ƒ“ƒh‚Å‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
This command adds, without the need for recompiling, the capability to resolve multilingual domain names to clients. It is installed in /usr/local/bin by default.

-

-

dnsproxy ‚ÍAƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/sbin‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Íconfigure ‚Ì --sysconfdirƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

dnsproxy is installed in /usr/local/sbin by default. If you wish to change the installation location, use the configure --sysconfdir option. -

mdnconv ‚¨‚æ‚Ñ runmdn ‚ÍAƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Í configure ‚Ì --bindirƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

-

mdnconv and runmdn are installed in /usr/local/bin by default. If you wish to change the installation location, use the --bindir option.

-

ƒIƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹

-

On-line manuals

-

ˆÈ‰º‚̃Iƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

The following on-line manuals will be installed.

-
dnsproxy. -
DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -

The dnsproxy, a DNS proxy server, manual

-

mdnconv.1 -
ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹—p‚̃R[ƒh•ÏŠ·ƒc[ƒ‹ mdnconv ‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -

The manual for mdnconv, a zone master file code conversion tool

-

runmdn.1 -
runmdn ƒRƒ}ƒ“ƒh‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -

The runmdn command manual

-

mdnres.conf.5 -
ƒNƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹ mdnres.conf ‚̃Iƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚Å‚·B -

The on-line manual for mdnres.conf, a shared client configuration file -
-

ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/man/man8 (dnsproxy.8)A/usr/local/man/man1 (mdnconv.1Arunmdn.1)A/usr/local/man/man5 (mdnres.conf.5)‚É‚»‚ꂼ‚êƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

These manuals are by default installed in /usr/local/man/man8 (dnsproxy.8), /usr/local/man/man1 (mdnconv.1, runmdn.1) and /usr/local/man/man5 (mdnres.conf.5), respectively.

- ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure ‚Ì --mandir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

-

To change the location of installation, use the --mandir option of configure.

-

Ý’èƒtƒ@ƒCƒ‹ -
ˆÈ‰º‚ÌÝ’èƒtƒ@ƒCƒ‹‚ ‚é‚¢‚Í‚»‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

Configuration files -

The following configuration files and sample files will be installed.

-

-
dnsproxy.conf -
DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ÌÝ’èƒtƒ@ƒCƒ‹‚ÌÝ’è—á‚ð‹Lq‚µ‚½ƒTƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚Å‚·B - ‚±‚̃tƒ@ƒCƒ‹‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éꇂɂÍAã‘‚«‚µ‚Ä‚µ‚Ü‚í‚È‚¢‚悤‚É dnsproxy.conf.sample ‚Æ‚¢‚¤–¼‘O‚ŃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ÉŠÖ‚µ‚Ä‚Í DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

This sample file describes setup examples for the configuration file for dnsproxy, the DNS proxy server. -If this file has already been installed, it is installed under the name dnsproxy.conf.sample so as not to overwrite the previous file. -Refer to DNS Proxy Server Configuration for information on how to set it up.

-

mdnres.conf.sample -
ƒNƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹ mdnres.conf ‚ÌÝ’è—á‚ð‹Lq‚µ‚½ƒTƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚Å‚·B -

This sample file describes setup examples for mdnres.conf, a shared client configuration file.

-

‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ÉŠÖ‚µ‚Ä‚ÍmDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

Refer to the mDNkit resolver configuration for information on how to set it up.

-

-

‚¢‚¸‚ê‚àƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/etc ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure ‚Ì--sysconfdir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

-

Both files are by default installed in /usr/local/etc. To change the installation location, use the --sysconfdir option.

-

ƒ‰ƒCƒuƒ‰ƒŠ -
ˆÈ‰º‚̃‰ƒCƒuƒ‰ƒŠ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

Libraries -
The following libraries will be installed.

-

-
libmdn -
dnsproxy ‚â mdnconv “™‚̃Rƒ}ƒ“ƒh‚ªŽg—p‚µ‚Ä‚¢‚émDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚·B -

A basic mDNkit library that employs dnsproxy, mdnconv and other commands. -

libmdnres -
runmdn ƒRƒ}ƒ“ƒh‚É‚æ‚Á‚ăNƒ‰ƒCƒAƒ“ƒg‚É“®“I‚ÉƒŠƒ“ƒN‚³‚ê‚郉ƒCƒuƒ‰ƒŠ‚Å‚·B -

A library dynamically linked to a client using the runmdn command. -
-

‚¢‚¸‚ê‚̃‰ƒCƒuƒ‰ƒŠ‚àƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/lib ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Íconfigure ‚Ì --libdirƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

-

Both libraries are by default installed in /usr/local/lib. To change the installation location, use configure with the --libdir option.

-

ƒwƒbƒ_ƒtƒ@ƒCƒ‹ -
libmdn ‚̃wƒbƒ_ƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/include ‚̉º‚É mdn ‚Æ‚¢‚¤ƒfƒBƒŒƒNƒgƒŠ‚ªì‚ç‚êA‚»‚̉º‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure‚Ì--includedir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

Header file -
Installs the libmdn header file. -This file is by fault installed in the mdn directory under /usr/local/include. -To change the installation location, use the --includedir option in configure. - -
- -

- -


- -

bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

-

Applying and Installing the bind9 Patch

-

“WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì$MDNTOP/patch/bind9/bind-9.0.0-patch ‚ªBIND 9.0.0 ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚ð•t‰Á‚·‚éƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯AŽŸ‚̂悤‚ɂȂè‚Ü‚·B -

$MDNTOP/patch/bind9/bind-9.0.0-patch in extracted source is the patch that adds multilingual domain name processing functionality to BIND 9.0.0. -Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description.

-

    -
  1. BIND 9.0.0 ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ(README ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -

    Move to the BIND 9.0.0 source top directory (the directory that contains the README file). -

    -
    -% cd /somewhere/.../bind-9.0.0
    -
    -
    -
  2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -

    Use the patch command to apply the patch to the source. -

    -
    -% patch -p0 < $MDNTOP/patch/bind9/bind-9.0.0-patch
    -
    -
    -
- -

ƒpƒbƒ`‚ð“–‚Ä‚é‚ÆAƒgƒbƒvƒfƒBƒŒƒNƒgƒŠ‚É README.mdnkit ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ªì‚ç‚ê‚Ü‚·BƒRƒ“ƒpƒCƒ‹‚Ì‘O‚É‚±‚̃tƒ@ƒCƒ‹‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢B -

When the patch is applied a README.mdnkit file is created in the top directory. Read this file before compilation.

- -

‚»‚Ì‚ ‚ƃRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚¢‚Ü‚·B•û–@‚Í README.mdnkit -‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚É‚à‘‚©‚ê‚Ä‚¢‚Ü‚·‚ªAconfigure ƒRƒ}ƒ“ƒh‚ÌŽÀsŽž‚É--with-mdn ƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚邱‚Æ‚ð–Y‚ê‚È‚¢‚Å‚­‚¾‚³‚¢B -‚±‚̃IƒvƒVƒ‡ƒ“‚ð‚‚¯‚È‚¢‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚Í•t‰Á‚³‚ê‚Ü‚¹‚ñB -

After this perform compilation and installation. Refer to README.mdnkit for instructions. As stated in this file, be sure to add the --with-mdn option when executing the configure command. Unless this option is added, capability to process multilingual domain names will not be added. - -

-
-% ./configure --with-mdn
-
-
- -

bind9 —p‚̃pƒbƒ`‚Í mDNkit ‚Ì–{‘Ì (“Á‚Ƀ‰ƒCƒuƒ‰ƒŠ‚ƃwƒbƒ_ƒtƒ@ƒCƒ‹) ‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚邱‚Æ‚ð‘O’ñ‚Æ‚µ‚Ä‚¢‚Ü‚·B‚µ‚½‚ª‚Á‚ÄA‚±‚Ìì‹Æ‚ÍmDNkit –{‘̂̃Cƒ“ƒXƒg[ƒ‹I—¹Œã‚ÉŽÀs‚µ‚Ä‚­‚¾‚³‚¢B -

The bind9 patch assumes that the major portion of the mDNkit (especially, the library and header file) is already installed. Consequently, this operation should be performed after the mDNkit has been installed. -

- -


- -

bind8 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

-

Adding and Installing the bind8 patch

-

“WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì$MDNTOP/patch/bind8/bind-8.2.2-P7-patch ‚ªBIND 8.2.2-P7 ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`A‚Ü‚½$MDNTOP/patch/bind8/bind-8.2.3-T6B-patch ‚ªBIND 8.2.3-T6B ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯AŽŸ‚̂悤‚ɂȂè‚Ü‚·B -

The $MDNTOP/patch/bind8/bind-8.2.2-P7-patch in the extracted source is the 8-bit through patch for BIND 8.2.2-P7 and the $MDNTOP/patch/bind8/bind-8.2.3-T6B-patch is the 8-bit through patch for BIND 8.2.3-T6B. -Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description. -

    -
  1. BIND 8.2.2-P7 ‚ ‚é‚¢‚Í BIND 8.2.3-T6B ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ(src ‚Æ‚¢‚¤ƒTƒuƒfƒBƒŒƒNƒgƒŠ‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -

    Move to the top directory of the BIND 8.2.2-P7 or BIND 8.2.3-T6B source (the directory containing the src subdirectory). -

    -
    -% cd /somewhere/.../bind-8.2.2-P7
    -
    -
    -
  2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -

    Use the patch command to apply the patch to the source. -

    -
    -% patch -p0 < $MDNTOP/patch/bind8/bind-8.2.2-P7-patch
    -
    -
    -
- -

ƒpƒbƒ`‚ð“–‚Ä‚½‚çA‚ ‚Ƃ͒Êí‚Ì BIND ‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚É‚µ‚½‚ª‚Á‚ăRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹•û–@‚Í BIND ‚̃\[ƒX’†‚Ì src/INSTALL ‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B -

When the patch has been applied, perform compilation and installation according to the standard BIND installation procedure. Refer to src/INSTALL for installation instructions. - -

bind8 —p‚̃pƒbƒ`‚Í BIND ‚ð’P‚É 8ƒrƒbƒgƒXƒ‹[‚É‚·‚邾‚¯‚ÅAmDNkit ‚̃‰ƒCƒuƒ‰ƒŠ“™‚ÍŽg—p‚µ‚Ü‚¹‚ñB‚µ‚½‚ª‚Á‚Ä mDNkit –{‘̂Ƃ͓Ɨ§‚ɃRƒ“ƒpƒCƒ‹‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

-

The bind8 patch only makes BIND 8-bit through and does not use the mDNkit library. Thus it can be compiled and installed separately from the mDNkit. -


- -

squid —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

-

Applying and Installing the squid Patch

- -

“WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì $MDNTOP/patch/squid/squid-2.3.STABLE3-patch ‚ªSquid 2.3.STABLE3 ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯AŽŸ‚̂悤‚ɂȂè‚Ü‚·B -

The $MDNTOP/patch/squid/squid-2.3.STABLE3-patch in the extracted source is the 8-bit through patch for Squid 2.3.STABLE3. -Information on how to apply the patch is appended to the beginning of the file, but the following is a brief description. -

    -
  1. Squid 2.3.STABLE3 ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ (READMEƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -

    Move to the top directory of Squid 2.3.STABLE3 source (the directory containing the README file). -

    -
    -% cd /somewhere/.../squid-2.3.STABLE3
    -
    -
    -
  2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -

    Use the patch command to apply the patch to the source. -

    -
    -% patch -p1 < $MDNTOP/patch/squid/squid-2.3.STABLE3-patch
    -
    -
    -
- -

ƒpƒbƒ`‚ð“–‚Ä‚½‚çA‚ ‚Ƃ͒Êí‚Ì Squid ‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚É‚µ‚½‚ª‚Á‚ăRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹•û–@‚ÍSquid ‚̃\[ƒX‚Ɋ܂܂ê‚é INSTALL ƒtƒ@ƒCƒ‹‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B -

When the patch has been applied, perform compilation and installation according to the standard Squid install procedure. Refer to INSTALL in the Squid source for installation instructions. -

Squid —p‚̃pƒbƒ`‚à bind8 —p‚̃pƒbƒ`‚Æ“¯—l’P‚É 8ƒrƒbƒgƒXƒ‹[‚É‚·‚邾‚¯‚ÅAmDNkit ‚̃‰ƒCƒuƒ‰ƒŠ“™‚ÍŽg—p‚µ‚Ü‚¹‚ñB -‚µ‚½‚ª‚Á‚Ä mDNkit –{‘̂Ƃ͓Ɨ§‚ɃRƒ“ƒpƒCƒ‹‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B

Both the Squid and the bind8 patches only add 8-bit through capability and does not use any mDNkit library or other function. -Thus they can be compiled and installed independently from the mDNkit. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/proxyconfig.html b/contrib/idn/mdnkit/doc/en/guide/proxyconfig.html deleted file mode 100644 index 434391e5b4..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/proxyconfig.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - -Configuring DNS Proxy Server - - - -

DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

-

Configuring DNS Proxy Server

-

-DNS Proxy Server dnsproxy‚ðŽg‚¤‚É‚ÍA‚¢‚­‚‚©‚Ìî•ñ‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚±‚Å‚ÍA‚±‚ê‚ç‚Ìî•ñ‚ÌÝ’è•û–@‚ƈӖ¡‚Æ‚ðà–¾‚µ‚Ü‚·B -

-A number of data items have to be set up to allow use of dnsproxy, the DNS Proxy Server. This draft describes the procedure for setup, and its significance. -

    -
  • ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹ -
  • Configuration file -
  • ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^ -
  • Configuration data - - -
    -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹

    -

    Configuration File

    -
    -

    -Ý’èî•ñ‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‹LÚ‚³‚ê‚Ü‚·BƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍAdnsproxy‚Ì‹N“®Žž‚ɃRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -The setup data can be found in the configuration file. The configuration file can be specified on the command line when dnsproxy starts up. -

    -
    -% dnsproxy -config <config-file>
    -
    -
    -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚ɂ̓fƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍAƒfƒBƒŒƒNƒgƒŠ -When not specified on the command line, the default configuration file can be used. The default configuration file is found under the following directory. -
    -    /usr/local/etc
    -
    -‚̉º‚Ì -
    -    dnsproxy.conf
    -
    -‚Å‚·BƒfƒBƒŒƒNƒgƒŠ‚ÍAmDNkit쬎ž‚É -
    -    configure --sysconfdir=DIR
    -
    -This directory can be specified when the mDNkit is generated. -
    -    configure --sysconfdir=DIR
    -
    -‚ÅŽwަ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -Ú‚µ‚­‚ÍAƒCƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -configure ŽÀs‚Ì -‚Æ‚±‚ë‚ð‚²——‚­‚¾‚³‚¢B - -For details, refer to the installation guide: -Configure and implement - -
    -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^

    -

    -


    -

    Configuration Data

    -

    -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅAˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B -

    -The configuration file is a text file and specifies the following configuration data. - -

    -
    listen
    -

    -dnsproxy‚ªƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì—v‹‚ðŽó•t‚¯‚éƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

    -Specifies the network address and port number dnsproxy needs in order to receive client queries. -

    -    listen <address>
    -
    -<address>‚͈ȉº‚Ì‚¢‚¸‚ê‚©‚ÌŒ`Ž®‚ÅŽwަ‚µ‚Ü‚·B
    -<address> specifies one of the following formats. -
    - - - - -
    <IP address>:<port number>
    :<port number>
    <IP address>
    -
    -È—ª‚³‚ê‚½ê‡‚É‚Í -
    -When these settings are omitted, the following settings are used. -
    - - - -
    IP address0.0.0.0# INADDR_ANY
    port number53
    -
    -‚ªŽg—p‚³‚ê‚Ü‚·B -
    - -

    -dnsproxyŒo—R‚ÅDNSƒT[ƒo‚ðŽg—p‚·‚éƒNƒ‰ƒCƒAƒ“ƒg‚ÍA‚±‚±‚ÅŽwަ‚µ‚½ƒAƒhƒŒƒXAƒ|[ƒg‚ðDNSƒT[ƒo‚Æ‚µ‚Äݒ肵‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̓|[ƒg”Ô†‚ð•ÏX‚Å‚«‚È‚¢‚à‚Ì‚ª‘½‚¢‚̂Ń|[ƒg”Ô†‚̓fƒtƒHƒ‹ƒg‚Ì53‚ð‚»‚Ì‚Ü‚ÜŽg‚Á‚½•û‚ª‚æ‚¢‚Å‚µ‚傤B -

    -

    -Clients that use a DNS server via dnsproxy will set up the address and port of the DNS server here. -Because most clients cannot usually change the port number, it is best to use default port number 53. -

    - -

    forward
    -

    -dnsproxy‚ªADNS—v‹‚ð“]‘—‚µA‰ž“š‚ðŽó‚¯Žæ‚é–{—ˆ‚ÌDNSƒT[ƒo‚̃lƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

    -dnsproxy transfers DNS queries and specifies the network address and port number of the DNS server that is to receive the response. - -

    -    forward <address> [ bind4compat ]
    -
    -<address>‚ÌŒ`Ž®‚Íã‚Ìlisten‚Ì‚à‚̂Ɠ¯‚¶‚Å‚·B -<address>The address format is the same as that of listen above. -

    -ƒIƒvƒVƒ‡ƒ“‚Ì bind4compat‚ªŽwަ‚³‚ꂽꇂɂÍAUDP‚ÅƒŠƒNƒGƒXƒg‚ð“]‘—‚·‚鎞‚ÉAƒ\[ƒXƒAƒhƒŒƒX‚Æ‚µ‚ÄAlisten‚ÅŽwަ‚³‚ꂽƒAƒhƒŒƒX/ƒ|[ƒg‚ðŽg—p‚µ‚Ü‚·B -‚±‚ê‚Íbind4‚É‚ ‚é‹@”\‚ÅAUDPƒ|[ƒg‚ɂ‚¢‚ẴAƒNƒZƒX§ŒÀ‰º‚ʼn^—p‚·‚邱‚Æ‚ð‘z’肵‚½‚à‚̂ł·B‚±‚̃IƒvƒVƒ‡ƒ“‚ªŽwަ‚³‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA1024ˆÈã‚̃\[ƒXƒ|[ƒg‚ªŽg—p‚³‚ê‚Ü‚·B -

    -

    -When the option bind4compat is specified, the address and port specified by listen is used as the source address when a request is transferred using UDP. -This is a bind4 function and assumes that UDP port access is limited. A source port greater than 1024 is used when this option is not specified. -

    - -

    log-file
    -

    -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -

    -Specifies the name of the file that contains the execution log output by dnsproxy. -

    -    log-file <path>
    -
    -ƒƒOƒtƒ@ƒCƒ‹–¼‚ÍAˆÈ‰º‚̃Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÅŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -—¼•ûŽw’肵‚½ê‡‚ɂ̓Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è‚̂ق¤‚ª—D悳‚ê‚Ü‚·B -
    -
    -The log file name can also be specified using the following command line option. -When both are entered, the command line option takes precedence. -
    -    dnsproxy -logfile <address>
    -
    -Žw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA -
    -
    -When not specified, -
    -    /tmp/dnsproxy.log
    -
    -‚É‘‚«ž‚Ü‚ê‚Ü‚·B -

    - -is written. -

    -‚È‚¨AŽÀsƒƒO‚Íí‚É’Ç‹L‚³‚ê‚Ä‚¢‚«‚Ü‚·‚Ì‚ÅA“K“–‚ÈŽž‚ðŒ©Œv‚ç‚Á‚ÄÁ‚·‚±‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

    -Note that the execution log is added to continuously and should be deleted from time to time. -

    -‚Ü‚½Adnsproxy ‚Ƀnƒ“ƒOƒAƒbƒvƒVƒOƒiƒ‹ (SIGHUP) ‚ð‘—‚é‚Æ‚¢‚Á‚½‚ñƒƒOƒtƒ@ƒCƒ‹‚ð•‚¶‚ÄAÄ“xƒI[ƒvƒ“‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·BƒƒOƒtƒ@ƒCƒ‹‚ðƒA[ƒJƒCƒu‚·‚éꇂɕ֗˜‚È‹@”\‚Å‚·B -

    -

    -When a hangup signal (SIGHUP) is sent to dnsproxy, it temporarily closes the log file and then reopens it. This is a convenient command when the log file is to be archived. -

    - -

    log-level
    -

    -ƒƒO‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B -

    -Specifies the log level. -

    -    log-level <level>
    -
    -ƒŒƒxƒ‹‚Æ‚µ‚ÄŽw’è‚Å‚«‚é’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -
    - -The following log level values can be specified. -
    -
    -
    none
    ˆê؃ƒO‚ð‹L˜^‚µ‚Ü‚¹‚ñBƒƒO‚ª‚È‚¢‚Æ•s‹ï‡‚ª¶‚¶‚½ê‡‚Ì -Œ´ˆö‰ð–¾‚ª“‚­‚È‚è‚Ü‚·‚Ì‚ÅA‚Å‚«‚ê‚΂±‚̃Œƒxƒ‹‚ÍŽw’肵‚È‚¢‚Å‚­‚¾‚³‚¢B -
    none
    No log is recorded. The absence of a log file makes it very difficult to identify the cause of a problem. If possible do not use this level. -
    fatal
    ’v–½“I‚ȃGƒ‰[‚ª¶‚¶‚½‚Æ‚«‚ɂ̂݃ƒO‚ðo—Í‚µ‚Ü‚·B -
    fatal
    Outputs a log only when a fatal error occurs. -
    warn
    ŒxƒƒbƒZ[ƒW‚É‚àƒƒO‚É‹L˜^‚µ‚Ü‚·B‚±‚ꂪƒƒOƒŒƒxƒ‹‚ð -Žw’肵‚È‚©‚Á‚½‚Æ‚«‚̃fƒtƒHƒ‹ƒg‚Å‚·B -
    warn
    Records warning messages in the log. This is the default used when no log level is specified. -
    trace
    ŽÀsƒgƒŒ[ƒXƒƒbƒZ[ƒW‚àƒƒO‚Éo—Í‚µ‚Ü‚·B -‚±‚̃Œƒxƒ‹‚ðŽw’è‚·‚邯 dnsproxy ‚Ì“®ì‚ª‚©‚È‚èÚׂɋL˜^‚³‚ê‚é‚Ì‚ÅáŠQ‚ª”­¶‚µ‚½ê‡‚ÌŒ´ˆö‹†–¾‚ɂ͕֗˜‚Å‚·‚ªA‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚̂ŕ’i‚ÍŽw’肵‚È‚¢•û‚ª‚æ‚¢‚Å‚µ‚傤B -
    trace
    Outputs execution trace messages in the log. -This level provides a detailed record of dnsproxy operation, which is helpful in determining the cause of a problem. As it records a large amount of data, it is best not used during normal operation. -
    -
    -

    - -

    client-translation
    -

    -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽwަ‚µ‚Ü‚·B -
    -Specifies the domain name encoding to be used on the client side. -

    -    client-translation <ZLD> <Encoding>
    -
    -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ÌꇂɂÍA’ÊíAƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂȂÁ‚Ä‚¢‚Ü‚·B‚»‚̂悤‚Èê‡‚É‚Í -
    -For clients that do not support multilingual domain names, the local encoding of the client is normally used. In such a case, the following format is used without <ZLD>. -
    -    client-translation . Shift_JIS
    -
    -‚Æ‚¢‚¤Œ`‚ÅA<ZLD>–³‚µ‚ÅŽwަ‚µ‚Ü‚·B -

    - -

    -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚É‚æ‚Á‚Ä‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð’Êí‚ÌDNS‚Å‚àŽó•t‚¯‚ç‚ê‚éŒ`Ž®‚ɃGƒ“ƒR[ƒh‚µ‚ÄA‚»‚ê‚ð’Êí‚̃hƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚邽‚ß‚É ZLD (Zero Level Domain) ‚ð•t‰Á‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B‚»‚̂悤‚ÈꇂɂÍA•t‰Á‚³‚ê‚éZLD‚Æ‚»‚ÌŽž‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚ð‘Ήž•t‚¯‚邱‚Ƃɂæ‚èA‘¼‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼Žè–@‚ÌDNSƒT[ƒo‚ð—˜—p‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

    -Some multilingual domain name schemes encode multilingual domain names in the client into a format that normal DNS can accept, and adds ZLD (Zero Level Domain) to distinguish it from regular domain names. Since the added ZLD and the domain name encoding scheme are interrelated, they can also be used with DNS servers using a different multilingual domain name scheme. - -

    -    client-translation .i-dns.net UTF-5
    -
    - -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÍAZLD ‚ªˆÙ‚È‚Á‚Ä‚¢‚ê‚ÎA•¡”Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -Multiple domain name encoding schemes can be used in a client if each scheme has its own unique \ZLDs. -

    -‚È‚¨AmDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ÌŽw’è‚͂ł«‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·BZLD ‚ðŽg—p‚·‚邽‚߂ɂÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹‚ÌÛAconfigure ƒRƒ}ƒ“ƒh‚É --enable-zld‚ðŽw’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚ÌŽw’è‚ð‚¹‚¸‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍAZLD ‚ÌŽw’è‚Í‚·‚ׂ˳ދ‚³‚ê‚Ü‚·B -

    -Note that ZLD cannot be specified in the default setting of mDNkit. To use a ZLD, --enable-zld must be specifed using the configure command when mDNkit is compiled. -All ZLD settings are ignored unless this specification is made when mDNkit is compiled. -

    -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA‚±‚±‚ÅŽwަ‚µ‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA“à•”“I‚ÉŽg—p‚³‚ê‚éUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ü‚·B -‚»‚µ‚ÄAŒãq‚̳‹K‰»AƒT[ƒo‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªs‚È‚í‚ê‚ÄDNSƒT[ƒo‚É‘—o‚³‚ê‚Ü‚·B‚Ü‚½ADNSƒT[ƒo‚©‚ç‚̉ž“š‚ÍA‹t‚ÉŒ³‚̃Gƒ“ƒRƒf[ƒBƒ“ƒO‚É–ß‚³‚ê‚ăNƒ‰ƒCƒAƒ“ƒg‚ɕԂ³‚ê‚Ü‚·B -

    -The encoding of domain names in the DNS query sent by the client is converted to UTF-8 encoding that is used internally. -Then normalization (described below) and conversion to server side encoding are performed after which the data is sent to the DNS server. The response from the DNS server is converted back to the original encoding and returned to the client. -

    -‚±‚±‚ÅŽw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAmDNkit•t‘®‚Ìlibmdn‚¨‚æ‚ÑŽg—p‚·‚éiconv ƒ‰ƒCƒuƒ‰ƒŠ‚Ɉˑ¶‚µ‚Ü‚·B -iconv ƒ‰ƒCƒuƒ‰ƒŠ‚É‚æ‚Á‚ÄAƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ªˆÙ‚È‚Á‚Ä‚¢‚邱‚Æ‚ª‚ ‚è‚Ü‚·‚Ì‚ÅAƒ‰ƒCƒuƒ‰ƒŠ‚̃}ƒjƒ…ƒAƒ‹‚ð‚²——‚ɂȂÁ‚ÄŽg—p‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B -

    -The encoding names that can be used here depend on libmdn and iconv, mDNkit libraries. -Since the encoding name used differs with the iconv library that is employed, check the library manual to confirm the encoding names that can be used. In addition to the enconding provided by iconv, libdmn supports the following encoding schemes recommended for multilingual DNS. -

    - - - - - - - - - - - - - -
    UTF-5draft-jseng-utf5-01.txt
    RACEdraft-ietf-idn-race-02.txt
    BRACEdraft-ietf-idn-brace-00.txt
    LACEdraft-ietf-idn-lace-00.txt
    -
    -‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -

    - -

    alternate-encoding -
    -

    DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽƒhƒƒCƒ“–¼‚ªƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚Å‚«‚È‚¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -

    Specifies the encoding to be used in place of local encoding when the domain name returned by the DNS server contains characters that cannot be converted to the local encoding of the client. -

    -    alternate-encoding <Encoding>
    -
    -Žw’è‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í•K‚¸uASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE)v‚ƌĂ΂ê‚éA•ÏŠ·Œ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš (‰p”Žš‚¨‚æ‚уnƒCƒtƒ“) ‚¾‚¯‚©‚ç‚È‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚½‚Æ‚¦‚Î ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚ðŽw’è‚·‚éꇂɂ͎Ÿ‚̂悤‚ÉŽw’肵‚Ü‚·B -

    The specified encoding must be ASCII compatible encoding (ACE) so that the result of conversion is in an encoding that contains only characters that can be used in traditional domain names (alphanumerics and hyphens). For example, this is how to specify RACE, one of the ASCII compatible encoding schemes. -

    -    alternate-encoding RACE
    -
    -

    - -

    normalize
    -

    -ƒhƒƒCƒ“–¼‚̳‹K‰»Žè–@‚ðŽw’肵‚Ü‚·B -

    -Specifies the normalization scheme to be used for domain names. -

    -    normalize <scheme> ...
    -
    -³‹K‰»Žè–@‚Í•¡”Žw’è‰Â”\‚ÅA¶‘¤‚©‚燂ɓK—p‚³‚ê‚Ä‚¢‚«‚Ü‚·B -

    -A number of normalization schemes can be indicated, and they will be used in order from left to right. -

    -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA“à•”“I‚ÉŽg—p‚³‚ê‚éUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽã‚ÅA‚±‚±‚ÅŽwަ‚µ‚½³‹K‰»‚ª“K—p‚³‚ê‚Ü‚·B -Žg—p‰Â”\‚ȳ‹K‰»Žè–@‚ÍmDNkit‚Ɋ܂܂ê‚élibmdn‚Ɉˑ¶‚µ‚Ä‚¢‚Ü‚·B -‚ǂ̂悤‚ȳ‹K‰»Žè–@‚ª‚ ‚é‚©‚ÍAlibmdn‚̃}ƒjƒ…ƒAƒ‹‚Ìnormalizer ƒ‚ƒWƒ…[ƒ‹‚É‹LÚ‚³‚ê‚Ä‚¢‚Ü‚·B -

    -When the domain name in the DNS query sent by the client has been converted to UTF-8 encoding for internal use, they are normalized according to the normalization scheme specified here. -The normalization schemes that can be used depends on the libmdn in the mDNkit. -Available normalization schemes are described in the Normalizer Module in the libmdn manual. -

    - -

    server-translation
    -

    -DNSƒT[ƒo‘¤‚̃hƒƒCƒ“–¼ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚ðŽwަ‚µ‚Ü‚·B -

    -Specifies domain name encoding schemes to be used on the DNS server side. -

    -    server-translation <ZLD> <Encoding>
    -
    -

    ZLD‚ª•s—v‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚ÎAÈ—ª’l‚Æ‚µ‚Ä'.'‚ðŽwަ‚µ‚Ü‚·B - -

    Specifies '.' as the default when ZLD is not necessary. - -

    -    server-translation . UTF-8
    -
    -ZLD‚ð•K—v‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ÍAZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Ì—¼•û‚ðŽw’肵‚Ü‚·B -
    -
    -When ZLD is required, specify both ZLD and the encoding name. -
    -    server-translation .i-dns.net UTF-5
    -
    -Žw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA‘Oo‚Ìclient-translation‚ł̂à‚̂Ɠ¯‚¶‚Å‚·B -

    - -The encoding that can be specified is the same as for client-translation above. -

    - -

    user-id -
    -

    dnsproxy ‚ª“®ì‚·‚郆[ƒU‚ðŽw’肵‚Ü‚·B -

    Specifies user that uses dnsproxy. -

    -    user-id <user>
    -
    -

    ’ÊíAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ðŽg—p‚·‚邽‚߃‹[ƒgŒ ŒÀ‚Å‹N“®‚³‚¹‚é•K—v‚ª‚ ‚è‚Ü‚·‚ªAƒ‹[ƒgŒ ŒÀ‚̂܂܂œ®ì‚³‚¹‚é‚̂̓ZƒLƒ…ƒŠƒeƒBãD‚Ü‚µ‚­‚ ‚è‚Ü‚¹‚ñB‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ð쬂µ‚½‚ ‚ƃT[ƒrƒX‚ðŠJŽn‚·‚é‘O‚ÉŽw’肵‚½ƒ†[ƒU‚ÌŒ ŒÀ‚Å“®‚­‚悤‚ɂȂè‚Ü‚·B -

    Normally, dnsproxy must be started up with root permission to use a privileged port, but continued use of root permission is not recommended for security reasons. With this specification, dnsproxy runs under the user's control with a privileged port before start of service. -

    <user> ‚ɂ̓†[ƒU–¼‚ ‚é‚¢‚̓†[ƒU ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -

    <user> allows you to specify user name or user ID number. -

    -

    group-id -
    -

    dnsproxy ‚ª“®ì‚·‚éƒOƒ‹[ƒv‚ðŽw’肵‚Ü‚·B -

    -

    Specifies group that uses dnsproxy. -

    -    group-id <user>
    -
    -

    -‚±‚ê‚Í user-id ƒGƒ“ƒgƒŠ‚ÆŽ—‚Ä‚¢‚Ü‚·‚ªAƒ†[ƒU‚Ì‘ã‚í‚è‚ɃOƒ‹[ƒv‚ðŽw’è‚·‚é“_‚ªˆÙ‚È‚è‚Ü‚·B -

    -This resembles the user-id entry, but differs from it in that it specifies a group in place of the user. - -

    <group> ‚ɂ̓Oƒ‹[ƒv–¼‚ ‚é‚¢‚̓Oƒ‹[ƒv ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    <group> can be specified by a group name or group ID number. -

    -

    root-directory -
    -

    dnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B -

    Specifies the root directory used with dnsproxy. -

    -    root-directory <path>
    -
    -

    ‚±‚ê‚àƒZƒLƒ…ƒŠƒeƒB‘Îô‚̈ê‚‚ł·Bdnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ -‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚̃fƒBƒŒƒNƒgƒŠ‚ÌŠO‚ɂ̓AƒNƒZƒX‚Å‚«‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚̓T[ƒrƒX‚ðŠJŽn‚·‚é‘O‚ÉAchroot()ƒVƒXƒeƒ€ƒR[ƒ‹‚ð—p‚¢‚ÄŽw’肵‚½ƒfƒBƒŒƒNƒgƒŠ‚ðƒ‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚Æ‚µ‚Äݒ肵‚Ü‚·B -

    This, also, is a security measure. By specifying the root directory used with dnsproxy access cannot be made outside of this directory. -This specification causes dnsproxy to use chroot() system calls to set the specified directory as the root directory before starting service. - -

    <path> ‚ɂ̓‹[ƒg‚Æ‚µ‚Äݒ肵‚½‚¢ƒfƒBƒŒƒNƒgƒŠ–¼‚ðŽw’肵‚Ü‚·B -

    <path> specifies the name of the directory to be used as the root. - -

    - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/reference.html b/contrib/idn/mdnkit/doc/en/guide/reference.html deleted file mode 100644 index 061ab72808..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/reference.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - -mDNkit reference - - - - -

    ŽQl•¶Œ£

    -

    Reference Documentation

    - -

    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•ûŽ®‚Ì’ñˆÄAŠÖ˜A RFCAƒ\ƒtƒgƒEƒFƒA“™AmDNkit ‚ÉŠÖ˜A‚·‚éŽQl•¶Œ£‚ÌƒŠƒXƒg‚Å‚·B -

    Lists of references for recommended multilingual domain name schemes, related RFCs, software and mDNkit. -

    - -

    JPNIC ‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚é‹Zp‰ðà‚̃y[ƒW‚É‚ ‚éŠÖ˜AŽ‘—¿‚à‡‚í‚¹‚Ä‚²——‚­‚¾‚³‚¢B -

    Also refer to Related documents on the page that describes the technology behind JPNIC multilingual domain names. -

     

    - -


    - -

    JPNIC

    -
    -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚é‹Zp‰ðà -
    Description of Multilingual Domain Name Technology -
    mDNkit ‚È‚ÇAJPNIC ‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚銈“®‚ðЉ‚½ƒy[ƒWB -
    -
    A Web page that introduces the mDNkit and other JPNIC multilingual domain name activities. - - -

     

    - -

    RFCs

    -
    -
    DOMAIN NAMES - CONCEPTS AND FACILITIES (RFC1034) -
    DNS ‚ÌŠT—v‚ðŽ¦‚µ‚½ RFCB

    -

    RFC providing an overview of DNS.

    -

    DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION (RFC1035) -
    DNS ƒvƒƒgƒRƒ‹‚ð‹K’肵‚½ RFCB

    -

    RFC prescribing DNS protocols.

    -

    UTF-7, A Mail-Safe Transformation Format of Unicode (RFC1642) -
    Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-7 ‚ɂ‚¢‚ĉðà‚µ‚½RFCB

    -

    RFC describing UTF-7, a Unicode/ISO10646 encoding scheme.

    -

    UTF-8, a transformation format of Unicode and ISO 10646 (RFC2044) -
    Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-8 ‚ɂ‚¢‚ĉðà‚µ‚½ - RFCB

    -

    RFC describing UTF-8, a Unicode/ISO10646 encoding scheme.

    -

    The Report of the IAB Character Set Workshop held 29 February - 1 March, 1996 (RFC2130) -
    ƒCƒ“ƒ^[ƒlƒbƒgã‚ł̃Lƒƒƒ‰ƒNƒ^ƒZƒbƒg‚ÌŽd—l‚ÉŠÖ‚·‚éƒ[ƒNƒVƒ‡ƒbƒv‚Ì ƒŒƒ|[ƒgB

    -

    Report on workshop regarding character set specifications to be used on the Internet.

    -

    IETF Policy on Character Sets and Languages (RFC2277) -
    ƒCƒ“ƒ^[ƒlƒbƒgã‚ł̃Lƒƒƒ‰ƒNƒ^ƒZƒbƒg‚¨‚æ‚ÑŒ¾Œê‚ÌŽw’è‚ÉŠÖ‚·‚é IETF‚Ì•ûj‚ðŽ¦‚µ‚½ RFCB

    -

    RFC describing IETF policy on character sets and language specifications on the Internet.

    -

    Extension Mechanisms for DNS (EDNS0) (RFC2671) -
    DNS ƒvƒƒgƒRƒ‹‚ÌŠg’£•ûŽ®‚Å‚ ‚é EDNS0 ‚ð’è‹`‚µ‚½ RFCB

    -

    RFC defining EDNSO, an extension mechanism for DNS protocols.

    -

    UTF-16, an encoding of ISO 10646 (RFC2781) -
    Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-16 ‚ɂ‚¢‚ĉðà‚µ‚½ - RFCB

    -

    RFC describing UTF-16, a Unicode/ISO10646 encoding scheme.

    -

    A Tangled Web: issues of I18N, domain names, and the other Internet protocols (RFC2825) -
    ƒhƒƒCƒ“–¼‚âƒvƒƒgƒRƒ‹‚Ì‘½Œ¾Œê‰»‚ÉŠÖ‚·‚é–â‘è“™‚ðŽ¦‚µ‚½•¶‘B

    -

    Document describing problems related to multilingualization of domain names and protocols.

    -

    IAB Technical Comment on the Unique DNS Root (RFC2826) -
    DNS ‚̃‹[ƒg‚̃†ƒj[ƒN«‚ÉŠÖ‚·‚é•¶‘B -
    Document on unique DNS routes. - -
    - -

     

    - -

    ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg

    -

    Internet Drafts

    -
    -
    draft-ietf-idn-requirements-03.txt -
    IETF ‚Ì IDN ƒ[ƒLƒ“ƒOƒOƒ‹[ƒv‚É‚æ‚éA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚éŠeŽí‚Ì—vŒ (requirement) ‚ð‚܂Ƃ߂½•¶‘B

    -

    Document on various requirements regarding multilingual domain names compiled by the IETF IDN working group.

    -

    draft-ietf-idn-compare-01.txt -
    IETF ‚Ì IDN ƒ[ƒLƒ“ƒOƒOƒ‹[ƒv‚É‚æ‚éAŒ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é‚¢‚­‚‚©‚Ì•ûŽ®‚Ì”äŠr•¶‘B

    -

    Comparison of currently suggested systems by the IETF IDN working group

    -

    draft-ietf-idn-race-02.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® RACE ‚̃vƒƒ|[ƒUƒ‹B

    -

    Proposal for multilingual domain name encoding scheme RACE.

    -

    draft-ietf-idn-sace-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® SACE ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

    -

    Proposal for multilingual domain name encoding scheme SACE. - mDNkit does not currently support it.

    -

    draft-ietf-idn-brace-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® BRACE ‚̃vƒƒ|[ƒUƒ‹B

    -

    Proposal for multilingual domain name encoding scheme BRACE.

    -

    draft-ietf-idn-lace-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® LACE ‚̃vƒƒ|[ƒUƒ‹B

    -

    Proposal for multilingual domain name encoding scheme LACE.

    -

    draft-ietf-idn-utf6-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® UTF-6 ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

    -

    Proposal for multilingual domain name encoding scheme UTF-6. - mDNkit does not currently support it.

    -

    draft-ietf-idn-dude-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® DUDE ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

    -

    Proposal for multilingual domain name encoding scheme DUDE. - mDNkit does not currently support it.

    -

    draft-ietf-idn-idne-01.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚̃vƒƒ|[ƒUƒ‹BEDNS0 ‚ð—˜—p‚µAƒhƒƒCƒ“–¼‚Ì ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚Í UTF-8 ‚ðŽg—p‚·‚éB

    -

    Proposal for methods of implementing multilingual domain names. This system utilizes EDNS0 and UTF-8 for encoding domain names.

    -

    draft-ietf-idn-idnra-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—•ûŽ®‚̃vƒƒ|[ƒUƒ‹BƒAƒvƒŠƒP[ƒVƒ‡ƒ“AƒŠƒ]ƒ‹ƒoA - DNS ƒT[ƒo‚̃Cƒ“ƒ^ƒtƒF[ƒX‚ɂ‚¢‚Äq‚ׂç‚ê‚Ä‚¢‚éB

    -

    Proposal for processing multilingual domain names. It describes applications, resolvers and DNS server interfaces.

    - -

    draft-ietf-idn-nameprep-00.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‘Oˆ— (³‹K‰»“™) ‚̃vƒƒ|[ƒUƒ‹B

    -

    Proposal for preprocessing (normalization, etc.) to be used for multilingual domain names.

    - -

    draft-jseng-utf5-01.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® UTF-5 ‚̃vƒƒ|[ƒUƒ‹B

    -

    Proposal for UTF-5 multilingual domain name encoding scheme.

    - -

    draft-ietf-idn-udns-01.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ® (DNS ƒvƒƒgƒRƒ‹‚Ì•ÏXAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚Ç) ‚̃vƒƒ|[ƒUƒ‹BƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ͊î–{“I‚ÉUTF-8 ‚ðŽg—p‚·‚éB

    -

    Proposal for a multilingual domain name implementation system (DNS protocol changes, encoding, etc.). Basically, UTF-8 will be used for domain name encoding.

    - -

    draft-skwan-utf8-dns-04.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚̃vƒƒ|[ƒUƒ‹BƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É‚Í UTF-8 ‚ðŽg—p‚·‚éB

    -

    Proposal for a multilingual domain name implementation system. UTF-8 will be used for domain name encoding.

    - -

    draft-duerst-dns-i18n-02.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚ÉŠÖ‚·‚élŽ@‚ƃvƒƒ|[ƒUƒ‹B - ZLD (zero level domain) ‚Ì“±“ü‚È‚ÇB

    -

    Proposal and review of methods for implementing multilingual domain names. - Introduction of ZLD (zero level domain)

    - -

    draft-duerst-i18n-norm-04.txt -
    ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̳‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ä‚¢‚­‚‚©‚Ì’ñˆÄ‚ÅŽQÆ‚³‚ê‚Ä‚¢‚éUnicode Normalization Form C ‚ɂ‚¢‚Ă̕¶‘B -
    Document on Unicode Normalization Form C referred to as one normalization scheme for multilingual domain name in many drafts. - -
    - -

     

    - -

    ‚»‚Ì‘¼•¶‘

    -
    -
    Unicode Normalization Forms -
    Unicode •¶Žš—ñ‚̳‹K‰»•ûŽ®‚Å‚ ‚é Unicode Normalization Forms ‚ð’è‹`‚µ‚½•¶‘BForm CAForm DAForm KCAForm KD ‚ɂ‚¢‚Ä‘‚©‚ê‚Ä‚¢‚éB

    -

    Document defining Unicode Normalization Forms, a Unicode character string normalization scheme. It deals with Form C, D, KC and KD.

    - -

    Case Mappings -
    Unicode •¶Žš—ñ‚Ì‘å•¶Žš¬•¶Žš‚̕ϊ·•û–@‚â‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚ð‚µ‚È‚¢”äŠr‚Ì•û–@‚ɂ‚¢‚Äq‚ׂ½•¶‘B

    -

    Document that examines methods of converting Unicode upper-case and lower-case characters, as well as comparison methods that do not distinguish between upper-case and lower-case characters.

    - -

    UnicodeData.txt -
    Unicode ‚Ì•¶Žš‘®«‚ð‹Lq‚µ‚½ƒf[ƒ^ƒtƒ@ƒCƒ‹Bã‹LUnicode Normalization Forms ‚ȂǂŎg‚í‚ê‚éB

    -

    Data file recording Unicode character attributes. It is used in the Unicode Normalization Forms described above.

    - -

    UnicodeData File Format -
    ã‹L UnicodeData.txt ‚̃tƒ@ƒCƒ‹ƒtƒH[ƒ}ƒbƒg‚ð‹Lq‚µ‚½•¶‘B -
    Document recording file formats for UnicodeData.txt described above. - -
    - -

     

    - -

    ƒ\ƒtƒgƒEƒFƒA

    -

    Software

    -
    -
    ISC BIND -
    DNS ‚ÌŽÀ‘•‚Å‚ ‚é BIND 4.x, 8.x ‚̃y[ƒW

    -

    Web page for BIND 4.x, 8.x, DNS implementations

    -

    ISC BIND 9 -
    DNS ‚ÌŽÀ‘•‚Å‚ ‚é BIND 9.x ‚̃y[ƒW

    -

    Web page for BIND 9.x, a DNS implementation

    -

    Squid Web Proxy Cache -
    Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚̃y[ƒW

    -

    Web page for Squid, a Web cache server

    -

    libiconv -
    iconv ‚̃tƒŠ[‚ÈŽÀ‘•‚Å‚ ‚é libiconv ‚̃y[ƒW -
    Web page for libiconv, a free implementation of iconv -
    - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/resolvconfig.html b/contrib/idn/mdnkit/doc/en/guide/resolvconfig.html deleted file mode 100644 index b3b992e802..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/resolvconfig.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - -Configuring mDNkit resolver - - - - -

    mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

    -

    mDNkit Resolver Configuration

    - -

    mDNkit ‚ª’ñ‹Ÿ‚·‚éƒc[ƒ‹AƒRƒ}ƒ“ƒh‚Ì‚¤‚¿Adnsproxy ˆÈŠO‚Ì‚à‚ÌA‚‚܂è runmdn ‚Æ mdnconv ‚Í‹¤’Ê‚ÌÝ’èƒtƒ@ƒCƒ‹‚ðŽQÆ‚µ‚Ü‚·B -‚Ü‚½ bind9 ƒpƒbƒ`‚à“¯‚¶Ý’èƒtƒ@ƒCƒ‹‚ðŽQÆ‚µ‚Ü‚·B - -

    runmdn and mdnconv, commands and tools that the mDNkit provides in addition to dnsproxy, reference the shared configuration file. -The bind9 patch also references the same configuration file. -

    ‚±‚̃tƒ@ƒCƒ‹‚É‚Í mDNkit ‚ð—˜—p‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚ ‚é‚¢‚ÍƒŠƒ]ƒ‹ƒo‚ª•K—v‚Æ‚·‚é‚¢‚­‚‚©‚Ìî•ñ‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -—Ⴆ‚γ‹K‰»‚Ì•ûŽ®‚â DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚È‚Ç‚ð‚±‚Ìƒtƒ@ƒCƒ‹‚ÅŽw’肵‚Ü‚·B -‚±‚±‚Å‚ÍA‚±‚ê‚ç‚Ìî•ñ‚ÌÝ’è•û–@‚ƈӖ¡‚Æ‚ðà–¾‚µ‚Ü‚·B -

    A number of data items that the client or resolver needs, in order to be able to use the mDNkit, must be entered in this file. -For example, the normalization scheme and the domain name encoding scheme in the DNS protocol are specified in this file. -The procedure for entering this data, and its significance, are described below. - -

    ‚Ü‚½AƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì“®ì‚·‚郃P[ƒ‹î•ñ‚©‚çŽæ“¾‚µ‚Ü‚·B‚±‚ê‚ɂ‚¢‚Ä‚à‡‚í‚¹‚Äà–¾‚µ‚Ü‚·B -

    The local encoding used by the application is acquired from the locale information of the application. - -

    - -
    -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹

    -

    Configuration File

    -

    -mDNkit ‚ÌÝ’è‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‚æ‚Á‚Äs‚í‚ê‚Ü‚·B -mDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍA‚±‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚͂ƂȂè‚Ü‚·B -

    mDNkit is set up using the configuration file. -When mDNkit is compiled in the default setting, the path name of the configuration file becomes the following. -

    -
    -/usr/local/etc/mdnres.conf
    -
    -
    -ƒfƒBƒŒƒNƒgƒŠ•”•ªA‚‚܂è /usr/local/etc ‚ÍmDNkit ‚Ìݒ莞‚ɃIƒvƒVƒ‡ƒ“‚Å•ÏX‚ª‰Â”\‚Å‚·B -

    The directory, /usr/local/etc, can be changed using option when setting up the mDNkit. - -

    mDNkit ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚邯A‚±‚̃tƒ@ƒCƒ‹‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚ª(ƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚Ìê‡) ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

    When mDNkit is installed, a sample file of this file is installed (when the default setting is used). -

    -
    -/usr/local/etc/mdnres.conf.sample
    -
    -
    -‚±‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚É‚Íݒ耖ڂƂ»‚Ìà–¾‚ª‘‚©‚ê‚Ä‚¢‚Ü‚·‚Ì‚ÅAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹ì¬‚ÌŽQl‚É‚µ‚Ä‚­‚¾‚³‚¢B -

    This sample file contains the setting items and their descriptions. Use this information as reference in generating the configuration file. - -

    - -


    -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^

    -

    Configuration Data

    -

    -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅAˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B -

    -The configuration file is a text file, and specifies the following configuration data. - -

    - -
    server-encoding -
    -DNS ƒvƒƒgƒRƒ‹‚ªŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -

    Specifies the encoding used by a DNS protocol. -

    -server-encoding encoding -
    -encoding ‚ɃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŽw’肵‚Ü‚·B -encoding specifies the encoding name. - -
    -
    -
    [Ý’è—á] -
    [Setting example] -
    -
    -server-encoding RACE
    -server-encoding UTF-8
    -
    -
    -
    - -‚È‚¨AƒAƒvƒŠƒP[ƒVƒ‡ƒ“‘¤‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ƒP[ƒ‹‚É‚æ‚Á‚ÄŒˆ‚Ü‚é‚Ì‚ÅAclient-encoding ‚Æ‚¢‚¤ƒGƒ“ƒgƒŠ‚Í‚ ‚è‚Ü‚¹‚ñB -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÉŠÖ‚µ‚Ă͌ãq‚µ‚Ü‚·B -

    -The local encoding used by the application is determined by the locale so there are no client-encoding entries. -Local encoding is described in the Section below. - -

    server-zld -
    -ZLD ‚ðŽw’肵‚Ü‚·BZLD ‚Æ‚Í Zero Level Domain ‚Ì—ª‚ÅAserver-encoding ‚É UTF-5 ‚ȂǓÁŽê‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚½ê‡‚É•K—v‚ƂȂè‚Ü‚·BZLD ‚ɂ‚¢‚Ä‚ÍDNSƒT[ƒo‚ÌÝ’è‚ÌZLD ‚ÌŽw’è‚Ì‹Lq‚ªŽQl‚ɂȂé‚Å‚µ‚傤B -‚È‚¨AmDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚Í ZLD ‚ÍŽg‚¦‚¸A‚±‚̃Gƒ“ƒgƒŠ‚ðŽw’肵‚Ä‚à–³Ž‹‚³‚ê‚Ü‚·B -ZLD ‚ªŽg‚¦‚邿‚¤‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚·‚é•û–@‚ɂ‚¢‚Ă̓Cƒ“ƒXƒg[ƒ‹ƒhƒLƒ…ƒƒ“ƒg‚Ì--enable-zld ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -
    -Specifies ZLD. ZLD, which is short for Zero Level Domain, is required when UTF-5 or other special encoding is used in the server-encoding. Refer to ZLD Settings in DNS Server Setup for information on ZLD. -Note that when mDNkit is compiled in the default setting that ZLD cannot be used and that this entry will be ignored. -Refer to the Section --enable-zldin the Install for instructions on how to compile mDNkit so that ZLD can be used. - -
    -server-zld ZLD -
    -ZLD ‚ÅŽg—p‚·‚é ZLD ‚ðŽw’肵‚Ü‚·B

    -ZLD is used to specify ZLD. - -

    -
    -
    [Ý’è—á] -
    [Setting example] -
    -
    -server-zld zld.to.be.used
    -
    -
    -
    -

    - -

    normalize -
    -‚±‚̃Gƒ“ƒgƒŠ[‚łͳ‹K‰»‚Ì•û–@‚ðŽw’肵‚Ü‚·B -2 ‚ˆÈã‚̳‹K‰»‚Ì•û–@‚ªŽw’肳‚ꂽê‡A‡”Ô’Ê‚è (¶‚©‚ç‰E‚É) “K—p‚µ‚Ü‚·B -

    -This entry specifies the normalization scheme to be used. -When 2 or more normalization schemes are specified, this will apply in order from left to right. - -

    -normalize scheme... -
    -scheme ‚ų‹K‰»‚Ì•ûŽ®‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B -

    -scheme specifies the normalization scheme to be used. - -

    ³‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ĉȉº‚Ì‚à‚Ì‚ªŽw’è‚Å‚«‚Ü‚·B -

    The normalization schemes listed below can be specified. - -

    - - - - - - - - - - - - - - - - - - - - - - -
    ascii-lowercaseASCII ‚Ì‘å•¶Žš‚ð¬•¶Žš‚ɳ‹K‰»
    -Normalizes upper case ASCII as lower case
    ascii-uppercaseASCII ‚̬•¶Žš‚ð‘å•¶Žš‚ɳ‹K‰»
    -Normalizes lower case ASCII as upper case
    unicode-lowercaseUnicode ‚Ì‘å•¶Žš‚ð¬•¶Žš‚ɳ‹K‰»
    -Normalizes Unicode upper case as lower case
    unicode-uppercaseUnicode ‚̬•¶Žš‚ð‘å•¶Žš‚ɳ‹K‰»
    -Normalizes Unicode lower case as upper case
    unicode-form-cUnicode normalization form C
    unicode-form-kcUnicode normalization form KC
    ja-kana-fullwidth”¼ŠpƒJƒi•¶Žš‚ð‘SŠpƒJƒi•¶Žš‚ɳ‹K‰»
    -Normalizes half-width kana as full-width kana
    ja-alnum-halfwidth‘SŠp‰p”Žš‚¨‚æ‚у}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɳ‹K‰»
    -Normalizes full-width alphanumerics and minus symbol as half-width characters
    ja-compose-voiced-sound‘SŠp‚Ђ炪‚ȃJƒ^ƒJƒi‚Æ‚»‚ê‚É‘±‚­‘÷“_”¼‘÷“_‚ð1•¶Žš‚ɂ܂Ƃ߂鳋K‰»
    -Normalizes full-width hiragana, katakana with voicing and aspirating signs as one character.
    ja-minus-hack‘SŠpƒ}ƒCƒiƒX‹L†‚ðƒnƒCƒtƒ“ ('-') ‚ɳ‹K‰»
    -Normalizes full-width minus symbol as a hyphen ('-').
    ja-delimiter-hack‘SŠpƒsƒŠƒIƒh‚¨‚æ‚Ñ‹å“_‚𔼊p‚̃sƒŠƒIƒh ('.') ‚ɳ‹K‰»
    -Normalizes full-width periods and punctuation marks as half-width period ('.').
    -
    - -
    -
    -
    [Ý’è—á] -
    [Setting example] -
    -
    -normalize unicode-lowercase unicode-form-kc 
    -
    -
    -
    - -
    alternate-encoding -
    -‚±‚̃Gƒ“ƒgƒŠ[‚ł͑ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŒ`Ž®‚ðŽw’肵‚Ü‚·B - ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚ÍADNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒAƒvƒŠƒP[ƒVƒ‡ƒ“‘¤‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÉŽ¸”s‚µ‚½Žž‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚·B -—Ⴆ‚Γú–{Œê‚ðˆµ‚¤ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É DNS ƒT[ƒo‚©‚çŠØ‘‚̃nƒ“ƒOƒ‹•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ª•Ô‚³‚ꂽꇂɂÍA“ú–{Œê‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚Å‚«‚È‚¢‚Ì‚ÅA‘ã‚í‚è‚É‚±‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽŒ‹‰Ê‚ª“n‚³‚ê‚Ü‚·B -
    -This entry determines the alternate encoding format. - Alternate encoding is used in place of local encoding when a conversion from DNS protocol encoding to the local encoding on the application side fails. -For example, when a domain name that includes Korean characters is returned from a DNS server to an application that handles Japanese. Since the domain name cannot be converted to Japanese local encoding, it is converted to alternate encoding before the result is passed to the application. - -
    -alternate-encoding encoding -
    -encoding ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B -Enter the name of the alternate encoding in encoding. - -

    -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍAASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ­‚Ă͂Ȃè‚Ü‚¹‚ñB -

    -

    -The alternate encoding must be an ASCII-compatible encoding. -

    - -

    -
    -
    [Ý’è—á] -
    [Setting example] -
    -
    -alternate-encoding RACE
    -
    -
    -
    - -
    alias-file -
    -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃R[ƒhƒZƒbƒg–¼‚ðA•Ê–¼‚Æ‚µ‚ĒljÁ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -‚±‚±‚Å‚ÍA’ljÁ‚·‚é•Ê–¼‚Ì’è‹`ƒtƒ@ƒCƒ‹‚ւ̃pƒX–¼‚ðŽw’肵‚Ü‚·B -

    -The encoding code set name can be entered as an alias. -Here, we will enter the path name of the alias definition file to be added. - -

    -alias-file path -
    -path ‚É’è‹`ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’肵‚Ü‚·B -Enter the definition file path in path. - -
    -
    -
    [Ý’è—á] -
    [Setting example] -
    -
    -alias-file /some/where/mdnalias.txt
    -
    -
    -
    - -•Ê–¼‚Ì’è‹`ƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚Å‚ ‚èA1s‚É1‚‚¸‚•ʖ¼‚ð’è‹`‚µ‚Ü‚·BŠes‚ÌŒ`Ž®‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

    The alias definition file is a normal text file in which one alias is defined on each line. The line format is as follows. -

    -
    -<•Ê–¼>     <Œ³‚Ì–¼‘O>
    -<alias>     <original name>
    -
    -
    -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ <Œ³‚Ì–¼‘O> ‚Ì‘ã‚í‚è‚É <•Ê–¼> ‚ªŽg‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -<an alias> can be used instead of the encoding name <original name> - -
    - -
    -

    ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä

    -

    Local Encoding

    - -

    -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍAƒƒP[ƒ‹‚©‚ç„‘ª‚µ‚ÄŽ©“®”»’è‚·‚邽‚ßAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å‚ÍAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðÝ’è‚·‚éƒGƒ“ƒgƒŠ‚Í‚ ‚è‚Ü‚¹‚ñB -

    -There is no entry for setting local encoding in the configuration file because it is automatically determined by referencing the locale on the local machine. - -

    -‚½‚¾‚µAˆÈ‰º‚̂悤‚ȃP[ƒX‚̂Ƃ«‚ɂ͎©“®”»’肪‚Å‚«‚Ü‚¹‚ñB -

    -However, the following cases cannot be automatically sensed. - -

      -
    • setlocate ŠÖ”‚ðŽg—p‚µ‚Ä‚¢‚È‚¢ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðŽÀs‚µ‚½‚Æ‚« -
    • When an application that does not use the setlocate function is executed
    • C ƒƒP[ƒ‹‚̂܂܃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ðŽÀs‚µ‚½‚Æ‚« -
    • When an application is executed as a C locale -
    • ƒƒP[ƒ‹‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚̑Ήž‚ª‚í‚©‚ç‚È‚¢‚Æ‚« -
    • When the relationship between locale and enconding is not known -
    - -

    -‚±‚̂悤‚Èꇂɂ͊‹«•Ï” MDN_LOCAL_CODESET ‚ðÝ’è‚·‚邱‚Æ‚ÅAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌÝ’è‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -—Ⴆ‚΃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð EUC-JP ‚ÉÝ’è‚·‚éꇂɂÍA‚ ‚ç‚©‚¶‚ߎŸ‚̂悤‚ÈÝ’è‚ð‚µ‚Ä‚¨‚«‚Ü‚·B -

    -Specify the MDN_LOCAL_CODESET environment variable to set local encoding. For example, to set local encoding to EUC-JP, make the following setting beforehand. - -

    -
    -
    [Ý’è—á] -
    -
    -
    sh Œn‚̂Ƃ« -
    -
    -$ MDN_LOCAL_CODESET=EUC-JP
    -$ export MDN_LOCAL_CODESET
    -
    -
    csh Œn‚̂Ƃ« -
    -
    -% setenv MDN_LOCAL_CODESET EUC-JP
    -
    -
    -
    -
    - -

    Žw’è‚·‚é’l‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÅA‚±‚ê‚̓VƒXƒeƒ€‚Ìiconv() ŠÖ” (‚æ‚賊m‚É‚Í iconv_open()) ‚ªŽó‚¯•t‚¯‚é–¼‘O‚ÅŽw’肵‚Ü‚·B‚±‚Ì–¼‘O‚Í iconv ‚ÌŽÀ‘•‚É‚æ‚Á‚Ä‚»‚ꂼ‚êˆÙ‚È‚è‚Ü‚·‚Ì‚ÅA‹ï‘Ì“I‚È’l‚ɂ‚¢‚Ä‚Í iconv ‚̃hƒLƒ…ƒƒ“ƒg‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

    The value to be specified is a local encoding name that must be specified using a name that is accepted by the iconv() function in the system (or more precisely iconv_open()). This name differs with the iconv implementation, refer to the iconv document for details. - -

    ‚à‚µ‚ ‚È‚½‚ª’Pˆê‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žg—p‚µ‚Ä‚¢‚È‚¢‚̂ł ‚ê‚ÎA‚±‚̂悤‚ÈÝ’è‚ð .profile ‚â .cshrc “™‚É“ü‚ê‚Ä‚¨‚­‚±‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

    If you only use a single type of local encoding, it is recommended that you save this setting in .profile or .cshrc. - - diff --git a/contrib/idn/mdnkit/doc/en/guide/runmdn.html b/contrib/idn/mdnkit/doc/en/guide/runmdn.html deleted file mode 100644 index 276cec2d16..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/runmdn.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -runmdn - - - - -

    runmdn

    - - - - -
    -

    ŠT—v

    -

    Overview

    - -

    runmdn ‚Í bind4 ‚ ‚é‚¢‚Í bind8 ‚ðƒx[ƒX‚Æ‚µ‚½ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚Â Unix ƒNƒ‰ƒCƒAƒ“ƒg‚ðAăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B‹ï‘Ì“I‚É‚ÍA–¼‘O‰ðŒˆ—p‚Ì API (—Ⴆ‚Î gethostbyname) ‚ªƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO (EUC-JP “™) ‚Å•\Œ»‚³‚ꂽƒzƒXƒg–¼‚ðŽó‚¯•t‚¯‚邿‚¤‚ɂȂè‚Ü‚·B‚Ü‚½‚±‚ê‚ç‚Ì API ‚ª‘½Œ¾ŒêƒzƒXƒg–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ŕԂ·‚悤‚ɂȂè‚Ü‚·B -

    runmdn is a command that enables a Unix client with the bind4 or bind8 based resolver libraries to support multilingual domain names without recompiling. Specifically, the name-resolving API (for example, gethostbyname) accepts host names denoted in the local encoding (EUC-JP, etc.) of the application, and also returns multilingual host names in local encoding. - -

    runmdn ‚ðŽg—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒg‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚é•û–@‚ÍAmDNkit ‚ª’ñ‹Ÿ‚·‚é•û–@‚Ì’†‚ÅÅ‚àŽèŠÔ‚ª‚©‚©‚炸ŠÈ’P‚È‚à‚̂ł·‚ªAƒVƒXƒeƒ€‚É‚æ‚Á‚Ă͎g—p‚Å‚«‚È‚©‚Á‚½‚èAƒRƒ}ƒ“ƒh‚É‚æ‚Á‚Ă͌ø‰Ê‚ª‚È‚©‚Á‚½‚肵‚Ü‚·B‚±‚ê‚ç‚̧ŒÀ‚ÉŠÖ‚µ‚ĂͧŒÀŽ–€‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -

    Using runmdn to enable clients to support multilingual domain names is the easiest and least time-consuming of the methods provided by the mDNkit. However, it cannot be used with some systems and does not work with certain commands. See the Section Limitations for details. -

    - -


    -

    Ý’è

    -

    Setup

    - -

    runmdn ‚ðŽg—p‚·‚é‚É‚ÍAmDNkit ‚̃Nƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚Ì•û–@‚ðݒ肵‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚ÍmDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ð‚²——‚­‚¾‚³‚¢B -

    To use runmdn, the encoding and normalization schemes must be specified in the shared mDNkit client file. Refer to mDNkit Resolver Configuration for information on how to configure this file. - -

    ‚Ü‚½Arunmdn ‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ©“®“I‚É„‘ª‚µ‚Ü‚·‚ªA„‘ª‚ÉŽ¸”s‚·‚éê‡‚à‚ ‚è‚Ü‚·B‚»‚̂悤‚Èꇂ̑Έ•û–@‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ð‚²——‚­‚¾‚³‚¢B -

    runmdn automatically senses the local encoding used by an application, but this may sometimes fail. In such an event, refer to Local Encoding for procedures to deal with the situation. - -

    - -


    -

    Žg—p–@

    -

    Usage

    - -

    runmdn ‚ÌŽg‚¢•û‚͋ɂ߂ĊȒP‚ÅAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì‹N“®ƒRƒ}ƒ“ƒh‚Ìæ“ª‚ɃRƒ}ƒ“ƒh–¼ runmdn ‚ð‚‚¯‚邾‚¯‚Å‚·B -

    runmdn is very easy to use. All that has to be done is to append runmdn, the command name, to the beginning of the application startup command. - -

    -
    -% runmdn ƒRƒ}ƒ“ƒh [ˆø”...]
    -% runmdn command [argument...]
    -
    -
    - -

    —Ⴆ‚Î telnet ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ăzƒXƒguŽ„‚̉ïŽÐ.jpv‚ÉÚ‘±‚·‚é‚ɂ͎Ÿ‚̂悤‚É‚µ‚Ü‚·B -

    For example, to use the telnet command to connect to the host "Ž„‚̉ïŽÐ.jp", do as follows. - -

    -
    -% runmdn telnet Ž„‚̉ïŽÐ.jp
    -
    -
    - -
    -

    §ŒÀŽ–€

    -

    Limitations

    - -

    runmdn ‚ÍAmDNkit ‚ª’ñ‹Ÿ‚µ‚Ä‚¢‚é•û–@‚Ì’†‚ÅÅ‚àŽèŒy‚ɃNƒ‰ƒCƒAƒ“ƒg‚ª‘½Œ¾ŒêƒhƒƒCƒ“‚ðˆµ‚¦‚邿‚¤‚É‚·‚é‚à‚̂ł·‚ªA‚ǂ̂悤‚ȃNƒ‰ƒCƒAƒ“ƒg‚É‚à“K—p‚Å‚«‚é‚킯‚ł͂ ‚è‚Ü‚¹‚ñB -

    runmdn is the easiest method for enabling clients to support multilingual domain names of all the methods that the mDNkit provides. However, this method may not be applicable for some clients. - -

    runmdn ‚̓VƒXƒeƒ€‚ÌŽ‚‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\(ƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\) ‚ð—˜—p‚µAƒNƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽÀsŽž‚ÉAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚Ä‚¢‚郊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚̈ꕔ‚ÌŠÖ”‚𑽌¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‹@”\‚ðŽ‚½‚¹‚½ƒo[ƒWƒ‡ƒ“‚Ì‚à‚̂ƒu‚«Š·‚¦‚Ä‚µ‚Ü‚¤‚±‚Ƃɂæ‚Á‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðŽÀŒ»‚µ‚Ü‚·B’u‚«Š·‚¦‚éŠÖ”‚Í bind4 ‚¨‚æ‚Ñ bind8 ‚ðƒx[ƒX‚Æ‚·‚郊ƒ]ƒ‹ƒo‚ª“à•”‚ÅŽg—p‚µ‚Ä‚¢‚éŠÖ”‚Å‚·B -

    runmdn uses the dynamic link (a library pre-load function) of system-owned shared libraries to replace some of the functions of the resolver libraries linked to an application with versions with functions that can handle multilingual domain names to enable handling of multilingual domain names. The functions that are replaced are functions used in bind4- and bind8-based resolvers. - -

    ‚µ‚½‚ª‚Á‚Ä runmdn ‚ª“®ì‚·‚é‚ɂ͎Ÿ‚̂悤‚È‚¢‚­‚‚©‚̧ŒÀ‚ª‚ ‚è‚Ü‚·B -

    As a result, runmdn operation has the following limitations: -

      -
    1. ‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—p‚¢‚Ä‚¢‚é‚Ì‚ÅA‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªŽg—p‚Å‚«‚éƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñ -
    2. As shared library links are used, the system must be able to use shared libraries. -
    3. ŠÂ‹«•Ï” LD_PRELOAD ‚Ü‚½‚Í—ÞŽ—‚Ì‹@\‚É‚æ‚郉ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\‚ðŽ‚ÂƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñ -
    4. The system must have a preload function that operates with the use of LD_PRELOAD, an environment variable, or similar mechanism. -
    5. runmdn ‚Ì‘ÎۂƂȂéƒRƒ}ƒ“ƒh‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðƒXƒ^ƒeƒBƒbƒNƒŠƒ“ƒN‚µ‚Ä‚¢‚Ă͂Ȃè‚Ü‚¹‚ñ -
    6. runmdn can only be used for commands that link resolver libraries statically. -
    7. ƒVƒXƒeƒ€‚̃‰ƒCƒuƒ‰ƒŠ‚ª iconv() ŠÖ”‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚È‚¢ê‡AŠO•”‚̃‰ƒCƒuƒ‰ƒŠ‚ð—p‚¢‚邱‚ƂɂȂè‚Ü‚·‚ªA‚»‚̃‰ƒCƒuƒ‰ƒŠ‚à‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
    8. If the system library does not provide the iconv() function, an external library that does can be used, but it must be a shared library. -
    9. ƒVƒXƒeƒ€‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Í bind4 ‚ ‚é‚¢‚Í bind8 ƒx[ƒX‚Ì‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
    10. System resolver libraries must be based on bind4 or bind8. -
    11. ƒZƒLƒ…ƒŠƒeƒBã‚Ì——R‚©‚çˆê”Ê‚É setuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚̓vƒŠƒ[ƒh‹@”\‚ªŽg‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅAsetuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚Å‚ ‚Á‚Ă͂Ȃè‚Ü‚¹‚ñB -
    12. As setuid commands cannot use the preload function for security reasons, do not use such commands. -
    - -

    ‚±‚ê‚ç‚̧ŒÀ‚É‚æ‚è runmdn ‚ªŽg—p‚Å‚«‚È‚¢ê‡‚ÍAmDNkit ‚ª’ñ‹Ÿ‚·‚鑼‚Ì•û–@ (dnsproxy ‚â bind9 ƒpƒbƒ` ‚È‚Ç) ‚ð‚²—˜—p‚­‚¾‚³‚¢B -

    When these limitations make use of runmdn impossible, other methods provided by the mDNkit (for example, dnsproxy or bind9 patches) can be used. - - - diff --git a/contrib/idn/mdnkit/doc/en/guide/wrapper.html b/contrib/idn/mdnkit/doc/en/guide/wrapper.html deleted file mode 100644 index a03f5ea28f..0000000000 --- a/contrib/idn/mdnkit/doc/en/guide/wrapper.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - -mDN Wrapper - User's Guide - - - - -

    mDN Wrapper

    - - -

    - -


    - -

    ŠT—v

    -

    Overview

    - -

    -Windows ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂ɂÍAWindows ã‚̃Nƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚¨‚¢‚ÄA‰ðŒˆ‚µ‚悤‚Æ‚·‚é–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðADNS ƒT[ƒo‚ªŽó•t‚¯‚éŒ`Ž®‚Ì‚à‚̂ɕϊ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚ê‚ÍAWindows ã‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA‚«‚¿‚ñ‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃç‚È‚¢A‚Æ‚¢‚¤‚±‚Ƃł ‚èA–{—ˆ‚Í‚»‚ꂼ‚ê‚̃vƒƒOƒ‰ƒ€‚Ì쬎҂ªs‚È‚¤‚ׂ«‚±‚Ƃł·B -

    -To enable Windows to support multilingual domain names, the name encoding that client applications resolve must be converted to a format that DNS servers can accept. This requires accurate handling of multilingual domain names by Windows applications, which is basically the responsibility of each program developer. -

    -‚µ‚©‚µA•W€‚ªŒˆ‚Ü‚Á‚Ä‚¢‚È‚¢Œ»ó‚Å‚ÍAƒvƒƒOƒ‰ƒ€ì¬ŽÒ‚É‚±‚̂悤‚ȑΉž‚ðŠú‘Ò‚·‚é‚͖̂³—‚Ȃ̂ÅAŠù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚𑽌¾ŒêƒhƒƒCƒ“–¼‘Ήž‚³‚¹‚邽‚߂̃gƒŠƒbƒN‚ª•K—v‚ɂȂè‚Ü‚·BmDNkit‚Ɋ܂܂ê‚édnsproxyƒT[ƒo‚Í‚»‚Ì‚½‚߂̈ê‚‚̕û–@‚Å‚·B -‚±‚±‚Å‚ÍA‚à‚¤ˆê‚‚̕û–@AmDN Wrapper ‚ð’ñަ‚µ‚Ü‚·B -

    -However, as no standard is yet in place, this is too much to expect of program developers at this time. Therefore, a trick is needed so that existing applications will be able to support multilingual domain names. The dnsproxy server supplied with the mDNkit is one such tool. In this draft, we will introduce another tool, the mDN Wrapper. -

    -Windows ‚É‚¨‚¢‚ÄA‘½‚­‚Ìê‡AƒhƒƒCƒ“–¼‰ðŒˆ‚Ì—v‹‚ÍWINSOCK DLL‚É“n‚³‚ê‚Ü‚·B‚»‚±‚ÅAWINSOCK DLL ‚𑽌¾ŒêƒhƒƒCƒ“–¼‘Ήž‚Ì‚à‚̂ɒu‚«Š·‚¦‚Ä‚â‚ê‚ÎAŠù‘¶‚̃vƒƒOƒ‰ƒ€‚©‚ç‚Å‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

    -Queries to resolve domain names in Windows are often passed to WINSOCK DLL. By replacing WINSOCK DLL with one that supports multilingual domain names, it will be possible for existing programs to support multilingual domain names. -

    - -


    - -

    ƒZƒbƒgƒAƒbƒv

    -

    Setup

    - -

    -*’ˆÓ* -‚à‚µŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚Ì mDN Wrapper ‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éƒ}ƒVƒ“‚ÉV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍA‚Ü‚¸ƒo[ƒWƒ‡ƒ“ƒAƒbƒvŽž‚Ì’ˆÓ‚ð‚²——‚­‚¾‚³‚¢B -

    -

    -*Note:* -If an old version of mDN Wrapper is already installed, read the Precautions in Upgrading before installing the new version. -

    -mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚Í"setup.exe" ‚ðŽÀs‚µ‚Ü‚·BƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€‚ÍŽŸ‚̂悤‚Ȉ—‚ðs‚¢‚Ü‚·B -

    -Use "setup.exe" to install mDN Wrapper. The setup program does the following.

    -

    -
    ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ -
    -Installing files -
    -ƒfƒBƒŒƒNƒgƒŠu\Program Files\JPNIC\mDN WrappervƒZƒbƒgƒAƒbƒv‚Å•ÏX‰Â”\jˆÈ‰º‚ÉAmDN Wrapper ‚ð\¬‚·‚éƒtƒ@ƒCƒ‹‚ðƒRƒs[‚µ‚Ü‚·B -

    -Copy the file containing mDN Wrapper to the u\Program Files\JPNIC\mDN Wrappervican be changed at setup) directory. -

    - -

    ƒŒƒWƒXƒgƒŠ‚ÌÝ’è -
    -Registry Setup -

    -

    -HKEY_LOCAL_MACHINE\Software\JPNIC\MDN ˆÈ‰º‚É•K—v‚ȃŒƒWƒXƒgƒŠƒL[AƒŒƒWƒXƒgƒŠ’l‚ðì¬Aݒ肵‚Ü‚·BŽå‚È‚à‚͎̂Ÿ‚Ì’Ê‚è‚Å‚·B -

    -Create the required registry key and registry values under HKEY_LOCAL_MACHINE\Software\JPNIC\MDN. The major items are as follows. -

    -

    -
    Encoding REG_SZ -
    DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Å‚·B -ƒfƒtƒHƒ‹ƒg’l‚Í "RACE" ‚ÅA‚±‚ê‚ÍŒ»Žž“_‚ł̗L—ÍŒó•â‚Å‚ ‚éRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’è‚Å‚·B -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -An encoding name used on the DNS server side. -The default value is "RACE", which is currently the leading encoding scheme. -The encoding name can be changed using the configuration program. -

    - -

    Normalize REG_SZ -
    -ƒhƒƒCƒ“–¼‚̳‹K‰»‚Ì•ûŽ®‚Å‚·BŽg—p‚·‚鳋K‰»‚Ì–¼Ì (•¡”Žw’è‚·‚éꇂɂ̓Xƒy[ƒX‚Å‹æØ‚é) ‚ðŽw’肵‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í“ú–{ŒêƒhƒƒCƒ“–¼‚̳‹K‰»‚Æ‚µ‚Ä“K“–‚¾‚ÆŽv‚í‚ê‚é’l‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚±‚ê‚à ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -A domain name normalization scheme used to specify normalization names (multiple names must be separated by spaces). -It is set to a default value that is considered appropriate for normalization of Japanese domain names. -This value can also be changed using configuration program. -

    - -

    PerProg ƒL[ -
    PerProg key -
    -ƒvƒƒOƒ‰ƒ€–ˆ‚ÌÝ’è’l‚ðŠi”[‚·‚邽‚߂̃L[‚Å‚·B -‚±‚̉º‚ÉAƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ðƒL[‚Æ‚µ‚ăvƒƒOƒ‰ƒ€ŒÂ•Ê‚Ìݒ肪‹L˜^‚³‚ê‚Ü‚·Bݒ肳‚ê‚éî•ñ‚͈ȉº‚Ì“ñ‚‚ł·B

    -A key used to store values set for each program. Program specific setting is stored with its executable module name used as a key. The following two types of infomration is set.

    - -
    -
    - - - - - - -
    PerProg\<progname>\WhereREG_DWORD•ÏŠ·ˆÊ’u
    Conversion location
    PerProg\<progname>\EncodingREG_SZƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼
    Encoding name
    -

    -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í’ÊíƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚É‚æ‚Á‚Äݒ肳‚ê‚Ü‚·B -•ÏŠ·ˆÊ’u‚ÌŽw’è‚ÍA•W€ƒCƒ“ƒXƒg[ƒ‹‚ł͕s—v‚Å‚·B -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚Á‚½ê‡‚É‚ÍAƒŒƒWƒXƒgƒŠƒGƒfƒBƒ^‚Ŋ‹«‚ɇ‚킹‚ÄÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

    -The encoding name is normally specified by the configuration program. -The conversion location is not required for a standard installation. -When the program is installed in the system directory, the registry editor must be used to adjust the environment. -

    -

    -

    ƒAƒCƒRƒ“‚Ìì¬ -
    Creating Icons -

    -

    -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚̃AƒCƒRƒ“‚ð쬂µAƒXƒ^[ƒgƒƒjƒ…[‚É“o˜^‚µ‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ăRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ð‹N“®‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -Create a configuration program icon and place it in the Start menu. -This icon allows you to start up the configuration program. -

    -

    -ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚ÌuƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̒ljÁ‚Æíœv‚ÅAumDN Wrapperv‚ð‘I‘ð‚µ‚Äíœiu’ljÁ‚Æíœvƒ{ƒ^ƒ“j‚µ‚Ü‚·B -

    -To uninstall the program, select "mDN Wrapper" in Add/Remove Programs in the Control Panel and click the Add/Remove button. -

    - -


    - -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€

    -

    -

    Configuration Program

    -

    - -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð“Á’肵‚Ä mDN Wrapper ‚ð“K—p‚µ‚½‚èA“K—p‚ð‰ðœ‚·‚邽‚߂̃c[ƒ‹‚Å‚·B -

    -The configuration program is a tool for specifying applications that are to be wrapped or unwrapped. -

    -‹N“®‚·‚邯ˆÈ‰º‚̂悤‚ȉæ–Ê‚ª•\ަ‚³‚ê‚Ü‚·B -

    -

    -The screen shown below appears when the program is started. -

    - -

    -Configuration Startup -
    -

    -ƒŠƒXƒgƒ{ƒbƒNƒX‚É‚ÍA‚»‚ÌŽž“_‚Å mDN Wrapper ‚ª“K—p‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ª•\ަ‚³‚ê‚Ü‚·Bʼn‚ÉŽÀs‚µ‚½ê‡‚ɂ͋ó‚ɂȂÁ‚Ä‚¢‚Ü‚·B‰E‘¤‚̃{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èA‘€ì‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

    -The list box shows programs that mDN Wrapper is currently wrapping. -The box is blank when the program first starts. Press the buttons on the right to begin. - - -

    mDN Wrapper ‚Ì“K—p

    - -

    Using mDN Wrapper

    - - -ƒvƒƒOƒ‰ƒ€‚É mDN Wrapper ‚ð“K—p‚·‚é‚É‚ÍA"Wrap.."ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B -"Wrap.."ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƈȉº‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B -

    -Press the "Wrap.." button to wrap a program using mDN Wrapper. -Pressing the "Wrap.." button displays the following dialog box. -

    -

    -Configuration Wrap -
    -

    -ʼn‚ÉAmDN Wrapper ‚ð“K—p‚µ‚½‚¢ƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒtƒ@ƒCƒ‹–¼‚ðݒ肵‚Ü‚·B -’¼Ú“ü—Í‚·‚é‚©Aƒuƒ‰ƒEƒYƒ{ƒ^ƒ“‚Ńtƒ@ƒCƒ‹‚ð’T‚µ‚Ä‚­‚¾‚³‚¢B -

    -

    -First set the filename of the program that mDN Wrapper is to wrap. Enter the name directly or use the Browse button to find the file. -

    -

    -Configuration Browse -
    -

    -ŽŸ‚É‚»‚̃vƒƒOƒ‰ƒ€‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -’Êí‚ÍuDefaultv ‚Å‚©‚Ü‚¢‚Ü‚¹‚ñB -ƒvƒƒOƒ‰ƒ€‚ª‘Û‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É]‚Á‚Ä‚¢‚éꇂɂ̂ÝuUTF-8v ‚ðŽwަ‚µ‚Ü‚·B -

    -

    -Then, specify the local encoding of the program. -Select "Default" for the standard setting. -Select UTF-8 only if the program supports international encoding. -

    -

    -Configuration Encoding -
    -

    -ÅŒã‚É "Wrap" ƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚ÎA‚»‚̃vƒƒOƒ‰ƒ€‚ɑ΂µ‚ÄŽw’肳‚ꂽƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å mDN Wrapper ‚ª“K—p‚³‚ê‚Ü‚·B -“K—p‚³‚ꂽƒvƒƒOƒ‰ƒ€‚ÍAʼn‚̃EƒBƒ“ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚É”½‰f‚³‚ê‚Ü‚·B -

    -

    -Then press the Wrap button to use mDN Wrapper with the specified encoding for the selected program. -The wrapped program is displayed in the list box in the first window. -

    - -

    -Configuration Wrapped -
    - -

    mDN Wrapper ‚̉ðœ

    -

    Canceling use of mDN Wrapper

    - -ƒvƒƒOƒ‰ƒ€‚ɑ΂·‚é mDN Wrapper ‚Ì“K—p‚ð‰ðœ‚·‚é‚É‚ÍAƒŠƒXƒgƒ{ƒbƒNƒX‚ʼn𜂷‚éƒvƒƒOƒ‰ƒ€‚ð‘I‘ð‚µ‚ÄA"Unwrap.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B -ˆÈ‰º‚ÌŠm”F—p‚̃_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·‚Ì‚ÅAŠÔˆá‚¢‚ª‚È‚¯‚ê‚Î "Unwrap" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -

    -To cancel the use of mDN Wrapper for a program, select the program in the list box and click the Unwrap button. -The confirmation dialog box shown below is displayed. If this is correct, click the Unwrap button. -

    -

    -Configuration Unwrap -
    -

    -mDN Wrapper ‚Ì“K—p‚ª‰ðœ‚³‚ê‚邯A‚»‚̃vƒƒOƒ‰ƒ€‚Íʼn‚̃EƒBƒ“ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚©‚ç‚à휂³‚ê‚Ü‚·B -

    -When use of mDN Wrapper is canceled for a program, that program is no longer displayed in the first window list box. -

    -

    -Configuration Unwrapped -
    - -

    -"Unwrap All" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚Á‚ÄAŒ»Ý“K—p‚³‚ê‚Ä‚¢‚é‚·‚ׂẴvƒƒOƒ‰ƒ€‚ɑ΂µ‚Ä mDN Wrapper ‚Ì“K—p‚ð‰ðœ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B - -

    -Use the Unwrap All button to cancel use of mDN Wrapper for all currently selected programs. - -

    ƒƒOÝ’è

    -

    Log setting

    - -"Log.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚Á‚ăƒOƒŒƒxƒ‹‚⃃Oƒtƒ@ƒCƒ‹‚ðÝ’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‚±‚̃{ƒ^ƒ“‚ð‰Ÿ‚·‚ÆŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ªŒ»‚ê‚Ü‚·B -

    -Click the "Log.." button to set a log level or log file. -The dialog box shown below is displayed when this button is clicked. -

    -

    -Configuration Log -
    -

    -ƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì’†‚©‚ç‘I‚Ô‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

    -The following log levels can be selected. -

    -
    None
    ƒƒO‚ðˆêØo—Í‚µ‚Ü‚¹‚ñB‚±‚ꂪƒfƒtƒHƒ‹ƒg‚Å‚·B -
    None
    Outputs no log at all. This is the default setting. -
    Fatal
    ’v–½“IƒGƒ‰[‚Ì‚Ýo—Í‚µ‚Ü‚·B -
    Fatal
    Outputs a log only when a fatal error occurs. -
    Error
    ’v–½“I‚łȂ¢ƒGƒ‰[‚ào—Í‚µ‚Ü‚·B -
    Error
    Outputs a log for non-fatal as well as fatal errors. -
    Warning
    ŒxƒƒbƒZ[ƒW‚ào—Í‚µ‚Ü‚·B -
    Warning
    Also outputs warning messages. -
    Info
    ƒGƒ‰[ˆÈŠO‚Ìî•ñ‚ào—Í‚µ‚Ü‚·B -
    Info
    Also outputs other information, in addition to errors. -
    Trace
    ƒvƒƒOƒ‰ƒ€‚̃gƒŒ[ƒXî•ñ‚ào—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ð‘I‘ð‚·‚é‚Æ‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚̂ŋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B -
    Trace
    Also outputs program trace information. Note that a large amount of information is output when this level is selected. -
    -‚È‚¨A‚±‚̃ƒOƒŒƒxƒ‹‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚ªo—Í‚·‚郃O‚ɑ΂·‚é‚à‚̂ł·BmDN Wrapper Ž©‘Ì‚ªo—Í‚·‚郃O‚ɂ‚¢‚Ä‚ÍON/OFF ˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚邱‚Ƃ͂ł«‚¸ANone ‚ðŽw’è‚·‚ê‚΃Iƒt‚ÉA‚»‚êˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚ê‚΃Iƒ“‚ɂȂè‚Ü‚·B -

    -These log levels are for logs output by the mDN library. Because the mDN Wrapper log can only be set to "on" or "off," "None" turns off the log entirely (however, it is "on" in all other cases). -

    -ƒƒOƒtƒ@ƒCƒ‹‚ðŽw’è‚·‚邱‚Æ‚à‰Â”\‚Å‚·BƒfƒtƒHƒ‹ƒg‚Å‚Í mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ƒfƒBƒŒƒNƒgƒŠ‚Ì "mdn_wrapper.log" ‚ɂȂÁ‚Ä‚¢‚Ü‚·B -"Browse.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚΃uƒ‰ƒEƒY—p‚̃_ƒCƒAƒƒO‚ð—˜—p‚µ‚Ä‘I‘ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

    -A log file can also be specified. The default setting is mdn_wrapper log and is stored in the directory where mDN wrapper is installed. -Click the Browse button to select the file from the Browse dialog box. -

    -‚Ü‚½A‚±‚̃_ƒCƒAƒƒO‚ł̓ƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ðŒ©‚é‚±‚Æ‚ÆAƒƒOƒtƒ@ƒCƒ‹‚ð휂·‚邱‚Æ‚ª‰Â”\‚Å‚·B‚»‚ꂼ‚ê "View"A"Delete" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -"View" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƃƒ‚’ ‚ª‹N“®‚µ‚ÄAƒƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•\ަ‚µ‚Ü‚·B -

    -This dialog box can also be used to view and delete the log file. Use the View or Delete buttons to do this. -When the View button is clicked, NotePad opens displaying the contents of the log file. -

    -"OK" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƃ_ƒCƒAƒƒO‚Ìݒ肪—LŒø‚ɂȂè‚Ü‚·BÝ’è‚ð•Ï‚¦‚½‚­‚È‚¢ê‡‚É‚Í "Cancel" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -

    -Click the OK button to confirm the dialog settings. Click the Cancel button when none of the settings are to be changed. - -

    Ú׃pƒ‰ƒ[ƒ^Ý’è

    -

    Detailed Parameters Settings

    - -"Advanced.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èAŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B -‚±‚ê‚Í㋉ƒ†[ƒU‚Ì‚½‚߂̂à‚Ì‚ÅA“K؂ȃfƒtƒHƒ‹ƒg‚ªÝ’肳‚ê‚Ä‚¢‚é‚̂ŒÊ탆[ƒU‚ª•ÏX‚·‚é•K—v‚̂Ȃ¢‚悤‚ÈŠî–{“I‚ȃpƒ‰ƒ[ƒ^‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    - -Click the "Advanced.." button to display the dialog box shown below. -This is for experienced users; an appropriate default setting is provided for ordinary users to enable the change of basic parameters without the need for making detailed settings. -

    -

    -Configuration Advanced -
    -

    -ƒ_ƒCƒAƒƒOÅã•”‚̃pƒlƒ‹‚ŃvƒƒOƒ‰ƒ€‚ɑ΂·‚é mDN Wrapper ‚Ì“K—pƒ‚[ƒh‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‘I‘ð‚Å‚«‚é’l‚Æ‚»‚̈Ӗ¡‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

    -The appropriate mDN Wrapper mode can be set in the panel at the top of the dialog box. Settings and their meanings are listed below. -

    -
    Wrap both WINSOCK 1.1 and WINSOCK 2.0 -
    WINSOCK 1.1 ‚Æ 2.0 ‚Ì—¼•û‚̌ĂÑo‚µ‚ɂ‚¢‚Ä mDN Wrapper ‚ð“K—p‚µAƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¢‚Ü‚·B’Êí‚Í‚±‚̃‚[ƒh‚ÅŽg‚¦‚γ‚µ‚­“®‚­‚Í‚¸‚Å‚·B -
    Uses mDN Wrapper to convert and normalize domain name encoding for calls from both WINSOCK 1.1 and 2.0. Select this mode for normal operation. -
    Wrap only WINSOCK 1.1 -
    WINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Í mDN Wrapper ‚ð“K—p‚µ‚Ü‚·‚ªAWINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ă͓K—p‚µ‚Ü‚¹‚ñB -
    Uses mDN Wrapper only for calls from WINSOCK 1.1 but not from WINSOCK 2.0. - -
    Wrap only WINSOCK 2.0 -
    WINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Í mDN Wrapper ‚ð“K—p‚µ‚Ü‚·‚ªAWINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ă͓K—p‚µ‚Ü‚¹‚ñB -
    Uses mDN Wrapper only for calls from WINSOCK 2.0, but not for WINSOCK 1.0. - -
    Wrap only WINSOCK 2.0 if it exists. Otherwise wrap only WINSOCK 1.1 -
    WINSOCK 2.0 ‚ª‘¶Ý‚·‚ê‚Î WINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Ì‚Ý mDN Wrapper ‚ð “K—p‚µ‚Ü‚·B‘¶Ý‚µ‚È‚¢ê‡‚É‚Í WINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä“K—p‚µ‚Ü‚·BWINSOCK ‚̃o[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă̓fƒtƒHƒ‹ƒg‚łͳ‚µ‚­“®‚©‚¸A‚±‚̃‚[ƒh‚ðŽw’肵‚È‚¯‚ê‚΂Ȃç‚È‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB -
    Uses mDN Wrapper only for calls from WINSOCK 2.0, if it exists. Otherwise, mDN Wrapper is used for calls from WINSOCK 1.1. - The default setting may not function properly with some versions of WINSOCK, in which case this mode must be used. -
    - -

    -’†’i‚̃pƒlƒ‹‚łͳ‹K‰»‚Ì•ûŽ®‚ðÝ’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B¶‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚ÉŽg—p‚·‚鳋K‰»‚Ì–¼Ì‚ª“ü‚Á‚Ä‚¨‚èA‰E‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚ɂ͎g—p‰Â”\‚ȳ‹K‰»‚Ì–¼Ì‚ª“ü‚Á‚Ä‚¢‚Ü‚·B‰E‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚©‚ç’ljÁ‚µ‚½‚¢³‹K‰»‚ð‘I‘ð‚µA"Add" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƶ‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚ɒljÁ‚³‚ê‚Ü‚·B -‚Ü‚½A¶‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚Å휂µ‚½‚¢³‹K‰»‚ð‘I‘ð‚µ‚Ä "Remove" ƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚Î휂·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B"Clear" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚Æ‚·‚ׂĂ̳‹K‰»‚ªíœ‚³‚êA‚Ü‚½ "Reset" ƒ{ƒ^ƒ“‚É‚æ‚èƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚É–ß‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

    -Normalization schemes can be set in the center panel. The left box lists the names of selected normalization schemes, while the box on the right lists the names of available normalization schemes. Select a normalization scheme from the right box; click the Add button to add it to the list in the left box. -You can also delete normalization schemes from the left list box, by selecting it and clicking the Remove button. The Clear button removes all normalization schemes, and the Reset button reinstates the default settings. - -

    -3’i–ڂ̃pƒlƒ‹‚Å‚Í DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í "RACE" ‚Å‚·‚ªA‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚µ‚½‚¢ê‡‚É‚Í -‚±‚±‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B -

    -The third panel is used to enter the encoding name of the DNS server. -The default setting is RACE, but this panel allows you set the desired encoding. - -

    -ˆÈã‚ÌÝ’è‚Í "OK" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚è—LŒø‚ɂȂè‚Ü‚·BÝ’è‚ð•Ï‚¦‚¸‚Ƀ_ƒCƒAƒƒO‚ðI—¹‚µ‚½‚¢ê‡‚É‚Í "Cancel" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -

    -The settings become effective by clicking the OK button. Click Cancel to close the dialog box without changing the settings. - -

    - -


    - -

    §ŒÀŽ–€

    -

    Limitations

    -
    -
    DLL ƒo[ƒWƒ‡ƒ“ -
    DLL Version -

    -ƒ‰ƒbƒp[DLL ‚ÍAŒ³‚ÌWINSOCK ‚ÌDLL ‚̃o[ƒWƒ‡ƒ“‚É‹­‚­ˆË‘¶‚µ‚Ü‚·B -‚±‚ê‚ÍA”ñŒöŠJ‚̃Gƒ“ƒgƒŠ‚àŠÜ‚߂Ă·‚ׂẴGƒ“ƒgƒŠ‚ð’ñ‹Ÿ‚·‚é•K—v‚ª‚ ‚邽‚߂ł·B -‚±‚Ì‚½‚ßWINSOCK DLL ‚̃o[ƒWƒ‡ƒ“‚ª•Ï‚í‚邯AmDN Wrapper ‚ª“®ì‚µ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -

    -Wrapper DLL is highly dependent on the original WINSOCK DLL version. -This is because all entries including non-public entries must be supplied. -As a result, mDN Wrapper may stop functioning when a different version of WINSOCK DLL is installed. -

    -¡‰ñ쬂³‚ꂽmDN Wrapper ‚ÍA -

    -It has been confirmed that the current version of mDN Wrapper operates with the following software. -

    - - - - -
    WinNT4.0 SP6a(WINSOCK 1.1 + 2.0)
    Win98 (WINSOCK 1.1 + 2.0)
    Win95 OSR2 (WINSOCK 1.1)
    -
    -‚Å“®ì‚ðŠm”F‚µ‚Ä‚¢‚Ü‚·B‚½‚¾A«—ˆ‚ɂ킽‚Á‚Ä“®ì‚·‚é•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñB -

    -There is no guarantee, however, that it will function in the future. -

    -

    DNS, WINS, LMHOSTS -

    -Windows ‚Å‚ÍADNS ‚¾‚¯‚ł͂Ȃ­AWINS‚âLMHOSTS ‚É‚æ‚Á‚Ä‚àƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚Ì‰ðŒˆ‚ªs‚È‚í‚ê‚Ü‚·B -mDN Wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍAƒhƒƒCƒ“–¼‚̕ϊ·‚ªA‚±‚ê‚ç‚Ì•ûŽ®‚ւ̃fƒBƒXƒpƒbƒ`‚ðs‚È‚¤êŠ‚æ‚è‚àãˆÊ‘w‚Ås‚È‚í‚ê‚é‚Ì‚ÅA‚±‚ê‚ç‚Ì‚·‚ׂĂ̕ûŽ®‚ɂ‚¢‚ÄAƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚̕ϊ·‚ªs‚È‚í‚ê‚邱‚ƂɂȂè‚Ü‚·B -‚±‚Ì‚½‚ßAWindows ‚ªAWINS‚âLMHOSTS ‚ðŽg‚Á‚Ä‚¢‚éꇂɂÍA—\Šú‚µ‚È‚¢–â‘肪”­¶‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -‚±‚ê‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚ðŽg‚¤ê‡‚É‚ÍA–¼‘O‰ðŒˆ‚ÉDNS ‚¾‚¯‚ðŽg—p‚·‚邱‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

    -In Windows, not only DNS but also WINS and LMHOSTS resolve domain names and host names. When mDN Wrapper is used, domain name conversion are not dispatched to these schemes but are performed at a higher level. -As a result, when Windows uses WINS or LMHOSTS, unexpected results may occur. Thus when you use mDN Wrapper, we recommend that only DNS is used for name resolving. -

    -

    ƒhƒƒCƒ“–¼ˆÈŠO‚Ì–¼‘O‚Ì‰ðŒˆ -

    -WINSOCK 2.0 ‚Ì–¼‘O‰ðŒˆAPI -

    The following are WINSOCK 2.0 name resolving APIs -

    - - - - -
    WSALookupServiceBeginW
    WSALookupServiceNextW
    WSALookupServiceEnd
    -
    -‚ÍAƒhƒƒCƒ“–¼ˆÈŠO‚Å‚àŽg—p‚Å‚«‚é”Ä—p‚Ì–¼‘O‰ðŒˆ—p‚ÌAPI ‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -Œ»Žž“_‚Å‚ÍA‚±‚ê‚ç‚Í‚à‚Á‚Ï‚çƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ÅŽg—p‚³‚ê‚Ä‚¢‚Ü‚·‚ªA‘¼‚Ì–¼‘O(—Ⴆ‚΃T[ƒrƒX–¼)‚Ì‰ðŒˆ‚É‚àŽg—p‚Å‚«‚邱‚ƂɂȂÁ‚Ä‚¢‚Ü‚·B -

    -These are defined as a universal name resolving API that can be used for other than domain names. Currently, it is used only for resolving names, but it can also be used for resolving service names, for example. - -

    -mDN Wrapper ‚ÍA–¼‘O‚Ì‘ÎÛ‚Ì”@‰½‚É‚©‚©‚í‚炸A–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA‚±‚ê‚ç‚ÌAPI ‚ªAƒhƒƒCƒ“–¼ˆÈŠO‚Ì‰ðŒˆ‚ÉŽg‚í‚ê‚Ä‚¢‚éꇂɂÍA–â‘è‚ðˆø‚«‹N‚±‚·‰Â”\«‚ª‚ ‚è‚Ü‚·B -

    -Because the mDN Wrapper converts encodings of any type of name, these APIs could cause problems if used for resolving names other than domain names. -

    -

    –¼‘O‰ðŒˆAPI ‚ðŽg‚í‚È‚¢ƒvƒƒOƒ‰ƒ€ -

    -Programs not using name resolving API -

    -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍAƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚É‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎA'nslookup'‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚ÅA’¼ÚDNS ƒT[ƒo‚Æ’ÊM‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B‚±‚̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB -

    -Some applications do not use these APIs for resolving domain names. -For example, nslookup does not; instead, it communicates directly with the DNS server. mDN Wrapper cannot be used for such applications. -

    -

    “Á’èWINSOCK DLL ‚ɃoƒCƒ“ƒh‚³‚ꂽƒAƒvƒŠƒP[ƒVƒ‡ƒ“ -

    -Applications tied to specific WINSOCK DLLs -

    -

    -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA•W€‚ÌDLL ƒT[ƒ`ƒpƒX‚É]‚í‚È‚¢‚ÅA -“Á’è‚̃pƒX‚ÌDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚æ‚­Žg‚í‚ê‚éƒvƒƒOƒ‰ƒ€‚Ì’†‚Å‚ÍANetscape Communicator ‚ª‚»‚¤‚È‚Á‚Ä‚¢‚Ü‚·B -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚Ä‚ÍA•W€‚̃Cƒ“ƒXƒg[ƒ‹^ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Å‚Í mDN Wrapper ‚ð“K—p‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB -

    -Some applications do not conform to standard DLL search paths, but are tied to a DLL of a specific path. An often used program, Netscape Communicator, is a case in point. mDN Wrapper cannot be added to such programs in a standard install or configuration. -

    -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚ÄA‚Ç‚¤‚µ‚Ä‚à mDN Wrapper ‚ð“K—p‚·‚é•K—v‚ª‚ ‚é‚È‚çAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚½‚¾‚µA‚±‚̃Cƒ“ƒXƒg[ƒ‹‚Í‘å•ϊ댯‚ÅAꇂɂæ‚Á‚Ă̓VƒXƒeƒ€‚ðÄ‹N“®•s”\‚É‚µ‚Ä‚µ‚Ü‚¤‰Â”\«‚à‚ ‚è‚Ü‚·B -

    -If mDN Wrapper must be added to this type of program, it can be installed under the system directory. -However, such an installation is quite risky as it may sometimes make it impossible to restart. -

    -

    ‘ã‘ÖŽè’i‚Æ‚µ‚Ä‚Ì'dnsproxy' -

    -

    dnsproxy, an alternate solution -

    -‚±‚ê‚ç‚̧ŒÀŽ–€‚ª–â‘è‚ɂȂéꇂɂÍA‘ã‘ÖŽè’i‚Æ‚µ‚Ä'dnsproxy'‚ðŽg‚¤‚±‚Æ‚à‚Å‚«‚Ü‚·B‚±‚ê‚ÍADNS ƒT[ƒo‚Ƃ̃gƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“‚𒆌p‚·‚é‚Ì‚ÅAã‚Å–â‘è‚ɂȂÁ‚½‚悤‚È‚±‚Æ‚ð‰ñ”ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

    -dnsproxy can be used as an alternate approach to avoid such limitations. -The above problems are avoided since dnsproxy operates between the DNS server and the transaction. -

    -‚½‚¾‚µA'dnsproxy'‚ÍAƒ‰ƒbƒp[‚æ‚è‚à•¡ŽG‚Èݒ肪•K—v‚Å‚·‚µA‚Ü‚½AŒÄ‚ÑŒ³‚̃vƒƒOƒ‰ƒ€‚ð“Á’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñ‚Ì‚ÅAƒvƒƒOƒ‰ƒ€ŒÅ—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽæ‚èˆµ‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñB‚µ‚©‚µAã‹L‚̧ŒÀŽ–€‚ª–â‘è‚É‚È‚é‚æ‚¤‚ȃP[ƒX‚Å‚ÍAƒ‰ƒbƒp[‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚邯‚¢‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB -

    -However, dnsproxy requires a more complex setup procedure than Wrapper and cannot identify a calling program so it cannot handle the local encoding of specific programs. -It is perhaps best used as an alternative to Wrapper to avoid the above limitations. -

    - -
    - -

    ƒo[ƒWƒ‡ƒ“ƒAƒbƒvŽž‚Ì’ˆÓ

    -

    Precautions when Upgrading

    - -

    ŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚Ì mDN Wrapper ‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éƒ}ƒVƒ“‚ÉV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éÛ‚É‚ÍAŽŸ‚Ì‚±‚ƂɋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B -

    Note the following when a new version of the software is to be installed in a machine containing an earlier version. - -

      -
    1. ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚Ɍ¢ƒo[ƒWƒ‡ƒ“‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é
      -V‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚­‚¾‚³‚¢B‚»‚¤‚µ‚È‚¢‚ÆAV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚à‚¢‚­‚‚©‚̃tƒ@ƒCƒ‹‚ªXV‚³‚ꂸAŒÃ‚¢‚܂܎c‚Á‚Ä‚µ‚Ü‚¢‚Ü‚·B -ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚ÌuƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̒ljÁ‚Æíœv‚ðŽÀs‚µAumDN Wrapperv‚ð‘I‘ð‚µ‚Ä휂ðŽÀs‚µ‚Ä‚­‚¾‚³‚¢B
      ‚à‚µƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚¹‚¸‚ÉV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚µ‚Ü‚Á‚½ê‡‚É‚ÍA -ˆê“x‚»‚ê‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚©‚çÄ“xƒCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢B

      -Uninstall old version prior to installation.
      -Before the most recent version is installed, uninstall the old version. Otherwise, a number of files will not be updated and the old version will remain in effect even though the latest version has been installed. -To delete, open the Control Panel and select mDN Wrapper in Add/Remove Applications.
      If you made the mistake of installing the new version without first removing the old version, first uninstall, and then reinstall, the software.

      - -

    2. ‚·‚ׂẴtƒ@ƒCƒ‹‚ðÄ“xƒ‰ƒbƒv‚·‚é
      -mDN Wrapper ‚Í‚»‚Ì“®ìŒ´—ãAmDN Wrapper ‚ð“K—p‚·‚éƒvƒƒOƒ‰ƒ€‚ª‘¶Ý‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ÉDLL ‚ðƒRƒs[‚µ‚Ü‚·B -ƒRƒs[‚³‚ꂽ DLL ‚ÍV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚àXV‚³‚ê‚È‚¢‚Ì‚ÅA‚»‚̂܂܂łÍV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ªŽg‚í‚ê‚Ü‚¹‚ñB‚±‚Ì‚½‚ßAV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚çAˆê“x mDN Wrapper ‚Ì“K—p‚ð‚·‚×‚Ä‰ðœ‚µA‰ü‚߂ēK—p‚µ’¼‚µ‚Ä‚­‚¾‚³‚¢B‚·‚ׂẴvƒƒOƒ‰ƒ€‚ɑ΂·‚é“K—p‚ð‰ðœ‚·‚é‚É‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Ì "Unwrap All" ƒ{ƒ^ƒ“‚ðŽg—p‚·‚é‚Ì‚ª•Ö—˜‚Å‚·B -

      -Re-wrapping all files
      -mDN Wrapper copies a DLL file to the directory that contains programs that can be wrapped by mDN Wrapper. -The copied DLL is not automatically updated to the latest version when a new version of the software is installed preventing use of the latest version. Therefore, after installation, unwrap all applications wrapped using mDN Wrapper and then wrap them again. The easiest way to do this is to click the Unwrap All button in the configuration program. -

    - - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/bind9.html b/contrib/idn/mdnkit/doc/en/spec/bind9.html deleted file mode 100644 index bc7bfd2ccb..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/bind9.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - -bind-9 patch - - - - -

    BIND-9 ƒpƒbƒ`

    -

    BIND-9 Patch

    - - - -
    -

    ŠT—v

    -

    Overview

    - -

    -mDNkit ‚Ɋ܂܂ê‚é BIND-9 —p‚̃pƒbƒ`ƒtƒ@ƒCƒ‹‚ð“K—p‚·‚邱‚Ƃɂæ‚èA -BIND-9 ‚É‚¨‚¢‚Ä]—ˆ‚Ì ASCII •¶Žš‚É‚æ‚éƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII •¶Žš‚É‚æ‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -

    -The BIND-9 patch file included in the mDNkit provides the ability to support both conventional ASCII character domain names and non-ASCII character-derived multilingual domain names. -

    -‹ï‘Ì“I‚É‚ÍA‚±‚̃pƒbƒ`‚Í BIND-9 ‚ÉŽŸ‚̂悤‚È‹@”\‚ð’ljÁ‚µ‚Ü‚·B -

    -Specifically, this patch adds the following functions to BIND-9. -

      -
    • lightweight resolver API (lwres_gethostbyname ‚È‚Ç) ‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚·‚é -
    • Uses a lightweight resolver API (lwres_gethostbyname, etc.) to search the IP address from the host name, as expressed in local encoding. -
    • “¯‚¶‚­–¼‘O‰ðŒˆŒ‹‰Ê‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽ -ƒzƒXƒg–¼‚ð•Ô‚· -
    • For the result of name resolution, returns the host name expressed in the local encoding as well. -
    • digAhostAnslookup ƒRƒ}ƒ“ƒh‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -Žó‚¯•t‚¯A‚Ü‚½–â‚¢‡‚킹Œ‹‰Ê‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\ަ‚·‚é -
    • Uses dig, host, and nslookup commands to accept domain names in the local encoding and displays domain names included in the inquiry result using local encoding. -
    - -

    -BIND-9 ‚ւ̃pƒbƒ`‚Ì“K—p•û–@‚ÍAƒpƒbƒ`ƒtƒ@ƒCƒ‹‚Ìæ“ª‚É‹LÚ‚µ‚Ä‚ ‚è‚Ü‚·B -‚È‚¨ƒpƒbƒ`ƒtƒ@ƒCƒ‹‚ɂ‚¢‚Ä‚ÍA -‘Ήž‚·‚é BIND ‚̃o[ƒWƒ‡ƒ“‚ð‚æ‚­Šm”F‚µ‚Ä‚©‚çAŽg—p‚µ‚Ä‚­‚¾‚³‚¢B -

    -Instructions for how to apply the patch file to BIND-9 is explained at the beginning of the patch file. -Before using the patch file, be sure to check the version of BIND being used. -

    - -


    -

    ƒA[ƒLƒeƒNƒ`ƒƒ

    -

    Architecture

    - -

    BIND-9 ‚Í‚»‚ê‚Ü‚Å‚Ì BIND-8 ‚Æ‚ÍƒŠƒ]ƒ‹ƒo‚Ì\¬‚ª‘S‚­ˆÙ‚È‚Á‚Ä‚¢‚Ü‚·B -BIND-8 ‚Ü‚Å‚ÍƒŠƒ]ƒ‹ƒo‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚郉ƒCƒuƒ‰ƒŠ‚Æ‚µ‚Ä -ŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚µ‚½‚ªA -BIND-9 ‚Å‚ÍƒŠƒ]ƒ‹ƒo‚Ì‹@”\‚̑啔•ª‚ª -lwresd (lightweight resolver daemon) ‚Æ‚¢‚¤ƒT[ƒo‚Ɉڂ³‚êA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚é‚Ì‚Ílightweight resolver ‚ƌĂ΂ê‚é -lwresd ‚Ƃ̒ÊM‚ðs‚¤‚½‚߂̃‰ƒCƒuƒ‰ƒŠ‚ƂȂÁ‚Ä‚¢‚Ü‚·B -

    BIND-9 has a different resolver structure than BIND-8. -Up to BIND-8, the resolver was implemented as a library linked by the application. However, with BIND-9, most of the functions of the resolver have been moved to the server called lwresd (lightweight resolver daemon) and only the library called lightweight resolver that is used to communicate with lwresd is linked by the application. - -

    –{ƒpƒbƒ`‚Í‚±‚̃A[ƒLƒeƒNƒ`ƒƒ‚ɇ‚킹A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŠeˆ—‚ð -‚»‚ꂼ‚ê‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚É•ªŽU‚³‚¹‚Ü‚µ‚½BˆÈ‰º‚ÉŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚Å -ŽÀ‘•‚³‚ê‚é‹@”\‚ƃRƒ“ƒ|[ƒlƒ“ƒgŠÔ‚̃Cƒ“ƒ^ƒtƒF[ƒX‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -•\‚µ‚½}‚ðŽ¦‚µ‚Ü‚·B -

    Matched to this architecture, the patch distributes multilingual domain name processing to the respective components. The following diagram shows the function implemented in each component and the encoding used by the interface between the components. - -

    -bind9 resolver architecture -
    - -
    -

    named C³

    -

    Fixes in named

    - -

    named ‚É‚¨‚¯‚éC³‚ÍŽŸ‚̈ê“_‚݂̂ł·B -

    The following fixes were made in named: - -

    UTF-8 •¶Žš‚Ì“§‰ß

    -

    UTF-8 Character Transparency

    - -

    BIND-9 ‚Ì named ‚ł̓hƒƒCƒ“–¼‚̈—‚͂قƂñ‚Ç8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚èA -UTF-8 “™‚Ì MSB ‚̃Zƒbƒg‚³‚ꂽƒoƒCƒg‚à‚»‚̂܂ܓ§‰ß‚µ‚Ü‚·B -‚µ‚©‚µ named “à‚ň—‚ÉŽg—p‚³‚ê‚Ä‚¢‚éƒhƒƒCƒ“–¼‚Ì“à•”•\Œ» (dns_name_t) -‚©‚çƒeƒLƒXƒg•\Œ»‚ւ̕ϊ·•”•ª‚Í8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚炸AASCII •¶ŽšˆÈŠO -‚̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚ŃNƒH[ƒg‚³‚êA\DDD ‚Æ‚¢‚¤Œ`Ž®‚Ì•\Œ»‚É -•ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª RACE ‚È‚Ç‚Ì ASCII ŒÝŠ· -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚Î ASCII ˆÈŠO‚Ì•¶Žš‚ªƒhƒƒCƒ“–¼‚ÉŒ»‚ê‚邱‚Ƃ͂Ȃ¢‚̂Š-–â‘è‚È‚¢‚̂ł·‚ªAUTF-8 ‚ðŽg—p‚·‚éꇂɂ͖â‘è‚Æ‚È‚è‚Ü‚·B -

    With BIND-9 named, most domain name processing is based on 8-bit through and UTF-8 bytes in which MSB is set are also passed as is. However, the conversion of domain names from an internal expression (dns_name_t) to the text expression used for processing in named is not 8-bit through and other than ASCII text is quoted with a backslash and converted to a \DDD format expression. -If ASCII-compatible encoding such as RACE is used for the DNS protocol, there is no problem because only ASCII characters appear in domain names; there are, however, problems when UTF-8 is used. - -

    BIND-9 ƒpƒbƒ`‚ÍA‚±‚̈—‚ðC³‚µA•ÏŠ·‚µ‚悤‚Æ‚·‚é•¶Žš‚ªUTF-8 •¶Žš‚Ì -ꇂɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒg‚ð‚µ‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚Ì“®ì‚Í named ‚ÌÝ’èƒtƒ@ƒCƒ‹ (named.conf) ‚ÅØ‚è‘Ö‚¦‰Â”\‚Å‚ ‚èA -Ý’èƒtƒ@ƒCƒ‹‚Ì options ƒZƒNƒVƒ‡ƒ“‚Ì allow-utf8 ƒpƒ‰ƒ[ƒ^‚Å -Žw’肵‚Ü‚·BDNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð -Žg—p‚·‚éۂɂ͎Ÿ‚̂悤‚É‹Lq‚µ‚Ä‚­‚¾‚³‚¢B -

    The BIND-9 patch corrects processing so that the backslash quote is not used when converting UTF-8 characters. -This operation can be switched using the allow-utf8 parameter of the options section in the named configuration file (named.conf). -When UTF-8 is used for encoding the DNS protocol, write as follows. -

    -
    -options {
    -    ...
    -    allow-utf8 yes;
    -    ...
    -};
    -
    -
    - -
    -

    lwresd C³

    -

    Fixes in lwresd

    - -

    lwresd ‚ɑ΂µ‚Ă͎Ÿ‚̂悤‚ÈC³‚ð‰Á‚¦‚Ä‚ ‚è‚Ü‚·B -

    The following fixes were made to lwresd. - -

    - -
    UTF-8 •¶Žš‚Ì“§‰ß
    -
    UTF-8 Character Transparency
    - -

    ‚±‚ê‚Í named ‚ɑ΂·‚éC³‚Æ“¯‚¶‚ÅAƒhƒƒCƒ“–¼‚ð“à•”•\Œ»‚©‚ç -ƒeƒLƒXƒg•\Œ»‚ɕϊ·‚·‚éۂ̃oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒeƒBƒ“ƒO‚ð -s‚í‚È‚¢‚悤‚É‚·‚é‚à‚̂ł·B -

    This is the same fix made in named wherein backslash quoting is not used for conversion of domain names from an internal expression to a text expression. - -

    named ‚Ìê‡A‚±‚ê‚ÍÝ’èƒtƒ@ƒCƒ‹ named.conf ‚̃IƒvƒVƒ‡ƒ“‚Å -Ø‚è‘Ö‚¦‚ç‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·‚ªAlwresd ‚Ìꇂɂ͎©“®Ø‚è‘Ö‚¦‚É -‚È‚Á‚Ä‚¢‚Ü‚·Blwresd ‚ª“ǂݞ‚Þ -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì -ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ‚Éݒ肳‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg–¼‚ðŽQÆ‚µA -‚»‚ꂪ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¢ê‡‚ɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚é -ƒNƒH[ƒg‚ð‚µ‚È‚¢‚悤‚É‚µ‚Ü‚·B -

    With named, this setting can be changed using the option setting in the named.conf configuration file; however, it is automatically changed with Iwresd. The code set name set in the server encoding entry of the client configuration file to be loaded by lwresd is referenced and if it is not ASCII-compatible encoding, the backslash quote is not used. - -

    ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·
    -
    Encoding Conversion
    - -

    lwresd ‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄAƒNƒ‰ƒCƒAƒ“ƒg -‚‚܂è lightweight resolver ƒ‰ƒCƒuƒ‰ƒŠ‚Ƃ̊Ԃ̒ÊM‚É‚Í UTF-8 ‚ðA -‚Ü‚½ named ‚Ƃ̒ÊM‚É‚Í DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð‚»‚ê‚¼‚ê -Žg—p‚µ‚Ü‚·B‚µ‚½‚ª‚Á‚Ä—¼ŽÒ‚̊Ԃ̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚¢‚Ü‚·B -

    For encoding of multilingual domain names, lwresd uses UFT-8 for communication with the client, i.e. the lightweight resolver library, and also uses the encoding used for the DNS protocol for communication with named, respectively. Therefore, encoding conversion is performed between both components. - -

    ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’è‚Í -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B -

    The res module of the MDN library is used for encoding conversion. -The client configuration file is used to specify the encoding used by the DNS protocol. - -

    -

    - -


    -

    ƒNƒ‰ƒCƒAƒ“ƒg‘¤ƒ‰ƒCƒuƒ‰ƒŠC³

    -

    Fixes in Client Library

    - -

    ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃‰ƒCƒuƒ‰ƒŠ‚ÍA -

    The client side library was corrected as follows: -

      -
    • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ· -
    • Encoding Conversion -
    • ³‹K‰» -
    • Normalization -
    -‚ðs‚¤‚悤‚ÉC³‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚ç‚̈—‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -Ý’è‚̓Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B -

    The res module of the MDN library is used for this processing. -The client configuration file is used to set settings. - -

    –¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ÉC³‚³‚ê‚Ä‚¢‚Ü‚·B -‚Ü‚½“à•”ŽÀ‘•‚ÍA«—ˆ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ðˆµ‚¦‚é -API ‚̒ljÁ‚ª—eˆÕ‚ɂł«‚邿‚¤‚ÉÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚ç‚ɂ‚¢‚Ä -‚±‚ÌŒãà–¾‚µ‚Ü‚·B -

    The API function for name resolution was corrected to that it can handle multilingual domain names expressed in local encoding. -Also, internal implementation is designed so that it will be simpler to add APIs that can handle domain names in UTF-8 encoding in the future. An explanation of those issues will follow at a later date. - -

    - -

    - -

    ‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”

    -

    Multilingual API Functions

    - -

    -ƒpƒbƒ`‚É‚æ‚Á‚Ä‘½Œ¾Œê‰»‚³‚ê‚é API ŠÖ”‚̈ꗗ‚Å‚·B -

    -The list of API functions that are made multilingual by the patch is shown below. - -

      -
    • lwres_getaddrinfo() -
    • lwres_getnameinfo() -
    • lwres_gethostbyname() -
    • lwres_gethostbyname2() -
    • lwres_gethostbyname_r() -
    • lwres_gethostbyaddr() -
    • lwres_gethostbyaddr_r() -
    • lwres_getipnodebyname() -
    • lwres_getipnodebyaddr() -
    - -

    -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÍA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII ƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B”ñ ASCII ƒhƒƒCƒ“–¼‚Æ‚µ‚ÄA -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ɉž‚¶‚ÄA -V‚½‚Ɉȉº‚̂悤‚ȃhƒƒCƒ“–¼‚ðŽæ‚èˆµ‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

    -In addition to the conventional ASCII domain names, API functions that are made multilingual can handle non-ASCII domain names. With regard to non-ASCII domain names, the following domain names can be handled, depending on which settings are set in the client configuration file. - -

      -
    • ƒzƒXƒg.‰ïŽÐ.jp -
    • host.company.jp -
    • www.•ʂ̉ïŽÐ.com -
    • www.other company.com -
    - -

    -ˆø”‚ÌŒ^‚â•Ô‚è’l‚ÌŒ^‚É•ÏX‚Í‚ ‚è‚Ü‚¹‚ñB -ƒpƒbƒ`‚ð“–‚Ä‚é‘O‚Æ“¯—l‚̌ĂÑo‚µ•û–@‚ÅA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÆA -”ñ ASCII ƒhƒƒCƒ“–¼‚Ì—¼•û‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -”ñ ASCII ƒhƒƒCƒ“–¼‚ɂ‚¢‚Ä‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ðˆø”‚Æ‚µ‚Ď󂯎æ‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -The type of arguments and return values are not changed. -Using the same calling method that was used prior to applying the patch allows the system to handle both conventional ASCII domain names and non-ASCII domain names. -Regarding non-ASCII domain names, domain names of local encoding can be received as arguments. - -

    -‚±‚ê‚Ü‚Åã‹L‚Ì API ŠÖ”‚Ås‚È‚í‚ê‚Ä‚¢‚½ˆ—‚ÍA -ˆÈ~‚Åà–¾‚·‚é‚»‚ꂼ‚ê‚Ì“à•”ŠÖ”‚ɈÚs‚µAAPI -ŠÖ”‚ÍAƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOî•ñ‚ð‚±‚Ì“à•”ŠÖ”‚É“n‚·–ðŠ„‚ð‚µ‚Ä‚¢‚Ü‚·B -

    -Processing performed by the above API functions are moved to respective internal functions explained later and API functions pass the encoding information of domain names to these internal functions. - -

    - -

    ’ljÁ‚³‚ꂽ“à•”ŠÖ”

    -

    Added internal functions

    - -

    -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÉŠÖ˜A‚µ‚ÄAˆÈ‰º‚Ì“à•”ŠÖ”‚ª’ljÁ‚³‚ê‚Ü‚µ‚½B -

    -In association with the API functions that were made multilingual, the following internal functions are added. - -

    -
    lwres_getaddrinfo_enc() -
    lwres_getaddrinfo() ‚Ì“à•”ŠÖ” -
    lwres_getaddrinfo() internal function -
    lwres_getnameinfo_enc() -
    lwres_getnameinfo() ‚Ì“à•”ŠÖ” -
    lwres_getnameinfo() internal function -
    lwres_gethostbyname_enc() -
    lwres_gethostbyname() ‚Ì“à•”ŠÖ” -
    lwres_gethostbyname() internal function -
    lwres_gethostbyname2_enc() -
    lwres_gethostbyname2() ‚Ì“à•”ŠÖ” -
    lwres_gethostbyname2() internal function -
    lwres_gethostbyname_r_enc() -
    lwres_gethostbyname_r() ‚Ì“à•”ŠÖ” -
    lwres_gethostbyname_r() internal function -
    lwres_gethostbyaddr_enc() -
    lwres_gethostbyaddr() ‚Ì“à•”ŠÖ” -
    lwres_gethostbyaddr() internal function -
    lwres_gethostbyaddr_r_enc() -
    lwres_gethostbyaddr_r() ‚Ì“à•”ŠÖ” -
    lwres_gethostbyaddr_r() internal function -
    lwres_getipnodebyname_enc() -
    lwres_getipnodebyname() ‚Ì“à•”ŠÖ” -
    lwres_getipnodebyname() internal function -
    lwres_getipnodebyaddr_enc() -
    lwres_getipnodebyaddr() ‚Ì“à•”ŠÖ” -
    lwres_getipnodebyaddr() internal function -
    - -

    -’ljÁ‚³‚ꂽ“à•”ŠÖ”‚ɂ‚¢‚Ă̎d—l‚ÍAˆÈ‰º‚Ì’Ê‚è‚Å‚·B -

    -The specifications of the added internal functions are as follows. - -

    - -
    lwres_getaddrinfo_enc -
    -
    -int
    -lwres_getaddrinfo_enc(const char *, const char *, const struct addrinfo *,
    -		      struct addrinfo **, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getaddrinfo() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getaddrinfo() ‚Ƃ̈Ⴂ‚ÍAstatic ŠÖ”‚Å‚ ‚é set_order() -ŠÖ”‚ɃGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ð“n‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getaddrinfo() function. -The only difference between this function and the lwres_getaddrinfo() function is that the encode type judgment flag is passed to the set_order() function, which is a static function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getaddrinfo() ŠÖ”‚©‚ç lwres_getaddrinfo_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified for the encode type judgment flag in order to call the lwres_getaddrinfo_enc() function from the lwres_getaddrinfo() function. -

    -•Ô‚³‚ê‚é’l‚Í -EAI_NONAMEAEAI_BADFLAGSAEAI_SYSTEMA -EAI_FAMILYAEAI_SOCKTYPEAEAI_SERVICEA -EAI_MEMORYA0 -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

    -One of the following values is returned. -EAI_NONAME, EAI_BADFLAGS, EAI_SYSTEM, -EAI_FAMILY, EAI_SOCKTYPE, EAI_SERVICE, -EAI_MEMORY, 0 -

    - -

    lwres_getnameinfo_enc -
    -
    -int
    -lwres_getnameinfo_enc(const struct sockaddr *, size_t, char *, size_t, char *,
    -		      size_t, int, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getnameinfo() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getnameinfo() ‚Ƃ̈Ⴂ‚ÍAlwres_getnamebyaddr() ŠÖ”‚̌ĂÑo‚µ•”‚ð -lwres_getnamebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getnameinfo() function. -The only difference between this function and the lwres_getnameinfo() function is that the call portion of the lwres_getnamebyaddr() function is changed to the lwres_getnamebyaddr_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getnameinfo() ŠÖ”‚©‚ç lwres_getnameinfo_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified for the encode type judgment flag in order to call the lwres_getnameinfo_enc() function from the lwres_getnameinfo() function. -

    -•Ô‚³‚ê‚é’l‚Í -ENI_NOSOCKETAENI_SALENAENI_FAMILYA -ENI_MEMORYAENI_SYSTEMAENI_NOHOSTNAMEA -SUCCESS -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

    -One of the following values is returned. -ENI_NOSOCKET, ENI_SALEN, ENI_FAMILY, -ENI_MEMORY, ENI_SYSTEM, ENI_NOHOSTNAME, -SUCCESS -

    - -

    lwres_gethostbyname_enc -
    -
    -struct hostent *
    -lwres_gethostbyname_enc(const char *, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname() function. -The only difference between this function and the lwres_gethostbyname() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname() ŠÖ”‚©‚ç lwres_gethostbyname_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified for the encode type judgment flag in order to call the lwres_gethostbyname_enc() function from the lwres_gethostbyname() function. -

    -lwres_getipnodebyname_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -A pointer is returned that points to the hostent structure returned from lwres_getipnodebyname_enc(). -

    - -

    lwres_gethostbyname2_enc -
    -
    -struct hostent *
    -lwres_gethostbyname2_enc(const char *, int, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname2() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname2() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname2() function.The only difference between this function and the lwres_gethostbyname2() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname2() ŠÖ”‚©‚ç -lwres_gethostbyname2_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified for the encode type judgment flag in order to call the lwres_gethostbyname2_enc() function from the lwres_gethostbyname2() function. -

    -lwres_getipnodebyname_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -A pointer is returned that points to the hostent structure returned from lwres_getipnodebyname_enc(). -

    - -

    lwres_gethostbyname_r_enc -
    -
    -struct hostent *
    -lwres_gethostbyname_r_enc(const char *, struct hostent *, char *,
    -			  int, int *, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname_r() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname_r() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyname_r() function. -The only difference between this function and the lwres_gethostbyname_r() function is that the call portion of the lwres_getipnodebyname() function is changed to the lwres_getipnodebyname_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname_r() ŠÖ”‚©‚ç -lwres_gethostbyname_r_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specifed for the encode type judgment flag in order to call the lwres_gethostbyname_r_enc() function from lwres_gethostbyname_r() function. -

    -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal. -

    - -

    lwres_gethostbyaddr_enc -
    -
    -struct hostent *
    -lwres_gethostbyaddr_enc(const char *, int, int, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyaddr() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyaddr() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyaddr() function. -The only difference between this function and the lwres_gethostbyaddr() function is that the call portion of the lwres_getipnodebyaddr() function is changed to the lwres_getipnodebyaddr_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyaddr() ŠÖ”‚©‚ç lwres_gethostbyaddr_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. -LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specifed for the encode type judgment flag in order to call the lwres_gethostbyaddr_enc() function from tge lwres_gethostbyaddr() function. -

    -lwres_getipnodebyaddr_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -The pointer is returned that points to the hostent structure returned from lwres_getipnodebyaddr_enc(). -

    - -

    lwres_gethostbyaddr_r_enc -
    -
    -struct hostent *
    -lwres_gethostbyaddr_r_enc(const char *, int, int, struct hostent *,
    -			  char *, int, int *, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyaddr_r() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyaddr_r() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_gethostbyaddr_r() function. -The only difference between this function and the lwres_gethostbyaddr_r() funciton is that the call portion of the lwres_getipnodebyaddr() function is changed to the lwres_getipnodebyaddr_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyaddr_r() ŠÖ”‚©‚ç -lwres_gethostbyaddr_r_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. -LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified to the encode type judgment flag in order to call the lwres_gethostbyaddr_r_enc() function from the lwres_gethostbyaddr_r() function. -

    -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -NULL is returned when there is an error and pointer to hostent structure that contains the value is returned when the result of processing is normal. -

    - -

    lwres_getipnodebyname_enc -
    -
    -struct hostent *
    -lwres_getipnodebyname_enc(const char *, int, int, int *, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getipnodebyname() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getipnodebyname() ‚Ƃ̈Ⴂ‚ÍAlwres_getaddrsbyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getaddrsbyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getipnodebyname() function. -The only difference between this function and the lwres_getipnodebyname() function is that the call portion of the lwres_getaddrsbyname() function is changed to the lwres_getaddrsbyname_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getipnodebyname() ŠÖ”‚©‚ç -lwres_getipnodebyname_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. -LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encoding. -LWRES_ENCODING_LOCAL is specified for the encode type judgment flag in order to call the lwres_getipnodebyname_enc() function from the lwres_getipnodebyname() function. -

    -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal. -

    - -

    lwres_getipnodebyaddr_enc -
    -
    -struct hostent *
    -lwres_getipnodebyaddr_enc(const void *, size_t, int, int *, int)
    -
    -

    -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getipnodebyaddr() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getipnodebyaddr() ‚Ƃ̈Ⴂ‚ÍAlwres_getnamebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getnamebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

    -With this function, the entry of a flag used to determine whether or not the encode type is local is added to the lwres library lwres_getipnodebyaddr() function. -The only difference between this function and the lwres_getipnodebyaddr() function is that the call portion of the lwres_getnamebyaddr() function is changed to the lwres_getnamebyaddr_enc() function. -

    -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getipnodebyaddr() ŠÖ”‚©‚ç -lwres_getipnodebyaddr_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

    -The last argument of the function is the encode type judgment flag. -LWRES_ENCODING_LOCAL can be specified for local encoding and LWRES_ENCODING_UCS can be specified for UTF-8 encodong. -LWRES_ENCODING_LOCAL is specified for the encode judgment flag in order to call the lwres_getipnodebyaddr_enc() function from the lwres_getipnodebyaddr() function. -

    -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

    -NULL is returned when there is an error and a pointer to the hostent structure that contains the value is returned when the result of processing is normal. - -

    - -
    -

    dig/host/nslookup C³

    -

    Fixes in dig/host/nslookup

    - -

    BIND-9 ‚É‚Í DNS ‚Ì–â‚¢‡‚킹ƒc[ƒ‹‚Æ‚µ‚Ä digAhostAnslookup ‚Æ‚¢‚¤ -ƒRƒ}ƒ“ƒh‚ª•t‘®‚µ‚Ü‚·BmDNkit ‚Ì BIND-9 ƒpƒbƒ`‚É‚æ‚èA‚±‚ê‚ç‚Í‚¢‚¸‚ê‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B‹ï‘Ì“I‚ɂ͈ȉº‚Ì‹@”\‚ª -•t‰Á‚³‚ê‚Ü‚·B -

    The DNS inquiry commands called dig, host, and nslookup are attached to BIND-9. Because of the BIND-9 patch in mDNkit, these commands can handle multilingual domain names. Specifically, the following functions are added. -

      -
    • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·
      -ƒRƒ}ƒ“ƒhˆø”A‚ ‚é‚¢‚Í•W€“ü—Í‚©‚ç“ü—Í‚³‚ꂽAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\Œ»‚³‚ꂽƒhƒƒCƒ“–¼‚ðADNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -DNS ‚Ì–â‚¢‡‚킹‚ð”­s‚µ‚Ü‚·B -

      ‚Ü‚½ DNS ‚̕ԓš‚Ɋ܂܂ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚µA•\ަ‚µ‚Ü‚·B -

    • Encoding conversion
      -Converts domain names expressed in local encoding entered using command arguments or through standard input to the encoding used by the DNS protocol and issues a DNS inquiry. -

      Also converts multilingual domain names included in the DNS response to local encoding and displays the result. -

      -

    • ³‹K‰»
      -DNS ‚Ì–â‚¢‡‚킹‚ÅAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒhƒƒCƒ“–¼‚ð -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚éÛAƒhƒƒCƒ“–¼‚Ì -³‹K‰»‚ðs‚¢‚Ü‚·B -
    • Normalization
      -When converting domain names expressed in local encoding to the encoding used in DNS protocol as a result of a DNS inquiry, the domain names are normalized. -
    - -‚±‚ê‚ç‚̈—‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -Ý’è‚̓Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B -

    -The res module of the MDN library is used for that processing. -The client configuration file is used to make the setting. - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/clientconfig.html b/contrib/idn/mdnkit/doc/en/spec/clientconfig.html deleted file mode 100644 index 08852eda51..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/clientconfig.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - -client configuration specification - - - - -

    ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹

    -

    Client Configuration File

    - - - -
    - -

    ŠT—v

    -

    Overview

    - -

    -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‚½‚߂̊eŽí‚Ìݒ肪 -‹Lq‚³‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚ÅAmDNkit ‚ðŽg—p‚µ‚Ä‘½Œ¾Œê‰» (‘Û‰») -‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌƒŠƒ]ƒ‹ƒo‚ª“ǂݞ‚Þƒtƒ@ƒCƒ‹‚Å‚·B -‚±‚̃tƒ@ƒCƒ‹‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -resconf ƒ‚ƒWƒ…[ƒ‹ ‚É‚æ‚Á‚ēǂݞ‚Ü‚êA -‘½Œ¾ŒêƒhƒƒCƒ“‚ÉŠÖ‚·‚éˆÈ‰º‚̂悤‚Èݒ肪‚Å‚«‚Ü‚·B -

    -The client configuration file is the file in which various settings for multilingual domain names are described. This file is loaded by the resolver at the client side for which the mDNkit is used to make it multilingual (internationalized). The resconf module of the MDN library is used to load this file and the following settings related to multilingual domains can be made. - -

      -
    • DNS ƒvƒƒgƒRƒ‹ã‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -
    • Encoding of domain name for the DNS protocol -
    • ³‹K‰»Œ`Ž® -
    • Normalization form -
    • DNS ‚̕ԓšƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚Å‚«‚È‚©‚Á‚½Žž‚ÉŽg—p‚³‚ê‚éA‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO -
    • Alternate encoding used when domain names in the return message from the DNS cannot be converted to local encoding -
    • ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚̃GƒCƒŠƒAƒX -
    • Alias for encoding name -
    - -

    -‚±‚̃tƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅAƒtƒ@ƒCƒ‹‚ÌŠes (# -‚ÅŽn‚Ü‚éƒRƒƒ“ƒgs‚ÆA‹ós‚𜂢‚Ä) ‚ÍA -ŽŸ‚̂悤‚È’Pƒ‚ȃtƒH[ƒ}ƒbƒg‚Å\¬‚³‚ê‚Ü‚·B -

    -This file is a standard text file and each line of the file (except comment lines starting with # and blank lines) consists of following simple format. - -

    -
    -ƒL[ƒ[ƒh ’l...
    -
    -
    -
    -
    -Keyword  Value...
    -
    -
    - -

    -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÍAmDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ -ꇂɂ͈ȉº‚É”z’u‚³‚ê‚Ü‚·B -

    -The client configuration file is located as follows when the mDNkit is compilied using the default settings. - -

    -
    -/usr/local/etc/mdnres.conf
    -
    -
    - -

    ˆÈ~AŠeƒL[ƒ[ƒh‚²‚Æ‚ÉÝ’è“à—e‚ð‹Lq‚µ‚Ü‚·B -

    The setting content is discussed below for each keyword. -

    - -

    ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ

    -

    Server Encoding Entry

    - -

    -DNS ƒvƒƒgƒRƒ‹ã‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄŽg—p‚·‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg–¼) ‚ðŽw’肵‚Ü‚·B -

    -Specifies encoding (code set name) used as the encoding for multilingual domain name in the DNS protocol. - -

    -
    [\•¶] -
    server-encoding encoding -
    -
    -
    [Syntax] -
    server-encoding encoding -
    - -

    encoding ‚É‚ÍAŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ð‹Lq‚µA -ŽŸ‚Ì‚à‚Ì‚ªŽw’è‚Å‚«‚Ü‚·B -

    The encoding name to be used is described in encoding and the following types can be specified. - -

      -
    • UTF-8 -
    • RACE -
    • BRACE -
    • LACE -
    • UTF-5 -
    • iconv_open() ƒ‰ƒCƒuƒ‰ƒŠŠÖ”‚Å‹–‰Â‚³‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg–¼ - (Žg—p‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚ɂ‚¢‚Ä‚ÍAiconv() ‚̃hƒLƒ…ƒƒ“ƒg‚ð - Œä——‚­‚¾‚³‚¢) -
    • Refer to the document for iconv() for code set names permitted by the iconv_open() library function (code set names that can be used). -
    • Œãq‚̃GƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚Å’è‹`‚³‚ꂽƒGƒCƒŠƒAƒX–¼ - (uƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXv - ‚Ì€‚ðŒä——‚­‚¾‚³‚¢) -
    • Alias name defined by the alias file is explained later. - (Refer to the "Encoding Alias") section. -
    -

    -‚±‚̃Gƒ“ƒgƒŠ‚Í•K{ƒGƒ“ƒgƒŠ‚Å‚ ‚èA•K‚¸‹Lq‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

    -This entry is a prerequisite and must always be described. - -

    ƒT[ƒo ZLD ƒGƒ“ƒgƒŠ

    -

    Server ZLD Entry

    - -

    -DNS ƒvƒƒgƒRƒ‹ã‚ÅŽg—p‚³‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -(server-encoding ƒGƒ“ƒgƒŠ‚ÅŽw’肳‚ꂽ‚à‚Ì) -‚Ì’†‚É‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚ß‚É -ZLD (zero-level domain) ‚Æ‚¢‚¤ƒhƒƒCƒ“‚ð•K—v‚Æ‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -ZLD ‚Í’Êí‚̃gƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚Ì‚³‚ç‚ÉãˆÊƒhƒƒCƒ“‚ɑГ–‚µ‚Ü‚·B -‚½‚¾‚µ‚±‚ê‚Í DNS ‚̃VƒXƒeƒ€“à•”‚ł̂ݎg‚í‚ê‚éƒhƒƒCƒ“‚Å‚ ‚èA -ˆê”ʃ†[ƒU‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÍŒ©‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -

    -Of the encoding types (specified by server-encoding entry) for multilingual domain names used by the DNS protocol, some require a domain called ZLD (zero-level domain) in order to distinguish multilingual domain names from conventional ASCII domain names. -ZLD is equivalent to a higher level domain that is above the usual top level domain. Note, however, that this domain is only used inside the DNS system and ordinary users and application cannot see this domain. - -

    -
    [\•¶] -
    server-zld ZLD -
    -
    -
    [Syntax] -
    server-zld ZLD -
    - -

    mDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚ÍAZLD ‚ÍŽg—p‚Å‚«‚È‚¢‚悤‚ɂȂÁ‚Ä‚¨‚èA -Ý’èƒtƒ@ƒCƒ‹’†‚É‚±‚̃Gƒ“ƒgƒŠ‚ª‚ ‚邯ŒxƒƒbƒZ[ƒW‚ª•\ަ‚³‚ê‚Ü‚·B -‚±‚̃Gƒ“ƒgƒŠ‚ÌŽw’è‚ð—LŒø‚É‚·‚é‚É‚ÍAmDNkit ‚Ì configure ŽÀsŽž‚É ---enable-zld ƒIƒvƒVƒ‡ƒ“‚É‚æ‚Á‚Ä ZLD ƒTƒ|[ƒg‚ð—LŒø‚É‚µ‚Ä‚¨‚­ -•K—v‚ª‚ ‚è‚Ü‚·B -

    ZLD cannot be used in the default settings of the mDNkit. When this entry exists in the configuration file, a warning message is displayed. -To make this entry specification effective, it is necessary to use the --enable-zld option to make ZLD support effective when executing configuration of the mDNkit. -

    - -

    ³‹K‰»ƒGƒ“ƒgƒŠ

    -

    Normalization Entry

    - -

    -³‹K‰»ƒGƒ“ƒgƒŠ‚Å‚ÍADNS ƒT[ƒo‚É‘—‚é‘O‚ɃhƒƒCƒ“–¼‚É“K—p‚·‚ׂ« -³‹K‰»‚Ì•ûŽ®‚ðŽw’肵‚Ü‚·B -

    -The normalization entry is used to specify the normalization scheme that should be applied to domain names before sending it to the DNS server. - -

    -
    [\•¶] -
    normalize scheme [scheme..] -
    -
    -
    [Syntax] -
    normalize scheme [scheme..] -
    - -

    -scheme ‚É‚ÍA³‹K‰»Œ`Ž®‚ð‹Lq‚µ‚Ü‚·B -ˆÈ‰º‚Ì‚à‚Ì‚ª‹Lq‚Å‚«‚Ü‚·B -

    -The normalization form is described in scheme. -The following formats can be described. - - -

    -
    ascii-lowercase -
    ASCII ‘å•¶Žš‚ð¬•¶Žš‚ɕϊ· -
    Converts uppercase ASCII to lowercase ASCII -
    ascii-uppercase -
    ASCII ¬•¶Žš‚ð‘å•¶Žš‚ɕϊ· -
    Converts lowercase ASCII to uppercase ASCII -
    unicode-lowercase -
    - Unicode Technical Report #21: Case Mappings - ‚ÉŠî‚¢‚ÄAUnicode ‘å•¶Žš‚ð¬•¶Žš‚ɕϊ· -
    Converts uppercase Unicode to lowercase Unicode based on - Unicode Technical Report #21: Case Mappings -
    unicode-uppercase -
    - Unicode Technical Report #21: Case Mappings - ‚ÉŠî‚¢‚ÄAUnicode ¬•¶Žš‚ð‘å•¶Žš‚ɕϊ· -
    Converts lowercase Unicode to uppercase Unicode based on - Unicode Technical Report #21: Case Mappings -
    unicode-form-c -
    - Unicode Technical Report #15: Unicode Normalization Forms - ‚ÌuForm Cv‚É‚æ‚鳋K‰» -
    Performs normalization using "Form C" of - Unicode Technical Report #15: Unicode Normalization Forms -
    unicode-form-kc -
    - Unicode Technical Report #15: Unicode Normalization Forms - ‚ÌuForm KCv‚É‚æ‚鳋K‰» -
    Performs normalization using "Form KC" - Unicode Technical Report #15: Unicode Normalization Forms -
    ja-kana-fullwidth -
    “ú–{Œê”¼ŠpƒJƒi‚ð‘SŠpƒJƒi‚ɕϊ· -
    Converts single-byte Japanese katakana to double-byte Japanese katakana -
    ja-alnum-halfwidth -
    “ú–{Œê‚Ì‘SŠp‰p”Žš‚¨‚æ‚Ñ‘SŠpƒ}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɕϊ· -
    Converts double-byte Japanese alphanumeric characters and double-byte minus symbols to single-byte characters. -
    ja-compose-voiced-sound -
    “ú–{Œê‚Ì‘SŠp‚©‚ȂƂ»‚ê‚É‘±‚­‘÷“_(J)”¼‘÷“_(K)‚ð - ‘÷“_E”¼‘÷“_‚‚«‚Ì‚©‚È1•¶Žš‚ɕϊ· -
    Converts double-byte Japanese katakana and following voiced consonant marks (J) and circles attached to certain katakana (K) to one katakana character attached with a voiced consonant mark or circle. -
    ja-minus-hack -
    “ú–{Œê‚Ì‘SŠpƒ}ƒCƒiƒX‹L†(|)‚ðƒnƒCƒtƒ“(-)‚ɕϊ· -
    Converts double-byte Japanese minus symbols (|) to hyphens (-). -
    ja-delimiter-hack -
    “ú–{Œê‚Ì‹å“_(B)‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh(D)‚ðƒsƒŠƒIƒh(.)‚ɕϊ· -
    Converts Japanese delimiters (B) and double-byte periods (D) to periods (.). -
    - -

    -³‹K‰»Œ`Ž®‚ɂ͕¡”‚ÌŒ`Ž®‚ªŽw’è‰Â”\‚Å‚·B•¡”‚ÌŒ`Ž®‚ªŽw’肳‚ꂽê‡A -‡˜’Ê‚è‚É (¶‚©‚ç‰E‚É) “K—p‚³‚ê‚Ü‚·B -

    -More than one formats can be specified for the normalization method. When more than one method is specified, they are applied in the order indicated (from left to right). -

    - -

    ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ

    -

    Alternate Encoding Entry

    - -

    -mDNkit ‚Å‘½Œ¾Œê‰»‚³‚ꂽƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ÍA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ðŽ©“®“I‚ÉŒˆ’肵A -DNS ‚̉ž“šƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðA‚»‚̃R[ƒhƒZƒbƒg‚ɕϊ·‚µ‚悤‚Æ‚µ‚Ü‚·B -‚µ‚©‚µAƒhƒƒCƒ“–¼‚ÉŽg—p‚³‚ê‚Ä‚¢‚é‚ ‚é•¶Žš‚ªƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚É -ƒ}ƒbƒv‚³‚ê‚Ä‚¢‚È‚¢‚½‚ß‚ÉA•ÏŠ·‚ÉŽ¸”s‚·‚邱‚Æ‚à‚ ‚蓾‚Ü‚·B -—Ⴆ‚Γú–{ŒêƒR[ƒhƒZƒbƒg‚ðŽg—p‚µ‚Ä‚¢‚é“ú–{Œê‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA -“ú–{Œê‚Ì•¶ŽšƒZƒbƒg‚Ɋ܂܂ê‚Ä‚¢‚È‚¢’†‘Œê‚Ì•¶Žš‚ðŠÜ‚ñ‚¾ DNS -‰ž“š‚ðŽóM‚µ‚½‚悤‚ÈŽž‚É‚±‚̂悤‚È‚±‚Æ‚ª‹N‚±‚è‚Ü‚·B -

    -Resolver library that was made multilingual by the mDNkit automatically determines the local code set used by the application, and tries to convert the domain name in the response message of DNS to that code set. -However, conversion may fail because some characters used for the domain name are not mapped in the local code set. -For example, this happens when a Japanese application using the Japanese code set receives a DNS response that includes Chinese characters that are not included in the Japanese character set. - -

    -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ‚ÍAã‹L‚̂悤‚È–â‘肪¶‚¶‚½Žž‚É -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚éƒR[ƒhƒZƒbƒg‚ðŽw’肵‚Ü‚·B -

    -The alternate encoding entry specifies a code set to be used instead of the local code set when the above type of problem occurs. - -

    -
    [\•¶] -
    alternate-encoding encoding -
    -
    -
    [Syntax] -
    alternate-encoding encoding -
    - -

    -encoding ‚̓R[ƒhƒZƒbƒg–¼‚ÅARACE ‚̂悤‚È -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ðŽg—p‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

    -encoding is a code set name and ASCII-conpatible encoding such as RACE must be used. -

    - -

    ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXƒGƒ“ƒgƒŠ

    -

    Encoding Alias Entries

    - -

    -ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXƒGƒ“ƒgƒŠ‚Å‚ÍAƒR[ƒhƒZƒbƒg–¼‚̃GƒCƒŠƒAƒX‚ð -‹Lq‚µ‚½ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ð‹Lq‚µ‚Ü‚·B -

    -The encoding alias entry contains a description of the path to the file that describes the alias of the code set name. - -

    -
    [\•¶] -
    alias-file pathname -
    -
    -
    [Syntax] -
    alias-file pathname -
    - -

    -pathname ‚É‚ÍAƒGƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚ւ̃pƒX–¼‚ðŽw’肵‚Ü‚·B -‚±‚̃GƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̂悤‚ÈŒ`Ž®‚Ìs‚©‚ç\¬‚³‚ê‚Ü‚·B -

    -pathname specifies the path for the alias file. -This alias file is usually a text file and consists of lines in the following format. - -

    -
    -alias-name name
    -
    -
    - -

    -alias-name ‚Í’è‹`‚³‚ê‚éƒGƒCƒŠƒAƒX–¼‚ÅAname ‚Í -ŽÀۂ̃R[ƒhƒZƒbƒg–¼‚©A’è‹`ς̃GƒCƒŠƒAƒX–¼‚Å‚·B -

    -alias-name is the defined alias name and name is the actual code set name or previously defined alias name. -

    - -

    ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg

    -

    Local Code Set

    - -

    -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ɂ̓[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ðŽw’è‚·‚éƒGƒ“ƒgƒŠ‚Í -‘¶Ý‚µ‚Ü‚¹‚ñB -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚»‚̂Ƃ«‚ÉŽg—p‚µ‚Ä‚¢‚é -ƒƒP[ƒ‹‚Ìî•ñ‚©‚猈’肳‚ê‚é‚©‚ç‚Å‚·B -‚Å‚·‚©‚çA‚»‚ꂼ‚ê‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚»‚ꂼ‚êˆÙ‚È‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·‚µA“¯ˆêƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª•¡”‚̃[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -Ø‚è‘Ö‚¦‚È‚ª‚çŽg—p‚·‚邱‚Æ‚à‰Â”\‚Å‚·B -

    -The client configuration file does not have an entry used to specify local code set. -This is because the local code set is determined based on the locale information used by the application at that time. -Therefore, each application can use a different local code set and also a single application can use more than one local code sets by switching between them. - -

    -mDNkit ‚̓ƒP[ƒ‹î•ñ‚©‚çƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -„‘ª‚µ‚悤‚Æ‚µ‚Ü‚·‚ªAŽž‚ɂ͎¸”s‚·‚邱‚Æ‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAC ƒƒP[ƒ‹‚Å“®ì‚µ‚Ä‚¢‚é‚É‚àŠÖ‚í‚炸 -”ñ ASCII ƒR[ƒhƒZƒbƒg‚ðŽg—p‚µ‚Ä‚¢‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ł̓ƒP[ƒ‹î•ñ‚©‚ç -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð”»’è‚·‚邱‚Ƃ͕s‰Â”\‚Å‚·‚µAmDNkit ‚ª’m‚ç‚È‚¢ -ƒƒP[ƒ‹‚Å“®ì‚·‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ìê‡‚É‚à„‘ª‚ÉŽ¸”s‚·‚é‚Å‚µ‚傤B -

    -mDNkit tries to guess the local code set used by the application based on locale information but it sometimes fails to do so. -For example, though an application may run in the C locale, if the application uses a non-ASCII code set it is impossible to determine the local code set from the locale information. Also, mDNkit will fail when it attempts to guess the local code set an application uses if it does not understand the locale information. - -

    -‚±‚̂悤‚Èꇂ̂½‚ß‚ÉAŠÂ‹«•Ï” MDN_LOCAL_CODESET ‚É‚æ‚Á‚Ä -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð‹­§Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É -‚È‚Á‚Ä‚¢‚Ü‚·B -‚±‚̕ϔ‚ɃR[ƒhƒZƒbƒg–¼ (‚à‚µ‚­‚Í‚»‚̃GƒCƒŠƒAƒX–¼) -‚ðŽw’è‚·‚邯AmDNkit ‚̓ƒP[ƒ‹‚ÌÝ’è‚ÉŠÖ‚í‚炸AŽw’肵‚½ƒR[ƒhƒZƒbƒg‚ð -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚Æ‚µ‚Ä“®ì‚µ‚Ü‚·B -

    -In such cases, the MDN_LOCAL_CODESET environmental variable can be used to forcefully specify the local code set used by the application. -When the code set name (or its alias name) specifies this variable, mDNkit operates using the specified code set as the local code set regardless of the locale setting. - -

    - -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‹Lq—á

    -

    Configuration File Description Example

    - -

    -ˆÈ‰º‚ÉAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Ì‹Lq—á‚ðŽ¦‚µ‚Ü‚·B -

    -Description examples of the configuration file are shown below. - -

    -
    -#
    -# a sample configuration.
    -#
    -
    -# DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE ‚ðŽg—p‚·‚é
    -# Uses RACE as encoding for the DNS protocol
    -server-encoding RACE
    -
    -# ³‹K‰»‚̎臂Ƃµ‚ÄA¬•¶Žš‚ɕϊ·‚µ‚½ŒãAKC ³‹K‰»–@‚ðŽg—p‚·‚é
    -# For the normalization procedure, converts to lowercase and then 
    -# uses the KC normalization method 
    -normalize unicode-lowercase unicode-form-kc
    -
    -# ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE ‚ðŽg—p‚·‚é
    -# Uses RACE for alternate encoding 
    -alternate-encoding RACE
    -
    -
    - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/dnsproxy.html b/contrib/idn/mdnkit/doc/en/spec/dnsproxy.html deleted file mode 100644 index f8b5ba4485..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/dnsproxy.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - -dnsproxy specification - - - - -

    dnsproxy

    - -

    ŠT—v

    -

    Overview

    -

    -dnsproxy‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃[ƒJƒ‹ƒR[ƒhƒx[ƒX‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ŠÜ‚ÞDNS—v‹‚ðŽó‚¯Žæ‚èA‘½Œ¾Œê‰»‘Ήž‚µ‚½DNS‚ªŽó•t‚¯‚ç‚ê‚éƒhƒƒCƒ“–¼‚É -•ÏŠ·‚µA‚Ü‚½‹t‚ÉADNS‚©‚ç‚̉ž“š‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éŒ`Ž®‚É–ß‚µ‚Ü‚·B -

    -dnsproxy receives DNS requests including local code-based multilingual domain names from the client and converts them to domain names that can be accepted by the multilingual DNS. In reverse, it returns multilingual domain names included in responses from the DNS to a format that can be recognized by the client side. -

    -‚±‚ê‚É‚æ‚Á‚ÄAƒNƒ‰ƒCƒAƒ“ƒg‚͉½‚à‰ü‘¢‚·‚邱‚ƂȂ­ -ŠeŽí‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -‚Ü‚½ADNSƒT[ƒo‚©‚猩‚½ê‡‚É‚ÍAƒNƒ‰ƒCƒAƒ“ƒg+dnsproxy‚É‚æ‚Á‚Ä -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚Æ‚µ‚Ä“®ì‚µ‚Ä‚¢‚邿‚¤‚É -Œ©‚¦‚邱‚ƂɂȂè‚Ü‚·B -

    Because of this, the client can use various multilingual domain names without modification. -From the DNS server's point of view, because of client + dnsproxy, the client operates as if it supports multilingual domain names. -

    -‚½‚¾‚µAdnsproxy ‚ª³‚µ‚­“®ì‚·‚é‚É‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð‚»‚Ì‚Ü‚Ü“§‰ß‚³‚¹AƒGƒ‰[‚ɂȂç‚È‚¢ -‚悤‚ɂȂÁ‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·BŽc”O‚È‚ª‚çŒ»Ý UNIX ‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ì -‘½‚­‚Í 8ƒrƒbƒgƒXƒ‹[‚ł͂Ȃ¢‚Ì‚ÅA‚»‚Ì‚Ü‚Ü‚Å‚Í dnsproxy ‚ð—p‚¢‚Ä‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂ͂Ȃè‚Ü‚¹‚ñB‚±‚Ìê‡‚É‚Í -

    -However, in order for dnsproxy to operate correctly, it is necessary for the resolver library of the client to transmit domain names in local encoding as is and does not cause an error. Regretably, many current UNIX resolver libraries are not 8-bit through and they cannot support multilingual domain names even when dnsproxy is used. In such cases, it is necessary to use the following methods. -

    -‚Æ‚¢‚¤‚悤‚È•û–@‚ð‚Æ‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

    ‹N“®

    -

    Usage

    -
    -
    -$ dnsproxy [ƒIƒvƒVƒ‡ƒ“...]
    -
    -
    -
    -
    -$ dnsproxy [Option...]
    -
    -
    -

    - -

    ƒIƒvƒVƒ‡ƒ“

    -

    Option

    -
    - -
    -daemon -
    -

    -dnsproxy‚ðƒf[ƒ‚ƒ“‚Æ‚µ‚Ä‹N“®‚µ‚Ü‚·B -

    -dnsproxy is activated as a daemon. -

    - -

    -config config-file -
    -

    -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ðŽwަ‚µ‚Ü‚·B -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚É‚Í -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -Ú‚µ‚­‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Ì -€‚Åà–¾‚µ‚Ü‚·B -

    -Indicates the configuration file. When the command line does is not used to indicate a configuration file, the default configuration file is used. The details of this are explained in the Configuration section. -

    - -

    -logfile log-file -
    -

    -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -“Á‚ÉŽw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å -Žwަ‚³‚ꂽƒƒOƒtƒ@ƒCƒ‹A‚ ‚é‚¢‚̓fƒtƒHƒ‹ƒg‚̃ƒOƒtƒ@ƒCƒ‹‚É -o—Í‚³‚ê‚Ü‚·B -

    -Specifies the file name for dnsproxy to output the execution log. Unless otherwise specified, the execution log is output to the log file specified by the configuration file or the default log file. - -

    -

    - -

    ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

    -

    Configuration

    -

    -Ý’èî•ñ‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‹LÚ‚³‚ê‚Ü‚·B -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍA -dnsproxy‚Ì‹N“®Žž‚ɃRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -The configuration information is written in the configuration file. -The configuration file can be specified by the command line upon activation of dnsproxy. -

    -
    -% dnsproxy -config <config-file>
    -
    -
    -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚É‚Í -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍAƒfƒBƒŒƒNƒgƒŠ -
    -    /usr/local/etc
    -
    -‚̉º‚Ì -
    -    dnsproxy.conf
    -
    -‚Å‚·BƒfƒBƒŒƒNƒgƒŠ‚ÍAmDNkit쬎ž‚É -
    -    configure --sysconfdir=DIR
    -
    -‚ÅŽwަ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

    When the configuration file is not specified by the command line, the default configuration file is used. -The default configuration file is located in -

    -    dnsproxy.conf
    -
    -under -
    -    /usr/local/etc
    -
    - -The directory can be specified by -
    -    configure --sysconfdir=DIR
    -
    -when mDNkit is created. -

    -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B -

    -The configuration file is a text file and specifies the following configuration data. - -

    - -
    listen
    -

    -dnsproxy‚ªƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì—v‹‚ðŽó•t‚¯‚é -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

    -Specifies the network address and port number used by dnsproxy to accept requests from the client. -

    -    listen <address>
    -
    -<address>‚͈ȉº‚Ì‚¢‚¸‚ê‚©‚ÌŒ`Ž®‚ÅŽwަ‚µ‚Ü‚·B -

    <address> is specified using one of the following formats. -

    - - - - -
    <IP address>:<port number>
    :<port number>
    <IP address>
    -
    -È—ª‚³‚ê‚½ê‡‚É‚Í -
    When omitted -
    - - - -
    IP address0.0.0.0 # INADDR_ANY
    port number53
    -
    -‚ªŽg—p‚³‚ê‚Ü‚·B -
    is used. -

    - -

    forward
    -

    -dnsproxy‚ªADNS—v‹‚ð“]‘—‚µA‰ž“š‚ðŽó‚¯Žæ‚é–{—ˆ‚ÌDNSƒT[ƒo‚Ì -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

    -dnsproxy specifies the original network address and port number of the DNS server that transfers DNS requests and accepts responses. -

    -    forward <address> [ bind4compat ]
    -
    -<address>‚ÌŒ`Ž®‚Íã‚Ìlisten‚Ì‚à‚̂Ɠ¯‚¶‚Å‚·B -
    <address> format is the same as the above listen. -

    -ƒIƒvƒVƒ‡ƒ“‚Ì bind4compat‚ªŽwަ‚³‚ꂽꇂɂÍA -UDP‚ÅƒŠƒNƒGƒXƒg‚ð“]‘—‚·‚鎞‚ÉAƒ\[ƒXƒAƒhƒŒƒX‚Æ‚µ‚ÄA -listen‚ÅŽwަ‚³‚ꂽƒAƒhƒŒƒX/ƒ|[ƒg‚ðŽg—p‚µ‚Ü‚·B -

    When an option bind4compat is specified, the address/port specified by listen is used as the source address when a request is transferred via UDP. -

    - -

    log-file
    -

    -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -

    -Specifies the file name for dnsproxy to output the execution log. -

    -    log-file <path>
    -
    -ƒƒOƒtƒ@ƒCƒ‹–¼‚ÍA -ˆÈ‰º‚̃Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÅŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -—¼•ûŽw’肵‚½ê‡‚ɂ̓Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è‚̂ق¤‚ª—D悳‚ê‚Ü‚·B -

    The log file name can be specified by the following command line option. When both are specified, priority is given to the command line option specification. -

    -    dnsproxy -logfile <address>
    -
    -Žw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA -
    -    /tmp/dnsproxy.log
    -
    -‚É‘‚«ž‚Ü‚ê‚Ü‚·B -

    When the log file name is not specified, the execution log is output to -

    -    /tmp/dnsproxy.log
    -
    -

    - -

    log-level
    -

    -ƒƒO‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B -

    Sets the log level. -

    -    log-level <level>
    -
    -ƒŒƒxƒ‹‚Æ‚µ‚ÄŽw’è‚Å‚«‚é’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

    The level values that can be specified are as follows. -

    -
    -
    none
    ˆê؃ƒO‚ð‹L˜^‚µ‚Ü‚¹‚ñB -
    none
    Logs are not recorded at all. -
    fatal
    ’v–½“I‚ȃGƒ‰[‚̂݋L˜^‚µ‚Ü‚·B -
    fatal
    Records only fatal errors. -
    warn
    ŒxƒƒbƒZ[ƒW‚à‹L˜^‚µ‚Ü‚· -
    warn
    Records warning messages as well. -
    trace
    ŽÀsƒgƒŒ[ƒXƒƒbƒZ[ƒW‚à‹L˜^‚µ‚Ü‚·B -
    trace
    Records execution trace messages as well. -
    -
    -

    Žw’肵‚È‚©‚Á‚½ê‡‚̃fƒtƒHƒ‹ƒg‚Í warn ‚Å‚·B -

    When the value is not specified, the default is warn. -

    none ‚ðŽw’肵‚½ê‡AƒƒOƒtƒ@ƒCƒ‹‚Í쬂³‚ê‚Ü‚¹‚ñB -

    When none is specified, no log file is created. -

    trace ƒŒƒxƒ‹‚ðŽw’è‚·‚邯‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚Ì‚ÅA’ZŽžŠÔ‚Å -ƒƒOƒtƒ@ƒCƒ‹‚ª‹‘å‚ɂȂé‰Â”\«‚ª‚ ‚è‚Ü‚·B’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -

    Use care that when the trace level is specified, large log files are output and it is possible that the log file can become very large in a short period of time. -

    - -

    client-translation
    -

    -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽwަ‚µ‚Ü‚·B -

    Indicates the encoding of the domain name at the client side. -

    -    client-translation <ZLD> <Encoding>
    -
    -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ÌꇂɂÍA -’ÊíAƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚»‚̂悤‚Èê‡‚É‚Í -

    When the client does not support multilingual domain names, usually the local encoding used by the client is used. In such a case, use the following form -

    -    client-translation . Shift_JIS
    -
    -‚Æ‚¢‚¤Œ`‚ÅA<ZLD>–³‚µ‚ÅŽwަ‚µ‚Ü‚·B -

    and with no <ZLD>. -

    -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚É‚æ‚Á‚Ä‚ÍA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð’Êí‚ÌDNS‚Å‚à -Žó•t‚¯‚ç‚ê‚éŒ`Ž®‚ɃGƒ“ƒR[ƒh‚µ‚ÄA‚»‚ê‚ð’Êí‚̃hƒƒCƒ“–¼‚Æ -‹æ•Ê‚·‚邽‚ß‚É ZLD (Zero Level Domain) ‚ð•t‰Á‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚»‚̂悤‚ÈꇂɂÍA•t‰Á‚³‚ê‚éZLD‚Æ‚»‚ÌŽž‚̃hƒƒCƒ“–¼‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚ð‘Ήž•t‚¯‚邱‚Ƃɂæ‚èA -‘¼‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚ÌDNSƒT[ƒo‚ð—˜—p‚·‚邱‚Æ‚ª -‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

    -Depending on the multilingual domain name method used, the client side encodes multilingual domain names so that the usual DNS can accept them and adds ZLD (Zero Level Domain) in order to distinguish them from the usual domain names. -In such cases, by associating the added ZLD and encoding method of the domain name at that time, it becomes possible to use DNS servers that use another multilingual domain name method. -

    -    client-translation .i-dns.net UTF-5
    -
    -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -ZLD ‚ªˆÙ‚È‚Á‚Ä‚¢‚ê‚ÎA•¡”Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    More than one encoding method can be specified for domain names at the client side when the ZLD is different. -

    -‚½‚¾‚µAmDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ÌŽw’è‚͂ł«‚È‚¢‚悤‚É -‚È‚Á‚Ä‚¢‚Ü‚·BZLD ‚ðŽg—p‚·‚邽‚߂ɂÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹‚ÌÛA -configure ƒRƒ}ƒ“ƒh‚É ---enable-zld -‚ðŽw’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚ÌŽw’è‚ð‚¹‚¸‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍAZLD ‚ÌŽw’è‚Í -‚·‚ׂ˳ދ‚³‚ê‚Ü‚·B -

    -However, ZLD cannot be specified with the default setting of mDNkit. In order to use ZLD, it is necessary to specify --enable-zld in the configure command when compiling mDNkit. -If mDNkit is compiled without this specification, ZLDs are all ignored even though they may be specified. -

    -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -‚±‚±‚ÅŽwަ‚µ‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA“à•”“I‚ÉŽg—p‚³‚ê‚é -UTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ü‚·B -‚»‚µ‚ÄAŒãq‚̳‹K‰»AƒT[ƒo‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ª -s‚È‚í‚ê‚ÄDNSƒT[ƒo‚É‘—o‚³‚ê‚Ü‚·B‚Ü‚½ADNSƒT[ƒo‚©‚ç‚Ì -‰ž“š‚ÍA‹t‚ÉŒ³‚̃Gƒ“ƒRƒf[ƒBƒ“ƒO‚É–ß‚³‚ê‚ăNƒ‰ƒCƒAƒ“ƒg‚É -•Ô‚³‚ê‚Ü‚·B -

    -The domain name of the DNS request sent from the client is converted from the specified encoding to the internally used UTF-8 encoding. -Then, normalization (explained below) and conversion to the server side encoding are performed and it is output to the DNS server. Also, the response from the DNS server is converted back to the orginal encoding and is returned to the client. -

    -‚±‚±‚ÅŽw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAmDNkit•t‘®‚Ìlibmdn‚¨‚æ‚Ñ -Žg—p‚·‚éiconv ƒ‰ƒCƒuƒ‰ƒŠ‚Ɉˑ¶‚µ‚Ü‚·B -iconv ƒ‰ƒCƒuƒ‰ƒŠ‚É‚æ‚Á‚ÄAƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ªˆÙ‚È‚Á‚Ä‚¢‚é -‚±‚Æ‚ª‚ ‚è‚Ü‚·‚Ì‚ÅAƒ‰ƒCƒuƒ‰ƒŠ‚̃}ƒjƒ…ƒAƒ‹‚ð‚²——‚ɂȂÁ‚Ä -Žg—p‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B -•t‘®‚Ìlibmdn‚Å‚ÍAiconv‚ª’ñ‹Ÿ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘¼‚ÉA -‘½Œ¾Œê‰»DNS—p‚É’ñˆÄ‚³‚ê‚Ä‚¢‚é -

    -Encoding names that can be specified here depend on libmdn attached to mDNkit and iconv library used. -Encoding names may differ depending on the iconv library. Refer to the manual of the library and check the encoding names that can be used. -With the attached libmdn, in addition to the coding provided by iconv, the following proposed multilingual DNS coding methods are supported. -

    - - - - - - - - - - - - - -
    UTF-5draft-jseng-utf5-01.txt
    RACEdraft-ietf-idn-race-02.txt
    BRACEdraft-ietf-idn-brace-00.txt
    LACEdraft-ietf-idn-lace-00.txt
    -
    -‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -

    -

    alternate-encoding -
    -

    DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽƒhƒƒCƒ“–¼‚ªƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚Å‚«‚È‚¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -

    When a domain name returned from the DNS server includes characters that cannot be converted to the local encoding used by the client, this specifies the encoding to be used instead of local encoding. -

    -    alternate-encoding <Encoding>
    -
    -Žw’è‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í•K‚¸uASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE)v‚ƌĂ΂ê‚éA -•ÏŠ·Œ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš (‰p”Žš‚¨‚æ‚уnƒCƒtƒ“) ‚¾‚¯ -‚©‚ç‚È‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚½‚Æ‚¦‚Î ASCII ŒÝŠ· -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚ðŽw’è‚·‚éꇂɂ͎Ÿ‚̂悤‚ÉŽw’肵‚Ü‚·B -

    The specified encoding must be "ASCII-conpatible encoding (ACE)" so that the conversion result consists of only characters (alphanumeric characters and hyphens) that are used in conventional domain names. For example, to specify RACE (one type of ASCII-compatible encoding), specify as follows. -

    -    alternate-encoding RACE
    -
    -

    -

    normalize
    -

    -ƒhƒƒCƒ“–¼‚̳‹K‰»Žè–@‚ðŽw’肵‚Ü‚·B -

    -Specifies the normalization method used for domain names. -

    -    normalize <scheme> ...
    -
    -³‹K‰»Žè–@‚Í•¡”Žw’è‰Â”\‚ÅA¶‘¤‚©‚燂ɓK—p‚³‚ê‚Ä‚¢‚«‚Ü‚·B -

    More than one normalization method can be specified and they are applied in order starting from the left side. -

    -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -“à•”“I‚ÉŽg—p‚³‚ê‚éUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽã‚ÅA -‚±‚±‚ÅŽwަ‚µ‚½³‹K‰»‚ª“K—p‚³‚ê‚Ü‚·B -

    -Domain names in the DNS request sent from the client are converted to internally used UTF-8 encoding and then the normalization specified here is applied. -

    -ŽŸ‚ÉŽ¦‚·³‹K‰»Žè–@‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

    -The following normalization methods can be specified. -

    -

      -
    • ascii-uppercase -
    • ascii-lowercase -
    • unicode-uppercase -
    • unicode-lowercase -
    • unicode-form-c -
    • unicode-form-kc -
    • ja-kana-fullwidth -
    • ja-alnum-halfwidth -
    • ja-compose-voiced-sound -
    • ja-minus-hack -
    • ja-delimiter-hack -
    -

    ‚»‚ꂼ‚ê‚Ì“à—e‚ɂ‚¢‚Ä‚Í -libmdn‚̃}ƒjƒ…ƒAƒ‹‚Ì -normalizer ƒ‚ƒWƒ…[ƒ‹ -‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

    For details of each method, refer to normalizer module of the libmdn manual -

    - -

    server-translation
    -

    -DNSƒT[ƒo‘¤‚̃hƒƒCƒ“–¼ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚ðŽwަ‚µ‚Ü‚·B -

    -Indicates the encoding method used for domain names at the DNS server side. -

    -    server-translation <ZLD> <Encoding>
    -
    -ZLD‚ª•s—v‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚ÎA<ZLD> ‚Ì•”•ª‚É‚Í -'.' ‚ðŽwަ‚µ‚Ü‚·B -

    When the encoding method does not need a ZLD, specify '.' in <ZLD>. -

    -    server-translation . UTF-8
    -
    -ZLD‚ð•K—v‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ÍAZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Ì -—¼•û‚ðŽw’肵‚Ü‚·B -

    When the encoding method requires a ZLD, specify both the ZLD and encoding name. -

    -    server-translation .i-dns.net UTF-5
    -
    -ZLD ‚ÌŽw’è‚ð—LŒø‚É‚·‚é‚É‚ÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹Žž‚Ìݒ肪•K—v‚Å‚·B -client-translation‚Ì€‚ð -‚²——‚­‚¾‚³‚¢B -

    To make the ZLD specification active, you must set a setting when compiling mDNkit. -Refer to the client-translation section for details. -

    -Žw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA‘Oo‚Ì -client-translation ‚ł̂à‚̂Ɠ¯‚¶‚Å‚·B -

    -The encoding methods that can be specified are the same as those previously explained in -client-translation. -

    -

    user-id -
    -

    dnsproxy ‚ª“®ì‚·‚郆[ƒU‚ðŽw’肵‚Ü‚·B -

    Specifies users for whom dnsproxy is operational. -

    -    user-id <user>
    -
    -

    ’ÊíAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ðŽg—p‚·‚邽‚߃‹[ƒgŒ ŒÀ‚Å‹N“®‚³‚¹‚é•K—v‚ª -‚ ‚è‚Ü‚·‚ªAƒ‹[ƒgŒ ŒÀ‚̂܂܂œ®ì‚³‚¹‚é‚̂̓ZƒLƒ…ƒŠƒeƒBãD‚Ü‚µ‚­‚ ‚è‚Ü‚¹‚ñB -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ð쬂µ‚½‚ ‚ƃT[ƒrƒX‚ðŠJŽn‚·‚é‘O‚É -Žw’肵‚½ƒ†[ƒU‚ÌŒ ŒÀ‚Å“®‚­‚悤‚ɂȂè‚Ü‚·B -

    Usually, since dnsproxy uses a special port, it can only be activated if the user has root authorization; however, operating under root authorization is not recommended for security reasons. -With this specification, after the special port is created, dnsproxy operates uner the specified user authorization before starting the service. -

    <user> ‚ɂ̓†[ƒU–¼‚ ‚é‚¢‚̓†[ƒU ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -
    User name or user ID number can be specified in <user>. -

    -

    group-id -
    -

    dnsproxy ‚ª“®ì‚·‚éƒOƒ‹[ƒv‚ðŽw’肵‚Ü‚·B -

    Specifies the group wherein dnsproxy operates. -

    -    group-id <user>
    -
    -‚±‚ê‚Í user-id ƒGƒ“ƒgƒŠ‚ÆŽ—‚Ä‚¢‚Ü‚·‚ªAƒ†[ƒU‚Ì‘ã‚í‚è‚ɃOƒ‹[ƒv‚ð -Žw’è‚·‚é“_‚ªˆÙ‚È‚è‚Ü‚·B -

    This looks like the user-id entry but differs in that a group is specified instead of a user. -

    <group> ‚ɂ̓Oƒ‹[ƒv–¼‚ ‚é‚¢‚̓Oƒ‹[ƒv ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚Ü‚·B -

    The group name or group ID number can be specied in <group>. -

    -

    root-directory -
    -

    dnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B -

    Specifies the root directry when dnsproxy operates. -

    -    root-directory <path>
    -
    -

    ‚±‚ê‚àƒZƒLƒ…ƒŠƒeƒB‘Îô‚̈ê‚‚ł·Bdnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ -‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚̃fƒBƒŒƒNƒgƒŠ‚ÌŠO‚ɂ̓AƒNƒZƒX‚Å‚«‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚̓T[ƒrƒX‚ðŠJŽn‚·‚é‘O‚ÉAchroot() -ƒVƒXƒeƒ€ƒR[ƒ‹‚ð—p‚¢‚ÄŽw’肵‚½ƒfƒBƒŒƒNƒgƒŠ‚ðƒ‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚Æ‚µ‚Ä -ݒ肵‚Ü‚·B -

    This is also a security measure. By specifying the root directory when dnsproxy operates, access other than by the specified directory is prevented. -Because of this specification, dnsproxy sets the specified directry using the chroot() system call as the root directory before dnsproxy starts the service. -

    <path> ‚ɂ̓‹[ƒg‚Æ‚µ‚Äݒ肵‚½‚¢ƒfƒBƒŒƒNƒgƒŠ–¼‚ðŽw’肵‚Ü‚·B -

    Directry name to be set as the root is specified in <path>. - -

    -

    - -

    ƒVƒOƒiƒ‹

    -

    Signal

    - -

    dnsproxy ‚É SIGHUP ƒVƒOƒiƒ‹‚ð‘—‚é‚ÆAƒƒOƒtƒ@ƒCƒ‹‚ð‚¢‚Á‚½‚ñ•‚¶A -Ä“xƒI[ƒvƒ“‚·‚邯‚¢‚¤“®ì‚ðs‚¢‚Ü‚·B‚±‚ê‚ÍŽŸ‚̂悤‚Ȏ臂Š-ƒƒO‚ðƒA[ƒJƒCƒu‚Å‚«‚邿‚¤‚É‚·‚邽‚߂ł·B -

    When a SIGHUP signal is sent to dnsproxy, the log file is closed and opened again. This is performed so that the log can be archived as described in the following procedure. -

      -
    1. mv ƒRƒ}ƒ“ƒh“™‚ð—p‚¢‚ăƒOƒtƒ@ƒCƒ‹‚ð•ʂ̖¼‘O‚É‚·‚éB -
      Use mv command to create a different name for the log file. -
    2. dnsproxy ‚É SIGHUP ‚ð‘—‚èAV‚½‚ȃƒOƒtƒ@ƒCƒ‹‚ðƒI[ƒvƒ“‚³‚¹‚éB -
      Send a SIGHUP signal to dnsproxy to open a new log file. -
    - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/index.html b/contrib/idn/mdnkit/doc/en/spec/index.html deleted file mode 100644 index 35bf1be9eb..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -mDNkit Documentation - - - - - -

    mDNkit ƒhƒLƒ…ƒƒ“ƒg

    -

    mDNkit Documentation

    - -

    mDNkit ‚̃hƒLƒ…ƒƒ“ƒg‚͈ȉº‚̂悤‚È3•”\¬‚ƂȂÁ‚Ä‚¢‚Ü‚·B -

    The mDNkit consists of three documents as described below. - -

      -
    • mDNkit ƒ†[ƒU[ƒYƒKƒCƒh
      - ƒVƒXƒeƒ€ŠÇ—ŽÒ‚¨‚æ‚шê”ʃ†[ƒUŒü‚¯‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -

      - -

        -
      • mDNkit User's Guide
        - Manual for users and system administrators -

        - -

      • mDNkit Žd—l‘
        - –{ƒLƒbƒg‚ÌŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚ÌŽd—l‘‚Å‚·B -

        - -

      • mDNkit Specifications
        - Specifications for each component of this kit -

        - -

      • mDNkit Frequently Asked Questions
        - –{ƒLƒbƒg‚Ì FAQ (JPNIC Web ƒy[ƒW‚Ö‚ÌƒŠƒ“ƒN)‚Å‚·B - FAQ ‚ÍŽžXV‚³‚ê‚邽‚ßA‚±‚̃pƒbƒP[ƒW‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚¹‚ñB - ‚²—¹³‚­‚¾‚³‚¢B - -
      • mDNkit Frequently Asked Questions
        - Link to the FAQ on the JPNIC Web page - Note that the FAQ is not included in this package because it is updated continually. -
      - -

      mDNkit ƒ†[ƒU[ƒYƒKƒCƒh‚¨‚æ‚Ñ mDNkit Žd—l‘‚Ì“à—e‚Í -mDNkit ƒo[ƒWƒ‡ƒ“ 1.2 ‚ɑΉž‚µ‚Ä‚¢‚Ü‚·B - -

      mDNkit User's Guide and Specifications are for mDNkit version 1.2. - -

      ŠÖ˜A‚·‚éƒhƒLƒ…ƒƒ“ƒg‚¨‚æ‚ÑŠÖ˜Aƒ\ƒtƒgƒEƒFƒA‚Ȃǂւ̃|ƒCƒ“ƒ^‚ð‚܂Ƃ߂½ -ŽQl•¶Œ£‚̃y[ƒW‚à‚²——‚­‚¾‚³‚¢B - -

      Also refer to the following page containing pointers pertaining to related documents and softwares. -Reference Documentation - - -

      –{ƒLƒbƒg‚ÉŠÖ‚·‚éƒRƒƒ“ƒg‚Í -idn-cmt@nic.ad.jp -‚ÉA‚Ü‚½ƒoƒOƒŒƒ|[ƒg‚Í -mdnkit-bugs@nic.ad.jp -‚É‚»‚ꂼ‚ꂨ‘—‚è‚­‚¾‚³‚¢B - -

      Please send comments to: -idn-cmt@nic.ad.jp -and reports of bugs to: -mdnkit-bugs@nic.ad.jp - - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/library.html b/contrib/idn/mdnkit/doc/en/spec/library.html deleted file mode 100644 index b990d54da5..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/library.html +++ /dev/null @@ -1,3135 +0,0 @@ - - - - - -MDN libarary specification - - - - -

      MDN Library

      - - - -
      - -

      ‹@”\ŠT—v

      -

      Function Overview

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ϊ·‚ÉŠÖ‚í‚éŠeŽí‚̈—‚ð -ŽÀ‘•‚·‚郂ƒWƒ…[ƒ‹‚ÌW‡‚Å‚·B‚±‚̃‰ƒCƒuƒ‰ƒŠ‚͈ȉº‚̂悤‚È‹@”\‚ð -’ñ‹Ÿ‚µ‚Ü‚·B
      -The MDN library (libmdn) is a group of modules that provide various processing with respect to multilingual domain name conversion. This library provides the following features. - -

        -
      • ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) •ÏŠ·
        -Encoding (code set) conversion -
      • •¶Žš—ñ‚̳‹K‰»
        -Normalization of character strings -
      • DNS ƒƒbƒZ[ƒW‚̉ðÍAÄ‘g‚Ý—§‚Ä
        -Analysis and reassembly of DNS messages -
      • ZLD (Zero Level Domain) ‚̃}ƒbƒ`ƒ“ƒOAíœA’ljÁ
        -Matching, removal and addition of ZLD (Zero Level Domain) -
      • ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì”»•Ê
        -Local encoding identification -
      • ƒNƒ‰ƒCƒAƒ“ƒg—pÝ’èƒtƒ@ƒCƒ‹‚̓ǂݞ‚Ý
        -Loading of client configuration files - - -

        ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) •ÏŠ·

        -

        Encoding (code set) conversion

        - -

        •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µA‚»‚ÌŒ‹‰Ê‚ð•Ô‚µ‚Ü‚·B -MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì“à•”‚Å‚ÍA•¶Žš—ñ‚Í‚·‚×‚Ä UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚邯‚µ‚Ä -Žæ‚舵‚í‚ê‚Ü‚·B‚»‚±‚ÅA‚±‚̃‚ƒWƒ…[ƒ‹‚Í
        -Converts character string encoding and returns the result. -Inside the MDN library, character strings are all handled as UTF-8 encoding. This module supports the following conversions. -

          -
        • ‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ·
          -Conversion from certain encoding methods to UTF-8 -
        • UTF-8 ‚©‚ç‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·
          -Conversion from UTF-8 to certain encoding methods -
        -‚ðƒTƒ|[ƒg‚µ‚Ü‚·B - -
      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚͑傫‚­•ª‚¯‚ÄAŽŸ‚Ì2Ží—Þ‚ª‚ ‚è‚Ü‚·B
      -Encoding is roughly divided into the following two types. -

        -
      • ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒVƒtƒgJISAEUC “™)
        -Encoding used by applications (shift JIS, EUC, etc.) -
      • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÅŽg—p‚·‚邽‚߂ɃfƒUƒCƒ“‚³‚ꂽ“Á•ʂȃGƒ“ƒR[ƒfƒBƒ“ƒO -(UTF-5ARACE “™)
        -Special encoding designed to be used for multilingual domain names -(UTF-5ARACE etc.) -
      -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚ł͑OŽÒ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É -iconv() ƒ†[ƒeƒBƒŠƒeƒB‚ðŽg—p‚µAŒãŽÒ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É‚Í -“ÆŽ©‚̕ϊ·ŠÖ”‚ðŽÀ‘•‚µ‚ÄŽg—p‚µ‚Ä‚¢‚Ü‚·B
      -This module uses the iconv() utility for the first encoding conversion process and implements a unique conversion function for the latter encoding conversion. - -

      - -

      •¶Žš—ñ‚̳‹K‰»

      -

      Normalization of character strings

      - -

      —^‚¦‚ç‚ꂽ•¶Žš—ñ‚ð³‹K‰»‚µ‚Ü‚·B•W€‚ł͎Ÿ‚É‚ ‚°‚鳋K‰»‚ðƒTƒ|[ƒg‚µ‚Ü‚·B
      -Normalizes given character strings. The following standard normalization functions are supported. -

        -
      • ASCII ‚̬•¶Žš¨‘å•¶Žš•ÏŠ· -
        Converts lowercase ASCII to uppercase ASCII -
      • ASCII ‚Ì‘å•¶Žš¨¬•¶Žš•ÏŠ· -
        Converts uppercase ASCII to lowercase ASCII -
      • UnicodeData.txt ‚É]‚Á‚½¬•¶Žš¨‘å•¶Žš•ÏŠ·
        - Converts lowercase to uppercase as specified in UnicodeData.txt -
      • UnicodeData.txt ‚É]‚Á‚½‘å•¶Žš¨¬•¶Žš•ÏŠ·
        - Converts uppercase to lowercase as specified in UnicodeData.txt -
      • Unicode Normalization Form C -
        Unicode Normalization Form C -
      • Unicode Normalization Form KC -
        Unicode Normalization Form KC -
      • “ú–{Œê‚Ì”¼Šp‚©‚Ȩ‘SŠpƒJƒ^ƒJƒi•ÏŠ·
        - Converts single-byte Japanese katakana to double-byte katakana -
      • ‘SŠpƒ}ƒCƒiƒX‹L†¨”¼ŠpƒnƒCƒtƒ“•ÏŠ·
        - Converts double-byte minus symbols to single-byte hyphens -
      • ‹å“_(B)A‘SŠpƒsƒŠƒIƒh(D)¨ƒsƒŠƒIƒh(.)•ÏŠ· -
        Converts Japanese periods (B) and double-byte periods (D) to periods (.) -
      - -
      - -

      DNS ƒƒbƒZ[ƒW‚̉ðÍAÄ‘g‚Ý—§‚Ä
      - Analysis and assembly of DNS messages

      - -

      DNS ƒvƒƒLƒVƒT[ƒo (dnsproxy) ‚Å‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ DNS -ƒƒbƒZ[ƒW‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ɑ΂µ‚ăGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¢A -‚»‚ÌŒ‹‰Ê‚ð DNS ƒT[ƒo‚É‘—‚è‚Ü‚·B‚±‚Ì‚½‚߂Ɉȉº‚Ì‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -In the DNS proxy server (dnsproxy), encoded domain names included in DNS messages sent from the client are converted and normalized and the result is sent to the DNS server. This process is comprised of the following functions: -

        -
      • DNSƒƒbƒZ[ƒW‚ð‰ðÍ‚µAƒhƒƒCƒ“–¼‚ðŽæ‚èo‚·
        - Analyzes DNS messages and extracts domain names -
      • •ÏŠ·‚µ‚½ƒhƒƒCƒ“–¼‚ð—p‚¢‚ÄDNSƒƒbƒZ[ƒW‚ðÄ\¬‚·‚é
        - Re-constructs DNS messages using converted domain names -
      - -
      - -

      ZLD (Zero Level Domain) ‚̃}ƒbƒ`ƒ“ƒOAíœA’ljÁ
      - Matching, removal and addition of ZLD (Zero Level Domain)

      - -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽ¯•Ê‚·‚邽‚ß‚É ZLD ‚ð•K—v‚Æ‚·‚é•ûŽ®‚Ì‚½‚ß‚ÉAZLD ‚É -ŠÖ‚·‚éˆÈ‰º‚Ì‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -To identify multilingual domain names, the following ZLD-related functions are provided: -

        -
      • •¡”‚Ì ZLD ‚Ì’†‚©‚çAƒhƒƒCƒ“–¼‚Ƀ}ƒbƒ`‚·‚é‚à‚Ì‚ð’T‚·
        - Of the multiple number of ZLDs, finds the one that matches the domain name -
      • ƒhƒƒCƒ“–¼‚©‚ç ZLD •”•ª‚ð휂·‚é
        - Removes the ZLD portion from the domain name -
      • ƒhƒƒCƒ“–¼‚É ZLD ‚ð’ljÁ‚·‚é
        - Adds ZLD to the domain name -
      - -
      - -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì”»•Ê
      - Local encoding identification

      - -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO -(ƒR[ƒhƒZƒbƒg) ‚ðŽ©“®”»•Ê‚µ‚Ü‚·B”»•ʂ͊î–{“I‚ɂ̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚̃ƒP[ƒ‹ -î•ñ‚ð—˜—p‚µ‚Ü‚·‚ªAŠÂ‹«•Ï”‚ÅŽw’è‚·‚邱‚Æ‚à‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B
      -Automatically identifies the local encoding (code set) used by the application program. Basically, the application locale information is used, though the local encoding (code set) can also be specified using an environmental variable. - -

      - -

      ƒNƒ‰ƒCƒAƒ“ƒg—pÝ’èƒtƒ@ƒCƒ‹‚̓ǂݞ‚Ý
      - Loading of client configuration file

      - -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚郊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO -•ÏŠ·‚ⳋK‰»‚ðs‚¤ê‡AŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»•ûŽ®‚Í -Ý’èƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ê‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -When the resolver library linked by the application is used to perform conversion or normalization, the encoding and normalization method to be used is described in the configuration file. A function is provided to load this file. -

      -


      -

      ƒ‚ƒWƒ…[ƒ‹ˆê——
      - Module list

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚͈ȉº‚̃‚ƒWƒ…[ƒ‹‚©‚ç\¬‚³‚ê‚Ü‚·B
      -The MDN library consists of the following modules. - -

      -
      brace ƒ‚ƒWƒ…[ƒ‹
      brace module
      -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é BRACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹
      - Conversion module for the proposed BRACE encoding domain name encoding method -
      converter module -
      •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹
      - Conversion module for character string encoding (code set) -
      debug module -
      ƒfƒoƒbƒO—po—͂̂½‚߂̃†[ƒeƒBƒŠƒeƒBƒ‚ƒWƒ…[ƒ‹
      - Utility module for debug output -
      dn module -
      DNS ƒƒbƒZ[ƒW“à‚̃hƒƒCƒ“–¼‚Ì“WŠJEˆ³k‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Extraction/compression module for domain names inside DNS messages -
      lace module -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é LACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹
      - Conversion module for the proposed LACE encoding domain name encoding method -
      localencoding module -
      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð„‘ª‚·‚郂ƒWƒ…[ƒ‹
      - Guesses which encoding is used by the application -
      log module -
      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚̃ƒO‚Ìo—͈—‚ð§Œä‚·‚郂ƒWƒ…[ƒ‹
      - Controls MDN library log output processing -
      msgheader module -
      DNS ƒƒbƒZ[ƒW‚̃wƒbƒ_‚̉ð̓‚ƒWƒ…[ƒ‹
      - Analyzes the header of the DNS message -
      msgtrans module -
      DNS ƒvƒƒLƒVƒT[ƒo‚Å‚Ì DNS ƒƒbƒZ[ƒW‚̕ϊ·‚ðs‚¤‚½‚߂̃‚ƒWƒ…[ƒ‹
      - Converts the DNS message at the DNS proxy server -
      normalizer module -
      •¶Žš—ñ‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Normalizes character strings -
      race module -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é RACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹
      - Conversion module for proposed RACE domain name encoding method -
      res module -
      ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠA‚ ‚é‚¢‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ŃhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤‚½‚߂̃Cƒ“ƒ^ƒtƒF[ƒX‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹
      - Provides an interface to perform encoding conversion or normalization of domain names by the resolver library or application -
      resconf module -
      ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠA‚ ‚é‚¢‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ŃhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤Û‚ÌÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‚½‚߂̃‚ƒWƒ…[ƒ‹
      - Loads the configuration file used by the resolver library or application during encoding conversion and normalization of domain names -
      result module -
      ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠeŠÖ”‚ª•Ô‚·ƒŠƒUƒ‹ƒgƒR[ƒh‚ðˆµ‚¤ƒ‚ƒWƒ…[ƒ‹
      - Handles the result code returned by each library function -
      selectiveencode module -
      ƒeƒLƒXƒg‚Ì’†‚©‚ç”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ð’T‚µo‚·ƒ‚ƒWƒ…[ƒ‹
      - Finds domain names that include non-ASCII characters -
      strhash module -
      •¶Žš—ñ‚ðƒL[‚Æ‚·‚éƒnƒbƒVƒ…•\‚ðŽÀŒ»‚·‚郂ƒWƒ…[ƒ‹
      - Implements a hash table that uses character strings as keys -
      translator module -
      —^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É]‚Á‚ăhƒƒCƒ“–¼‚ð•ÏŠ·‚·‚郂ƒWƒ…[ƒ‹
      - Converts domain name according to the specified parameters -
      unicode module -
      Unicode ‚ÌŠeŽí•¶Žš‘®«‚ðŽæ“¾‚·‚郂ƒWƒ…[ƒ‹
      - Obtains various Unicode character properties -
      unormalize module -
      Unicode ‚Å’è‹`‚³‚ê‚Ä‚¢‚é•W€‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Performs standard normalization defined by Unicode -
      utf5 module -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é UTF-5 - ‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Performs basic processing for the proposed UTF-5 domain name encoding method -
      utf8 module -
      UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO•¶Žš—ñ‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Performs basic processing of UTF-8 encoding character strings -
      util module -
      ‘¼‚̃‚ƒWƒ…[ƒ‹‚ÅŽg‚í‚ê‚鋤—pŠÖ”‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹
      - Provides common functions used by other modules -
      ZLDrule module -
      ƒhƒƒCƒ“–¼‚Æ ZLD ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹
      - Matches domain names and ZLD -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚̌ĂÑo‚µŠÖŒW}‚ðŽ¦‚µ‚Ü‚·B‚½‚¾‚µ‚Ù‚Æ‚ñ‚Ç‚·‚×‚Ä‚Ì -ƒ‚ƒWƒ…[ƒ‹‚©‚çŒÄ‚Ño‚³‚ê‚Ä‚¢‚é debug ƒ‚ƒWƒ…[ƒ‹‚Æ log ƒ‚ƒWƒ…[ƒ‹A‚Ü‚½ -‹¤—pŠÖ”‚ð”[‚ß‚½ util ƒ‚ƒWƒ…[ƒ‹‚ÍŠ„ˆ¤‚µ‚Ä‚ ‚è‚Ü‚·B
      -The following diagram shows the invoking relationship of modules. debug and log modules called by most modules and util modules that store common functions are omitted in the diagram. - -

      -libmdn module graph -
      - -
      - -

      ƒ‚ƒWƒ…[ƒ‹Ú×
      -Details of Modules

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ɋ܂܂ê‚é‚·‚ׂẴ‚ƒWƒ…[ƒ‹‚ɂ‚¢‚ÄA‚»‚ÌŽd—l‚ð‹Lq -‚µ‚Ü‚·B‚Ü‚¸Šeƒ‚ƒWƒ…[ƒ‹‚Å‹¤’ʂɎg—p‚³‚ê‚éAŠÖ”‚ÌƒŠƒ^[ƒ“’l‚ɂ‚¢‚Ä -à–¾‚µ‚½‚ ‚ÆAƒ‚ƒWƒ…[ƒ‹–ˆ‚ÉÚׂð‰ðà‚µ‚Ü‚·B
      -The specifications of all modules included in MDN library are explained below. -First, return values of functions commonly used by the modules are explained and then each module is discussed in detail. - -


      - -

      APIŠÖ”‚ÌƒŠƒ^[ƒ“’l
      - Values returned by API functions

      - -

      MDNƒ‰ƒCƒuƒ‰ƒŠ‚̂قƂñ‚Ç‘S‚Ä‚ÌAPIŠÖ”‚ÍAƒŠƒ^[ƒ“’l‚Æ‚µ‚Ä -—ñ‹“Œ^‚Å‚ ‚émdn_result_t Œ^‚Ì’l‚ð•Ô‚µ‚Ü‚·B’l‚̈ꗗ‚Æ‚»‚̈Ӗ¡‚ð -ަ‚µ‚Ü‚·B
      -Almost all API functions of the MDN library return values of mdn_result_t, which is an enumeration type value. The values and their meanings are explained below.
      - -

      -
      mdn_success -
      ˆ—‚ª¬Œ÷‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      - Processing was successful. -
      mdn_notfound -
      ŒŸõˆ—‚Ȃǂɂ¨‚¢‚ÄAŒ©‚‚©‚ç‚È‚©‚Á‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -The target of search processing could not be found. -
      mdn_invalid_encoding -
      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É‚¨‚¢‚ÄA“ü—Í‚³‚ꂽ•¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŠÔˆá‚Á‚Ä‚¢‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Incorrect conversion of encoded input character string. -
      mdn_invalid_syntax -
      ƒtƒ@ƒCƒ‹‚È‚Ç‚Ì‘Ž®‚ɊԈႢ‚ª‚ ‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Incorrect file format. -
      mdn_invalid_name -
      Žw’肳‚ꂽ–¼‘O‚ªŠÔˆá‚Á‚Ä‚¢‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B
      - Specified name is incorrect. -
      mdn_invalid_message -
      “ü—Í‚³‚ꂽDNSƒƒbƒZ[ƒW‚ª³‚µ‚­‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Entered DNS message is incorrect. -
      mdn_buffer_overflow -
      Œ‹‰Ê‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚̑傫‚³‚ª‘«‚è‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      - Insufficient buffer to store result.
      mdn_noentry -
      Žw’肳‚ꂽ€–Ú‚ª‘¶Ý‚µ‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      - Specified item does not exist. -
      mdn_nomemory -
      ƒƒ‚ƒŠ‚̃AƒƒP[ƒVƒ‡ƒ“‚ÉŽ¸”s‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Memory allocation failed. -
      mdn_nofile -
      Žw’肳‚ꂽƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      Specified file does not exist. -
      mdn_nomapping -
      •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚ð•ÏŠ·‚·‚éÛA•ÏŠ·ƒ^[ƒQƒbƒg‚Ì•¶ŽšW‡‚Ɋ܂܂ê‚È‚¢•¶Žš‚ª‚ ‚Á‚½ (‚‚܂賂µ‚­•ÏŠ·‚Å‚«‚È‚©‚Á‚½) ‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Conversion could not be performed correctly because a character in the encoded character string (code set) does not exist in the target conversion character set. -
      mdn_context_required -
      •¶Žš‚Ì‘å•¶Žš¬•¶Žš•ÏŠ·‚ÌÛ‚ÉA³‚µ‚¢•ÏŠ·‚ðs‚¤‚ɂ͕¶–¬î•ñ‚ª•K—v‚Å‚ ‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Indicates that context information is required to correctly convert uppercase characters to lowercase characters. -
      mdn_failure -
      ã‹L‚Ì‚¢‚¸‚ê‚É‚à“–‚Ă͂܂ç‚È‚¢ƒGƒ‰[‚ª”­¶‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B
      -Indicates that an error occurred that does not fall into any of the above categories. -
      - -
      - -

      brace ƒ‚ƒWƒ…[ƒ‹
      -brace module

      - -

      brace ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚éBRACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Íconverter ƒ‚ƒWƒ…[ƒ‹‚̉ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñBconverter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚ÄBRACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B
      -The brace module performs conversion between UTF-8 and the proposed BRACE encoding of multilingual domain names. This module is implemented as a low-order converter module, and is not directly called by the application. -When converter module is requested in association with BRACE encoding conversion, this module is indirectly called. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__brace_open -
      -
      -mdn_result_t
      -mdn__brace_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      BRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Opens conversion context used for BRACE encoding. Actually, this does not do anything. -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B
      -Always returns mdn_success. -

      - -

      mdn__brace_close -
      -
      -mdn_result_t
      -mdn__brace_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      BRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Closes conversion context used for BRACE encoding. Actually, this does not do anything. -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -
      Always returns mdn_success. -

      - -

      mdn__brace_convert -
      -
      -mdn_result_t
      -mdn__brace_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      BRACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·Bdir ‚ªmdn_converter_l2u‚È‚çBRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çBRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B
      -Performs bidirectional conversion of BRACE and UTF-8 encoded character strings. -The from input character string is converted and the result is written in the area specified by to and tolen. -When dir is mdn_converter_l2u, BRACE strings are converted to UTF-8 encoding and when dir is mdn_converter_u2l, UTF-8 strings are converted to BRACE encoding. -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_nomemory - -

      - -
      - -

      converter ƒ‚ƒWƒ…[ƒ‹
      -converter module

      - -

      converter ƒ‚ƒWƒ…[ƒ‹‚ÍA•¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚ð -•ÏŠ·‚µ‚Ü‚·BMDN ƒ‰ƒCƒuƒ‰ƒŠ‚Í“à•”ˆ—‚É UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶Žš—ñ‚ð -Žg—p‚·‚邽‚ßA‚±‚̃‚ƒWƒ…[ƒ‹‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚Ì -ŠÔ‚Ì‘ŠŒÝ•ÏŠ·‚ðs‚¢‚Ü‚·B
      -converter module converts character string encoding (code set). Because the MDN library uses UTF-8 character strings for internal processing, this module performs bidirectional conversion between the local encoding method and UTF-8. - -

      Œ»ÝƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍŽŸ‚Ì’Ê‚è‚Å‚·
      -Support is currently provided for the following encoding methods. -

        -
      • iconv() ‚ªƒTƒ|[ƒg‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO
        - iconv() encoding support
        -
        - iconv() ‚Ƃ͔ėp“I‚ȃR[ƒhƒZƒbƒg•ÏŠ·‹@”\‚ð’ñ‹Ÿ‚·‚éŠÖ”‚ÅA - ‚±‚ÌŠÖ”‚ªƒTƒ|[ƒg‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðƒTƒ|[ƒg‚µ‚Ü‚·B - iconv() ‚ªƒTƒ|[ƒg‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍŽÀ‘•ˆË‘¶‚Ȃ̂ÅA - ‹ï‘Ì“I‚ɂǂ̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‰Â”\‚Ȃ̂©‚Í iconv() ‚Ì - ƒhƒLƒ…ƒƒ“ƒg‚ð‚²——‚­‚¾‚³‚¢B
        - The iconv() function provides general code set conversion functions and encoding support. The encoding methods supported by iconv() are implementation-dependent; in that regard, refer to the documentation included with iconv() for information on which encoding is actually available. -
      • UTF-5
        - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-jseng-utf5-01.txt - ‚ð‚²——‚­‚¾‚³‚¢B
        -Proposed multilingual domain name encoding method. For details, refer to - draft-jseng-utf5-01.txt - -
      • RACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-race-02.txt - ‚ð‚²——‚­‚¾‚³‚¢B
        -Proposed multilingual domain name encoding method. For details, refer to - draft-ietf-idn-race-02.txt - -
      • BRACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-brace-00.txt - ‚ð‚²——‚­‚¾‚³‚¢B
        -Proposed multilingual domain name encoding method. For details, refer to - draft-ietf-idn-brace-00.txt - -
      • LACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-lace-00.txt - ‚ð‚²——‚­‚¾‚³‚¢B
        -Proposed multilingual domain name encoding method. For details, refer to - draft-ietf-idn-lace-00.txt - -
      - -

      ‚Ü‚½Aconverter ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É -“Á•Ê‚ÉÝŒv‚³‚ꂽ‚à‚Ì‚ÅAˆê”Ê“I‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ɂ͕K‚¸‚µ‚à“K‚µ‚Ü‚¹‚ñB -—Ⴆ‚Î UTF-5ARACEABRACEALACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓hƒƒCƒ“–¼‚Ì -‹æØ‚è•¶Žš‚Å‚ ‚éƒsƒŠƒIƒh‚ð“Á•ʂɈµ‚¢‚Ü‚·B
      -The converter module is specially designed for encoding conversion of domain names and is not suitable for general encoding conversion. -For example, UTF-5, RACE, BRACE, and LACE encoding provide special handling of the delimiting periods used in domain names. - -

      converter ƒ‚ƒWƒ…[ƒ‹‚ÍuƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚Ì‘ŠŒÝ•ÏŠ·‚ðs‚¤‚É‚ÍA‚Ü‚¸ -‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð쬂µ‚Ü‚·BŽÀÛ‚Ì -ƒR[ƒh•ÏŠ·‚ɂ̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð’¼ÚŽw’è‚·‚é‚̂ł͂Ȃ­A‚±‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ðŽw’肵‚Ü‚·BƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í -mdn_converter_t Œ^‚Å‚ ‚èAŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -The converter module employs the "code conversion context" concept. -When perform bidirectional conversion between a specific encoding method and UTF-8, first the code conversion context of that encoding is created. For actual code conversion, the encoding is not directly specified; instead this code conversion context is specified. The code conversion context is mdn_converter_t and is defined as the following opaque type. -

      -
      -typedef struct mdn_converter *mdn_converter_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_converter_initialize -
      -
      -mdn_result_t
      -mdn_converter_initialize(void)
      -
      -

      ƒ‚ƒWƒ…[ƒ‹‚̉Šú‰»ˆ—‚ðs‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É - •K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B
      -Initializes the module. This function is always called before calling other API functions of this module. -

      •Ô‚³‚ê‚é’l‚Ímdn_successAmdn_nomemory‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_converter_create -
      -
      -mdn_result_t
      -mdn_converter_create(const char *name, mdn_converter_t *ctxp,
      -        int delayedopen)
      -
      -

      name ‚ÅŽw’肳‚ê‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ðì¬A‰Šú‰»‚µActxp ‚ÌŽw‚·—̈æ‚É -Ši”[‚µ‚Ü‚·B
      -Creates the code conversion context used for conversion between the local encoding specified by name and UTF-8, then initializes and stores it in the area specified by ctxp. -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄAŒ»Ý‚̂Ƃ±‚ë -UTF-5ARACEABRACEALACE -‚̕ϊ·‹@”\‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚êˆÈŠO‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽw’肳‚ꂽꇂɂÍAƒVƒXƒeƒ€‚Ì’ñ‹Ÿ‚·‚éiconv() ƒ†[ƒeƒBƒŠƒeƒB‚ð—p‚¢‚ĕϊ·‚ªs‚í‚ê‚Ü‚·B -‚±‚Ìê‡A‚±‚ÌŠÖ”‚̌ĂÑo‚µŽž‚Éiconv_open() ‚̌ĂÑo‚µ‚ªs‚í‚ê‚Ü‚·‚ªA -delayedopen ‚ª^‚È‚ç‚ÎŽÀÛ‚É•¶Žš—ñ‚̕ϊ·‚ªs‚í‚ê‚é‚܂Š-iconv_open() ‚̌ĂÑo‚µ‚ª’x‰„‚³‚ê‚Ü‚·B
      -Currently provides UTF-5, RACE, BRACE, and LACE conversion functions. -For encoding methods other than those listed above, conversion is performed using the iconv() utility provided with the system. -In such a case, when this function is invoked iconv_open() is called. When delayedopen is true, calling of iconv_open() is delayed until the character string is actually converted. -

      ‚Ü‚½mdn_converter_register -‚ð—p‚¢‚ÄV‚½‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð’ljÁ‚·‚邱‚Æ‚à‰Â”\‚Å‚·B
      -In addition, mdn_converter_register can be also used to add new local encoding methods. -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_name -
      mdn_nomemory -
      mdn_failure -

      - -

      mdn_converter_destroy -
      -
      -void
      -mdn_converter_destroy(mdn_converter_t ctx)
      -
      -

      mdn_converter_create ‚Å -쬂µ‚½ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B
      -Deletes the code conversion context created by mdn_converter_create and releases the allocated memory. -

      - -

      mdn_converter_convert -
      -
      -mdn_result_t
      -mdn_converter_convert(mdn_converter_t ctx,
      -	mdn_converter_dir_t dir, const char *from,
      -	char *to, size_t tolen)
      -
      -

      mdn_converter_create ‚Å쬂µ‚½ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð—p‚¢‚Ä•¶Žš—ñ from ‚ðƒR[ƒh•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚ÉŠi”[‚µ‚Ü‚·Btolen ‚Í to ‚Ì’·‚³‚Å‚·B -dir ‚͕ϊ·‚Ì•ûŒü‚ÌŽw’è‚ÅA
      -Uses the code conversion context created by mdn_converter_create to perform code conversion of character strings and stores the result in to. -tolen is the length of to. dir is used to specify the direction of conversion. -

        -
      • mdn_converter_l2u‚È‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ·
        -mdn_converter_l2u specifies the conversion method used to convert from local encoding to UTF-8. -
      • mdn_converter_u2l‚È‚ç UTF-8 ‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·
        -mdn_converter_u2l the conversion method used to convert from UTF-8 to the local encoding method. -
      -‚ƂȂè‚Ü‚·B - -

      ISO-2022-JP‚̂悤‚Éó‘Ô‚ð‚à‚ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚µ‚½ê‡A -iconv() ‚ƈقȂèA‚±‚ÌŠÖ”‚̌ĂÑo‚µŠÔ‚Åó‘Ԃ͕ۑ¶‚³‚ê‚Ü‚¹‚ñB -•ÏŠ·‚Í–ˆ‰ñ‰Šúó‘Ô‚©‚çŽn‚Ü‚è‚Ü‚·B
      -Unlike iconv(), when status-dependent encoding such as ISO-2022-JP is used, the status that is in effect when the function is called the first time is not maintained when this function is called the next time. -Conversion starts from the initial status each time. -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_invalid_name -
      mdn_nomemory -
      mdn_failure -

      - -

      mdn_converter_localencoding -
      -
      -char *
      -mdn_converter_localencoding(mdn_converter_t ctx)
      -
      -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg ctx ‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ð -•Ô‚µ‚Ü‚·B
      -Returns the local encoding name of the code conversion context ctx. -

      - -

      mdn_converter_isasciicompatible -
      -
      -int
      -mdn_converter_isasciicompatible(mdn_converter_t ctx)
      -
      -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg ctx ‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚Ç‚¤‚©‚ð•Ô‚µ‚Ü‚·BASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚ç -0‚łȂ¢’l‚ªA‚»‚¤‚łȂ¢‚È‚ç1‚ª•Ô‚è‚Ü‚·B
      -Returns whether or not the local encoding of the code conversion context ctxis ASCII-compatible. When the local encoding method is ASCII-compatible encoding, a value other than 0 is returned and if not, 1 is returned. -

      ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO -(ASCII-compatible Encoding) ‚Æ‚ÍA‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ŃGƒ“ƒR[ƒh‚³‚ꂽƒhƒƒCƒ“–¼‚ª’Êí‚ÌASCII‚̃hƒƒCƒ“–¼‚Æ‹æ•ʂł«‚È‚¢A‚‚܂è‰p”Žš‚¨‚æ‚уnƒCƒtƒ“‚݂̂Å\¬‚³‚ê‚邿‚¤‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‚±‚Æ‚ÅA‹ï‘Ì“I‚É‚Í RACE ‚Ȃǂª‘Š“–‚µ‚Ü‚·B‚±‚ê‚ç‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚͈ê”ʂɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä—p‚¢‚ç‚ê‚邱‚Ƃ͂ ‚è‚Ü‚¹‚ñ‚ªADNS ƒvƒƒgƒRƒ‹ã‚ŃhƒƒCƒ“–¼‚ð•\‚·‚½‚߂̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä‚Í(]—ˆ‚Ì DNS ƒT[ƒo“™‚ª‚È‚ñ‚Ì•ÏX‚à‚È‚µ‚ÉŽg‚¦‚邱‚Æ‚à‚ ‚Á‚Ä) —L—ÍŽ‹‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B
      -ASCII-compatible encoding consists of only alphenumeric characters and hyphens, meaning it is not possible to differentiate between domain names encoded using this encoding and standard ASCII domain names. Specifically, RACE encoding is of this type. -These types of encoding are not generally used for local encoding by applications but are strong candidates for the encoding used to express domain names in the DNS protocol (because conventional DNS servers can be used without modification). -

      - -

      mdn_converter_addalias -
      -
      -mdn_result_t
      -mdn_converter_addalias(const char *alias_name, const char *real_name)
      -
      -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ real_name ‚ɑ΂µ‚ÄAalias_name -‚Æ‚¢‚¤•Ê–¼‚ð“o˜^‚µ‚Ü‚·B“o˜^‚µ‚½•Ê–¼‚Ímdn_converter_create ‚Ìname ˆø”‚ÉŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
      -Used to register the alias alias_name for the encoding name real_name . Registered aliases can be specified in the var>name argument of mdn_converter_create. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_converter_aliasfile -
      -
      -mdn_result_t
      -mdn_converter_aliasfile(const char *path)
      -
      -

      ƒtƒ@ƒCƒ‹ path ‚ÅŽw’肳‚ê‚éƒtƒ@ƒCƒ‹‚ð“ǂݞ‚ÝA‚»‚Ì“à—e‚É -]‚Á‚ĕʖ¼‚ð“o˜^‚µ‚Ü‚·B
      -Loads the file specified by the path variable and registers the alias in accordance with the contents of the file. -

      ƒtƒ@ƒCƒ‹ path ‚ÍŽŸ‚̂悤‚È’Pƒ‚ÈŒ`Ž®‚Ìs‚©‚ç‚È‚éƒeƒLƒXƒgƒtƒ@ƒCƒ‹‚Å‚·B
      -The file path is a text file consisting of the following simple format. -

      -    •Ê–¼    ³Ž®–¼ 
      -    Alias   Formal name
      -
      -
      -

      ‚Ü‚½ #‚ÅŽn‚Ü‚és‚̓Rƒƒ“ƒg‚Ƃ݂Ȃ³‚ê‚Ü‚·B
      -In addition, comment lines begin with #. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nofileA -mdn_invalid_syntaxA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nofile -
      mdn_invalid_syntax -
      mdn_nomemory -

      - -

      mdn_converter_resetalias -
      -
      -mdn_result_t
      -mdn_converter_resetalias(void)
      -
      -

      mdn_converter_addalias -‚â mdn_converter_aliasfile -‚Å“o˜^‚µ‚½•Ê–¼‚ðƒŠƒZƒbƒg‚µA•Ê–¼‚ª‘S‚­“o˜^‚³‚ê‚Ä‚¢‚È‚¢‰Šúó‘Ô‚É–ß‚µ‚Ü‚·B
      -Resets aliases registered using mdn_converter_addalias or mdn_converter_aliasfile to the initial default status (where no aliases are registered). -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_converter_register -
      -
      -mdn_result_t
      -mdn_converter_register(const char *name,
      -	mdn_converter_openproc_t open,
      -	mdn_converter_closeproc_t close,
      -	mdn_converter_convertproc_t convert,
      -	int ascii_compatible)
      -
      -

      name ‚Æ‚¢‚¤–¼‘O‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8‚Æ‚Ì -ŠÔ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‹@”\‚ð’ljÁ‚µ‚Ü‚·BopenAcloseA -convert ‚͕ϊ·“™‚̈—ŠÖ”‚ւ̃|ƒCƒ“ƒ^‚Å‚·B -ascii_compatible ‚ɂ͂±‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚ç1‚ðA‚»‚¤‚łȂ¯‚ê‚Î0‚ðŽw’肵‚Ü‚·B
      -Adds the encoding conversion function between the name local encoding method and UTF-8. open, close, and convert are used as pointers to processing functions such as conversion. 1 specifies ascii_compatible local encoding, 0 that local encoding is not ASCII compatible. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success and -
      mdn_nomemory - -

      - -
      - -

      debug ƒ‚ƒWƒ…[ƒ‹
      -debug module

      - -

      debug ƒ‚ƒWƒ…[ƒ‹‚̓fƒoƒbƒO—po—͂̂½‚߂̃†[ƒeƒBƒŠƒeƒBƒ‚ƒWƒ…[ƒ‹‚Å‚·B
      -The debug module is a utility module for debug output. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      -
      mdn_debug_hexstring -
      -
      -char *
      -mdn_debug_hexstring(const char *s, int maxbytes)
      -
      -

      •¶Žš—ñ s ‚ð16i”•\ަ‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -maxbytes ‚Í•\ަ‚·‚éÅ‘å‚Ì’·‚³‚ÅAs‚ª ‚±‚ê‚ð’´‚¦‚½ê‡‚É‚Í -ÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B
      -Returns a hexidecimal character string of s length. maxbytes indicates the maximum length expressed and when s exceeds that length, ... is appended to the string at that point. - -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B
      -The memory area allocated for the returned character string is used for the static variable held by this function and is in effect until the function is called the next time. -

      - -

      mdn_debug_xstring -
      -
      -char *
      -mdn_debug_xstring(const char *s, int maxbytes)
      -
      -

      •¶Žš—ñ s ‚Ì’†‚ÅAƒR[ƒh‚ª128ˆÈã‚Ì‚à‚Ì‚ð\x{HH}Œ`Ž®‚Å -•\ަ‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -maxbytes ‚Í•\ަ‚·‚éÅ‘å‚Ì’·‚³‚ÅAs ‚ª‚±‚ê‚ð’´‚¦‚½ê‡‚É‚Í -ÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B
      -Of the s character strings, returns in \x{HH} format those character strings 128 bytes or larger. -maxbytes indicates the maximum length expressed and when s exceeds this, ... is appended to the string at that point. -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì -‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B
      -The memory area allocated for the returned character string is used for the static variable held by this function and is in effect until the function is called the next time. -

      - -

      mdn_debug_hexdata -
      -
      -char *
      -mdn_debug_hexdata(const char *s, int length, int maxlength)
      -
      -

      ’·‚³ length ‚̃oƒCƒg—ñ s ‚ð16i•\ަ‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·Bmaxbytes ‚Í•\ަ‚·‚éÅ‘å‚̃oƒCƒg’·‚ÅAlength ‚ª‚±‚ê‚ð’´‚¦‚½ê‡‚É‚ÍÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B
      -Returns the length of byte row s in hexadecimal character strings. maxbytes indicates the maximum length expressed and when length exceeds this, ... is appended to the string at that point. -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B
      -The memory area allocated for the returned character string is used for the static variable held by this function and is in effect until the function is called the next time. -

      - -

      mdn_debug_hexdump -
      -
      -void
      -mdn_debug_hexdump(const char *s, int length)
      -
      -

      ’·‚³ length ‚̃oƒCƒg—ñ s ‚Ì16iƒ_ƒ“ƒv‚ð•W€ƒGƒ‰[o—͂ɕ\ަ‚µ‚Ü‚·B
      -The standard error output is comprised of a hexidecimal dump of length of byte row s. - -

      - -
      - -

      dn ƒ‚ƒWƒ…[ƒ‹ dn module

      - -

      dn ƒ‚ƒWƒ…[ƒ‹‚ÍADNS ƒƒbƒZ[ƒW“à‚̃hƒƒCƒ“–¼‚Ì“WŠJEˆ³k‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -‚Å‚·B‚±‚ê‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ìres_comp ‚¨‚æ‚Ñres_expand ‚É -‘Š“–‚·‚é‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -The dn module expands or compresses domain names in DNS messages. This provides the functional equivalent of res_comp and res_expand in the resolver library. - -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚Í–{ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‘¼‚̃‚ƒWƒ…[ƒ‹‚©‚ç‚̂ݗ˜—p‚³‚ê‚邱‚Æ‚ð‘z’肵‚Ä -ÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B
      -This module was designed under the assumption that it would only used by only other modules in the libary. - -

      ƒhƒƒCƒ“–¼‚̈³k‚ÌÛ‚ÍAŽŸ‚ÉŽ¦‚·mdn__dn_t Œ^‚̃Rƒ“ƒeƒLƒXƒgî•ñ‚ð -Žg—p‚µ‚Ü‚·B
      -When a domain name is compressed, context information of type mdn__dn_t is used, as shown below: -

      -
      -#define MDN_DN_NPTRS	64
      -typedef struct {
      -	const unsigned char *msg;
      -	int cur;
      -	int offset[MDN_DN_NPTRS];
      -} mdn__dn_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__dn_expand -
      -
      -mdn_result_t
      -mdn__dn_expand(const char *msg, size_t msglen,
      -	const char *compressed, char *expanded,
      -	size_t buflen, size_t *complenp)
      -
      -

      ’·‚³ msglen ‚ÌDNSƒƒbƒZ[ƒW msg ’†‚Ì -ˆ³k‚³‚ꂽƒhƒƒCƒ“–¼ compressed ‚ð“WŠJ‚µA -expanded ‚ÉŒ‹‰Ê‚ðŠi”[‚µ‚Ü‚·B -buflen ‚Í expanded ‚̑傫‚³‚Å‚·B -‚Ü‚½Acompressed ‚Ì’·‚³‚ª *complenp ‚ÉŠi”[‚³‚ê‚Ü‚·B
      -Expands the compressed domain name in DNS message msg of length msglen and stores the result in expanded. -buflen is the size of expanded. -Also, the length of compressed is stored in *complenp. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_message -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_message -

      - -

      mdn__dn_initcompress -
      -
      -void
      -mdn__dn_initcompress(mdn__dn_t *ctx, const char *msg)
      -
      -

      ƒhƒƒCƒ“–¼ˆ³k—p‚̃Rƒ“ƒeƒLƒXƒgî•ñ ctx ‚ð‰Šú‰»‚µ‚Ü‚·B -‚±‚ÌŠÖ”‚Ímdn__dn_compress ‚ðŒÄ‚Ño‚·‘O‚É•K‚¸ŒÄ‚Ño‚·•K—v‚ª‚ ‚è‚Ü‚·B -msg ‚͈³k‚µ‚½ƒhƒƒCƒ“–¼‚ðŠi”[‚·‚éDNSƒƒbƒZ[ƒW‚Ì -擪ƒAƒhƒŒƒX‚Å‚·B
      -Initializes context information ctx for domain name compression. -This function must be called before calling mdn__dn_compress. -msg is the leading address in a DNS message where the compressed domain name is stored. -

      - -

      mdn__dn_compress -
      -
      -mdn_result_t
      -mdn__dn_compress(const char *name, char *sptr, size_t length,
      -	mdn__dn_t *ctx, size_t *complenp)
      -
      -

      name ‚ÌŽw‚·ƒhƒƒCƒ“–¼‚ðˆ³k‚µ‚Ä sptr ‚ÌŽw‚· -ꊂɊi”[‚µ‚Ü‚·Blength ‚Í sptr ‚̋󂫗̈æ‚Ì’·‚³‚Å‚·B -ˆ³k‚ÌÛ‚ÍActx ‚É“ü‚Á‚Ä‚¢‚éˆÈ‘O‚Ɉ³k‚µ‚½ƒhƒƒCƒ“–¼‚Ìî•ñ‚ª -ŽQÆ‚³‚ê‚Ü‚·Bˆ³k‚µ‚½ƒhƒƒCƒ“–¼‚Ì’·‚³‚ª complenp ‚É“ü‚ê‚ç‚ê‚邯‚Æ‚à‚ÉAˆ³k‚É•K—v‚Èî•ñ‚ª ctx ‚ɒljÁ‚³‚ê‚Ü‚·B
      -Compresses the domain name indicated by name and stores it in the location indicated by sptr. length is the length of available space sptr. -When compression is performed, the previously compressed domain name information in ctx is referenced. The length of the compressed domain name is placed in complenp and also the information necessary for compression is added to ctx. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_name -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_name - -

      - -
      - -

      lace ƒ‚ƒWƒ…[ƒ‹
      -lace module

      - -

      lace ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é - -LACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚Ì -‰ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñB -converter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚Ä -LACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B
      -The lace module performs conversion between UTF-8 and the proposed LACE multilingual domain name encoding method. This module is implemented as a low-order converter module, and is not directly called by the application. -When the converter module is requested for conversion with LACE encoding, this module is indirectly called. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__lace_open -
      -
      -mdn_result_t
      -mdn__lace_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Opens conversion context with LACE encoding. Actually, this does not do anything. - -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B
      -Always returns mdn_success. -

      - -

      mdn__lace_close -
      -
      -mdn_result_t
      -mdn__lace_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Closes conversion context with LACE encoding. Actually, this does not do anything. -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B
      -Always returns mdn_success. -

      - -

      mdn__lace_convert -
      -
      -mdn_result_t
      -mdn__lace_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      LACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B -“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -dir ‚ªmdn_converter_l2u‚È‚ç -LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l -‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çLACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B
      -Provides bidirectional conversion between LACE character strings and UTF-8 character strings. -The from input character string is converted and the result is written in the area specified by to and tolen. -When dir is mdn_converter_l2u, LACE encoding is converted to UTF-8 encoding. When it is mdn_converter_u2l, UTF-8 encoding is converted to LACE encoding. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_nomemory - -

      - -
      - -

      localencoding ƒ‚ƒWƒ…[ƒ‹ localencoding module

      - -

      localencoding ƒ‚ƒWƒ…[ƒ‹‚̓ƒP[ƒ‹î•ñ‚ð—˜—p‚µ‚ÄA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð„‘ª‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B
      -The localencoding module uses locale information to guess the encoding used by the application. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_localencoding_name -
      -
      -const char *
      -mdn_localencoding_name(void)
      -
      -

      Œ»Ý‚̃ƒP[ƒ‹î•ñ‚ðŒ³‚ÉAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ -(mdn_converter_create() ‚É“n‚· -–¼‘O) ‚ð„‘ª‚µ‚ĕԂµ‚Ü‚·B
      -Guesses the type of encoding used by the application (the name passed to mdn_converter_create())and returns it based on the current locale information. -

      „‘ª‚ÍAƒVƒXƒeƒ€‚ªnl_langinfo() ‚ð”õ‚¦‚Ä‚¢‚ê‚΂»‚ê‚ð—˜—p‚µA -‚»‚¤‚łȂ¯‚ê‚Îsetlocale() ‚âŠÂ‹«•Ï”‚Ìî•ñ‚©‚çs‚í‚ê‚Ü‚·B -ŒãŽÒ‚Ìꇂɂ͕K‚¸‚µ‚ೂµ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ª“¾‚ç‚ê‚邯‚ÍŒÀ‚è‚Ü‚¹‚ñB
      -To guess the type of encoding, nl_langinfo() is used if it is available in the the system and if not, setlocale() or environmental variable information is used. -In the latter case, the corrent encoding name may not be obtained. -

      ƒƒP[ƒ‹î•ñ‚©‚糂µ‚¢„‘ª‚ª‚Å‚«‚È‚¢ê‡A‚à‚µ‚­‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª -ƒƒP[ƒ‹‚ƈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä“®ì‚µ‚Ä‚¢‚éꇂ̂½‚ß‚ÉA -‚à‚µŠÂ‹«•Ï” MDN_LOCAL_CODESET ‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA -‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃ƒP[ƒ‹‚ÉŠÖ‚í‚炸A‚»‚̕ϔ‚Ì’l‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚Ä -•Ô‚·‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B
      -When MDN_LOCAL_CODESET environmental variable is defined in order to deal with situations in which the correct encoding cannot be guessed from the locale information or the application is operating using different encoding than that the locale, this module returns the value of that variable as the encoding name regardless of the application locale. - -

      - -
      - -

      log ƒ‚ƒWƒ…[ƒ‹ log module

      - -

      log ƒ‚ƒWƒ…[ƒ‹‚ÍMDN ƒ‰ƒCƒuƒ‰ƒŠ‚̃ƒO‚Ìo—͈—‚ð§Œä‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -ƒƒO‚̓fƒtƒHƒ‹ƒg‚ł͕W€ƒGƒ‰[o—͂ɑ‚«o‚³‚ê‚Ü‚·‚ªAƒnƒ“ƒhƒ‰‚ð“o˜^‚·‚é -‚±‚Æ‚ÅA•Ê‚Ìo—Í•û–@‚É•ÏX‚·‚邱‚Æ‚à‰Â”\‚Å‚·B
      -log module controls MDN library log output. -A standard error output log is written by default. It can, however, be changed to another output method by registering the handler. -

      ‚Ü‚½ƒƒOƒŒƒxƒ‹‚ðÝ’è‚·‚邱‚Æ‚à‰Â”\‚Å‚·BƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì5’iŠK‚ª -’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -The log level can be set as well. The following five log levels are defined. -

      -
      -enum {
      -	mdn_log_level_fatal   = 0,
      -	mdn_log_level_error   = 1,
      -	mdn_log_level_warning = 2,
      -	mdn_log_level_info    = 3,
      -	mdn_log_level_trace   = 4,
      -	mdn_log_level_dump    = 5
      -};
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_log_fatal -
      -
      -void
      -mdn_log_fatal(const char *fmt, ...)
      -
      -

      fatal ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍAƒvƒƒOƒ‰ƒ€‚ÌŽÀs‚ª -•s‰Â”\‚Å‚ ‚邿‚¤‚È’v–½“I‚ȃGƒ‰[‚ÌÛ‚É—p‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs a fatal level log. This level is used when a fatal error occurs that causes problems such as when program execution cannot be performed. -Arguments are specified using the same format as printf. -

      - -

      mdn_log_error -
      -
      -void
      -mdn_log_error(const char *fmt, ...)
      -
      -

      error ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍA -’v–½“I‚ł͂Ȃ¢ƒGƒ‰[‚ÌÛ‚É—p‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs the error level log. This level is used when an error occurs that is not fatal. -Arguments are specified using the same format as printf. -

      - -

      mdn_log_warning -
      -
      -void
      -mdn_log_warning(const char *fmt, ...)
      -
      -

      warning ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍŒxƒƒbƒZ[ƒW‚ð -•\ަ‚·‚邽‚߂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs a warning level log. This level is used to display a warning message. -Arguments are specified using the same format as printf. -

      - -

      mdn_log_info -
      -
      -void
      -mdn_log_info(const char *fmt, ...)
      -
      -

      info ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚̓Gƒ‰[‚ł͂Ȃ­A -—L—p‚ÆŽv‚í‚ê‚éî•ñ‚ðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs info level log. This level is not used for errors but instead to output other potentially useful information. -Arguments are specified using the same format as printf. - -

      - -

      mdn_log_trace -
      -
      -void
      -mdn_log_trace(const char *fmt, ...)
      -
      -

      trace ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍAPIŠÖ”‚̃gƒŒ[ƒX -î•ñ‚ðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·Bˆê”ʂɃ‰ƒCƒuƒ‰ƒŠ‚̃fƒoƒbƒO–Ú“IˆÈŠO‚Å -‚±‚̃Œƒxƒ‹‚̃ƒO‚ð‹L˜^‚·‚é•K—v‚͂Ȃ¢‚Å‚µ‚傤B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs the trace level log. This level is used to output API function trace information. Generally, this log does not need to be recorded for purposes other than debugging the library. -The arguments are specified using the same format as printf. -

      - -

      mdn_log_dump -
      -
      -void
      -mdn_log_dump(const char *fmt, ...)
      -
      -

      dump ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚Í‚³‚ç‚ɃfƒoƒbƒO—p‚Ì -ƒpƒPƒbƒgƒf[ƒ^ƒ_ƒ“ƒv‚Ȃǂðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆê”ʂɃ‰ƒCƒuƒ‰ƒŠ‚̃fƒoƒbƒO–Ú“IˆÈŠO‚Å‚±‚̃Œƒxƒ‹‚̃ƒO‚ð‹L˜^‚·‚é -•K—v‚͂Ȃ¢‚Å‚µ‚傤B -ˆø”‚Í printf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B
      -Outputs the dump level log. This level is used to output additional packet data dump for debugging. -Generally, this level of log does not need to be recorded for purposes other than debugging the library. -The arguments are specified using the same format as for printf. -

      - -

      mdn_log_setlevel -
      -
      -void
      -mdn_log_setlevel(int level)
      -
      -

      ƒƒOo—͂̃Œƒxƒ‹‚ðݒ肵‚Ü‚·Bݒ肵‚½ƒŒƒxƒ‹‚ð’´‚¦‚郌ƒxƒ‹‚Ì -ƒƒO‚Ío—Í‚³‚ê‚Ü‚¹‚ñB‚±‚ÌŠÖ”‚ŃƒOƒŒƒxƒ‹‚ðݒ肵‚È‚¢ê‡A -ŠÂ‹«•Ï” MDN_LOG_LEVEL ‚Éݒ肳‚ꂽ®”’l‚ªŽg—p‚³‚ê‚Ü‚·B
      -Sets the level of log output. Logs higher than the set level are not output. When the log level is not specified with this function, the integer value set to the MDN_LOG_LEVEL environmental variable is used. -

      - -

      mdn_log_getlevel -
      -
      -int
      -mdn_log_getlevel(void)
      -
      -

      Œ»Ý‚̃ƒOo—͂̃Œƒxƒ‹‚ð•\‚·®”’l‚ðŽæ“¾‚µ‚ĕԂµ‚Ü‚·B
      -Obtains and returns the integer value for the current level of log output. -

      - -

      mdn_log_setproc -
      -
      -void
      -mdn_log_setproc(mdn_log_proc_t proc)
      -
      -

      ƒƒO‚Ìo—̓nƒ“ƒhƒ‰‚ðݒ肵‚Ü‚·Bproc ‚̓nƒ“ƒhƒ‰ŠÖ”‚Ö‚Ì -ƒ|ƒCƒ“ƒ^‚Å‚·B‚à‚µƒnƒ“ƒhƒ‰‚ðŽw’肵‚È‚¢ê‡A‚ ‚é‚¢‚Í proc ‚É -NULL ‚ðŽw’肵‚½ê‡‚É‚ÍAƒƒO‚Í•W€ƒGƒ‰[o—Í‚Éo—Í‚³‚ê‚Ü‚·B
      -Used to set the log output handler. proc is a pointer to the handler function. When the handler is not specified or NULL is specified for proc, a standard error log is output. -

      ƒnƒ“ƒhƒ‰‚ÌŒ^ mdn_log_proc_t ‚ÍŽŸ‚̂悤‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -The mdn_log_proc_t handler type is defined as follows. -

      -
      -typedef void  (*mdn_log_proc_t)(int level, const char *msg);
      -
      -
      -level ‚ɂ̓ƒO‚̃Œƒxƒ‹‚ªA‚Ü‚½ msg ‚ɂ͕\ަ‚·‚ׂ« -ƒƒbƒZ[ƒW•¶Žš—ñ‚ª“n‚³‚ê‚Ü‚·B
      -The log level is passed to level and the message character string that should be displayed is passed to msg. - -
      - -
      - -

      msgheader ƒ‚ƒWƒ…[ƒ‹ msgheader module

      - -

      msgheader ƒ‚ƒWƒ…[ƒ‹‚ÍDNS ƒƒbƒZ[ƒW‚̃wƒbƒ_‚̉ðÍA‚¨‚æ‚Ñ‘g‚Ý—§‚Ä‚ð -s‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
      -msgheader module analyses and assembles the DNS message header. -

      ‰ðÍ‚³‚ꂽƒwƒbƒ_î•ñ‚ÍAŽŸ‚ÉŽ¦‚·\‘¢‘̂ɓü‚è‚Ü‚·BŠeƒtƒB[ƒ‹ƒh‚Í -DNS ƒƒbƒZ[ƒWƒwƒbƒ_‚̃tƒB[ƒ‹ƒh‚É‚»‚̂܂ܑΉž‚µ‚Ä‚¢‚é‚Ì‚ÅAà–¾‚ÍÈ—ª‚µ‚Ü‚·B
      -Analyzed header information is placed in the following structure. Since each field corresponds to a field of DNS message header, the explanation is omitted here. -

      -
      -typedef struct mdn_msgheader {
      -	unsigned int id;
      -	int qr;
      -	int opcode;
      -	int flags;
      -	int rcode;
      -	unsigned int qdcount;
      -	unsigned int ancount;
      -	unsigned int nscount;
      -	unsigned int arcount;
      -} mdn_msgheader_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_msgheader_parse -
      -
      -mdn_result_t
      -mdn_msgheader_parse(const char *msg, size_t msglen,
      -	mdn_msgheader_t *parsed)
      -
      -

      msg ‚Æ msglen ‚ÅŽ¦‚³‚ê‚éDNSƒƒbƒZ[ƒW‚̃wƒbƒ_‚ð -‰ðÍ‚µAparsed ‚ªŽ¦‚·\‘¢‘̂Ɋi”[‚µ‚Ü‚·B
      -Analyses the DNS message headers indicated by msg and msglen and stores the information in the structure indicated by parsed. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_message -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_message -

      - -

      mdn_msgheader_unparse -
      -
      -mdn_result_t
      -mdn_msgheader_unparse(mdn_msgheader_t *parsed,
      -	char *msg, size_t msglen)
      -
      -

      ‚±‚ÌŠÖ”‚Ímdn_msgheader_parse ‚Ì -‹t‚̈—‚ðs‚¢‚Ü‚·B‚‚܂èAparsed ‚ÅŽw’肳‚ꂽ\‘¢‘̂̃f[ƒ^‚©‚ç -DNSƒƒbƒZ[ƒW‚̃wƒbƒ_‚ð\¬‚µAmsg ‚Æ msglen ‚Å -ަ‚³‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B
      -This function performs reverse processing of mdn_msgheader_parse, in which the DNS message header is structured from the structure data specified by parsed, after which it is stored in the area specified by msg and msglen. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -

      - -

      mdn_msgheader_getid -
      -
      -unsigned int
      -mdn_msgheader_getid(const char *msg)
      -
      -

      msg ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚©‚ç ID ‚ðŽæ‚èo‚µ‚ĕԂµ‚Ü‚·B -‚±‚ÌŠÖ”‚̓wƒbƒ_‘S‘Ì‚ð‰ðÍ‚¹‚¸‚ÉID‚¾‚¯Žæ‚èo‚µ‚½‚¢‚Æ‚«‚ɕ֗˜‚Å‚·B -‚±‚ÌŠÖ”‚ÍAmsg ‚ÌŽw‚·ƒf[ƒ^‚ªDNSƒƒbƒZ[ƒW‚̃wƒbƒ_’·ˆÈã‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚Ü‚·‚Ì‚ÅA•K‚¸ŒÄ‚Ño‚µ‘¤‚ÅŠm”F‚µ‚Ä‚©‚çŒÄ‚Ño‚·‚悤‚É -‚µ‚Ä‚­‚¾‚³‚¢B
      -Extracts the ID from the DNS message specified by msg and returns it. -This function is only useful for extracting the ID without analyzing the entire header. -Since this function assumes the data indicated by msg is longer than the DNS message header length, always call the function after confirmation at the calling side. -

      - -

      mdn_msgheader_setid -
      -
      -void
      -mdn_msgheader_setid(char *msg, unsigned int id)
      -
      -

      msg ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚É id ‚ÅŽw’肳‚ê‚é -ID ‚ðݒ肵‚Ü‚·B -‚±‚ÌŠÖ”‚à msg ‚ÌŽw‚·ƒf[ƒ^‚ªDNSƒƒbƒZ[ƒW‚̃wƒbƒ_’·ˆÈã‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚Ü‚·‚Ì‚ÅA•K‚¸ŒÄ‚Ño‚µ‘¤‚ÅŠm”F‚µ‚Ä‚©‚çŒÄ‚Ño‚·‚悤‚É -‚µ‚Ä‚­‚¾‚³‚¢B
      -Sets the ID specified by id in the DNS message specified by msg. -Since this function also assumes that the data indicated by msg is longer than the DNS message header length, always call the function after confirmation at the calling side. - -

      - -
      - -

      msgtrans ƒ‚ƒWƒ…[ƒ‹
      -msgtrans module

      - -

      msgtrans ƒ‚ƒWƒ…[ƒ‹‚ÍDNS ƒvƒƒLƒVƒT[ƒo‚Å‚Ì DNS ƒƒbƒZ[ƒW‚̕ϊ·ˆ—‚Ì -‘å•”•ª‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚ȂǑ¼‚Ì‘½‚­‚̃‚ƒWƒ…[ƒ‹‚ð -‚ÌãˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B
      -The msgtrans module provides a large portion of DNS message conversion processing performed by the DNS proxy server. This module is implemented as a high-order module for many other modules including the converter module and normalizer module. - -

      DNSƒvƒƒLƒVƒT[ƒo‚É‚¨‚¯‚郃bƒZ[ƒW•ÏŠ·ˆ—‚Í‚¨‚æ‚»ŽŸ‚̂悤‚È‚à‚̂ł·B
      -Message conversion processing by the DNS proxy server is briefly explained below. -

      ‚Ü‚¸ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çDNSƒT[ƒo‚ւ̃ƒbƒZ[ƒW‚̕ϊ·‚Ìꇂ͎Ÿ‚Ì -‚悤‚ɂȂè‚Ü‚·B
      -Conversion of a message from a client to the DNS server is as follows. -

        -
      1. ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çŽóM‚µ‚½ƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚ð‰ðÍ‚µA - ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Ì ZLD ‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚𔻒肵‚Ü‚·B
        -Request message received from client is analyzed and ZLD and encoding at the client side are determined. -
      2. ”»’茋‰Ê‚ð—p‚¢‚ÄAƒhƒƒCƒ“–¼‚©‚çZLD‚𜋎‚µAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðUTF-8‚É - •ÏŠ·‚µ‚Ü‚·B
        -Based on the determination result, ZLD are removed from domain names and encoding is converted to UTF-8. -
      3. ³‹K‰»ˆ—‚ðs‚¢‚Ü‚·B
        -Normalization processing is performed. -
      4. ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð UTF-8‚©‚çDNSƒT[ƒo‘¤‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µAZLD‚ð•t‰Á‚µ‚Ü‚·B
        -The encoding is converted from UTF-8 to the encoding method used by the DNS server side and ZLD are added. -
      5. ˆÈã‚̈—‚ðƒƒbƒZ[ƒW‚Ɋ܂܂ê‚é‚·‚ׂẴhƒƒCƒ“–¼‚ɑ΂µ‚Äs‚¢A - •ÏŠ·Œ‹‰Ê‚ðÄ‚Ñ DNS ƒƒbƒZ[ƒWŒ`Ž®‚É‚Ü‚Æ‚ß‚Ä DNS ƒT[ƒo‚É‘—M‚µ‚Ü‚·B
        -The above processing is performed on all domain names included in the message and the conversion results are collectively placed in the DNS message format and then sent to the DNS server. -
      - -

      ŽŸ‚ÉDNSƒT[ƒo‚©‚çƒNƒ‰ƒCƒAƒ“ƒg‚ւ̃ƒbƒZ[ƒW‚̕ϊ·‚Ìꇂ͎Ÿ‚Ì -‚悤‚ɂȂè‚Ü‚·B
      -Conversion of messages from the DNS server to the client is as follows. -

        -
      1. DNSƒT[ƒo‚©‚çŽóM‚µ‚½ƒŠƒvƒ‰ƒCƒƒbƒZ[ƒW‚ð‰ðÍ‚µA - ŠÜ‚Ü‚ê‚Ä‚¢‚é‚·‚ׂẴhƒƒCƒ“–¼‚ɑ΂µ‚ÄAZLD‚Ìœ‹ŽAUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO - ‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B
        -The reply message received from the DNS server is analyzed and removal of ZLD and conversion to UTF-8 encoding are performed on all domain names included in the message. -
      2. ‚³‚ç‚ɃNƒ‰ƒCƒAƒ“ƒg‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAZLD‚ð•t‰Á‚µ‚Ü‚·B
        -Encoding is converted to the client side encoding and ZLD are added. -
      3. •ÏŠ·Œ‹‰Ê‚ðÄ‚Ñ DNS ƒƒbƒZ[ƒWŒ`Ž®‚ɂ܂Ƃ߂ăNƒ‰ƒCƒAƒ“ƒg‚É‘—M‚µ‚Ü‚·B
        -The conversion results are collectively placed in the DNS message format and then sent to the client. -
      - -

      ‚±‚̂悤‚ÉADNSƒƒbƒZ[ƒW‚̕ϊ·‚ÉÛ‚µ‚Ä‚ÍA -ƒNƒ‰ƒCƒAƒ“ƒgEƒT[ƒo‘¤‚ÌZLDAƒGƒ“ƒR[ƒfƒBƒ“ƒO“™ -‚¢‚ë‚¢‚ë‚ȃpƒ‰ƒ[ƒ^‚ª•K—v‚ƂȂè‚Ü‚·BAPIŠÖ”‚É‚±‚ê‚ç‚ðŽw’è‚·‚éÛA -‚»‚ꂼ‚ê‚ð•ÊX‚̈ø”‚ÅŽw’è‚·‚é‚͔̂ώG‚Ȃ̂ÅAŽŸ‚̂悤‚È\‘¢‘Ì‚ð -—p‚¢‚Ă܂Ƃ߂ēn‚·‚悤‚É‚µ‚Ä‚ ‚è‚Ü‚·B
      -As explained above, various parameters with respect to ZLD at the client/server side and encoding are necessary for DNS message conversion. When specifying those parameters for API functions, it is troublesome to specify them using different arguments for various functions. To avoid this, the following structure can be used to pass the parameters collectively. -

      -
      -typedef struct mdn_msgtrans_param {
      -	int use_local_rule;
      -	mdn_ZLDrule_t local_rule;
      -	mdn_converter_t local_converter;
      -	mdn_converter_t local_alt_converter;
      -	char *local_ZLD;
      -	mdn_converter_t target_converter;
      -	mdn_converter_t target_alt_converter;
      -	char *target_ZLD;
      -	mdn_normalizer_t normalizer;
      -} mdn_msgtrans_param_t;
      -
      -
      -

      use_local_rule‚ÍA“ü—Í‘¤‚̃ƒbƒZ[ƒW‚ÌZLD‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -”»’è•û–@‚ðŽw’肵‚Ü‚·B
      -use_local_rule specifies the ZLD and encoding determination method fr the message at the input side. -

      ‚à‚µ’l‚ª^‚È‚ç‚ÎA‚±‚ê‚ç‚Ílocal_rule‚Å -Žw’肳‚ê‚éZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌW‡‚ƃƒbƒZ[ƒW‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚Ì -ƒ}ƒbƒ`ƒ“ƒOˆ—‚ðs‚¢Aƒ}ƒbƒ`‚µ‚½‚à‚Ì‚ªŽg‚í‚ê‚Ü‚·B -‚±‚ê‚̓Nƒ‰ƒCƒAƒ“ƒg‚©‚çDNSƒT[ƒo‚Ö‚ÌƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚̕ϊ·‚ÌÛ‚É -—p‚¢‚ç‚ê‚Ü‚·B -‚±‚Ìê‡A”»’茋‰Ê‚ªlocal_converter‚Ælocal_ZLD‚É -‘ã“ü‚³‚ê‚Ü‚·B
      -When the value is true, matching processing is performed on the ZLD and encoding as specified by local_rule and the domain names included in the message, and the matches are used when converting the request message from the client to the DNS server; in this case, the judgement results are assigned to local_converter and local_ZLD. -

      ˆê•ûAlocal_rule‚ª‹U‚È‚ç‚ÎZLD‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -local_converter‚Ælocal_ZLD‚ÅŽw’肳‚ê‚é‚à‚Ì‚ª‚»‚Ì‚Ü‚Ü -Žg—p‚³‚ê‚Ü‚·B -‚±‚ê‚ÍDNSƒT[ƒo‚©‚çƒNƒ‰ƒCƒAƒ“ƒg‚Ö‚ÌƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚̕ϊ·‚ÌÛ‚É -—p‚¢‚ç‚ê‚Ü‚·B -‚±‚Ìê‡local_rule‚Ì’l‚ÍŽg—p‚³‚ê‚Ü‚¹‚ñBuse_local_rule ‚Ì’l‚ÉŠÖ‚í‚炸Alocal_alt_converter ‚Í“ü—Í‘¤ƒƒbƒZ[ƒW‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄŽg—p‚³‚ê‚Ü‚·B‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª‚È‚¢ê‡‚É‚Í NULL ‚ðŽw’肵‚Ü‚·B
      -On the other hand, if local_rule is false, the ZLD and encoding specified by local_converter and local_ZLD are used as is when converting the request message sent from DNS server to the client; in this case, the value of local_rule is not used. -Regardless of the value of use_local_rule, local_alt_converter defines the alternate encoding method used to encode the message at the input side. -When there is no alternate encoding, NULL is specified. -

      target_converter and target_ZLD are used to specify the output side encoding and ZLD. -target_converter‚Ætarget_ZLD‚Åo—Í‘¤‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÆZLD‚ðŽw’肵‚Ü‚·B -target_alt_converter‚ÍAtarget_converter‚É‚æ‚é -o—Í‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªA•ÏŠ·‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚É -o—Í‘¤‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ªŠÜ‚Ü‚ê‚Ä‚¢‚½‚½‚߂Ɏ¸”s‚µ‚½ê‡‚ÉA -target_converter‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚Ü‚·B -‚È‚¨ local_alt_converter ‚Æ target_alt_converter -‚ɑΉž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í‚¢‚¸‚ê‚à -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB
      -target_alt_converter
      is alternately used with target_converter when the conversion by target_converter to the output side encoding fails because the domain name to be converted includes characters that do not exist in the output side character set. Note that the encoding corresponding to local_alt_converter and target_alt_converter must be ASCII-compatible encoding, respectively. -

      normalizer‚ͳ‹K‰»•ûŽ®‚ðŽw’肵‚Ü‚·B
      -normalizer specifies normalization method. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      -
      mdn_msgtrans_translate -
      -
      -mdn_result_t
      -mdn_msgtrans_translate(mdn_msgtrans_param_t *param,
      -	const char *msg, size_t msglen,
      -	char *outbuf, size_t outbufsize,
      -	size_t *outmsglenp)
      -
      -

      msg ‚¨‚æ‚Ñ msglen ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚ð -•ÏŠ·ƒpƒ‰ƒ[ƒ^ param ‚É‚µ‚½‚ª‚Á‚ĕϊ·‚µAŒ‹‰Ê‚ð -outbuf ‚¨‚æ‚Ñ outbufsize ‚ÅŽ¦‚³‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B -outmsglenp ‚ɂ͕ϊ·Œ‹‰Ê‚̃ƒbƒZ[ƒW’·‚ªŠi”[‚³‚ê‚Ü‚·B
      -Converts the DNS messages specified by msg and msglen according to the conversion parameter param and stores the result in the area indicated by outbuf and outbufsize. The message length of the conversion result is stored in outmsglenp. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_messageA -mdn_invalid_encodingA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_message -
      mdn_invalid_encoding -
      mdn_buffer_overflow - -

      - -
      - -

      normalizer ƒ‚ƒWƒ…[ƒ‹
      -normalizer module

      - -

      normalizer ƒ‚ƒWƒ…[ƒ‹‚Í•¶Žš—ñ‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -³‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ă͌»ÝŽŸ‚Ì‚à‚Ì‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -‚Ü‚½•Ê‚ÌV‚½‚ȳ‹K‰»•ûŽ®‚ð’ljÁ“o˜^‚·‚邽‚ß‚ÌAPI‚à—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B
      -normalizer module normalizes character string. -The following normalization methods are currently provided. -In addition, API used to additionally register new normalization method is provided. -

        -
      • ascii-uppercase
        - ASCII ‚̬•¶Žš‚©‚ç‘å•¶Žš‚ւ̕ϊ·
        - Converts ASCII lowercase to uppercase -
      • ascii-lowercase
        - ASCII ‚Ì‘å•¶Žš‚©‚笕¶Žš‚ւ̕ϊ·
        - Converts ASCII uppercase to lowercase -
      • unicode-uppercase
        - Unicode ‚Ì•¶Žš‘®«‚ð‹K’肵‚½ - Case Mappings - ‚É‹Lq‚³‚ê‚Ä‚¢‚鬕¶Žš‘å•¶Žšƒ}ƒbƒsƒ“ƒO‚É]‚Á‚½¬•¶Žš‚©‚ç‘å•¶Žš‚ւ̕ϊ·
        -Converts lowercase to uppercase in accordance with the lowercase/uppercase mapping described in Case Mappings that prescribes character properties of Unicode. -
      • unicode-lowercase
        - ã‹L‚Æ“¯‚¶•¶‘‚É‚µ‚½‚ª‚Á‚½‘å•¶Žš‚©‚笕¶Žš‚ւ̕ϊ·
        -Converts uppercase to lowercase in accordance with the same above document. -
      • unicode-form-c
        -Unicode ‚̳‹K‰»•ûŽ®‚ð‹K’肵‚½ - Unicode Normalization Forms - ‚É‹Lq‚³‚ê‚Ä‚¢‚éNormaliztion form C ‚É]‚¤³‹K‰»
        -Normalizes characters in accordance with Normaliztion form C described in Unicode Normalization Forms that prescribes normalization method of Unicode. -
      • unicode-form-kc
        -“¯•¶‘‚É‹Lq‚³‚ê‚Ä‚¢‚é Unicode Normalization Form KC ‚É - ]‚¤³‹K‰»
        - Normalizes characters in accordance with Unicode Normalization Form KC described in the above same document. -
      • ja-kana-fullwidth
        - “ú–{Œê‚Ì”¼Šp‚©‚È‚©‚ç‘SŠpƒJƒ^ƒJƒi‚ւ̕ϊ·
        -Converts Japanese single-byte katakana to double-byte katakana. -
      • ja-fullwidth
        - ja-kana-fullwidth ‚Æ“¯‚¶B - ‚±‚ê‚͈ȑO‚̃o[ƒWƒ‡ƒ“‚Ƃ̌݊·«‚Ì‚½‚߂Ɏc‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ÅA - «—ˆ‚̃o[ƒWƒ‡ƒ“‚ł͂Ȃ­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·Bja-kana-fullwidth - ‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
        -Same as ja-kana-fullwidth. - This is kept for compatibility with the previous version and may be eliminated in the future version. Use ja-kana-fullwidth. -
      • ja-alnum-halfwidth
        - “ú–{Œê‚Ì‘SŠp‰p”Žš‚¨‚æ‚Ñ‘SŠpƒ}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɕϊ·
        -Converts Japanese double-byte alphanumeric characters and double-byte minus symbol to single-byte characters -
      • ja-compose-voiced-sound
        - “ú–{Œê‚Ì‘SŠp‚©‚ȂƂ»‚ê‚É‘±‚­‘÷“_(J)”¼‘÷“_(K)‚ð - ‘÷“_E”¼‘÷“_‚‚«‚Ì‚©‚È1•¶Žš‚ɕϊ·
        -Converts Japanese double-byte katakana and following voiced consonant mark (J) and circle attached to certain katakana (K) to one katakana character attached with voiced consonant mark or circle. -
      • ja-minus-hack
        - “ú–{Œê‚Ì‘SŠpƒ}ƒCƒiƒX‹L†(|)‚©‚çƒnƒCƒtƒ“(-)‚ւ̕ϊ·
        -Converts Japanese double-byte minus symbol (|) to hyphen(-). -
      • ja-delimiter-hack
        - ‹å“_(B)‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh(D)‚©‚çƒsƒŠƒIƒh(.)‚ւ̕ϊ·
        -Converts Japanese period (B) and double-byte period (D) to period (.). -
      -

      ÅŒã‚Ìja-delimiter-hack‚Í‹å“_‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh‚ð -ƒhƒƒCƒ“–¼‚̃ZƒpƒŒ[ƒ^‚Å‚ ‚éƒsƒŠƒIƒh‚ÆŒ©‚È‚·‚悤‚É‚·‚é‚à‚Ì‚ÅA -‚±‚ê‚Í–{—ˆ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃†[ƒU“ü—Í‚ÌÛ‚ÌŽèŠÔ‚¨‚æ‚ъԈႢ‚ðŒyŒ¸‚·‚邽‚ß‚É -—pˆÓ‚³‚ꂽ‚à‚̂ł·‚ªAƒuƒ‰ƒEƒU‚É‚æ‚Á‚Ă̓sƒŠƒIƒh‚̂Ȃ¢ƒhƒƒCƒ“–¼‚ª -ƒhƒƒCƒ“–¼‚ł͂Ȃ­ƒL[ƒ[ƒh‚Æ”Fޝ‚³‚ê‚Ä‚µ‚Ü‚¤‚Ȃǂ̖â‘肪‚ ‚èA -‚Ü‚½‚±‚ê‚̓hƒƒCƒ“–¼‚̳‹K‰»‚͈̔͂ðˆí’E‚µ‚Ä‚¢‚邯‚àl‚¦‚ç‚ê‚é‚Ì‚ÅA -‚Å‚«‚邾‚¯‚±‚̳‹K‰»•ûŽ®‚ÌŽg—p‚Í”ð‚¯‚é‚ׂ«‚Å‚·B
      -The last ja-delimiter-hack is to assume Japanese period and double-byte period as the period that is the separator of domain name. This is originally provided to reduce steps or mistakes when user enters multilingual domain names. However, depending on browser, there are problems that domain names without period are recognized as keyword not domain name and also this method is supposed to exceed the scope of normalization of domain names, therefore, use of this normalization method should be avoided as much as possible. - -

      ³‹K‰»•ûŽ®‚Í•¡”•¹—p‚·‚邱‚Æ‚à‰Â”\‚ÅA‚±‚Ìꇎw’肵‚½‡‚É“K—p‚³‚ê‚Ü‚·B
      -More than one normalization methods can be used and they are applied in the order they were specified. -

      normalizer ƒ‚ƒWƒ…[ƒ‹‚Íu³‹K‰»ƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -³‹K‰»‚ðs‚¤‚Éæ—§‚Á‚Ă܂¸³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð쬂µAŽg—p‚·‚鳋K‰»•ûŽ®‚ðƒRƒ“ƒeƒLƒXƒg‚É“o˜^‚µ‚Ä‚¨‚«‚Ü‚·BŽÀۂ̳‹K‰»ˆ—‚Ìۂɂͳ‹K‰»•ûŽ®‚ł͂Ȃ­A‚±‚̳‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ðŽw’肵‚Ü‚·B³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Ímdn_normalizer_t Œ^‚Å‚ ‚èAŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -normalizer module uses the concept "normalization context". Prior to normalization, a normalization context is created and the normalization method to be used is registered in the context. For actual normalization procesesing, not the normalization method but this normalization context is specified. The type of normalization context is mdn_normalizer_t type and defined as the following opaque type. -

      -
      -typedef struct mdn_normalizer *mdn_normalizer_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_normalizer_initialize -
      -
      -mdn_result_t
      -mdn_normalizer_initialize(void)
      -
      -

      ƒ‚ƒWƒ…[ƒ‹‚̉Šú‰»ˆ—‚ðs‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É - •K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B
      -Initializes module. Make sure to call this function before calling other API function of this module. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_normalizer_create -
      -
      -mdn_result_t
      -mdn_normalizer_create(mdn_normalizer_t *ctxp)
      -
      -

      ³‹K‰»—p‚Ì‹ó‚̃Rƒ“ƒeƒLƒXƒg‚ð쬂µActxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B -•Ô‚³‚ê‚éƒRƒ“ƒeƒLƒXƒg‚Í‹ó‚ÅA³‹K‰»•ûŽ®‚͈ê‚‚àŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB -³‹K‰»•ûŽ®‚ð’ljÁ‚·‚é‚É‚Í -mdn_normalizer_add ‚ð—p‚¢‚Ü‚·B
      -Creates an empty content for normalization and stores it in the area specified by ctxp. -The returned content is empty and does not contain any normalization methods. -To add normalization method, mdn_normalizer_add is used. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_normalizer_destroy -
      -
      -void
      -mdn_normalizer_destroy(mdn_normalizer_t ctx)
      -
      -

      mdn_normalizer_create ‚Å -쬂µ‚½³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð휂µAƒAƒƒP[ƒg‚³‚ꂽƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B
      -Deletes the normalization context created by mdn_normalizer_create and releases the allocated memory. -

      - -

      mdn_normalizer_add -
      -
      -mdn_result_t
      -mdn_normalizer_add(mdn_normalizer_t ctx, const char *scheme_name)
      -
      -

      mdn_normalizer_create ‚Å -쬂µ‚½³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ÉAscheme_name ‚ÅŽw’肳‚ê‚é -³‹K‰»•ûŽ®‚ð’ljÁ‚µ‚Ü‚·Bˆê‚‚̃Rƒ“ƒeƒLƒXƒg‚É•¡”‚̳‹K‰»•ûŽ®‚ð -’ljÁ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
      -Adds the normalization method specified by scheme_name in the normalization context created by mdn_normalizer_create. More than one normalization methods can be specified in one context. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_nameA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_name -
      mdn_nomemory -

      - -

      mdn_normalizer_normalize -
      -
      -mdn_result_t
      -mdn_normalizer_normalize(mdn_normalizer_t ctx,
      -	const char *from, char *to, size_t tolen)
      -
      -

      UTF-8 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚É ctx ‚Å -Žw’肳‚ê‚鳋K‰»•ûŽ®‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð to ‚Æ tolen ‚Å -Žw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -ctx ‚É•¡”‚̳‹K‰»•ûŽ®‚ªŠÜ‚Ü‚ê‚Ä‚¢‚éê‡A‚»‚ê‚炪 -mdn_normalizer_add ‚ŒljÁ‚µ‚½‡”Ô‚É -“K—p‚³‚ê‚Ü‚·B
      -Applies the normalization method specified by ctx to the character strings encoded by UTF-8 from and writes the result in the area specified by to and tolen. -When more than one normalization method is included in ctx, they are applied in the order they were added by mdn_normalizer_add. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_encoding -
      mdn_nomemory -

      - -

      mdn_normalizer_register -
      -
      -mdn_result_t
      -mdn_normalizer_register(const char *scheme_name,
      -	mdn_normalizer_proc_t proc)
      -
      -

      V‚µ‚¢³‹K‰»•ûŽ®‚ð scheme_name ‚Æ‚¢‚¤–¼‘O‚Å“o˜^‚µ‚Ü‚·B -proc ‚Í‚»‚̳‹K‰»•ûŽ®‚̈—ŠÖ”‚ւ̃|ƒCƒ“ƒ^‚Å‚·B
      -New normalization methods are registered in scheme_name.proc is a pointer to the processing function of that normalization method. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory - -

      - -
      - -

      race ƒ‚ƒWƒ…[ƒ‹
      -race module

      - -

      race ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚̉ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñB -converter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚Ä RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B
      -The race module performs conversion between UTF-8 and the proposed RACE multilingual domain name method. This module is implemented as a low-order module of converter module and is not directly called by the application. When converter module is requested for conversion with RACE encoding, this module is indirectly called. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__race_open -
      -
      -mdn_result_t
      -mdn__race_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Opens conversion context with RACE encoding. Actually, this does not do anything. -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B
      -Always returns mdn_success. -

      - -

      mdn__race_close -
      -
      -mdn_result_t
      -mdn__race_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB
      -Closes conversion context with RACE encoding. Actually, this does not do anything. -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B
      -Always returns mdn_success. -

      - -

      mdn__race_convert -
      -
      -mdn_result_t
      -mdn__race_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      RACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B -“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -dir ‚ªmdn_converter_l2u‚È‚ç -RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l -‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B
      -Performs bidirectional conversion between RACE-encoded and UTF-8 encoded character strings. Converts the from input character string and writes the result in the area specified by to and tolen. -When dir is mdn_converter_l2u, RACE encoding is converted to UTF-8 encoding. When it is mdn_converter_u2l, UTF-8 encoding is converted to RACE encoding. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_nomemory - -

      - -
      - -

      res ƒ‚ƒWƒ…[ƒ‹
      -res module

      - -

      res ƒ‚ƒWƒ…[ƒ‹‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤ (ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“) -‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—A‚‚܂èƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚â -³‹K‰»‚ðs‚¤Û‚Ì‚ƒŒƒxƒ‹ API ‚ð’ñ‹Ÿ‚µ‚Ü‚·B -‚±‚̃‚ƒWƒ…[ƒ‹‚Í‚ ‚Æ‚Åà–¾‚·‚é resconf ƒ‚ƒWƒ…[ƒ‹ -‚ƂƂà‚É—p‚¢‚邱‚Æ‚ð‘O’ñ‚ÉÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B
      -The res module provides high level APIs used when multilingual domain names are processed at the client side (by the resolver library or an application) i.e. when domain name encoding conversion or normalization is performed. This module is designed on the assumption that it will be used together with resconf module, which is explained below. - -

      ‚±‚ê‚ç‚̃‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚é API ‚ðŽg—p‚·‚ê‚ÎA -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚Ȃǂ̊֔‚ð’¼Ú -ŒÄ‚Ño‚·•K—v‚Í‚ ‚è‚Ü‚¹‚ñB
      -Using APIs provided by the module, it is not necessary to directly call converter module or normalizer module function. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      -
      mdn_res_localtoucs -
      -
      -mdn_result_t
      -mdn_res_localtoucs(mdn_resconf_t conf, const char *local_name,
      -	char *ucs_name, size_t ucs_name_len)
      -
      -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽ -ƒhƒƒCƒ“–¼•¶Žš—ñ local_name ‚ð UTF-8 ‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð -ucs_name ‚ÉŠi”[‚µ‚Ü‚·Bucs_name_len ‚Å -‚ ‚ç‚©‚¶‚ß ucs_name ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B
      -Converts local_name domain name character strings expressed in the local encoding used by the application to UTF-8 and stores the result in ucs_name. ucs_name_len is used to specify the size of the area secured for ucs_name beforehand. - -

      conf ‚Í resconf ƒ‚ƒWƒ…[ƒ‹ ‚̕Ԃ· -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚Å‚·B‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Î -•ÏŠ·‚Ís‚í‚ꂸAlocal_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name -‚ɃRƒs[‚³‚ê‚Ü‚·B
      -conf is the client configuration context returned by resconf module. When conf is NULL, conversion is not performed and the contents of local_name is copied to ucs_name as is. - -

      ƒhƒƒCƒ“–¼ local_name ‚ª]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‚µ‚Ä -³‚µ‚­ (‚‚܂è‰p”Žš‚¨‚æ‚уnƒCƒtƒ“‚ƃsƒŠƒIƒh‚©‚ç\¬‚³‚ê‚é)A‚©‚ -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ªÝ’肳‚ê‚Ä‚¢‚éê‡Aƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ă̕ϊ·‚ðs‚¤‘O‚É -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚̕ϊ·‚ðŽŽ‚ÝAޏ”s‚µ‚½ê‡‚É -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ÄA -mdn_res_ucstolocal ‚ª -—^‚¦‚ç‚ꂽƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚Å‚«‚¸ -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚½ê‡‚Å‚àA‚»‚ê‚ð–{ŠÖ”‚É—^‚¦‚ê‚Î -³‚µ‚¢ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ª“¾‚ç‚ê‚Ü‚·B
      -Conversion from local encoding to UTF-8 is performed when the local_name domain name is a valid conventional ASCII domain name (that is, it consists of alphanumeric characters, hyphens and periods), alternate encoding is set in the client configuraiton context conf, and conversion to UTF-8 from the alternate encoding is attempted and failed before conversion of the local encoding is performed. Because of this, even if mdn_res_ucstolocal could not convert the given domain name to the local encoding and converted to the alternate encoding, if it is given to this function, the correct UTF-8 encoded domain name can be obtained. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_name -
      mdn_failure - -

      - -

      mdn_res_ucstolocal -
      -
      -mdn_result_t
      -mdn_res_ucstolocal(mdn_resconf_t conf, const char *ucs_name,
      -	char *local_name, size_t local_name_len)
      -
      -

      mdn_res_localtoucs ‚Ì -‹t‚̕ϊ·A‚‚܂è UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼•¶Žš—ñ ucs_name -‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð -local_name ‚ÉŠi”[‚µ‚Ü‚·Blocal_name_len ‚Å -‚ ‚ç‚©‚¶‚ß local_name ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B
      -Performs reverse conversion of mdn_res_localtoucs, i.e., converts the ucs_name domain name character string expressed in UTF-8 to the local encoding used by the application and stores the result in local_name. local_name_len is used to specify the size of the area secured for local_name beforehand. - -

      conf ‚Í resconf ƒ‚ƒWƒ…[ƒ‹ ‚̕Ԃ· -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚Å‚·B‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Î -•ÏŠ·‚Ís‚í‚ꂸAlocal_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name -‚ɃRƒs[‚³‚ê‚Ü‚·B
      -conf is the client configuration context returned by resconf module. When conf is NULL, conversion is not performed and the contents of local_name is copied in ucs_name as is. - -

      ‚à‚µƒhƒƒCƒ“–¼ ucs_name ‚Ì’†‚Ƀ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -•¶ŽšW‡‚ɂȂ¢•¶Žš‚ª‚ ‚Á‚ĕϊ·‚ÉŽ¸”s‚µ‚½ê‡AƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg -conf ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªÝ’肳‚ê‚Ä‚¢‚ê‚ÎA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªs‚í‚ê‚Ü‚·B -‚±‚ê‚É‚æ‚èA‚½‚Æ‚¦ DNS ƒT[ƒo‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ɋ܂܂ê‚È‚¢•¶Žš‚ð -ŠÜ‚ÞƒhƒƒCƒ“–¼‚ª•Ô‚³‚ꂽꇂɂàƒGƒ‰[‚ƂȂ炸‚ɕϊ·‚ªs‚í‚ê‚Ü‚·B -‚È‚¨A‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽ•¶Žš—ñ‚Í -mdn_res_localtoucs ‚É‚æ‚Á‚Ä -UTF-8 •¶Žš—ñ‚É–ß‚·‚±‚Æ‚ª‰Â”\‚Å‚·B
      -When conversion fails because a character that is not in the character set of the local encoding is contained in the ucs_name domain name, if the alternate encoding is set in the client configuration context conf, conversion to the alternate encoding is performed instead of to the local encoding. -Because of this, even if the DNS server returns a domain name that includes a character that is not included in the local encoding, conversion is performed without error. Note that character strings converted to the alternate encoding can be returned to UTF-8 character strings by mdn_res_localtoucs. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_name -
      mdn_failure - -

      - -

      mdn_res_normalize -
      -
      -mdn_result_t
      -mdn_res_normalize(mdn_resconf_t conf, const char *name,
      -                  char *normalized_name, size_t normalized_name_len)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ name ‚ɑ΂µ‚ij‹K‰»‚ðŽÀs‚µA -‚»‚ÌŒ‹‰Ê‚ð normalized_name ‚ÉŠi”[‚µ‚Ü‚·B -normalized_name_len ‚Å‚ ‚ç‚©‚¶‚ß normalized_name ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B
      -Executes normalization on the name domain name expressed in UTF-8 according to the client configuration context conf and stores the result in normalized_name. -normalized_name_len is used to specify the size of the area secured for normalized_name beforehand. - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚γ‹K‰»‚Ís‚í‚ꂸA -name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü normalized_name ‚ɃRƒs[‚³‚ê‚Ü‚·B
      -When conf is NULL, normalization is not performed and the contents of name is copied in normalized_name as is. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_nomemory - -

      - -

      mdn_res_ucstodns -
      -
      -mdn_result_t
      -mdn_res_ucstodns(mdn_resconf_t conf, const char *ucs_name, char *dns_name,
      -	size_t dns_name_len)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ ucs_name ‚ð DNS ƒvƒƒgƒRƒ‹ã‚Å -—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð dns_name ‚É -Ši”[‚µ‚Ü‚·B -dns_name_len ‚Å‚ ‚ç‚©‚¶‚ß dns_name_len ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B
      -Converts the ucs_name domain name expressed in UTF-8 to the encoding used in the DNS protocol per the conf client configuration context and stores the result in dns_name. dns_name_len is used to specify the size of the area secured for dns_name_len beforehand. - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Εϊ·‚Ís‚í‚ꂸA -ucs_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü dns_name ‚ɃRƒs[‚³‚ê‚Ü‚·B
      -When conf is NULL, conversion is not performed and the contents of ucs_name are copied to dns_name as is. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_invalid_name -
      mdn_failure - -

      - -

      mdn_res_dnstoucs -
      -
      -mdn_result_t
      -mdn_res_dnstoucs(mdn_resconf_t conf, const char *dns_name, char *ucs_name,
      -	size_t ucs_name_len)
      -
      -

      mdn_res_ucstodns ‚Ì‹t•ÏŠ·A -‚‚܂èƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ dns_name -‚ð UTF-8 ‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð ucs_name ‚ÉŠi”[‚µ‚Ü‚·B -ucs_name_len ‚Å‚ ‚ç‚©‚¶‚ß ucs_name_len ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B
      -Performs reverse conversion of mdn_res_ucstodns, i.e., converts the dns_name domain name expressed in the encoding used in the DNS protocol to UTF-8 per the conf client configuration context and stores the result in ucs_name. ucs_name_len is used to specify the size of the area secured for ucs_name_len beforehand. - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Εϊ·‚Ís‚í‚ꂸA -dns_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name ‚ɃRƒs[‚³‚ê‚Ü‚·B
      -When conf is NULL, conversion is not peformed and the contents of dns_name are copied to ucs_name as is. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_invalid_name -
      mdn_failure - -

      - -
      - -

      resconf ƒ‚ƒWƒ…[ƒ‹
      -resconf module

      - -

      resconf ƒ‚ƒWƒ…[ƒ‹‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤ (ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“) -‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤Û‚ÉŽQÆ‚³‚ê‚é -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚ÝA -ƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ꂽݒè‚É‚µ‚½‚ª‚Á‚½‰Šú‰»‚ðŽÀs‚µ‚Ü‚·B‚Ü‚½ -Ý’èî•ñ‚ðŽæ‚èo‚·‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -The resconf module loads the client configuration file referenced when a multilingual domain name is processed at the client side (by a resolver library or application) and executes initialization in accordance with the settings described in the file. It also provides a function to extract the setting information. - -

      resconf ƒ‚ƒWƒ…[ƒ‹‚ÍuƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ꂽݒè‚Í‚±‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚É -Ši”[‚³‚êA‚±‚̃Rƒ“ƒeƒLƒXƒg‚ðˆø”‚É‚µ‚Ä API ŠÖ”‚ðŒÄ‚Ño‚·‚±‚Ƃɂæ‚Á‚Ä -ݒ肳‚ꂽ’l‚ðŽæ‚èo‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í mdn_resconf_t Œ^‚Å‚ ‚èA -ŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -The resconf module uses the "client configuration context" concept. -Settings described in the client configuration file are stored in this client configuration context, which is used as an argument to call API functions to extract the set values. The client configuration context is defined by mdn_resconf_t and is of the following opaque type. -

      -
      -typedef struct mdn_resconf *mdn_resconf_t;
      -
      -
      - - - -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚Í’P‘̂łàŽg—p‚Å‚«‚Ü‚·‚ªA -res ƒ‚ƒWƒ…[ƒ‹‚Æ‘g‚݇‚킹‚邱‚Ƃɂæ‚Á‚ÄA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̑½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðŠÈ’P‚És‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚É -ÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B
      -This module can be used as a single module but it is designed so that by combining it with res module multilingual domain names can easily be processed at the client side. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_resconf_initialize -
      -
      -mdn_result_t
      -mdn_resconf_initialize(void)
      -
      -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤Û‚É•K—v‚ȉŠú‰»‚ðŽÀs‚µ‚Ü‚·B -–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É•K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B -–{ƒ‚ƒWƒ…[ƒ‹‚ªŽg—p‚·‚鑼‚̃‚ƒWƒ…[ƒ‹‚̉Šú‰»‚à‚·‚ׂÄs‚¤‚Ì‚ÅA‚±‚êˆÈŠO‚̉Šú‰» -ŠÖ”‚ðŒÄ‚Ño‚·•K—v‚Í‚ ‚è‚Ü‚¹‚ñB
      -Executes initialization required when processing multilingual domain names. Always call this function before calling other API functions of this module. Since this function initializes all other modules used by this module, it is not necessary to call another initialization function. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_resconf_create -
      -
      -mdn_result_t
      -mdn_resconf_create(mdn_resconf_t *ctxp)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ðì¬A‰Šú‰»‚µActxp ‚ÌŽw‚· -—̈æ‚ÉŠi”[‚µ‚Ü‚·B -‰Šúó‘Ô‚Å‚ÍA‚Ü‚¾ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚͓ǂݞ‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB -“ǂݞ‚Þ‚½‚ß‚É‚Í -mdn_resconf_loadfile ‚ðŽÀs‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B
      -Creates and initializes client configuration context and stores it in the area indicated by ctxp. In the initial status, the contents of the client configuration file are not loaded. To do so, mdn_resconf_loadfile must be executed. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_resconf_destroy -
      -
      -void
      -mdn_resconf_destroy(mdn_resconf_t ctx)
      -
      -

      mdn_resconf_create ‚Å -쬂³‚ꂽƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B
      Deletes the client configuration context created by mdn_resconf_create and releases the allocated memory. -

      - -

      mdn_resconf_loadfile -
      -
      -mdn_result_t
      -mdn_resconf_loadfile(mdn_resconf_t ctx, const char *file)
      -
      -

      file ‚ÅŽw’肳‚ê‚é -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ð“ǂݞ‚ÝA -Ý’è“à—e‚ðƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚ÉŠi”[‚µ‚Ü‚·B -file ‚ª NULL ‚Ìꇂɂ̓fƒtƒHƒ‹ƒg‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì -“à—e‚ð“ǂݞ‚݂܂·B
      -Loads the contents of the client configuration file specified by file and stores the setting contents in the ctx client configuration context. -When file is NULL, the contents of the default client configuration file are loaded. -

      ‚·‚Å‚ÉÝ’èƒtƒ@ƒCƒ‹‚ª“ǂݞ‚Ü‚ê‚Ä‚¢‚éƒRƒ“ƒeƒLƒXƒg‚ɑ΂µ‚ÄA -•Ê‚ÌÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ð“ǂݞ‚Þ‚±‚Æ‚à‚Å‚«‚Ü‚·B‚»‚ÌꇂɂÍA -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ÉŠi”[‚³‚ê‚Ä‚¢‚½‘O‚ÌÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚Í -‚·‚ׂÄÁ‚¦AV‚½‚ɓǂݞ‚ñ‚¾Ý’èƒtƒ@ƒCƒ‹‚Ì“à—e‚Å’u‚«Š·‚í‚è‚Ü‚·B
      -If the configuration file has already been loaded and another configuration file is loaded, the previous configuration file contents stored in the client configuration context are erased and replaced with the newly loaded configuration file contents. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nofileA -mdn_invalid_syntaxA -mdn_invalid_nameA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nofile -
      mdn_invalid_syntax -
      mdn_invalid_name -
      mdn_nomemory -

      - -

      mdn_resconf_defaultfile -
      -
      -char *
      -mdn_resconf_defaultfile(void)
      -
      -

      ƒfƒtƒHƒ‹ƒg‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚Í mDNkit ‚̃Rƒ“ƒpƒCƒ‹Žž‚ÌÝ’è‚É‚æ‚Á‚ÄŒˆ‚Ü‚è‚Ü‚·‚ªA“Á‚ÉŽw’肵‚È‚¯‚ê‚Î
      -Returns the path to the default client configuration file. This is determined by the settings set when mDNkit is compiled. The default path is as follows: -

      -
      -/usr/local/etc/mdnres.conf
      -
      -
      -‚Å‚·B -

      - -

      mdn_resconf_localconverter -
      -
      -mdn_converter_t
      -mdn_resconf_localconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Ƃ̊Ԃ̕¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚ß‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª”»•ʂł«‚È‚©‚Á‚½ -ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -Based on the ctx client configuration context information, returns the code conversion context to perform character code conversion between the local encoding and UTF-8. NULL is returned if the local encoding cannot be determined. -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B
      -For details of code conversion context, refer to the converter module section. -

      - -

      mdn_resconf_alternateconverter -
      -
      -mdn_converter_t
      -mdn_resconf_alternateconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -•¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚߂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̓hƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚邱‚Æ‚ª -‚Å‚«‚È‚©‚Á‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚É—p‚¢‚ç‚ê‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‚±‚Ƃł·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -Based on the ctx client configuration context information, returns the code conversion context to perform character code conversion between the alternate encoding and UTF-8. The alternate encoding is used instead of the local encoding when a domain name could not be converted to the local encoding. NULL is returned if the client configuration file has not been loaded or the encoding method is not specified in the configuration file. -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B
      -For code conversion context, refer to converter module section. -

      - -

      mdn_resconf_serverconverter -
      -
      -mdn_converter_t
      -mdn_resconf_serverconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -•¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚߂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -Based on the information of client configuration context ctx, returns the code conversion context to perform character code conversion between the encoding used on DNS protocol and UTF-8. NULL is returned if the client configuration file has not been loaded or the encoding method is not specified in the configuration file. - -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B
      -For code conversion context, refer to converter module section. -

      - -

      mdn_resconf_ZLD -
      -
      -const char *
      -mdn_resconf_ZLD(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚߂Ɉꕔ‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ƂƂà‚É—p‚¢‚ç‚ê‚é ZLD ‚Ì•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -ZLD ‚ðŽg—p‚µ‚È‚¢Ý’è‚Ìê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -Based on the information in the ctx client configuration context, returns the ZLD character string used together with some encoding methods to differentiate between multilingual domain names and conventional domain names. NULL is returned when ZLD is not used. -

      mDNkit ‚̓fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ðƒTƒ|[ƒg‚¹‚¸A‚±‚ÌŠÖ”‚Íí‚É -NULL ‚ð•Ô‚µ‚Ü‚·BmDNkit ‚ð ZLD ‚ðƒTƒ|[ƒg‚·‚邿‚¤‚ÉÝ’è‚·‚é•û–@‚É -‚‚¢‚Ä‚Í mDNkit ‚̃Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -configure ŽÀs -‚Ì€‚ð‚²——‚­‚¾‚³‚¢B
      -By default, mDNkit does not support ZLD and this function always returns NULL. For details of how to set mKNkit to support ZLD, refer to configure execute in the mDNkit Installation Guide. -

      - -

      mdn_resconf_normalizer -
      -
      -mdn_normalizer_t
      -mdn_resconf_normalizer(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -ƒhƒƒCƒ“–¼‚ð³‹K‰»‚·‚邽‚߂̳‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -³‹K‰»•ûŽ®‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -Based on the information of client configuration context ctx, returns the normalization context used to normalize domain names. -NULL is returned if the client configuration file has not been loaded or the normalization method is not specified in the configuration file. -

      ³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -normalizer ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B
      -For details of normalization context, refer to the normalizer module section. - -

      - -
      - -

      result ƒ‚ƒWƒ…[ƒ‹ result module

      - -

      result ƒ‚ƒWƒ…[ƒ‹‚̓‰ƒCƒuƒ‰ƒŠ‚ÌŠeŠÖ”‚ª•Ô‚· -mdn_result_tŒ^‚Ì’l‚ðˆµ‚¤ƒ‚ƒWƒ…[ƒ‹‚ÅA -’l‚©‚ç‚»‚̃R[ƒh‚ɑΉž‚·‚郃bƒZ[ƒW‚ւ̕ϊ·‚ð’ñ‹Ÿ‚µ‚Ü‚·B
      -The result module handles the mdn_result_t type value returned by each function in the library and converts the value to the corresponding message code. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      -
      -
      -char *
      -mdn_result_tostring(mdn_result_t result)
      -
      -

      mdn_result_tŒ^‚Ì’l result ‚ɑΉž‚·‚é -ƒƒbƒZ[ƒW•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B
      -Returns the message character string corresponding to the value result of mdn_result_t type. -

      –¢’è‹`‚̃R[ƒh‚ɑ΂µ‚Ä‚Í unknown result code ‚Æ‚¢‚¤•¶Žš—ñ‚ª -•Ô‚³‚ê‚Ü‚·B
      -An unknown result code character string is returned for undefined code. - -

      - -
      - -

      selectiveencode ƒ‚ƒWƒ…[ƒ‹ selectiveencode module

      - -

      selectiveencode ƒ‚ƒWƒ…[ƒ‹‚̓][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚̃eƒLƒXƒg‚Ì’†‚©‚ç -”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ð’T‚µo‚·ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -‚à‚¿‚ë‚ñƒeƒLƒXƒg‚̂ǂ̕”•ª‚ªƒhƒƒCƒ“–¼‚Ȃ̂©‚ð”»’è‚·‚邱‚Ƃ͈ê”Ê“I‚É‚Í -•s‰Â”\‚Ȃ̂ÅAŽÀۂɂ͎Ÿ‚̂悤‚ȑ傫‚ȉ¼’è‚ð’u‚­‚±‚Ƃɂæ‚Á‚Ä -‹ßŽ—“I‚ÉŽÀŒ»‚µ‚Ä‚¢‚Ü‚·B
      -The selectiveencode module finds domain names that include non-ASCII characters in text such as zone master files. Generally speaking it is of course impossible to determine which part of the text is the domain name; in actuality, however, the following rough assumptions are used to approximately implement it. -

        -
      • ”ñASCII•¶Žš‚̓hƒƒCƒ“–¼‚Ì’†‚ɂ̂݌»‚ê‚é
        -Non-ASCII characters appear only in domain names. -
      -

      ‹ï‘Ì“I‚ɂ͎Ÿ‚̂悤‚ȃAƒ‹ƒSƒŠƒYƒ€‚ð—p‚¢‚ăhƒƒCƒ“–¼‚̗̈挟o‚ðs‚¢‚Ü‚·B
      -Specifically, the following algorithm is used to detect the domain name area. -

        -
      1. ƒeƒLƒXƒg‚ð‘–¸‚µ‚ÄA”ñASCII•¶Žš‚ð’T‚·B
        -Scans the text and finds non-ASCII characters. -
      2. Œ©‚‚©‚Á‚½”ñASCII•¶Žš‚Ì‘OŒã‚Ì•¶Žš‚𒲂×A - ‚»‚Ì•¶Žš‚ðŠÜ‚ÝA‚©‚‘¼‚Ì”ñASCII•¶Žš‚ ‚é‚¢‚Í]—ˆ‚Ì(‘½Œ¾Œê‰»‚³‚ê‚Ä‚¢‚È‚¢) - ƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš‚¾‚¯‚©‚ç‚È‚é”͈͂ð‹‚ß‚éB
        -Check characters before and after found non-ASCII characters to determine a range consisting of only the found character and also other non-ASCII characters or characters that can be used for conventional (not internationalized) domain names. -
      3. ‹‚ß‚½”͈͂ðƒhƒƒCƒ“–¼‚Æ‚µ‚ĕԂ·B
        -Returns the found range as the domain name. -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_selectiveencode_findregion -
      -
      -mdn_result_t
      -mdn_selectiveencode_findregion(const char *s,
      -	char **startp, char **endp)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ s ‚ð‘–¸‚µ‚ÄAʼn‚ÉoŒ»‚·‚é -”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚̗̈æ‚ð‹‚ßA‚»‚Ìæ“ª‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ð -startp ‚ÉA—̈æ‚Ì’¼Œã‚Ì•¶Žš‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ð endp ‚É -‚»‚ꂼ‚êŠi”[‚µ‚Ü‚·B
      -Scans s UTF-8 encoded character strings and finds the area in the domain that includes the first appearance of a non-ASCII character, then stores a pointer indicating the beginning of the area at startp and a pointer indicating the end of the area in endp. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfound -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_notfound - -

      - -
      - -

      strhash ƒ‚ƒWƒ…[ƒ‹
      -strhash module

      - -

      strhash ƒ‚ƒWƒ…[ƒ‹‚Í•¶Žš—ñ‚ðƒL[‚Æ‚·‚éƒnƒbƒVƒ…•\‚ðŽÀŒ»‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -ƒnƒbƒVƒ…•\‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚Ȃǃ‰ƒCƒuƒ‰ƒŠ‚Ì‘¼‚̃‚ƒWƒ…[ƒ‹‚Å -Žg—p‚³‚ê‚Ü‚·B -”ñí‚Ɉê”Ê“I‚ȃnƒbƒVƒ…•\‚ÌŽÀ‘•‚Å‚ ‚èA“Á•M‚·‚ׂ«“_‚Í‚ ‚è‚Ü‚¹‚ñc -ˆê‚‚¾‚¯‚ ‚è‚Ü‚·B“o˜^‚͂ł«‚Ü‚·‚ªíœ‚Ì‹@”\‚ª‚ ‚è‚Ü‚¹‚ñB–{ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚Í -•K—v‚È‚¢‚©‚ç‚Å‚·B
      -The strhash module implements a hash table that uses a character string as a key. The hash table is used by other modules in the library such as the converter module and normalizer module. This is a very general hash table implementation in which registration can be performed but there is no deletion function because it is not needed with this library. - -

      ƒnƒbƒVƒ…•\‚̃TƒCƒY‚Í—v‘f‚Ì‘”‚ª‘‚¦‚é‚É]‚Á‚đ傫‚­‚È‚è‚Ü‚·B
      -The size of the hash table increases as the total numer of elements increases. - -

      ƒnƒbƒVƒ…•\‚ÍŽŸ‚ÉŽ¦‚· mdn_strhash_t Œ^‚Ì opaque ƒf[ƒ^‚Æ‚µ‚Ä -•\‚³‚ê‚Ü‚·B
      -As shown below, the hash table is expressed in opaque data of mdn_strhash_t type. -

      -
      -typedef struct mdn_strhash *mdn_strhash_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_strhash_create -
      -
      -mdn_result_t
      -mdn_strhash_create(mdn_strhash_t *hashp)
      -
      -

      ‹ó‚̃nƒbƒVƒ…•\‚ð쬂µA‚»‚̃nƒ“ƒhƒ‹‚ð hashp ‚ÌŽw‚·—̈æ‚É -Ši”[‚µ‚Ü‚·B
      -Creates an empty hash table and stores the handle to the area indicated by hashp. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_strhash_destroy -
      -
      -void
      -mdn_strhash_destroy(mdn_strhash_t hash)
      -
      -

      mdn_strhash_create ‚Å쬂µ‚½ -ƒnƒbƒVƒ…•\‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B
      -Deletes the hash table created by mdn_strhash_create and releases the allocated memory. -

      - -

      mdn_strhash_put -
      -
      -mdn_result_t
      -mdn_strhash_put(mdn_strhash_t hash, const char *key,
      -	void *value)
      -
      -

      mdn_strhash_create ‚Å쬂µ‚½ -ƒnƒbƒVƒ…•\ hash ‚ɃL[ keyA’l value ‚Ì‘g‚ð -“o˜^‚µ‚Ü‚·B -•¶Žš—ñ key ‚̓Rƒs[‚³‚ê‚Ü‚·‚Ì‚ÅA‚±‚ÌŠÖ”‚̌ĂÑo‚µŒã -key ‚ÌŽw‚·ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ä‚àA•¶Žš—ñ‚Ì“à—e‚ð‘‚«Š·‚¦‚Ä‚à -‰e‹¿‚Í‚ ‚è‚Ü‚¹‚ñB‚±‚ê‚ɑ΂µ‚Ä value ‚Ì“à—e‚̓Rƒs[‚³‚ê‚È‚¢‚̂Š-’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢ (‚à‚¿‚ë‚ñ‚æ‚­l‚¦‚Ă݂ê‚΃Rƒs[‚³‚ê‚È‚¢‚±‚Ƃ͎©–¾‚Å‚·‚ª)B
      -Used to register a key and value set in the hash table created by mdn_strhash_create. -Since character strings are copied, there is no influence even if the memory indicated by key is released or the contents of the character strings are changed after this function is called. Contrarily, the contents of value are not copied, so use care when working with this item. (If you think carefully about it, it will become obvious that this value is not copied.) -

      “¯‚¶ƒL[‚ðŽg—p‚µ‚Ä•¡”‰ñ“o˜^‚µ‚½ê‡AÅŒã‚É“o˜^‚³‚ꂽ‚à‚Ì‚¾‚¯‚ª -—LŒø‚Å‚·B
      -When the same key is used for registration more than once, only the most recently registered key is effective. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_strhash_get -
      -
      -mdn_result_t
      -mdn_strhash_get(mdn_strhash_t hash,
      -	const char *key, void **valuep)
      -
      -

      ƒnƒbƒVƒ…•\ hash ‚©‚çƒL[ key ‚ðŽ‚Â—v‘f‚ðŒŸõ‚µA -‘Ήž‚·‚é—v‘f‚ª‚ ‚ê‚΂»‚Ì’l‚ð valuep ‚ÉŠi”[‚µ‚Ü‚·B
      -Searches for elements that have key in the hash table; if a corresponding element is found, the value is stored in valuep. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_noentry -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_noentry -

      - -

      mdn_strhash_exists -
      -
      -int
      -mdn_strhash_exists(mdn_strhash_t hash, const char *key)
      -
      -

      ƒnƒbƒVƒ…•\ hash ‚ɃL[ key ‚ðŽ‚Â—v‘f‚ª‚ ‚ê‚Î -1‚ðA‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B
      -Returns 1 if there is an element that has the key in the hash table, and returns 0 if no element is found. - -

      - -
      - -

      translator ƒ‚ƒWƒ…[ƒ‹
      -translator module

      - -

      translator ƒ‚ƒWƒ…[ƒ‹‚ÍA—^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É]‚Á‚ăhƒƒCƒ“–¼‚ð -•ÏŠ·‚·‚郂ƒWƒ…[ƒ‹‚Å‚·Bƒpƒ‰ƒ[ƒ^‚Æ‚µ‚Ă͎Ÿ‚É‚ ‚°‚éƒf[ƒ^‚ð—^‚¦‚Ü‚·B
      -The translator module converts domain names in accordance with the given parameters. Values can provided for the following parameters. -

        -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO (ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO)
        -Encoding (local encoding) of domain name passed as input -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO - (ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO)
        -Alternate encoding of domain name passed as input (local alternate encoding) -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚ÌZLD (ƒ[ƒJƒ‹ ZLD)
        -ZLD (local ZLD) of domain name passed as input -
      • ³‹K‰»•ûŽ® -Normalization method -
      • ƒhƒƒCƒ“–¼‚̕ϊ·Œã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO (ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO)
        -Encoding after conversion of domain name (target encoding) -
      • ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªŽ¸”s‚µ‚½Žž‚É—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO - (ƒ^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO)
        -Encoding used when conversion to target encoding failed (target alternate encoding) -
      • ƒhƒƒCƒ“–¼‚̕ϊ·Œã‚ÌZLD (ƒ^[ƒQƒbƒgZLD)
        -ZLD after conversion of domain name (target ZLD) -
      - -

      ƒhƒƒCƒ“–¼‚̕ϊ·‚̎葱‚«‚Í‚â‚â•¡ŽG‚Å‚·B‚±‚ê‚ÍŽŸ‚Ì——R‚É‚æ‚è‚Ü‚·B
      -The domain name conversion procedure is complicated, for the following reasons: -

        -
      • ƒhƒƒCƒ“–¼‚Æ‚µ‚Äí‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ª“n‚³‚ê‚é‚킯‚ł͂Ȃ­A - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚à“n‚³‚ê‚é‰Â”\«‚ª‚ ‚èA - ‚»‚̂ǂ¿‚ç‚Å‚ ‚é‚©‚É‚æ‚Á‚Ĉ—‚ð•Ï‚¦‚é•K—v‚ª‚ ‚邱‚Æ
        -Multilingual domain names are not always passed as the domain name, and it is possible that conventional ASCII domain names may be passed and processing thus must be changed accordingly. -
      • ‚Ü‚½‚±‚Ì2‚‚𔻕ʂ·‚鈗‚ªASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ìê‡ - ŠÈ’P‚ł͂Ȃ­AZLD“™‚ðŽQÆ‚·‚é•K—v‚ª‚ ‚邱‚Æ
        -With regard to ASCII-compatible encoding, differentiating between multilingual domain names and conventional ASCII domain names is not simple and ZLD, etc. need to be referenced. -
      • ‚³‚ç‚Ƀ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ŃGƒ“ƒR[ƒh‚³‚ꂽƒhƒƒCƒ“–¼‚à - “n‚³‚ê‚é‰Â”\«‚ª‚ ‚邱‚Æ
        -Domain names may be passed that are encoded using local alternate encoding. -
      • ‚³‚ç‚Ƀ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªŽ¸”s‚µ‚½Žž‚É‚Í - ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð‘ã‚í‚è‚ÉŽg—p‚·‚é•K—v‚ª‚ ‚邱‚Æ
        -If conversion to the target encoding fails, alternate encoding must be used instead. -
      - -

      ‹ï‘Ì“I‚É‚ÍAŽŸ‚̂悤‚ȃAƒ‹ƒSƒŠƒYƒ€‚ðŽg—p‚µ‚ĕϊ·‚ðs‚¢‚Ü‚·B
      -Specifically, the following algorithm is used for conversion. -

        -
      1. ƒ[ƒJƒ‹ZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚é (‹ó‚łȂ¢) ‚©‚Ç‚¤‚©‚𒲂ׂéB
        -Checks if the local ZLD is defined (empty or not). -
      2. ’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA“n‚³‚ꂽƒhƒƒCƒ“–¼‚ª‚»‚ê‚Ƀ}ƒbƒ`‚·‚é‚©‚Ç‚¤‚©’²‚ׂéB
        -If it is defined, checks whether or not the passed domain name matches. -
      3. ƒ}ƒbƒ`‚·‚ê‚Α½Œ¾ŒêƒhƒƒCƒ“–¼‚¾‚Æ”»’f‚µAƒhƒƒCƒ“–¼‚©‚çZLD‚𜋎‚µA - 6‚̃R[ƒh•ÏŠ·ˆ—‚ւƈڂéB
        - ƒ}ƒbƒ`‚µ‚È‚¯‚ê‚ÎA]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚¾‚Æ‚µ‚Ä‚»‚Ì‚Ü‚Ü - ƒRƒs[‚µAˆ—‚ðI—¹‚·‚éB
        -If it matches, the domain name is determined to be a multilingual doman name and ZLD is removed from the domain, then processing proceeds to code conversion processing (Step 6). -
      4. ƒ[ƒJƒ‹ZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚È‚¯‚ê‚ÎAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª - ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚Ç‚¤‚©A‚Ü‚½“n‚³‚ꂽƒhƒƒCƒ“–¼‚ª - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚Æ‚µ‚ij‚µ‚¢‚à‚̂ł ‚é‚©‚Ç‚¤‚©‚𒲂ׂéB
        -When the local ZLD is not defined, checks whether or not the local encoding is ASCII-conpatible and also that the passed domain name is a valid conventional ASCII domain name. -
      5. ‚à‚µASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©A‚ ‚é‚¢‚Í“n‚³‚ꂽƒhƒƒCƒ“–¼‚É - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚Æ‚µ‚ij‚µ‚­‚È‚¢•¶Žš‚ª¬‚¶‚Á‚Ä‚¢‚ê‚Î - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Å‚ ‚邯‚µ‚Ä6‚̃R[ƒh•ÏŠ·ˆ—‚ւƈڂéB
        - ‚»‚êˆÈŠO‚ÌꇂɂÍ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚¾‚Æ‚µ‚Ä‚»‚Ì‚Ü‚Ü - ƒRƒs[‚µAˆ—‚ðI—¹‚·‚éB
        -When ASCII compatible encoding is used or the passed domain name includes an invalid character in a conventional ASCII domain name, the passed domain name is assumed to be a multilingual domain name and the procedure proceeds to code conversion processing (Step 6).
        -For situations other than the above, the passed domain name is assumed to be a conventional ASCII-domain name and is copied as is, then processing ends. -
      6. ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA‚Ü‚¸ - ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB - ¬Œ÷‚·‚ê‚Î8‚̳‹K‰»ˆ—‚ւƈڂéB
        -When the local alternate encoding is defined, the code is first converted from the local alternate encoding to UTF-8. If this is successful, processing proceeds to normalization processing (Step 8). -
      7. ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB
        -Executes code conversion from local encoding to UTF-8. -
      8. ³‹K‰»ˆ—‚ðŽÀs‚·‚éB
        -Executes normalization processing. -
      9. UTF-8‚©‚çƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB
        -Executes code conversion from UTF-8 to the target encoding. -
      10. ‚à‚µƒhƒƒCƒ“–¼‚Ƀ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ª‚ ‚Á‚Ä - •ÏŠ·‚ÉŽ¸”s‚µ‚½ê‡‚É‚ÍA‘ã‚í‚è‚É UTF-8 ‚©‚ç‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì - ƒR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB
        -If the conversion fails because there is a character in the domain name that is not included in the target character set, code conversion from UTF-8 to the alternate encoding is executed instead. -
      11. ƒ^[ƒQƒbƒgZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚΃hƒƒCƒ“–¼‚ɒljÁ‚·‚éB
        -When the target ZLD is defined, it is added to the domain name. -
      - -

      ˆÈã‚̈—‚ðƒtƒ[ƒ`ƒƒ[ƒg‚Å•\‚µ‚½‚Ì‚ªŽŸ‚Ì}‚Å‚·B
      -The following flow chart explains the above procedure. - -

      -name translation flowchart -
      - -

      –{ƒ‚ƒWƒ…[ƒ‹‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É -converter ƒ‚ƒWƒ…[ƒ‹‚ðA‚Ü‚½³‹K‰»‚É -normalizer ƒ‚ƒWƒ…[ƒ‹‚ð‚»‚ê‚¼‚êŽg—p‚µ‚Ü‚·B
      -This module uses the converter module for encoding and the normalizer module for normalization. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_translator_translate -
      -
      -mdn_result_t
      -mdn_translator_translate(mdn_converter_t local_converter,
      -	mdn_converter_t local_alternate_converter,
      -	const char *local_ZLD,
      -	mdn_normalizer_t normalizer,
      -	mdn_converter_t target_converter,
      -	mdn_converter_t target_alternate_converter,
      -	const char *target_ZLD,
      -	const char *from, char *to, size_t tolen)
      -
      -

      —^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É‚µ‚½‚ª‚Á‚ăhƒƒCƒ“–¼ from ‚ð•ÏŠ·‚µA -Œ‹‰Ê‚ð to ‚Æ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B
      -Converts the domain name produced by from per the specified parameters and stores the result in the area specified by to and tolen. -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒOAƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOA -ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚¨‚æ‚у^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì–¼Ì‚ł͂Ȃ­A -‘Ήž‚·‚éconverter ƒ‚ƒWƒ…[ƒ‹‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg local_converterA -alternate_converter ‚¨‚æ‚Ñ target_converter ‚Å -Žw’肵‚Ü‚·B
      -Local encoding, local alternate encoding, target encoding and target alternate encoding are not the actual names of types of encoding and are specified by the corresponding code conversion context, which is defined by the following converter module variables: local_converter,alternate_converter and target_converter. -

      ƒ^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO target_alternate_converter ‚ÍA -target_converter ‚É‚æ‚éƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªA -ƒhƒƒCƒ“–¼‚ªƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚邽‚ß‚É -ޏ”s‚µ‚½Žž‚ÉAƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚Ü‚·B
      -The target_alternate_converter variable is used instead of the target encoding if conversion to the target encoding by target_converter fails because the domain name contains a character that is not included in the target character set. -

      ³‹K‰»‚Ínormalizer ƒ‚ƒWƒ…[ƒ‹‚̳‹K‰»ƒRƒ“ƒeƒLƒXƒg -normalizer ‚ÅŽw’肵‚Ü‚·B
      -Normalization is specified by normalization context defined by the normalizer variable of the normalizer module. -

      ƒ[ƒJƒ‹ZLD‚¨‚æ‚у^[ƒQƒbƒgZLD‚Í -mdn_translator_canonicalZLD -‚Å•W€Œ`Ž®‚ɕϊ·‚µ‚½‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB
      -The local ZLD and target ZLD must have been converted to the standard format by mdn_translator_canonicalZLD. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_buffer_overflow -
      mdn_invalid_encoding -
      mdn_nomemory -

      - -

      mdn_translator_canonicalZLD -
      -
      -mdn_result_t
      -mdn_translator_canonicalZLD(const char *ZLD,
      -	char **canonicalizedp)
      -
      -

      ZLD ZLD ‚ð•W€Œ`Ž®‚ɕϊ·‚µA‚»‚̃|ƒCƒ“ƒ^‚ð -canonicalizedp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B -•ÏŠ·‚³‚ꂽ•¶Žš—ñ (*canonicalizedp) ‚̗̈æ‚Í -malloc() ‚³‚ê‚Ä‚¢‚Ü‚·‚Ì‚ÅA•s—v‚ɂȂÁ‚½‚ç free() ‚Å -‰ð•ú‚µ‚Ä‚­‚¾‚³‚¢B
      -Converts ZLD ZLD to the standard format and stores a pointer in the area specified by canonicalizedp. Since the area for the converted character string (*canonicalizedp) is secured by malloc(), release it when it is no longer needed. -

      ‚±‚±‚Å‚¢‚¤ ZLD ‚Ì•W€Œ`Ž®‚Ƃ͎Ÿ‚̂悤‚ÈŒ`Ž®‚Ì‚à‚Ì‚ðŽw‚µ‚Ü‚·B
      -The standard format for ZLD mentioned is as follows: -

        -
      • ‹ó‚ÌZLD ("" ‚ ‚é‚¢‚Í ".") ‚Ì•W€Œ`Ž®‚Í NULL
        -The standard format for empty ZLD ("" or ".") is NULL -
      • 擪‚ªƒsƒŠƒIƒh (.) ‚©‚çŽn‚Ü‚Á‚Ä‚¢‚ê‚΃sƒŠƒIƒh‚𜋎
        -The period is removed when the beginning is a period (.) -
      • ŌオƒsƒŠƒIƒh (.) ‚ÅI‚í‚Á‚Ä‚¢‚È‚¯‚ê‚΃sƒŠƒIƒh‚ð’ljÁ
        -A period is added when the ending is not a period (.) -
      • ¬•¶Žš‚Í‚·‚×‚Ä‘å•¶Žš‚ɕϊ·
        -Lowercase characters are all converted to uppercase characters -
          -

          •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

          One of the following values is returned: -
          mdn_success -
          mdn_nomemory -

          - -

          mdn_translator_matchZLD -
          -
          -int
          -mdn_translator_matchZLD(const char *domain,
          -	const char *ZLD)
          -
          -

          ƒhƒƒCƒ“–¼ domain ‚Æ ZLD ZLD ‚ªƒ}ƒbƒ`‚·‚é‚©‚Ç‚¤‚© -‚𒲂×Aƒ}ƒbƒ`‚·‚ê‚Î1‚ðA‚µ‚È‚¯‚ê‚Î0‚ð•Ô‚µ‚Ü‚·B
          -Checks whether or not the domain variable and ZLD ZLD match, and returns a 1 if they match and a 0 if not. -

          ZLD ‚Í -mdn_translator_canonicalZLD -‚Å•W€Œ`Ž®‚ɕϊ·‚µ‚½‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB
          -The ZLD must have been converted to the standard format by mdn_translator_canonicalZLD. - -

      - -
      - -

      unicode ƒ‚ƒWƒ…[ƒ‹
      -unicode module

      - -

      unicode ƒ‚ƒWƒ…[ƒ‹‚ÍA -UnicodeData.txt -‚É‹Lq‚³‚ê‚Ä‚¢‚éAUnicode ‚ÌŠeŽí•¶Žš‘®«‚ðŽæ“¾‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B‚È‚¨A -Unicode.txt ‚É‹Lq‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚̈Ӗ¡A‚¨‚æ‚уtƒ@ƒCƒ‹Œ`Ž®‚ɂ‚¢‚Ä‚Í -UnicodeData File Format‚ð‚²——‚­‚¾‚³‚¢B
      -The unicode module obtains various character properties of Unicode described in UnicodeData.txt. For details of the data described in Unicode.txt and the file format, refer to UnicodeData File Format. - -

      –{ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‘½‚­‚̃‚ƒWƒ…[ƒ‹‚Í Unicode ‚̃f[ƒ^‚ð UTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ -•¶Žš—ñŒ`Ž®‚ňµ‚¢‚Ü‚·‚ªA‚±‚̃‚ƒWƒ…[ƒ‹‚Í unsigned long Œ^‚Ì -ƒf[ƒ^‚Æ‚µ‚Ĉµ‚¢‚Ü‚·BŠÜ‚Ü‚ê‚é’l‚Í UCS-4 ‚Å‚·B
      -Many modules in this library handle Unicode data as UTF-8 encoded character strings but this module handles Unicode data as unsigned long type data. Includes UCS-4 values. - -

      -‚±‚̃‚ƒWƒ…[ƒ‹‚Å‚Í Unicode •¶Žš‚Ì‘å•¶Žš¬•¶Žš‚Ì‘ŠŒÝ•ÏŠ·‹@”\‚à -’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B ‚±‚ê‚Í - -Unicode Technical Report #21: Case Mappings ‚Å -’è‹`‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B -Unicode •¶Žš‚Ì’†‚ɂ͂²‚­ˆê•”‚Å‚·‚ª‘å•¶Žš¬•¶Žš‚̕ϊ·‚ð‚·‚éÛ‚É -•¶–¬î•ñ‚ð•K—v‚Æ‚·‚é‚à‚Ì‚ª‚ ‚èA‚±‚ê‚ÍŽŸ‚̂悤‚È—ñ‹“Œ^‚̃f[ƒ^‚ÅŽw’肵‚Ü‚·B
      This module provides a mutual conversion function between uppercase and lowercase Unicode characters. This is defined by -Unicode Technical Report #21: Case Mappings. -Among Unicode characters, a few characters require context information when uppercase is converted to lowercase. This is specified by the following enumeration type data. -

      -
      -typedef enum {
      -	mdn__unicode_context_unknown,
      -	mdn__unicode_context_final,
      -	mdn__unicode_context_nonfinal
      -} mdn__unicode_context_t;
      -
      -
      -•¶–¬‚ª FINAL ‚Ìê‡‚É‚Í mdn__unicode_context_final ‚ðA‚Ü‚½ -NON_FINAL ‚Ìê‡‚É‚Í mdn__unicode_context_nonfinal ‚ðŽw’肵‚Ü‚·B -mdn__unicode_context_unknown ‚Í•¶–¬î•ñ‚ª‚í‚©‚ç‚È‚¢ (’²‚ׂĂ¢‚È‚¢) -‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -•¶–¬î•ñ‚ÉŠÖ‚µ‚ÄÚ‚µ‚­‚Íã‹L•¶Œ£‚ð‚²——‚­‚¾‚³‚¢B
      -When the context is FINAL, mdn__unicode_context_final is specified and when it is NON_FINAL, mdn__unicode_context_nonfinal is specified. mdn__unicode_context_unknown indicates that the context is unknown (has not yet been checked). For a detailed discussion of context information, refer to the above references. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__unicode_canonicalclass -
      -
      -int
      -mdn__unicode_canonicalclass(unsigned long c);
      -
      -

      Unicode •¶Žš c ‚Ì Canonical Combining Class ‚ð‹‚߂܂·B -Canonical Combining Class ‚ª’è‹`‚³‚ê‚Ä‚¢‚È‚¢•¶Žš‚ɂ‚¢‚Ä‚Í 0 ‚ð•Ô‚µ‚Ü‚·B
      -Obtains Canonical Combining Class for Unicode character c. -0 is returned for characters for which Canonical Combining Class is not defined. -

      - -

      mdn__unicode_decompose -
      -
      -mdn_result_t
      -mdn__unicode_decompose(int compat,
      -	unsigned long *v, size_t vlen,
      -	unsigned long c, int *decomp_lenp)
      -
      -

      Unicode •¶Žš c ‚ð UnicodeData.txt ‚ÌCharacter -Decomposition Mapping ‚É‚µ‚½‚ª‚Á‚Ä decompose ‚µA‚»‚ÌŒ‹‰Ê‚ð -v ‚¨‚æ‚Ñ vlen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -compat ‚Ì’l‚ª^‚È‚ç Compatibility Decomposition ‚ðA -‹U‚È‚çCanonical Decomposition ‚ðs‚¢‚Ü‚·B
      decompose ‚ÍÄ‹A“I‚És‚í‚ê‚Ü‚·B‚‚܂èCharacter Decomposition Mapping‚É‚µ‚½‚ª‚Á‚Ä•ª‰ð‚µ‚½Še•¶Žš‚ɂ‚¢‚Ä‚³‚ç‚É decompose ˆ—‚ªs‚í‚ê‚Ü‚·B
      -

      Decomposes Unicode characters c in accordance with Character -Decomposition Mapping of UnicodeData.txt and writes the result in the area specified by v and vlen. When the value of compat is true, Compatibility Decomposition is performed and when false, Canonical Decomposition is performed. Decompose is performed recursively, i.e. each character resolved in accordance with Character Decomposition Mapping is further decomposed. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfoundA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_notfound -
      mdn_nomemory -

      - -

      mdn__unicode_compose -
      -
      -mdn_result_t
      -mdn__unicode_compose(unsigned long c1,
      -	unsigned long c2, unsigned long *compp)
      -
      -

      c1 ‚Æ c2 ‚Ì2•¶Žš‚Ì Unicode •¶Žš‚̃V[ƒPƒ“ƒX‚ð -UnicodeData.txt ‚ÌCharacter Decomposition Mapping ‚É‚µ‚½‚ª‚Á‚Ä -compose ‚µA‚»‚ÌŒ‹‰Ê‚ð compp ‚ÌŽw‚·—̈æ‚É‘‚«ž‚݂܂·B -•K‚¸ Canonical Composition ‚ªs‚í‚ê‚Ü‚·B
      -Composes a sequence of the two Unicode characters c1 and c2 per the Character Decomposition Mapping in UnicodeData.txt and writes the result in the area specified by compp. Canonical Composition is always peformed. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfound -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_notfound -

      - -

      mdn__unicode_iscompositecandidate -
      -
      -int
      -mdn__unicode_iscompositecandidate(unsigned long c)
      -
      -

      Unicode•¶Žš c ‚©‚çŽn‚Ü‚é Canonical Composition ‚ª‘¶Ý‚·‚é‚© -‚Ç‚¤‚©‚𒲂×A‘¶Ý‚·‚é‰Â”\«‚ª‚ ‚ê‚Î 1 ‚ð‰Â”\«‚ª‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚̓qƒ“ƒgî•ñ‚Å‚ ‚èA1‚ª•Ô‚Á‚Ä‚«‚½‚Æ‚µ‚Ä‚àŽÀÛ‚É‚Í Composition ‚ª -‘¶Ý‚µ‚È‚¢‚±‚Æ‚à‚ ‚蓾‚Ü‚·B‹t‚É 0 ‚ª•Ô‚Á‚Ä‚­‚ê‚ΊmŽÀ‚É‘¶Ý‚µ‚Ü‚¹‚ñB
      -Checks whether or not Canonical Composition that begins with Unicode character c exists. 1 is returned if existence is possible, and 0 if not. If 1 is returned, it is possible that Composition does not actually exist; however, when 0 is returned, it definitely does not exist. -

      Unicode ‚Ì‘S•¶Žš‚Ì’†‚Å Canonical Composition ‚Ìæ“ª‚Æ‚È‚é•¶Žš‚Í” -­‚È‚¢‚Ì‚ÅAmdn__unicode_compose ‚ÌŒŸõ‚̃I[ƒoƒwƒbƒh‚ðŒ¸‚ç‚·‚½‚߂ɂ ‚ç‚©‚¶‚߃f[ƒ^‚ðƒXƒNƒŠ[ƒjƒ“ƒO‚·‚é–Ú“I‚É -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
      -As there are only a small number of Unicode characters that can begin Canonical Composition, this can be used for pre-screening of data in order to decrease the search overhead of mdn__unicode_compose. -

      - -

      mdn__unicode_toupper -
      -
      -mdn_result_t
      -mdn__unicode_toupper(unsigned long c, mdn__unicode_context_t ctx,
      -	unsigned long *v, size_t vlen, int *convlenp)
      -
      -

      Unicode•¶Žš c ‚ð UnicodeData.txt ‚Ì Uppercase Mapping -î•ñ‚¨‚æ‚Ñ SpecialCasing.txt‚Ìî•ñ‚É‚µ‚½‚ª‚Á‚Ä‘å•¶Žš‚ɕϊ·‚µAŒ‹‰Ê‚ð -v ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·Bvlen ‚Í‚ ‚ç‚©‚¶‚ß -v ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚Å‚·B•ÏŠ·Œ‹‰Ê‚Ì•¶Žš”‚Í -*convlenp ‚ɕԂ³‚ê‚Ü‚·B -•ÏŠ·Œ‹‰Ê‚ª•¡”‚Ì•¶Žš‚ɂȂ邱‚Æ‚ª‚ ‚邱‚ƂɒˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -‚Ü‚½ƒƒP[ƒ‹ˆË‘¶‚̕ϊ·‚Ís‚¢‚Ü‚¹‚ñB
      -Converts Unicode characters c to uppercase in accordance with the Uppercase Mapping information in UnicodeData.txt and SpecialCasing.txt, and stores the result in the area specified by v. vlen is the size of the area that is secured for v beforehand. The number of characters in the conversion result is returned to *convlenp. Note that the conversion result may be greater than one character and that locale-dependent conversion is not performed. - -

      ctx ‚Í•¶Žš c ‚ÌoŒ»‚·‚é -•¶–¬î•ñ‚Å‚·B -‚Ù‚Æ‚ñ‚ǂ̕¶Žš‚ł͕ϊ·‚ÌÛ‚É•¶–¬î•ñ‚Í•s—v‚È‚½‚ßA -’Êí‚Í mdn__unicode_context_unknown ‚ðŽw’肵‚Ä‚¨‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚à‚µ•¶–¬î•ñ‚ª•K—v‚Èê‡A–{ŠÖ”‚Í–ß‚è’l‚Æ‚µ‚Ä mdn_context_required -‚ð•Ô‚·‚Ì‚ÅA•¶–¬î•ñ‚ðŽæ“¾‚µ‚Ä‚©‚ç‰ü‚߂ČĂÑo‚·‚±‚Æ‚ª‰Â”\‚Å‚·B -•¶–¬î•ñ‚̎擾‚É‚Í -mdn__unicode_getcontext ‚ðŽg—p‚µ‚Ü‚·B
      -ctx is context information where character c appears. -Since most characters do not require context information when they are converted, usually mdn__unicode_context_unknown can be specified. -When context information is necessary, this function returns mdn_context_required as the return value, and it is possible to call it again after obtaining the context information. To obtain context information, mdn__unicode_getcontext is used. - -

      ‚à‚µ‘Ήž‚·‚é‘å•¶Žš‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Í c ‚ª‚»‚Ì‚Ü‚Ü -v ‚ÉŠi”[‚³‚ê‚Ü‚·B
      -If no corresponding uppercase character exists, c is stored in v as is. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_context_requiredA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_context_required -
      mdn_buffer_overflow -

      - -

      mdn__unicode_tolower -
      -
      -mdn_result_t
      -mdn__unicode_tolower(unsigned long c, mdn__unicode_context_t ctx,
      -	unsigned long *v, size_t vlen, int *convlenp)
      -
      -

      Unicode•¶Žš c ‚ð UnicodeData.txt ‚Ì Uppercase Mapping -î•ñ‚¨‚æ‚Ñ SpecialCasing.txt‚Ìî•ñ‚É‚µ‚½‚ª‚Á‚Ĭ•¶Žš‚ɕϊ·‚µAŒ‹‰Ê‚ð -v ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·Bvlen ‚Í‚ ‚ç‚©‚¶‚ß -v ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚Å‚·B•ÏŠ·Œ‹‰Ê‚Ì•¶Žš”‚Í -*convlenp ‚ɕԂ³‚ê‚Ü‚·B -•ÏŠ·Œ‹‰Ê‚ª•¡”‚Ì•¶Žš‚ɂȂ邱‚Æ‚ª‚ ‚邱‚ƂɒˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -‚Ü‚½ƒƒP[ƒ‹ˆË‘¶‚̕ϊ·‚Ís‚¢‚Ü‚¹‚ñB
      -Converts Unicode character c to lowercase in accordance with Uppercase Mapping information of UnicodeData.txt and SpecialCasing.txt information, and stores the result in the area specified by v. vlen is the size of area that is secured for v beforehand. The number of characters of the conversion result is returned to *convlenp. - -

      ctx ‚Í•¶Žš c ‚ÌoŒ»‚·‚é -•¶–¬î•ñ‚Å‚·B -‚Ù‚Æ‚ñ‚ǂ̕¶Žš‚ł͕ϊ·‚ÌÛ‚É•¶–¬î•ñ‚Í•s—v‚È‚½‚ßA -’Êí‚Í mdn__unicode_context_unknown ‚ðŽw’肵‚Ä‚¨‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚à‚µ•¶–¬î•ñ‚ª•K—v‚Èê‡A–{ŠÖ”‚Í–ß‚è’l‚Æ‚µ‚Ä mdn_context_required -‚ð•Ô‚·‚Ì‚ÅA•¶–¬î•ñ‚ðŽæ“¾‚µ‚Ä‚©‚ç‰ü‚߂ČĂÑo‚·‚±‚Æ‚ª‰Â”\‚Å‚·B -•¶–¬î•ñ‚̎擾‚É‚Í -mdn__unicode_getcontext ‚ðŽg—p‚µ‚Ü‚·B
      -ctx is context information where character c appears. -Since most characters do not require context information when they are converted, usually mdn__unicode_context_unknown can be specified. -When context information is necessary, this function returns mdn_context_required as the return value, and it is possible to call it again after obtaining the context information. -To obtain context information, -mdn__unicode_getcontext is used. - -

      ‚à‚µ‘Ήž‚·‚鬕¶Žš‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Í c ‚ª‚»‚Ì‚Ü‚Ü -v ‚ÉŠi”[‚³‚ê‚Ü‚·B
      -If no corresponding uppercase character exists, c is stored in v as is. - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_context_requiredA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_context_required -
      mdn_buffer_overflow -

      - -

      mdn__unicode_getcontext -
      -
      -mdn__unicode_context_t
      -mdn__unicode_getcontext(unsigned long c)
      -
      -

      ‘å•¶Žš¬•¶Žš•ÏŠ·‚Å—p‚¢‚ç‚ê‚é•¶–¬î•ñ‚ð•Ô‚µ‚Ü‚·B -•¶–¬î•ñ‚ðŽæ“¾‚·‚é‚ɂ͎Ÿ‚̂悤‚É‚µ‚Ü‚·B -‚Ü‚¸‘å•¶Žš¬•¶Žš•ÏŠ·‚Ì‘ÎÛ•¶Žš‚É‘±‚­ŽŸ‚Ì•¶Žš‚ðŽæ“¾‚µA‚±‚ÌŠÖ”‚ð -ŒÄ‚Ño‚µ‚Ü‚·B‚à‚µ•Ô‚³‚ê‚é’l‚ª mdn__unicode_context_final -‚ ‚é‚¢‚Í mdn__unicode_context_nonfinal ‚Ì‚¢‚¸‚ê‚©‚Å‚ ‚ê‚Î -‚»‚ꂪ‹‚߂镶–¬î•ñ‚Å‚·B -mdn__unicode_context_unknown ‚Ìꇂɂ͂³‚ç‚É‘±‚­•¶Žš‚ðŽæ“¾‚µA -‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚Ü‚·B‚±‚̂悤‚É‚µ‚Ä mdn__unicode_context_final -‚© mdn__unicode_context_nonfinal ‚©‚¢‚¸‚ê‚©‚Ì’l‚ª“¾‚ç‚ê‚é‚܂Š-ˆ—‚ðŒJ‚è•Ô‚µ‚Ü‚·B‚à‚µ•¶Žš—ñ‚ÌÅŒã‚܂ŗˆ‚½ê‡‚É‚ÍA•¶–¬‚Ímdn__unicode_context_final ‚ƂȂè‚Ü‚·B
      -Returns context information used for conversion of uppercase/lowercase characters. -To obtain context information, first the character following the uppercase/lowercase character conversion target character is obtained and this function is called. If the return value is mdn__unicode_context_final or mdn__unicode_context_nonfinal, that context information is the context information to obtain. -If mdn__unicode_context_unknown is returned, the next character is obtained and the function is called. In this way, processing continues until either the value of mdn__unicode_context_final or mdn__unicode_context_nonfinal is obtained. When processing reaches the end of the character string, mdn__unicode_context_final becomes the context. - -

      ‹ï‘Ì“I‚ɂ͂±‚ÌŠÖ”‚ÍŽŸ‚̂悤‚Ȉ—‚ðs‚¢‚Ü‚·B -Unicode •¶Žš c ‚Ì "General Category" ‘®«‚ðŽQÆ‚µA -‚»‚ꂪ "Lu" "Ll" "Lt" ‚Ì‚¢‚¸‚ê‚©‚Å‚ ‚ê‚Î -mdn__unicode_context_nonfinal ‚ðA"Mn" ‚Å‚ ‚ê‚Î -mdn__unicode_context_unknown ‚ðA‚»‚êˆÈŠO‚Å‚ ‚ê‚Î -mdn__unicode_context_final ‚ð•Ô‚µ‚Ü‚·B
      -Specifically, this function does the following. -Refers "General Category" properties of Unicode character c and if it is "Lu", "Ll" or "Lt" mdn__unicode_context_nonfinal is returned, if it is "Mn" mdn__unicode_context_unknown is returned, and if it is other than the above, mdn__unicode_context_final is returned. - -

      - -
      - -

      unormalize ƒ‚ƒWƒ…[ƒ‹
      -unormalize module

      - -

      unormalize ƒ‚ƒWƒ…[ƒ‹‚ÍAUnicode ‚Å’è‹`‚³‚ê‚Ä‚¢‚é•W€‚̳‹K‰»‚ð -s‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·BUnicode ‚̳‹K‰»‚Í -Unicode Technical Report #15: Unicode Normalization Forms -‚Å’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Í‚±‚Ì•¶‘‚É‚ ‚°‚ç‚ꂽ4‚‚̳‹K‰»Œ`Ž®‚ð -ŽÀ‘•‚µ‚Ä‚¢‚Ü‚·B
      -The unormalize module performs the standard normalization defined by Unicode. Normalization of Unicode is defined in Unicode Technical Report #15: Unicode Normalization Forms. This module implements the four normalization forms mentioned in this document. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn__unormalize_formc -
      -
      -mdn_result_t
      -mdn__unormalize_formc(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form C ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B
      -Applies Unicode Normalization Form C normalization to a UTF-8 encoded from character string and writes the result in the area specified by to and tolen. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_encoding -
      mdn_buffer_overflow -
      mdn_nomemory -

      - -

      mdn__unormalize_formd -
      -
      -mdn_result_t
      -mdn__unormalize_formd(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form D ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B
      -Applies Unicode Normalization Form D normalization to a UTF-8 encoded from character string and writes the result in the area specified by to and tolen. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_encoding -
      mdn_buffer_overflow -
      mdn_nomemory -

      - -

      mdn__unormalize_formkc -
      -
      -mdn_result_t
      -mdn__unormalize_formkc(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form KC ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B
      -Applies Unicode Normalization Form KC normalization to a UTF-8 encoded from character string and writes the result in the area specified by to and tolen. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_encoding -
      mdn_buffer_overflow -
      mdn_nomemory -

      - -

      mdn__unormalize_formkd -
      -
      -mdn_result_t
      -mdn__unormalize_formkd(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form KD ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B
      -Applies Unicode Normalization Form KC normalization to a UTF-8 encoded from character string and writes the result in the area specified by to and tolen. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_invalid_encoding -
      mdn_buffer_overflow -
      mdn_nomemory -

      - -
      - -

      utf5 ƒ‚ƒWƒ…[ƒ‹
      -utf5 module

      - -

      utf5 ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é -UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
      -The utf5 module performs basic processing for the proposed UTF-5 domain name encoding system. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_utf5_getwc -
      -
      -int
      -mdn_utf5_getwc(const char *s, size_t len,
      -	unsigned long *vp)
      -
      -

      UTF-5‚ŃGƒ“ƒR[ƒh‚³‚ꂽ’·‚³ len ƒoƒCƒg‚Ì•¶Žš—ñ s ‚Ì -擪‚Ì•¶Žš‚ðŽæ‚èo‚µAUCS-4 ‚ɕϊ·‚µ‚Ä vp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚·‚邯 -‚Æ‚à‚ÉA•¶Žš‚Ì (UTF-5ƒGƒ“ƒR[ƒh‚Å‚Ì) ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·B -‚à‚µ len ‚ª’Z‚·‚¬‚Ä•¶Žš‚Ì“r’†‚ÅI‚í‚Á‚Ä‚¢‚½‚èAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ŠÔˆá‚Á‚Ä‚¢‚éê‡‚É‚Í 0 ‚ª•Ô‚³‚ê‚Ü‚·B
      -Extracts the leading character of length len byte UTF-5 encoded character string s, converts it to UCS-4 and stores it in the area specified by vp and also returns the number of bytes in the (UTF-5 encoded) character strintg. 0 is returned if len is too short and ends in the middle of a character or the encoding is invalid. -

      - -

      mdn_utf5_putwc -
      -
      -int
      -mdn_utf5_putwc(char *s, size_t len, unsigned long v)
      -
      -

      UCS-4 •¶Žš v ‚ðUTF-5ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAs -‚¨‚æ‚Ñ len ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚ނƂƂà‚ÉA‘‚«ž‚ñ‚¾ƒoƒCƒg”‚ð -•Ô‚µ‚Ü‚·B‚½‚¾‚µ len ‚ª’Z‚·‚¬‚Ä‘‚«ž‚߂Ȃ¢ê‡‚É‚Í0‚ð•Ô‚µ‚Ü‚·B
      -Converts UCS-4 characters v to UTF-5 encoding, writes them in the area specified by s and len and returns the number of bytes written. 0 is returned if len is too short to write. -

      ‘‚«ž‚ñ‚¾UTF-5•¶Žš—ñ‚ÍNULL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB
      -The written UTF-5 character string is not terminated with a NULL character. - -

      - -
      - -

      utf8 ƒ‚ƒWƒ…[ƒ‹
      -utf8 module

      - -

      utf8 ƒ‚ƒWƒ…[ƒ‹‚ÍUTF-8 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÌŠî–{ˆ—‚ðs‚¤ -ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
      -The utf8 module performs the basic processing of UTF-8 encoded character strings. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_utf8_mblen -
      -
      -int
      -mdn_utf8_mblen(const char *s)
      -
      -

      UTF-8 •¶Žš—ñ s ‚Ìæ“ª•¶Žš‚Ì’·‚³(ƒoƒCƒg”)‚ð•Ô‚µ‚Ü‚·B -‚à‚µ s ‚ªŽw‚·ƒoƒCƒg‚ª UTF-8 ‚Ìæ“ªƒoƒCƒg‚Æ‚µ‚ij‚µ‚­‚È‚¢‚à‚̂ł ‚é -ê‡‚É‚Í 0 ‚ð•Ô‚µ‚Ü‚·B
      -Returns the length (number of bytes) of the leading character in the UTF-8 character string s. 0 is returned if the leading byte indicated by s is not valid for UTF-8. -

      ‚±‚ÌŠÖ”‚Í s ‚Ìæ“ªƒoƒCƒg‚݂̂𒲂ׂĒ·‚³‚ð•Ô‚µ‚Ü‚·B‚µ‚½‚ª‚Á‚Ä -2ƒoƒCƒg–ÚˆÈ~‚É•s³‚ȃoƒCƒg‚ª‚ ‚é‰Â”\«‚ª‘¶Ý‚µ‚Ü‚·B“Á‚É“r’†‚É NULL ƒoƒCƒg‚ª -‚ ‚é‰Â”\«‚à‚ ‚é‚Ì‚ÅAs ‚ª³“–‚È UTF-8 •¶Žš—ñ‚Å‚ ‚邱‚Æ‚ªŠmŽÀ‚Å‚Í -‚È‚¢ê‡‚ɂ͋C‚ð‚‚¯‚é•K—v‚ª‚ ‚è‚Ü‚·B
      -This function returns the length by checking the leading byte of s; there is therefore a possibility of invalid byte in the 2nd and later byte. In particular, NULL bytes may exist in the middle, so you have to be careful when it is not certain that s is a valid UTF-8 character string. -

      - -

      mdn_utf8_getmb -
      -
      -int
      -mdn_utf8_getmb(const char *s, size_t len, char *buf)
      -
      -

      ’·‚³ len ƒoƒCƒg‚Ì UTF-8 •¶Žš—ñ s ‚Ìæ“ª‚Ì1•¶Žš‚ðbuf ‚ɃRƒs[‚µAƒRƒs[‚µ‚½ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·B‚à‚µ len ‚ª’Z‚·‚¬‚½‚èAs ‚ªŽw‚·•¶Žš‚ª UTF-8 ‚Æ‚µ‚ij‚µ‚­‚È‚¢ê‡‚ɂ̓Rƒs[‚Ís‚킸A0 ‚ð•Ô‚µ‚Ü‚·B
      -Copies the leading character of s UTF-8 character strings of length len and returns the number of copied bytes. -

      buf ‚Í”CˆÓ‚Ì UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶Žš‚ª•ÛŽ‚Å‚«‚é‘å‚«‚³ -‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚·‚Ȃ킿A6ƒoƒCƒgˆÈã‚Ì’·‚³‚ðŽ‚Á‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·B
      -buf must be large enough to hold any UTF-8 encoding, i.e. it must be 6 bytes or larger. -

      ‘‚«ž‚ñ‚¾UTF-8•¶Žš—ñ‚Í NULL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB
      -The written UTF-8 character string is not terminated with a NULL character. -

      - -

      mdn_utf8_getwc -
      -
      -int
      -mdn_utf8_getwc(const char *s, size_t len,
      -	unsigned long *vp)
      -
      -

      mdn_utf8_getmb ‚Ƃقړ¯‚¶‚Å‚·‚ªA -s ‚©‚çŽæ‚èo‚µ‚½•¶Žš‚ð -UCS-4‚ɕϊ·‚µ‚Ä vp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚·‚邯‚±‚낪ˆÙ‚È‚è‚Ü‚·B
      -This is almost same as mdn_utf8_getmb with the difference being that characters extracted from s are converted to UCS-4 and stored in the area indicated by vp. -

      - -

      mdn_utf8_putwc -
      -
      -int
      -mdn_utf8_putwc(char *s, size_t len, unsigned long v)
      -
      -

      UCS-4 •¶Žš v ‚ð UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚ÄA -s ‚¨‚æ‚Ñ len ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚ނƂƂà‚ÉA -‘‚«ž‚ñ‚¾ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·Bv ‚Ì’l‚ª•s³‚Å‚ ‚Á‚½‚è -len ‚ª’Z‚·‚¬‚½ê‡‚É‚Í 0 ‚ð•Ô‚µ‚Ü‚·B
      -Converts UCS-4 character v to UTF-8 encoding, writes it in the area specified by s and len and returns the number of written bytes. 0 is returned when the value of v is invalid or len is too short. -

      ‘‚«ž‚ñ‚¾UTF-8•¶Žš—ñ‚Í NULL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB
      -The written UTF-8 character string is not terminated with a NULL character. -

      - -

      mdn_utf8_isvalidstring -
      -
      -int
      -mdn_utf8_isvalidstring(const char *s)
      -
      -

      NULL •¶Žš‚ÅI’[‚³‚ꂽ•¶Žš—ñ s ‚ª³‚µ‚¢ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Å‚ ‚é‚©‚Ç‚¤‚©’²‚×A³‚µ‚¯‚ê‚Î 1 ‚ðA³‚µ‚­‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B
      -Checks whether or not character string s terminated with a NULL character is valid UTF-8 encoding and returns 1 if so and 0 if not. -

      - -

      mdn_utf8_findfirstbyte -
      -
      -char *
      -mdn_utf8_findfirstbyte(const char *s,
      -	const char *known_top)
      -
      -

      •¶Žš—ñ known_top ’†‚Ì s ‚ªŽw‚·ƒoƒCƒg‚ðŠÜ‚Þ -UTF-8 •¶Žš‚Ìæ“ªƒoƒCƒg‚𒲂ׂĕԂµ‚Ü‚·B‚»‚Ì•¶Žš‚ª³‚µ‚¢ UTF-8 -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ł͂Ȃ¢ê‡Aknown_top ‚©‚ç s ‚Ü‚Å‚Ì -ŠÔ‚Éæ“ªƒoƒCƒg‚ª‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B
      -In the character string known_top, checks the leading byte of UTF-8 characters including the byte indicated by s and returns it. NULL is returned if there are any incorrectly encoded UTF-8 characters or there is no leading byte between known_top and s. - -

      - -
      - -

      util ƒ‚ƒWƒ…[ƒ‹ util module

      - -

      util ƒ‚ƒWƒ…[ƒ‹‚Í‘¼‚̃‚ƒWƒ…[ƒ‹‚ÅŽg‚í‚ê‚郆[ƒeƒBƒŠƒeƒB[“I‚È -‹@”\‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -Œ»Ý‚̂Ƃ±‚ë‚Í‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚ð‚µ‚È‚¢•¶Žš—ñƇ‚Ì‹@”\‚݂̂ð -’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B
      -The util module provides utility type functions used by other modules. The only function currently provided is a character string collation function that does not differentiate between uppercase and lowercase characters. - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      -
      mdn_util_casematch -
      -
      -int
      -mdn_util_casematch(const char *s1, const char *s2, size_t n)
      -
      -

      •¶Žš—ñ s1 ‚Æ s2 ‚Ìæ“ª‚©‚çÅ‘å n ƒoƒCƒg‚ð -”äŠr‚µA“¯ˆê‚©‚Ç‚¤‚©‚𔻒肵‚Ü‚·B -ASCII •¶Žš‚Ì‘å•¶Žš‚Ƭ•¶Žš (‚‚܂è A ‚©‚ç Z ‚Æ a ‚©‚ç z) ‚Í“¯ˆê‚Ƃ݂Ȃµ‚Ü‚·B -“¯ˆê‚Å‚ ‚ê‚Î 1 ‚ðAˆá‚Á‚Ä‚¢‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚Í‘½‚­‚̃VƒXƒeƒ€‚Å—pˆÓ‚³‚ê‚Ä‚¢‚é strcasencmp ‚ƕԂè’l‚ÌŽd—l‚ð -œ‚¯‚΂قړ¯—l‚Ì‹@”\‚ð’ñ‹Ÿ‚·‚éŠÖ”‚Å‚·B
      -Compares the maximum n bytes from the beginning of character strings s1 and s2 and determines whether or not they are identical. Uppercase and lowercase ASCII characters (i.e. A to Z and a to z) are assumed to be the same. 1 is returned if they are found to be identical and 0 is returned if not. With the exception of the return value specifications, this function provides almost the same features as strcasencmp, which is provided in many systems. -

      -

      - -


      - -

      ZLDrule ƒ‚ƒWƒ…[ƒ‹ ZLDrule module

      - -

      ZLDrule ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚Æ ZLD ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -ƒhƒƒCƒ“–¼‚ÉŽg—p‚³‚ê‚é‰Â”\«‚Ì‚ ‚é ZLD ‚ÌƒŠƒXƒg‚Æ‚»‚ꂼ‚ê‚Ì ZLD ‚ɑΉž‚µ‚½ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌƒŠƒXƒg‚ðŽ‚¿A—^‚¦‚ç‚ꂽƒhƒƒCƒ“–¼‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚Á‚Ä -ƒ}ƒbƒ`‚µ‚½ ZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•Ô‚µ‚Ü‚·B
      -The ZLDrule module matches the domain name and ZLD. It has a list of ZLDs that are probably used for domain names and the list of encodings corresponding to each ZLD, and performs matching with the given doman name, then returns the matched ZLD and encoding. - -

      ZLDrule ƒ‚ƒWƒ…[ƒ‹‚̓}ƒbƒ`ƒ“ƒO‚Ì‚½‚ß‚ÉuƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -ƒ}ƒbƒ`ƒ“ƒO‚Éæ—§‚Á‚Ă܂¸ƒRƒ“ƒeƒLƒXƒg‚ð쬂µA‚»‚ê‚ɑ΂µ‚Ä -ZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð“o˜^‚µ‚Ä‚¢‚«‚Ü‚·B -‚»‚µ‚ÄŽÀۂɃhƒƒCƒ“–¼‚ƃ}ƒbƒ`ƒ“ƒO‚ðs‚¤Û‚ɂ͂±‚̃Rƒ“ƒeƒLƒXƒg‚ð—p‚¢‚Ä -ƒ}ƒbƒ`ƒ“ƒO‚ÉŽg—p‚·‚éZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌƒŠƒXƒg‚ðŽw’肵‚Ü‚·B -ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í -mdn_ZLDrule_t Œ^‚Å‚ ‚èAŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B
      -The ZLDrule module uses "context" concept for matching. Prior to matching, a context is created and ZLD and encoding are registered for the context. When domain name matching is performed, this context is used to specify the ZLD and encoding lists used for matching. The type of context is mdn_ZLDrule_t and is defined as the following opaque type. - -

      -
      -typedef struct mdn_ZLDrule *mdn_ZLDrule_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B
      -This module provides the following API functions. - -

      - -
      mdn_ZLDrule_create -
      -
      -mdn_result_t
      -mdn_ZLDrule_create(mdn_ZLDrule_t *ctxp)
      -
      -

      ZLD‚̃}ƒbƒ`ƒ“ƒO‚ðs‚¤‚½‚߂̃Rƒ“ƒeƒLƒXƒg‚ð쬂µA -ctxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B
      -Creates a context for ZLD matching and stores it in the area indicated by ctxp. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_ZLDrule_destroy -
      -
      -void
      -mdn_ZLDrule_destroy(mdn_ZLDrule_t ctx)
      -
      -

      mdn_ZLDrule_create ‚Å쬂µ‚½ -ƒRƒ“ƒeƒLƒXƒg ctx ‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B
      -Deletes the context created by mdn_ZLDrule_create and releases the allocated memory. -

      - -

      mdn_ZLDrule_add -
      -
      -mdn_result_t
      -mdn_ZLDrule_add(mdn_ZLDrule_t ctx, const char *ZLD,
      -	const char **encodings, int nencodings)
      -
      -

      mdn_ZLDrule_create ‚Å쬂µ‚½ -ƒRƒ“ƒeƒLƒXƒg ctx ‚ÉAZLD ZLD ‚Æ -encodings ‚¨‚æ‚Ñ nencodings ‚ÅŽw’肳‚ê‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒŠƒXƒg‚Ì‘g‚ð“o˜^‚µ‚Ü‚·B
      -Registers the ZLD and encoding list set specified by encodings and nencodings in context ctx created by mdn_ZLDrule_create. -

      ‹ó‚Ì ZLDA‚‚܂è "" ‚â "." ‚Í”CˆÓ‚̃hƒƒCƒ“–¼‚Ƀ}ƒbƒ`‚µ‚Ü‚·B -‚µ‚½‚ª‚Á‚ÄZLD‚Æ‚µ‚Ä‹ó‚Ì’l‚ðŽw’è‚·‚邱‚Ƃɂæ‚Á‚ÄA‚¢‚¸‚ê‚Ì -ZLD ‚É‚àƒ}ƒbƒ`‚µ‚È‚©‚Á‚½ê‡‚̃fƒtƒHƒ‹ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’è‚·‚邱‚Æ‚ª -‰Â”\‚Å‚·B
      -Empty ZLDs such as "" or "." match all domain names, therefore, by specifying an empty value for ZLD the default encoding can be specified in those cases in which no ZLD match is found. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_nomemory -

      - -

      mdn_ZLDrule_select -
      -
      -mdn_result_t
      -mdn_ZLDrule_select(mdn_ZLDrule_t ctx, const char *domain,
      -	char **ZLDp, mdn_converter_t *convctxp)
      -
      -

      ƒRƒ“ƒeƒLƒXƒg ctx ‚Ɋ܂܂ê‚Ä‚¢‚é ZLD ‚ÌƒŠƒXƒg‚Æ -ƒhƒƒCƒ“–¼ domain ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðŽŽ‚Ý‚Ü‚·Bƒ}ƒbƒ`ƒ“ƒO‚Í -ZLD‚ª’·‚¢ (ZLD ‚ð\¬‚·‚郉ƒxƒ‹‚Ì”‚ª‘½‚¢) ‚à‚Ì‚©‚燂És‚í‚ê‚Ü‚·B
      -Attempts to match the ZLD list contained in context ctx and domain name domain. Matching is executed starting from the longest ZLD (a ZLD consisting of many labels). -

      ƒ}ƒbƒ`‚·‚éZLD‚ª‚ ‚Á‚½ê‡AZLDp ‚ÌŽw‚·—̈æ‚ÉAƒ}ƒbƒ`‚µ‚½ -ZLD ‚ւ̃|ƒCƒ“ƒ^‚ªŠi”[‚³‚ê‚Ü‚·B•Ô‚³‚ê‚éƒ|ƒCƒ“ƒ^‚Í‚·‚Å‚É -mdn_translator_canonicalZLD -‚É‚æ‚Á‚Ä•W€Œ`Ž®‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅA‚»‚Ì‚Ü‚Ü -mdn_translator_translate ‚Ö‚Ì -ˆø”‚Æ‚µ‚Ä“n‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B
      -When a ZLD match is found, the pointer to the ZLD match is stored in the area specified by ZLDp. Since the return pointer has already been converted to the standard form by mdn_translator_canonicalZLD, it can be passed as the argument as is. -

      ƒ}ƒbƒ`‚µ‚½ZLD ‚ɑΉž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªˆê‚‚¾‚¯‚È‚çA‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -‚ɑΉž‚·‚éƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ª convctxp ‚ÌŽw‚·—̈æ‚É -Ši”[‚³‚ê‚Ü‚·B -‘Ήž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª•¡”‚ ‚ê‚ÎAƒŠƒXƒg‚Ìæ“ª‚©‚ç‡‚É -domain ‚ª‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ij‚µ‚¢‚©‚Ç‚¤‚©‚𒲂ׂ܂·B -‚à‚µ³‚µ‚¢‚à‚Ì‚ª‚ ‚ê‚ÎAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚̂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ª -convctxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚³‚ê‚Ü‚·B³‚µ‚¢‚à‚Ì‚ª‚È‚¯‚ê‚Î -convctxp ‚ɂ͉½‚à‘‚«ž‚܂ꂸAmdn_invalid_encoding‚ª -•Ô‚³‚ê‚Ü‚·B
      -When only one encoding method corresponds to the matched ZLD, the code conversion context corresponding to that encoding method is stored in the area specified by convctxp. If there is more than one valid encoding method, a check is performed from the top of the list to determine whether or not domain is valid for the encoding. Of the valid encoding methods found, the code conversion context of the first one found is stored in the area specified by convctxp. If no valid encoding method is found, nothing is written in convctxp and mdn_invalid_encoding is returned. -

      ƒ}ƒbƒ`‚·‚é ZLD ‚ª‚È‚¯‚ê‚Î mdn_notfound‚ð•Ô‚µ‚Ĉ—‚ðI—¹‚µ‚Ü‚·B
      When there is no ZLD match, mdn_notfound is returned and processing ends. -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfoundA -mdn_invalid_encoding -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      One of the following values is returned: -
      mdn_success -
      mdn_notfound -
      mdn_invalid_encoding - -

      - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/mdnconv.html b/contrib/idn/mdnkit/doc/en/spec/mdnconv.html deleted file mode 100644 index cdbd81ca66..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/mdnconv.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - -mdnconv specification - - - - -

      mdnconv

      - -

       

      - -

      ŠT—v

      -

      Overview

      - -

      mdnconv ‚̓l[ƒ€ƒT[ƒo‚ÌÝ’èƒtƒ@ƒCƒ‹ named.conf ‚â -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì‚½‚߂̃R[ƒhƒZƒbƒg (ƒGƒ“ƒR[ƒfƒBƒ“ƒO) •ÏŠ·ƒc[ƒ‹‚Å‚·B -

      mdnconv is a code set (encoding) conversion tool for the named.conf configuration or zone master files used with name servers. -

      mdnconv ‚͈ø”‚ÅŽw’肳‚ꂽƒtƒ@ƒCƒ‹A‚ ‚é‚¢‚Í•W€“ü—Í‚©‚ç -ƒeƒLƒXƒg‚ð“ü—Í‚µAƒIƒvƒVƒ‡ƒ“‚ÅŽw’肳‚ꂽƒR[ƒhƒZƒbƒg•ÏŠ·‚¨‚æ‚ѳ‹K‰»‚ð -ŽÀs‚µAŒ‹‰Ê‚ð•W€o—͂ɑ‚«o‚µ‚Ü‚·B -

      mdnconv receives the file specified by an argument or text entered using the keyboard, executes the code set conversion and normalization specified by the option, and writes the result in standard output. - -

      ‹ï‘Ì“I‚ÈŽg‚¢•û‚ÉŠÖ‚µ‚Ă͗˜—pŽÒƒKƒCƒh‚Ì -named.confA -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì쬂̀‚ð‚²——‚­‚¾‚³‚¢B -

      For detailed information about usage, refer to named.conf, Creating a Zone Master File in the User's Guide. - -

      - -

      ‹N“®

      -

      Startup

      - -
      -
      -% mdnconv [ƒIƒvƒVƒ‡ƒ“...]  [ƒtƒ@ƒCƒ‹...]
      -
      -
      -
      -
      -% mdnconv [Option...]  [File...]
      -
      -
      - -

      ƒIƒvƒVƒ‡ƒ“

      -

      Option

      - -
      -
      -in in-code -
      “ü—̓eƒLƒXƒg‚̃R[ƒhƒZƒbƒg–¼ in-code ‚ðŽw’肵‚Ü‚·B - in-code ‚ÉŽw’è‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚ÍAŽŸ‚Ì‚¢‚¸‚ê‚©‚Å‚·B -
      Specifies the code set name in-code of input text. - The following code set names can be specified in in-code. -
        -
      • iconv_open() ‚ªŽó‚¯•t‚¯‚éƒR[ƒhƒZƒbƒg–¼ -
      • Code set name accepted by iconv_open() -
      • UTF-5 -
      • RACE -
      • BRACE -
      • LACE -
      • ã‹L‚̃R[ƒhƒZƒbƒg–¼‚̕ʖ¼ (-alias ƒIƒvƒVƒ‡ƒ“ŽQÆ) -
      • Alias of above code set names (refer to the -alias option) -
      -

      Žw’肵‚È‚©‚Á‚½ê‡‚ɂ͌»Ý‚̃ƒP[ƒ‹‚©‚çƒfƒtƒHƒ‹ƒg‚̃R[ƒhƒZƒbƒg‚ð - ‹‚߂܂·B -

      When not specified, the default code set is obtained from the current locale. -

      -

      -out out-code -
      o—̓eƒLƒXƒg‚̃R[ƒhƒZƒbƒg–¼ out-code ‚ðŽw’肵‚Ü‚·B - out-code ‚ÉŽw’è‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚Í - -in ƒIƒvƒVƒ‡ƒ“‚Ì in-code ‚Æ“¯‚¶‚Å‚·B -
      Specifies the code set name out-code of output text. - Code set names that can be specified for out-code are the same as for in-code of the -in option. -

      Žw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - - ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ - ‚Éݒ肳‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg‚ªŽg—p‚³‚ê‚Ü‚·B -
      When not specified, the code set specified in server encoding entry of the client configuration file is used. -

      -

      -normalize scheme -
      ³‹K‰»‚Ì•ûŽ®‚ðŽw’肵‚Ü‚·Bscheme‚ÉŽw’è‚Å‚«‚é•ûŽ®‚Í - ŽŸ‚Ì‚¢‚¸‚ê‚©‚Å‚·B -
      Specifies the normalization method. The following methods can be specified for scheme. -
        -
      • ascii-uppercase -
      • ascii-lowercase -
      • unicode-uppercase -
      • unicode-lowercase -
      • unicode-form-c -
      • unicode-form-kc -
      • ja-kana-fullwidth -
      • ja-alnum-halfwidth -
      • ja-compose-voiced-sound -
      • ja-minus-hack -
      • ja-delimiter-hack -
      - ŒÂX‚̳‹K‰»•ûŽ®‚ɂ‚¢‚Ä‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - normalizer ƒ‚ƒWƒ…[ƒ‹‚ð‚²——‚­‚¾‚³‚¢B -

      For individual normalization methods, refer to the normalizer module of the MDN library. -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚Í•¡”Žw’è‚·‚邱‚Æ‚ª‰Â”\‚Å‚·B•¡”Žw’肵‚½ê‡‚É‚ÍA - Žw’肵‚½‡‚ɳ‹K‰»‚ªs‚í‚ê‚Ü‚·B -

      With this option, more than one method can be specified. When multiple methods are specified, normalization takes place in the order of the specification. - -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - ³‹K‰»ƒGƒ“ƒgƒŠ‚É - Žw’肳‚ê‚Ä‚¢‚鳋K‰»•ûŽ®‚ªŽg—p‚³‚ê‚Ü‚·B -

      When this option is not specifed, the normalization method specified in normalization entry of the client configuration file is used. -

      -

      -zld ZLD -
      Žg—p‚·‚é ZLD ‚ðŽw’肵‚Ü‚·B•ÏŠ·‚³‚ê‚éƒhƒƒCƒ“–¼‚ª - ƒsƒŠƒIƒh‚ÅI‚í‚é FQDN ‚ÅA‚©‚ÂŌオ ZLD ‚Æ - ˆê’v‚µ‚½ê‡‚É‚ÍAˆê’v‚µ‚½•”•ª‚͕ϊ·‘ÎÛ‚©‚çŠO‚³‚ê‚Ü‚·B - ‚±‚ê‚Í UTF-5 ‚ȂLjꕔ‚Ì ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚¨‚¢‚ÄAZLD •”•ª‚ª - •ÏŠ·‚³‚ê‚È‚¢‚悤‚É‚·‚邽‚߂ɂ·‚邽‚߂ɕK—v‚Ȉ—‚Å‚·B -
      Specifies ZLD. When the domain name to be converted is FQDN that ends with a period and also the last character matches with ZLD, the matched part will not be converted. - This processing is necessary so that the ZLD part is not converted in some ASCII-compatible encoding schemes such as UTF-5. -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - ƒT[ƒo ZLD ƒGƒ“ƒgƒŠ‚É - Žw’肳‚ê‚Ä‚¢‚é’l‚ªŽg—p‚³‚ê‚Ü‚·B -

      When this option is not specified, the value specified in the server ZLD entry of the client configuration file is used. -

      -

      -auto -
      -zld ƒIƒvƒVƒ‡ƒ“‚Æ‘g‚݇‚킹‚ÄŽg—p‚µ‚Ü‚·B - ‚à‚µ•ÏŠ·‘ÎÛ‚Å‚ ‚éA”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ÌŌオ - ƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¢‚½ê‡‚ÉA-zld ƒIƒvƒVƒ‡ƒ“‚ÅŽw’肵‚½ ZLD - ‚ª‚»‚Ì‚ ‚ƂɎ©“®“I‚É•t‰Á‚³‚ê‚Ü‚·B - ‚±‚ê‚É‚æ‚Á‚ă][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚É ZLD ‚𖾎¦“I‚É‘‚­•K—v‚ª - ­‚È‚­‚È‚è‚Ü‚·‚ªA‚±‚̕⊮‹@”\‚ÍŠ®‘S‚ł͂Ȃ¢‚Ì‚ÅA–¾Ž¦“I‚É ZLD ‚ð - ‘‚©‚È‚¯‚ê‚΂Ȃç‚È‚¢ê‡‚à‚ ‚è‚Ü‚·Bˆê”Ê“I‚ɂ͂±‚Ì‹@”\‚É - —Š‚ç‚È‚¢•û‚ª‚æ‚¢‚Å‚µ‚傤B -
      Used in combination with the -zld option. - When a domain name is converted that includes non-ASCII characters and ends with a period, ZLD specified by -zld option is automatically added after the period. - This reduces the need to explicitly write ZLD for zone master files, etc. However, because this is not a perfect complementary function, ZLD sometimes need to be explicitly written. In general, it is recommended that you do not rely on this function. -

      -

      -whole -
      ³‹K‰»‚ƃ^[ƒQƒbƒgƒR[ƒhƒZƒbƒg‚ւ̕ϊ·‚ð - “ü—Í‚³‚ꂽƒeƒLƒXƒg‘S‘̂ɑ΂µ‚Äs‚¢‚Ü‚·B‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚¯‚ê‚Î - ”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚¾‚Æ”»’f‚³‚ꂽ•”•ª‚݂̂ª•ÏŠ·‘ÎÛ‚Æ - ‚È‚è‚Ü‚·BÚׂ͕ϊ·ˆ—‚ÌÚ×‚ð‚²——‚­‚¾‚³‚¢B -
      Normalization and conversion to the target code set are applied to the entire entered text. When this option is not specified, only the part where it is determined that the domain name includes non-ASCII characters is the subject of conversion. For details, see Details of Conversion Processing. -

      -

      -alias path -
      ƒR[ƒhƒZƒbƒg–¼‚̕ʖ¼‚ð’è‹`‚µ‚½ƒtƒ@ƒCƒ‹ path ‚ðŽw’肵‚Ü‚·B - ‚±‚̃tƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹Œ`Ž®‚ÅA1s‚Ɉê‘g‚¸‚ - ƒR[ƒhƒZƒbƒg–¼‚̕ʖ¼‚Æ³Ž®–¼‚Æ‚ðˆê‚ˆÈã‚̃Xƒy[ƒX‚Å‹æØ‚Á‚Ä‘‚¢‚½ - ‚à‚̂ł·B—Ⴆ‚ÎŽŸ‚Ì—á‚Í Shift_JIS ‚Æ EUC-JP ‚Ì - •Ê–¼‚Æ‚µ‚Ä‚»‚ꂼ‚ê sjisAeuc-jp ‚ð’è‹`‚·‚é‚à‚̂ł·B -
      Specifies the file path that defines the alias name of the code set name. - This file is a text file and in each line, one set of the alias name and formal name of the code set is written with one or more spaces as a delimiter. For example, the following examples Shift_JIS and EUC-JP define sjis and euc-jp as the alias. -
      -
      -# "#" ‚ÅŽn‚Ü‚és‚̓Rƒƒ“ƒg
      -sjis		Shift_JIS
      -euc-jp		EUC-JP
      -
      -
      -
      -
      -# Lines that begin with a "#" are comments
      -sjis		Shift_JIS
      -euc-jp		EUC-JP
      -
      -
      - -
      -noconf -
      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ð - “ǂݞ‚܂Ȃ¢‚悤‚É‚µ‚Ü‚·B -
      The client configuration file is not loaded. -

      - -

      -flush -
      s‚²‚Æ‚Éo—Í‚ðƒtƒ‰ƒbƒVƒ…‚µ‚Ü‚·Bmdnconv ‚̓tƒ@ƒCƒ‹‚âƒpƒCƒv‚Ö‚Ì - o—Í‚Ìê‡A’Êí‚Í•¡”s‚̃f[ƒ^‚ð‚܂Ƃ߂đ‚«o‚µ‚Ü‚·‚ªA‚±‚Ì - ƒIƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚邯1s‚²‚Ƃɕϊ·Œ‹‰Ê‚ð‘‚«o‚µ‚Ü‚·B - ’Êí‚Í‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚é•K—v‚Í‚ ‚è‚Ü‚¹‚ñ‚ªA - mdnconv ‚ðƒtƒBƒ‹ƒ^ƒvƒƒOƒ‰ƒ€‚Æ‚µ‚Ä‘¼‚̃vƒƒOƒ‰ƒ€‚©‚ç—˜—p‚·‚éê‡‚È‚Ç‚É - •Ö—˜‚È‚±‚Æ‚ª‚ ‚è‚Ü‚·B -
      Flushes output for each line. When outputting to a pipe file, omdnconv usually writes data from a multiple number of lines in a single operation. By specifying this option, conversion result is written line by line. - Usually, this option does not need to be specified but it may be useful when using mdnconv as a program to filter output from another program. -
      - -

      •ÏŠ·ˆ—‚ÌÚ×

      -

      Details of Conversion Processing

      - -

      mdnconv ‚ªs‚¤•ÏŠ·ˆ—‚ðƒXƒeƒbƒv‚²‚ƂɋLq‚µ‚Ü‚·B -

      The steps performed during conversion processing by mdnconv are described below. - -

        -
      1. ƒtƒ@ƒCƒ‹‚ ‚é‚¢‚Í•W€“ü—Í‚©‚çƒeƒLƒXƒg‚ð1s“ǂݞ‚݂܂·B -
        Loads a file or one line of text entered with a keyboard. -

        -

      2. s––‚̉üsƒR[ƒh‚ðŽæ‚èœ‚«‚Ü‚·B - ‚±‚ê‚Í -whole ƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚Ä mdnconv ‚ðŽÀs‚µA‚©‚ - o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª UTF-5 ‚â RACE ‚È‚Ç ASCII ŒÝŠ· - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌꇂÉA‰üsƒR[ƒh‚à UTF-5 ‚â RACE ‚Å - ƒGƒ“ƒR[ƒh‚³‚ê‚Ä‚µ‚Ü‚¢A‰üs‚ª‚È‚­‚È‚Á‚Ä‚µ‚Ü‚¤‚Ì‚ð”ð‚¯‚é‚½‚߂ł·B -
        Removes the carriage return at the end of the line. This prevents the carriage return from dissapearing; this is needed because when mdnconv is executed with the -whole option set, and also when the output encoding is ASCII-compatible encoding such as UTF-5 or RACE, the carriage code will also be encoded using UTF-5 or RACEencoding. -

        -

      3. s‚ð UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ü‚·B•ÏŠ·‚É‚Í - MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì converter ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -
        Converts the line to UTF-8 encoding. The converter module of the MDN library is used for conversion. -

        ’Êí‚Ís‘S‘Ì‚ð UTF-8 ‚ɕϊ·‚µ‚Ü‚·‚ªA“ü—̓R[ƒhƒZƒbƒg‚ª - "RACE" ‚ÌꇂɂÍARACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ¯•Ê‚·‚éƒvƒŠƒtƒBƒbƒNƒX‚ð—p‚¢‚Ä - RACE ƒGƒ“ƒR[ƒh‚³‚ꂽ•”•ª‚Ì‚Ý‚ðŽæ‚èo‚µ‚Ä UTF-8 ‚ɕϊ·‚µ‚Ü‚·B -

        Usually, the entire line is converted to UTF-8. However, when the input code set is "RACE", a prefix that identifies RACE encoding is used to extract the RACE encoded part for conversion to UTF-8. -

        -

      4. •ÏŠ·Œ‹‰Ê‚ª UTF-8 ‚Æ‚µ‚ij‚µ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì utf8 ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B–{—ˆ‚±‚̈—‚Í•s—v‚Ȃ͂¸‚Å‚·‚ªAƒR[ƒh•ÏŠ·‚ÌŽÀ‘•‚É - ƒoƒO‚ª‚ ‚Á‚½ê‡‚É‘‚¢’iŠK‚ÅŒŸo‚Å‚«‚邿‚¤A‚±‚±‚Ń`ƒFƒbƒN‚ð‚·‚é‚æ‚¤‚É - ‚µ‚Ä‚ ‚è‚Ü‚·B -
        Checks whether or not the conversion result is correctly encoded as UTF-8. - The utf8 module of the MDN library is used for this operation. - Basically, this processing is not necessary but checking is performed at this point so that if there is a bug in code conversion implementation, it can be detected at an early stage. -

        -

      5. -whole ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚ê‚ÎŽŸ‚̈—‘ÎÛ‚ÌŽæ‚èo‚µ‚ð”ò‚΂µA - s‘S‘Ì‚ðˆ—‘ÎÛ‚Æ‚µ‚Ä 7. ‚É”ò‚т܂·B -
        When the -whole option is specified, extraction of the processing target explained below is skipped and processing jumps to Step 7 because the entire line is the processing target. -

        -

      6. UTF-8‚ɕϊ·‚³‚ꂽs‚Ì’†‚©‚瑽Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•”•ª‚ðŽæ‚èo‚µ‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - selectiveencode ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·BŽæ‚èo‚³‚ê‚é‚͎̂Ÿ‚̂悤‚È•”•ª•¶Žš—ñ‚Å‚·B -
        In a line that was converted to UTF-8, the multilingual domain name part is extracted. - The MDN selectiveencode module of the MDN library is used for this step. - The following partial text strings are extracted. -
          -
        • 1•¶ŽšˆÈã‚Ì”ñASCII•¶Žš‚ðŠÜ‚Þ‚±‚ÆB -
          Text that includes one or more non-ASCII characters -
        • ]—ˆ‚̃hƒƒCƒ“–¼‚É‹–‚³‚ê‚é•¶Žš (ƒAƒ‹ƒtƒ@ƒxƒbƒgA”ŽšAƒnƒCƒtƒ“)A - ”ñASCII•¶ŽšAƒsƒŠƒIƒh‚¾‚¯‚©‚ç\¬‚³‚ê‚Ä‚¢‚邱‚Æ -
          Text that consists of only characters permitted for conventional domain names (alphabet, numbers, hyphens), non-ASCII characters, and periods. -
        -

        Žæ‚èo‚³‚ꂽ•”•ª‚݂̂ðˆÈ~‚̳‹K‰»“™‚̈—‘ÎÛ‚Æ‚µ‚Ü‚·B -

        Only the extracted part is the processing target for the subsequent normalization and other processing. -

        -

      7. ³‹K‰»‚ðs‚¢‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - normalizer ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -
        Normalization is performed. - The normalizer module of the MDN library is used for this operation. -

        -

      8. Ä“x•ÏŠ·Œ‹‰Ê‚ª UTF-8 ‚Æ‚µ‚ij‚µ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ü‚·B - –{—ˆ‚±‚̈—‚Í•s—v‚Ȃ͂¸‚Å‚·‚ªA³‹K‰»‚ÌŽÀ‘•‚É - ƒoƒO‚ª‚ ‚Á‚½ê‡‚ðl‚¦‚ă`ƒFƒbƒN‚ð“ü‚ê‚Ä‚ ‚è‚Ü‚·B -
        In this operation, a check is performed as to whether or not the conversion result is correctly encoded as UTF-8. - In essence, this processing is not necessary but checking is performed here in consideration of the possibility of bugs in normalization. -

        -

      9. ³‹K‰»‚³‚ꂽ•¶Žš—ñ‚ÌŌオƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¨‚èA‚©‚ - -zld ƒIƒvƒVƒ‡ƒ“‚ÅŽw’肳‚ꂽ ZLD ‚Æ•¶Žš—ñ‚ªƒ}ƒbƒ`‚·‚ê‚ÎAZLD ‚Ì•”•ª‚ð - ŽŸ‚̃R[ƒhƒZƒbƒg•ÏŠ·‚Ì‘ÎÛ‚©‚çŠO‚µ‚Ü‚·B‚±‚ê‚Í ZLD ‚Ì•”•ª‚܂Š- (UTF-5 ‚ȂǂÉ) •ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¤‚Ì‚ð–h‚®‚½‚߂ł·B -
        When the normalized text string ends with a period and also matches the ZLD specified using -zld option, the ZLD part will not be included in the next code set conversion target. This method is used to prevent conversion of the ZLD part (to UTF-5, etc). -

        -

      10. UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç -out ‚ÅŽw’肳‚ꂽo—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µ‚Ü‚·B•ÏŠ·‚É‚Í - MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì converter ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -
        Converts from UTF-8 encoding to the output encoding specified by -out. The converter module of the MDN library is used for this operation. -

        -

      11. o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‘O‚Ì•¶Žš—ñ‚ªƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¨‚èA - ‚©‚ -auto ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚ê‚ÎA•¶Žš—ñ‚ÌŒã‚É ZLD ‚ð•t‰Á‚µ‚Ü‚·B -
        When a text ends with a period prior to converting to the output encoding, and also the -auto option is specified, ZLD will be added after the text string. -

        -

      12. -whole ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚½ê‡‚ɂ͕ϊ·‚³‚ꂽ•¶Žš—ñ‚ð‚»‚Ì‚Ü‚Ü - •W€o—Í‚Éo—Í‚µ‚Ü‚·B - Žw’肳‚ê‚Ä‚¢‚È‚©‚Á‚½ê‡‚É‚ÍA•ÏŠ·‚³‚ꂽ•¶Žš—ñ‚Æ 6. ‚ň—‘ÎÛ‚Æ - ‚È‚ç‚È‚©‚Á‚½•”•ª‚Æ‚ðƒ}[ƒW‚µ‚Ä‚©‚ç‚â‚Í‚è•W€o—Í‚Éo—Í‚µ‚Ü‚·B - ‚Ç‚¿‚ç‚ÌꇂàÅŒã‚ɉüsƒR[ƒh‚ðo—Í‚µ‚Ü‚·B -
        When the -whole option is specified, the converted text string is output in standard output. - When the -whole option is not specified, the converted text string and the part that was excluded from conversion in Step 6 above are merged and then output in standard output. - In both cases, the carriage return code is added at the end. -

        -

      13. ‚·‚ׂĂ̓ü—Ís‚ðˆ—‚µI‚í‚ê‚ÎI—¹‚µ‚Ü‚·B‚»‚¤‚łȂ¯‚ê‚Î 1. ‚É - –ß‚è‚Ü‚·B -
        The procedure ends when all input lines are processed. If not, the process returns to Step 1. -
      - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/runmdn.html b/contrib/idn/mdnkit/doc/en/spec/runmdn.html deleted file mode 100644 index 33ee040336..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/runmdn.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - -runmdn specification - - - - - -

      runmdn

      - -

       

      - -

      ŠT—v

      -

      Overview

      - -

      runmdn ‚Í BIND-4 ‚ ‚é‚¢‚Í BIND-8 ‚ðƒx[ƒX‚Æ‚µ‚½ -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚ÂƒNƒ‰ƒCƒAƒ“ƒg‚ðA -ăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B -

      The runmdn command allows clients that use a BIND-4 or BIND-8 based resolver library to support multilingual domain names without re-compiling. -

      - -

      ‹N“®

      -

      Invoke

      - -
      -
      -% runmdn ƒRƒ}ƒ“ƒh [ˆø”...]
      -
      -
      -
      -
      -% runmdn Command [Argument...]
      -
      -
      - -

      —Ⴆ‚Î telnet ƒRƒ}ƒ“ƒh‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚ß‚É‚Í -ŽŸ‚̂悤‚É‚µ‚Ü‚·B -

      For example, multilingual domain names can be supported using a telnet command as follows. -

      -
      -% runmdn telnet ƒƒOƒCƒ“.‚Ç‚±‚©‚̉ïŽÐ.jp
      -
      -
      -
      -
      -% runmdn telnet ƒƒOƒCƒ“.‚Ç‚±‚©‚̉ïŽÐ.jp
      -
      -
      - -

      ŽÀ‘•

      -

      Implementation

      - -

      runmdn ‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@\‚ð—p‚¢‚ÄA•W€‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ɋ܂܂ê‚éŠÖ”‚̈ꕔ‚ðA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚ðŽ‚Â -•ʂ̃o[ƒWƒ‡ƒ“‚É“®“I‚É’uŠ·‚¦‚邱‚Æ‚ÅAƒNƒ‰ƒCƒAƒ“ƒg‚ł̑½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‚ðŽÀŒ»‚µ‚Ü‚·B -

      runmdn implements processing of multilingual domain names by the client using the pre-load mechanism of the common library, and dynamically replaces a part of function included in the standard resolver library with another version that has a multilingual domain name processing function. - -

      ‘½‚­‚̃VƒXƒeƒ€‚ł͋¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‚͊‹«•Ï” -LD_PRELOAD ‚ð—p‚¢‚ÄŽÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚̊‹«•Ï”‚ɃvƒŠƒ[ƒh‚µ‚½‚¢ -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚邯AƒNƒ‰ƒCƒAƒ“ƒg‚ÌŽÀsŽž‚ÉA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É•W€‚Ì‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªƒŠƒ“ƒN‚³‚ê‚é‘O‚É -Žw’肵‚½ƒ‰ƒCƒuƒ‰ƒŠ‚ªƒŠƒ“ƒN‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚Á‚Ä•W€‚̃‰ƒCƒuƒ‰ƒŠŠÖ”‚ð -’uŠ·‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      In many systems, pre-loading of the common library is implemented using an environmental variable LD_PRELOAD. By specifying the path name of the common library file to pre-load in this environmental variable, when the client executes, the specified library is linked before the standard common library of the application is linked. Because of this, the standard library function can be replaced. - -

      ‚µ‚½‚ª‚Á‚ÄArunmdn ‚ÌŽÀ‘Ì‚ÍA‚±‚̊‹«•Ï”‚ðݒ肵Aˆø”‚Å -Žw’肳‚ꂽƒRƒ}ƒ“ƒh‚ð‹N“®‚·‚邾‚¯‚̃VƒFƒ‹ƒXƒNƒŠƒvƒg‚Å‚ ‚èAŽÀÛ‚É -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤‚̂̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚é -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ libmdnresolv ‚Å‚·B -

      Therefore, in reality runmdn is a shell script that sets this environmental variable and invokes the commands specified by arguments, and actual multilingual domain name processing is performed by the shared library libmdnresolv linked to the application. - -

      libmdnresolv ‚ðƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚èABIND4 ‚ ‚é‚¢‚Í BIND8 ƒx[ƒX‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Å—p‚¢‚ç‚ê‚Ä‚¢‚鎟‚ÌŠÖ”‚ª’u‚«Š·‚í‚è‚Ü‚·B -

      By linking libmdnresolv, the following functions used by BIND4 or BIND8 based resolver library are replaced. -

      -
      -dn_comp
      -dn_expand
      -res_hnok
      -res_ownok
      -res_mailok
      -res_dnok
      -
      -
      - -

      ‚»‚ꂼ‚ê‚Ì•ÏX“_‚ðŠÈ’P‚É‹Lq‚µ‚Ü‚·B -

      Changes in each function are briefly explained below. -

      -
      dn_comp
      -Žw’肳‚ꂽƒhƒƒCƒ“–¼‚ð DNS ƒvƒƒgƒRƒ‹‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“ƒf[ƒ^‚ɕϊ·‚·‚é‘O‚ÉA -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚©‚ç DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·‚¨‚æ‚ѳ‹K‰»A(•K—v‚È‚ç‚Î) ZLD‚Ì•t‰Á‚ðs‚¢‚Ü‚·B -
      Before the specified domain name is converted to the domain data for the DNS protocol, conversion from local encoding to the code set used by the DNS protocol and normanization, and addition of ZLD (if necessary) are performed. -
      dn_expand
      -DNS ƒvƒƒgƒRƒ‹‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“ƒf[ƒ^‚ðƒhƒƒCƒ“–¼•¶Žš—ñ‚ɕϊ·‚µ‚½ŒãA -(•K—v‚È‚ç) ZLD ‚ð휂µAƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B -‚Ü‚½’Ê킱‚ÌŠÖ”‚̓hƒƒCƒ“–¼‚Ɋ܂܂ê‚é ASCII ˆÈŠO‚Ì•¶Žš‚ð -ƒoƒbƒNƒXƒ‰ƒbƒVƒ…ƒGƒXƒP[ƒv‚·‚鈗‚ð‚µ‚Ü‚·‚ªA‚±‚ê‚ð—}§‚µ‚Ü‚·B -
      After the domain data used in DNS protocol is converted to the domain name text string, deletion of ZLD (if necessary) and conversion to local code set are performed. -Usually, this function applies backslash escape to non-ASCII characters but this processing is suppressed. -
      res_hnok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      All characters are determined to be valid. -
      res_ownok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      All characters are determined to be valid. -
      res_mailok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      All characters are determined to be valid. -
      res_dnok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      All characters are determined to be valid. -
      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»AZLD ‚̈—“™‚Í‚·‚×‚Ä -MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚Ì -res ƒ‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -

      For all processing such as encoding conversion, normalization and ZLD, res module of MDN library (libmdn) is used. -

      -Œ»Ý‚ÌŽÀ‘•‚Å‚Í libmdnresolv ‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚ð -ŒÄ‚Ño‚·‚̂ł͂Ȃ­Alibmdn Ž©‘Ì‚ð“à•”‚É•ø‚¦ž‚ނ悤‚ÈŒ`‘ԂɂȂÁ‚Ä‚¢‚Ü‚·‚ªA -‚±‚ê‚Í’P‚È‚éŽÀ‘•ã‚Ì“s‡‚©‚ç‚»‚¤‚È‚Á‚Ä‚¢‚邾‚¯‚ÅA˜_—“I‚É‚Í MDN -ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‹@”\‚ðŒÄ‚Ño‚µ‚Ä‚¢‚邯‚¢‚Á‚Ă悢‚Å‚µ‚傤B -
      In the current implementation, libmdnresolv does not call the MDN library (libmdn) but holds libmdn itself internally. This is for convenience in implementation, but logically, the MDN library function is being called. -
      - -

      ‚Ü‚½Žg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚ÌÝ’è‚Í -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÌÝ’è‚ð -—˜—p‚µ‚Ü‚·B -

      Also, use "setup"in client configuration filefor encoding or normalization setup. - -

      §ŒÀ

      -

      Restrictions

      - -

      runmdn ‚ɂ͂¢‚­‚‚©‚̧ŒÀ‚ª‚ ‚èA‚Ç‚ñ‚ȃVƒXƒeƒ€‚Å‚àŽg‚¦‚é‚킯‚Å‚Í -‚ ‚è‚Ü‚¹‚ñB -

      There are certain restrictions on runmdn and it cannot be used in every system. -

        -
      • runmdn ‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—p‚¢‚Ä‚¢‚é‚Ì‚ÅA -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªŽg—p‚Å‚«‚éƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • Since runmdn uses the dynamic link mechanism of the shared library, the system must be able to use the shared library. -
      • ‚Ü‚½ŠÂ‹«•Ï” LD_PRELOAD ‚Ü‚½‚Í—ÞŽ—‚Ì‹@\‚É‚æ‚é -ƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\‚ðŽ‚ÂƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • Also, the system must have a library pre-load function using the LD_PRELOAD environmental variable or similar mechanism. -
      • runmdn ‚Ì‘ÎۂƂȂéƒRƒ}ƒ“ƒh‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðƒXƒ^ƒeƒBƒbƒNƒŠƒ“ƒN -‚µ‚Ä‚¢‚Ă͂Ȃè‚Ü‚¹‚ñB -
      • The target commands of runmdn must not statically link the resolver library. -
      • ƒVƒXƒeƒ€‚̃‰ƒCƒuƒ‰ƒŠ‚ª iconv() ŠÖ”‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚È‚¢ê‡AŠO•”‚Ì -ƒ‰ƒCƒuƒ‰ƒŠ‚ð—p‚¢‚邱‚ƂɂȂè‚Ü‚·‚ªA‚»‚̃‰ƒCƒuƒ‰ƒŠ‚à‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Å -‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • When the system's library does not provide an iconv() function, an external library is used. This library must be a shared library. -
      • ƒVƒXƒeƒ€‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Í BIND4 ‚ ‚é‚¢‚Í BIND8 ƒx[ƒX‚Ì‚à‚̂łȂ¯‚ê‚Î -‚È‚è‚Ü‚¹‚ñB -
      • System's resolver library must be BIND4 or BIND8 based. -
      • ƒZƒLƒ…ƒŠƒeƒBã‚Ì——R‚©‚çˆê”Ê‚É setuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚̓vƒŠƒ[ƒh‹@”\‚ª -Žg‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅAsetuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚Å‚ ‚Á‚Ă͂Ȃè‚Ü‚¹‚ñB -
      • For security reasons, generally speaking setuid commands cannot use a pre-load function, therefore, the command must not be setuid. -
      - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/spec.html b/contrib/idn/mdnkit/doc/en/spec/spec.html deleted file mode 100644 index 971abfac6d..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/spec.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - -mDNkit specification - - - - - -

      mDNkit Žd—l‘

      -

      mDNkit Specifications

      - - - -
      - -

      ‘S‘Ì\¬

      -

      Overall Structure

      - -

      ƒLƒbƒg‚ð\¬‚·‚éƒRƒ“ƒ|[ƒlƒ“ƒg

      -

      Kit Components

      - -

      mDNkit ‚ÍŽŸ‚̂悤‚ȃRƒ“ƒ|[ƒlƒ“ƒg‚©‚ç\¬‚³‚ê‚Ü‚·B -

      The mDNkit is comprised of the following components. - -

        -
      • dnsproxy
        - DNS ƒT[ƒo‚̃vƒƒLƒVƒT[ƒo‚Æ‚µ‚Ä“®ì‚µAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì DNS - ƒƒbƒZ[ƒW‚ð DNS ƒT[ƒo‚É’†Œp‚µA‚Ü‚½ DNS ƒT[ƒo‚©‚ç•Ô‚³‚ê‚é - DNS ƒƒbƒZ[ƒW‚ðƒNƒ‰ƒCƒAƒ“ƒg‚É’†Œp‚µ‚Ü‚·B
        - Operating as a proxy server for the DNS server, this command relays DNS messages from the client to the DNS server and relays DNS messages returned from the DNS server to the client.
        - ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ DNS ƒƒbƒZ[ƒW‚𒆌p‚·‚éÛ‚É‚ÍA - ƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðAƒNƒ‰ƒCƒAƒ“ƒg‚ÌŽg—p‚·‚é - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA‘½Œ¾Œê‰»‚³‚ꂽ DNS ƒT[ƒo‚ÌŽg—p‚·‚é - DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚邯‚Æ‚à‚É - ³‹K‰»‚â ZLD ‚Ìœ‹ŽE•t‰Á‚ðs‚¢‚Ü‚·B
        - When DNS messages sent from the client are relayed, the domain name in the message is converted from the local encoding used by the client to the DNS protocol encoding used by the multilingualized DNS server and normalization or deletion/addition of ZLD is also performed.
        - ‚Ü‚½ DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽ DNS ƒƒbƒZ[ƒW‚𒆌p‚·‚éÛ‚É‚ÍA - ƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðADNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA“¯Žž‚É ZLD ‚Ìœ‹ŽE•t‰Á‚ðs‚¢‚Ü‚·B
        - In addition, when a DNS message returned from the DNS server is relayed, the domain name in the message is converted from the DNS protocol encoding to the local encoding, and at the same time ZLD is deleted/added.
        -

        -

      • mdnconv
        - ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚â named.conf ƒtƒ@ƒCƒ‹‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO - •ÏŠ·—pƒc[ƒ‹‚Å‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽ‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚ðA - ‘½Œ¾Œê‰»‚³‚ꂽ DNS ƒT[ƒo‚ªŽg—p‚·‚éDNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µA“¯Žž‚ɳ‹K‰»‚às‚¢‚Ü‚·B -

        This is an encoding conversion tool for zone master files or named.conf files. These locally-encoded files are converted to the DNS protocol encoding used by the multilingualized DNS server, and normalization is performed at the same time. -

        -

      • BIND-9 ƒpƒbƒ`
        -
      • BIND-9 Patch
        - BIND-9 ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃pƒbƒ`‚Å‚·B - ‚±‚̃pƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èABIND-9 ‚ÌƒŠƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ª•t‰Á‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚è - dnsproxy ‚ðŽg—p‚·‚邱‚ƂȂ­A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B - ‚Ü‚½ dig “™‚̃c[ƒ‹‚Å‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -

        This patch adds to BIND-9 the ability to support multilingual domain names. - This patch adds encoding conversion of multilingual domain names and normalization functions to the BIND-9 resolver. Because of this, multilingual domain names will be supported without using dnsproxy. - Also, tools such as dig will be able to support multgilingual domain names. -

        -

      • runmdn
        - BIND-4 ‚ ‚é‚¢‚Í BIND-8 ƒx[ƒX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ðăRƒ“ƒpƒCƒ‹‚·‚邱‚ƂȂµ‚É - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽÀsŽž‚É MDN ƒ‰ƒCƒuƒ‰ƒŠ‚ð“®“I‚ÉƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚è - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚Ä‚¢‚郊ƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ª•t‰Á‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚è - dnsproxy ‚ðŽg—p‚·‚邱‚ƂȂ­A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -

        This command allows support of multilingual domain names in BIND-4 or BIND-8 based applications, without re-compiling. - By dynamically linking the MDN library when the application is executed, encoding conversion of multilingual domain names and normalization functions are added to the resolver linked to the application. Because of this, multilingual domain names can be handled without using dnsproxy. -

        -

      • mDN Wrapper
        - Windows ƒx[ƒX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚ß‚ÌA - WINSOCK ‚ɑ΂·‚éWrapper DLL ‚Å‚·B - ’ÊíAWindowsƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÍWINSOCK ‚É‚æ‚Á‚ăhƒƒCƒ“–¼‚ð‰ðŒˆ‚µ‚Ü‚·B - mDN Wrapper ‚ÍAWINSOCK ‚̌ĂÑo‚µ‚ðƒtƒbƒN‚µ‚ÄA - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ⳋK‰»‚ðs‚È‚¢‚Ü‚·B - “¯‚¶‚悤‚È‚±‚Æ‚Ídnsproxy‚Å‚à‚Å‚«‚Ü‚·‚ªA - mDN Wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍA - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“–ˆ‚ɈقȂÁ‚½ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽó•t‚¯‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

        This is a Wrapper DLL for WINSOCK that allows Windows-based applications to support multilingual domain names. - Usually, Windows applications resolve domain names with WINSOCK. - mDN Wrapper intercepts the WINSOCK call and performs encoding conversion and normalization of multilingual domain names. - The same thing can be done with dnsproxy; however, when mDN Wrapper is used different local encoding used by applications can be accepted. -

        -

      • MDN ƒ‰ƒCƒuƒ‰ƒŠ
        -
      • MDN library
        - ã‹L‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚ªŽg—p‚·‚郉ƒCƒuƒ‰ƒŠ‚Å‚·B‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ϊ·‚É - ŠÖ‚í‚é -

        This library is used by the above components, and provides the following multilingual domain name-related functions. -

          -
        • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ· -
        • Encoding conversion -
        • •¶Žš—ñ‚̳‹K‰» -
        • Normalization of text string -
        • DNS ƒƒbƒZ[ƒW‚̉ð͂Ƒg‚Ý—§‚Ä -
        • Analysis and assembly of DNS messages -
        • ZLD ‚ÌíœA’ljÁ -
        • Deletion and addition of ZLD -
        - ‚Æ‚¢‚¤‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

        -

      • 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`
        -
      • 8-bit through patch
        - dnsproxy ‚ð—p‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»“™‚ð - s‚¤ê‡ADNS ƒT[ƒo‚⃊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ɂ͂±‚ê‚ç‚Ì‹@”\‚Í•K—v‚ ‚è‚Ü‚¹‚ñB - ‚½‚¾‚µ DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä - UTF-8 “™‚Ì 8 ƒrƒbƒgƒR[ƒh‚ðŽg—p‚·‚éê‡A - ]—ˆ‚Ì DNS ƒT[ƒo‚ÍŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚¸A8ƒrƒbƒgƒR[ƒh‚ðƒGƒ‰[‚É‚¹‚¸‚É - ’Ê‚·‚悤‚ȉü‘¢‚ª•K—v‚Å‚·B
        - When dnsproxy is used to convert multilingual domain name encoding or perform normalization, these functions are not required in the DNS server or resolver library. - However, when 8-bit code such as UTF-8 is used for DNS protocol encoding, the conventional DNS server cannot be used and modification must be performed so that 8-bit code can be passed without error.
        - ‚Ü‚½ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª SJIS “™‚Ì 8 ƒrƒbƒgƒR[ƒh‚ðŽg—p‚·‚éê‡A - ‚â‚͂胊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚É‚à 8 ƒrƒbƒgƒR[ƒh‚ð‚»‚Ì‚Ü‚Ü’Ê‚µA - ƒGƒ‰[‚É‚µ‚È‚¢‚悤‚É‚·‚邽‚߂̉ü‘¢‚ª•K—v‚Å‚·B
        - When the local encoding uses 8-bit code such as SJIS, the resolver library also must be modified so that 8-bit code can be passed without error.
        - ‚³‚ç‚ɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì’†‚É‚ÍA“ÆŽ©‚ɃhƒƒCƒ“–¼‚ÌŒŸ¸‚ðs‚¢A - 8 ƒrƒbƒgƒR[ƒh‚ð’Ê‚³‚È‚¢‚à‚Ì‚ª‚ ‚è‚Ü‚·B
        - Furthermore, some applications check domain names themselves and do not pass 8-bit code.
        - ‚±‚Ì‚½‚ßA–{ƒLƒbƒg‚Å‚Í -
        For this reason, this kit provides the following patches: -
          -
        • BIND-8 ‚̃l[ƒ€ƒT[ƒoAƒŠƒ]ƒ‹ƒo‚ð 8 ƒrƒbƒgƒXƒ‹[‚É‚·‚邽‚߂̃pƒbƒ` -
        • Patch that makes the BIND-8 name server and resolver 8-bit through -
        • Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚Ì URL ‰ðÍ•”•ª‚ð 8 ƒrƒbƒgƒXƒ‹[ - ‚É‚·‚邽‚߂̃pƒbƒ` -
        • Patch that makes the URL analysis part of Squid 8-bit through (Squid is a Web cache server) -
        - ‚ð’ñ‹Ÿ‚µ‚Ü‚·B
        - ‚±‚ê‚ç‚Ì 8 ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚ÉŠÖ‚µ‚Ă͓Á‚ÉŽd—l‚Ì‹Lq‚Ís‚¢‚Ü‚¹‚ñB -
        - The specifications of these 8-bit through patches are not discussed here. -
      - -

      ƒRƒ“ƒ|[ƒlƒ“ƒg\¬}

      -

      Component Diagram

      - -

      ŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚ª‚Ç‚±‚łǂ̂悤‚ÉŽg‚í‚ê‚é‚Ì‚©‚ðŽ¦‚µ‚½‚Ì‚ªŽŸ‚Ì2–‡‚Ì}‚Å‚·B -

      The following two diagrams illustrate how and where each component is used. - -

      1–‡–Ú‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð dnsproxy ‚ð—˜—p‚µ‚Äs‚¤ê‡‚Ì\¬}‚Å‚·B -

      The first diagram depicts multilingual domain name processing using dnsproxy. -

      -

      -mDNkit components #1 -
      - -

      2–‡–Ú‚Í dnsproxy ‚ðŽg—p‚¹‚¸AƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌƒŠƒ]ƒ‹ƒo‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‚ðs‚¤ê‡‚Ì\¬}‚Å‚·B -

      The second diagram depicts multilingual domain name processing using the client side resolver without using dnsproxy. -

      -

      -mDNkit components #2 -
      - -

      }’†AƒCƒ^ƒŠƒbƒN‘̂̕”•ª‚ª–{ƒLƒbƒg‚Ɋ܂܂ê‚éƒRƒ“ƒ|[ƒlƒ“ƒg‚Å‚·B -

      In the diagrams, the italicized parts are compoments included in the kit. - -

      }‚Ì㔼•ª‚Í SJIS ‚È‚ÇAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‚³‚ê‚é -¢ŠE‚ÅA‰º”¼•ª‚ª UTF-8 ‚È‚ÇA‘½Œ¾Œê‰»‚³‚ꂽ DNS ‚ªŽg—p‚·‚é -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‚³‚ê‚颊E‚Å‚·B -–{ƒLƒbƒg‚ª’ñ‹Ÿ‚·‚éƒRƒ“ƒ|[ƒlƒ“ƒg‚Í‚±‚ê‚ç‚Ì¢ŠE‚ð‚‚Ȃ®‚½‚߂̂à‚̂ł·B -

      Local encoding such as SJIS is used in the upper half of the diagram, and multilingual DNS protocal encoding such as UTF-8 is used in the lower half of the diagram. -The components provided by this kit serve as a bridge between these two worlds. - - - diff --git a/contrib/idn/mdnkit/doc/en/spec/wrapper.html b/contrib/idn/mdnkit/doc/en/spec/wrapper.html deleted file mode 100644 index f67ce750ad..0000000000 --- a/contrib/idn/mdnkit/doc/en/spec/wrapper.html +++ /dev/null @@ -1,728 +0,0 @@ - - - - - -mDN Wrapper - Program Specification - - - - -

      mDN Wrapper

      - -

       

      - -

      ŽÀŒ»•û–@ - Wrapper DLL

      -

      Implementation Method - Wrapper DLL

      -

      -ƒ‰ƒbƒp[DLL ‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÆŒ³‚ÌDLL ‚Ƃ̊ԂɊ„‚èž‚ñ‚ÅA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚ð‰¡Žæ‚肵‚ÄA -–{—ˆ‚ÌDLL ‚Ƃ͈قȂÁ‚½ˆ—‚ð‚³‚¹‚é‚à‚̂ł·B -

      -Positioned between the application and the original DLL, the wrapper DLL hooks the application DLL call and operates different processing than that in the original DLL. -

      -how wrapper DLL works -
      -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚̓‰ƒbƒp[‚É“n‚³‚ê‚Ü‚·B -ƒ‰ƒbƒp[‚Í‚»‚±‚ÅA•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄA -Œ³‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño‚µ‚Ü‚·B -‚Ü‚½AŒ³‚ÌDLL ‚̈—Œ‹‰Ê‚͈ê’Uƒ‰ƒbƒp[‚ɕԂ³‚êA -‚±‚±‚Å‚à•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄA -ÅI“I‚ÈŒ‹‰Ê‚ªƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɕԂ³‚ê‚邱‚ƂɂȂè‚Ü‚·B -

      -The application DLL call is passed to the wrapper. -The wrapper performs additional processing and calls the original DLL entry. -Next, the processing result of the original DLL is returned to the wrapper and the wrapper again performs additional processing, then the final result is returned to the application. -

      -mDN wrapper ‚Å‚ÍAWINSOCK DLL‚Ì -

      - - - -
      WSOCK32.DLLWINSOCK V1.1
      WS2_32.DLL WINSOCK V2.0
      -
      -‚ɑ΂·‚郉ƒbƒp[DLL ‚ð’ñ‹Ÿ‚µ‚ÄA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ‚ª‚Å‚«‚邿‚¤‚É‚µ‚Ü‚·B -

      -With mDN Wrapper, to provide name resolution of multilingual domain names, a wrapper DLL is provided for the following WINSOCK DLLs: - -

      - - - -
      WSOCK32.DLLWINSOCK V1.1
      WS2_32.DLL WINSOCK V2.0
      -
      -
      - - - -
      : - 16ƒrƒbƒg”Å‚ÌWINSOCK (WINSOCK.DLL) ‚Í‘ÎÛŠO‚Å‚·B -
      - - - -
      Note: - The 16-bit version of WINSOCK (WINSOCK.DLL) is not supported. -
      -
      -

      -

      ˆ—‘ÎÛ‚ÌAPI

      -

      APIs Subject to Processing

      -

      -mDN Wrapper ‚ÍWINSOCK ‚Ì–¼‘O‰ðŒˆ‚ÉŠÖ˜A‚µ‚½API ‚ɂ‚¢‚Ä‚Ì‚Ý -•t‰Á“I‚Ȉ—‚ðs‚È‚¢‚Ü‚·B -ˆ—‚Ì‘ÎۂƂȂéWINSOCK API‚͈ȉº‚Ì‚à‚̂ł·B -

      -mDN Wrapper performs additional processing on only those APIs that are associated with WINSOCK name resolution. -The following WINSOCK APIs are subject to processing. -

      -
      WINSOCK 1.1, WINSOCK 2.0 ‚Ì—¼•û‚É‚ ‚é‚à‚Ì -
      When both the WINSOCK 1.1 and WINSOCK 2.0 APIs exist: -
      - - - - - -
      gethostbyaddr
      gethostbyname
      WSAAsyncGetHostByAddr
      WSAAsyncGetHostByName
      -

      -

      WINSOCK 2.0 ‚¾‚¯‚É‚ ‚é‚à‚Ì -
      When only the WINSOCK 2.0 API exists: -
      - - - - -
      WSALookupServiceBeginA
      WSALookupServiceNextA
      WSALookupServiceEnd
      -
      -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA -‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚œƎ©‚ɃhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ðs‚È‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAnslookup‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚ÅA -“à•”‚œƎ©‚ÉDNS ƒŠƒNƒGƒXƒg‚̶¬A‰ðŽß‚ðs‚È‚Á‚Ä‚¢‚Ü‚·B -“–‘R‚Ì‚±‚ƂȂª‚çA‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍA -mDN Wrapper ‚ł͑½Œ¾Œê‰»‘Ήž‚³‚¹‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB -

      -Some applications independently resolve domain names without using these APIs. -For example, nslookup internally generates and interprets DNS requests independently. Naturally, mDN Wrapper does not provide multilingual domain name support to these applications. -

      - - - - - - - - - -
      : - dnsproxy‚̓lƒbƒgƒ[ƒNã‚ÅDNS ‚ÌƒŠƒNƒGƒXƒgA - ƒŒƒXƒ|ƒ“ƒX‚ɂ‚¢‚Ä‘½Œ¾Œê‰»‚µ‚Ü‚·‚Ì‚ÅA - ‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚à‘½Œ¾Œê‰»‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - •K—v‚ɉž‚¶‚Ä“KŽžŽg‚¢•ª‚¯‚邯‚¢‚¢‚Å‚µ‚傤B -
      Note: - dnsproxy makes DNS request/response multilingual on the network and also can make these applications multilingual. - It is recommended they be used as needed. -
      : - WINSOCK 2.0 ‚É‚ÍAWIDE CHARACTER ƒx[ƒX‚Ì–¼‘O‰ðŒˆ‚ÌAPI ‚Æ‚µ‚Ä - - - -
      WSALookupServiceBeginW
      WSALookupServiceNextW
      - ‚à‚ ‚è‚Ü‚·‚ªA‚±‚ê‚ç‚ɂ‚¢‚Ă̓‰ƒbƒv‚µ‚Ü‚¹‚ñB - ‚±‚ê‚ç‚ÌAPI ‚̓}ƒCƒNƒƒ\ƒtƒgŽd—l‚É‚æ‚é‘Û‰»‚ɑΉž‚µ‚½‚à‚̂ł·‚©‚çA - ‚»‚̃tƒŒ[ƒ€ƒ[ƒNã‚ÅŽg‚¤‚ׂ«‚à‚̂ł·B - ‚±‚ê‚ç‚ɂ‚¢‚Ä‚ÍmDN Kit ‚É‚æ‚Á‚Ä‘¼‚Ì‘½Œ¾ŒêƒtƒŒ[ƒ€ƒ[ƒN‚É - •ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚̂͊댯‚ł͂Ȃ¢‚©A‚Æ”»’f‚µ‚Ü‚µ‚½B -
      Note: - WINSOCK 2.0 has the following APIs for WIDE CHARACTER based name resolution. - - - -
      WSALookupServiceBeginW
      WSALookupServiceNextW
      - However, these are not wrapped. - These APIs are internationalized for Microsoft specifications and therefore should be used within that framework. - We determined that it is dangerous to use mDN Kit to convert these APIs to another multilingual framework. -
      -
      -

      -

      ˆ—‘ÎÛŠO‚ÌAPI

      -

      APIs Not Subject to Processing

      -

      -ã‹LˆÈŠO‚ÌWINSOCK API ‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚Í‚È‚É‚à‚µ‚È‚¢‚ÅA -Œ³‚ÌWINSOCK API ‚ðŒÄ‚Ño‚µ‚Ü‚·B -WINSOCK DLL ‚ɂ̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚È‚¢ƒGƒ“ƒgƒŠ‚àŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -‚»‚ê‚ç‚̃Gƒ“ƒgƒŠ‚ɂ‚¢‚Ä‚ÍAŒÄ‚Ño‚µƒpƒ‰ƒƒ^“™‚ª”»‚ç‚È‚¢‚Ì‚ÅA -ƒ‰ƒbƒp[“à‚̃R[ƒh‚©‚猳‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño‚·‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB -‚»‚±‚ÅAmDN Wrapper ‚Íã‹LˆÈŠO‚̃Gƒ“ƒgƒŠ‚ɂ‚¢‚Ä‚ÍA -function forwarding ‚É‚æ‚Á‚ÄA -DLL ‚̌ĂÑo‚µ‚ªŒ³‚ÌDLL ‚ɃtƒHƒ[ƒh‚³‚ê‚邿‚¤‚É‚µ‚Ä‚¢‚Ü‚·B -

      -Regarding WINSOCK APIs other than those above, mDN Wrapper does not do anything and calls the original WINSOCK API. -WINSOCK DLL includes entries that are not documented. -Regarding those entries, since call parameters, etc. are not known, it is not possible to call the original DLL entries using codes inside the wrapper. -Therefore, for the entries other than the above, mDN Wrapper uses 'function forwarding' to forward calling of a DLL to the original DLL. -

      -'function forwarding' ‚ðŽg‚¤ê‡‚É‚ÍA -ƒ‰ƒbƒp[DLL 쬎ž‚ɃtƒHƒ[ƒhæ‚ÌDLL –¼‚𖾎¦“I‚ÉŽw’è‚·‚é•K—v‚ª‚ ‚èA -‚»‚ÌDLL –¼‚̓‰ƒbƒp[Ž©g‚Ƃ͕ʂ̖¼‘OA -‚·‚Ȃ킿Œ³‚ÌDLL ‚Æ‚à•ʂ̖¼‘OA‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -mDN wrapper ‚Å‚ÍAŒ³‚ÌWINSOCK DLL ‚𖼑O‚ð•Ï‚¦‚ăRƒs[‚µA -‚»‚ê‚ðƒtƒHƒ[ƒhæ‚ÌDLL ‚Æ‚µ‚ÄŽg—p‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      -When 'function forwarding' is used, it is necessary to explicitly specify the forward destination DLL name when the wrapper DLL is created. The DLL name must be different from the wrapper itself, that is, a different name that the original DLL. mDN wrapper copies the original WINSOCK DLL as a different name and uses it as the forward destination DLL. -

      - - - -
      wsock32.dll->wsock32o.dll
      ws2_32.dll ->ws2_32o.dll
      -
      -

      -ƒ‰ƒbƒp[DLL ‚ÍŒ³‚ÌWINSOCK DLL ‚Æ“¯‚¶–¼‘O‚Å쬂³‚ê‚Ü‚·B -]‚Á‚ÄmDN wrapper ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ꂽó‘Ô‚Å‚ÍA -

      -A wrapper DLL is created with the same name as the original WINSOCK DLL. -Therefore, when mDN Wrapper has been installed, their names are as follows: -

      - - - - - -
      wsock32.dll mDN Wrapper for WINSOCK V1.1
      ws2_32.dll mDN Wrapper for WINSOCK V2.0
      wsock32o.dllOriginal WINSOCK V1.1 DLL
      ws2_32o.dll Original WINSOCK V2.0 DLL
      -
      -‚ƂȂè‚Ü‚·B -

      -

      ”ñ“¯Šú API

      -

      Asynchronous API

      -

      -ƒhƒƒCƒ“–¼‚̕ϊ·‚ÍAˆÈ‰º‚̃^ƒCƒ~ƒ“ƒO‚Ås‚È‚í‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -Conversion of domain names must be carried out in the following sequence: -

      -

      -
      -
      DNS ‚Ö‚ÌƒŠƒNƒGƒXƒgŽž -
      When request is sent to DNS -
      - - - -
      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO->DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO
      Local encoding->DNS encoding
      -
      DNS ‚©‚ç‚̉ž“šŽóMŽž -
      When response is received from DNS -
      - - - -
      DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO->ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO
      DNS encoding->local encoding
      -
      -
      -

      -“¯ŠúAPI ‚É‚¨‚¢‚Ä‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍA -Œ³‚ÌAPI ‚ðŒÄ‚Ño‚·‘O‚És‚í‚êA -DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍA -Œ³‚ÌAPI ‚©‚畜‹A‚µ‚Ä‚«‚½‚Æ‚±‚ë‚Ås‚È‚í‚ê‚Ü‚·B -

      -With synchronous API, conversion from local encoding to DNS encoding is performed before the original API is called and conversion from DNS encoding to local encoding is performed when control is returned from the original API. -

      -‚µ‚©‚µAWINSOCK ‚̈ȉº‚ÌAPI ‚Í”ñ“¯ŠúAPI ‚ÅA -DNS ‚©‚ç‚̉ž“šŽóM‘O‚É•œ‹A‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B -

      -However, the following WINSOCKs are asynchronous APIs and control is returned before response is received from the DNS. -

      -
      -
      WSAAsyncGetHostByAddr -
      WSAAsyncGetHostByName -
      -
      -

      -‚±‚ê‚ç‚ÌAPI ‚É‚¨‚¢‚Ä‚ÍA–¼‘O‰ðŒˆ‚ÌŠ®—¹‚ÍA -Windows ‚ւ̃ƒbƒZ[ƒW‚É‚æ‚Á‚Ä’Ê’m‚³‚ê‚Ü‚·B -‚±‚Ì‚½‚ßA -DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ðs‚È‚¤‚É‚ÍA -ƒ‰ƒbƒp[‚Í’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒ‚̃ƒbƒZ[ƒWƒLƒ…[‚ðƒtƒbƒN‚µ‚ÄA -‚±‚ÌŠ®—¹ƒƒbƒZ[ƒW‚ð•ߊl‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -With those APIs, the completion of name resolution is notified via the message to Windows. For that reason, in order to convert from DNS encoding to local encoding, the wrapper needs to hook the message queue of the window procedure to which notification is sent and capture the completion message. -

      -‚»‚±‚ÅA”ñ“¯ŠúAPI ‚ªŒÄ‚Ño‚³‚ꂽꇂɂÍAmDN Wrapper ‚ÍA -’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒi‚±‚ê‚ÍAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚É -ƒtƒbƒN‚ðݒ肵‚Ü‚·B -ƒtƒbƒN‚ªŠ®—¹ƒƒbƒZ[ƒWi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ðŒŸo‚µ‚½‚È‚çA -ƒtƒbƒN‚ÍŒ‹‰Ê‚ÌŠi”[—̈æi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ä‚¢‚Ü‚·j‚̃hƒƒCƒ“–¼‚ðA -DNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      -Therefore, when an asynchronous API is called, mDN Wrapper sets the hook (this is specified by the parameter of the API) to the window procedure to which notification is sent. -When the hook detects the completion message (this is also specified by the parameter of the API), the hook converts the domain name in the storage area of the result (this is also specified by the paramter of the API) from the DNS side encoding to local encoding. -

      -

      Wrapper DLL ‚̃Cƒ“ƒXƒg[ƒ‹

      -

      Installing Wrapper DLL

      -

      -WINSOCK DLL ‚ÍWindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É’u‚©‚ê‚Ä‚¢‚Ü‚·B -WINSOCK ‚ðŠmŽÀ‚Ƀ‰ƒbƒv‚·‚é‚É‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É‚¨‚¢‚Ä -

      -The WINSOCK DLL is placed in the system directory of the Windows. -To surely wrap WINSOCK, the following need to be performed in the system directory; -

      -
      -
      ƒIƒŠƒWƒiƒ‹WINSOCK DLL ‚Ì–¼‘O‚Ì•ÏX -
      Change the names of original WINSOCK DLLs: -
      -
      -ren wsock32.dll wsock32o.dll
      -ren ws2_32.dll  ws2_32o.dll
      -
      -
      ƒ‰ƒbƒp[DLL ‚Ì“±“ü -
      Copy Wrapper DLLs: -
      -
      	
      -copy somewhere\wsock32.dll wsock32.dll
      -copy somewhere\ws2_32.dll  ws2_32.dll
      -copy another DLLs also
      -
      -
      -
      -‚ðs‚È‚¤•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚µ‚©‚µAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚Å‚±‚̂悤‚ÈDLL ‚Ì’u‚«Š·‚¦‚ðs‚È‚¤‚Ì‚Í -‘å•ϊ댯‚È‘€ì‚ɂȂè‚Ü‚·B -

      -However, this kind of replacement of DLLs in the system directory is a very dangerous operation. -

      - - - - - -
      a) - DLL ‚ð“ü‚ê‘Ö‚¦‚½ó‘Ô‚ÅA‚à‚¤‚¢‚¿‚Ç“¯‚¶‘€ì‚ðs‚È‚¤‚ÆA - ƒIƒŠƒWƒiƒ‹‚ÌWINSOCK DLL ‚ªŽ¸‚í‚ê‚Ä‚µ‚Ü‚¤‚±‚ƂɂȂè‚Ü‚·B -
      Once the DLL is replaced, if the same operation is repeated again, the original WINSOCK DLL will be lost. -
      b) - ƒT[ƒrƒXƒpƒbƒN‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ȂǂÅA - WINSOCK DLL ‚ðÄ“±“ü‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA - ‚±‚ê‚É‚æ‚Á‚Ä‚àWINSOCK ‚ª—˜—p•s”\‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·B -
      Some service packs and applications re-introduce WINSOCK DLLs. This may also disable WINSOCK. -
      -
      -

      -‚±‚̂悤‚Èó‘Ô‚É‚È‚é‚ÆAƒlƒbƒgƒ[ƒN‹@”\‚ª‘S‚­Žg‚¦‚È‚­‚È‚Á‚½‚èA -ň«‚ÍWindows ‚Ì‹N“®‚·‚ç‚Å‚«‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -

      -When such status occurs, it is possible that the entire network function will become disabled, or, in the worst case, Windows will not boot. -

      -‚»‚±‚ÅAmDN Wrapper ‚Å‚ÍAã‚̂悤‚ȃVƒXƒeƒ€ƒŒƒxƒ‹‚̃‰ƒbƒv‚ł͂Ȃ­A -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɑ΂·‚郉ƒbƒv‚ðŠî–{‹@”\‚Æ‚µ‚Ä’ñ‹Ÿ‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      -Therefore, mDN Wrapper shall provide application wrapping as a basic function, not at the system level. -

      -Windows ‚É‚¨‚¢‚ÄADLL ‚ÍAŠî–{“I‚É‚Í -

      -Basically, in Windows, DLLs are searched in the following order: -

      - - - - - - - - - -
      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ
      Load directory of application
      %SystemRoot%\System32
      %SystemRoot%\System32
      %SystemRoot%
      %SystemRoot%
      PATH ‚ÅŽwަ‚³‚ê‚éƒfƒBƒŒƒNƒgƒŠ
      Directory specified by PATH
      -
      -

      -‚̇˜‚ÅŒŸõ‚³‚ê‚ÄAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚Ì‚ªƒ[ƒh‚³‚ê‚Ü‚·B -‚Å‚·‚©‚çAˆê”Ê“I‚É‚ÍA -DLL ‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚ê‚ÎA -‚»‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌWINSOCK ‚̌ĂÑo‚µ‚ðƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -and the first one found is loaded. -Because of that, in general, installing the DLL in the load directory of the application enables calling of WINSOCK from the application to be wrapped. -

      -‚½‚¾‚µA‚¢‚­‚‚©‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚Å‚ÍA -ŒŸõƒpƒX‚ðŒo—R‚¹‚¸‚É“Á’è‚ÌDLL ‚ðƒŠƒ“ƒN‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚±‚̂悤‚È\¬‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚ªŽg‚í‚ê‚½ê‡‚É‚Í -mDN Wrapper ‚ł͑Έ‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB -

      -However, some applications and DLLs have a specific DLL linked without going through the search path. mDN Wrapper cannot handle this structure of application or DLL. -

      - - - - - -
      : - Netscape‚Í“Á’èDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚ÅA - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ł̓‰ƒbƒv‚Å‚«‚Ü‚¹‚ñB - WINSOCK DLL Ž©‘Ì‚àƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌŠÖ˜ADLL ‚É - ƒoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚Å‚·B - ˆê•ûAInternet Explore‚âWindows Media Player‚Í - •W€‚̃T[ƒ`ƒpƒX‚É]‚Á‚Ä‚¢‚é‚Ì‚ÅA - ƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -
      Note: - Netscape seems to be bound to a specific DLL and wrap cannot be performed by installing the wrapper DLL in the application directory. - WINSOCK DLL itself seems to be bound to the related DLL of the system directory. - On the other hand, because Internet Explorer and Windows Media Player follow the standard search path, wrap can be performed. -
      -
      -

      -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ˆÊ’u

      -

      Location of Encoding Conversion

      -

      -WINSOCK 2.0 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚éWindows ‚É‚ÍA -WINSOCK ‚Ì1.1 ‚Æ2.0 ‚Ì‚»‚ꂼ‚ê‚ɑΉž‚·‚éDLL ‚ª‚ ‚èA -WINSOCK 1.1 ‚ÌAPI ‚̌ĂÑo‚µ‚Í -2.0 ‚Ì“¯‚¶ƒGƒ“ƒgƒŠ‚ÉƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -

      -Versions of windows that support WINSOCK 2.0 have DLLs that correspond to WINSOCK 1.1 and 2.0, respectively. Calling of the WINSOCK 1.1 API is re-directed to the same entry for 2.0. -

      -calling winsock2.0 through winsock1.1 -
      -

      -‚±‚ÌꇂɂÍ1.1 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚à2.0 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚àA -‚Æ‚à‚ÉV2.0—p‚ÌDLL ‚É“n‚³‚ê‚é‚Ì‚ÅA -2.0—p‚̃‰ƒbƒp[DLL ‘¤‚¾‚¯‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ðs‚È‚¤‚悤‚É‚·‚é‚ׂ«‚Å‚µ‚傤B -

      -In this case, calling of 1.1 and 2.0 are both passed to the DLL of V2.0. Therefore, conversion of encoding should be performed at the wrapper DLL side of 2.0 only. -

      -ˆê•ûAWINSOCK 1.1 ‚µ‚©ƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡(Win95)‚É‚ÍA -1.1 ‚ɑΉž‚µ‚½DLL ‚µ‚©‚ ‚è‚Ü‚¹‚ñB -

      -On the other hand, when only WINSOCK 1.1 is supported (Win95), there is only a DLL that corresponds to 1.1. -

      -calling only winsock1.1 -
      -

      -‚±‚Ìꇂɂ͕K‘R“I‚É1.1 —p‚̃‰ƒbƒp[DLL ‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      -In that case, naturally the wrapper DLL for 1.1 is used for encoding conversion. -

      -mDN Wrapepr ‚ªwindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂÍA -ã‚Ì’Ê‚è‚É“®ì‚·‚é‚Ì‚ÅA -

      -When mDN Wrapper is installed in the Windows system directory, the operation is as shown above, therefore, conversion must be performed as follows. -

      - - - - - -
      WINSOCK 2.0 ‚ ‚è2.0 ƒ‰ƒbƒp[‚ŕϊ·
      WINSOCK 2.0 exists2.0 wrapper is used for conversion
      WINSOCK 1.1 ‚Ì‚Ý1.1 ƒ‰ƒbƒp[‚ŕϊ·
      WINSOCK 1.1 only1.1 wrapper is used for conversion
      -
      -‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚µ‚©‚µA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂ͓®ì‚ª•Ï‚í‚Á‚Ä‚«‚Ü‚·B -Windows •t‘®‚Ì WINSOCK 1.1 DLL‚ÍA -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌWINSOCK 2.0 ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邽‚ßA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‘¤‚ÌWINSOCK 2.0 ƒ‰ƒbƒp[DLL ‚É‚Í -ƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚Ä‚«‚Ü‚¹‚ñB -‚±‚Ì‚½‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚É‚¨‚¢‚Ä‚ÍA -1.1DLLA2.0DLL‚Ì—¼•û‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -However, when the wrapper DLL is installed in the application directory, the operation is different. -Since WINSOCK 1.1 DLL attached to the Windows is bound to WINSOCK2.0 located in the system directory, calling of the WINSOCK 1.1 API is not re-directed to the WINSOCK2.0 wrapper DLL at the application directory side. -For that reason, when the wrapper DLL is installed in the application directory, it is necessary to convert encoding for both the 1.1 and 2.0 DLL. -

      -‚±‚̂悤‚ÈDLL ŠÔ‚̃oƒCƒ“ƒfƒBƒ“ƒO‚̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚ÅA -ŠÂ‹«Aƒo[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă͈قȂÁ‚½“®ì‚ð‚·‚é‚©‚à’m‚ê‚Ü‚¹‚ñB -‚»‚±‚ÅmDN Wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ’l‚É‚æ‚Á‚ÄA -ƒ‰ƒbƒp[DLL ‚̂ǂ±‚ŕϊ·‚ðs‚È‚¤‚©‚ðŒˆ’è‚·‚邿‚¤‚É‚µ‚ÄA -ƒCƒ“ƒXƒg[ƒ‹æ‚É‚æ‚é·ˆÙA‚ ‚é‚¢‚̓o[ƒWƒ‡ƒ“‚É‚æ‚é·ˆÙ‚ð‹zŽû‚·‚邿‚¤‚É‚µ‚Ü‚·B -

      -Such binding between DLLs is not documented and operation may differ depending on the environment and version being used. -Therefore, with mDN Wrapper, the registry value is used to determine which wrapper DLL is used for conversion so that differences related to the installation location or version are neutralized. -

      -mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      -The registry setting for mDN Wrapper is placed under the following directory: -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
      -
      -ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚È‚¤ˆÊ’u‚ɂ‚¢‚Ä‚ÍA -‚±‚Ì’¼‰º‚̃ŒƒWƒXƒgƒŠ’l WhereiREG_DWORDj ‚É‚æ‚Á‚ÄŒˆ’肵‚Ü‚·B -—LŒø‚È’l‚ÍA -

      The location for encoding conversion is determined by the Registry Where value (REG_DWORD) under the above. -The effective values are as follows: -

      -ƒŒƒWƒXƒgƒŠ Where (REG_DWORD) -
      Registry Where (REG_DWORD) - - - - - - - - - - - -
      0WINSOCK 1.1AWINSOCK 2.0 ‚Ì—¼•û‚ŕϊ·‚·‚é
      0Converted at both WINSOCK 1.1 and WINSOCK 2.0 are converted
      1WINSOCK 2.0 ‚ª‚ ‚ê‚ÎAWINSOCK 2.0‚¾‚¯‚ŕϊ·‚·‚é
      1When WINSOCK 2.0 exists, converted only at WINSOCK 2.0
      WINSOCK 1.1 ‚¾‚¯‚Ìê‡‚É‚Í WINSOCK 1.1 ‚ŕϊ·‚·‚é
      When only WINSOCK 1.1 exists, converted only WINSOCK 1.1
      2WINSOCK 1.1 ‚¾‚¯‚ŕϊ·‚·‚é
      2Converted only at WINSOCK 1.1 only
      3WINSOCK 2.0 ‚¾‚¯‚ŕϊ·‚·‚é
      3Converted at WINSOCK 2.0
      -
      -‚Ì‚S’Ê‚è‚Å‚·B -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Ov‚ðA -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Pv‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -ƒŒƒWƒXƒgƒŠ’l‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Íu‚Ov‚ð‘z’肵‚Ü‚·B -‚±‚ê‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ð•W€‚Æ‚µ‚½‚à‚̂ł·B -

      When the wrapper DLL is installed in the application directory, "0" needs to be set and when installed in the system directory, "1" needs to be set. -If no value is set in the registry, "0" is assumed. This is based on installation in the application directory. -

      -

      •ÏŠ·Œ³/æ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO

      -

      Original/Converted Encoding

      -

      -ƒ‰ƒbƒp[DLL ‚Å‚ÍA‰ðŒˆ‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚ðA -ƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -‚Ü‚½ADNS ‚ª•Ô‚µ‚Ä‚«‚½ƒhƒƒCƒ“–¼(DNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO)‚ð -ƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚µ‚Ü‚·B -

      -Wrapper DLL converts the domain name to be resolved from the local encoding used by the machine to the DNS server encoding and returns the domain name (DNS server encoding) returned from the DNS to the encoding used by the local machine. -

      -Œ»ÝADNS ‘¤‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍA -‚¢‚­‚‚à‚Ì•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B -ƒ‰ƒbƒp[DLL ‚Í‚»‚ê‚ç‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂ǂꂩ‚Ð‚Æ‚Â‚É -•ÏŠ·‚·‚邿‚¤‚É\¬‚³‚ê‚Ü‚·B -‚±‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ‚ÅŽwަ‚³‚ê‚Ü‚·B -‚±‚̃ŒƒWƒXƒgƒŠ‚É‚ÍAmDN Wrapper ‚̃Cƒ“ƒXƒg[ƒ‹Žž‚É -ƒfƒtƒHƒ‹ƒgƒGƒ“ƒR[ƒfƒBƒ“ƒOiŒ»Žž“_‚Å‚ÍRACEj‚ªÝ’肳‚ê‚Ü‚·B -“–‘RA‚±‚̃ŒƒWƒXƒgƒŠ‚ÍAŒã‚Å‘¼‚Ì‚à‚̂ɕÏX‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

      -With respect to multilingual encoding at the DNS side, a number of methods have been proposed. -Wrapper DLL is structured to convert encoding to one of those DNS side encodings. -This DNS side encoding is specified by the registry. -In this registry, the default encoding (currently, it is RACE) is set when mDN Wrapper is installed. -Naturally, this registry can be changed to some other encoding method. -

      -mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      -The registry setting for mDN Wrapper is placed under the following directory. -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
      -
      -ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·B -DNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ’l Encoding iREG_SZj‚ÅŽwަ‚³‚ê‚Ü‚·B -‚±‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      DNS side encoding is specified by the registry value encoding (REG_SZ). -This encoding name must be one that can be recognized by libmdn. -
      -ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) -
      Registry encoding (REG_SZ) -
      -DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðݒ肵‚Ü‚· -
      Set DNS server side encoding name. -
      -
      -

      -ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -’Êí‚̓vƒƒZƒX‚̃R[ƒhƒy[ƒW‚©‚狂߂܂·B -ƒ‰ƒbƒp[DLL ‚ªŽg—p‚·‚é 'iconv' ƒ‰ƒCƒuƒ‰ƒŠ‚ÍA -windows ‚̃R[ƒhƒy[ƒW–¼‚ð -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚é‚Ì‚ÅA -ƒR[ƒhƒy[ƒW–¼‚ð‚»‚Ì‚Ü‚Üƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B -

      -On the other hand, the local encoding used by the application is usually derived from the code page of the process. -Since the 'iconv' library used by Wrapper DLL can accept the code page name of the Windows as the encoding name, the code page name is used as the local encoding name as is. -

      -‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA -“Á’è‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -ƒhƒƒCƒ“–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚Ä‚µ‚Ü‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAIE‚ł̓hƒƒCƒ“–¼‚ðUTF-8 ‚Å•\‹L‚·‚邿‚¤‚É -Žwަ‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -UTF-8 ‚É‚æ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -’ñˆÄ‚³‚ê‚Ä‚¢‚鑽Œ¾Œê‰»•ûŽ®‚̂ЂƂ‚ł·‚ªA -‘½Œ¾Œê‰»‚³‚ꂽDNS ƒT[ƒo‚Í‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žó•t‚¯‚È‚¢‚©‚à’m‚ê‚Ü‚¹‚ñB -

      -However, some applications encode domain names using a specific multilingual encoding method. For example, with Internet Explorer, you can specify that domain names are to be expressed in UTF-8. UTF-8 encoding is one of the proposed multilingual methods, but multilingual DNS server may accept only other encoding. -

      -‚±‚̂悤‚È󋵂ɑΈ‚·‚邽‚ßAmDN Wrapper ‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä -ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚àŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚µ‚Ü‚·B -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€“Á—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒŒƒWƒXƒgƒŠ‹LÚ‚³‚ê‚é‚à‚̂Ƃµ‚Ü‚·B -

      -In order to handle this situation, mDN Wrapper is able to accept program-specific encoding as local encoding. Such program-specific local encoding shall be written in the registry. -

      -mDN Wrapper —p‚̃vƒƒOƒ‰ƒ€“Á—L‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      Registry setting unique to the program for mDN Wrapper is placed under the following directory using the program name (execution module file name) as the key. -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg
      -
      -ˆÈ‰º‚ÉAƒvƒƒOƒ‰ƒ€–¼iŽÀsƒ‚ƒWƒ…[ƒ‹ƒtƒ@ƒCƒ‹–¼j‚ðƒL[‚Æ‚µ‚Ä”z’u‚³‚ê‚Ü‚·B -—Ⴆ‚ÎAInternet Explore ‚ÌꇂɂÍAŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ÌIEXPLORE‚ðƒL[‚Æ‚µ‚Ä -

      For example, with Internet Explorer it is placed under the following directory using IEXPLORE of the execution module name as the key. -

      - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE -
      -ˆÈ‰º‚É’u‚©‚ê‚Ü‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAƒŒƒWƒXƒgƒŠ’lEncoding iREG_SZj‚ÅŽwަ‚µ‚Ü‚·B‚±‚ê‚àlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      The local encoding name is specified by the Registry Encoding value (REG_SZ). -This also must be one that can be recognized by libmdn. -

      -ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) -
      Registry Encoding (REG_SZ) -
      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼ -iƒfƒtƒHƒ‹ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚ð•K—v‚Æ‚·‚éê‡j‚ðŽw’肵‚Ü‚·B -

      Indicates the encoding name unique to the application program (when other than default encoding is required). -

      -
      - -

      ƒƒO

      -

      Log

      - -mDN Wrapper ‚ªŠú‘Ò‚µ‚½“®ì‚ð‚µ‚È‚¢ê‡A“®ì‚̃ƒO‚Í–â‘è‰ðŒˆ‚É”ñí‚É -–ð—§‚¿‚Ü‚·BmDN Wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ‚ÌÝ’è‚É‚æ‚èAˆÈ‰º‚Ìݒ肪 -‰Â”\‚Å‚·B -

      When mDN Wrapper does not operate as expected, the operation log can be very useful in resolving the problem. With mDN Wrapper, the following settings can be made with the registry setting. -

        -
      • ƒƒOƒŒƒxƒ‹ -
      • Log level -
      • ƒƒOƒtƒ@ƒCƒ‹ -
      • Log file -
      -

      -ƒƒOƒŒƒxƒ‹AƒƒOƒtƒ@ƒCƒ‹‚Æ‚à‚ÉŽŸ‚̃ŒƒWƒXƒgƒŠ‚̉º‚Åݒ肳‚ê‚Ü‚·B -

      -Both the log level and log file are set under the following registry. -

      -HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      -HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN -
      -

      -ƒƒOƒŒƒxƒ‹‚̓ŒƒWƒXƒgƒŠ’l LogLevel (REG_DWORD) ‚ÅŽw’肵‚Ü‚·B’è‹`‚³‚ê‚Ä‚¢‚é -’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

      -The log level is specified usingg the LogLevel registry value (REG_DWORD). The defined values are as follows. -

      -
      -1 (0xFFFFFFFF)
      [None] ƒƒO‚ðˆêØo—Í‚µ‚È‚¢ -
      -1 (0xFFFFFFFF)
      [None] No log is output -
      0
      [Fatal] ’v–½“IƒGƒ‰[‚Ì‚Ýo—Í -
      0
      [Fatal] Outputs only fatal errors -
      1
      [Error] ’v–½“I‚łȂ¢ƒGƒ‰[‚ào—Í -
      1
      [Error] Outputs errors that are not fatal -
      2
      [Warning] ŒxƒƒbƒZ[ƒW‚ào—Í -
      2
      [Warning] Outputs warning messages as well -
      3
      [Info] ƒGƒ‰[ˆÈŠO‚Ìî•ñ‚ào—Í -
      3
      [Info] Outputs information other than errors as well -
      4
      [Trace] ƒvƒƒOƒ‰ƒ€‚̃gƒŒ[ƒXî•ñ‚ào—Í -
      4
      [Trace] Outputs program trace information -
      -‚È‚¨A‚±‚̃Œƒxƒ‹Žw’è‚Í mDN Wrapper ‚ªŽg—p‚µ‚Ä‚¢‚é -MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚Ìo—Í‚·‚郃O‚̃Œƒxƒ‹Žw’è‚Å‚·B -ƒƒO‚ɂ͂±‚Ì‘¼ mDN Wrapper Ž©g‚ªo—Í‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA‚±‚¿‚ç‚Í -ƒŒƒxƒ‹Žw’è‚͂ł«‚¸A’P‚ɃIƒ“EƒIƒt‚ðØ‚è‘Ö‚¦‚邾‚¯‚Å‚·B-1 ‚ðŽw’肵‚½ê‡‚É‚Í -ƒIƒtA‚»‚êˆÈŠO‚Ì’l‚ðŽw’肵‚½ê‡‚ɂ̓Iƒ“‚ɂȂè‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í -1 ‚Å‚·B -
      Note that this level specification is for the log level to be output by MDN library used by mDN Wrapper. -In addition, mDN Wrapper itself outputs a log. The level of log of this cannot be specified and can only be switched ON and OFF. When -1 is specified, it is OFF; all other values switch the log ON. -The default is -1. -

      -ƒƒOƒtƒ@ƒCƒ‹‚̓ƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚é‚à‚Ì‚ÅA -ƒŒƒWƒXƒgƒŠ’l LogFile (REG_SZ) ‚ÅŽw’肵‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í -mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ƒfƒBƒŒƒNƒgƒŠ‚̉º‚Ì "mdn_wrapper.log" ‚Å‚·B -

      -Log file is used to specify the path to the file to which the log is to be output. -The LogFile (REG_SZ) registry value is used to specify the path. The default is "mdn_wrapper.log" under the directory where mDN Wrapper is installed. -

      -‚È‚¨AƒƒOƒŒƒxƒ‹‚ƃƒOƒtƒ@ƒCƒ‹‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ðŽg—p‚µ‚Ä‚à -Ý’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -Note that the configuration program can be used to set the log level and log file settings. -

      -

      ƒŒƒWƒXƒgƒŠÝ’è - ‚܂Ƃß

      -

      Registry Setting - Summary

      -

      -

      ƒŒƒWƒXƒgƒŠ‚Ì—D懈Ê

      -

      Registry Priority

      -

      -mDN Wrapper ‚ÌÝ’èî•ñ‚ÍAHKEY_LOCAL_MACHINEAHKEY_CURRENT_USER‚Ì

      -

      - Software\JPNIC\MDN -
      -ˆÈ‰º‚ÉŠi”[‚³‚ê‚Ü‚·BmDN Wrapper‚Íʼn‚ÉHKEY_LOCAL_MACHINE‚ÌÝ’è‚ð“ǂݞ‚ÝAHKEY_CURRENT_USER‘¤‚É‚àݒ肪‚ ‚ê‚ÎA‚±‚ê‚Åã‘‚«‚µ‚Ü‚·B’Êí‚ÍAHKEY_LOCAL_MACHINE ‘¤‚¾‚¯‚ðݒ肵‚Ü‚·Bƒ†[ƒUŒÂ•ʂɈقȂÁ‚½Ý’è‚ðŽg‚¢‚½‚¢ê‡‚Ì‚ÝAHKEY_CURRENT_USER‚ðÝ’è‚·‚邿‚¤‚É‚µ‚Ä‚­‚¾‚³‚¢B -

      -mDN Wrapper configuration information stored under -

      - Software\JPNIC\MDN -
      -

      -of HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER. mDN Wrapper first loads the setting of HKEY_LOCAL_MACHINE and overwrites the setting using the setting at HKEY_CURRENT_USER side, if any. Usually, only the HKEY_LOCAL_MACHINE side is set. The HKEY_CURRENT_USER side is also set only when it is desired to use different setting for each user. -

      -“Á‚ÉAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Íí‚É HKEY_LOCAL_MACHINE ‚Ì -ݒ肵‚©“ǂݑ‚«‚µ‚Ü‚¹‚ñBƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ðŽg—p‚µ‚Ä -Ý’è‚ðs‚¤ê‡‚ɂ͋C‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B -

      -In particular, the configuration program reads and writes only the settings of HKEY_LOCAL_MACHINE. Be careful when using the configuration file to set settings. -

      -

      ƒŒƒWƒXƒgƒŠƒL[

      -

      Registry Key

      -

      -‘S‘̂̋¤’Ê‚ÌÝ’è‚ÆAƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è‚Æ‚ª‚ ‚è‚Ü‚·B -

      -There are common settings and program-specific settings. -

      ‹¤’Ê’è‹`

      -

      Common definition

      -
      -        Software\JPNIC\MDN\Where         •ÏŠ·ˆÊ’u
      -	                    0:WINSOCK1.1 WINSOCK2.0‚Ì—¼•û‚Å
      -                            1:WINSOCK2.0 ‚ª‚ ‚ê‚΂»‚¿‚ç‚Å
      -			    2:WINSOCK1.1 ‚¾‚¯‚Å
      -			    3:WINSOCK2.0 ‚¾‚¯‚Å
      -        Software\JPNIC\MDN\Encoding      DNS‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼
      -        Software\JPNIC\MDN\Normalize     ³‹K‰»‚Ì•ûŽ®
      -        Software\JPNIC\MDN\LogLevel      ƒƒOƒŒƒxƒ‹
      -        Software\JPNIC\MDN\LogFile       ƒƒOƒtƒ@ƒCƒ‹
      -
      -
      -        Software\JPNIC\MDN\Where         Conversion location
      -	                    0:Both WINSOCK1.1 and WINSOCK2.0
      -                            1:At WINSOCK2.0 when exists
      -			    2:At WINSOCK1.1 only
      -			    3:At WINSOCK2.0 only
      -        Software\JPNIC\MDN\Encoding      DNS side encoding name
      -        Software\JPNIC\MDN\Normalize     Method of normalization
      -        Software\JPNIC\MDN\LogLevel      Log level
      -        Software\JPNIC\MDN\LogFile       Log file
      -
      -

      ƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è

      -

      Program-specific Settings

      -

      -•ÏŠ·ˆÊ’uA‚¨‚æ‚уvƒƒOƒ‰ƒ€‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒvƒƒOƒ‰ƒ€–ˆ‚É“Á’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -‚±‚ê‚ç‚ÍAˆÈ‰º‚̃L[ƒnƒCƒu‚̉º‚ÉA -ƒvƒƒOƒ‰ƒ€–¼‚ðƒL[‚Æ‚·‚é’l‚Åݒ肵‚Ü‚·B -

      -Conversion location and program side encoding can be specified for each program.These are set under the following key hive using the value using the program name as the key. -

      - Software\JPNIC\MDN\PerProg\<name>\Where - Software\JPNIC\MDN\PerProg\<name>\Encoding -
      -Žw’肳‚ê‚Ä‚¢‚È‚¢ê‡‚É‚ÍA -
      When they are not specified: -
      - - - - - -
      Where 01.1A2.0 ‚Ì—¼•û‚ŕϊ·
      Where 0Converts at both 1.1 and 2.0
      Encoding ƒvƒƒZƒX‚̃R[ƒhƒy[ƒW
      Encoding Code page of process
      -
      -‚Ƃ݂Ȃµ‚Ü‚·B -
      are assumed. - - diff --git a/contrib/idn/mdnkit/doc/index.html b/contrib/idn/mdnkit/doc/index.html deleted file mode 100644 index a6a60dbdc5..0000000000 --- a/contrib/idn/mdnkit/doc/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - -mDNkit Documentation - - - - - -

      mDNkit Documents

      - -

      mDNkit documents are currently available only in Japanese. - -

      - -

      See LICENSE.txt for the license of this kit. - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/bind9.html b/contrib/idn/mdnkit/doc/ja/guide/bind9.html deleted file mode 100644 index aa99e3efb8..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/bind9.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - -bind9 patch - - - - -

      bind9 ƒpƒbƒ`

      - - - -
      -

      ŠT—v

      - -

      -mDNkit ‚Å‚Í bind9 —p‚̃pƒbƒ`ƒtƒ@ƒCƒ‹‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B -‚±‚̃pƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA -bind9 ‚É‚¨‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B - -

      -‹ï‘Ì“I‚É‚ÍA‚±‚̃pƒbƒ`‚Í bind9 ‚ÉŽŸ‚̂悤‚È‹@”\‚ð’ljÁ‚µ‚Ü‚·B -

        -
      • bind9 ‚Ì DNS ƒT[ƒo (named) ‚É‚¨‚¢‚ÄAƒhƒƒCƒ“–¼‚ðƒeƒLƒXƒg‚É - •ÏŠ·‚·‚éÛ‚ÉUTF-8 •¶Žš‚ª‚»‚Ì‚Ü‚Ü’Ê‚é‚æ‚¤‚ɂȂè‚Ü‚·B -
      • bind9 ‚ÌƒŠƒ]ƒ‹ƒo (lightweight resolver) ‚Ì’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì -API ŠÖ”‚ÉAƒzƒXƒg–¼‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒzƒXƒg–¼‚ð -Žw’è‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
      • “¯‚¶‚­–¼‘O‰ðŒˆŒ‹‰Ê‚Æ‚µ‚ÄAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽ -ƒzƒXƒg–¼‚ª•Ô‚³‚ê‚邿‚¤‚ɂȂè‚Ü‚·B -
      • digAhostAnslookup ƒRƒ}ƒ“ƒh‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -Žó‚¯•t‚¯A‚Ü‚½–â‚¢‡‚킹Œ‹‰Ê‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\ަ‚·‚邿‚¤‚ɂȂè‚Ü‚·B -
      - -

      bind9 ‚ւ̃pƒbƒ`‚Ì“K—p•û–@‚ÍAƒpƒbƒ`ƒtƒ@ƒCƒ‹‚Ìæ“ª‚É‹LÚ‚µ‚Ä‚ ‚è‚Ü‚·B -ƒCƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚à -‚²——‚­‚¾‚³‚¢B - -

      - -


      -

      named

      - -

      ‚±‚̃pƒbƒ`‚Ì“K—p‚É‚æ‚èADNS ƒT[ƒo‚Å‚ ‚é named ‚ɑ΂µ‚ÄA -UTF-8 •¶Žš‚Ì“§‰ß‹@”\‚ª’ljÁ‚³‚ê‚Ü‚·B - -

      bind9 ‚Ì named ‚ł̓hƒƒCƒ“–¼‚̈—‚͂قƂñ‚Ç8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä -‚¢‚é‚̂ł·‚ªAnamed “à‚̃hƒƒCƒ“–¼‚Ì“à•”•\Œ»‚©‚çƒeƒLƒXƒg•\Œ»‚Ö‚Ì -•ÏŠ·•”•ª‚Í8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚炸AASCII •¶ŽšˆÈŠO -‚̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚ŃNƒH[ƒg‚³‚êA\DDD ‚Æ‚¢‚¤Œ`Ž®‚Ì•\Œ»‚É -•ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B - -

      ‚±‚ê‚Í DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð -Žg—p‚·‚éꇂɖâ‘è‚Æ‚È‚è‚Ü‚·B - -

      –{ƒpƒbƒ`‚Å‚ÍA•ÏŠ·‚µ‚悤‚Æ‚·‚é•¶Žš‚ªUTF-8 •¶Žš‚Ì -ꇂɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒg‚ð‚¹‚¸‚»‚̂܂ܓ§‰ß‚³‚¹‚é‹@”\‚ð -’ljÁ‚µ‚Ü‚µ‚½B -‚±‚Ì“®ì‚Í named ‚ÌÝ’èƒtƒ@ƒCƒ‹ (named.conf) ‚ÅØ‚è‘Ö‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚͌݊·«‚Ì‚½‚ß“§‰ß‚µ‚È‚¢Ý’è‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚à‚µDNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð—p‚¢‚éꇂɂÍA -Ý’èƒtƒ@ƒCƒ‹‚Ì options ƒZƒNƒVƒ‡ƒ“‚Ì allow-utf8 ƒpƒ‰ƒ[ƒ^‚ð -ŽŸ‚̂悤‚ÉŽw’肵‚Ä‚­‚¾‚³‚¢B - -

      -
      -options {
      -    ...
      -    allow-utf8 yes;
      -    ...
      -};
      -
      -
      - -

      DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE “™‚Ì -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -Žg—p‚·‚éꇂɂÍA‚±‚ÌÝ’è‚Í•s—v‚Å‚·B - -


      -

      ƒŠƒ]ƒ‹ƒo

      - -

      bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚ÍAbind8 ‚܂ł̂à‚̂Ƃ͑S‚­ˆÙ‚È‚èA -lightweight resolver ƒ‰ƒCƒuƒ‰ƒŠ‚ƌĂ΂ê‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É -ƒŠƒ“ƒN‚³‚ê‚郉ƒCƒuƒ‰ƒŠ‚ÆAlightweight resolver ƒf[ƒ‚ƒ“‚ƌĂ΂ê‚é -ƒT[ƒo‚©‚ç\¬‚³‚ê‚Ä‚¢‚Ü‚·B - -

      –{ƒpƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA‚±‚ÌƒŠƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‹@”\‚ª‰Á‚í‚è‚Ü‚·B‹ï‘Ì“I‚ɂ͎Ÿ‚̂悤‚È‹@”\‚ª’ljÁ‚³‚ê‚Ü‚·B - -

        -
      • ‘½Œ¾ŒêƒzƒXƒg–¼‚ÌŽw’è
        -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚ɑ΂µ‚ÄA -ƒzƒXƒg–¼ˆø”‚Ƀ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒzƒXƒg–¼‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å“ü—Í‚³‚ꂽ‚±‚ê‚ç‚̃hƒƒCƒ“–¼‚Í -Ž©“®“I‚É DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚êA -DNS ƒT[ƒo‚Ö‚Ì–â‚¢‡‚킹‚ªs‚í‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ÌÛ‚É‚Í -“¯Žž‚ɳ‹K‰»‚às‚í‚ê‚Ü‚·B -
      • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ԋp
        -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª’ñ‹Ÿ‚·‚é–¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚ªA -–¼‘O‰ðŒˆŒ‹‰Ê‚̃f[ƒ^‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒzƒXƒg–¼‚ð -•Ô‚·‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
      - -

      DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚âŽg—p‚·‚鳋K‰»•ûŽ®‚ÌŽw’è‚Í -‚ ‚ç‚©‚¶‚߃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Åݒ肵‚Ä‚¨‚«‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B - -

      ˆÈ‰º‚ÉAƒpƒbƒ`‚É‚æ‚Á‚Ä‘½Œ¾Œê‰»‚³‚ê‚é–¼‘O‰ðŒˆ—p API ŠÖ”‚̈ꗗ‚ðŽ¦‚µ‚Ü‚·B -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÍA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII ƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

        -
      • lwres_getaddrinfo() -
      • lwres_getnameinfo() -
      • lwres_gethostbyname() -
      • lwres_gethostbyname2() -
      • lwres_gethostbyname_r() -
      • lwres_gethostbyaddr() -
      • lwres_gethostbyaddr_r() -
      • lwres_getipnodebyname() -
      • lwres_getipnodebyaddr() -
      - -

      ˆø”‚ÌŒ^‚â•Ô‚è’l‚ÌŒ^‚É•ÏX‚Í‚ ‚è‚Ü‚¹‚ñB -ƒpƒbƒ`‚ð“–‚Ä‚é‘O‚Æ“¯—l‚̌ĂÑo‚µ•û–@‚ÅA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÆA -”ñ ASCII ƒhƒƒCƒ“–¼‚Ì—¼•û‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

      –{ƒpƒbƒ`‚ð“K—p‚µ‚½ bind9 ƒŠƒ]ƒ‹ƒo‚Í -MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚ð—˜—p‚µ‚ăGƒ“ƒR[ƒfƒBƒ“ƒO -•ÏŠ·‚ⳋK‰»‚ðs‚¢‚Ü‚·B]‚Á‚Ä bind9 ƒŠƒ]ƒ‹ƒo‚ðŽg—p‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚ð -ƒRƒ“ƒpƒCƒ‹‚·‚éê‡AMDN ‚̃‰ƒCƒuƒ‰ƒŠ libmdn ‚ðƒŠƒ“ƒN‚·‚é•K—v‚ª -‚ ‚è‚Ü‚·B‚à‚µ‚ ‚È‚½‚̃VƒXƒeƒ€‚ª iconv() ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ -ꇂɂÍAiconv() ‚̃‰ƒCƒuƒ‰ƒŠ‚à‡‚í‚¹‚ÄƒŠƒ“ƒN‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      - -


      -

      dig/host/nslookup

      - -

      bind9 ‚É‚Í DNS ‚Ì–â‚¢‡‚킹ƒc[ƒ‹‚Æ‚µ‚Ä digAhostAnslookup ‚Æ‚¢‚¤ -ƒRƒ}ƒ“ƒh‚ª•t‘®‚µ‚Ü‚·Bbind9 ƒpƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èA‚±‚ê‚ç‚Í‚¢‚¸‚ê‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B‹ï‘Ì“I‚ɂ͈ȉº‚Ì‹@”\‚ª -•t‰Á‚³‚ê‚Ü‚·B -

        -
      • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì“ü—Í
        -ƒRƒ}ƒ“ƒhˆø”A‚ ‚é‚¢‚Í•W€“ü—Í‚ÅAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\Œ»‚³‚ꂽ”ñ ASCII ‚̃hƒƒCƒ“–¼‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å“ü—Í‚³‚ꂽ‚±‚ê‚ç‚̃hƒƒCƒ“–¼‚Í -Ž©“®“I‚É DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚êA -DNS ƒT[ƒo‚Ö‚Ì–â‚¢‡‚킹‚ªs‚í‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ÌÛ‚É‚Í -“¯Žž‚ɳ‹K‰»‚às‚í‚ê‚Ü‚·B -
      • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•\ަ
        -DNS ƒT[ƒo‚©‚ç‚̕ԓš‚Ɋ܂܂ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚³‚êA•\ަ‚³‚ê‚邿‚¤‚ɂȂè‚Ü‚·B -
      - -

      DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚âŽg—p‚·‚鳋K‰»•ûŽ®‚ÌŽw’è‚Í -‚ ‚ç‚©‚¶‚߃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Åݒ肵‚Ä‚¨‚«‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/bindconfig.html b/contrib/idn/mdnkit/doc/ja/guide/bindconfig.html deleted file mode 100644 index f9ae6d9955..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/bindconfig.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - -mDNkit BIND configuration guide - - - - - -

      DNSƒT[ƒo‚ÌÝ’è

      - -

      DNSƒT[ƒo‚ɂđ½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚ß‚ÌÝ’è•û–@‚ɂ‚¢‚Ä -‰ðà‚µ‚Ü‚·B‚Ƃ͂¢‚Á‚Ä‚à]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÌꇂÌÝ’è•û–@‚Æ -‘å‚«‚­•Ï‚í‚é‚킯‚ł͂ ‚è‚Ü‚¹‚ñB’ˆÓ‚·‚ׂ«“_‚ÍŽŸ‚Ì2“_‚¾‚¯‚Å‚·B -

        -
      • DNS ƒT[ƒo‚Ƀpƒbƒ`‚𓖂ĂȂ¯‚ê‚΂Ȃç‚È‚¢ê‡‚ª‚ ‚邱‚Æ -
      • ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚邱‚Æ -
      - -

      DNSƒT[ƒo‚ÌÝ’è‚̎臂ÍA‚¨‚æ‚»ˆÈ‰º‚Ì’Ê‚è‚Å‚·B - -

        -
      1. ƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ðŒˆ‚ß‚éB -
      2. DNS ƒT[ƒo‚ð—pˆÓ‚·‚éB -
      3. named.confAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚ð쬂·‚éB -
      - -

      ÅŒã‚̃tƒ@ƒCƒ‹ì¬‚ÉŠÖ‚µ‚Ä‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-5 ‚ð -Žg—p‚µ‚½‚Æ‚«‚É“Á—L‚Ì–â‘肪‚ ‚èA‚±‚ê‚ð -

      -‚Æ‚µ‚Ă܂Ƃ߂Ă ‚è‚Ü‚·B - -

      Ý’è‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·ƒc[ƒ‹ mdnconv ‚ÌŠO•”Žd—l -‚¨‚æ‚Ñ“à•”ˆ—‚ÌÚׂɊւµ‚Ä‚ÍA -mdnconv ‚ÌŽd—l‘‚ð‚²——‚­‚¾‚³‚¢B - -

      ‚Ü‚½AƒNƒ‰ƒCƒAƒ“ƒg‚©‚炱‚ê‚ç‚Ì DNS ƒT[ƒo‚ɃAƒNƒZƒX‚·‚邽‚߂ɂÍA -‘½Œ¾ŒêƒhƒƒCƒ“–¼—pƒpƒbƒ`‚ð“–‚Ä‚½ bind9A -runmdn ƒRƒ}ƒ“ƒhA -mDN Wrapper ‚ȂǂðŽg—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒg‘¤‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤‚©A‚ ‚é‚¢‚Í -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚¤ƒvƒƒLƒVƒT[ƒo‚Å‚ ‚é dnsproxy ‚ð’Ê‚·•K—v‚ª‚ ‚è‚Ü‚·B -dnsproxy ‚ÌÝ’è‚ɂ‚¢‚Ä‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Åà–¾‚µ‚Ü‚·B - -

      - -


      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ÌŒˆ’è

      - -

      ‚Ü‚¸ DNS ‚ÌÝ’è‚Éæ‚¾‚Á‚ÄADNS ƒT[ƒo‚ÅŽg—p‚·‚éƒhƒƒCƒ“–¼‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚¨‚æ‚ѳ‹K‰»•ûŽ®‚ðŒˆ‚ß‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      •]‰¿‚µ‚悤‚Æ‚·‚é DNS ‚Ì‘½Œ¾Œê‰»•ûŽ®‚ªŒˆ‚Ü‚Á‚Ä‚¢‚ê‚ÎA -‚»‚Ì•ûŽ®‚ɇ‚킹‚邱‚ƂɂȂè‚Ü‚·B -Œ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚Ì’†‚©‚çAŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»‚ð -‚¢‚­‚‚©Ð‰î‚µ‚Ü‚·B‚±‚êˆÈŠO‚Ì•ûŽ®‚à‘½”’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·BÚ‚µ‚­‚Í -ŽQl•¶Œ£‚ð‚²——‚­‚¾‚³‚¢B - -

        -
      • RACE: Row-based ASCII Compatible Encoding for IDN
        - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í RACE ‚Å‚·B‚±‚̃vƒƒ|[ƒUƒ‹‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO - ‚݂̂̃vƒƒ|[ƒUƒ‹‚Ȃ̂ų‹K‰»•ûŽ®‚Í‹K’肵‚Ä‚¢‚Ü‚¹‚ñB -

        -

      • Using the UTF-8 Character Set in the Domain Name System
        - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-8 ‚Å‚·B - ³‹K‰»‚Í ``locale-sensitive downcasing'' ‚Å‚·‚ªA - ‚±‚Ì•ûŽ®‚̓ƒP[ƒ‹ˆË‘¶‚ɂȂé‚̂ŠmDNkit ‚ł̓Tƒ|[ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB - Å‚à‹ß‚¢‚̂̓ƒP[ƒ‹”ñˆË‘¶‚Ì‘å•¶Žš¨¬•¶Žšƒ}ƒbƒsƒ“ƒO‚Å‚ ‚é - unicode-lowercase ‚Å‚µ‚傤B -

        -

      • Using the Universal Character Set in the Domain Name System (UDNS)
        - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-8A³‹K‰»‚Í unicode-form-c ‚¨‚æ‚Ñ - unicode-lowercase ‚Å‚·B -

        -

      • UTF-5, a transformation format of Unicode and ISO 10646
        - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í UTF-5 ‚Å‚·B‚±‚̃vƒƒ|[ƒUƒ‹‚àƒGƒ“ƒR[ƒfƒBƒ“ƒO - ‚݂̂̃vƒƒ|[ƒUƒ‹‚Ȃ̂ų‹K‰»•ûŽ®‚Í‹K’肵‚Ä‚¢‚Ü‚¹‚ñB -
      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-5 ‚ðÌ—p‚µ‚½ê‡‚É‚ÍA -ZLD (zero level domain) ‚ð•t‚¯‚邱‚Æ‚Å]—ˆ‚̃hƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚é•K—v‚ª -‚ ‚è‚Ü‚·B‚µ‚½‚ª‚Á‚Ä ZLD ‚ð‰½‚É‚·‚é‚©‚àŒˆ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      ‚»‚Ì‘¼ mDNkit ‚ªƒTƒ|[ƒg‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ɂ‚¢‚Ä‚Í -MDN ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŽd—l‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

      - -

      ‚à‚¿‚ë‚ñA1‘ä‚Ì DNS ƒT[ƒo‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ‚½‚¹‚邱‚Æ‚à‰Â”\ -‚Å‚·B‚±‚Ìꇂ̓][ƒ“–ˆ‚ɈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŠ„‚è“–‚Ă邱‚ƂɂȂé -‚Å‚µ‚傤B‚½‚¾‚µ mDNkit ‚ð—p‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈µ‚¢‚ð‰Â”\‚É‚µ‚½ -ƒNƒ‰ƒCƒAƒ“ƒg‚â dnsproxy ‚Í DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª’Pˆê‚Å‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚é‚Ì‚ÅA—Ⴆ‚Î dnsproxy ‚Ìꇂɂ̓Gƒ“ƒR[ƒfƒBƒ“ƒO–ˆ‚É -•¡”‚Ì dnsproxy ‚ð‹N“®‚·‚é‚Ȃǂ̃eƒNƒjƒbƒN‚ª•K—v‚Å‚·B - -

      - -


      - -

      DNS ƒT[ƒo‚Ì—pˆÓ

      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE: ASCII Compatible -Encoding) ‚Å‚ ‚é RACEAUTF-5 ‚ð—p‚¢‚éꇂɂÍAƒGƒ“ƒR[ƒhŒ‹‰Ê‚Í]—ˆ‚Ì -ƒzƒXƒg–¼‚Æ‚µ‚ij“–‚È•¶Žš—ñ‚ɂȂé‚Ì‚ÅAŒ»ÝŽg—p’†‚Ì DNS ƒT[ƒo‚ð‚»‚Ì‚Ü‚Ü -Žg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚µ‚©‚µ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOA -“Á‚É UTF-8 ‚ð—p‚¢‚éꇂɂÍA‘½Œ¾ŒêƒhƒƒCƒ“ˆ—‚ð•t‰Á‚·‚éƒpƒbƒ`‚ð“–‚Ä‚½ -bind9 ‚Ì DNS ƒT[ƒo (named) ‚ðŽg—p‚·‚é‚©A -8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚ð“–‚Ä‚½ bind8 ‚Ì DNS ƒT[ƒo‚ð—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      ‚»‚ꂼ‚ê‚̃pƒbƒ`‚Ì“–‚Ä•û‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹‚Ì•û–@‚ɂ‚¢‚Ä‚Í -bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹ ‚¨‚æ‚Ñ -bind8 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹ ‚ð -‚²——‚­‚¾‚³‚¢B - -

      - -


      - -

      named.confAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ìì¬

      - -

      named.conf ‚âƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‘‚«•ûŽ©‘Ì‚ÍA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚̃hƒƒCƒ“–¼‚ŕςí‚邯‚±‚ë‚Í‚ ‚è‚Ü‚¹‚ñB -’P‚ɃhƒƒCƒ“–¼‚ÉŠ¿Žš‚ȂǂðŠÜ‚߂邱‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©‚¾‚¯‚̈Ⴂ‚Å‚·B - -

      DNS ƒT[ƒoŽ©‘̂ɃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‹@”\‚Í”õ‚í‚Á‚Ä‚¢‚È‚¢‚Ì‚ÅA -DNS ‚̓ǂݞ‚Þ named.conf ƒtƒ@ƒCƒ‹‚âƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓Gƒ“ƒR[ƒfƒBƒ“ƒOE³‹K‰»•ûŽ®‚ÌŒˆ’è‚Å -Œˆ’肵‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɇ‚킹‚é•K—v‚ª‚ ‚è‚Ü‚·B -mdnconv ‚Í‚±‚̂悤‚È–Ú“I‚Ì‚½‚ß‚ÉÝŒv‚³‚ꂽƒR[ƒh•ÏŠ·ƒc[ƒ‹‚Å‚·B - -

      RACE ‚â UTF-5 ‚È‚çAASCII •¶Žš‚ª•ÒW‚Å‚«‚éƒGƒfƒBƒ^‚ª‚ ‚ê‚Î’¼Ú“ü—Í -‚·‚邱‚Æ‚à‰Â”\‚Å‚·‚ªA—Ⴆ‚Îu‚±‚ñ‚É‚¿‚Í.¢ŠE.v‚Æ“ü—Í‚·‚é‘ã‚í‚è‚É -bq--gbjzg23bn4.bq--3bhbm5km. -‚ȂǂƂ¢‚Á‚½ˆÃ†‚̂悤‚È•¶Žš—ñ‚ð (‚µ‚©‚ೊm‚É) “ü—Í‚µ‚È‚¯‚ê‚΂Ȃ炸A -•ÏŠ·ƒc[ƒ‹‚ðŽg—p‚·‚é‚Ù‚¤‚ª‚͂邩‚ɂɊȒP‚Å‚·B - -

      UTF-8 ‚È‚ç‚΃GƒfƒBƒ^‚É‚æ‚Á‚Ă͒¼Ú•ÒW‰Â”\‚È‚à‚Ì‚ª‚ ‚é‚Ì‚ÅA‚»‚ê‚ð -Žg‚¤‚±‚Æ‚à‚Å‚«‚Ü‚·B‚µ‚©‚µ‚»‚̃GƒfƒBƒ^‚ೋK‰»‚܂ł͑½•ª‚µ‚Ä‚­‚ê‚È‚¢ -‚Å‚µ‚傤‚©‚çA‚â‚Í‚èƒc[ƒ‹‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚·‚邱‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B - -

      —Ⴆ‚ÎŽŸ‚̂悤‚ȃRƒ}ƒ“ƒh‚ðŽÀs‚·‚邯 EUC-JP ‚Å‘‚©‚ꂽƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ -db.somezone.euc ‚ð RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì db.somezone.race -‚ɕϊ·‚µA“¯Žž‚É Unicode Normalization Form C ‚É‚æ‚鳋K‰»‚ð“K—p‚·‚é -‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

      -
      -% mdnconv -noconf -in EUC-JP -out RACE -normalize unicode-form-c \
      -	db.foo.euc > db.foo.race
      -
      -
      - -

      -in ƒIƒvƒVƒ‡ƒ“‚Å“ü—̓eƒLƒXƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðA --out ‚Åo—̓eƒLƒXƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðA -‚»‚µ‚Ä -normalize ‚ų‹K‰»•ûŽ®‚ðŽw’肵‚Ü‚·B -ƒIƒvƒVƒ‡ƒ“‚̈ꗗ‚Ƃǂ̂悤‚È’l‚ªŽw’è‚Å‚«‚é‚©‚ɂ‚¢‚Ä‚ÍA -mdnconv ‚ÌŽd—l‘‚ð‚²——‚­‚¾‚³‚¢B - -

      ‚ł͂±‚Ì‹t‚É RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç EUC-JP ‚ւ̕ϊ·‚ª‚Å‚«‚é‚©‚Æ‚¢‚¤‚ÆA -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ìꇂɂ͉”\‚Å‚·B‚½‚¾‚µ‚±‚ê‚Í mdnconv ‚ª -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒOê—p‚Ì“Á•ʂȈ—‚ð”õ‚¦‚Ä‚¢‚邽‚ß‚ÅA -ˆê”Ê“I‚É‚Í ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚Í -‚Å‚«‚È‚¢‚Æ‚¢‚¤‚±‚Æ‚ðŠo‚¦‚Ä‚¨‚¢‚Ä‚­‚¾‚³‚¢B -‚±‚ê‚ÍA“ü—Í‚³‚ꂽ•¶Žš—ñ‚Ì’†‚Å ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä -•\‹L‚³‚ê‚Ä‚¢‚éŒÂŠ‚Æ‚»‚¤‚łȂ¢’Êí‚Ì ASCII •\‹L‚ÌêŠ‚ð‹æ•Ê‚Å‚«‚È‚¢‚©‚ç‚Å‚·B -‚±‚ê‚ɂ‚¢‚Ä‚Í mdnconv ‚ÌŽd—l‘‚Ì -•ÏŠ·ˆ—‚ÌÚׂðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B - -

      ˆÈã‚Ì‚±‚Æ‚©‚çAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™ DNS ƒT[ƒo‚ª“ǂݞ‚Þƒtƒ@ƒCƒ‹ -‚Ì쬂ƊǗ‚ɂ͎Ÿ‚̂悤‚È•û–@‚ð‚Æ‚é‚Ì‚ª‚æ‚¢‚Æl‚¦‚ç‚ê‚Ü‚·B -‚Ü‚¸ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä‹Lq‚µ‚½”Å‚ð—pˆÓ‚µ‚ÄA‚±‚ê‚ɑ΂µ‚Ä -•ÒW‚âƒo[ƒWƒ‡ƒ“ŠÇ—‚ðs‚¢‚Ü‚·B -‚»‚µ‚Ä mdnconv ‚ð—p‚¢‚ăGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ƴ‹K‰»‚ðs‚¢A -DNS ƒT[ƒo‚ÌŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚𶬂µ‚ÄA‚±‚ê‚ð -DNS ƒT[ƒo‚ª“ǂݞ‚Þ‚½‚߂̃tƒ@ƒCƒ‹‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B - -

      ‚Ƃ͂¢‚Á‚Ä‚àƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚ð‰ü’ù‚·‚邽‚Ñ‚É -mdnconv ‚ðŽÀs‚µ‚ăT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹‚ðì‚é‚͖̂ʓ|‚Å‚·B -‚±‚ÌꇗႦ‚Î make ƒRƒ}ƒ“ƒh‚ðŽg—p‚·‚ê‚Εϊ·‚ðŽ©“®‰»‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      —Ⴆ‚΃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”ł̃tƒ@ƒCƒ‹–¼‚ɃTƒtƒBƒbƒNƒX .lcA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO”łɃTƒtƒBƒbƒNƒX .utf8A -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO”łɃTƒtƒBƒbƒNƒX .race ‚ð‚‚¯‚邯‚µ‚Ü‚·B -‚·‚é‚ÆŽŸ‚̂悤‚È Makefile ‚ð‘‚­‚±‚Ƃɂæ‚èAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO”Å‚ð -XV‚µ‚½‚ç make ‚ðŽÀs‚·‚邾‚¯‚ŕϊ·‚ðŽ©“®“I‚És‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

      -
      -.SUFFIXES: .lc .utf8 .race
      -
      -.lc.utf8:
      -	mdnconv -in $(LOCALCODE) -out UTF-8 $(NORMALIZE) $< > $@
      -.lc.race:
      -	mdnconv -in $(LOCALCODE) -out RACE $(NORMALIZE) $< > $@
      -
      -LOCALCODE = EUC-JP
      -NORMALIZE = -normalize unicode-form-c -normalize unicode-lowercase
      -
      -TARGETS = db.foo.utf8 db.bar.race
      -
      -all: $(TARGETS)
      -
      -
      - -

      1‚Â‚Ì DNS ƒT[ƒo‚ɈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¡”‚̃][ƒ“‚̃}ƒXƒ^‚ð -‚³‚¹‚悤‚Æ‚µ‚½ê‡Anamed.conf ‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð -¬Ý‚³‚¹‚È‚­‚Ă͂Ȃç‚È‚¢ó‹µ‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·BŽc”O‚È‚ª‚炱‚ê‚Í -mdnconv ‚ł͖³—‚Ȃ̂ÅAinclude ƒfƒBƒŒƒNƒeƒBƒu“™‚ðŽg‚Á‚Ä -ƒtƒ@ƒCƒ‹‚𕪊„‚µA1‚‚̃tƒ@ƒCƒ‹‚É•¡”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª -¬Ý‚µ‚È‚¢‚悤‚É‚µ‚Ä‚­‚¾‚³‚¢B - -

      ÅŒã‚É‚à‚¤1‚ÂAUTF-5 “Á—L‚Ì–â‘è‚ɂ‚¢‚Äà–¾‚µ‚Ü‚·B - -

      - -


      - -

      UTF-5 “Á—L‚Ì–â‘è

      - -

      DNS ƒT[ƒo‚ÅŽg—p‚·‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð UTF-5 ‚É‚µ‚½ê‡‚É‚Í -‚¢‚­‚‚©‚Ì–â‘肪¶‚¶‚Ü‚·B - -

      - -

      ZLD ‚ÌŽw’è

      - -

      UTF-5 ‚Í ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚Ȃ̂ÅAUTF-5 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ -ƒhƒƒCƒ“–¼‚Í‚»‚̂܂܂łÍ]—ˆ‚Ì ASCII ‚̃hƒƒCƒ“–¼‚Æ‹æ•ʂł«‚Ü‚¹‚ñB -“¯‚¶‚­ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚Å‚ÍAƒhƒƒCƒ“–¼‚Ì -Šeƒ‰ƒxƒ‹‚Ìæ“ª‚É“Á’è‚̃vƒŠƒtƒBƒbƒNƒX (bq--) ‚ð‚‚¯‚邱‚Ƃɂæ‚Á‚Ä -]—ˆ‚̃hƒƒCƒ“–¼‚Æ (ˆê‰ž) ޝ•ʂł«‚é‚̂ł·‚ªA -UTF-5 ‚ɂ͂±‚̂悤‚È‹@\‚ª‚È‚¢‚½‚ßAZLD ‚Æ‚¢‚¤ŠT”O‚ðŽg—p‚µ‚Ä]—ˆ‚̃hƒƒCƒ“ -–¼‚Ƃ̎¯•Ê‚ð‰Â”\‚É‚µ‚Ä‚¢‚Ü‚·B - -

      ZLD (zero level domain) ‚Ƃ̓hƒƒCƒ“–¼‚ÌÅŒã‚ɂ‚¯‚é -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚Ì‚±‚Æ‚ÅA—Ⴆ‚Î utf5. ‚Æ‚¢‚¤ -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚ðì‚èA -UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚Í‚·‚ׂñ‚̃hƒƒCƒ“‚̃TƒuƒhƒƒCƒ“‚Æ‚·‚é -‚±‚Æ‚ÅA]—ˆ‚̃hƒƒCƒ“–¼‚Ƃ̋æ•Ê‚ð‰Â”\‚É‚µ‚Ü‚·BŽÀÛ‚É‚Í ‚±‚̃gƒbƒvƒŒƒxƒ‹ -ƒhƒƒCƒ“‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ðs‚¤ -êŠ (Œ»Ý‚Ì mDNkit ‚Å‚Í dnsproxy) ‚ÅŽ©“®“I‚É•t‰Á‚³‚êA‚Ü‚½ UTF-5 ‚©‚ç -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚·‚Æ‚«‚ÉŽ©“®“I‚Éœ‹Ž‚³‚ê‚é‚̂Š-ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ͂±‚̃hƒƒCƒ“‚ÍŒ©‚¦‚Ü‚¹‚ñBƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂƂÁ‚Ä‚Ì -ƒgƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚æ‚肳‚ç‚ÉãˆÊƒhƒƒCƒ“‚Ɉʒu‚·‚é‚̂Šzero level domain -‚Ȃ킯‚Å‚·B‚à‚¿‚ë‚ñ DNS ƒT[ƒo‚©‚ç‚Í ZLD ‚͉B‚³‚ê‚Ä‚¨‚炸A‚µ‚½‚ª‚Á‚Ä -DNS ƒT[ƒo‚ÌÝ’è‚Å‚Í ZLD ‚ðˆÓޝ‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB - -

      ‚³‚ÄA‚±‚̂悤‚É UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚Í ZLD ‚ª•K{‚Å‚·‚ªA -mdnconv ‚É‚æ‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ· -‚ÌÛ‚É‚ÍAƒhƒƒCƒ“–¼‚Ì ZLD ‚Ì•”•ª‚Æ‚»‚¤‚łȂ¢•”•ª‚𖾊m‚É‹æ•Ê‚·‚é -•K—v‚ª‚ ‚è‚Ü‚·B—Ⴆ‚Î www.ƒjƒbƒN.“ú–{.utf5. ‚Æ‚¢‚¤ƒhƒƒCƒ“–¼‚ð -UTF-5 ‚ɕϊ·‚·‚邯 N7N7N7.J0CBJ0C3J0AF.M5E5M72C.utf5 ‚ƂȂè‚Ü‚· -(‚½‚¾‚µ ZLD ‚Í utf5. ‚¾‚Æ‚µ‚Ü‚·)B擪‚Ì www ‚Í -UTF-5 ‚ɕϊ·‚µ‚Ü‚·‚ªAZLD •”•ª‚͕ϊ·‚µ‚Ü‚¹‚ñB‚±‚Ì‚½‚ß mdnconv ‚Í -ZLD ‚ª‚È‚ñ‚Å‚ ‚é‚©‚ð‚ ‚ç‚©‚¶‚ß’m‚Á‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B‚±‚Ì‚½‚ß‚É --zld ‚Æ‚¢‚¤ƒIƒvƒVƒ‡ƒ“‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -‚±‚̃IƒvƒVƒ‡ƒ“‚ÍAƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚É‘‚©‚ꂽƒhƒƒCƒ“–¼‚ª -Žw’肳‚ꂽ ZLD ‚Ƀ}ƒbƒ`‚µ‚½Žž‚ÉAƒ}ƒbƒ`‚µ‚½•”•ª‚ðo—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·‘ÎÛ‚©‚çŠO‚·‚Æ‚¢‚¤“­‚«‚ð‚µ‚Ü‚·B‚½‚¾‚µƒhƒƒCƒ“–¼‚Æ ZLD ‚ªƒ}ƒbƒ`‚·‚é‚Ì‚Í -

        -
      1. ƒhƒƒCƒ“–¼‚ÌŌオƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¢‚邱‚Æ -
      2. ZLD ‚ªƒhƒƒCƒ“–¼‚ÌÅŒã‚Ì•”•ª‚ƈê’v‚µ‚Ä‚¢‚邱‚Æ -
      -‚Æ‚¢‚¤ðŒ‚ð–ž‚½‚µ‚Ä‚¢‚邯‚«‚¾‚¯‚Å‚·B—Ⴆ‚Î ZLD ‚ª utf5. ‚¾‚Æ‚·‚邯 -ZLD ‚ƃ}ƒbƒ`‚·‚é‚͎̂Ÿ‚ÉŽ¦‚·3‚‚̃hƒƒCƒ“–¼‚Ì’†‚Åʼn‚Ì‚à‚Ì‚¾‚¯‚Å‚·B -
      -
      -www.ƒjƒbƒN.“ú–{.utf5.
      -www.ƒjƒbƒN.“ú–{
      -utf5.ƒjƒbƒN.“ú–{.
      -
      -
      - -

      ‚³‚ç‚É mdnconv ‚Ì -auto ƒIƒvƒVƒ‡ƒ“ -‚𕹗p‚·‚邯‚ ‚é’ö“x ZLD ‚ðŽ©“®•t‰Á‚³‚¹‚邱‚Æ‚ª‚Å‚«A -‚±‚Ìꇃ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚É‚¢‚¿‚¢‚¿ ZLD ‚ð‘‚­•K—v‚ª‚È‚­‚È‚è‚Ü‚·B -‚½‚¾‚µŠmŽÀ‚É•t‰Á‚Å‚«‚é‚킯‚ł͂Ȃ¢‚Ì‚ÅA‚±‚̃IƒvƒVƒ‡ƒ“‚É‚Í—Š‚ç‚È‚¢•û‚ª -‚æ‚¢‚Å‚µ‚傤B - -

      - -

      ’P“Æ‚ÅoŒ»‚·‚é ASCII ƒ‰ƒxƒ‹

      - -

      mdnconv ‚ÍAƒfƒtƒHƒ‹ƒg‚ł͔ñ ASCII •¶Žš‚ð1•¶ŽšˆÈãŠÜ‚ÞƒhƒƒCƒ“–¼‚݂̂ð -o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ü‚·B‚‚܂è ASCII ‚݂̂©‚ç‚È‚éƒhƒƒCƒ“–¼‚Í -•ÏŠ·‚µ‚Ü‚¹‚ñB‚±‚ê‚Í]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð¬Ý‚³‚¹‚½ -Žž‚ÉAASCII ƒhƒƒCƒ“–¼‚܂łª UTF-5 ‚Ȃǂɕϊ·‚³‚ê‚Ä‚µ‚Ü‚¤‚Ì‚ð–h‚®‚½‚ß‚Ì -ˆ’u‚Å‚·B - -

      ‚Æ‚±‚낪‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì’†‚É ASCII •¶Žš‚݂̂©‚ç\¬‚³‚ê‚郉ƒxƒ‹‚ª -‚ ‚éê‡A‚»‚ꂪ’P“ƂŃ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚ÉoŒ»‚·‚邯‚±‚̈’u‚Ì‚½‚ß‚É -‚»‚̃‰ƒxƒ‹‚ª UTF-5 ‚ɕϊ·‚³‚ê‚È‚¢‚Æ‚¢‚¤–â‘肪¶‚¶‚Ü‚·B -—Ⴆ‚΃hƒƒCƒ“–¼ www.ƒjƒbƒN.“ú–{.utf5. ‚Ì A ƒŒƒR[ƒh‚ð -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚É‹Lq‚·‚邯‚«‚ÉAŽŸ‚̂悤‚É‘‚¢‚Ä‚µ‚Ü‚¤‚Æ -www ‚Ì•”•ª‚ª UTF-5 ‚ɕϊ·‚³‚ê‚Ü‚¹‚ñB - -

      -
      -$ORIGIN ƒjƒbƒN.“ú–{.utf5.
      -...
      -www	IN A 10.9.8.7
      -
      -
      - -

      ‚±‚̂悤‚Èê‡AFQDN ‚Å‹Lq‚·‚é‚Ȃǂµ‚ÄA”ñ ASCII •¶Žš‚ªŠÜ‚Ü‚ê‚é -‚悤‚É‚µ‚Ä‚â‚é•K—v‚ª‚ ‚è‚Ü‚·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/clientconfig.html b/contrib/idn/mdnkit/doc/ja/guide/clientconfig.html deleted file mode 100644 index 0cdd40d2f0..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/clientconfig.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - -Configuring Your Clients - - - - -

      ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌÝ’è

      -

      -DNS Proxy Server (dnsproxy) ‚ÍAŠî–{“I‚É‚Í -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç -‘½Œ¾Œê‰»‘Ήž‚µ‚½DNSƒT[ƒo‚ð—˜—p‚Å‚«‚邿‚¤‚É‚·‚é‚à‚̂ł·B -

      -‚ ‚éŽè–@‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚éƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç -‘¼‚ÌŽè–@‚Å‘½Œ¾Œê‰»‘Ήž‚µ‚½DNSƒT[ƒo‚ð—˜—p‚·‚邽‚߂ɂàŽg—p‚Å‚«‚Ü‚·B -
      -

      -ŽÀÛ‚É‚ ‚éƒNƒ‰ƒCƒAƒ“ƒg‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©‚ÍA -‚»‚̃Nƒ‰ƒCƒAƒ“ƒg‚ªƒhƒƒCƒ“–¼‚ð‚ǂ̂悤‚Ɉµ‚¤‚©‚É‚æ‚è‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‚ªAƒhƒƒCƒ“–¼‚ðAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å -‚Ȃɂàƒ`ƒFƒbƒN^‰ÁH‚µ‚È‚¢‚ÅŽg—p‚µ‚Ä‚¢‚é‚È‚çA -dnsproxy‚ðŒo—R‚·‚邱‚Ƃɂæ‚Á‚ÄA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ª—˜—p‰Â”\‚ɂȂè‚Ü‚·B -‚µ‚©‚µAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ŃhƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðŒµ–§‚Ƀ`ƒFƒbƒN‚µ‚Ä‚¢‚½‚èA -‚ ‚éŽí‚̕ϊ·‚ðs‚È‚Á‚Ä‚¢‚邿‚¤‚ÈꇂɂÍAdnsproxy‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB -

      -‚±‚±‚Å‚ÍA‚¢‚­‚‚©‚Ì‘ã•\“I‚ȃNƒ‰ƒCƒAƒ“ƒg‚ɂ‚¢‚ÄA -dnsproxy‚É‚æ‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ªŽg‚¤‚±‚Æ‚ª‚Å‚«‚é‚©‚Ç‚¤‚©A -‚Ç‚¤‚·‚ê‚Α½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂ邩A -‚ðà–¾‚µ‚Ü‚·B -

      - -


      - -

      UNIX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“

      -

      - -

      resolver‚Ì–â‘è

      -

      -UNIX‚Ìê‡ADNS‚Ö‚Ì—v‹‚ÍA‘½‚­‚Ìê‡resolver‚ðŒo—R‚µ‚Ä‘—‚ç‚ê‚Ü‚·B -‚µ‚©‚µA•W€“I‚Èresolver‚Ínon-ASCII‚̃hƒƒCƒ“–¼‚ðŽó•t‚¯‚Ü‚¹‚ñB -‚±‚Ì–â‘è‚ɑΈ‚·‚邽‚ßAmDNkit‚É‚Íbin8‚Ìresolver -(‚¨‚æ‚ÑnslookupAnamed)‚ð8-bit through‚É‚·‚邽‚߂̃pƒbƒ`‚ª -•t‘®‚µ‚Ä‚¢‚Ü‚·B‚Ü‚¸‚ÍAbind8‚É‚±‚̃pƒbƒ`‚ð“K—p‚µA -8-bit through‚Ìresolver‚ðŽg‚Á‚ÄÄƒŠƒ“ƒN‚µ‚Ä‚­‚¾‚³‚¢B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -bind —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B -

      - -

      nslookup

      -

      -•W€“I‚Ènslookup‚Ínon-ASCII‚̃hƒƒCƒ“–¼‚ðŽó•t‚¯‚Ü‚¹‚ñB -mDNkit‚Ìbind8‚Ö‚Ì8-bit throughƒpƒbƒ`‚ð“K—p‚µ‚Ä쬂³‚ꂽ -nslookup‚È‚çA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg—p‚·‚邱‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -bind —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B - -

      Squid

      -

      -SquidŒo—R‚ÅWeb‚ɃAƒNƒZƒX‚·‚邿‚¤‚ÈꇂɂÍAnon-ASCII•¶Žš‚ðŠÜ‚Þ -ƒhƒƒCƒ“–¼‚Ísquid‚É‚æ‚Á‚ăGƒ‰[‚Æ‚³‚ê‚Ü‚·B -mDNkit‚É‚Ísquid‚ð8-bit through ‚É‚·‚é -(ƒVƒ“ƒ^ƒbƒNƒXƒ`ƒFƒbƒN‚ðŠO‚·)ƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -‚±‚ê‚ð“K—p‚µ‚½squid‚Å‚ ‚ê‚ÎA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽó•t‚¯‚邿‚¤‚ɂȂè‚Ü‚·B -Ú‚µ‚­‚̓Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -‘O€”õA -squid —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹‚ð -‚²——‚­‚¾‚³‚¢B - -

      Netscape

      -

      -Žc”O‚È‚ª‚çA“ü—ÍŽž“_‚Ånon-ASCII•¶Žš‚Í‹‘”Û‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -

      - -


      - -

      Windows‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“

      -

      -Windows‚Ìresolver(WINSOCK)‚ÍAnon-ASCII‚̃hƒƒCƒ“–¼‚ð’Ê‚·‚悤‚Å‚·B -ƒNƒ‰ƒCƒAƒ“ƒg“à‚ł̃`ƒFƒbƒNA•ÏŠ·‚ªs‚È‚í‚ê‚È‚¯‚ê‚Ζâ‘è‚È‚­ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B’Êí‚Í -

      -    client-translation . Shift_JIS
      -
      -‚Æ‚·‚ê‚ÎOK‚Å‚·B -

      - -

      nslookup

      -

      -Žc”O‚È‚ª‚çAƒzƒXƒg–¼‚Ì“ü—ÍŽž“_‚ÅAnon-ASCII•¶Žš‚ðŠÜ‚ÞƒzƒXƒg–¼‚Í -‹‘”Û‚³‚ê‚邿‚¤‚Å‚·Bls ‚É‚æ‚éˆê——•\ަ‚Í“®ì‚µ‚Ü‚·B - -

      Netscape Communicator

      -

      -Version 4.7 ‚Í–â‘è‚È‚­“®ì‚µ‚Ü‚µ‚½B -

      -‚½‚¾AHTTPƒvƒƒLƒVƒT[ƒo‚ðŽg‚í‚ê‚Ä‚¢‚éꇂɂÍA‚»‚Ì -ƒvƒƒLƒVƒT[ƒo‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚é‚©‚Ç‚¤‚©‚ª -–â‘è‚ɂȂè‚Ü‚·‚̂ł²’ˆÓ‚­‚¾‚³‚¢B -

      - -

      Internet Explrore

      -

      -IE‚ɂ͑½Œ¾ŒêƒhƒƒCƒ“–¼‚ւ̑Ήž‚ªˆê•”ŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -

      -    ƒc[ƒ‹
      -        ƒCƒ“ƒ^[ƒlƒbƒgƒIƒvƒVƒ‡ƒ“
      -	    ‚¢‚‚àUTF-8‚Æ‚µ‚ÄURL‚ð‘—M‚·‚é
      -
      -‚µ‚©‚µA‚±‚ê‚ðŽg‚¤‚ÆA—]•ª‚ȂƂ±‚ë‚Ü‚ÅUTF-8‚Å -ƒGƒ“ƒR[ƒh‚µ‚Ä‚µ‚Ü‚¤‚悤‚ÅAdnsproxy‚ł͎g—p‚Å‚«‚Ü‚¹‚ñB -‹t‚ÉA‚±‚ê‚ðƒIƒt‚É‚µ‚ÄA -
      -    client-translation . Shift_JIS
      -
      -‚Æ‚·‚ê‚ÎAdnsproxyŒo—R‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªŽg‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -

      -‚Å‚·‚ªAIE‚ÌꇂɂÍAwebƒy[ƒW“à‚É–„‚ßž‚܂ꂽURL‚ɂ‚¢‚Ä‚ÍA -‚»‚̃y[ƒW‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɇ‚킹‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ä -DNS‚̖⇂¹‚ðs‚È‚¤‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·‚Ì‚ÅAShift_JISˆÈŠO‚Å -‹Lq‚³‚ꂽWebƒy[ƒWã‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɂ‚¢‚Ă̓NƒGƒŠ[‚ª -ޏ”s‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/dnsproxy.html b/contrib/idn/mdnkit/doc/ja/guide/dnsproxy.html deleted file mode 100644 index d05a9ed9f3..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/dnsproxy.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -dnsproxy - - - - -

      dnsproxy

      - - - -
      -

      ŠT—v

      - -

      dnsproxy ‚Í•¶Žš’Ê‚è DNS ‚̃vƒƒLƒVƒT[ƒo‚Æ‚µ‚Ä“®ì‚·‚é -ƒvƒƒOƒ‰ƒ€‚Å‚·BƒNƒ‰ƒCƒAƒ“ƒg‚Æ–{•¨‚Ì DNS ƒT[ƒo‚ÌŠÔ‚Å—¼ŽÒ‚ÌŠÔ‚Ì -’ÊMƒf[ƒ^ (DNS ƒvƒƒgƒRƒ‹ƒƒbƒZ[ƒW) ‚̕ϊ·‚ðs‚¢‚Ü‚·B - -

      ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒh‚³‚ꂽ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠÜ‚Þ -DNS—v‹‚ðŽó‚¯Žæ‚邯ADNSƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ð -‘½Œ¾Œê‰»‘Ήž‚µ‚½DNS ƒT[ƒo‚ªŽó•t‚¯‚ç‚ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -DNS ƒT[ƒo‚É‘—o‚µ‚Ü‚·B -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚Æ“¯Žž‚ɳ‹K‰»‚às‚¢‚Ü‚·B -‚Ü‚½‹t‚É DNS ƒT[ƒo‚©‚ç‚̉ž“šƒƒbƒZ[ƒW‚ðŽóM‚·‚邯A‚»‚Ì’†‚É -ŠÜ‚Ü‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éƒ[ƒJƒ‹ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAƒNƒ‰ƒCƒAƒ“ƒg‚ɕԂµ‚Ü‚·B - -

      dnsproxy ‚Í‚±‚̂悤‚ȃƒJƒjƒYƒ€‚É‚æ‚Á‚Ĉê”ʂ̃Nƒ‰ƒCƒAƒ“ƒg‚ª -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ð‰Â”\‚É‚µ‚Ü‚·B - -

      ‹ï‘Ì“I‚É‚ÍA -

        -
      • “ú–{Œê‚È‚ÇA”ñ ASCII •¶Žš‚Ì“ü‚Á‚½ƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -
      • ”ñ ASCII •¶Žš‚Ì“ü‚Á‚½ƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚ÌŒ‹‰Ê‚Æ‚µ‚Ď󂯎æ‚ê‚邿‚¤‚É - ‚È‚è‚Ü‚·B -
      - -

      - -


      -

      Ý’è

      - -

      dnsproxy ‚ðŽg—p‚·‚é‚É‚ÍAê—p‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å -Žg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚Ì•û–@‚ðݒ肵‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B - -

      - -


      -

      Žg—p–@

      - -

      dnsproxy ‚ðŽg—p‚·‚邽‚߂ɂ͂ ‚ç‚©‚¶‚ßݒ肪•K—v‚Å‚·B -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ð‚²——‚­‚¾‚³‚¢B - -

      dnsproxy ‚͈ȉº‚̃Rƒ}ƒ“ƒhsƒIƒvƒVƒ‡ƒ“‚ðŽó‚¯•t‚¯‚Ü‚·B -

      -
      -daemon -
      dnsproxy ‚ðƒf[ƒ‚ƒ“‚Æ‚µ‚Ä‹N“®‚µ‚Ü‚·B -
      -config config-file -
      config-file ‚ðƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B - ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚ɂ̓fƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ - ƒtƒ@ƒCƒ‹ (’Êí‚Í /usr/local/etc/dnsproxy.conf) ‚ªŽg—p‚³‚ê‚Ü‚·B -
      -logfile log-file -
      ƒƒO‚ðƒtƒ@ƒCƒ‹ log-file ‚Éo—Í‚µ‚Ü‚·B‚±‚̃IƒvƒVƒ‡ƒ“‚ª - Žw’肳‚ê‚È‚©‚Á‚½ê‡‚ɂ̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÅŽw’肳‚ꂽ - ƒƒOƒtƒ@ƒCƒ‹A‚Ü‚½‚̓fƒtƒHƒ‹ƒg‚̃ƒOƒtƒ@ƒCƒ‹‚Éo—Í‚³‚ê‚Ü‚·B -
      - -
      -

      §ŒÀŽ–€

      - -

      dnsproxy ‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ðŽ‚½‚È‚¢ -ˆê”ʂ̃Nƒ‰ƒCƒAƒ“ƒg‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ð‰Â”\‚É‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‚ł̓[ƒJƒ‹ƒR[ƒh‚Å‹Lq‚³‚ꂽƒhƒƒCƒ“–¼‚ðA -‚»‚̂܂ܑ½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B - -

      ‚µ‚©‚µ‚»‚ê‚ɂ̓Nƒ‰ƒCƒAƒ“ƒg‚ªƒhƒƒCƒ“–¼‚ɑ΂µ‚ēƎ©‚̃`ƒFƒbƒN‚â•ÏŠ·‚ð -s‚È‚Á‚Ä‚¢‚È‚¯‚ê‚ÎA‚Æ‚¢‚¤‘O’ñðŒ‚ª‚ ‚è‚Ü‚·B -–â‘è‚Í‚±‚Ì“_‚É‚ ‚èA -ƒNƒ‰ƒCƒAƒ“ƒg‚É‚æ‚Á‚Ä‚ÍAƒhƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðŒµ–§‚Ƀ`ƒFƒbƒN‚µ‚Ä‚¢‚½‚èA -“ÆŽ©‚ÌŽè–@‚Å•”•ª“I‚É‘½Œ¾Œê‰»‚µ‚Ä‚¢‚½‚è‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚±‚̂悤‚ȃNƒ‰ƒCƒAƒ“ƒg‚Å‚ ‚ê‚ÎAdnsproxy‚ðŽg‚Á‚Ä‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñB - -

      UNIX‚ÌꇂÍADNS‚Ö‚Ì—v‹‚Í’Ê탊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŒo—R‚µ‚Ä‘—‚ç‚ê‚Ü‚·‚ªA -Šù‘¶‚ÌƒŠƒ]ƒ‹ƒo‚̓hƒƒCƒ“–¼‚̃Vƒ“ƒ^ƒbƒNƒX‚ðƒ`ƒFƒbƒN‚µ‚Ä‚¢‚ÄA -ƒhƒƒCƒ“–¼‚Énon-ASCIIƒR[ƒh‚ªŠÜ‚Ü‚ê‚Ä‚¢‚邯ƒGƒ‰[‚Æ‚µ‚Ä -‚Í‚¶‚©‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -‚±‚Ì–â‘è‚ɑΈ‚·‚邽‚ß‚ÉAmDNkit‚É‚ÍAbind8•t‘®‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð -8ƒrƒbƒg“§‰ß‚É‚·‚邽‚߂̃pƒbƒ`‚ª•t‘®‚µ‚Ä‚¢‚Ü‚·B‚±‚̃pƒbƒ`‚ð“K—p‚µ‚½ -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð‘g‚Ýž‚ß‚ÎAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃[ƒJƒ‹ƒR[ƒh‚É‚æ‚é -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªdnsproxy‚É“n‚³‚ê‚ÄA‘½Œ¾Œê‰»DNSƒT[ƒo‚Æ‘g‚݇‚킹‚Ä -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -Windows‚ÌꇂɂÍAƒŠƒ]ƒ‹ƒo(WINSOCK)‚Í8ƒrƒbƒg“§‰ß‚ɂȂÁ‚Ä‚¢‚Ü‚·‚Ì‚ÅA -‚±‚Ì–â‘è‚Í‚ ‚è‚Ü‚¹‚ñB - -

      Žc‚é–â‘è‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ł̃`ƒFƒbƒN‚â•ÏŠ·‚Å‚·‚ªA -‚±‚ê‚Í‘ÎۂƂȂéƒNƒ‰ƒCƒAƒ“ƒg‚ª‘½”‚ ‚è‚Ü‚·‚µA‚Ü‚½A -ƒ\[ƒX‚ªŒöŠJ‚³‚ê‚Ä‚¢‚È‚¢‚à‚̂ɂ‚¢‚Ă͎è‚Ìo‚µ‚悤‚ª‚ ‚è‚Ü‚¹‚ñ‚Ì‚ÅA -Šî–{“I‚É‚ÍAmDNkit‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚¹‚ñB‚µ‚©‚µA -DNS‚̃`ƒFƒbƒN‚É‘½—p‚³‚ê‚énslookup(in bind8)‚ÆA -”Ä—p‚Ìproxy‚Æ‚µ‚ÄŽg—p‚³‚ê‚邱‚Ƃ̑½‚¢squid‚ɂ‚¢‚Ä‚ÍA -ƒhƒƒCƒ“–¼‚̃`ƒFƒbƒN‚ðŠO‚·‚½‚߂̃pƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B - -

      dnsproxy ‚ðŽg—p‚µ‚Ăǂ̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ˆµ‚¦‚邿‚¤‚ɂȂé‚Ì‚©‚ð‚܂Ƃ߂½ -•¶‘‚ð—pˆÓ‚µ‚Ä‚ ‚è‚Ü‚·‚Ì‚ÅA -‚±‚¿‚ç‚ð‚²——‚­‚¾‚³‚¢B - - - \ No newline at end of file diff --git a/contrib/idn/mdnkit/doc/ja/guide/guide.html b/contrib/idn/mdnkit/doc/ja/guide/guide.html deleted file mode 100644 index 9be7bcd579..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/guide.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - -Introduction to mDNkit - - - - -

      ƒKƒCƒhˆê——

      -

      -mDNkit‚̃KƒCƒh‚͈ȉº‚̃hƒLƒ…ƒƒ“ƒg‚©‚ç\¬‚³‚ê‚Ä‚¢‚Ü‚·B -

      - -

      -ˆê”ʃ†[ƒU‚Ì•û‚͂܂¸mDNkit‚ÌЉî‚ð‚²——‚­‚¾‚³‚¢B -‚»‚Ì‚ ‚ÆAŽg—p‚·‚鑽Œ¾ŒêƒhƒƒCƒ“ˆ—•ûŽ® (‚ ‚È‚½‚̃VƒXƒeƒ€‚Å -—˜—p‚Å‚«‚鈗•ûŽ®‚ɂ‚¢‚Ă̓VƒXƒeƒ€ŠÇ—ŽÒ‚É‚¨q‚Ë‚­‚¾‚³‚¢) ‚ɉž‚¶‚Ä -bind9 ƒpƒbƒ`A -runmdnA -mDN WrapperA -dnsproxy ‚Ì‚¢‚¸‚ê‚©‚ð‚²——‚­‚¾‚³‚¢B - -

      -–{ƒLƒbƒg‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒVƒXƒeƒ€ŠÇ—ŽÒ‚Ì•û‚Í‚·‚ׂẴKƒCƒh‚É -ˆê’Ê‚è–Ú‚ð’Ê‚µ‚Ä‚¨‚­‚±‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B - -

      -–{ƒLƒbƒg‚̓tƒŠ[ƒ\ƒtƒgƒEƒFƒA‚Å‚·B–{ƒLƒbƒg‚ÌŽg—pAÄ”z•z“™‚ÉŠÖ‚·‚é -ðŒ‚ɂ‚¢‚Ä‚Í LICENSE.txt ‚ð -‚²——‚­‚¾‚³‚¢B - -


      -

      mDNkit ‚ÌЉî

      -

      -mDNkit‚ÍAŠù‘¶‚ÌDNSƒT[ƒo(bind8/9)AŠù‘¶‚̃Nƒ‰ƒCƒAƒ“ƒg‚ÅA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚½‚߂ɒñˆÄ‚³‚ê‚Ä‚¢‚éŠeŽí‚Ì•ûŽ®‚ðŽŽŒ±“I‚É -•]‰¿‚µ‚Ă݂邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚·‚邽‚ß‚Ì -ƒpƒbƒ`Aƒc[ƒ‹Aƒ‰ƒCƒuƒ‰ƒŠ‚ð‚܂Ƃ߂½‚à‚̂ł·B -

      -]—ˆAƒhƒƒCƒ“–¼‚É‚ÍA‰pŽšA”Žš(‚¨‚æ‚уnƒCƒtƒ“)‚µ‚©Žg‚¦‚Ü‚¹‚ñ‚Å‚µ‚½B -‘½Œ¾Œê‰»‚³‚ꂽƒhƒƒCƒ“–¼‚Æ‚ÍAƒhƒƒCƒ“–¼‚Æ‚µ‚Ä‚±‚ê‚ç‚ɉÁ‚¦‚Ä“ú–{Œê‚È‚Ç -‚¢‚ë‚¢‚ë‚ÈŒ¾Œê‚Ì•¶Žš‚ðŽg‚¦‚邿‚¤‚É‚µ‚½‚à‚̂ł·B -‚»‚ÌŽÀŒ»•ûŽ®‚Æ‚µ‚ÄAŒ»ÝƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚¢‚­‚‚©‚Ì -’ñˆÄ‚ª‚È‚³‚ê‚Ä‚¢‚Ü‚·B(ŽQl•¶Œ£ ŽQÆ) -

      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·

      - -

      -DNS ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¦‚邿‚¤‚É‚·‚é‚É‚ÍA‚Ü‚¸ DNS ƒT[ƒoŠÔ‚Å -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‚·‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) ‚ð -Œˆ‚ß‚é•K—v‚ª‚ ‚è‚Ü‚·B -Œ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚ÍA‚¢‚¸‚ê‚àISO10646 ‚ðƒx[ƒX‚Æ‚µ‚½ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÅA‘å‚«‚­ŽŸ‚Ì2‚‚ɕª‚¯‚ç‚ê‚Ü‚·B -

        -
      1. ]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Ƃ̂ł«‚é•¶Žš‚¾‚¯‚ðŽg‚Á‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO -
      2. UTF-8 ‚̂悤‚ÉA]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚Ăͳ‚µ‚­‚È‚¢•¶Žš—ñ‚ƂȂé - ƒGƒ“ƒR[ƒfƒBƒ“ƒO -
      -

      -1. ‚Ì•û–@‚ÍAƒGƒ“ƒR[ƒhŒ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚Ä‚àŽg‚¦‚é•¶Žš—ñ‚ɂȂé‚Ì‚ÅA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠù‘¶‚ÌDNS‚ªŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚é•¶Žš—ñ‚Å -•\Œ»‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‚±‚Ìê‡ADNSƒT[ƒoŽ©‘Ì‚Í -Šù‘¶‚Ì‚à‚Ì‚ª‚»‚̂܂܎g‚¦‚Ü‚·B -

      -2.‚Ì•û–@‚Å‚ÍADNS ƒT[ƒo‚ð‚»‚ÌƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɑΉž‚·‚邿‚¤‚É -‰ü‘¢‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚¢‚¸‚ê‚Ì•ûŽ®‚ÉŠÖ‚µ‚Ä‚àADNS ƒT[ƒo‚ÌŽ‚ƒhƒƒCƒ“–¼‚̃f[ƒ^‚Í‚ ‚ç‚©‚¶‚ß -‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å—pˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚͈ê”Ê“I‚É‚Í SJIS “™‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -Žg—p‚·‚é‚Ì‚ÅA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¦‚邿‚¤‚É‚·‚邽‚߂ɂ͂ǂ±‚©‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ŠŒÝ•ÏŠ·‚ð‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚‚܂èƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -ˆµ‚¢ADNS ƒT[ƒo‚Í•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ňµ‚¤‚Ì‚ÅA -ƒNƒ‰ƒCƒAƒ“ƒg‚Æ DNS ƒT[ƒo‚̊Ԃ̂ǂ±‚©‚ŃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽw’肵‚½ -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚Ö -•ÏŠ·‚µA -‚Ü‚½ DNS ƒT[ƒo‚©‚ç‚̉ž“š‚Ɋ܂܂ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -ƒNƒ‰ƒCƒAƒ“ƒg‚Å•\ަ‰Â”\‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚³‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      -‚±‚Ì‚½‚߂ɂ͎Ÿ‚Ì3Ží—Þ‚Ì•û–@‚ªl‚¦‚ç‚ê‚Ü‚·B -

      -
      a. ƒNƒ‰ƒCƒAƒ“ƒg‚ł̕ϊ·
      - ƒNƒ‰ƒCƒAƒ“ƒg‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚éB - client-side conversion -

      -

      b. DNS ƒT[ƒo‚ł̕ϊ·
      - DNS ƒT[ƒo‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚éB - server-side conversion -

      -

      c. ƒvƒƒLƒVƒT[ƒo‚ł̕ϊ·
      - ƒNƒ‰ƒCƒAƒ“ƒg‚Æ DNS ƒT[ƒo‚̊ԂɃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·—p‚Ì’†ŒpƒT[ƒo‚ð - Ý‚¯‚éB - proxy conversion -
      -

      - -‚½‚¾‚µ b. ‚Ì•ûŽ®‚Í DNS ƒT[ƒo‚É•s•K—v‚É•¡ŽG‚È‹@\‚ðŽ‚¿ž‚Þ‚±‚ÆA•‰ -‰×‚ð‚‚߂邱‚ƂȂǂ̖â‘肪‚ ‚èD‚Ü‚µ‚­‚È‚¢‚½‚ßA–{ƒLƒbƒg‚Å‚Í a. ‚Æ -c. ‚Ì2’Ê‚è‚Ì•û–@‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

      -mDNkit‚ÍAŠù‘¶‚ÌDNSƒT[ƒoAƒNƒ‰ƒCƒAƒ“ƒg‚ðAŬŒÀ‚̉ü‘¢‚Å -•¡”‚Ì•ûŽ®‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ŽÀÛ‚ÉŽŽ‚µ‚Ă݂邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚·‚é‚à‚̂ł·B -

      - -

      ³‹K‰»

      - -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚߂ɂÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‘¼‚É‚àd—v‚È -‹@”\‚ª‚ ‚è‚Ü‚·B‚»‚ê‚̓hƒƒCƒ“–¼‚̳‹K‰»‚Å‚·B - -

      ‚·‚Å‚Éq‚ׂ½‚悤‚ÉADNS ƒT[ƒoŠÔ‚ÅŽg—p‚³‚ê‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é•ûŽ®‚Í‚¢‚¸‚ê‚à ISO10646 ‚ðƒx[ƒX‚Æ‚µ‚Ä‚¢‚Ü‚·‚ªA -ISO10646 ‚ł͌©‚©‚¯ã‘S‚­“¯ˆê‚Ì•¶Žš‚ð•\‚·•û–@‚ª•¡”‚ ‚éꇂª‚ ‚è‚Ü‚·B -‚±‚̂悤‚È•¶Žš‚ɑ΂µ‚Ä‚»‚Ì•\Œ»•û–@‚ð1‚‚ɓˆê‚µ‚È‚¢‚ÆAƒ†[ƒU‚ª -³‚µ‚¢ (‚ÆŽv‚¦‚é) ƒhƒƒCƒ“–¼‚ð“ü—Í‚µ‚½‚É‚àŠÖ‚í‚炸A–¼‘O‰ðŒˆ‚ª‚Å‚«‚È‚¢ -‚Æ‚¢‚¤•s“s‡‚ª¶‚¶‚邱‚ƂɂȂè‚Ü‚·B - -

      ‚Ü‚½A]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Å‚ÍAƒhƒƒCƒ“–¼‚̃}ƒbƒ`ƒ“ƒO‚ÌÛ‚É‘å•¶Žš‚Æ -¬•¶Žš‚Í“¯ˆêŽ‹‚³‚ê‚Ä‚¢‚Ü‚µ‚½B‚±‚ê‚ð‚»‚Ì‚Ü‚Ü‘½Œ¾ŒêƒhƒƒCƒ“–¼‚É‚à“K—p‚·‚é -‚±‚Æ‚ÍAƒ}ƒbƒ`ƒ“ƒO‚̈—Œø—¦‚Ȃǂ̓_‚Å–â‘肪‚ ‚èA‚ ‚ç‚©‚¶‚ß‚·‚ׂĬ•¶Žš -‚ ‚é‚¢‚Í‘å•¶Žš‚É“ˆê‚·‚é‚Ì‚ª‚æ‚èŒø—¦“I‚¾‚Æl‚¦‚ç‚ê‚Ü‚·B - -

      ‚±‚̂悤‚ɃhƒƒCƒ“–¼‚ð‚ ‚ç‚©‚¶‚ßݒ肵‚½Šî€‚É‚µ‚½‚ª‚Á‚Ä•W€Œ`‚ɕϊ·‚·‚é‚Ì‚ª -³‹K‰»‚Å‚·BŠî–{“I‚ɂͳ‹K‰»‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯Žž‚És‚í‚ê‚é‚Ì‚ÅA -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯‚¶‚­ -

        -
      • ƒNƒ‰ƒCƒAƒ“ƒg‚ł̳‹K‰» -
      • DNS ƒT[ƒo‚ł̳‹K‰» -
      • ƒvƒƒLƒVƒT[ƒo‚ł̳‹K‰» -
      -‚Ì3Ží—Þ‚Ì•û–@‚ªl‚¦‚ç‚ê‚Ü‚·B‚»‚µ‚Ä2”Ô–Ú‚Ì•ûŽ®‚ªD‚Ü‚µ‚­‚È‚¢‚±‚Æ‚à -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Æ“¯‚¶‚Å‚·B - -

      ƒNƒ‰ƒCƒAƒ“ƒg‚ł̕ϊ·E³‹K‰»

      - -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤•û–@‚Ì‚ ‚é‚ׂ«Žp‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ȂǂɃGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ⳋK‰»‚Ì‹@”\‚ð -Ž‚½‚¹‚邱‚Ƃɂæ‚Á‚ÄADNS ƒvƒƒgƒRƒ‹‚ɂ̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -ƒf[ƒ^‚ðˆêØÚ‚¹‚È‚¢‚±‚Æ‚¾‚Æl‚¦‚ç‚ê‚Ü‚·B -‚±‚̈—•û–@‚ðŽÀŒ»‚·‚邽‚ß‚É mDNkit ‚ł͂¢‚­‚‚©‚Ì•ûŽ®‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B - -

      - -
      bind9 ‚ɑ΂·‚éƒpƒbƒ`
      -‚±‚̃pƒbƒ`‚Í bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚ɃGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚¨‚æ‚Ñ -³‹K‰»‚Ì‹@”\‚ðŽ‚½‚¹‚é‚à‚̂ł·B -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Í‚±‚̃pƒbƒ`‚ð“K—p‚µ‚½ bind9 ‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð -ƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚èA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B -
      -conversion/normalization by bind9 patch -
      -

      - -

      runmdn ƒRƒ}ƒ“ƒh
      -‚±‚̃Rƒ}ƒ“ƒh‚ÍAbind4 ‚ ‚é‚¢‚Í bind8 ƒx[ƒX‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚Â -Unix ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðAăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É -‚µ‚Ü‚·B‚±‚ê‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—˜—p‚µ‚ÄAƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ì -’ñ‹Ÿ‚·‚éˆê•”‚ÌŠÖ”‚𑽌¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð•t‰Á‚µ‚½ƒo[ƒWƒ‡ƒ“‚É -“®“I‚É’u‚«Š·‚¦‚邱‚ƂŎÀŒ»‚³‚ê‚Ü‚·B -
      -conversion/normalization by runmdn -
      -

      - -

      mDN Wrapper
      -‚±‚ê‚Í Windows ƒNƒ‰ƒCƒAƒ“ƒg‚ðA‚â‚Í‚èăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ˆµ‚¦‚邿‚¤‚É‚·‚é‚à‚̂ł·BDLL ‚Ì‹@\‚ð—˜—p‚µ‚ÄA–¼‘O‰ðŒˆ‚ðs‚¤ WINSOCK -‚̈ꕔ‚ÌŠÖ”‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð•t‰Á‚·‚邱‚ƂŎÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B -
      -conversion/normalization by winsock wrapper -
      - -
      - -

      runmdn ƒRƒ}ƒ“ƒh‚Æ mDN Wrapper ‚ÍAŠù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ð•ÏX‚¹‚¸‚É -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‹@”\‚ð•t‰Á‚µ‚悤‚Æ‚·‚é‚à‚̂ł·‚ªAŽÀۂɂ͂¢‚­‚‚©‚Ì -§ŒÀŽ–€‚ª‚ ‚èA‚ǂ̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚à“K—p‚Å‚«‚é‚à‚̂ł͂ ‚è‚Ü‚¹‚ñB -Ú‚µ‚­‚Í‚»‚ꂼ‚ê‚̉ðà‚ð‚²——‚­‚¾‚³‚¢B - -

      ‚Ü‚½ bind9 ƒpƒbƒ`‚Æ‚¢‚¦‚Ç‚àA—Ⴆ‚΃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª“ÆŽ©‚É -ƒhƒƒCƒ“–¼‚Ì•¶Žšƒ`ƒFƒbƒN‚ðŽÀs‚µ‚ĉp”Žš‚ƃnƒCƒtƒ“ˆÈŠO‚Ì•¶Žš‚ðŠÜ‚Þ -ƒhƒƒCƒ“–¼‚ðƒGƒ‰[‚É‚µ‚Ä‚¢‚½‚è‚·‚éꇂɂ͖³—͂ł·B - -

      ƒvƒƒLƒVƒT[ƒo‚ł̕ϊ·E³‹K‰»

      - -

      ‚·‚Å‚Éq‚ׂ½‚悤‚ÉAƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Í -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÅŽÀs‚·‚é‚Ì‚ª—‘z“I‚¾‚Æl‚¦‚ç‚ê‚Ü‚·‚ªA -ŽÀÛ–â‘è‚Æ‚µ‚ă\[ƒX‚ªŒöŠJ‚³‚ê‚Ä‚¢‚È‚¢‚½‚ß‚»‚̂悤‚ȉü—ǂ̂ł«‚È‚¢ -ƒNƒ‰ƒCƒAƒ“ƒg‚âA“ÁŽê‚ÈƒŠƒ]ƒ‹ƒo‚ðŽ‚Á‚Ä‚¢‚Ä runmdn ‚ª“K—p‚Å‚«‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ª -‘¶Ý‚µ‚Ü‚·B - -

      ‚»‚±‚Å mDNkit ‚Å‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒh‚³‚ꂽ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŠÜ‚ÞDNS—v‹‚ðŽó‚¯Žæ‚èA‘½Œ¾Œê‰»‘Ήž‚µ‚½ -DNS ƒT[ƒo‚ªŽó•t‚¯‚ç‚ê‚é•W€ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ɕϊ·‚µA -‚Ü‚½‹t‚É DNS ƒT[ƒo‚©‚ç‚̉ž“š‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éŒ`Ž®‚É–ß‚· DNS proxy ƒT[ƒo‚ð -—pˆÓ‚µ‚Ü‚µ‚½B - -

      dnsproxy‚ðŽg‚¤‚ÆA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ªƒhƒƒCƒ“–¼‚̃`ƒFƒbƒN‚â•ÏŠ·‚ð -s‚È‚Á‚Ä‚¢‚È‚¯‚ê‚ÎAƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃[ƒJƒ‹ƒR[ƒh‚Å‹Lq‚³‚ꂽ -ƒhƒƒCƒ“–¼‚ðA‚»‚̂܂ܑ½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg‚¤‚±‚Æ‚ª‚Å‚«‚é -‚悤‚ɂȂè‚Ü‚·B -

      -mDNkit - DNS Proxy Server -
      - -

      - -

      DNS‘¤‚ł̃hƒƒCƒ“–¼‚̕ϊ·

      -

      -DNS ƒT[ƒo‘¤‚̃][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚â named.conf ƒtƒ@ƒCƒ‹ã‚̃hƒƒCƒ“–¼‚ÍA -‚ ‚ç‚©‚¶‚ßA‹K’肳‚ꂽƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚· -(‘Oq‚Ì——R‚É‚æ‚è -DNS ƒT[ƒo‚ɕϊ·‹@”\‚ðŽ‚½‚¹‚é•û–@‚Í‚±‚±‚Å‚Íl‚¦‚Ü‚¹‚ñ)B -

      -mDNkit‚Å‚ÍAŠÇ—ŽÒ‚Í‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -쬂µ‚Ä•K—v‚ɉž‚¶‚ĕϊ·‚µ‚ÄŽg‚¤‚à‚̂Ƒz’肵A -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Å•K—v‚Æ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·ƒc[ƒ‹mdnconv‚ð’ñ‹Ÿ‚µ‚Ü‚·B - -

      -mDNkit - mDN converter -
      - - - - - - -
      ’: - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽƒ][ƒ“ƒ}ƒXƒ^ - ƒtƒ@ƒCƒ‹‚𑽌¾ŒêƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö•ÏŠ·‚·‚邱‚Ƃ͂ł«‚Ü‚·‚ªA - ‘½Œ¾ŒêƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ă͋t•ÏŠ·‚ª - ‚Å‚«‚È‚¢‚±‚Æ‚ª‚ ‚è‚Ü‚·B - ‚±‚ê‚ÍAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ă͂»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å - ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Æ’Êí‚Ì ASCII •¶Žš—ñ‚ª - ‹æ•ʂł«‚¸Aƒtƒ@ƒCƒ‹‚̂ǂ̕”•ª‚ð‹t•ÏŠ·‚·‚ׂ«‚©”»’è‚Å‚«‚È‚¢ - ‚à‚Ì‚ª‚ ‚邽‚߂ł·B - ‚µ‚©‚µADNS‚ÌŠÇ—‚Ì‚½‚߂ɂÍA - ‹t•ûŒü‚̕ϊ·‚à•K—v‚É‚È‚é‚ÆŽv‚¢‚Ü‚·‚Ì‚ÅAˆê•”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - ‘΂µ‚Ă͋t•ÏŠ·‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -
      -

      - -

      DNSŽ©‘̂̑½Œ¾Œê‰»

      - -

      -DNS ƒT[ƒo‚ÌŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚æ‚Á‚Ä‚ÍA -DNSƒT[ƒoŽ©‘Ì‚ªƒhƒƒCƒ“–¼‚ð8ƒrƒbƒg“§‰ß‚ňµ‚¤‚±‚Æ‚ð -—v‹‚·‚é‚à‚Ì‚à‚ ‚è‚Ü‚·B -‚±‚̂悤‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̑Έ‚Ì‚½‚ß‚É -mDNkit‚É‚Íbind8‚ð8ƒrƒbƒg“§‰ß‚É‚·‚邽‚߂̃pƒbƒ`‚ª -ŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B‚±‚̃pƒbƒ`‚Íbind8‚Ɋ܂܂ê‚Ä‚¢‚é -nslookupAresolver‚ɂ‚¢‚Ä‚à8ƒrƒbƒg“§‰ß‚É‚µ‚Ü‚·B - -

      bind9 ‚Ì DNS ƒT[ƒo‚Í–{—ˆ8ƒrƒbƒg“§‰ß‚ɂȂÁ‚Ä‚¢‚Ü‚·‚ªA -ƒhƒƒCƒ“–¼‚ð“à•”Œ`Ž®‚©‚çƒeƒLƒXƒgŒ`Ž®‚ɕϊ·‚·‚éÛA8ƒrƒbƒg•¶Žš‚ð -`\DDD' ‚Æ‚¢‚¤•\Œ»‚ɕϊ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA‚±‚ê‚ð—}§‚µ‚Ä UTF-8 •¶Žš‚Í -‚»‚̂܂ܓ§‰ß‚·‚邿‚¤‚É‚·‚é‹@”\‚ª bind9 ƒpƒbƒ`‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚·B - -

      - -

      •â‘«

      -ŽÀÛ‚ÉmDNkit‚ðŽg—p‚·‚é‚É‚ÍAˆÈ‰º‚̃hƒLƒ…ƒƒ“ƒg‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B - -‚»‚ꂼ‚ê‚̃vƒƒOƒ‰ƒ€Aƒ‰ƒCƒuƒ‰ƒŠA‚¨‚æ‚ÑÝ’èƒtƒ@ƒCƒ‹‚ÌŽd—l‚ɂ‚¢‚Ä‚Í -ˆÈ‰º‚̃hƒLƒ…ƒƒ“ƒg‚ð‚²——‚ɂȂÁ‚Ä‚­‚¾‚³‚¢B - - - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/dnsproxy.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/dnsproxy.jpg deleted file mode 100644 index 44609568840bf0a92513a9fe5cb033923e5e09b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24235 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
      wRpM(zSSm$rG7kO(SBd` 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 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/method_bind9.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/method_bind9.jpg deleted file mode 100644 index 922b423f1e793c5defd71d98742927aea939e089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18873 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 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/method_named.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/method_named.jpg deleted file mode 100644 index f83ee212dfe6acfc9558759a76013ce6478e5c23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14311 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 vopbx0ovQu{@^mogdN^E?T~br<aM&_b0C(u+W- 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 QEdOpt{NM8k)78ZP0rmf!%K!iX diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/method_resolver.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/method_resolver.jpg deleted file mode 100644 index 1dbab0e6126b1a26d50f53f90acb1af035969812..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14425 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 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/method_wrapper.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/method_wrapper.jpg deleted file mode 100644 index 992f57e1c5481d8a8cc16a2fe00ed678cf6adc39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14693 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 BY4iX9 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config1.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config1.jpg deleted file mode 100644 index 002a7a23cd51ed37dd46e72ce1da2174aac49fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15783 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 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config2.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config2.jpg deleted file mode 100644 index 0d7eece4a480903f474bafb22faf82d749d99ed6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20918 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 PvsGmOyno@fH}$^&BW-~t diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config3.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config3.jpg deleted file mode 100644 index f541e576c78b75cbdd9c48d02029077a8025c41a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36290 zcmeFZby!@@wI-3h_n9fAgT4H`&rZ8ShbaCg@b8X9*eKyVL1gM`2| zkncO^H{aZQ&OFcDJM%nq>W^K!R=w|9tEy}7U90x4zMZ{Y20W3Kl#v9$!NCLW)9qJ) zH~{$QG1_BPAlhRz3=AM9HrX@mr%$nIh@az;G1IZJGSe|Ja`4Lvb8t)YFfxg1iAl;U zs;a573+o!|D!-OhQB}HA0*8TtfsKVt{p=aF5*HJf(*Jb2?Eqk*!j;2kA;4h);IZHk zu;6aH07L*d06YR5+=I9GM>u!{L?mPsSf$z%02~559MU6n6jXTF843&stHeTjiv5CZ z4Ck4OntB{4ejFK>oLx*+!`L|?tD1w$#L4wt6$R%@m%yAat1E{nl-xDq*;Lf8OwBtd z++a!x;r^t5GYJQegouC)tK-Ik8GwUFM1n_#hld%4LEy095maFI*b#Bq#14&}-o<5A zeHkNP;W$E~P<<&Lm|cB44?stN@vsoE03v`b=8|->p=VsLhM0pNnOSnTXiGN_ZbiQB zhjIwVwl9~hCz9yQ7H|MpJlSU#p0$E!atdsp3mpe)=S z?%FhNB_^=7f4n54G6fDBgn07)m%0Dy%>RpqiVZw!BM*|zRGhNtKa$w)ue6Vc9wIu7 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 TODue|4Yt&zb)Qw9JcU diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config4.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config4.jpg deleted file mode 100644 index e1371c21b90f9f56acbc10f6f766db88ba32ccae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22510 zcmeHv1yo&2vgknqNpN=y5}cq1m*5cGJvijxt|35z>%l!(aCZ;Ef(M7-?j9`IKagbZ zow+mf?t5?E`)mC_z1P{NrMkLyb?@F))m?o%dAk5Wl@gN_13*DR1Mb7^G(Z@D^yo3d zlj)gl2_-LIXgfLBXIw-L?bp z0Z;&F7^ok_{{yqprBzM{U8Yq62(vu(nrT6V_`jDhP8d-UH0I)Vq|*j(BdKa z?NnYr=+bEO#4rXcs-nL z)wphoiDr*lB&ekms40(-JP4e@N}HaNpiFx!yHI#D*CX`w(^DH&FKc7cs6~VyK+*ya zb?z!g`^ddT{sjd811Q$na|Z7Y0mbZ@jmcfLpE;uuk_`h3eK&JiJ~DI8aHgjx6zBtc z4Zf_GZs12i#~HlT50D(I?OIkonJo#*lo@Au)4V20*reJ$1!c;WKF6^8D^GKtdbXupjtQCc*b{byZ*D`g|DgA+`bl3L|GsUdG1>PM9{a!;g z;(aB@*&iSk^#hZv_lU=xI)0E-QB8jb66>rojcum|d4~Gp$qMjY+oMh$$+36Ou*G9A zAbm%l%r6kDDb_m>jai^YLiZgpn>((49*V_`aR$37b`W8 zCvYJ83G#k7=?;W4g>RbUzUiC>lY1;|>lRaYXz4cxrhd@E{sTgq8&qwva>oW4=L6P= zJ1UvyKMn{(h%$v!?*@FH|1}=YxN|cOk3hFt4N7@9kbzBx2`q19KWh?FpnKVN z3uqQyYQd^ZDn2RFxdn{ewD5haK*m33s7|d4ym}3qINRJ--}`8TUXI;BQx<9K4r-a< zO}o;S;Z-h=`Ia;P?Q-~af$>;}^A=+@ohKbu;I}Y7KC7$oMpbi(L)Ez^UespNO(If? zmZfP`X`z-|0EykVTA95q7s|fRr?W#zzJ>-91f(--)0jIhNXX3o1RiQe;MbwOLTbcb^G>|F~v23y;vkI4LF1xpuaU(6|< zaXgin;A>NrsVTN=G(y;S<(+dt?IZ^daP=Pqp{b2j z0s`H%c*S61midXs#JLg<+2(>KR<0DqB0u$$@KCAGKbhmf4sXwZ#(pTBEUP7GYsRw> zxi;3!YYZC}7#8bp%w80=_w$7yX;$kCMNX`dCQShXtj7HP*(wuyT@h66`A=a%#Rg*P~rGWNlNL zSydh#5oeRt@Aj}lHlMH*p%i$6s0G_r7PeIY6iebu$O$HIvA1;Y^<3ihhUfNR41Q$7 zF6ZBt5IAbXTSGIjU%rYnE*C)wpV5)>q7QALFb^CHh1QeEg+MrPKIy|gcRIE_SJnh> z0f%A3tLgF6Vc1TY`gjbn*~FS8@p#Rg0hSPBt0rGFo)bSKxCLDE7YutvrJ` z7=t--jS9JYPPGE`@;tOFbIW?+Js%oO^s~J*Qmb9)oO7}TdLlQwa7beqzj`VN$L1b{# zkwKs)w)&2+vO-tjRV$pI9JbTDx0%JlA2Rk~40kg1m+f4&a*JiAY zM8Um`wg=KSR&$q2*Z3!-LzAksN79?Cwj5MzXE*sFR{Z3xB-f}w610Wzn*a(Yyr8

      V|S-lf9}U<{rUK_Dl1gYphi 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 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config5.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config5.jpg deleted file mode 100644 index 3060cfe3dd89a7dcb5c8d62311c672f5f2fd44d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18183 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 i*Y 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 D`MYy1 diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config8.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config8.jpg deleted file mode 100644 index 62b17aee16e29a01151d03c063db71c895df59ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25806 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 Ww9(h_N6V~b^+u;ovarbizX<^QmDJq; diff --git a/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config9.jpg b/contrib/idn/mdnkit/doc/ja/guide/img/wrapper_config9.jpg deleted file mode 100644 index 245a7836cdcd11ef4df3d9687425296b656065fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38239 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 z 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 rQ5h=xOI1i2bPY^}h6Z=WN}EEMwJj1;?#F3tSN? - - - - -mDNkit installation guide - - - - -

      ƒCƒ“ƒXƒg[ƒ‹

      - -

      mDNkit ‚̃Rƒ“ƒpƒCƒ‹‚¨‚æ‚уCƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚ĉðà‚µ‚Ü‚·B -‚±‚±‚ł̓\[ƒX‚©‚ç‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Äà–¾‚µ‚Ü‚·B -ƒoƒCƒiƒŠƒpƒbƒP[ƒW‚Ì”z•z‚à—\’肳‚ê‚Ä‚¢‚Ü‚·‚ªA -‚»‚ê‚ç‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ÉŠÖ‚µ‚Ă͂»‚ꂼ‚ê‚̃pƒbƒP[ƒW‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B - -

      –{ƒhƒLƒ…ƒƒ“ƒg‚Å‚Í Unix —p‚̃Rƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Ä -à–¾‚µ‚Ü‚·BWindows —p‚Ì mDN Wrapper ‚̃Cƒ“ƒXƒg[ƒ‹ -•û–@‚ÉŠÖ‚µ‚Ä‚Í mDN Wrapper ‚̃ZƒbƒgƒAƒbƒv‚Ì -€‚ð‚²——‚­‚¾‚³‚¢B - -

      ƒ\[ƒX”z•z‚©‚ç‚̃Cƒ“ƒXƒg[ƒ‹Žè‡‚Í‚¨‚æ‚»ŽŸ‚̂悤‚ɂȂè‚Ü‚·B - -

        -
      1. ‘O€”õ -
      2. ”z•zƒ\[ƒX‚Ì“WŠJ -
      3. configure ŽÀs -
      4. ƒRƒ“ƒpƒCƒ‹ -
      5. ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ -
      - -

      ƒCƒ“ƒXƒg[ƒ‹‚ÌŒã‚ÍADNS ƒT[ƒo‚ÌÝ’è -‚¨‚æ‚Ñ mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -A‚³‚ç‚É dnsproxy ‚ðŽg—p‚·‚éê‡‚É‚Í -DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ -‚ðŽQÆ‚µ‚ÄÝ’è‚ðs‚Á‚Ä‚­‚¾‚³‚¢B - -

      ƒ\[ƒX”z•z‚Ɋ܂܂ê‚Ä‚¢‚éƒpƒbƒ`‚ð“K—p‚·‚éꇂɂÍA -‚»‚ꂼ‚ꎟ‚̎臂ɂµ‚½‚ª‚Á‚Ä‚­‚¾‚³‚¢B -

      - -
      - -

      ‘O€”õ

      - -

      iconv ‚̃Cƒ“ƒXƒg[ƒ‹

      - -

      mDNkit ‚Í EUC ‚â SJIS ‚ȂǗlX‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽ -ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚邽‚ß‚ÉA”Ä—p‚̃R[ƒhƒZƒbƒg•ÏŠ· -ƒ†[ƒeƒBƒŠƒeƒB‚Å‚ ‚é iconv() ‚ðŽg—p‚µ‚Ü‚·B -‚»‚±‚ÅAFreeBSD ‚È‚Ç iconv() ‚ª•W€‚Å‘g‚Ýž‚Ü‚ê‚Ä‚¢‚È‚¢ƒVƒXƒeƒ€‚Å‚ÍA -mDNkit ‚̃Cƒ“ƒXƒg[ƒ‹‚Éæ—§‚Á‚Ä iconv() ‚ðƒCƒ“ƒXƒg[ƒ‹ -‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚Ü‚½AmDNkit ‚Í iconv() ‚ª -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚邱‚Æ‚ð—v‹‚µ‚Ü‚·BƒVƒXƒeƒ€•t‘®‚Ì -iconv() ‚ª UTF-8 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡‚ɂ͂â‚Í‚è -ŠO•”‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      iconv() ‚̃tƒŠ[‚ÈŽÀ‘•‚Æ‚µ‚Ä‚ÍA—Ⴆ‚Î libiconv -

      -

      ‚ª‚ ‚èAƒ\[ƒX‚ðã‹L‚̃y[ƒW‚©‚ç“üŽè‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -‚±‚ê‚Í LGPL ‚ÉŠî‚¢‚½ƒtƒŠ[ƒ\ƒtƒgƒEƒFƒA‚ÅA‘½‚­‚Ì Unix Œn OS ‚Ì -‚à‚Æ‚Å“®ì‚µ‚Ü‚·B‚±‚̃pƒbƒP[ƒW‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚ɂ‚¢‚Ä‚ÍAã‹Lƒy[ƒW‚©A -‚ ‚é‚¢‚̓\[ƒX”z•z‚Ɋ܂܂ê‚é INSTALL.generic ƒtƒ@ƒCƒ‹‚ð‚²——‚­‚¾‚³‚¢B - -

      - -

      bind9 ƒ\[ƒX‚Ì“üŽè

      - -

      mDNkit ‚Í bind9 ‚ɑ΂·‚éƒpƒbƒ`‚ð’ñ‹Ÿ‚µ‚Ä‚¨‚èA‚±‚ê‚É‚æ‚Á‚Ä -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Ƃ̂ł«‚é bind9 ‚ÌƒŠƒ]ƒ‹ƒo‚¨‚æ‚уT[ƒo‚ð -쬂·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B–{ƒLƒbƒg‚Ɋ܂܂ê‚éƒpƒbƒ`‚Í BIND 9.0.0 ‚É -‘΂·‚é‚à‚̂ł·Bƒ\[ƒX‚͈ȉº‚Ìꊂ©‚çƒ_ƒEƒ“ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      -

      - -

      bind8 ƒ\[ƒX‚Ì“üŽè

      - -

      dnsproxy ‚ð—˜—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg—p‚Å‚«‚邿‚¤‚É‚·‚邽‚߂ɂÍA -–¼‘O‰ðŒˆ‚ðs‚¤ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ð 8bit ƒXƒ‹[‚É‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚Ü‚½ DNS ƒT[ƒo‚Å‚àA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é UTF-5 ‚â RACE ˆÈŠO‚ÌA -—Ⴆ‚Î UTF-8 ‚Ȃǂ̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚·‚邽‚߂ɂÍA -8bit ƒXƒ‹[‚Ì DNS ƒT[ƒo‚ðŽg—p‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      mDNkit ‚ɂ͂±‚Ì‚½‚ß‚É -BIND 8.2.2-P7 ‚¨‚æ‚Ñ BIND 8.2.3-T6B ‚ð 8bit ƒXƒ‹[‚É‚·‚é -ƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·Bƒpƒbƒ`‚ð“K—p‚µ‚½ bind8 ‚ðŽg—p‚µ‚½‚¢ê‡‚É‚Í -‚ ‚ç‚©‚¶‚ß‚¢‚¸‚ê‚©‚̃o[ƒWƒ‡ƒ“‚̃\[ƒX‚ð—pˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -ƒ\[ƒX‚͈ȉº‚Ìꊂ©‚çƒ_ƒEƒ“ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      - -

      - -

      Squid ƒ\[ƒX‚Ì“üŽè

      - -

      Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚ÍA‚»‚̂܂܂ł͑½Œ¾Œê -ƒhƒƒCƒ“–¼‚ª“ü—Í‚³‚ê‚邯‚»‚ê‚ðƒGƒ‰[‚É‚µ‚Ä‚µ‚Ü‚¢AŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB -‚±‚Ì‚½‚ßmDNkit ‚É‚Í -Squid-2.3.STABLE3 ‚ð -8bit ƒXƒ‹[‚É‚·‚éƒpƒbƒ`‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·BSquid ‚𑽌¾ŒêƒhƒƒCƒ“–¼‚ÅŽg—p -‚µ‚½‚¢ê‡‚ɂ͂±‚̃\[ƒX‚à—pˆÓ‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -


      - -

      ”z•zƒ\[ƒX‚Ì“WŠJ

      - -

      mDNkit ‚ÉŠÖ‚·‚éÅVî•ñ‚͈ȉº‚Ìꊂ©‚ç“üŽè‰Â”\‚ÅA -ÅV‚Ì”z•zƒ\[ƒX‚̃_ƒEƒ“ƒ[ƒh‚à‚Å‚«‚Ü‚·B -

      - -

      “üŽè‚µ‚½ mDNkit ‚Ì”z•zƒ\[ƒX‚ð“WŠJ‚µ‚Ü‚·B -”z•zƒ\[ƒX‚̃tƒ@ƒCƒ‹–¼‚ð mdnkit-X.Y.tar.gz‚Æ‚·‚邯 -ŽŸ‚̂悤‚É‚µ‚Ä“WŠJ‚Å‚«‚Ü‚·B - -

      -
      -% gunzip mdnkit-X.Y.tar.gz
      -% tar -xf mdnkit-X.Y.tar
      -
      -
      - -

      “WŠJ‚·‚邯Amdnkit-X.Y‚Æ‚¢‚¤ƒfƒBƒŒƒNƒgƒŠ‚ªì‚ç‚ê‚Ü‚·‚Ì‚ÅA -‚»‚±‚Ɉړ®‚µ‚Ä‚­‚¾‚³‚¢B -

      -
      -% cd mdnkit-X.Y
      -
      -
      - -

      ˆÈ~‚Ìà–¾‚Å‚ÍA‚±‚̃fƒBƒŒƒNƒgƒŠ‚ð $MDNTOP ‚Æ‚¢‚¤–¼‘O‚Å -ŽQÆ‚µ‚Ü‚·BŠÂ‹«•Ï” $MDNTOP ‚ðݒ肵‚Ä‚¨‚­‚ƕ֗˜‚Å‚µ‚傤B -

      -
      -% setenv MDNTOP `pwd`         (csh Œn‚̃VƒFƒ‹‚Ìê‡)
      -% MDNTOP=`pwd`; export MDNTOP (sh Œn‚̃VƒFƒ‹‚Ìê‡)
      -
      -
      - -

      - -


      - -

      configure ŽÀs

      - -

      ‚Ü‚¸ mDNkit ‚Ì–{‘̂ł ‚éA -

        -
      • MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) -
      • DNS ƒvƒƒLƒVƒT[ƒo (dnsproxy) -
      • ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ƒR[ƒh•ÏŠ·ƒc[ƒ‹ (mdnconv) -
      • runmdn ƒRƒ}ƒ“ƒh -
      -

      ‚̃Rƒ“ƒpƒCƒ‹‚ðŽÀs‚µ‚Ü‚·B - -

      ‚Ü‚¸AmDNkit ‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ -($MDNTOP ‚ÌŽw‚·ƒfƒBƒŒƒNƒgƒŠ) ‚Ɉړ®‚µA -configure ƒXƒNƒŠƒvƒg‚ðŽÀs‚µ‚Ü‚·B -configure ‚̓wƒbƒ_ƒtƒ@ƒCƒ‹‚⃉ƒCƒuƒ‰ƒŠ‚Ì—L–³‚È‚ÇAƒVƒXƒeƒ€–ˆ‚Ì -“Á’¥‚𒲂×AƒRƒ“ƒpƒCƒ‹ŠÂ‹«‚ð“KØ‚ÉÝ’è‚·‚邽‚߂̃c[ƒ‹‚Å‚·B - -

      -
      -% cd $MDNTOP
      -% ./configure
      -
      -
      - -

      ƒVƒXƒeƒ€‚É iconv() ‚ª‘g‚Ýž‚Ü‚ê‚Ä‚¢‚ÄA‚©‚ƒRƒ“ƒpƒCƒ‹Žž‚É -“Á•ʂȃIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚È‚¢‚È‚çã‹L‚̂悤‚É‚È‚É‚àˆø”‚ðŽw’肹‚¸‚É -ŽÀs‚·‚ê‚΂悢‚̂ł·‚ªA‚»‚¤‚ł͂Ȃ¢ê‡AƒIƒvƒVƒ‡ƒ“‚âŠÂ‹«•Ï”‚Å -configure ‚Ì“®ì‚ð•Ï‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      configure ‚ÉŽw’è‚Å‚«‚éƒIƒvƒVƒ‡ƒ“‚Ì’†‚Å mDNkit ‚É -’¼ÚŠÖŒW‚·‚é‚à‚͈̂ȉº‚Ì’Ê‚è‚Å‚·B - -

      -
      --with-iconv=LIB -
      ƒVƒXƒeƒ€‚É iconv() ‚ª‘g‚Ýž‚Ü‚ê‚Ä‚¢‚È‚¢A‚ ‚é‚¢‚Í - ƒVƒXƒeƒ€‚Ì iconv() ‚ðŽg‚¢‚½‚­‚È‚¢‚Ȃǂ̗—R‚ÅV‚½‚É - iconv() ‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ê‡‚ÉA‚±‚̃IƒvƒVƒ‡ƒ“‚ð - —p‚¢‚Ä iconv() ‚̃‰ƒCƒuƒ‰ƒŠ‚ðŽw’肵‚Ü‚·BLIB ‚Å - ƒ‰ƒCƒuƒ‰ƒŠ‚ðŽw’肵‚Ü‚·Bƒ‰ƒCƒuƒ‰ƒŠƒtƒ@ƒCƒ‹‚ðƒtƒ‹ƒpƒX‚ÅŽw’è‚·‚é‚©A - ‚ ‚é‚¢‚Í C ƒRƒ“ƒpƒCƒ‰‚É—^‚¦‚éƒIƒvƒVƒ‡ƒ“‚ÌŒ`Ž®‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B -

      —Ⴆ‚ΑO€”õ‚É‹“‚°‚½ - iconv ‚̃pƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ê‡AƒfƒtƒHƒ‹ƒg‚Å‚Í - /usr/local/lib ‚Ì libiconv ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚é‚Ì‚ÅA -

      -
      ---with-iconv="-L/usr/local/lib -liconv"
      -
      -
      - ‚ÆŽw’è‚·‚ê‚΂悢‚Å‚µ‚傤Blibiconv ‚ª‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ÌŽž‚É‚ÍA - -R ƒIƒvƒVƒ‡ƒ“‚àŽw’肵‚Ä -
      -
      ---with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
      -
      -
      -

      ‚Æ‚·‚é•K—v‚ª‚ ‚é‚©‚à‚µ‚ê‚Ü‚¹‚ñB -

      - -

      --with-utf8=NAME -
      UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð iconv() ‚ÉŽw’è‚·‚éê‡A - mDNkit ‚̓fƒtƒHƒ‹ƒg‚Å UTF-8 ‚Æ‚¢‚¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼Ì‚ð - Žg—p‚µ‚Ü‚·B‚à‚µ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’è‚·‚é‚Ì‚É UTF-8 ˆÈŠO‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼Ì‚ðŽg—p‚·‚é•K—v‚ª‚ ‚ê‚ÎA‚±‚̃IƒvƒVƒ‡ƒ“‚Å NAME - ‚É‚»‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B‘O€”õ‚É‚ ‚°‚½ - iconv ‚̃pƒbƒP[ƒW‚ðŽg—p‚·‚éꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ÌŽw’è‚Í - •s—v‚Å‚·B -

      - -

      --with-race-prefix=PREFIX -
      DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® - ‚Æ‚µ‚Ä RACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚Í - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì - 1‚‚ł·‚ªAƒhƒƒCƒ“–¼‚É“Á’è‚̃vƒŠƒtƒBƒbƒNƒX‚ð•t‚¯‚邱‚ƂŒÊí‚Ì - ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚邱‚Æ‚ª‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B‚±‚̃vƒŠƒtƒBƒbƒNƒX‚Í - Œ»Ý‚Ì - ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "bq--" ‚Å‚·‚ªA«—ˆ•ÏX‚³‚ê‚é - ‰Â”\«‚ª‚ ‚è‚Ü‚·B•ÏX‚³‚ꂽꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ - ƒvƒŠƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B -

      - -

      --with-brace-suffix=SUFFIX -
      RACE ‚Æ“¯‚¶‚­ DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚Æ‚µ‚Ä BRACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚à - ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì - 1‚‚ł·‚ªARACE ‚ƈقȂèAƒhƒƒCƒ“–¼‚É“Á’è‚̃TƒtƒBƒbƒNƒX‚ð•t‚¯‚邱‚ƂŒÊí‚Ì - ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚·‚邱‚Æ‚ª‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B‚±‚̃TƒtƒBƒbƒNƒX‚Í - Œ»Ý‚Ì - ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "-8q9" ‚Å‚·‚ªA«—ˆ•ÏX‚³‚ꂽ - ꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ƒTƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B -

      - -

      --with-lace-prefix=PREFIX -
      RACE ‚â BRACE ‚Æ“¯‚¶‚悤‚È ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚Ƃµ‚Ä - LACE ‚Æ‚¢‚¤•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·BRACE ‚Æ“¯—lALACE ‚à - ’Êí‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‹æ•Ê‚½‚߂ɓÁ•ʂȃvƒŠƒtƒBƒbƒNƒX‚ðŽg—p‚µ‚Ü‚·B - Œ»Ý‚Ì - ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg‚Å‚Í "bq--" ‚Å‚·‚ªA«—ˆ‚±‚ꂪ - •ÏX‚³‚ꂽꇂɂ͂±‚̃IƒvƒVƒ‡ƒ“‚ð—p‚¢‚ij‚µ‚¢ - ƒvƒŠƒtƒBƒbƒNƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B -

      - -

      --enable-zld -
      ZLD (Zero Level Domain) ‹@”\‚̃Tƒ|[ƒg‚ð’ljÁ‚µ‚Ü‚·B - ZLD ‚Æ‚Í DNS ƒT[ƒo‚Å—p‚¢‚ç‚ê‚éˆê•”‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É‚¨‚¢‚ÄA - ’Êí‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚߂ɗp‚¢‚ç‚ê‚é - “ÁŽê‚ȃhƒƒCƒ“–¼‚Å‚·B - DNS ƒvƒƒgƒRƒ‹ã‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä ZLD ‚ð•K—v‚Æ‚·‚é - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð‘I‘ð‚µ‚È‚¯‚ê‚ÎA‚±‚̃IƒvƒVƒ‡ƒ“‚ÌŽw’è‚Í•s—v‚Å‚·B -

      ‚È‚¨AZLD ‹@”\‚̃Tƒ|[ƒg‚Ì—L–³‚Í dnsproxy ‚â runmdn ‚ªÝ’èƒtƒ@ƒCƒ‹‚ð - “ǂݞ‚ÞÛ‚ÌU‚é•‘‚¢ (ZLD ‚ÌŽw’è‚𖳎‹‚·‚é‚©‚Ç‚¤‚©) ‚ɉe‹¿‚µ‚Ü‚·B - mDNkit ‚ª’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠŽ©‘Ì‚ÍA - (Ý’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‚½‚߂̈ꕔ‚̃‚ƒWƒ…[ƒ‹‚𜂢‚Ä) - ‚±‚̃IƒvƒVƒ‡ƒ“‚É‚æ‚Á‚Ä“®ì‚ª•Ï‚í‚邱‚Ƃ͂Ȃ­Aí‚É ZLD ‚̈—‚ð - s‚¤‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -

      - -

      --sbindir=DIR -
      DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/sbin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      - -

      --bindir=DIR -
      ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹ƒR[ƒh•ÏŠ·ƒc[ƒ‹ mdnconv ‚¨‚æ‚Ñ - ƒNƒ‰ƒCƒAƒ“ƒg‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼ˆ—‚ð•t‰Á‚·‚é runmdn ƒRƒ}ƒ“ƒh‚ð - ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      - -

      --libdir=DIR -
      dnsproxy ‚â mdnconv “™‚ªŽg—p‚·‚é mDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚ð - ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/lib ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      - -

      --includedir=DIR -
      mDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚ðŽg—p‚·‚é‚̂ɕK—v‚ȃwƒbƒ_ƒtƒ@ƒCƒ‹‚ð - ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/include ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      - -

      --sysconfdir=DIR -
      DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ÌÝ’èƒtƒ@ƒCƒ‹A‚¨‚æ‚Ñ - mDNkit ‚̃Nƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹‚ð - ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/etc ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      - -

      --mandir=DIR -
      ƒIƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒx[ƒXƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/man ‚Å‚·BŽÀۂɂ͂±‚̃fƒBƒŒƒNƒgƒŠ‚Ì - ƒTƒuƒfƒBƒŒƒNƒgƒŠ‚Ì man1 ‚â man8 ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - -
      - -

      ‚±‚Ì‘¼‚É‚à configure ‚ɂ͂¢‚ë‚¢‚ë‚ȃIƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚Ü‚·B -

      -
      -% ./configure --help
      -
      -
      -

      ‚ÅŽw’è‰Â”\‚ȃIƒvƒVƒ‡ƒ“‚̈ꗗ‚ð•\ަ‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      ‚Ü‚½AŠÖŒW‚·‚éŠÂ‹«•Ï”‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B - -

      -
      CFLAGS -
      C ƒRƒ“ƒpƒCƒ‰‚É“n‚·ƒIƒvƒVƒ‡ƒ“‚ðŽw’肵‚Ü‚·B—Ⴆ‚ΊO•”‚Ì - iconv ƒpƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚Æ‚«‚ÉAƒCƒ“ƒNƒ‹[ƒhƒtƒ@ƒCƒ‹ - iconv.h ‚ª•W€ˆÈŠO‚̃fƒBƒŒƒNƒgƒŠA—Ⴆ‚Î - /usr/local/include ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽ‚Æ‚µ‚Ü‚·B‚±‚̂悤‚È - ê‡‚É‚Í CFLAGS ‚É -I/usr/local/include ‚ð - Ý’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‹ï‘Ì“I‚É‚ÍAcsh Œn‚̃VƒFƒ‹‚Ìê‡‚É‚Í -
      -
      -% setenv CFLAGS -I/usr/local/include
      -
      -
      -

      ‚Ü‚½ sh Œn‚̃VƒFƒ‹‚Ìê‡‚É‚Í -

      -
      -% CFLAGS=-I/usr/local/include; export CFLAGS
      -
      -
      -

      ‚Æ‚µ‚Ü‚·B -

      CFLAGS ‚Í‚±‚Ì‘¼‚É‚à C ƒRƒ“ƒpƒCƒ‰‚ÌÅ“K‰»ƒIƒvƒVƒ‡ƒ“‚ð - Žw’è‚·‚邽‚߂ɂàŽg‚¦‚Ü‚·BCFLAGS ‚É -O ‚ðŽw’è‚·‚ê‚Î - Å“K‰»‚ ‚è‚ŃRƒ“ƒpƒCƒ‹‚³‚ê‚Ü‚·B - -

      - -

      configure ‚ðŽÀs‚·‚邱‚Ƃɂæ‚èA‚ ‚È‚½‚̃VƒXƒeƒ€ŠÂ‹«‚ɇ‚킹‚Ä -’²®‚³‚ꂽ Makefile ‚»‚Ì‘¼‚̃tƒ@ƒCƒ‹‚ª¶¬‚³‚ê‚Ü‚·B - -

      - -


      - -

      ƒRƒ“ƒpƒCƒ‹

      - -

      configure ŽÀs‚É‚æ‚Á‚ÄAƒVƒXƒeƒ€ŠÂ‹«‚É -‡‚Á‚½ Makefile ‚ª¶¬‚³‚ê‚Ä‚¢‚é‚Ì‚ÅAƒRƒ“ƒpƒCƒ‹‚̓gƒbƒvƒfƒBƒŒƒNƒgƒŠ -($MDNTOP ‚ÌŽw‚·ƒfƒBƒŒƒNƒgƒŠ) ‚Å -make ƒRƒ}ƒ“ƒh‚ðŽÀs‚·‚邾‚¯‚Å‚·B - -

      -
      -% make
      -
      -
      - -

      - -


      - -

      ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹

      - -

      ƒRƒ“ƒpƒCƒ‹‚ªI—¹‚µ‚½‚çAŽÀsƒtƒ@ƒCƒ‹‚Ȃǂ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚¢‚Ü‚·B -ƒCƒ“ƒXƒg[ƒ‹‚Ì‘O‚ɃX[ƒp[ƒ†[ƒU‚ɂȂÁ‚Ä‚­‚¾‚³‚¢B - -

      -
      -% su
      -
      -
      - -

      ‚ ‚Æ‚Í make install ‚ðŽÀs‚·‚ê‚ÎA•K—v‚ȃtƒ@ƒCƒ‹‚ª -ƒVƒXƒeƒ€‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - -

      -
      -# make install
      -
      -
      - -

      ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚éƒtƒ@ƒCƒ‹‚͈ȉº‚Ì’Ê‚è‚Å‚·B - -

      -
      ŽÀsƒtƒ@ƒCƒ‹ -
      ˆÈ‰º‚ÌŽÀsƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
      -
      dnsproxy -
      DNS ƒvƒƒLƒVƒT[ƒo‚Å‚·B -
      mdnconv -
      ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹—p‚̃R[ƒh•ÏŠ·ƒc[ƒ‹‚Å‚·B -
      runmdn -
      ƒNƒ‰ƒCƒAƒ“ƒg‚ðăRƒ“ƒpƒCƒ‹‚·‚邱‚ƂȂµ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ - ‹@”\‚ð•t‰Á‚·‚éƒRƒ}ƒ“ƒh‚Å‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
      -

      dnsproxy ‚ÍAƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/sbin ‚É - ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Í - configure ‚Ì --sysconfdir - ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

      mdnconv ‚¨‚æ‚Ñ runmdn ‚ÍA - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/bin ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Í - configure ‚Ì --bindir - ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

      - -

      ƒIƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹ -
      ˆÈ‰º‚̃Iƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
      -
      dnsproxy.8 -
      DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -
      mdnconv.1 -
      ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹—p‚̃R[ƒh•ÏŠ·ƒc[ƒ‹ mdnconv ‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -
      runmdn.1 -
      runmdn ƒRƒ}ƒ“ƒh‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -
      mdnres.conf.5 -
      ƒNƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹ mdnres.conf ‚̃Iƒ“ƒ‰ƒCƒ“ƒ}ƒjƒ…ƒAƒ‹‚Å‚·B -
      -

      ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/man/man8 (dnsproxy.8)A - /usr/local/man/man1 (mdnconv.1Arunmdn.1)A - /usr/local/man/man5 (mdnres.conf.5) - ‚É‚»‚ꂼ‚êƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure ‚Ì - --mandir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

      - -

      Ý’èƒtƒ@ƒCƒ‹ -
      ˆÈ‰º‚ÌÝ’èƒtƒ@ƒCƒ‹‚ ‚é‚¢‚Í‚»‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
      -
      dnsproxy.conf -
      DNS ƒvƒƒLƒVƒT[ƒo dnsproxy ‚ÌÝ’èƒtƒ@ƒCƒ‹‚ÌÝ’è—á‚ð‹Lq‚µ‚½ - ƒTƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚Å‚·B - ‚±‚̃tƒ@ƒCƒ‹‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éꇂɂÍA - ã‘‚«‚µ‚Ä‚µ‚Ü‚í‚È‚¢‚悤‚É dnsproxy.conf.sample ‚Æ‚¢‚¤–¼‘O‚Å - ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -

      ‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ÉŠÖ‚µ‚Ä‚Í - DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ - ‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

      mdnres.conf.sample -
      ƒNƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹ mdnres.conf ‚ÌÝ’è—á‚ð‹Lq‚µ‚½ - ƒTƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚Å‚·B -

      ‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ÉŠÖ‚µ‚Ä‚Í - mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ - ‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

      -

      ‚¢‚¸‚ê‚àƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/etc ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure ‚Ì - --sysconfdir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

      - -

      ƒ‰ƒCƒuƒ‰ƒŠ -
      ˆÈ‰º‚̃‰ƒCƒuƒ‰ƒŠ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B -
      -
      libmdn -
      dnsproxy ‚â mdnconv “™‚̃Rƒ}ƒ“ƒh‚ªŽg—p‚µ‚Ä‚¢‚é - mDNkit ‚ÌŠî–{ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚·B -
      libmdnres -
      runmdn ƒRƒ}ƒ“ƒh‚É‚æ‚Á‚ăNƒ‰ƒCƒAƒ“ƒg‚É“®“I‚ÉƒŠƒ“ƒN‚³‚ê‚é - ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚·B -
      -

      ‚¢‚¸‚ê‚̃‰ƒCƒuƒ‰ƒŠ‚àƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/lib ‚É - ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚Í - configure ‚Ì --libdir - ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B -

      - -

      ƒwƒbƒ_ƒtƒ@ƒCƒ‹ -
      libmdn ‚̃wƒbƒ_ƒtƒ@ƒCƒ‹‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒfƒtƒHƒ‹ƒg‚Å‚Í /usr/local/include ‚̉º‚É mdn ‚Æ‚¢‚¤ - ƒfƒBƒŒƒNƒgƒŠ‚ªì‚ç‚êA‚»‚̉º‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B - ƒCƒ“ƒXƒg[ƒ‹æ‚ð•Ï‚¦‚é‚É‚ÍAconfigure ‚Ì - --includedir ƒIƒvƒVƒ‡ƒ“‚ðŽg—p‚µ‚Ü‚·B - -
      - -

      - -


      - -

      bind9 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

      - -

      “WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì -$MDNTOP/patch/bind9/bind-9.0.0-patch ‚ª -BIND 9.0.0 ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚ð•t‰Á‚·‚éƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯A -ŽŸ‚̂悤‚ɂȂè‚Ü‚·B - -

        -
      1. BIND 9.0.0 ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ -(README ‚Æ‚¢‚¤ƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -
        -
        -% cd /somewhere/.../bind-9.0.0
        -
        -
        -
      2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -
        -
        -% patch -p0 < $MDNTOP/patch/bind9/bind-9.0.0-patch
        -
        -
        -
      - -

      ƒpƒbƒ`‚ð“–‚Ä‚é‚ÆAƒgƒbƒvƒfƒBƒŒƒNƒgƒŠ‚É README.mdnkit ‚Æ‚¢‚¤ -ƒtƒ@ƒCƒ‹‚ªì‚ç‚ê‚Ü‚·BƒRƒ“ƒpƒCƒ‹‚Ì‘O‚É‚±‚̃tƒ@ƒCƒ‹‚ð“Ç‚ñ‚Å‚­‚¾‚³‚¢B - -

      ‚»‚Ì‚ ‚ƃRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚¢‚Ü‚·B•û–@‚Í README.mdnkit -‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚É‚à‘‚©‚ê‚Ä‚¢‚Ü‚·‚ªA -configure ƒRƒ}ƒ“ƒh‚ÌŽÀsŽž‚É ---with-mdn ƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚邱‚Æ‚ð–Y‚ê‚È‚¢‚Å‚­‚¾‚³‚¢B -‚±‚̃IƒvƒVƒ‡ƒ“‚ð‚‚¯‚È‚¢‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚Í•t‰Á‚³‚ê‚Ü‚¹‚ñB -

      -
      -% ./configure --with-mdn
      -
      -
      - -

      bind9 —p‚̃pƒbƒ`‚Í mDNkit ‚Ì–{‘Ì (“Á‚Ƀ‰ƒCƒuƒ‰ƒŠ‚ƃwƒbƒ_ƒtƒ@ƒCƒ‹) ‚ª‚·‚Å‚É -ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚邱‚Æ‚ð‘O’ñ‚Æ‚µ‚Ä‚¢‚Ü‚·B‚µ‚½‚ª‚Á‚ÄA‚±‚Ìì‹Æ‚Í -mDNkit –{‘̂̃Cƒ“ƒXƒg[ƒ‹I—¹Œã‚ÉŽÀs‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -


      - -

      bind8 —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

      - -

      “WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì -$MDNTOP/patch/bind8/bind-8.2.2-P7-patch ‚ª -BIND 8.2.2-P7 ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`A‚Ü‚½ -$MDNTOP/patch/bind8/bind-8.2.3-T6B-patch ‚ª -BIND 8.2.3-T6B ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯A -ŽŸ‚̂悤‚ɂȂè‚Ü‚·B - -

        -
      1. BIND 8.2.2-P7 ‚ ‚é‚¢‚Í BIND 8.2.3-T6B ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ -(src ‚Æ‚¢‚¤ƒTƒuƒfƒBƒŒƒNƒgƒŠ‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -
        -
        -% cd /somewhere/.../bind-8.2.2-P7
        -
        -
        -
      2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -
        -
        -% patch -p0 < $MDNTOP/patch/bind8/bind-8.2.2-P7-patch
        -
        -
        -
      - -

      ƒpƒbƒ`‚ð“–‚Ä‚½‚çA‚ ‚Ƃ͒Êí‚Ì BIND ‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚É‚µ‚½‚ª‚Á‚Ä -ƒRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹•û–@‚Í BIND ‚Ì -ƒ\[ƒX’†‚Ì src/INSTALL ‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B - -

      bind8 —p‚̃pƒbƒ`‚Í BIND ‚ð’P‚É 8ƒrƒbƒgƒXƒ‹[‚É‚·‚邾‚¯‚ÅAmDNkit ‚Ì -ƒ‰ƒCƒuƒ‰ƒŠ“™‚ÍŽg—p‚µ‚Ü‚¹‚ñB‚µ‚½‚ª‚Á‚Ä mDNkit –{‘̂Ƃ͓Ɨ§‚ɃRƒ“ƒpƒCƒ‹‚¨‚æ‚Ñ -ƒCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      - -


      - -

      squid —pƒpƒbƒ`‚Ì“K—p‚ƃCƒ“ƒXƒg[ƒ‹

      - -

      “WŠJ‚µ‚½ƒ\[ƒX‚Ì’†‚Ì $MDNTOP/patch/squid/squid-2.3.STABLE3-patch ‚ª -Squid 2.3.STABLE3 ‚ɑ΂·‚é 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚Å‚·B -ƒpƒbƒ`‚Ì“–‚Ä•û‚Í‚±‚̃tƒ@ƒCƒ‹‚Ìæ“ª‚É‚à‘‚¢‚Ä‚ ‚è‚Ü‚·‚ªAŠÈ’P‚ÉЉ‚邯A -ŽŸ‚̂悤‚ɂȂè‚Ü‚·B - -

        -
      1. Squid 2.3.STABLE3 ‚̃\[ƒX‚̃gƒbƒvƒfƒBƒŒƒNƒgƒŠ (README - ƒtƒ@ƒCƒ‹‚ª‚ ‚éƒfƒBƒŒƒNƒgƒŠ‚Å‚·) ‚Ɉړ®‚µ‚Ü‚·B -
        -
        -% cd /somewhere/.../squid-2.3.STABLE3
        -
        -
        -
      2. patch ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ă\[ƒX‚Ƀpƒbƒ`‚𓖂Ă܂·B -
        -
        -% patch -p1 < $MDNTOP/patch/squid/squid-2.3.STABLE3-patch
        -
        -
        -
      - -

      ƒpƒbƒ`‚ð“–‚Ä‚½‚çA‚ ‚Ƃ͒Êí‚Ì Squid ‚̃Cƒ“ƒXƒg[ƒ‹•û–@‚É‚µ‚½‚ª‚Á‚Ä -ƒRƒ“ƒpƒCƒ‹‚ƃCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹•û–@‚Í -Squid ‚̃\[ƒX‚Ɋ܂܂ê‚é INSTALL ƒtƒ@ƒCƒ‹‚É‘‚©‚ê‚Ä‚¢‚Ü‚·B - -

      Squid —p‚̃pƒbƒ`‚à bind8 —p‚̃pƒbƒ`‚Æ“¯—l’P‚É 8ƒrƒbƒgƒXƒ‹[‚É‚·‚邾‚¯‚ÅA -mDNkit ‚̃‰ƒCƒuƒ‰ƒŠ“™‚ÍŽg—p‚µ‚Ü‚¹‚ñB -‚µ‚½‚ª‚Á‚Ä mDNkit –{‘̂Ƃ͓Ɨ§‚ɃRƒ“ƒpƒCƒ‹‚¨‚æ‚Ñ -ƒCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/proxyconfig.html b/contrib/idn/mdnkit/doc/ja/guide/proxyconfig.html deleted file mode 100644 index 15938c464d..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/proxyconfig.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - -Configuring DNS Proxy Server - - - - -

      DNS Proxy Server ‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

      -

      -DNS Proxy Server dnsproxy‚ðŽg‚¤‚É‚ÍA -‚¢‚­‚‚©‚Ìî•ñ‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚±‚Å‚ÍA‚±‚ê‚ç‚Ìî•ñ‚ÌÝ’è•û–@‚ƈӖ¡‚Æ‚ðà–¾‚µ‚Ü‚·B -

      - -
      -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹

      -

      -Ý’èî•ñ‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‹LÚ‚³‚ê‚Ü‚·B -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍA -dnsproxy‚Ì‹N“®Žž‚ɃRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -
      -% dnsproxy -config <config-file>
      -
      -
      -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚É‚Í -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍAƒfƒBƒŒƒNƒgƒŠ -
      -    /usr/local/etc
      -
      -‚̉º‚Ì -
      -    dnsproxy.conf
      -
      -‚Å‚·BƒfƒBƒŒƒNƒgƒŠ‚ÍAmDNkit쬎ž‚É -
      -    configure --sysconfdir=DIR
      -
      -‚ÅŽwަ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -Ú‚µ‚­‚ÍAƒCƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -configure ŽÀs‚Ì -‚Æ‚±‚ë‚ð‚²——‚­‚¾‚³‚¢B - -
      -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^

      -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B - -

      - -
      listen
      -

      -dnsproxy‚ªƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì—v‹‚ðŽó•t‚¯‚é -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

      -    listen <address>
      -
      -<address>‚͈ȉº‚Ì‚¢‚¸‚ê‚©‚ÌŒ`Ž®‚ÅŽwަ‚µ‚Ü‚·B -
      - - - - -
      <IP address>:<port number>
      :<port number>
      <IP address>
      -
      -È—ª‚³‚ê‚½ê‡‚É‚Í -
      - - - -
      IP address0.0.0.0# INADDR_ANY
      port number53
      -
      -‚ªŽg—p‚³‚ê‚Ü‚·B -

      -dnsproxyŒo—R‚ÅDNSƒT[ƒo‚ðŽg—p‚·‚éƒNƒ‰ƒCƒAƒ“ƒg‚ÍA -‚±‚±‚ÅŽwަ‚µ‚½ƒAƒhƒŒƒXAƒ|[ƒg‚ðDNSƒT[ƒo‚Æ‚µ‚Äݒ肵‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̓|[ƒg”Ô†‚ð•ÏX‚Å‚«‚È‚¢‚à‚Ì‚ª‘½‚¢‚̂Š-ƒ|[ƒg”Ô†‚̓fƒtƒHƒ‹ƒg‚Ì53‚ð‚»‚Ì‚Ü‚ÜŽg‚Á‚½•û‚ª‚æ‚¢‚Å‚µ‚傤B -

      - -

      forward
      -

      -dnsproxy‚ªADNS—v‹‚ð“]‘—‚µA‰ž“š‚ðŽó‚¯Žæ‚é–{—ˆ‚ÌDNSƒT[ƒo‚Ì -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

      -    forward <address> [ bind4compat ]
      -
      -<address>‚ÌŒ`Ž®‚Íã‚Ìlisten‚Ì‚à‚̂Ɠ¯‚¶‚Å‚·B -

      -ƒIƒvƒVƒ‡ƒ“‚Ì bind4compat‚ªŽwަ‚³‚ꂽꇂɂÍA -UDP‚ÅƒŠƒNƒGƒXƒg‚ð“]‘—‚·‚鎞‚ÉAƒ\[ƒXƒAƒhƒŒƒX‚Æ‚µ‚ÄA -listen‚ÅŽwަ‚³‚ꂽƒAƒhƒŒƒX/ƒ|[ƒg‚ðŽg—p‚µ‚Ü‚·B -‚±‚ê‚Íbind4‚É‚ ‚é‹@”\‚ÅAUDPƒ|[ƒg‚ɂ‚¢‚Ä‚Ì -ƒAƒNƒZƒX§ŒÀ‰º‚ʼn^—p‚·‚邱‚Æ‚ð‘z’肵‚½‚à‚̂ł·B -‚±‚̃IƒvƒVƒ‡ƒ“‚ªŽwަ‚³‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA -1024ˆÈã‚̃\[ƒXƒ|[ƒg‚ªŽg—p‚³‚ê‚Ü‚·B -

      - -

      log-file
      -

      -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -

      -    log-file <path>
      -
      -ƒƒOƒtƒ@ƒCƒ‹–¼‚ÍA -ˆÈ‰º‚̃Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÅŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -—¼•ûŽw’肵‚½ê‡‚ɂ̓Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è‚̂ق¤‚ª—D悳‚ê‚Ü‚·B -
      -    dnsproxy -logfile <address>
      -
      -Žw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA -
      -    /tmp/dnsproxy.log
      -
      -‚É‘‚«ž‚Ü‚ê‚Ü‚·B -

      -‚È‚¨AŽÀsƒƒO‚Íí‚É’Ç‹L‚³‚ê‚Ä‚¢‚«‚Ü‚·‚Ì‚ÅA -“K“–‚ÈŽž‚ðŒ©Œv‚ç‚Á‚ÄÁ‚·‚±‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

      -‚Ü‚½Adnsproxy ‚Ƀnƒ“ƒOƒAƒbƒvƒVƒOƒiƒ‹ (SIGHUP) ‚ð‘—‚é‚Æ -‚¢‚Á‚½‚ñƒƒOƒtƒ@ƒCƒ‹‚ð•‚¶‚ÄAÄ“xƒI[ƒvƒ“‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -ƒƒOƒtƒ@ƒCƒ‹‚ðƒA[ƒJƒCƒu‚·‚éꇂɕ֗˜‚È‹@”\‚Å‚·B -

      - -

      log-level
      -

      -ƒƒO‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B -

      -    log-level <level>
      -
      -ƒŒƒxƒ‹‚Æ‚µ‚ÄŽw’è‚Å‚«‚é’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -
      -
      -
      none
      ˆê؃ƒO‚ð‹L˜^‚µ‚Ü‚¹‚ñBƒƒO‚ª‚È‚¢‚Æ•s‹ï‡‚ª¶‚¶‚½ê‡‚Ì -Œ´ˆö‰ð–¾‚ª“‚­‚È‚è‚Ü‚·‚Ì‚ÅA‚Å‚«‚ê‚΂±‚̃Œƒxƒ‹‚ÍŽw’肵‚È‚¢‚Å‚­‚¾‚³‚¢B -
      fatal
      ’v–½“I‚ȃGƒ‰[‚ª¶‚¶‚½‚Æ‚«‚ɂ̂݃ƒO‚ðo—Í‚µ‚Ü‚·B -
      warn
      ŒxƒƒbƒZ[ƒW‚É‚àƒƒO‚É‹L˜^‚µ‚Ü‚·B‚±‚ꂪƒƒOƒŒƒxƒ‹‚ð -Žw’肵‚È‚©‚Á‚½‚Æ‚«‚̃fƒtƒHƒ‹ƒg‚Å‚·B -
      trace
      ŽÀsƒgƒŒ[ƒXƒƒbƒZ[ƒW‚àƒƒO‚Éo—Í‚µ‚Ü‚·B -‚±‚̃Œƒxƒ‹‚ðŽw’è‚·‚邯 dnsproxy ‚Ì“®ì‚ª‚©‚È‚èÚׂɋL˜^‚³‚ê‚é‚̂Š-áŠQ‚ª”­¶‚µ‚½ê‡‚ÌŒ´ˆö‹†–¾‚ɂ͕֗˜‚Å‚·‚ªA‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚̂Š-•’i‚ÍŽw’肵‚È‚¢•û‚ª‚æ‚¢‚Å‚µ‚傤B -
      -
      -

      - -

      client-translation
      -

      -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽwަ‚µ‚Ü‚·B -

      -    client-translation <ZLD> <Encoding>
      -
      -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ÌꇂɂÍA -’ÊíAƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚»‚̂悤‚Èê‡‚É‚Í -
      -    client-translation . Shift_JIS
      -
      -‚Æ‚¢‚¤Œ`‚ÅA<ZLD>–³‚µ‚ÅŽwަ‚µ‚Ü‚·B -

      -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚É‚æ‚Á‚Ä‚ÍA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð’Êí‚ÌDNS‚Å‚à -Žó•t‚¯‚ç‚ê‚éŒ`Ž®‚ɃGƒ“ƒR[ƒh‚µ‚ÄA‚»‚ê‚ð’Êí‚̃hƒƒCƒ“–¼‚Æ -‹æ•Ê‚·‚邽‚ß‚É ZLD (Zero Level Domain) ‚ð•t‰Á‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚»‚̂悤‚ÈꇂɂÍA•t‰Á‚³‚ê‚éZLD‚Æ‚»‚ÌŽž‚̃hƒƒCƒ“–¼‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚ð‘Ήž•t‚¯‚邱‚Ƃɂæ‚èA -‘¼‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼Žè–@‚ÌDNSƒT[ƒo‚ð—˜—p‚·‚邱‚Æ‚ª -‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

      -    client-translation .i-dns.net UTF-5
      -
      -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -ZLD ‚ªˆÙ‚È‚Á‚Ä‚¢‚ê‚ÎA•¡”Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -‚È‚¨AmDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ÌŽw’è‚͂ł«‚È‚¢‚悤‚É -‚È‚Á‚Ä‚¢‚Ü‚·BZLD ‚ðŽg—p‚·‚邽‚߂ɂÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹‚ÌÛA -configure ƒRƒ}ƒ“ƒh‚É ---enable-zld -‚ðŽw’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚ÌŽw’è‚ð‚¹‚¸‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍAZLD ‚ÌŽw’è‚Í -‚·‚ׂ˳ދ‚³‚ê‚Ü‚·B -

      -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -‚±‚±‚ÅŽwަ‚µ‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA“à•”“I‚ÉŽg—p‚³‚ê‚é -UTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ü‚·B -‚»‚µ‚ÄAŒãq‚̳‹K‰»AƒT[ƒo‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ª -s‚È‚í‚ê‚ÄDNSƒT[ƒo‚É‘—o‚³‚ê‚Ü‚·B‚Ü‚½ADNSƒT[ƒo‚©‚ç‚Ì -‰ž“š‚ÍA‹t‚ÉŒ³‚̃Gƒ“ƒRƒf[ƒBƒ“ƒO‚É–ß‚³‚ê‚ăNƒ‰ƒCƒAƒ“ƒg‚É -•Ô‚³‚ê‚Ü‚·B -

      -‚±‚±‚ÅŽw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAmDNkit•t‘®‚Ìlibmdn‚¨‚æ‚Ñ -Žg—p‚·‚éiconv ƒ‰ƒCƒuƒ‰ƒŠ‚Ɉˑ¶‚µ‚Ü‚·B -iconv ƒ‰ƒCƒuƒ‰ƒŠ‚É‚æ‚Á‚ÄAƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ªˆÙ‚È‚Á‚Ä‚¢‚é -‚±‚Æ‚ª‚ ‚è‚Ü‚·‚Ì‚ÅAƒ‰ƒCƒuƒ‰ƒŠ‚̃}ƒjƒ…ƒAƒ‹‚ð‚²——‚ɂȂÁ‚Ä -Žg—p‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B -•t‘®‚Ìlibmdn‚Å‚ÍAiconv‚ª’ñ‹Ÿ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘¼‚ÉA -‘½Œ¾Œê‰»DNS—p‚É’ñˆÄ‚³‚ê‚Ä‚¢‚é -

      - - - - - - - - - - - - - -
      UTF-5draft-jseng-utf5-01.txt
      RACEdraft-ietf-idn-race-02.txt
      BRACEdraft-ietf-idn-brace-00.txt
      LACEdraft-ietf-idn-lace-00.txt
      -
      -‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -

      - -

      alternate-encoding -
      -

      DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽƒhƒƒCƒ“–¼‚ªƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚Å‚«‚È‚¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -

      -    alternate-encoding <Encoding>
      -
      -Žw’è‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í•K‚¸uASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE)v‚ƌĂ΂ê‚éA -•ÏŠ·Œ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš (‰p”Žš‚¨‚æ‚уnƒCƒtƒ“) ‚¾‚¯ -‚©‚ç‚È‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚½‚Æ‚¦‚Î ASCII ŒÝŠ· -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚ðŽw’è‚·‚éꇂɂ͎Ÿ‚̂悤‚ÉŽw’肵‚Ü‚·B -
      -    alternate-encoding RACE
      -
      -

      - -

      normalize
      -

      -ƒhƒƒCƒ“–¼‚̳‹K‰»Žè–@‚ðŽw’肵‚Ü‚·B -

      -    normalize <scheme> ...
      -
      -³‹K‰»Žè–@‚Í•¡”Žw’è‰Â”\‚ÅA¶‘¤‚©‚燂ɓK—p‚³‚ê‚Ä‚¢‚«‚Ü‚·B -

      -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -“à•”“I‚ÉŽg—p‚³‚ê‚éUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽã‚ÅA -‚±‚±‚ÅŽwަ‚µ‚½³‹K‰»‚ª“K—p‚³‚ê‚Ü‚·B -Žg—p‰Â”\‚ȳ‹K‰»Žè–@‚ÍmDNkit‚Ɋ܂܂ê‚élibmdn‚Ɉˑ¶‚µ‚Ä‚¢‚Ü‚·B -‚ǂ̂悤‚ȳ‹K‰»Žè–@‚ª‚ ‚é‚©‚ÍA -libmdn‚̃}ƒjƒ…ƒAƒ‹‚Ì -normalizer ƒ‚ƒWƒ…[ƒ‹ -‚É‹LÚ‚³‚ê‚Ä‚¢‚Ü‚·B -

      - -

      server-translation
      -

      -DNSƒT[ƒo‘¤‚̃hƒƒCƒ“–¼ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚ðŽwަ‚µ‚Ü‚·B -

      -    server-translation <ZLD> <Encoding>
      -
      -ZLD‚ª•s—v‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚ÎAÈ—ª’l‚Æ‚µ‚Ä'.'‚ðŽwަ‚µ‚Ü‚·B -
      -    server-translation . UTF-8
      -
      -ZLD‚ð•K—v‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ÍAZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Ì -—¼•û‚ðŽw’肵‚Ü‚·B -
      -    server-translation .i-dns.net UTF-5
      -
      -Žw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA‘Oo‚Ìclient-translation‚Å‚Ì -‚à‚̂Ɠ¯‚¶‚Å‚·B -

      - -

      user-id -
      -

      dnsproxy ‚ª“®ì‚·‚郆[ƒU‚ðŽw’肵‚Ü‚·B -

      -    user-id <user>
      -
      -

      ’ÊíAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ðŽg—p‚·‚邽‚߃‹[ƒgŒ ŒÀ‚Å‹N“®‚³‚¹‚é•K—v‚ª -‚ ‚è‚Ü‚·‚ªAƒ‹[ƒgŒ ŒÀ‚̂܂܂œ®ì‚³‚¹‚é‚̂̓ZƒLƒ…ƒŠƒeƒBãD‚Ü‚µ‚­‚ ‚è‚Ü‚¹‚ñB -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ð쬂µ‚½‚ ‚ƃT[ƒrƒX‚ðŠJŽn‚·‚é‘O‚É -Žw’肵‚½ƒ†[ƒU‚ÌŒ ŒÀ‚Å“®‚­‚悤‚ɂȂè‚Ü‚·B -

      <user> ‚ɂ̓†[ƒU–¼‚ ‚é‚¢‚̓†[ƒU ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      - -

      group-id -
      -

      dnsproxy ‚ª“®ì‚·‚éƒOƒ‹[ƒv‚ðŽw’肵‚Ü‚·B -

      -    group-id <user>
      -
      -‚±‚ê‚Í user-id ƒGƒ“ƒgƒŠ‚ÆŽ—‚Ä‚¢‚Ü‚·‚ªAƒ†[ƒU‚Ì‘ã‚í‚è‚ɃOƒ‹[ƒv‚ð -Žw’è‚·‚é“_‚ªˆÙ‚È‚è‚Ü‚·B -

      <group> ‚ɂ̓Oƒ‹[ƒv–¼‚ ‚é‚¢‚̓Oƒ‹[ƒv ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚Ü‚·B -

      - -

      root-directory -
      -

      dnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B -

      -    root-directory <path>
      -
      -

      ‚±‚ê‚àƒZƒLƒ…ƒŠƒeƒB‘Îô‚̈ê‚‚ł·Bdnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ -‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚̃fƒBƒŒƒNƒgƒŠ‚ÌŠO‚ɂ̓AƒNƒZƒX‚Å‚«‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚̓T[ƒrƒX‚ðŠJŽn‚·‚é‘O‚ÉAchroot() -ƒVƒXƒeƒ€ƒR[ƒ‹‚ð—p‚¢‚ÄŽw’肵‚½ƒfƒBƒŒƒNƒgƒŠ‚ðƒ‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚Æ‚µ‚Ä -ݒ肵‚Ü‚·B -

      <path> ‚ɂ̓‹[ƒg‚Æ‚µ‚Äݒ肵‚½‚¢ƒfƒBƒŒƒNƒgƒŠ–¼‚ðŽw’肵‚Ü‚·B - -

      - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/reference.html b/contrib/idn/mdnkit/doc/ja/guide/reference.html deleted file mode 100644 index 1094f23e24..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/reference.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - -mDNkit reference - - - - -

      ŽQl•¶Œ£

      - -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•ûŽ®‚Ì’ñˆÄAŠÖ˜A RFCA -ƒ\ƒtƒgƒEƒFƒA“™AmDNkit ‚ÉŠÖ˜A‚·‚éŽQl•¶Œ£‚Ì -ƒŠƒXƒg‚Å‚·B - -

      - -

      JPNIC ‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚é‹Zp‰ðà‚̃y[ƒW‚É‚ ‚é - -ŠÖ˜AŽ‘—¿‚à‡‚í‚¹‚Ä‚²——‚­‚¾‚³‚¢B - -

       

      - -


      - -

      JPNIC

      -
      -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚é‹Zp‰ðà -
      mDNkit ‚È‚ÇAJPNIC ‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚銈“®‚ð - Љ‚½ƒy[ƒWB -
      - -

       

      - -

      RFC

      -
      -
      DOMAIN NAMES - CONCEPTS AND FACILITIES (RFC1034) -
      DNS ‚ÌŠT—v‚ðŽ¦‚µ‚½ RFCB

      - -

      DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION (RFC1035) -
      DNS ƒvƒƒgƒRƒ‹‚ð‹K’肵‚½ RFCB

      - -

      UTF-7, A Mail-Safe Transformation Format of Unicode (RFC1642) -
      Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-7 ‚ɂ‚¢‚ĉðà‚µ‚½ - RFCB

      - -

      UTF-8, a transformation format of Unicode and ISO 10646 (RFC2044) -
      Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-8 ‚ɂ‚¢‚ĉðà‚µ‚½ - RFCB

      - -

      The Report of the IAB Character Set Workshop held 29 February - 1 March, 1996 (RFC2130) -
      ƒCƒ“ƒ^[ƒlƒbƒgã‚ł̃Lƒƒƒ‰ƒNƒ^ƒZƒbƒg‚ÌŽd—l‚ÉŠÖ‚·‚éƒ[ƒNƒVƒ‡ƒbƒv‚Ì - ƒŒƒ|[ƒgB

      - -

      IETF Policy on Character Sets and Languages (RFC2277) -
      ƒCƒ“ƒ^[ƒlƒbƒgã‚ł̃Lƒƒƒ‰ƒNƒ^ƒZƒbƒg‚¨‚æ‚ÑŒ¾Œê‚ÌŽw’è‚ÉŠÖ‚·‚é IETF - ‚Ì•ûj‚ðŽ¦‚µ‚½ RFCB

      - -

      Extension Mechanisms for DNS (EDNS0) (RFC2671) -
      DNS ƒvƒƒgƒRƒ‹‚ÌŠg’£•ûŽ®‚Å‚ ‚é EDNS0 ‚ð’è‹`‚µ‚½ RFCB

      - -

      UTF-16, an encoding of ISO 10646 (RFC2781) -
      Unicode/ISO10646 ‚̃Gƒ“ƒR[ƒh•û–@‚̈ê‚‚ł ‚é UTF-16 ‚ɂ‚¢‚ĉðà‚µ‚½ - RFCB

      - -

      A Tangled Web: issues of I18N, domain names, and the other Internet protocols (RFC2825) -
      ƒhƒƒCƒ“–¼‚âƒvƒƒgƒRƒ‹‚Ì‘½Œ¾Œê‰»‚ÉŠÖ‚·‚é–â‘è“™‚ðŽ¦‚µ‚½•¶‘B

      - -

      IAB Technical Comment on the Unique DNS Root (RFC2826) -
      DNS ‚̃‹[ƒg‚̃†ƒj[ƒN«‚ÉŠÖ‚·‚é•¶‘B - -
      - -

       

      - -

      ƒCƒ“ƒ^[ƒlƒbƒgƒhƒ‰ƒtƒg

      -
      -
      draft-ietf-idn-requirements-03.txt -
      IETF ‚Ì IDN ƒ[ƒLƒ“ƒOƒOƒ‹[ƒv‚É‚æ‚éA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÉŠÖ‚·‚é - ŠeŽí‚Ì—vŒ (requirement) ‚ð‚܂Ƃ߂½•¶‘B

      - -

      draft-ietf-idn-compare-01.txt -
      IETF ‚Ì IDN ƒ[ƒLƒ“ƒOƒOƒ‹[ƒv‚É‚æ‚éAŒ»Ý’ñˆÄ‚³‚ê‚Ä‚¢‚é - ‚¢‚­‚‚©‚Ì•ûŽ®‚Ì”äŠr•¶‘B

      - -

      draft-ietf-idn-race-02.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® RACE ‚̃vƒƒ|[ƒUƒ‹B

      - -

      draft-ietf-idn-sace-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® SACE ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

      - -

      draft-ietf-idn-brace-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® BRACE ‚̃vƒƒ|[ƒUƒ‹B

      - -

      draft-ietf-idn-lace-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® LACE ‚̃vƒƒ|[ƒUƒ‹B

      - -

      draft-ietf-idn-utf6-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® UTF-6 ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

      - -

      draft-ietf-idn-dude-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® DUDE ‚̃vƒƒ|[ƒUƒ‹B - mDNkit ‚ł͌»Ý‚̂Ƃ±‚ëƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚È‚¢B

      - -

      draft-ietf-idn-idne-01.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚̃vƒƒ|[ƒUƒ‹BEDNS0 ‚ð—˜—p‚µAƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚Í UTF-8 ‚ðŽg—p‚·‚éB

      - -

      draft-ietf-idn-idnra-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—•ûŽ®‚̃vƒƒ|[ƒUƒ‹BƒAƒvƒŠƒP[ƒVƒ‡ƒ“AƒŠƒ]ƒ‹ƒoA - DNS ƒT[ƒo‚̃Cƒ“ƒ^ƒtƒF[ƒX‚ɂ‚¢‚Äq‚ׂç‚ê‚Ä‚¢‚éB

      - -

      draft-ietf-idn-nameprep-00.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‘Oˆ— (³‹K‰»“™) ‚̃vƒƒ|[ƒUƒ‹B

      - -

      draft-jseng-utf5-01.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ® UTF-5 ‚̃vƒƒ|[ƒUƒ‹B

      - -

      draft-ietf-idn-udns-01.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ® (DNS ƒvƒƒgƒRƒ‹‚Ì•ÏXAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚Ç) - ‚̃vƒƒ|[ƒUƒ‹BƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ͊î–{“I‚É - UTF-8 ‚ðŽg—p‚·‚éB

      - -

      draft-skwan-utf8-dns-04.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚̃vƒƒ|[ƒUƒ‹BƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚Í UTF-8 ‚ðŽg—p‚·‚éB

      - -

      draft-duerst-dns-i18n-02.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽÀŒ»•ûŽ®‚ÉŠÖ‚·‚élŽ@‚ƃvƒƒ|[ƒUƒ‹B - ZLD (zero level domain) ‚Ì“±“ü‚È‚ÇB

      - -

      draft-duerst-i18n-norm-04.txt -
      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̳‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ä‚¢‚­‚‚©‚Ì’ñˆÄ‚ÅŽQÆ‚³‚ê‚Ä‚¢‚é - Unicode Normalization Form C ‚ɂ‚¢‚Ă̕¶‘B - -
      - -

       

      - -

      ‚»‚Ì‘¼•¶‘

      -
      -
      Unicode Normalization Forms -
      Unicode •¶Žš—ñ‚̳‹K‰»•ûŽ®‚Å‚ ‚é Unicode Normalization Forms ‚ð - ’è‹`‚µ‚½•¶‘BForm CAForm DAForm KCAForm KD ‚ɂ‚¢‚Ä‘‚©‚ê‚Ä‚¢‚éB

      - -

      Case Mappings -
      Unicode •¶Žš—ñ‚Ì‘å•¶Žš¬•¶Žš‚̕ϊ·•û–@‚â‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚ð‚µ‚È‚¢ - ”äŠr‚Ì•û–@‚ɂ‚¢‚Äq‚ׂ½•¶‘B

      - -

      UnicodeData.txt -
      Unicode ‚Ì•¶Žš‘®«‚ð‹Lq‚µ‚½ƒf[ƒ^ƒtƒ@ƒCƒ‹Bã‹L - Unicode Normalization Forms ‚ȂǂŎg‚í‚ê‚éB

      - -

      UnicodeData File Format -
      ã‹L UnicodeData.txt ‚̃tƒ@ƒCƒ‹ƒtƒH[ƒ}ƒbƒg‚ð‹Lq‚µ‚½•¶‘B - -
      - -

       

      - -

      ƒ\ƒtƒgƒEƒFƒA

      -
      -
      ISC BIND -
      DNS ‚ÌŽÀ‘•‚Å‚ ‚é BIND 4.x, 8.x ‚̃y[ƒW

      -

      ISC BIND 9 -
      DNS ‚ÌŽÀ‘•‚Å‚ ‚é BIND 9.x ‚̃y[ƒW

      -

      Squid Web Proxy Cache -
      Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚̃y[ƒW

      -

      libiconv -
      iconv ‚̃tƒŠ[‚ÈŽÀ‘•‚Å‚ ‚é libiconv ‚̃y[ƒW -
      - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/resolvconfig.html b/contrib/idn/mdnkit/doc/ja/guide/resolvconfig.html deleted file mode 100644 index 43fc25e4a0..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/resolvconfig.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - -Configuring mDNkit resolver - - - - -

      mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

      - -

      mDNkit ‚ª’ñ‹Ÿ‚·‚éƒc[ƒ‹AƒRƒ}ƒ“ƒh‚Ì‚¤‚¿Adnsproxy ˆÈŠO‚Ì‚à‚ÌA -‚‚܂è runmdn ‚Æ mdnconv ‚Í‹¤’Ê‚ÌÝ’èƒtƒ@ƒCƒ‹‚ðŽQÆ‚µ‚Ü‚·B -‚Ü‚½ bind9 ƒpƒbƒ`‚à“¯‚¶Ý’èƒtƒ@ƒCƒ‹‚ðŽQÆ‚µ‚Ü‚·B - -

      ‚±‚̃tƒ@ƒCƒ‹‚É‚Í mDNkit ‚ð—˜—p‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚ ‚é‚¢‚ÍƒŠƒ]ƒ‹ƒo‚ª -•K—v‚Æ‚·‚é‚¢‚­‚‚©‚Ìî•ñ‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -—Ⴆ‚γ‹K‰»‚Ì•ûŽ®‚â DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -•û–@‚È‚Ç‚ð‚±‚Ìƒtƒ@ƒCƒ‹‚ÅŽw’肵‚Ü‚·B -‚±‚±‚Å‚ÍA‚±‚ê‚ç‚Ìî•ñ‚ÌÝ’è•û–@‚ƈӖ¡‚Æ‚ðà–¾‚µ‚Ü‚·B - -

      ‚Ü‚½AƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì“®ì‚·‚郃P[ƒ‹î•ñ‚©‚çŽæ“¾‚µ‚Ü‚·B‚±‚ê‚ɂ‚¢‚Ä‚à -‡‚킹‚Äà–¾‚µ‚Ü‚·B - -

      - -
      -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹

      -

      -mDNkit ‚ÌÝ’è‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‚æ‚Á‚Äs‚í‚ê‚Ü‚·B -mDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍA -‚±‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚Í -

      -
      -/usr/local/etc/mdnres.conf
      -
      -
      -‚ƂȂè‚Ü‚·BƒfƒBƒŒƒNƒgƒŠ•”•ªA‚‚܂è /usr/local/etc ‚Í -mDNkit ‚Ìݒ莞‚ɃIƒvƒVƒ‡ƒ“‚Å -•ÏX‚ª‰Â”\‚Å‚·B - -

      mDNkit ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚邯A‚±‚̃tƒ@ƒCƒ‹‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚ª -

      -
      -/usr/local/etc/mdnres.conf.sample
      -
      -
      -(ƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚Ìê‡) ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B‚±‚̃Tƒ“ƒvƒ‹ƒtƒ@ƒCƒ‹‚É‚Í -ݒ耖ڂƂ»‚Ìà–¾‚ª‘‚©‚ê‚Ä‚¢‚Ü‚·‚Ì‚ÅAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹ -쬂̎Ql‚É‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -


      -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^

      -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B - -

      - -
      server-encoding -
      -DNS ƒvƒƒgƒRƒ‹‚ªŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -
      -server-encoding encoding -
      -encoding ‚ɃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŽw’肵‚Ü‚·B - -
      -
      -
      [Ý’è—á] -
      -
      -server-encoding RACE
      -server-encoding UTF-8
      -
      -
      -
      - -‚È‚¨AƒAƒvƒŠƒP[ƒVƒ‡ƒ“‘¤‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ƒP[ƒ‹‚É‚æ‚Á‚Ä -Œˆ‚Ü‚é‚Ì‚ÅAclient-encoding ‚Æ‚¢‚¤ƒGƒ“ƒgƒŠ‚Í‚ ‚è‚Ü‚¹‚ñB -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÉŠÖ‚µ‚Ă͌ãq‚µ‚Ü‚·B -

      - -

      server-zld -
      -ZLD ‚ðŽw’肵‚Ü‚·BZLD ‚Æ‚Í Zero Level Domain ‚Ì—ª‚ÅA -server-encoding ‚É UTF-5 ‚ȂǓÁŽê‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚½ê‡‚É -•K—v‚ƂȂè‚Ü‚·BZLD ‚ɂ‚¢‚Ä‚Í -DNSƒT[ƒo‚ÌÝ’è‚Ì -ZLD ‚ÌŽw’è‚Ì‹Lq‚ªŽQl‚ɂȂé‚Å‚µ‚傤B -‚È‚¨AmDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚Í ZLD ‚ÍŽg‚¦‚¸A -‚±‚̃Gƒ“ƒgƒŠ‚ðŽw’肵‚Ä‚à–³Ž‹‚³‚ê‚Ü‚·B -ZLD ‚ªŽg‚¦‚邿‚¤‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚·‚é•û–@‚ɂ‚¢‚Ä‚Í -ƒCƒ“ƒXƒg[ƒ‹ƒhƒLƒ…ƒƒ“ƒg‚Ì ---enable-zld ‚Ì€‚ð -‚²——‚­‚¾‚³‚¢B - -
      -server-zld ZLD -
      -ZLD ‚ÅŽg—p‚·‚é ZLD ‚ðŽw’肵‚Ü‚·B - -
      -
      -
      [Ý’è—á] -
      -
      -server-zld zld.to.be.used
      -
      -
      -
      -

      - -

      normalize -
      -‚±‚̃Gƒ“ƒgƒŠ[‚łͳ‹K‰»‚Ì•û–@‚ðŽw’肵‚Ü‚·B -2 ‚ˆÈã‚̳‹K‰»‚Ì•û–@‚ªŽw’肳‚ꂽê‡A‡”Ô’Ê‚è (¶‚©‚ç‰E‚É) “K—p‚µ‚Ü‚·B - -
      -normalize scheme... -
      -scheme ‚ų‹K‰»‚Ì•ûŽ®‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B - -

      ³‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ĉȉº‚Ì‚à‚Ì‚ªŽw’è‚Å‚«‚Ü‚·B - -

      - - - - - - - - - - - - - - - - - - - - - - - -
      ascii-lowercaseASCII ‚Ì‘å•¶Žš‚ð¬•¶Žš‚ɳ‹K‰»
      ascii-uppercaseASCII ‚̬•¶Žš‚ð‘å•¶Žš‚ɳ‹K‰»
      unicode-lowercaseUnicode ‚Ì‘å•¶Žš‚ð¬•¶Žš‚ɳ‹K‰»
      unicode-uppercaseUnicode ‚̬•¶Žš‚ð‘å•¶Žš‚ɳ‹K‰»
      unicode-form-cUnicode normalization form C
      unicode-form-kcUnicode normalization form KC
      ja-kana-fullwidth”¼ŠpƒJƒi•¶Žš‚ð‘SŠpƒJƒi•¶Žš‚ɳ‹K‰»
      ja-alnum-halfwidth‘SŠp‰p”Žš‚¨‚æ‚у}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɳ‹K‰»
      ja-compose-voiced-sound‘SŠp‚Ђ炪‚ȃJƒ^ƒJƒi‚Æ‚»‚ê‚É‘±‚­‘÷“_”¼‘÷“_‚ð1•¶Žš‚ɂ܂Ƃ߂鳋K‰»
      ja-minus-hack‘SŠpƒ}ƒCƒiƒX‹L†‚ðƒnƒCƒtƒ“ ('-') ‚ɳ‹K‰»
      ja-delimiter-hack‘SŠpƒsƒŠƒIƒh‚¨‚æ‚Ñ‹å“_‚𔼊p‚̃sƒŠƒIƒh ('.') ‚ɳ‹K‰»
      -
      - -
      -
      -
      [Ý’è—á] -
      -
      -normalize unicode-lowercase unicode-form-kc 
      -
      -
      -
      - -
      alternate-encoding -
      -‚±‚̃Gƒ“ƒgƒŠ[‚ł͑ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŒ`Ž®‚ðŽw’肵‚Ü‚·B - ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚ÍADNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‘¤‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÉŽ¸”s‚µ‚½Žž‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚·B -—Ⴆ‚Γú–{Œê‚ðˆµ‚¤ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É DNS ƒT[ƒo‚©‚çŠØ‘‚̃nƒ“ƒOƒ‹•¶Žš‚ð -ŠÜ‚ÞƒhƒƒCƒ“–¼‚ª•Ô‚³‚ꂽꇂɂÍA“ú–{Œê‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚Å‚«‚È‚¢‚Ì‚ÅA‘ã‚í‚è‚É‚±‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽ -Œ‹‰Ê‚ª“n‚³‚ê‚Ü‚·B - -
      -alternate-encoding encoding -
      -encoding ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì–¼Ì‚ðŽw’肵‚Ü‚·B - -

      -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ­‚Ă͂Ȃè‚Ü‚¹‚ñB -

      - -

      -
      -
      [Ý’è—á] -
      -
      -alternate-encoding RACE
      -
      -
      -
      - -
      alias-file -
      -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃R[ƒhƒZƒbƒg–¼‚ðA•Ê–¼‚Æ‚µ‚ĒljÁ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -‚±‚±‚Å‚ÍA’ljÁ‚·‚é•Ê–¼‚Ì’è‹`ƒtƒ@ƒCƒ‹‚ւ̃pƒX–¼‚ðŽw’肵‚Ü‚·B - -
      -alias-file path -
      -path ‚É’è‹`ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’肵‚Ü‚·B - -
      -
      -
      [Ý’è—á] -
      -
      -alias-file /some/where/mdnalias.txt
      -
      -
      -
      - -•Ê–¼‚Ì’è‹`ƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚Å‚ ‚èA1s‚É1‚‚¸‚ -•Ê–¼‚ð’è‹`‚µ‚Ü‚·BŠes‚ÌŒ`Ž®‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -
      -
      -<•Ê–¼>     <Œ³‚Ì–¼‘O>
      -
      -
      -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ <Œ³‚Ì–¼‘O> ‚Ì‘ã‚í‚è‚É <•Ê–¼> ‚ª -Žg‚¦‚邿‚¤‚ɂȂè‚Ü‚·B - -
      - -
      -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä

      - -

      -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍAƒƒP[ƒ‹‚©‚ç„‘ª‚µ‚ÄŽ©“®”»’è‚·‚邽‚ßA -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðÝ’è‚·‚éƒGƒ“ƒgƒŠ‚Í‚ ‚è‚Ü‚¹‚ñB - -

      -‚½‚¾‚µAˆÈ‰º‚̂悤‚ȃP[ƒX‚̂Ƃ«‚ɂ͎©“®”»’肪‚Å‚«‚Ü‚¹‚ñB - -

        -
      • setlocate ŠÖ”‚ðŽg—p‚µ‚Ä‚¢‚È‚¢ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðŽÀs‚µ‚½‚Æ‚« -
      • C ƒƒP[ƒ‹‚̂܂܃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ðŽÀs‚µ‚½‚Æ‚« -
      • ƒƒP[ƒ‹‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚̑Ήž‚ª‚í‚©‚ç‚È‚¢‚Æ‚« -
      - -

      -‚±‚̂悤‚Èꇂɂ͊‹«•Ï” MDN_LOCAL_CODESET ‚ðÝ’è‚·‚邱‚Æ‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌÝ’è‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -—Ⴆ‚΃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð EUC-JP ‚ÉÝ’è‚·‚éꇂɂÍA -‚ ‚ç‚©‚¶‚ߎŸ‚̂悤‚ÈÝ’è‚ð‚µ‚Ä‚¨‚«‚Ü‚·B - -

      -
      -
      [Ý’è—á] -
      -
      -
      sh Œn‚̂Ƃ« -
      -
      -$ MDN_LOCAL_CODESET=EUC-JP
      -$ export MDN_LOCAL_CODESET
      -
      -
      csh Œn‚̂Ƃ« -
      -
      -% setenv MDN_LOCAL_CODESET EUC-JP
      -
      -
      -
      -
      - -

      Žw’è‚·‚é’l‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÅA‚±‚ê‚̓VƒXƒeƒ€‚Ì -iconv() ŠÖ” (‚æ‚賊m‚É‚Í iconv_open()) ‚ª -Žó‚¯•t‚¯‚é–¼‘O‚ÅŽw’肵‚Ü‚·B‚±‚Ì–¼‘O‚Í iconv ‚ÌŽÀ‘•‚É‚æ‚Á‚Ä -‚»‚ꂼ‚êˆÙ‚È‚è‚Ü‚·‚Ì‚ÅA‹ï‘Ì“I‚È’l‚ɂ‚¢‚Ä‚Í iconv ‚Ì -ƒhƒLƒ…ƒƒ“ƒg‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B - -

      ‚à‚µ‚ ‚È‚½‚ª’Pˆê‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žg—p‚µ‚Ä‚¢‚È‚¢‚̂ł ‚ê‚ÎA -‚±‚̂悤‚ÈÝ’è‚ð .profile ‚â .cshrc “™‚É“ü‚ê‚Ä‚¨‚­‚±‚Æ‚ð -‚¨Š©‚ß‚µ‚Ü‚·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/runmdn.html b/contrib/idn/mdnkit/doc/ja/guide/runmdn.html deleted file mode 100644 index 8fa4584e1c..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/runmdn.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - -runmdn - - - - -

      runmdn

      - - - -
      -

      ŠT—v

      - -

      runmdn ‚Í bind4 ‚ ‚é‚¢‚Í bind8 ‚ðƒx[ƒX‚Æ‚µ‚½ -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚Â Unix ƒNƒ‰ƒCƒAƒ“ƒg‚ðA -ăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B -‹ï‘Ì“I‚É‚ÍA–¼‘O‰ðŒˆ—p‚Ì API (—Ⴆ‚Î gethostbyname) ‚ª -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO (EUC-JP “™) ‚Å•\Œ»‚³‚ꂽ -ƒzƒXƒg–¼‚ðŽó‚¯•t‚¯‚邿‚¤‚ɂȂè‚Ü‚·B‚Ü‚½‚±‚ê‚ç‚Ì API ‚ª‘½Œ¾ŒêƒzƒXƒg–¼‚ð -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ŕԂ·‚悤‚ɂȂè‚Ü‚·B - -

      runmdn ‚ðŽg—p‚µ‚ăNƒ‰ƒCƒAƒ“ƒg‚ª‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É -‚·‚é•û–@‚ÍAmDNkit ‚ª’ñ‹Ÿ‚·‚é•û–@‚Ì’†‚ÅÅ‚àŽèŠÔ‚ª‚©‚©‚炸ŠÈ’P‚È‚à‚̂ł·‚ªA -ƒVƒXƒeƒ€‚É‚æ‚Á‚Ă͎g—p‚Å‚«‚È‚©‚Á‚½‚èAƒRƒ}ƒ“ƒh‚É‚æ‚Á‚Ă͌ø‰Ê‚ª‚È‚©‚Á‚½‚è -‚µ‚Ü‚·B‚±‚ê‚ç‚̧ŒÀ‚ÉŠÖ‚µ‚ĂͧŒÀŽ–€‚Ì€‚ð -‚²——‚­‚¾‚³‚¢B - -

      - -


      -

      Ý’è

      - -

      runmdn ‚ðŽg—p‚·‚é‚É‚ÍAmDNkit ‚̃Nƒ‰ƒCƒAƒ“ƒg‹¤’ÊÝ’èƒtƒ@ƒCƒ‹ -‚ÅŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚Ì•û–@‚ðݒ肵‚Ä‚¨‚­•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚̃tƒ@ƒCƒ‹‚ÌÝ’è•û–@‚ɂ‚¢‚Ä‚Í -mDNkit ƒŠƒ]ƒ‹ƒo‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ð -‚²——‚­‚¾‚³‚¢B - -

      ‚Ü‚½Arunmdn ‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ©“®“I‚É -„‘ª‚µ‚Ü‚·‚ªA„‘ª‚ÉŽ¸”s‚·‚éê‡‚à‚ ‚è‚Ü‚·B‚»‚̂悤‚Èꇂ̑Έ•û–@‚Í -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ð‚²——‚­‚¾‚³‚¢B - -

      - -


      -

      Žg—p–@

      - -

      runmdn ‚ÌŽg‚¢•û‚͋ɂ߂ĊȒP‚ÅAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì‹N“®ƒRƒ}ƒ“ƒh‚Ì -擪‚ɃRƒ}ƒ“ƒh–¼ runmdn ‚ð‚‚¯‚邾‚¯‚Å‚·B - -

      -
      -% runmdn ƒRƒ}ƒ“ƒh [ˆø”...]
      -
      -
      - -

      —Ⴆ‚Î telnet ƒRƒ}ƒ“ƒh‚ðŽg—p‚µ‚ăzƒXƒguŽ„‚̉ïŽÐ.jpv‚É -Ú‘±‚·‚é‚ɂ͎Ÿ‚̂悤‚É‚µ‚Ü‚·B - -

      -
      -% runmdn telnet Ž„‚̉ïŽÐ.jp
      -
      -
      - -
      -

      §ŒÀŽ–€

      - -

      runmdn ‚ÍAmDNkit ‚ª’ñ‹Ÿ‚µ‚Ä‚¢‚é•û–@‚Ì’†‚ÅÅ‚àŽèŒy‚ɃNƒ‰ƒCƒAƒ“ƒg‚ª -‘½Œ¾ŒêƒhƒƒCƒ“‚ðˆµ‚¦‚邿‚¤‚É‚·‚é‚à‚̂ł·‚ªA‚ǂ̂悤‚ȃNƒ‰ƒCƒAƒ“ƒg‚É‚à -“K—p‚Å‚«‚é‚킯‚ł͂ ‚è‚Ü‚¹‚ñB - -

      runmdn ‚̓VƒXƒeƒ€‚ÌŽ‚‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\ -(ƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\) ‚ð—˜—p‚µA -ƒNƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽÀsŽž‚ÉAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚Ä‚¢‚é -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚̈ꕔ‚ÌŠÖ”‚𑽌¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‹@”\‚ðŽ‚½‚¹‚½ -ƒo[ƒWƒ‡ƒ“‚Ì‚à‚̂ƒu‚«Š·‚¦‚Ä‚µ‚Ü‚¤‚±‚Ƃɂæ‚Á‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð -ŽÀŒ»‚µ‚Ü‚·B’u‚«Š·‚¦‚éŠÖ”‚Í bind4 ‚¨‚æ‚Ñ bind8 ‚ðƒx[ƒX‚Æ‚·‚郊ƒ]ƒ‹ƒo -‚ª“à•”‚ÅŽg—p‚µ‚Ä‚¢‚éŠÖ”‚Å‚·B - -

      ‚µ‚½‚ª‚Á‚Ä runmdn ‚ª“®ì‚·‚é‚ɂ͎Ÿ‚̂悤‚È‚¢‚­‚‚©‚̧ŒÀ‚ª‚ ‚è‚Ü‚·B -

        -
      1. ‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—p‚¢‚Ä‚¢‚é‚Ì‚ÅA - ‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªŽg—p‚Å‚«‚éƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñ -
      2. ŠÂ‹«•Ï” LD_PRELOAD ‚Ü‚½‚Í—ÞŽ—‚Ì‹@\‚É‚æ‚é - ƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\‚ðŽ‚ÂƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñ -
      3. runmdn ‚Ì‘ÎۂƂȂéƒRƒ}ƒ“ƒh‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðƒXƒ^ƒeƒBƒbƒNƒŠƒ“ƒN - ‚µ‚Ä‚¢‚Ă͂Ȃè‚Ü‚¹‚ñ -
      4. ƒVƒXƒeƒ€‚̃‰ƒCƒuƒ‰ƒŠ‚ª iconv() ŠÖ”‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚È‚¢ê‡AŠO•”‚Ì - ƒ‰ƒCƒuƒ‰ƒŠ‚ð—p‚¢‚邱‚ƂɂȂè‚Ü‚·‚ªA‚»‚̃‰ƒCƒuƒ‰ƒŠ‚à‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Å - ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      5. ƒVƒXƒeƒ€‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Í bind4 ‚ ‚é‚¢‚Í bind8 ƒx[ƒX‚Ì‚à‚̂łȂ¯‚ê‚Î - ‚È‚è‚Ü‚¹‚ñB -
      6. ƒZƒLƒ…ƒŠƒeƒBã‚Ì——R‚©‚çˆê”Ê‚É setuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚̓vƒŠƒ[ƒh‹@”\‚ª - Žg‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅAsetuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚Å‚ ‚Á‚Ă͂Ȃè‚Ü‚¹‚ñB -
      - -

      ‚±‚ê‚ç‚̧ŒÀ‚É‚æ‚è runmdn ‚ªŽg—p‚Å‚«‚È‚¢ê‡‚ÍAmDNkit ‚ª’ñ‹Ÿ‚·‚鑼‚Ì -•û–@ (dnsproxy ‚â bind9 ƒpƒbƒ` ‚È‚Ç) ‚ð‚²—˜—p‚­‚¾‚³‚¢B - - - diff --git a/contrib/idn/mdnkit/doc/ja/guide/wrapper.html b/contrib/idn/mdnkit/doc/ja/guide/wrapper.html deleted file mode 100644 index f2e78db6e2..0000000000 --- a/contrib/idn/mdnkit/doc/ja/guide/wrapper.html +++ /dev/null @@ -1,412 +0,0 @@ - - - - - -mDN Wrapper - User's Guide - - - - -

      mDN Wrapper

      - - -

      - -


      - -

      ŠT—v

      -

      -Windows ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂ɂÍA -Windows ã‚̃Nƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚¨‚¢‚ÄA -‰ðŒˆ‚µ‚悤‚Æ‚·‚é–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðA -DNS ƒT[ƒo‚ªŽó•t‚¯‚éŒ`Ž®‚Ì‚à‚̂ɕϊ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚ê‚ÍAWindows ã‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA -‚«‚¿‚ñ‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃç‚È‚¢A -‚Æ‚¢‚¤‚±‚Ƃł ‚èA–{—ˆ‚Í‚»‚ꂼ‚ê‚̃vƒƒOƒ‰ƒ€‚Ì쬎҂ªs‚È‚¤‚ׂ«‚±‚Ƃł·B -

      -‚µ‚©‚µA•W€‚ªŒˆ‚Ü‚Á‚Ä‚¢‚È‚¢Œ»ó‚Å‚ÍA -ƒvƒƒOƒ‰ƒ€ì¬ŽÒ‚É‚±‚̂悤‚ȑΉž‚ðŠú‘Ò‚·‚é‚͖̂³—‚Ȃ̂ÅA -Šù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚𑽌¾ŒêƒhƒƒCƒ“–¼‘Ήž‚³‚¹‚邽‚ß‚Ì -ƒgƒŠƒbƒN‚ª•K—v‚ɂȂè‚Ü‚·B -mDNkit‚Ɋ܂܂ê‚édnsproxyƒT[ƒo‚Í‚»‚Ì‚½‚߂̈ê‚‚̕û–@‚Å‚·B -‚±‚±‚Å‚ÍA‚à‚¤ˆê‚‚̕û–@AmDN Wrapper ‚ð’ñަ‚µ‚Ü‚·B -

      -Windows ‚É‚¨‚¢‚ÄA‘½‚­‚Ìê‡AƒhƒƒCƒ“–¼‰ðŒˆ‚Ì—v‹‚ÍWINSOCK DLL -‚É“n‚³‚ê‚Ü‚·B‚»‚±‚ÅAWINSOCK DLL ‚𑽌¾ŒêƒhƒƒCƒ“–¼‘Ήž‚Ì‚à‚̂ɒu‚« -Š·‚¦‚Ä‚â‚ê‚ÎAŠù‘¶‚̃vƒƒOƒ‰ƒ€‚©‚ç‚Å‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å -‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

      - -


      - -

      ƒZƒbƒgƒAƒbƒv

      -

      -*’ˆÓ* -‚à‚µŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚Ì mDN Wrapper ‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éƒ}ƒVƒ“‚É -V‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍA‚Ü‚¸ -ƒo[ƒWƒ‡ƒ“ƒAƒbƒvŽž‚Ì’ˆÓ‚ð‚²——‚­‚¾‚³‚¢B -

      -mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚Í"setup.exe" ‚ðŽÀs‚µ‚Ü‚·B -ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€‚ÍŽŸ‚̂悤‚Ȉ—‚ðs‚¢‚Ü‚·B -

      -
      ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ -

      -

      -ƒfƒBƒŒƒNƒgƒŠu\Program Files\JPNIC\mDN Wrapperv -iƒZƒbƒgƒAƒbƒv‚Å•ÏX‰Â”\jˆÈ‰º‚ÉA -mDN Wrapper ‚ð\¬‚·‚éƒtƒ@ƒCƒ‹‚ðƒRƒs[‚µ‚Ü‚·B -

      -

      ƒŒƒWƒXƒgƒŠ‚ÌÝ’è -

      -

      -HKEY_LOCAL_MACHINE\Software\JPNIC\MDN ˆÈ‰º‚É•K—v‚ȃŒƒWƒXƒgƒŠƒL[A -ƒŒƒWƒXƒgƒŠ’l‚ðì¬Aݒ肵‚Ü‚·BŽå‚È‚à‚͎̂Ÿ‚Ì’Ê‚è‚Å‚·B -

      -

      -
      Encoding REG_SZ -
      -DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Å‚·B -ƒfƒtƒHƒ‹ƒg’l‚Í "RACE" ‚ÅA‚±‚ê‚ÍŒ»Žž“_‚ł̗L—ÍŒó•â‚Å‚ ‚é -RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’è‚Å‚·B -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å -•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

      Normalize REG_SZ -
      -ƒhƒƒCƒ“–¼‚̳‹K‰»‚Ì•ûŽ®‚Å‚·BŽg—p‚·‚鳋K‰»‚Ì–¼Ì (•¡”Žw’è‚·‚éê‡‚É‚Í -ƒXƒy[ƒX‚Å‹æØ‚é) ‚ðŽw’肵‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í“ú–{ŒêƒhƒƒCƒ“–¼‚̳‹K‰»‚Æ‚µ‚Ä“K“–‚¾‚ÆŽv‚í‚ê‚é’l‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚±‚ê‚à ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Å -•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

      PerProg ƒL[ -
      -ƒvƒƒOƒ‰ƒ€–ˆ‚ÌÝ’è’l‚ðŠi”[‚·‚邽‚߂̃L[‚Å‚·B -‚±‚̉º‚ÉAƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ðƒL[‚Æ‚µ‚Ä -ƒvƒƒOƒ‰ƒ€ŒÂ•Ê‚Ìݒ肪‹L˜^‚³‚ê‚Ü‚·B -ݒ肳‚ê‚éî•ñ‚͈ȉº‚Ì“ñ‚‚ł·B - - - - - - - -
      PerProg\<progname>\WhereREG_DWORD•ÏŠ·ˆÊ’u
      PerProg\<progname>\EncodingREG_SZƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼
      -

      -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í’ÊíƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚É‚æ‚Á‚Äݒ肳‚ê‚Ü‚·B -•ÏŠ·ˆÊ’u‚ÌŽw’è‚ÍA•W€ƒCƒ“ƒXƒg[ƒ‹‚ł͕s—v‚Å‚·B -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚Á‚½ê‡‚É‚ÍA -ƒŒƒWƒXƒgƒŠƒGƒfƒBƒ^‚Ŋ‹«‚ɇ‚킹‚ÄÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -

      -

      ƒAƒCƒRƒ“‚Ìì¬ -

      -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚̃AƒCƒRƒ“‚ð쬂µA -ƒXƒ^[ƒgƒƒjƒ…[‚É“o˜^‚µ‚Ü‚·B -‚±‚ê‚É‚æ‚Á‚ăRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ð‹N“®‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -
      -

      -ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚ÌuƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì’Ç -‰Á‚Æíœv‚ÅAumDN Wrapperv‚ð‘I‘ð‚µ‚Äíœiu’ljÁ‚Æíœvƒ{ƒ^ƒ“j -‚µ‚Ü‚·B -

      - -


      - -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€

      -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ÍA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð“Á’肵‚Ä mDN Wrapper ‚ð“K—p‚µ‚½‚èA -“K—p‚ð‰ðœ‚·‚邽‚߂̃c[ƒ‹‚Å‚·B -

      -‹N“®‚·‚邯ˆÈ‰º‚̂悤‚ȉæ–Ê‚ª•\ަ‚³‚ê‚Ü‚·B -

      -

      -Configuration Startup -
      -

      -ƒŠƒXƒgƒ{ƒbƒNƒX‚É‚ÍA‚»‚ÌŽž“_‚Å mDN Wrapper ‚ª“K—p‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ª -•\ަ‚³‚ê‚Ü‚·B -ʼn‚ÉŽÀs‚µ‚½ê‡‚ɂ͋ó‚ɂȂÁ‚Ä‚¢‚Ü‚·B‰E‘¤‚̃{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èA -‘€ì‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

      mDN Wrapper ‚Ì“K—p

      - -ƒvƒƒOƒ‰ƒ€‚É mDN Wrapper ‚ð“K—p‚·‚é‚É‚ÍA"Wrap.."ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B -"Wrap.."ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƈȉº‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B -

      -

      -Configuration Wrap -
      -

      -ʼn‚ÉAmDN Wrapper ‚ð“K—p‚µ‚½‚¢ƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒtƒ@ƒCƒ‹–¼‚ðݒ肵‚Ü‚·B -’¼Ú“ü—Í‚·‚é‚©Aƒuƒ‰ƒEƒYƒ{ƒ^ƒ“‚Ńtƒ@ƒCƒ‹‚ð’T‚µ‚Ä‚­‚¾‚³‚¢B -

      -

      -Configuration Browse -
      -

      -ŽŸ‚É‚»‚̃vƒƒOƒ‰ƒ€‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -’Êí‚ÍuDefaultv ‚Å‚©‚Ü‚¢‚Ü‚¹‚ñB -ƒvƒƒOƒ‰ƒ€‚ª‘Û‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É]‚Á‚Ä‚¢‚éê‡‚É‚Ì‚Ý -uUTF-8v ‚ðŽwަ‚µ‚Ü‚·B -

      -

      -Configuration Encoding -
      -

      -ÅŒã‚É "Wrap" ƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚ÎA‚»‚̃vƒƒOƒ‰ƒ€‚ɑ΂µ‚Ä -Žw’肳‚ꂽƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å mDN Wrapper ‚ª“K—p‚³‚ê‚Ü‚·B -“K—p‚³‚ꂽƒvƒƒOƒ‰ƒ€‚ÍAʼn‚̃EƒBƒ“ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚É”½‰f‚³‚ê‚Ü‚·B -

      -

      -Configuration Wrapped -
      - -

      mDN Wrapper ‚̉ðœ

      - -ƒvƒƒOƒ‰ƒ€‚ɑ΂·‚é mDN Wrapper ‚Ì“K—p‚ð‰ðœ‚·‚é‚É‚ÍA -ƒŠƒXƒgƒ{ƒbƒNƒX‚ʼn𜂷‚éƒvƒƒOƒ‰ƒ€‚ð‘I‘ð‚µ‚ÄA -"Unwrap.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B -ˆÈ‰º‚ÌŠm”F—p‚̃_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·‚Ì‚ÅA -ŠÔˆá‚¢‚ª‚È‚¯‚ê‚Î "Unwrap" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -

      -

      -Configuration Unwrap -
      -

      -mDN Wrapper ‚Ì“K—p‚ª‰ðœ‚³‚ê‚邯A‚»‚̃vƒƒOƒ‰ƒ€‚Íʼn‚̃EƒBƒ“ƒhƒE‚Ì -ƒŠƒXƒgƒ{ƒbƒNƒX‚©‚ç‚à휂³‚ê‚Ü‚·B -

      -

      -Configuration Unwraped -
      - -

      -"Unwrap All" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚Á‚ÄA -Œ»Ý“K—p‚³‚ê‚Ä‚¢‚é‚·‚ׂẴvƒƒOƒ‰ƒ€‚ɑ΂µ‚Ä mDN Wrapper ‚Ì“K—p‚ð -‰ðœ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B - -

      ƒƒOÝ’è

      - -"Log.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚Á‚ăƒOƒŒƒxƒ‹‚⃃Oƒtƒ@ƒCƒ‹‚ðÝ’è‚·‚邱‚Æ‚ª -‚Å‚«‚Ü‚·B -‚±‚̃{ƒ^ƒ“‚ð‰Ÿ‚·‚ÆŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ªŒ»‚ê‚Ü‚·B -

      -

      -Configuration Log -
      -

      -ƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì’†‚©‚ç‘I‚Ô‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

      -
      None
      ƒƒO‚ðˆêØo—Í‚µ‚Ü‚¹‚ñB‚±‚ꂪƒfƒtƒHƒ‹ƒg‚Å‚·B -
      Fatal
      ’v–½“IƒGƒ‰[‚Ì‚Ýo—Í‚µ‚Ü‚·B -
      Error
      ’v–½“I‚łȂ¢ƒGƒ‰[‚ào—Í‚µ‚Ü‚·B -
      Warning
      ŒxƒƒbƒZ[ƒW‚ào—Í‚µ‚Ü‚·B -
      Info
      ƒGƒ‰[ˆÈŠO‚Ìî•ñ‚ào—Í‚µ‚Ü‚·B -
      Trace
      ƒvƒƒOƒ‰ƒ€‚̃gƒŒ[ƒXî•ñ‚ào—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ð‘I‘ð‚·‚é‚Æ - ‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚̂ŋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B -
      -‚È‚¨A‚±‚̃ƒOƒŒƒxƒ‹‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚ª -o—Í‚·‚郃O‚ɑ΂·‚é‚à‚̂ł·BmDN Wrapper Ž©‘Ì‚ªo—Í‚·‚郃O‚ɂ‚¢‚Ä‚Í -ON/OFF ˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚邱‚Ƃ͂ł«‚¸ANone ‚ðŽw’è‚·‚ê‚΃Iƒt‚ÉA -‚»‚êˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚ê‚΃Iƒ“‚ɂȂè‚Ü‚·B - -

      -ƒƒOƒtƒ@ƒCƒ‹‚ðŽw’è‚·‚邱‚Æ‚à‰Â”\‚Å‚·BƒfƒtƒHƒ‹ƒg‚Å‚Í mDN Wrapper ‚ð -ƒCƒ“ƒXƒg[ƒ‹‚µ‚½ƒfƒBƒŒƒNƒgƒŠ‚Ì "mdn_wrapper.log" ‚ɂȂÁ‚Ä‚¢‚Ü‚·B -"Browse.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚΃uƒ‰ƒEƒY—p‚̃_ƒCƒAƒƒO‚ð—˜—p‚µ‚Ä‘I‘ð‚·‚é‚±‚Æ‚ª -‚Å‚«‚Ü‚·B - -

      -‚Ü‚½A‚±‚̃_ƒCƒAƒƒO‚ł̓ƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ðŒ©‚é‚±‚Æ‚ÆAƒƒOƒtƒ@ƒCƒ‹‚ð -휂·‚邱‚Æ‚ª‰Â”\‚Å‚·B‚»‚ꂼ‚ê "View"A"Delete" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B -"View" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƃƒ‚’ ‚ª‹N“®‚µ‚ÄAƒƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•\ަ‚µ‚Ü‚·B - -

      -"OK" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƃ_ƒCƒAƒƒO‚Ìݒ肪—LŒø‚ɂȂè‚Ü‚·BÝ’è‚ð•Ï‚¦‚½‚­‚È‚¢ -ê‡‚É‚Í "Cancel" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B - -

      Ú׃pƒ‰ƒ[ƒ^Ý’è

      - -"Advanced.." ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èAŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B -‚±‚ê‚Í㋉ƒ†[ƒU‚Ì‚½‚߂̂à‚Ì‚ÅA“K؂ȃfƒtƒHƒ‹ƒg‚ªÝ’肳‚ê‚Ä‚¢‚é‚̂Š-’Ê탆[ƒU‚ª•ÏX‚·‚é•K—v‚̂Ȃ¢‚悤‚ÈŠî–{“I‚ȃpƒ‰ƒ[ƒ^‚ð -•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

      -Configuration Advanced -
      -

      -ƒ_ƒCƒAƒƒOÅã•”‚̃pƒlƒ‹‚ŃvƒƒOƒ‰ƒ€‚ɑ΂·‚é mDN Wrapper ‚Ì“K—pƒ‚[ƒh‚ð -Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B‘I‘ð‚Å‚«‚é’l‚Æ‚»‚̈Ӗ¡‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

      -
      Wrap both WINSOCK 1.1 and WINSOCK 2.0 -
      WINSOCK 1.1 ‚Æ 2.0 ‚Ì—¼•û‚̌ĂÑo‚µ‚ɂ‚¢‚Ä mDN Wrapper ‚ð“K—p‚µA - ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¢‚Ü‚·B - ’Êí‚Í‚±‚̃‚[ƒh‚ÅŽg‚¦‚γ‚µ‚­“®‚­‚Í‚¸‚Å‚·B -
      Wrap only WINSOCK 1.1 -
      WINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Í mDN Wrapper ‚ð“K—p‚µ‚Ü‚·‚ªA - WINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ă͓K—p‚µ‚Ü‚¹‚ñB -
      Wrap only WINSOCK 2.0 -
      WINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Í mDN Wrapper ‚ð“K—p‚µ‚Ü‚·‚ªA - WINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ă͓K—p‚µ‚Ü‚¹‚ñB -
      Wrap only WINSOCK 2.0 if it exists. Otherwise wrap only WINSOCK 1.1 -
      WINSOCK 2.0 ‚ª‘¶Ý‚·‚ê‚Î WINSOCK 2.0 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä‚Ì‚Ý mDN Wrapper ‚ð - “K—p‚µ‚Ü‚·B‘¶Ý‚µ‚È‚¢ê‡‚É‚Í WINSOCK 1.1 ‚̌ĂÑo‚µ‚ɂ‚¢‚Ä“K—p‚µ‚Ü‚·B - WINSOCK ‚̃o[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă̓fƒtƒHƒ‹ƒg‚łͳ‚µ‚­“®‚©‚¸A‚±‚̃‚[ƒh‚ð - Žw’肵‚È‚¯‚ê‚΂Ȃç‚È‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB -
      - -

      -’†’i‚̃pƒlƒ‹‚łͳ‹K‰»‚Ì•ûŽ®‚ðÝ’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B¶‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚É -Žg—p‚·‚鳋K‰»‚Ì–¼Ì‚ª“ü‚Á‚Ä‚¨‚èA‰E‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚ɂ͎g—p‰Â”\‚È -³‹K‰»‚Ì–¼Ì‚ª“ü‚Á‚Ä‚¢‚Ü‚·B‰E‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚©‚ç’ljÁ‚µ‚½‚¢³‹K‰»‚ð -‘I‘ð‚µA"Add" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚ƶ‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚ɒljÁ‚³‚ê‚Ü‚·B -‚Ü‚½A¶‘¤‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚Å휂µ‚½‚¢³‹K‰»‚ð‘I‘ð‚µ‚Ä "Remove" ƒ{ƒ^ƒ“‚ð -‰Ÿ‚¹‚Î휂·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B"Clear" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚Æ‚·‚ׂĂ̳‹K‰»‚ª -휂³‚êA‚Ü‚½ "Reset" ƒ{ƒ^ƒ“‚É‚æ‚èƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚É–ß‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B - -

      -3’i–ڂ̃pƒlƒ‹‚Å‚Í DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í "RACE" ‚Å‚·‚ªA‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚µ‚½‚¢ê‡‚É‚Í -‚±‚±‚ÅŽw’肵‚Ä‚­‚¾‚³‚¢B - -

      -ˆÈã‚ÌÝ’è‚Í "OK" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚è—LŒø‚ɂȂè‚Ü‚·BÝ’è‚ð•Ï‚¦‚¸‚É -ƒ_ƒCƒAƒƒO‚ðI—¹‚µ‚½‚¢ê‡‚É‚Í "Cancel" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -


      - -

      §ŒÀŽ–€

      -
      -
      DLL ƒo[ƒWƒ‡ƒ“ -

      -ƒ‰ƒbƒp[DLL ‚ÍAŒ³‚ÌWINSOCK ‚ÌDLL ‚̃o[ƒWƒ‡ƒ“‚É‹­‚­ˆË‘¶‚µ‚Ü‚·B -‚±‚ê‚ÍA”ñŒöŠJ‚̃Gƒ“ƒgƒŠ‚àŠÜ‚ß‚Ä -‚·‚ׂẴGƒ“ƒgƒŠ‚ð’ñ‹Ÿ‚·‚é•K—v‚ª‚ ‚邽‚߂ł·B -‚±‚Ì‚½‚ßWINSOCK DLL ‚̃o[ƒWƒ‡ƒ“‚ª•Ï‚í‚邯A -mDN Wrapper ‚ª“®ì‚µ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -

      -¡‰ñ쬂³‚ꂽmDN Wrapper ‚ÍA -

      - - - - -
      WinNT4.0 SP6a(WINSOCK 1.1 + 2.0)
      Win98 (WINSOCK 1.1 + 2.0)
      Win95 OSR2 (WINSOCK 1.1)
      -
      -‚Å“®ì‚ðŠm”F‚µ‚Ä‚¢‚Ü‚·B‚½‚¾A«—ˆ‚ɂ킽‚Á‚Ä“®ì‚·‚é•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñB -

      -

      DNS, WINS, LMHOSTS -

      -Windows ‚Å‚ÍADNS ‚¾‚¯‚ł͂Ȃ­A -WINS‚âLMHOSTS ‚É‚æ‚Á‚Ä‚àƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚Ì‰ðŒˆ‚ªs‚È‚í‚ê‚Ü‚·B -mDN Wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍAƒhƒƒCƒ“–¼‚̕ϊ·‚ªA -‚±‚ê‚ç‚Ì•ûŽ®‚ւ̃fƒBƒXƒpƒbƒ`‚ðs‚È‚¤êŠ‚æ‚è‚àãˆÊ‘w‚Ås‚È‚í‚ê‚é‚Ì‚ÅA -‚±‚ê‚ç‚Ì‚·‚ׂĂ̕ûŽ®‚ɂ‚¢‚ÄA -ƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚̕ϊ·‚ªs‚È‚í‚ê‚邱‚ƂɂȂè‚Ü‚·B -‚±‚Ì‚½‚ßAWindows ‚ªAWINS‚âLMHOSTS ‚ðŽg‚Á‚Ä‚¢‚éꇂɂÍA -—\Šú‚µ‚È‚¢–â‘肪”­¶‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -‚±‚ê‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚ðŽg‚¤ê‡‚É‚ÍA -–¼‘O‰ðŒˆ‚ÉDNS ‚¾‚¯‚ðŽg—p‚·‚邱‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B -

      -

      ƒhƒƒCƒ“–¼ˆÈŠO‚Ì–¼‘O‚Ì‰ðŒˆ -

      -WINSOCK 2.0 ‚Ì–¼‘O‰ðŒˆAPI -

      - - - - -
      WSALookupServiceBeginW
      WSALookupServiceNextW
      WSALookupServiceEnd
      -
      -‚ÍAƒhƒƒCƒ“–¼ˆÈŠO‚Å‚àŽg—p‚Å‚«‚éA -”Ä—p‚Ì–¼‘O‰ðŒˆ—p‚ÌAPI ‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -Œ»Žž“_‚Å‚ÍA‚±‚ê‚ç‚Í‚à‚Á‚Ï‚çƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ÅŽg—p‚³‚ê‚Ä‚¢‚Ü‚·‚ªA -‘¼‚Ì–¼‘O(—Ⴆ‚΃T[ƒrƒX–¼)‚Ì‰ðŒˆ‚É‚àŽg—p‚Å‚«‚邱‚ƂɂȂÁ‚Ä‚¢‚Ü‚·B -

      -mDN Wrapper ‚ÍA–¼‘O‚Ì‘ÎÛ‚Ì”@‰½‚É‚©‚©‚í‚炸A -–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA -‚±‚ê‚ç‚ÌAPI ‚ªAƒhƒƒCƒ“–¼ˆÈŠO‚Ì‰ðŒˆ‚ÉŽg‚í‚ê‚Ä‚¢‚éꇂɂÍA -–â‘è‚ðˆø‚«‹N‚±‚·‰Â”\«‚ª‚ ‚è‚Ü‚·B -

      -

      –¼‘O‰ðŒˆAPI ‚ðŽg‚í‚È‚¢ƒvƒƒOƒ‰ƒ€ -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA -ƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚É‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚à‚Ì‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎA'nslookup'‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚ÅA -’¼ÚDNS ƒT[ƒo‚Æ’ÊM‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B -‚±‚̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍA -mDN Wrapper ‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB -

      -

      “Á’èWINSOCK DLL ‚ɃoƒCƒ“ƒh‚³‚ꂽƒAƒvƒŠƒP[ƒVƒ‡ƒ“ -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA•W€‚ÌDLL ƒT[ƒ`ƒpƒX‚É]‚í‚È‚¢‚ÅA -“Á’è‚̃pƒX‚ÌDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚æ‚­Žg‚í‚ê‚éƒvƒƒOƒ‰ƒ€‚Ì’†‚Å‚ÍANetscape Communicator ‚ª‚»‚¤‚È‚Á‚Ä‚¢‚Ü‚·B -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚Ä‚ÍA -•W€‚̃Cƒ“ƒXƒg[ƒ‹^ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Å‚Í mDN Wrapper ‚ð“K—p‚·‚邱‚Æ‚Í -‚Å‚«‚Ü‚¹‚ñB -

      -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚ÄA‚Ç‚¤‚µ‚Ä‚à mDN Wrapper ‚ð“K—p‚·‚é•K—v‚ª‚ ‚é‚È‚çA -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚½‚¾‚µA‚±‚̃Cƒ“ƒXƒg[ƒ‹‚Í‘å•ϊ댯‚ÅA -ꇂɂæ‚Á‚Ă̓VƒXƒeƒ€‚ðÄ‹N“®•s”\‚É‚µ‚Ä‚µ‚Ü‚¤‰Â”\«‚à‚ ‚è‚Ü‚·B -

      -

      ‘ã‘ÖŽè’i‚Æ‚µ‚Ä‚Ì'dnsproxy' -

      -‚±‚ê‚ç‚̧ŒÀŽ–€‚ª–â‘è‚ɂȂéꇂɂÍA -‘ã‘ÖŽè’i‚Æ‚µ‚Ä'dnsproxy'‚ðŽg‚¤‚±‚Æ‚à‚Å‚«‚Ü‚·B -‚±‚ê‚ÍADNS ƒT[ƒo‚Ƃ̃gƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“‚𒆌p‚·‚é‚Ì‚ÅA -ã‚Å–â‘è‚ɂȂÁ‚½‚悤‚È‚±‚Æ‚ð‰ñ”ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

      -‚½‚¾‚µA'dnsproxy'‚ÍAƒ‰ƒbƒp[‚æ‚è‚à•¡ŽG‚Èݒ肪•K—v‚Å‚·‚µA -‚Ü‚½AŒÄ‚ÑŒ³‚̃vƒƒOƒ‰ƒ€‚ð“Á’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñ‚Ì‚ÅA -ƒvƒƒOƒ‰ƒ€ŒÅ—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽæ‚èˆµ‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñB -‚µ‚©‚µAã‹L‚̧ŒÀŽ–€‚ª–â‘è‚É‚È‚é‚æ‚¤‚ȃP[ƒX‚Å‚ÍA -ƒ‰ƒbƒp[‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚邯‚¢‚¢‚©‚à‚µ‚ê‚Ü‚¹‚ñB -

      - -
      - -

      ƒo[ƒWƒ‡ƒ“ƒAƒbƒvŽž‚Ì’ˆÓ

      - -

      ŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚Ì mDN Wrapper ‚ª‚·‚łɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éƒ}ƒVƒ“‚É -V‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éÛ‚É‚ÍAŽŸ‚Ì‚±‚ƂɋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B - -

        -
      1. ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚Ɍ¢ƒo[ƒWƒ‡ƒ“‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é
        -V‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAŒÃ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ -‚µ‚Ä‚­‚¾‚³‚¢B‚»‚¤‚µ‚È‚¢‚ÆAV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚à -‚¢‚­‚‚©‚̃tƒ@ƒCƒ‹‚ªXV‚³‚ꂸAŒÃ‚¢‚܂܎c‚Á‚Ä‚µ‚Ü‚¢‚Ü‚·B -ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚Ì -uƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̒ljÁ‚Æíœv‚ðŽÀs‚µAumDN Wrapperv‚ð‘I‘ð‚µ‚Äíœ -‚ðŽÀs‚µ‚Ä‚­‚¾‚³‚¢B
        -‚à‚µƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚¹‚¸‚ÉV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚µ‚Ü‚Á‚½ê‡‚É‚ÍA -ˆê“x‚»‚ê‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚©‚çÄ“xƒCƒ“ƒXƒg[ƒ‹‚ðs‚Á‚Ä‚­‚¾‚³‚¢B

        -

      2. ‚·‚ׂẴtƒ@ƒCƒ‹‚ðÄ“xƒ‰ƒbƒv‚·‚é
        -mDN Wrapper ‚Í‚»‚Ì“®ìŒ´—ãAmDN Wrapper ‚ð“K—p‚·‚éƒvƒƒOƒ‰ƒ€‚ª‘¶Ý‚·‚é -ƒfƒBƒŒƒNƒgƒŠ‚ÉDLL ‚ðƒRƒs[‚µ‚Ü‚·B -ƒRƒs[‚³‚ꂽ DLL ‚ÍV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚à -XV‚³‚ê‚È‚¢‚Ì‚ÅA‚»‚̂܂܂łÍV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ªŽg‚í‚ê‚Ü‚¹‚ñB -‚±‚Ì‚½‚ßAV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚çAˆê“x mDN Wrapper ‚Ì“K—p‚ð -‚·‚ׂĉ𜂵A‰ü‚߂ēK—p‚µ’¼‚µ‚Ä‚­‚¾‚³‚¢B‚·‚ׂẴvƒƒOƒ‰ƒ€‚ɑ΂·‚é“K—p‚ð -‰ðœ‚·‚é‚É‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Ì "Unwrap All" ƒ{ƒ^ƒ“‚ð -Žg—p‚·‚é‚Ì‚ª•Ö—˜‚Å‚·B -
      - - - - diff --git a/contrib/idn/mdnkit/doc/ja/index.html b/contrib/idn/mdnkit/doc/ja/index.html deleted file mode 100644 index 02ad24fa22..0000000000 --- a/contrib/idn/mdnkit/doc/ja/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -mDNkit Documentation - - - - - -

      mDNkit ƒhƒLƒ…ƒƒ“ƒg

      - -

      mDNkit ‚̃hƒLƒ…ƒƒ“ƒg‚͈ȉº‚̂悤‚È3•”\¬‚ƂȂÁ‚Ä‚¢‚Ü‚·B - -

        -
      • mDNkit ƒ†[ƒU[ƒYƒKƒCƒh
        - ƒVƒXƒeƒ€ŠÇ—ŽÒ‚¨‚æ‚шê”ʃ†[ƒUŒü‚¯‚̃}ƒjƒ…ƒAƒ‹‚Å‚·B -

        -

      • mDNkit Žd—l‘
        - –{ƒLƒbƒg‚ÌŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚ÌŽd—l‘‚Å‚·B -

        -

      • mDNkit Frequently Asked Questions
        - –{ƒLƒbƒg‚Ì FAQ (JPNIC Web ƒy[ƒW‚Ö‚ÌƒŠƒ“ƒN)‚Å‚·B - FAQ ‚ÍŽžXV‚³‚ê‚邽‚ßA‚±‚̃pƒbƒP[ƒW‚ɂ͊܂܂ê‚Ä‚¢‚Ü‚¹‚ñB - ‚²—¹³‚­‚¾‚³‚¢B -
      - -

      mDNkit ƒ†[ƒU[ƒYƒKƒCƒh‚¨‚æ‚Ñ mDNkit Žd—l‘‚Ì“à—e‚Í -mDNkit ƒo[ƒWƒ‡ƒ“ 1.2 ‚ɑΉž‚µ‚Ä‚¢‚Ü‚·B - -

      ŠÖ˜A‚·‚éƒhƒLƒ…ƒƒ“ƒg‚¨‚æ‚ÑŠÖ˜Aƒ\ƒtƒgƒEƒFƒA‚Ȃǂւ̃|ƒCƒ“ƒ^‚ð‚܂Ƃ߂½ -ŽQl•¶Œ£‚̃y[ƒW‚à‚²——‚­‚¾‚³‚¢B - -

      –{ƒLƒbƒg‚ÉŠÖ‚·‚éƒRƒƒ“ƒg‚Í -idn-cmt@nic.ad.jp -‚ÉA‚Ü‚½ƒoƒOƒŒƒ|[ƒg‚Í -mdnkit-bugs@nic.ad.jp -‚É‚»‚ꂼ‚ꂨ‘—‚è‚­‚¾‚³‚¢B - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/bind9.html b/contrib/idn/mdnkit/doc/ja/spec/bind9.html deleted file mode 100644 index 8c7908b9a4..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/bind9.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - -bind-9 patch - - - - -

      BIND-9 ƒpƒbƒ`

      - - - -
      -

      ŠT—v

      - -

      -mDNkit ‚Ɋ܂܂ê‚é BIND-9 —p‚̃pƒbƒ`ƒtƒ@ƒCƒ‹‚ð“K—p‚·‚邱‚Ƃɂæ‚èA -BIND-9 ‚É‚¨‚¢‚Ä]—ˆ‚Ì ASCII •¶Žš‚É‚æ‚éƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII •¶Žš‚É‚æ‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‰Â”\‚ɂȂè‚Ü‚·B - -

      -‹ï‘Ì“I‚É‚ÍA‚±‚̃pƒbƒ`‚Í BIND-9 ‚ÉŽŸ‚̂悤‚È‹@”\‚ð’ljÁ‚µ‚Ü‚·B -

        -
      • lightweight resolver API (lwres_gethostbyname ‚È‚Ç) ‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒzƒXƒg–¼‚𖼑O‰ðŒˆ‚·‚é -
      • “¯‚¶‚­–¼‘O‰ðŒˆŒ‹‰Ê‚Æ‚µ‚ă[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽ -ƒzƒXƒg–¼‚ð•Ô‚· -
      • digAhostAnslookup ƒRƒ}ƒ“ƒh‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð -Žó‚¯•t‚¯A‚Ü‚½–â‚¢‡‚킹Œ‹‰Ê‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\ަ‚·‚é -
      - -

      -BIND-9 ‚ւ̃pƒbƒ`‚Ì“K—p•û–@‚ÍAƒpƒbƒ`ƒtƒ@ƒCƒ‹‚Ìæ“ª‚É‹LÚ‚µ‚Ä‚ ‚è‚Ü‚·B -‚È‚¨ƒpƒbƒ`ƒtƒ@ƒCƒ‹‚ɂ‚¢‚Ä‚ÍA -‘Ήž‚·‚é BIND ‚̃o[ƒWƒ‡ƒ“‚ð‚æ‚­Šm”F‚µ‚Ä‚©‚çAŽg—p‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -


      -

      ƒA[ƒLƒeƒNƒ`ƒƒ

      - -

      BIND-9 ‚Í‚»‚ê‚Ü‚Å‚Ì BIND-8 ‚Æ‚ÍƒŠƒ]ƒ‹ƒo‚Ì\¬‚ª‘S‚­ˆÙ‚È‚Á‚Ä‚¢‚Ü‚·B -BIND-8 ‚Ü‚Å‚ÍƒŠƒ]ƒ‹ƒo‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚郉ƒCƒuƒ‰ƒŠ‚Æ‚µ‚Ä -ŽÀ‘•‚³‚ê‚Ä‚¢‚Ü‚µ‚½‚ªA -BIND-9 ‚Å‚ÍƒŠƒ]ƒ‹ƒo‚Ì‹@”\‚̑啔•ª‚ª -lwresd (lightweight resolver daemon) ‚Æ‚¢‚¤ƒT[ƒo‚Ɉڂ³‚êA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚é‚Ì‚Ílightweight resolver ‚ƌĂ΂ê‚é -lwresd ‚Ƃ̒ÊM‚ðs‚¤‚½‚߂̃‰ƒCƒuƒ‰ƒŠ‚ƂȂÁ‚Ä‚¢‚Ü‚·B - -

      –{ƒpƒbƒ`‚Í‚±‚̃A[ƒLƒeƒNƒ`ƒƒ‚ɇ‚킹A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŠeˆ—‚ð -‚»‚ꂼ‚ê‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚É•ªŽU‚³‚¹‚Ü‚µ‚½BˆÈ‰º‚ÉŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚Å -ŽÀ‘•‚³‚ê‚é‹@”\‚ƃRƒ“ƒ|[ƒlƒ“ƒgŠÔ‚̃Cƒ“ƒ^ƒtƒF[ƒX‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð -•\‚µ‚½}‚ðŽ¦‚µ‚Ü‚·B - -

      -bind9 resolver architecture -
      - -
      -

      named C³

      - -

      named ‚É‚¨‚¯‚éC³‚ÍŽŸ‚̈ê“_‚݂̂ł·B - -

      UTF-8 •¶Žš‚Ì“§‰ß

      - -

      BIND-9 ‚Ì named ‚ł̓hƒƒCƒ“–¼‚̈—‚͂قƂñ‚Ç8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚èA -UTF-8 “™‚Ì MSB ‚̃Zƒbƒg‚³‚ꂽƒoƒCƒg‚à‚»‚̂܂ܓ§‰ß‚µ‚Ü‚·B -‚µ‚©‚µ named “à‚ň—‚ÉŽg—p‚³‚ê‚Ä‚¢‚éƒhƒƒCƒ“–¼‚Ì“à•”•\Œ» (dns_name_t) -‚©‚çƒeƒLƒXƒg•\Œ»‚ւ̕ϊ·•”•ª‚Í8ƒrƒbƒgƒXƒ‹[‚ɂȂÁ‚Ä‚¨‚炸AASCII •¶ŽšˆÈŠO -‚̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚ŃNƒH[ƒg‚³‚êA\DDD ‚Æ‚¢‚¤Œ`Ž®‚Ì•\Œ»‚É -•ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¢‚Ü‚·B -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª RACE ‚È‚Ç‚Ì ASCII ŒÝŠ· -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚Î ASCII ˆÈŠO‚Ì•¶Žš‚ªƒhƒƒCƒ“–¼‚ÉŒ»‚ê‚邱‚Ƃ͂Ȃ¢‚̂Š-–â‘è‚È‚¢‚̂ł·‚ªAUTF-8 ‚ðŽg—p‚·‚éꇂɂ͖â‘è‚Æ‚È‚è‚Ü‚·B - -

      BIND-9 ƒpƒbƒ`‚ÍA‚±‚̈—‚ðC³‚µA•ÏŠ·‚µ‚悤‚Æ‚·‚é•¶Žš‚ªUTF-8 •¶Žš‚Ì -ꇂɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒg‚ð‚µ‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚Ì“®ì‚Í named ‚ÌÝ’èƒtƒ@ƒCƒ‹ (named.conf) ‚ÅØ‚è‘Ö‚¦‰Â”\‚Å‚ ‚èA -Ý’èƒtƒ@ƒCƒ‹‚Ì options ƒZƒNƒVƒ‡ƒ“‚Ì allow-utf8 ƒpƒ‰ƒ[ƒ^‚Å -Žw’肵‚Ü‚·BDNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä UTF-8 ‚ð -Žg—p‚·‚éۂɂ͎Ÿ‚̂悤‚É‹Lq‚µ‚Ä‚­‚¾‚³‚¢B -

      -
      -options {
      -    ...
      -    allow-utf8 yes;
      -    ...
      -};
      -
      -
      - -
      -

      lwresd C³

      - -

      lwresd ‚ɑ΂µ‚Ă͎Ÿ‚̂悤‚ÈC³‚ð‰Á‚¦‚Ä‚ ‚è‚Ü‚·B - -

      - -
      UTF-8 •¶Žš‚Ì“§‰ß
      - -

      ‚±‚ê‚Í named ‚ɑ΂·‚éC³‚Æ“¯‚¶‚ÅAƒhƒƒCƒ“–¼‚ð“à•”•\Œ»‚©‚ç -ƒeƒLƒXƒg•\Œ»‚ɕϊ·‚·‚éۂ̃oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚éƒNƒH[ƒeƒBƒ“ƒO‚ð -s‚í‚È‚¢‚悤‚É‚·‚é‚à‚̂ł·B - -

      named ‚Ìê‡A‚±‚ê‚ÍÝ’èƒtƒ@ƒCƒ‹ named.conf ‚̃IƒvƒVƒ‡ƒ“‚Å -Ø‚è‘Ö‚¦‚ç‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·‚ªAlwresd ‚Ìꇂɂ͎©“®Ø‚è‘Ö‚¦‚É -‚È‚Á‚Ä‚¢‚Ü‚·Blwresd ‚ª“ǂݞ‚Þ -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì -ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ‚Éݒ肳‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg–¼‚ðŽQÆ‚µA -‚»‚ꂪ ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¢ê‡‚ɂ̓oƒbƒNƒXƒ‰ƒbƒVƒ…‚É‚æ‚é -ƒNƒH[ƒg‚ð‚µ‚È‚¢‚悤‚É‚µ‚Ü‚·B - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·
      - -

      lwresd ‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄAƒNƒ‰ƒCƒAƒ“ƒg -‚‚܂è lightweight resolver ƒ‰ƒCƒuƒ‰ƒŠ‚Ƃ̊Ԃ̒ÊM‚É‚Í UTF-8 ‚ðA -‚Ü‚½ named ‚Ƃ̒ÊM‚É‚Í DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð‚»‚ê‚¼‚ê -Žg—p‚µ‚Ü‚·B‚µ‚½‚ª‚Á‚Ä—¼ŽÒ‚̊Ԃ̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚¢‚Ü‚·B - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’è‚Í -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B - -

      -

      - -


      -

      ƒNƒ‰ƒCƒAƒ“ƒg‘¤ƒ‰ƒCƒuƒ‰ƒŠC³

      - -

      ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃‰ƒCƒuƒ‰ƒŠ‚ÍA -

        -
      • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ· -
      • ³‹K‰» -
      -‚ðs‚¤‚悤‚ÉC³‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚ç‚̈—‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -Ý’è‚̓Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B - -

      –¼‘O‰ðŒˆ—p‚Ì API ŠÖ”‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽ -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ÉC³‚³‚ê‚Ä‚¢‚Ü‚·B -‚Ü‚½“à•”ŽÀ‘•‚ÍA«—ˆ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ðˆµ‚¦‚é -API ‚̒ljÁ‚ª—eˆÕ‚ɂł«‚邿‚¤‚ÉÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚ê‚ç‚ɂ‚¢‚Ä -‚±‚ÌŒãà–¾‚µ‚Ü‚·B - -

      - -

      - -

      ‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”

      - -

      -ƒpƒbƒ`‚É‚æ‚Á‚Ä‘½Œ¾Œê‰»‚³‚ê‚é API ŠÖ”‚̈ꗗ‚Å‚·B - -

        -
      • lwres_getaddrinfo() -
      • lwres_getnameinfo() -
      • lwres_gethostbyname() -
      • lwres_gethostbyname2() -
      • lwres_gethostbyname_r() -
      • lwres_gethostbyaddr() -
      • lwres_gethostbyaddr_r() -
      • lwres_getipnodebyname() -
      • lwres_getipnodebyaddr() -
      - -

      -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÍA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ɉÁ‚¦A -”ñ ASCII ƒhƒƒCƒ“–¼‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B”ñ ASCII ƒhƒƒCƒ“–¼‚Æ‚µ‚ÄA -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ɉž‚¶‚ÄA -V‚½‚Ɉȉº‚̂悤‚ȃhƒƒCƒ“–¼‚ðŽæ‚èˆµ‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B - -

        -
      • ƒzƒXƒg.‰ïŽÐ.jp -
      • www.•ʂ̉ïŽÐ.com -
      - -

      -ˆø”‚ÌŒ^‚â•Ô‚è’l‚ÌŒ^‚É•ÏX‚Í‚ ‚è‚Ü‚¹‚ñB -ƒpƒbƒ`‚ð“–‚Ä‚é‘O‚Æ“¯—l‚̌ĂÑo‚µ•û–@‚ÅA]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚ÆA -”ñ ASCII ƒhƒƒCƒ“–¼‚Ì—¼•û‚ðˆµ‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B -”ñ ASCII ƒhƒƒCƒ“–¼‚ɂ‚¢‚Ä‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ðˆø”‚Æ‚µ‚Ď󂯎æ‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      -‚±‚ê‚Ü‚Åã‹L‚Ì API ŠÖ”‚Ås‚È‚í‚ê‚Ä‚¢‚½ˆ—‚ÍA -ˆÈ~‚Åà–¾‚·‚é‚»‚ꂼ‚ê‚Ì“à•”ŠÖ”‚ɈÚs‚µAAPI -ŠÖ”‚ÍAƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOî•ñ‚ð‚±‚Ì“à•”ŠÖ”‚É“n‚·–ðŠ„‚ð‚µ‚Ä‚¢‚Ü‚·B - -

      - -

      ’ljÁ‚³‚ꂽ“à•”ŠÖ”

      - -

      -‘½Œ¾Œê‰»‚³‚ꂽ API ŠÖ”‚ÉŠÖ˜A‚µ‚ÄAˆÈ‰º‚Ì“à•”ŠÖ”‚ª’ljÁ‚³‚ê‚Ü‚µ‚½B - -

      -
      lwres_getaddrinfo_enc() -
      lwres_getaddrinfo() ‚Ì“à•”ŠÖ” -
      lwres_getnameinfo_enc() -
      lwres_getnameinfo() ‚Ì“à•”ŠÖ” -
      lwres_gethostbyname_enc() -
      lwres_gethostbyname() ‚Ì“à•”ŠÖ” -
      lwres_gethostbyname2_enc() -
      lwres_gethostbyname2() ‚Ì“à•”ŠÖ” -
      lwres_gethostbyname_r_enc() -
      lwres_gethostbyname_r() ‚Ì“à•”ŠÖ” -
      lwres_gethostbyaddr_enc() -
      lwres_gethostbyaddr() ‚Ì“à•”ŠÖ” -
      lwres_gethostbyaddr_r_enc() -
      lwres_gethostbyaddr_r() ‚Ì“à•”ŠÖ” -
      lwres_getipnodebyname_enc() -
      lwres_getipnodebyname() ‚Ì“à•”ŠÖ” -
      lwres_getipnodebyaddr_enc() -
      lwres_getipnodebyaddr() ‚Ì“à•”ŠÖ” -
      - -

      -’ljÁ‚³‚ꂽ“à•”ŠÖ”‚ɂ‚¢‚Ă̎d—l‚ÍAˆÈ‰º‚Ì’Ê‚è‚Å‚·B - -

      - -
      lwres_getaddrinfo_enc -
      -
      -int
      -lwres_getaddrinfo_enc(const char *, const char *, const struct addrinfo *,
      -		      struct addrinfo **, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getaddrinfo() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getaddrinfo() ‚Ƃ̈Ⴂ‚ÍAstatic ŠÖ”‚Å‚ ‚é set_order() -ŠÖ”‚ɃGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ð“n‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getaddrinfo() ŠÖ”‚©‚ç lwres_getaddrinfo_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -•Ô‚³‚ê‚é’l‚Í -EAI_NONAMEAEAI_BADFLAGSAEAI_SYSTEMA -EAI_FAMILYAEAI_SOCKTYPEAEAI_SERVICEA -EAI_MEMORYA0 -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      lwres_getnameinfo_enc -
      -
      -int
      -lwres_getnameinfo_enc(const struct sockaddr *, size_t, char *, size_t, char *,
      -		      size_t, int, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getnameinfo() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getnameinfo() ‚Ƃ̈Ⴂ‚ÍAlwres_getnamebyaddr() ŠÖ”‚̌ĂÑo‚µ•”‚ð -lwres_getnamebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getnameinfo() ŠÖ”‚©‚ç lwres_getnameinfo_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -•Ô‚³‚ê‚é’l‚Í -ENI_NOSOCKETAENI_SALENAENI_FAMILYA -ENI_MEMORYAENI_SYSTEMAENI_NOHOSTNAMEA -SUCCESS -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      lwres_gethostbyname_enc -
      -
      -struct hostent *
      -lwres_gethostbyname_enc(const char *, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname() ŠÖ”‚©‚ç lwres_gethostbyname_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -lwres_getipnodebyname_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_gethostbyname2_enc -
      -
      -struct hostent *
      -lwres_gethostbyname2_enc(const char *, int, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname2() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname2() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname2() ŠÖ”‚©‚ç -lwres_gethostbyname2_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -lwres_getipnodebyname_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_gethostbyname_r_enc -
      -
      -struct hostent *
      -lwres_gethostbyname_r_enc(const char *, struct hostent *, char *,
      -			  int, int *, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyname_r() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyname_r() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyname_r() ŠÖ”‚©‚ç -lwres_gethostbyname_r_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_gethostbyaddr_enc -
      -
      -struct hostent *
      -lwres_gethostbyaddr_enc(const char *, int, int, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyaddr() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyaddr() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyaddr() ŠÖ”‚©‚ç lwres_gethostbyaddr_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -lwres_getipnodebyaddr_enc() ‚©‚ç•Ô‚Á‚Ä—ˆ‚½ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_gethostbyaddr_r_enc -
      -
      -struct hostent *
      -lwres_gethostbyaddr_r_enc(const char *, int, int, struct hostent *,
      -			  char *, int, int *, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_gethostbyaddr_r() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_gethostbyaddr_r() ‚Ƃ̈Ⴂ‚ÍAlwres_getipnodebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getipnodebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_gethostbyaddr_r() ŠÖ”‚©‚ç -lwres_gethostbyaddr_r_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_getipnodebyname_enc -
      -
      -struct hostent *
      -lwres_getipnodebyname_enc(const char *, int, int, int *, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getipnodebyname() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getipnodebyname() ‚Ƃ̈Ⴂ‚ÍAlwres_getaddrsbyname() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getaddrsbyname_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getipnodebyname() ŠÖ”‚©‚ç -lwres_getipnodebyname_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B -

      - -

      lwres_getipnodebyaddr_enc -
      -
      -struct hostent *
      -lwres_getipnodebyaddr_enc(const void *, size_t, int, int *, int)
      -
      -

      -lwres ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠÖ” lwres_getipnodebyaddr() ‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©”Û‚©‚Ì”»’èƒtƒ‰ƒO‚̃Gƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½‚à‚̂ł·B -lwres_getipnodebyaddr() ‚Ƃ̈Ⴂ‚ÍAlwres_getnamebyaddr() -ŠÖ”‚̌ĂÑo‚µ•”‚ð lwres_getnamebyaddr_enc() ŠÖ”‚É•ÏX‚µ‚Ä‚¢‚é“_‚݂̂ł·B -

      -ŠÖ”‚ÌÅŒã‚̈ø”‚ªƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÅA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_LOCALA -UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂Ƃ«‚É‚ÍLWRES_ENCODING_UCS‚ªŽw’è‰Â”\‚Å‚·B -lwres_getipnodebyaddr() ŠÖ”‚©‚ç -lwres_getipnodebyaddr_enc() ŠÖ”‚ðŒÄ‚Ño‚·‚Æ‚«‚ÍA -ƒGƒ“ƒR[ƒhƒ^ƒCƒv‚Ì”»’èƒtƒ‰ƒO‚ÉLWRES_ENCODING_LOCAL‚ðŽw’肵‚Ä‚¢‚Ü‚·B -

      -ƒGƒ‰[‚̂Ƃ«‚Í NULLA³í‚̂Ƃ«‚Í’l‚ªŠi”[‚³‚ꂽ hostent -\‘¢‘̂ւ̃|ƒCƒ“ƒ^‚ð•Ô‚µ‚Ü‚·B - -

      - -
      -

      dig/host/nslookup C³

      - -

      BIND-9 ‚É‚Í DNS ‚Ì–â‚¢‡‚킹ƒc[ƒ‹‚Æ‚µ‚Ä digAhostAnslookup ‚Æ‚¢‚¤ -ƒRƒ}ƒ“ƒh‚ª•t‘®‚µ‚Ü‚·BmDNkit ‚Ì BIND-9 ƒpƒbƒ`‚É‚æ‚èA‚±‚ê‚ç‚Í‚¢‚¸‚ê‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B‹ï‘Ì“I‚ɂ͈ȉº‚Ì‹@”\‚ª -•t‰Á‚³‚ê‚Ü‚·B -

        -
      • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·
        -ƒRƒ}ƒ“ƒhˆø”A‚ ‚é‚¢‚Í•W€“ü—Í‚©‚ç“ü—Í‚³‚ꂽAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -•\Œ»‚³‚ꂽƒhƒƒCƒ“–¼‚ðADNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -DNS ‚Ì–â‚¢‡‚킹‚ð”­s‚µ‚Ü‚·B -

        ‚Ü‚½ DNS ‚̕ԓš‚Ɋ܂܂ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚µA•\ަ‚µ‚Ü‚·B -

        -

      • ³‹K‰»
        -DNS ‚Ì–â‚¢‡‚킹‚ÅAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\Œ»‚³‚ꂽƒhƒƒCƒ“–¼‚ð -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚éÛAƒhƒƒCƒ“–¼‚Ì -³‹K‰»‚ðs‚¢‚Ü‚·B -
      - -‚±‚ê‚ç‚̈—‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -res ƒ‚ƒWƒ…[ƒ‹ ‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -Ý’è‚̓Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ås‚¢‚Ü‚·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/clientconfig.html b/contrib/idn/mdnkit/doc/ja/spec/clientconfig.html deleted file mode 100644 index af336a74a5..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/clientconfig.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - -client configuration specification - - - - -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹

      - - - -
      - -

      ŠT—v

      - -

      -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì‚½‚߂̊eŽí‚Ìݒ肪 -‹Lq‚³‚ê‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚ÅAmDNkit ‚ðŽg—p‚µ‚Ä‘½Œ¾Œê‰» (‘Û‰») -‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌƒŠƒ]ƒ‹ƒo‚ª“ǂݞ‚Þƒtƒ@ƒCƒ‹‚Å‚·B -‚±‚̃tƒ@ƒCƒ‹‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì -resconf ƒ‚ƒWƒ…[ƒ‹ ‚É‚æ‚Á‚ēǂݞ‚Ü‚êA -‘½Œ¾ŒêƒhƒƒCƒ“‚ÉŠÖ‚·‚éˆÈ‰º‚̂悤‚Èݒ肪‚Å‚«‚Ü‚·B - -

        -
      • DNS ƒvƒƒgƒRƒ‹ã‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -
      • ³‹K‰»Œ`Ž® -
      • DNS ‚̕ԓšƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ªƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚Å‚«‚È‚©‚Á‚½Žž‚ÉŽg—p‚³‚ê‚éA‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO -
      • ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚̃GƒCƒŠƒAƒX -
      - -

      -‚±‚̃tƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅAƒtƒ@ƒCƒ‹‚ÌŠes (# -‚ÅŽn‚Ü‚éƒRƒƒ“ƒgs‚ÆA‹ós‚𜂢‚Ä) ‚ÍA -ŽŸ‚̂悤‚È’Pƒ‚ȃtƒH[ƒ}ƒbƒg‚Å\¬‚³‚ê‚Ü‚·B - -

      -
      -ƒL[ƒ[ƒh ’l...
      -
      -
      - -

      -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÍAmDNkit ‚ðƒfƒtƒHƒ‹ƒg‚ÌÝ’è‚ŃRƒ“ƒpƒCƒ‹‚µ‚½ -ꇂɂ͈ȉº‚É”z’u‚³‚ê‚Ü‚·B - -

      -
      -/usr/local/etc/mdnres.conf
      -
      -
      - -

      ˆÈ~AŠeƒL[ƒ[ƒh‚²‚Æ‚ÉÝ’è“à—e‚ð‹Lq‚µ‚Ü‚·B -

      - -

      ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ

      - -

      -DNS ƒvƒƒgƒRƒ‹ã‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄŽg—p‚·‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg–¼) ‚ðŽw’肵‚Ü‚·B - -

      -
      [\•¶] -
      server-encoding encoding -
      - -

      encoding ‚É‚ÍAŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ð‹Lq‚µA -ŽŸ‚Ì‚à‚Ì‚ªŽw’è‚Å‚«‚Ü‚·B - -

        -
      • UTF-8 -
      • RACE -
      • BRACE -
      • LACE -
      • UTF-5 -
      • iconv_open() ƒ‰ƒCƒuƒ‰ƒŠŠÖ”‚Å‹–‰Â‚³‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg–¼ - (Žg—p‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚ɂ‚¢‚Ä‚ÍAiconv() ‚̃hƒLƒ…ƒƒ“ƒg‚ð - Œä——‚­‚¾‚³‚¢) -
      • Œãq‚̃GƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚Å’è‹`‚³‚ꂽƒGƒCƒŠƒAƒX–¼ - (uƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXv - ‚Ì€‚ðŒä——‚­‚¾‚³‚¢) -
      -

      -‚±‚̃Gƒ“ƒgƒŠ‚Í•K{ƒGƒ“ƒgƒŠ‚Å‚ ‚èA•K‚¸‹Lq‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB - -

      ƒT[ƒo ZLD ƒGƒ“ƒgƒŠ

      - -

      -DNS ƒvƒƒgƒRƒ‹ã‚ÅŽg—p‚³‚ê‚鑽Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -(server-encoding ƒGƒ“ƒgƒŠ‚ÅŽw’肳‚ꂽ‚à‚Ì) -‚Ì’†‚É‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚ß‚É -ZLD (zero-level domain) ‚Æ‚¢‚¤ƒhƒƒCƒ“‚ð•K—v‚Æ‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -ZLD ‚Í’Êí‚̃gƒbƒvƒŒƒxƒ‹ƒhƒƒCƒ“‚Ì‚³‚ç‚ÉãˆÊƒhƒƒCƒ“‚ɑГ–‚µ‚Ü‚·B -‚½‚¾‚µ‚±‚ê‚Í DNS ‚̃VƒXƒeƒ€“à•”‚ł̂ݎg‚í‚ê‚éƒhƒƒCƒ“‚Å‚ ‚èA -ˆê”ʃ†[ƒU‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÍŒ©‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B - -

      -
      [\•¶] -
      server-zld ZLD -
      - -

      mDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚ÍAZLD ‚ÍŽg—p‚Å‚«‚È‚¢‚悤‚ɂȂÁ‚Ä‚¨‚èA -Ý’èƒtƒ@ƒCƒ‹’†‚É‚±‚̃Gƒ“ƒgƒŠ‚ª‚ ‚邯ŒxƒƒbƒZ[ƒW‚ª•\ަ‚³‚ê‚Ü‚·B -‚±‚̃Gƒ“ƒgƒŠ‚ÌŽw’è‚ð—LŒø‚É‚·‚é‚É‚ÍAmDNkit ‚Ì configure ŽÀsŽž‚É ---enable-zld ƒIƒvƒVƒ‡ƒ“‚É‚æ‚Á‚Ä ZLD ƒTƒ|[ƒg‚ð—LŒø‚É‚µ‚Ä‚¨‚­ -•K—v‚ª‚ ‚è‚Ü‚·B -

      - -

      ³‹K‰»ƒGƒ“ƒgƒŠ

      - -

      -³‹K‰»ƒGƒ“ƒgƒŠ‚Å‚ÍADNS ƒT[ƒo‚É‘—‚é‘O‚ɃhƒƒCƒ“–¼‚É“K—p‚·‚ׂ« -³‹K‰»‚Ì•ûŽ®‚ðŽw’肵‚Ü‚·B - -

      -
      [\•¶] -
      normalize scheme [scheme..] -
      - -

      -scheme ‚É‚ÍA³‹K‰»Œ`Ž®‚ð‹Lq‚µ‚Ü‚·B -ˆÈ‰º‚Ì‚à‚Ì‚ª‹Lq‚Å‚«‚Ü‚·B - -

      -
      ascii-lowercase -
      ASCII ‘å•¶Žš‚ð¬•¶Žš‚ɕϊ· -
      ascii-uppercase -
      ASCII ¬•¶Žš‚ð‘å•¶Žš‚ɕϊ· -
      unicode-lowercase -
      - Unicode Technical Report #21: Case Mappings - ‚ÉŠî‚¢‚ÄAUnicode ‘å•¶Žš‚ð¬•¶Žš‚ɕϊ· -
      unicode-uppercase -
      - Unicode Technical Report #21: Case Mappings - ‚ÉŠî‚¢‚ÄAUnicode ¬•¶Žš‚ð‘å•¶Žš‚ɕϊ· -
      unicode-form-c -
      - Unicode Technical Report #15: Unicode Normalization Forms - ‚ÌuForm Cv‚É‚æ‚鳋K‰» -
      unicode-form-kc -
      - Unicode Technical Report #15: Unicode Normalization Forms - ‚ÌuForm KCv‚É‚æ‚鳋K‰» -
      ja-kana-fullwidth -
      “ú–{Œê”¼ŠpƒJƒi‚ð‘SŠpƒJƒi‚ɕϊ· -
      ja-alnum-halfwidth -
      “ú–{Œê‚Ì‘SŠp‰p”Žš‚¨‚æ‚Ñ‘SŠpƒ}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɕϊ· -
      ja-compose-voiced-sound -
      “ú–{Œê‚Ì‘SŠp‚©‚ȂƂ»‚ê‚É‘±‚­‘÷“_(J)”¼‘÷“_(K)‚ð - ‘÷“_E”¼‘÷“_‚‚«‚Ì‚©‚È1•¶Žš‚ɕϊ· -
      ja-minus-hack -
      “ú–{Œê‚Ì‘SŠpƒ}ƒCƒiƒX‹L†(|)‚ðƒnƒCƒtƒ“(-)‚ɕϊ· -
      ja-delimiter-hack -
      “ú–{Œê‚Ì‹å“_(B)‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh(D)‚ðƒsƒŠƒIƒh(.)‚ɕϊ· -
      - -

      -³‹K‰»Œ`Ž®‚ɂ͕¡”‚ÌŒ`Ž®‚ªŽw’è‰Â”\‚Å‚·B•¡”‚ÌŒ`Ž®‚ªŽw’肳‚ꂽê‡A -‡˜’Ê‚è‚É (¶‚©‚ç‰E‚É) “K—p‚³‚ê‚Ü‚·B -

      - -

      ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ

      - -

      -mDNkit ‚Å‘½Œ¾Œê‰»‚³‚ꂽƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ÍA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ðŽ©“®“I‚ÉŒˆ’肵A -DNS ‚̉ž“šƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðA‚»‚̃R[ƒhƒZƒbƒg‚ɕϊ·‚µ‚悤‚Æ‚µ‚Ü‚·B -‚µ‚©‚µAƒhƒƒCƒ“–¼‚ÉŽg—p‚³‚ê‚Ä‚¢‚é‚ ‚é•¶Žš‚ªƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚É -ƒ}ƒbƒv‚³‚ê‚Ä‚¢‚È‚¢‚½‚ß‚ÉA•ÏŠ·‚ÉŽ¸”s‚·‚邱‚Æ‚à‚ ‚蓾‚Ü‚·B -—Ⴆ‚Γú–{ŒêƒR[ƒhƒZƒbƒg‚ðŽg—p‚µ‚Ä‚¢‚é“ú–{Œê‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA -“ú–{Œê‚Ì•¶ŽšƒZƒbƒg‚Ɋ܂܂ê‚Ä‚¢‚È‚¢’†‘Œê‚Ì•¶Žš‚ðŠÜ‚ñ‚¾ DNS -‰ž“š‚ðŽóM‚µ‚½‚悤‚ÈŽž‚É‚±‚̂悤‚È‚±‚Æ‚ª‹N‚±‚è‚Ü‚·B - -

      -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ‚ÍAã‹L‚̂悤‚È–â‘肪¶‚¶‚½Žž‚É -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚éƒR[ƒhƒZƒbƒg‚ðŽw’肵‚Ü‚·B - -

      -
      [\•¶] -
      alternate-encoding encoding -
      - -

      -encoding ‚̓R[ƒhƒZƒbƒg–¼‚ÅARACE ‚̂悤‚È -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ðŽg—p‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXƒGƒ“ƒgƒŠ

      - -

      -ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒCƒŠƒAƒXƒGƒ“ƒgƒŠ‚Å‚ÍAƒR[ƒhƒZƒbƒg–¼‚̃GƒCƒŠƒAƒX‚ð -‹Lq‚µ‚½ƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ð‹Lq‚µ‚Ü‚·B - -

      -
      [\•¶] -
      alias-file pathname -
      - -

      -pathname ‚É‚ÍAƒGƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚ւ̃pƒX–¼‚ðŽw’肵‚Ü‚·B -‚±‚̃GƒCƒŠƒAƒXƒtƒ@ƒCƒ‹‚Í’Êí‚̃eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̂悤‚ÈŒ`Ž®‚Ìs‚©‚ç\¬‚³‚ê‚Ü‚·B - -

      -
      -alias-name name
      -
      -
      - -

      -alias-name ‚Í’è‹`‚³‚ê‚éƒGƒCƒŠƒAƒX–¼‚ÅAname ‚Í -ŽÀۂ̃R[ƒhƒZƒbƒg–¼‚©A’è‹`ς̃GƒCƒŠƒAƒX–¼‚Å‚·B -

      - -

      ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg

      - -

      -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ɂ̓[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ðŽw’è‚·‚éƒGƒ“ƒgƒŠ‚Í -‘¶Ý‚µ‚Ü‚¹‚ñB -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚»‚̂Ƃ«‚ÉŽg—p‚µ‚Ä‚¢‚é -ƒƒP[ƒ‹‚Ìî•ñ‚©‚猈’肳‚ê‚é‚©‚ç‚Å‚·B -‚Å‚·‚©‚çA‚»‚ꂼ‚ê‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚»‚ꂼ‚êˆÙ‚È‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·‚µA“¯ˆêƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª•¡”‚̃[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -Ø‚è‘Ö‚¦‚È‚ª‚çŽg—p‚·‚邱‚Æ‚à‰Â”\‚Å‚·B - -

      -mDNkit ‚̓ƒP[ƒ‹î•ñ‚©‚çƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð -„‘ª‚µ‚悤‚Æ‚µ‚Ü‚·‚ªAŽž‚ɂ͎¸”s‚·‚邱‚Æ‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAC ƒƒP[ƒ‹‚Å“®ì‚µ‚Ä‚¢‚é‚É‚àŠÖ‚í‚炸 -”ñ ASCII ƒR[ƒhƒZƒbƒg‚ðŽg—p‚µ‚Ä‚¢‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ł̓ƒP[ƒ‹î•ñ‚©‚ç -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð”»’è‚·‚邱‚Ƃ͕s‰Â”\‚Å‚·‚µAmDNkit ‚ª’m‚ç‚È‚¢ -ƒƒP[ƒ‹‚Å“®ì‚·‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ìê‡‚É‚à„‘ª‚ÉŽ¸”s‚·‚é‚Å‚µ‚傤B - -

      -‚±‚̂悤‚Èꇂ̂½‚ß‚ÉAŠÂ‹«•Ï” MDN_LOCAL_CODESET ‚É‚æ‚Á‚Ä -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ð‹­§Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É -‚È‚Á‚Ä‚¢‚Ü‚·B -‚±‚̕ϔ‚ɃR[ƒhƒZƒbƒg–¼ (‚à‚µ‚­‚Í‚»‚̃GƒCƒŠƒAƒX–¼) -‚ðŽw’è‚·‚邯AmDNkit ‚̓ƒP[ƒ‹‚ÌÝ’è‚ÉŠÖ‚í‚炸AŽw’肵‚½ƒR[ƒhƒZƒbƒg‚ð -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚Æ‚µ‚Ä“®ì‚µ‚Ü‚·B - -

      - -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‹Lq—á

      - -

      -ˆÈ‰º‚ÉAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Ì‹Lq—á‚ðŽ¦‚µ‚Ü‚·B - -

      -
      -#
      -# a sample configuration.
      -#
      -
      -# DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE ‚ðŽg—p‚·‚é
      -server-encoding RACE
      -
      -# ³‹K‰»‚̎臂Ƃµ‚ÄA¬•¶Žš‚ɕϊ·‚µ‚½ŒãAKC ³‹K‰»–@‚ðŽg—p‚·‚é
      -normalize unicode-lowercase unicode-form-kc
      -
      -# ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä RACE ‚ðŽg—p‚·‚é
      -alternate-encoding RACE
      -
      -
      - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/dnsproxy.html b/contrib/idn/mdnkit/doc/ja/spec/dnsproxy.html deleted file mode 100644 index a56a7ecbf5..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/dnsproxy.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - -dnsproxy specification - - - - -

      dnsproxy

      -

      - -

      ŠT—v

      -

      -dnsproxy‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚̃[ƒJƒ‹ƒR[ƒhƒx[ƒX‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð -ŠÜ‚ÞDNS—v‹‚ðŽó‚¯Žæ‚èA‘½Œ¾Œê‰»‘Ήž‚µ‚½DNS‚ªŽó•t‚¯‚ç‚ê‚éƒhƒƒCƒ“–¼‚É -•ÏŠ·‚µA‚Ü‚½‹t‚ÉADNS‚©‚ç‚̉ž“š‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å”Fޝ‚Å‚«‚éŒ`Ž®‚É–ß‚µ‚Ü‚·B -

      -‚±‚ê‚É‚æ‚Á‚ÄAƒNƒ‰ƒCƒAƒ“ƒg‚͉½‚à‰ü‘¢‚·‚邱‚ƂȂ­ -ŠeŽí‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -‚Ü‚½ADNSƒT[ƒo‚©‚猩‚½ê‡‚É‚ÍAƒNƒ‰ƒCƒAƒ“ƒg+dnsproxy‚É‚æ‚Á‚Ä -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚½ƒNƒ‰ƒCƒAƒ“ƒg‚Æ‚µ‚Ä“®ì‚µ‚Ä‚¢‚邿‚¤‚É -Œ©‚¦‚邱‚ƂɂȂè‚Ü‚·B -

      -‚½‚¾‚µAdnsproxy ‚ª³‚µ‚­“®ì‚·‚é‚É‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ª -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ð‚»‚Ì‚Ü‚Ü“§‰ß‚³‚¹AƒGƒ‰[‚ɂȂç‚È‚¢ -‚悤‚ɂȂÁ‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·BŽc”O‚È‚ª‚çŒ»Ý UNIX ‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ì -‘½‚­‚Í 8ƒrƒbƒgƒXƒ‹[‚ł͂Ȃ¢‚Ì‚ÅA‚»‚Ì‚Ü‚Ü‚Å‚Í dnsproxy ‚ð—p‚¢‚Ä‚à -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂ͂Ȃè‚Ü‚¹‚ñB‚±‚Ìê‡‚É‚Í -

      -‚Æ‚¢‚¤‚悤‚È•û–@‚ð‚Æ‚é•K—v‚ª‚ ‚è‚Ü‚·B - -

      ‹N“®

      -
      -
      -$ dnsproxy [ƒIƒvƒVƒ‡ƒ“...]
      -
      -
      -

      - -

      ƒIƒvƒVƒ‡ƒ“

      -
      - -
      -daemon -
      -

      -dnsproxy‚ðƒf[ƒ‚ƒ“‚Æ‚µ‚Ä‹N“®‚µ‚Ü‚·B -

      - -

      -config config-file -
      -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ðŽwަ‚µ‚Ü‚·B -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚É‚Í -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -Ú‚µ‚­‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚Ì -€‚Åà–¾‚µ‚Ü‚·B -

      - -

      -logfile log-file -
      -

      -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -“Á‚ÉŽw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚Å -Žwަ‚³‚ꂽƒƒOƒtƒ@ƒCƒ‹A‚ ‚é‚¢‚̓fƒtƒHƒ‹ƒg‚̃ƒOƒtƒ@ƒCƒ‹‚É -o—Í‚³‚ê‚Ü‚·B - -

      -

      - -

      ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“

      -

      -Ý’èî•ñ‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚É‹LÚ‚³‚ê‚Ü‚·B -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍA -dnsproxy‚Ì‹N“®Žž‚ɃRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -
      -% dnsproxy -config <config-file>
      -
      -
      -ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“‚ÅŽwަ‚µ‚È‚©‚Á‚½ê‡‚É‚Í -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ªŽg—p‚³‚ê‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ÍAƒfƒBƒŒƒNƒgƒŠ -
      -    /usr/local/etc
      -
      -‚̉º‚Ì -
      -    dnsproxy.conf
      -
      -‚Å‚·BƒfƒBƒŒƒNƒgƒŠ‚ÍAmDNkit쬎ž‚É -
      -    configure --sysconfdir=DIR
      -
      -‚ÅŽwަ‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

      -ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹‚ÅA -ˆÈ‰º‚̃Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒf[ƒ^‚ðŽw’肵‚Ü‚·B - -

      - -
      listen
      -

      -dnsproxy‚ªƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì—v‹‚ðŽó•t‚¯‚é -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

      -    listen <address>
      -
      -<address>‚͈ȉº‚Ì‚¢‚¸‚ê‚©‚ÌŒ`Ž®‚ÅŽwަ‚µ‚Ü‚·B -
      - - - - -
      <IP address>:<port number>
      :<port number>
      <IP address>
      -
      -È—ª‚³‚ê‚½ê‡‚É‚Í -
      - - - -
      IP address0.0.0.0 # INADDR_ANY
      port number53
      -
      -‚ªŽg—p‚³‚ê‚Ü‚·B -

      - -

      forward
      -

      -dnsproxy‚ªADNS—v‹‚ð“]‘—‚µA‰ž“š‚ðŽó‚¯Žæ‚é–{—ˆ‚ÌDNSƒT[ƒo‚Ì -ƒlƒbƒgƒ[ƒNƒAƒhƒŒƒXAƒ|[ƒg”Ô†‚ðŽw’肵‚Ü‚·B -

      -    forward <address> [ bind4compat ]
      -
      -<address>‚ÌŒ`Ž®‚Íã‚Ìlisten‚Ì‚à‚̂Ɠ¯‚¶‚Å‚·B -

      -ƒIƒvƒVƒ‡ƒ“‚Ì bind4compat‚ªŽwަ‚³‚ꂽꇂɂÍA -UDP‚ÅƒŠƒNƒGƒXƒg‚ð“]‘—‚·‚鎞‚ÉAƒ\[ƒXƒAƒhƒŒƒX‚Æ‚µ‚ÄA -listen‚ÅŽwަ‚³‚ꂽƒAƒhƒŒƒX/ƒ|[ƒg‚ðŽg—p‚µ‚Ü‚·B -

      - -

      log-file
      -

      -dnsproxy‚ªŽÀsƒƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B -

      -    log-file <path>
      -
      -ƒƒOƒtƒ@ƒCƒ‹–¼‚ÍA -ˆÈ‰º‚̃Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÅŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -—¼•ûŽw’肵‚½ê‡‚ɂ̓Rƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ÌŽw’è‚̂ق¤‚ª—D悳‚ê‚Ü‚·B -
      -    dnsproxy -logfile <address>
      -
      -Žw’肳‚ê‚È‚©‚Á‚½ê‡‚É‚ÍA -
      -    /tmp/dnsproxy.log
      -
      -‚É‘‚«ž‚Ü‚ê‚Ü‚·B -

      - -

      log-level
      -

      -ƒƒO‚̃Œƒxƒ‹‚ðݒ肵‚Ü‚·B -

      -    log-level <level>
      -
      -ƒŒƒxƒ‹‚Æ‚µ‚ÄŽw’è‚Å‚«‚é’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -
      -
      -
      none
      ˆê؃ƒO‚ð‹L˜^‚µ‚Ü‚¹‚ñB -
      fatal
      ’v–½“I‚ȃGƒ‰[‚̂݋L˜^‚µ‚Ü‚·B -
      warn
      ŒxƒƒbƒZ[ƒW‚à‹L˜^‚µ‚Ü‚· -
      trace
      ŽÀsƒgƒŒ[ƒXƒƒbƒZ[ƒW‚à‹L˜^‚µ‚Ü‚·B -
      -
      -

      Žw’肵‚È‚©‚Á‚½ê‡‚̃fƒtƒHƒ‹ƒg‚Í warn ‚Å‚·B -

      none ‚ðŽw’肵‚½ê‡AƒƒOƒtƒ@ƒCƒ‹‚Í쬂³‚ê‚Ü‚¹‚ñB -

      trace ƒŒƒxƒ‹‚ðŽw’è‚·‚邯‘å—ʂ̃ƒO‚ªo—Í‚³‚ê‚é‚Ì‚ÅA’ZŽžŠÔ‚Å -ƒƒOƒtƒ@ƒCƒ‹‚ª‹‘å‚ɂȂé‰Â”\«‚ª‚ ‚è‚Ü‚·B’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -

      - -

      client-translation
      -

      -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽwަ‚µ‚Ü‚·B -

      -    client-translation <ZLD> <Encoding>
      -
      -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ɑΉž‚µ‚Ä‚¢‚È‚¢ƒNƒ‰ƒCƒAƒ“ƒg‚ÌꇂɂÍA -’ÊíAƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂȂÁ‚Ä‚¢‚Ü‚·B -‚»‚̂悤‚Èê‡‚É‚Í -
      -    client-translation . Shift_JIS
      -
      -‚Æ‚¢‚¤Œ`‚ÅA<ZLD>–³‚µ‚ÅŽwަ‚µ‚Ü‚·B -

      -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚É‚æ‚Á‚Ä‚ÍA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ð’Êí‚ÌDNS‚Å‚à -Žó•t‚¯‚ç‚ê‚éŒ`Ž®‚ɃGƒ“ƒR[ƒh‚µ‚ÄA‚»‚ê‚ð’Êí‚̃hƒƒCƒ“–¼‚Æ -‹æ•Ê‚·‚邽‚ß‚É ZLD (Zero Level Domain) ‚ð•t‰Á‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚»‚̂悤‚ÈꇂɂÍA•t‰Á‚³‚ê‚éZLD‚Æ‚»‚ÌŽž‚̃hƒƒCƒ“–¼‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚ð‘Ήž•t‚¯‚邱‚Ƃɂæ‚èA -‘¼‚Ì‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÌŽè–@‚ÌDNSƒT[ƒo‚ð—˜—p‚·‚邱‚Æ‚ª -‚Å‚«‚邿‚¤‚ɂȂè‚Ü‚·B -

      -    client-translation .i-dns.net UTF-5
      -
      -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚̃hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -ZLD ‚ªˆÙ‚È‚Á‚Ä‚¢‚ê‚ÎA•¡”Žw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -‚½‚¾‚µAmDNkit ‚̃fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ÌŽw’è‚͂ł«‚È‚¢‚悤‚É -‚È‚Á‚Ä‚¢‚Ü‚·BZLD ‚ðŽg—p‚·‚邽‚߂ɂÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹‚ÌÛA -configure ƒRƒ}ƒ“ƒh‚É ---enable-zld -‚ðŽw’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -‚±‚ÌŽw’è‚ð‚¹‚¸‚É mDNkit ‚ðƒRƒ“ƒpƒCƒ‹‚µ‚½ê‡‚É‚ÍAZLD ‚ÌŽw’è‚Í -‚·‚ׂ˳ދ‚³‚ê‚Ü‚·B -

      -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -‚±‚±‚ÅŽwަ‚µ‚½ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA“à•”“I‚ÉŽg—p‚³‚ê‚é -UTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ê‚Ü‚·B -‚»‚µ‚ÄAŒãq‚̳‹K‰»AƒT[ƒo‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ª -s‚È‚í‚ê‚ÄDNSƒT[ƒo‚É‘—o‚³‚ê‚Ü‚·B‚Ü‚½ADNSƒT[ƒo‚©‚ç‚Ì -‰ž“š‚ÍA‹t‚ÉŒ³‚̃Gƒ“ƒRƒf[ƒBƒ“ƒO‚É–ß‚³‚ê‚ăNƒ‰ƒCƒAƒ“ƒg‚É -•Ô‚³‚ê‚Ü‚·B -

      -‚±‚±‚ÅŽw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAmDNkit•t‘®‚Ìlibmdn‚¨‚æ‚Ñ -Žg—p‚·‚éiconv ƒ‰ƒCƒuƒ‰ƒŠ‚Ɉˑ¶‚µ‚Ü‚·B -iconv ƒ‰ƒCƒuƒ‰ƒŠ‚É‚æ‚Á‚ÄAƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ªˆÙ‚È‚Á‚Ä‚¢‚é -‚±‚Æ‚ª‚ ‚è‚Ü‚·‚Ì‚ÅAƒ‰ƒCƒuƒ‰ƒŠ‚̃}ƒjƒ…ƒAƒ‹‚ð‚²——‚ɂȂÁ‚Ä -Žg—p‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B -•t‘®‚Ìlibmdn‚Å‚ÍAiconv‚ª’ñ‹Ÿ‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘¼‚ÉA -‘½Œ¾Œê‰»DNS—p‚É’ñˆÄ‚³‚ê‚Ä‚¢‚é -

      - - - - - - - - - - - - - -
      UTF-5draft-jseng-utf5-01.txt
      RACEdraft-ietf-idn-race-02.txt
      BRACEdraft-ietf-idn-brace-00.txt
      LACEdraft-ietf-idn-lace-00.txt
      -
      -‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚Ü‚·B -

      -

      alternate-encoding -
      -

      DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽƒhƒƒCƒ“–¼‚ªƒNƒ‰ƒCƒAƒ“ƒg‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É -•ÏŠ·‚Å‚«‚È‚¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B -

      -    alternate-encoding <Encoding>
      -
      -Žw’è‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í•K‚¸uASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ACE)v‚ƌĂ΂ê‚éA -•ÏŠ·Œ‹‰Ê‚ª]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš (‰p”Žš‚¨‚æ‚уnƒCƒtƒ“) ‚¾‚¯ -‚©‚ç‚È‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚½‚Æ‚¦‚Î ASCII ŒÝŠ· -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̈ê‚‚ł ‚é RACE ‚ðŽw’è‚·‚éꇂɂ͎Ÿ‚̂悤‚ÉŽw’肵‚Ü‚·B -
      -    alternate-encoding RACE
      -
      -

      -

      normalize
      -

      -ƒhƒƒCƒ“–¼‚̳‹K‰»Žè–@‚ðŽw’肵‚Ü‚·B -

      -    normalize <scheme> ...
      -
      -³‹K‰»Žè–@‚Í•¡”Žw’è‰Â”\‚ÅA¶‘¤‚©‚燂ɓK—p‚³‚ê‚Ä‚¢‚«‚Ü‚·B -

      -ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½DNS—v‹‚̃hƒƒCƒ“–¼‚ÍA -“à•”“I‚ÉŽg—p‚³‚ê‚éUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽã‚ÅA -‚±‚±‚ÅŽwަ‚µ‚½³‹K‰»‚ª“K—p‚³‚ê‚Ü‚·B -

      -ŽŸ‚ÉŽ¦‚·³‹K‰»Žè–@‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

        -
      • ascii-uppercase -
      • ascii-lowercase -
      • unicode-uppercase -
      • unicode-lowercase -
      • unicode-form-c -
      • unicode-form-kc -
      • ja-kana-fullwidth -
      • ja-alnum-halfwidth -
      • ja-compose-voiced-sound -
      • ja-minus-hack -
      • ja-delimiter-hack -
      -

      ‚»‚ꂼ‚ê‚Ì“à—e‚ɂ‚¢‚Ä‚Í -libmdn‚̃}ƒjƒ…ƒAƒ‹‚Ì -normalizer ƒ‚ƒWƒ…[ƒ‹ -‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B -

      - -

      server-translation
      -

      -DNSƒT[ƒo‘¤‚̃hƒƒCƒ“–¼ƒGƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚ðŽwަ‚µ‚Ü‚·B -

      -    server-translation <ZLD> <Encoding>
      -
      -ZLD‚ª•s—v‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚ê‚ÎA<ZLD> ‚Ì•”•ª‚É‚Í -'.' ‚ðŽwަ‚µ‚Ü‚·B -
      -    server-translation . UTF-8
      -
      -ZLD‚ð•K—v‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ÍAZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Ì -—¼•û‚ðŽw’肵‚Ü‚·B -
      -    server-translation .i-dns.net UTF-5
      -
      -ZLD ‚ÌŽw’è‚ð—LŒø‚É‚·‚é‚É‚ÍAmDNkit ‚̃Rƒ“ƒpƒCƒ‹Žž‚Ìݒ肪•K—v‚Å‚·B -client-translation‚Ì€‚ð -‚²——‚­‚¾‚³‚¢B -

      -Žw’è‰Â”\‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA‘Oo‚Ì -client-translation ‚ł̂à‚̂Ɠ¯‚¶‚Å‚·B -

      -

      user-id -
      -

      dnsproxy ‚ª“®ì‚·‚郆[ƒU‚ðŽw’肵‚Ü‚·B -

      -    user-id <user>
      -
      -

      ’ÊíAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ðŽg—p‚·‚邽‚߃‹[ƒgŒ ŒÀ‚Å‹N“®‚³‚¹‚é•K—v‚ª -‚ ‚è‚Ü‚·‚ªAƒ‹[ƒgŒ ŒÀ‚̂܂܂œ®ì‚³‚¹‚é‚̂̓ZƒLƒ…ƒŠƒeƒBãD‚Ü‚µ‚­‚ ‚è‚Ü‚¹‚ñB -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚Í“ÁŒ ƒ|[ƒg‚ð쬂µ‚½‚ ‚ƃT[ƒrƒX‚ðŠJŽn‚·‚é‘O‚É -Žw’肵‚½ƒ†[ƒU‚ÌŒ ŒÀ‚Å“®‚­‚悤‚ɂȂè‚Ü‚·B -

      <user> ‚ɂ̓†[ƒU–¼‚ ‚é‚¢‚̓†[ƒU ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

      group-id -
      -

      dnsproxy ‚ª“®ì‚·‚éƒOƒ‹[ƒv‚ðŽw’肵‚Ü‚·B -

      -    group-id <user>
      -
      -‚±‚ê‚Í user-id ƒGƒ“ƒgƒŠ‚ÆŽ—‚Ä‚¢‚Ü‚·‚ªAƒ†[ƒU‚Ì‘ã‚í‚è‚ɃOƒ‹[ƒv‚ð -Žw’è‚·‚é“_‚ªˆÙ‚È‚è‚Ü‚·B -

      <group> ‚ɂ̓Oƒ‹[ƒv–¼‚ ‚é‚¢‚̓Oƒ‹[ƒv ID ”Ô†‚ðŽw’è‚·‚邱‚Æ‚ª -‚Å‚«‚Ü‚·B -

      -

      root-directory -
      -

      dnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚ðŽw’肵‚Ü‚·B -

      -    root-directory <path>
      -
      -

      ‚±‚ê‚àƒZƒLƒ…ƒŠƒeƒB‘Îô‚̈ê‚‚ł·Bdnsproxy ‚ª“®ì‚·‚éۂ̃‹[ƒgƒfƒBƒŒƒNƒgƒŠ -‚ðŽw’è‚·‚邱‚Æ‚ÅA‚»‚̃fƒBƒŒƒNƒgƒŠ‚ÌŠO‚ɂ̓AƒNƒZƒX‚Å‚«‚È‚¢‚悤‚É‚µ‚Ü‚·B -‚±‚ÌŽw’è‚É‚æ‚èAdnsproxy ‚̓T[ƒrƒX‚ðŠJŽn‚·‚é‘O‚ÉAchroot() -ƒVƒXƒeƒ€ƒR[ƒ‹‚ð—p‚¢‚ÄŽw’肵‚½ƒfƒBƒŒƒNƒgƒŠ‚ðƒ‹[ƒgƒfƒBƒŒƒNƒgƒŠ‚Æ‚µ‚Ä -ݒ肵‚Ü‚·B -

      <path> ‚ɂ̓‹[ƒg‚Æ‚µ‚Äݒ肵‚½‚¢ƒfƒBƒŒƒNƒgƒŠ–¼‚ðŽw’肵‚Ü‚·B - -

      -

      - -

      ƒVƒOƒiƒ‹

      - -

      dnsproxy ‚É SIGHUP ƒVƒOƒiƒ‹‚ð‘—‚é‚ÆAƒƒOƒtƒ@ƒCƒ‹‚ð‚¢‚Á‚½‚ñ•‚¶A -Ä“xƒI[ƒvƒ“‚·‚邯‚¢‚¤“®ì‚ðs‚¢‚Ü‚·B‚±‚ê‚ÍŽŸ‚̂悤‚Ȏ臂Š-ƒƒO‚ðƒA[ƒJƒCƒu‚Å‚«‚邿‚¤‚É‚·‚邽‚߂ł·B -

        -
      1. mv ƒRƒ}ƒ“ƒh“™‚ð—p‚¢‚ăƒOƒtƒ@ƒCƒ‹‚ð•ʂ̖¼‘O‚É‚·‚éB -
      2. dnsproxy ‚É SIGHUP ‚ð‘—‚èAV‚½‚ȃƒOƒtƒ@ƒCƒ‹‚ðƒI[ƒvƒ“‚³‚¹‚éB -
      - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/img/bind9_arch.jpg b/contrib/idn/mdnkit/doc/ja/spec/img/bind9_arch.jpg deleted file mode 100644 index f522a3f22ae945cc8d5b7334a259a3de1ab57436..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38313 zcmdSBby!^6vM<^=1cwA~oDhP$O9z4mNJ0Vx4K$j@-8Df1-B^NK&?LCKOXC`#ao6DP zyv~xn)_(V#v-dggefNI1{+P4B?m26YIYw2Ds$W(09pY{QK%^|MBo9DA0sKyP(*Rij zHYO$(CI&VZ78VW;_C37&_;|Ruc$6fhg!h3|bhJP!8X9_LE>?O*4kj9!N5X6zJiGz| z0(7jRk|KN(T>JujznGxl;Nall;!)t^Q}8j+F!24i>8=?-jE#zdDvE|e3_vADK_f=F zYX{H(PylEszvzzv0|4k4m}pq2DA>qfm5Bf-=*W9eu`n>uvC%OwkXNIkp<@tZk}#0+ z-X~*xq4{|P>j4uVNZ82Pzl{HheH8P{SH@pTT80HQq8C{n3OU3G$_DHoAbC+EAMx9h z{_!9H$}e7+SjZoRiII#^QP5D(anR5(ej5z(M`8wa5?&An=?f!FzL)m?QC~{-8C!<$ zKUsXhq!E2!TzWSJz(YgcNQ_1dkOrI`qyJw=#O7UEg&rzlDVIU6BcbuuYN=;y4-Qw? z+K7Ud-SOU zO7_T!or9~0c)FTrYRQux9`o@_T2Wn-+O%*ifeWI-BkMQ$TZW4M|HJVhZ^Mw+8Rj}R zyTB)>yL>$54ZL~CCBCZpeTV2zQtz1J8C(=URCK<@P&MuSv9w#{^|1Z23N6k9+b}Xj1+dQTqQp<{nR=kUa%AH=lo+yPvPzI3J!`93wN1YLbT`kfB>Fz z$kyZ?U;)cmtEK=XYkKw-2-~RYB=8{~m$jKHqW-#^`L>yEII{Y4|=-Swe@^%5k2k*@7M; zAyFw5N7PAP?I%20fF5(@$DHxd=}W;tb$<?yYy}h8KP+zzty!s%`g673``cYB=wQa>- z;bv_nMm|ec-B$wt%4*adtH6SsY}zY2nhR}HcQSU|AKW^do=p5wk20M~`FI<;)_BM< z@rm^0{ddYo#v3532fm+-?1zLb_eyr0XrnP)YF*vLSUWbuMMAE8yq#`uH!~bGC3=ed zD%(m#sYy)eJn}D8xH6fx8y%*0e1nF^mt2He6&w+PjjJrr#D5H&^;K9PK>ULJZtK+f zla6mZKBa=K8qw0m*dQ=}E9>bQ;l>4@;2F&bvay|Vc#F@+5NvF0iMfKU^G4iLNOT=* zpnO$E5*f|tFt#_PF(g%C)mAUu_QeoT)`Y%(DdxpMZ`WQcQ&mJsyw&F%Cr_Bh{Rfld zt@6p#9BQLMos-3$)>u*xdo4%XKt(=NiqBc%Gkj}#wP2|~XSy#x4 z6%mYfmMkd5c2%hhmU_ZV5mpbaJbDSX)g4$~_0#T(^rEe`aq9c1MMgBir*4}S6w>R< z?jb`UA6AyXj1@nq2O%98`9)$;-Ml3f={E_2jfS|W+$n4I-G*lnFge} zwHTmz5!uWzN9z&ZVpS#t^(fbw<>03?NQSM;DLOOwsN&rkk4QpkRf0zveS>nlX1@AO z*tF5uG@JYAWpHMEZz$LB2CLeT*+P%_7));_$3}_o!T!a)1Tww8O3iK)#f_sqBJ*?B?IWn~y}X-;=|lAYCiN<|(ZGzxrxeAIIyvYh*S1Rbr0>#o#+|TE`bKs* z>)5dOrbubydbUZZ{>pP$*S6Brs~B&I63>}{R4w*Fv}V?_BMTrU{0^W>T&}=0-gA7*EjA(boH4lf9tE!^V7Sc^*< zSPs3o1F#+{n^AvSaukgNXXLW;38WV(yQnNa1r5PRgh>Nywe`+w3TzGSP$pj3*`-d8 zj}{pYd$+N@={%5drq(`v5nYZK(mqkqUM=8UeSAe_{@%bi#I#*Oz6)9sdH`?c9G;Y5neN?!$#M&WnjcY~2D5MAmEJ7}iEB?sVIW#Dh0+7j1d zt7ORiCSoIq>dRd$fu~e*=#;nrA%i~|{U>KOhYBxIFBgBLgCjk&sv2Ri1>eX5! zoB!v=0pbQ~jc}mK@Rrpz`Bt-qOs9SAoivc>l_@-I|K<8o-U0sFdOSkgZtu5T*V1L9 z{ZOOZ&mmkLx_LyKVRr}kz~jpmyeaeFn32EjX#WkixLx!?1#Wp0A4T4V`bWX3Wpz6J z(*Zy~w8}`QKVRuzoIyv-)}KE_SU9T3KT4c}h=0KEA<<-MCVzSI+=B2(y1|k-H^H-i-C^V7 zf3gz)-q-Z%p+OpBl)Q95P)cr<%d}pL>15pOZ<4J|7y#AdP1=f z62CN2UeVS^objdp*)toukSMGTjCKGHYcUEjf1&9^4(9~*Q`5k?+xe?+KT4Wjz#8k+ z1Bs~>`6Zfeh7oKZYl_CE-104r0T#&UVH==n-?x|Glm1_su9p2q@(yb|14&~zRhz0r zb*Tw6X!g>&HdM ziGkz_?9??}YR@KkVVTQyHWkSl;Ros)S8gHYZnGS3!#lX4G^z{*%uQDcL`Ci9)?;np zEVzTGJ58f{sCFs4ifJs(&&Y~YN|+?+L>a$|%;`0W9?e=!I|pm`+n@WrqxN%#3H9CV zKZH3-SE^X@^puAMX4}F^;u33f4tIbPGOaP&H{Nu6>cAU=u!R$+ zOSRf-I^}C_^1Q>-pA$}$7d4m<)96Zj>R}$Rm^lZmuDx64fMP zS&+IDbSk{cmpY#=pd7;NsYjU|uX_T1Zaei`atl4<#&->#AZ2oNnu`_Fj13A#ry4A~ zBARN`ODx#reC<6E?`0L)AfU==xe*OwhN1&E1mOq{)+sJ#J~xScg-~^mV8))gHMI_% zgM&l0i!|Us^qKQ(rWa0%ZPeaDRa5wXZi6VJBv4TEbopgdkJGS zshA@HcYx;2r~~nDP%e8;n-CQH`v)@H`6Ujx6YmbJ=EDRG-5Un)&yoU}OgUXvtkj(f zQ5JWl&@%T*1EgN!BHnrVz%(M&g9GjW*@!ZsC#wl>@B_e3uls}4TE&?7%57xe=ccnP z?G_w7dqrKMahV>o9zWu*y~XtfIVmX3Y>7fmc?m^k5Jsm8i^l_cbB9=wgUjyds;&J| zHC^jbeLc%!4pu#qys7`Ju1v{vInIl(s7OKUSW^9#TlZ* zIOUb*?+e;*LvQaV0fMCmmpF#y3z zBxW}#uqv)J}>VVr=KK(bb#ky{vx zH$_&7k88szpHNrykJViQ$(I&DD}pvzuz3x0aLU}mxo^2`d7&)cC;D$eopMvVH4%6w zF>{_t%n?8FMw5ptMT@vLSv@e|Ap1e7E(@ePKLZO}cV&ucOD!|qUwPm7&?%&r7EQ%) zWXPj?7;s^o#m&|Mml~^1CgZ12oH>=;AJl|fZa$kJB$3M5+!lwZpDEd@HP1!9z5^T; zO>WcO-T`=~~)WtUC4Q)2iW?R2>D8(9w3IeG68z zxm2sfJSmyPXhr?62=5N?mrWy!bwEtHFcm=QicF!nJ@WsMu#kqn#Sjt5i=n0aIsNv5(!& zsk>)jDFmR8Rqs@fWib#dp5-`V7UE)nw3WbQn$eF_B@aBV-j{Mn@E$-NYeoX zlgy_hxa~yCyk=CLcZ6%`zMiE=q3=%>J@|MC7a%E? z5@oV;G#C-WW-38sZqdh3D+V;#M1hHwHvD&xIQ!z zduE-4bF+?`R-wv4k=p6K-w8Hr(3o4kR;+0HXa9q4>cGU)sA3Q>gsE`|d~^pe7jPig zk8hrefgPgmFGps~;wTvECUM9F_0V{xoG}ZV_-8zDy13N{)64yE1^TkF7t{7p;>Pe@ z_@15XI52P%X%3Knf(;r*K^LP`PGFre)#@@-Ybg*n zBwgl=6fB%5$AqgS$_BNd6Di|_{O;raUH;4tQ6cr_44+J*su&UeroP9 zp`z!4D$BOUeR$0w?2h-j^f{RODR_4R^vH-*(@{1&^43*>`RQD*d^0BmME}84R9-EH z(M5%`i&M$>XOrB{)e_ZKvNt2f~RB(#GHNWIX@~scNx#4S1^IYjD_$VPKpWJX<<4} zXexS=k!x`xOh+8Iy7;jx+y&hW*|gFR4A~4);u-Bew<>9G_=~v)-3AGqaS=wPa9Nz{ zk?@HUJXKSB6BjHxrh&3_u6^-X{*Bakw>v<{K3biWMe`=pWSGLY0WOfb%YgC@L_5^o zcMe))i)9(N)uLa7>B(tniBf2;hUiY1_L&B8+pgi_)?8OeDTrgS2DZUh?Ga6NW&vDv z)+tdZJ%<8|39sP5?aKP|}yPU9d9Or7UTw)^AgM)o)wwR(eS$ zk6&XYxWhSJoF1JTEY8pGjofP#jp*0KbIk!8elT-o;25KOcAh2FAJDc$E}9kk-j)iixJf%< zEh0c|G9xK!HQdgx zb2d-JBttE?+=p2W;t{3@Ntys~xmh4=MXE0O%S6830rsnB`~!-mtf2=_Ma-)ObBsIv z0C*6E%~GoW2uk3;j!Ar5T@_3wKmU5OoPDTplrv$*b%c^)Z-*>4z-jgr0g4GE@4X#H z*Kp8O>O4PpbDe#VZC~OdtT0>FgUxBy4Fu9h>S3b`b_vH@(Q-$C6J&{>+ z)PB1!oK0oA_HfcU(~`ih`fh`lOhdfYS61%ywl*m3&}vM-Cr8km4CAAOP#$uIG}5jw zh$KoYPhEThd+73HR6{p9kqXGAVirrioMUX8m9B^dXZh6bhvCD^?Z0j$Q+T0qPQlVwzd>)DEh5s=#f`@C;P>j*JDzHMsW{Q};^ z=1EOTd&H6}cZ&TbB!CJLoF%v8bjy?hnYj>7e-k@ucb=xuHMNna=aG=@F7 zD}z+gcYoI|DaRFyVmY+v=UYh=W(}*0?PLkdi=QKJIy+trmH;O$dl!U64B29dPWv{q zxi(pvOQ3F}@1dT0WXYpk!wD|5W7qwU2zXB!f=Q_xn3&k?fjsrXMh8w6vz(Ic>2(N5 z<$d>qq@?_*0fUdqZkLF>XmA?4F3W|7!G*xAuh}RK6b}Mq&mwjv@e-gKaE|R9Eeh*2 zDSf~OimB~XzTy{z?t?Mkpaq5yfZNcyu&S2v_YNb2Kd%Tb#_sVz8?^g`9=m`zvf6t` zde+2qghlYH_Kop9WfSiJ6izWCpnKJu{W8YYT~!Zd$&D*cB!Hxi0@ zVymyr`Ua+t7f@TreQ|xc)_*uT%$I<7J*$&cfv)r>d!Zw|!KQuTwdN-RWU--C3)nM8 zgRv%T3VliV;jq^Mcp6!8lo1t7W?kgn=c++Mv>9vXFXKd0(6RWxb)?8(DW-k)62*;6 zvpMO*c*GQ2z|JSfZ3v?St_UV#yjSk@qY?{CriEj|(=#Ik&Uxb;1>IS;Q*i8GfQ)bE zzW-RQ5`e-ejXCl669;lby@XL)h8w?8Ed^!|N3@hmNt3C>jAwK4sT}atB%GDTGP_m` ztqT`K7yC11+A2OYHW=z`GUBaFi|+1)iwZL}sIy`yS1cF7qQ>UmnZv7QLi-?kr@=Kl zn|ss}9%`c{a!3}!Dg2R^I1qik=4O8gIM zH9BhWl9Ql-3$rJXGmIF^NnLzKpCcbZ4PN1PR7A-VA-iJ!<&*p((BE)_0NLst(Opy3 z>hua(mW6IXwnY-2zLpUaN!_`rE(Nu62~ODVBWCZ8;H$LVh}y3=leZlk+xx!4S}POk zYkRBfvncT#5>8vA5f7ezey7Y@fD0++qeNkrgpMcfM7xNeJz^I7Abg(kn%*^xoi)Zj zaDqw9!@zqNh&Ox$wA3mEhxxs@BNkot>dm z{cYjuz3m7)5O4-EB5EDparUC>^{|$;$H>d+g=ligzDPv_1~|59Nx;K)4uu%3?K5H1}4Sb(QL%+#ifq+Km&!igbF|@vDC*<5B?Lku`h+43armJ zT{UEe5dh%Dd(5}R2QzsN60ga0z7YkK_ZK#wg8_b>;<^wg#i5;<^j|Z$yyuIY!S&ne zjqQUbZuRvEt<|0N)k!R2`+VF4XILv(g}YvASyl60TVR-fOjV_9sJQs9OMo0A**aOf zV=&?ymjrMA13FxNB8c;d81{HjP*9x(eehNq^})5T)`5ZWhXuFP4|H0=!;8nZhH;sb z6LIRc%s}eSVouYC!Z=X8^utT*2XDUbauGa~nrq<#Y(uK2a8mu%clYWVNC-ju^@Q^K z@ZiOtxtY1Wx%w5WSu_XL$u?AVc}oW;kDAxxYQ>5xAI4eWM-E{g1Lk+J?;nWFc!z1S zfwweMr!Tj=@i@UbF5S~z)b`V%lV@ojn8KvcHZ5l_1F38Zn!_^%O|tfp9h6ckz?>iT zO$$0QC~IFf>QVg^M)x8CCt;YgvUQk!db%vFAZoj+L^}P9e*Jx?_h4{9OwPfY?W>r< z(b45+XXM?iYJ=(;GwV*UHV>d5=xv~Mi?n$%B`X6dO%&NqQ~AY!zY>BIJ>>`Uc}Xs z!M@{m@PNjCyGc0o(;%6EdR+Z7$DxQol{FV@x>NM5@KrjhenI;9uYedCDwU<(zU^AC zslNk+ok6R9boSm1%ae|@Ht$)cs1tBmj?bWM(tY(n#^QKQqDwyIi%SCY7+$kDx)4ei zO=mY!!It?;{Sg#&;uQ}i3(#nwL(bu@AaK2n#dBX`tV_#FExg6l&np;3Om2 z0uTtnesrNg+Hom#fKTn@MR^9%wWLY;-?sz>L%`QxefFO zZuO5k=6j~ecMzh~sBO#f3ZtZfXaI8+D(8_-;VITbv^6CLi(hfypA;zl|05p#AE%1` z26GRtp9fP^InavAhAt%tB2umO1H$Qt0_B|dWI}0O5O)AK$8tH-EP?;6DVVi_Zu z>I1OfO?+%{%M8Mfr=+nj7tFVy0-zuONdHX^odPL@Q-Uw8b0kBW_6B&!xOzKBzfXb>Qf9ha{`6+aVWL zQ3=Wh5eQ%BK&$A!T?;816HF+m0*WRB5C>pc)Bg(H0|`${VoM?xMxSTuj&QH7+A!u3 z)T*qZ1EUvrgB6UdW z-NOZ%PdDj91uWs-v3!+2)x{vrY0CS<#VO=fhZh$>fLQWA?SBQ)U}N*TBQ-Hm6t}SN zt+f)|9mUPQ>xIqx%%Xz+SbAAg0?C1^XzEg#;d`}ScL27ILXB4BHOoz}LKc%`lvijF%{TG20 zdPH5wgN^5Xd0j+gz$y1pntMg5fV^d%_R~pML8pqqA#k79{0?5}3&BQec-zb<5xR*r zW|zP+!VOSPB%m~RN;`p09gaoQZf~V)U#-LY<14M<(1@Pi@|xZ{iJn(bx1=Af41M`; zj|8oq%nj(CPP2sAI1eugN^k{{ZA=%_&}E=Z%TkYk=!4682aPs=!zV-s(S`DQ4ccGy zqvvx(i&D`{ltYO?+aO?hVE_4xBtM52r`|q&vAn0+S0cEWHRx5gUd3Je0tWN_t1B*w zTM&T9FQAgZu?7G8;Y7)OBus?M43iH=!bEaJovRj(vVzT3og)cDm2 zEhb|^_D$@#V6sJgPD(a|Djtdk_J!WiLBljc8#Z2=fU z&{#S)0`dob_n)0i_iwow2c#oamdmKM3LCkwjw#k|fc9BdS8ro^_70szT;gN|e}`rM zJc5xY7Wb2JT$m{vPnO77rY}nR!v1|_Q|`71)vUVe4xm!2giay>f5G|a z_gVQjHl~`gei6#G-eu{&`O@gBSi22I&rq!r-o()imFFH$ep@G0R6_B!V%;T)09x;`k25EUof88?-^YCK^jEm4mUO(U|tUcMnx@FBP}Iew<>Goh`H$%)g6J$NKGn#R^v)uYUzAa0O!# z&hWIB1lCw3r0tLYN#sm?SJ9>$O^#uF{p|eqY4u?FJt8p8tv{wgTF50C?V-~^E`Iw0 z*4f~h-ja@B@f=7(D6hk~z67cMgfPXKU+RynJ_8}eKjV*)|1YO|*PZISwN_qsmruW~ zntBXjIVCXL5A9{h%1qD5u;hbNG7IR}{o2KG!>rwRl{{7=_;u^psU{Gg=WOU*0QiEL zR|OE=27y0p)$cYEWSB5ue10l=c6hds{kjh5D6KDt>Y*bsvxAlcjVWxw1SUx7p9VkB zT3k#ExBpgt!9B3%;asgZB1j6b3u`<+bj^TQouCWSsDD_f))f7*Um?Lwo;AonW5_&U zF~ntmYc8vbo`O;uDD$W1;ukn@JAghD$lvAO5z3T^2MyG?zZ)(AAY+ z^)z9ua2d4m=c4}?wzBWM#&@!c)0MDE0>9ZbJ9YrmylRao_ z<&vP^#TMQ32iwYKx7v*&=U9xs-5^C2Y#7}-w`3TZoMfi;xh3rqaqgU6NT4Gn>8BJ~ z-PGGi2DsY=X*pBOEP*DBez+{j;DhYjZ-;rkQeDCMvQl*7*c zdtj_f-F*j;bqBwPZ4>Hchr7TobtnXY6F-neIDZkXZ}ioZlGv{P_gB*2Fd;1D?>F}( z7lyvWQ&$He{+<;#rbha6Fwfk zUZJR}EL5(~PLY=xl1mq^l7*LJ1Kj+{xwjIF3nCVN(AHyBciUxd&i~4)u~iY$#x_3O}vyj0j5^ zzY{HLNmPxqhJ$ls=La{(PYX^?yCVXKAE%Up96>uBBhl|Uyx)z$U&p}}>GRXKi%Iiz z8adBmuS($>`lH%E?*Pk8EliUfmIPM0e=my##jPS;D2%q%BF*C%M7PdFCU~>mG}XFV zz_L-+LZwj!qf({YKTXx|qdY2Os^OjvWF+dEN>+% zIAiJCuax&==oc3o|AlS-gWTuE;QgJBg11Ba`wC01%mWjHL~vKCp4BAT4WkwE%oU`# z0B1+$qW=wBi5x)NAzhh{J5BMxTRzf*zK!egjbbPD8ni(uozcTCDHB_tiRS?NVA&l) zmiKjMu2W=>CHQCddoFZV2Qy7Ob^*?=`w@zBsa}Dh8{60(=%j7$>NVMWX@-=W&sU%= z{ho>ldRRO0yv46H*8hugS471>S$;%>ye&(t*d7gVB^qeQQanUq6v9GPx4z=U`nH44 zY{YZ2FXF~qVJH#R@#9$~3!f7E%+h+pu9S^q@;cp|CqSIO_;(YDREB?%iVyqbVBpKH zfM+{PLD&vCnt%xIecrYMXuYqiQ!CdyxUBZ%vI(&iDZ*?$AXC2NRWiQb^V~MEj$--N zJ454Y6FJqHVb~ySi)Z5`HIt85rWd=eaStEaE5hRhp{KZ4$=v;&Q~5 zsc<>8>qz&jb9MT~32NH_6R&3~0w&9G*^U`@D66fM`ai&qp;-FCFQ!8Qf*5epE4hwC z_gPp8-nrMdKBJzdjGLoXS&&?cH6 z$Bc9a=sAg}0K6h!FQg|f&!;xsk3v+oY>cg05@zdF-+mbpl7OWdn?83u z@99P^{aHSRVI5R>4GhD7hmgwx0$1F!Rl7>TD*Pu|&0L)^h~Qn;+&^0m57mCgSCb-- zeQeVIJH=hJUAON_BRST2(3v;_jF zUWqib!5M#JJ$N`k96yrz0ckxvZhV0qU{0*ERPf-2*9g5^s3uFWLNK# zm1bRjzH>0|-*>zfS&{xulW3UR+j?OSwCB13u;H2PGh~4C-7;R2zpIliB;U)5Bvc7b z($5eY%@CgXOGSQD6;M(cuDiUMh@Qz+?gL}dYsDs{y3tbA|FDfYrQo?+pK zR#z!skS3Hmb~uG z%XwB6qawgcEuSxb8|A*9gNHx!r89>9VJ?v$98-l=4YU&kA|D*5RgzxiD&bh=TC-{#|w zgT&wtR=8}i$xK~XM|5U)BK#>u+X!hG%(FHkg2vL+Cg2*d0_|&&H>D`{_RP_G>mu7V?a?Zs z%+X5BpGbbqgAWN64l_VJ`gzDaQBF;a*ZWdboxzh}W8dv>LLMR>7Dd8`h0lNfF=MLV zqN0)28uN737yehD+Bf^-atkhCEbcVW&;HwXj_OhO_Jqa~2eOYte!Ia(v>&XJx-cHW zrxx&#(aibY=HWqk6fW)^U`{e1e{w=CdbB@R(Y8m&9^v@rDslem>u&79$Z~{4W)goj zky#`%JGYc+oe5-$4{>68# z*_{yU!+dzn%s9)NXElw6D>)pkH#8Sn`QXnn{Ds27!gCLjWAn$IExa=_en}1?Tr}U( zafWJmO=(E3{n@}5eJKN>Xa*zSD|qqiBxHA&j(hng{)LK~H~~c3QTGnu3>=vg)3aay z|12fGNp!g=Gf|*@dM5OQ3#GdUM%}J!>5TE-u`@m>@ zPc&*wZIWm%AA;i1{UyAm&V+lfKXt?#W~K>z4tFRubMD+x-$V3#BkLv01{6`ptJCzPp*Vx^NYk z#39UTU;&i)gwPoGBeXKy31-aDO-|%wb;SE6KUTin9k7IoM2nPC`o!Te<*m|0B80X>wisfJoMe+_|+2-{|-<++)YJ=n|Obvw`Y4nt3-(2c5DvV_!~x>qx<7 znrkows;OvZ?Jt`7Gi0|%%RqF7OV>$c@Bz_^0Fvig3y%;mwo-SBYl&3Z3|(Sptb5G@ zn9URTJNbL_9^6halm-u!-}bnGOiqh94}Pzpu!x%n)>5$B7;@lY-fNeTKUIr$X@|mm zKjng1><)mMQ@Xlk@2XWR(R!f2_UjVH+1jb_om@p~65mA3xjK90giZyjTCKO$b2@u&Pp!4f-woAeMv{34`%QYcbs^jM>ec34 zd{XU?Xh~nyyhleTwwbk-cNxu+{@ir(_@UD@0cE!|3(YBW@!=+odbLmB^@E2l$D6Qn z=xgLe|4!a;_C;SkTTa({#>#vhK@0uiE?lX$W~;`<72g&ER$Fmtb&-n*obP(AsMu9D zm6_s}BXm9Um!C<+tb_4Z(xPFWB--vyFxDAq(Cxh#aStcBj{NtPus6uvp=pODR@)-=Tb< z$;LRn(m*`}?{7G@@^GZW-d#F#7ZN7=@!QPwFNod&?ynMBX?v|ItvmKoqlJFdik!PXzEBfgy^erP1HezD|AlBnHJ8UzNf$=WX#rzHqWh!X=K;y!_$8} zPR)@Ia}jV3sKwCk9e_ig6+GIl5k>9FdI9uQaRwzat~3ifeh z^-i6Fqy~OiR(ZQ$u&=Mryep%<)p%R@=&>hO77+r&lC;#Dp}xugzW@=n$#WXlQvsAsi(z zyNFKn(n+DgE%=*?kg1eOH)69L-Z%_x! zZNWgs&mj)-0jPwbIUmbO)Fr|{QcM|K&@PNuq+3O+N1~m`J^PtpR5tnjqJ9sU`Jq=8 ze|#k~RvxP#m*X{l)E>QskePVvklmK8{S20CEP1`o*vCQf8|m6*(%ANA*8>iXI@d## zlLqfjsp+lVwb8spmKXN%vHv37n zPa|=0Q-{!k;AIWBD6BOG zc+S(rKAdh_e#=@728`-nR^Pr)m>{sM*JAD)B+jWFccpxJ@37lCf-Gs`O(Yusx{d!s zAs%uG0Ei`h!}aj_l&$uY;Dm#pB8rFmCJCIPtPc=xsAtZU)!rNPi1kLKsZ|x;>W?ah zmnWXd?T00rJ)u4PZ9#xd+QeD<2Zd<&Y?kQq*oPq^W%C=3cD4fzZ zwc1zUM{6^&up=}A`!RV>EnrJm`#lj1o!%j#zl15s?VpNNv~|7L91D}r&V?>1P8~Fe zpbC|{jl(A6<3{K~31y-sMu#MdtdsK_(lTWU(+Id?wlPgqrVtX+CpW=M)XSrX6x7D% zh8~DK8^TT0Sqm7N%h_oM2njuT_r`O}OT%F%jre_9bA#zlQnPcg!hMowYjUHROo3D$ zx=njPLTP(dPOHyFBwri&w{N~LS%O?vXv3h1tMPKMeJg=#1!@(KiXSuvJIA+BAhMh2 z_@%kKF{3vbTEfA)$-5UeNv>Gti5N zCKw6X(5q5&0;gtzoQe#d;pv)DxO&{Hy*OrYQ{8yY+#LXzKihgJB+Ak`=!z^bn9ru@ zmP~E0Tq9My4T|)LZ=P^+W!>*GcMwaQy4^Axty%KAz5}F{b_U(+YqFROUsKDZqj?T8 zBoz-+0*mRHA`x7VWY20_IX|aY9-KPr^-1arUzYUDMbQN|5AQi@r_ni|GFF(4vJ}kj z+DC<35;_%fiSY%F&Nc^bQzn>405e~>9bDg93qyab*dJ1Gb$__Zp^oah?juMQZed;q zMK@C{tu@Tg&H1A>Y53VIBbIKa$E((FA4DD8>XMUW`&C5*{bXCoEb&lRGD&lPVs@Z6 zjsrNYP4=kmbsZAW{~=>@f4h6~LHt~9TGA*3UoCduHuxd34hr0xI030f_b+LhkiA9? ze&sc95rvsSMzH`5)`iF*{RoWAj`}klGdhc}$h01}fIMXy<$S4gsbJGwnWsRNv+>}2 zJsFT}-vRm2wF1M(PK2qarp~yKLPMXex~_^pC;CRY2t@xZE65!plr{c<7}T}rC}CiB zN<#5nL217fYZAJb%b(iD46~!lLra`XE!eQl{5F;Ll#yFF?3r&H6AMk*`I<1syH7(7 z^Yx8qm_`0fGY9Ow+lsRxZD@K_bGZUF3&Nm+$yl)}D^2iaRg-#u;X=&ol20oyRW}18 zsW~Va%&LR4Fr%=+I_tve0z`xwp}R`-6>^nry!^HidGEed`vo4OE&uVm|H zuKFq12k`<^C*i%1`ZA<8^QM8cvSNzLE}>9qCt=;dx6JJevWxZxQ0<4pda1&DyRd9QfG?`tON9M)2$95vkzr~`> zVJu;ls=_fX5%6dwM9GYpeNI8^xy7Mbpq_xz;q<4yIJ(-Zx{&xa^UsYoMUN_yj;BN( zYV~M3apXn?jpC6!Sr`@2L}Azq7tar%Zt#<_oOJxKN1kNEloqj9HJks?XM%U7a#FYL zI2mGTe2Cc`E;El82cWEScI(JBaY1PpFNTCB8rWK1ykosM@&enrdsR|@1eaFlF6+Ke z#aZ_(kUwJo0_~4zLpIB^X4U28$`)@Op=-ugK**q$_kyWbgwNTlUCaUzs*QP+{Pr-b z0}q+cgXU|#AudidL((rnry5>6#IU1?*(qtdjsvZT!x>+}nr_O7praj=oDXB$Z%nMM z-;P(}Opg$%B+gYvgM3v&@J~ZkJEQJ*lPCT3x=oECnrHlBRq3%7kY1&5aTtM!XlQH$)*PUv?@U8n~E#lSOF&;BrjXTmG^l zwESgWR(~)tbhS~;Me}j>pUXWewx;8ju=u3wtT8rdZ$3M-v!bqm|KN}C?^g(jdQY#w zkiZa_?j${UCi-&d*h8;jY&(tTuc()ZNCp1-I1CVpXSKUGzkAPEXnl+CR4amSh`s*T zzh|Ixe4taZ)s?QW7^3?^yGly!bbN6$v*q<@1v)HIvV(-8F>n`4P@@Z(vdDXB)+#4;U~fP>&Ysl%j~h@X}-7ph-ix#9jp$UnKzS$D37 z?MAHt49;kG?T4mAnQya6AACGle)^s+oty}OOg^B?4b*%dkfwd>3Kh1*TD6c;9wwCj zy2W@fZHW88oF3V2K=vdetEwPvs@#HbD8eBWTI=C;yX!1<-$8yORr@ry+CAXwF~p+W zhVD`E@4(wX*^L_bav#A#&JO)`0amvT!}-7MD(QV#c}LO*_9>~<&t>! z1#gwQdfMzjZYxZ2mb904WP*_AH7(Sd42tYY|2-~xy;yxJjIwFy`c%N@Gb>a$)J(}^ z{<3b`{xo9CYar+>J?Uk6ffuI?7d=2p(hs}*U%c8saKbgkX?9%Np|v!g7lP&EuJ@=v zG3TrJafKbb)?L4TC~&;LUZ}>}!x${{`yByKbsVN#O9h&p*3%g708Sy(G&OlJ(Zi+y zOsx&ULG$hry4O@z;)vGdMgFBEH}E z1mEP9rs(-L63r|3nag9P-3~WhJl@hLPNF%FLw|>itagAZB*de*16Kj^!52B%DWxNg zrd)V(h4g(3oww<((x(~^9Ov`$y$v)YUk4Tcumao`N}1{~sfn*v+?JQrs8{$1`VHu| zI}ob1BLcHJe+nj_zA>6hql_rB-nslaTM&R=X7hh~n00JszhcOB0b;ee1Z^5=)rHO{2V_JPAGko>3jJ4M=g_(=m8h@4QdJQ*&GzciqX^XlCA2_qWOjYGa~`iZX=z{97trV78+}Ef+~|4r zl*=c(_CjtfU0(M64J<=)L-l&bm-@9khxtI78N>F%w=+SvEKQCcX_RkRc+ z79>bpthigD1PX=9!kys3-3l$VNK4S-TC@}i0YY#o5-9Gj!QF%RP1j!Q?C!H=?X#cz zo_n7=e`F>J&+yDle)h3%e-VV1wk-$?*a+S!5D<`vUuTk)OJ39`4RjE7K&Gt( zTW?R5X3oq4&o@b=bY(tc#2SMoWc>Eh3Mempmuc^%opLgWUnoGb6}G=xye4Vx4e?1s zM$-ly(8XrO7q6}AguC-Ci{bi+bG*I@p74RA!FG;#ei=*&zcrJ<-Pdz+I9Mp|ty1!iLB;|Go9$&;!-)IHa$*tk_VpwyU^{S=4~{nD_1?73 z){6R~+qanA(?1Eege>gP&~g+^4Fqzuh%$1+x*W{K7+E@q%&2ayqCa)^N;(isIOwIw zxzN<7ie6tBY_L2C{=&p`!6Zs1%XG~2iK5t~w;%EyXYuiOoQ%KNm$MIbzvG;e`>)>o zEVXqtR4r5lme=kZiD1GHh_$e=biVvC=l{D+Kp!n+6tY{J>-h4$@`KhBRle&);ml#{ zbb#KM$#o1H-rIk<3$Zfe?Cv}o$8He_%dbgCc0=V0&85d))YK07t?$A)EX`4!?Lq|D z+ZDHq(}(jz#+LKL`8@PjTKK11!In^huzckvltjg%nE zF8IdIszleCq(V$$gODMXK1*O0YmaBUW2`PJAtd4q!KS15fx&a^3sY)Aw|&DB2?oIl zTy;4)-Ro>wk9+zcN>+6HR{Q(E6E%UnQOk$uDro@%P2XcfZp4vQq|UAK%bU5ZAZpL{ zeksG{kK~IBr{SQ{4MVNm4`<03MRri@tt4N?b)6bzo{8g4QsNqirF%km{!MQ5H>m2T z7u4lv6Tb0=vM$t&(1n9szR<+gWOBa%i@!<@d7bUC1Y;GRe`ybQP~+~D-G#Z#^^up1 znvjS+!yU>i04DD?fk#cJp_RzrJ@Vf__!j~O86n?MfU!Hfn7|#}31T{`n~1wS3~FZk zmBFuty;=Lm#UpV>n97@%_r}*95KuT8L=Ov)T^1K<1*)Z>;EiJ8fE65{z{N+memrxU ztLG;Nb9_Bp#9f7cz~E)TE!NU${||G?Meot(5NB!3q=t z+70qnpYpMY*0d>xu44okKoTVFd_v-|WhGwhz_@(dZ4=#wj=$=q^A4M8_+D-c3 zm;0RcD2+eGb@kVP9BoWL5qZeibhKKM1aY+bfgJN6-PM2F-|zzqso*}1gH^kKJ=M9T zDwLgaRJ)dyD_n^Y$3-UMcDtbl%>yJ zukaO1toe|ZaSDqJ%(<274eVH5CmK%DWXVYj5M_&95arP%b@K|90)CD<;pG`g*q7sl z=$?`^{tyY%RI$3Hmsj_Lh*Ix7JP`L%c2E*#k7%~qDfREq;iw1-_FMfytMQ)#9MmLY z&=1`#d(9UnjWk1VMAoSHC7CKXd4xeJhPSQd0BXDmi?93;OWsxu`3p=@>=Y3 zlFOsFVD^o>lNDDl0-r0slQb7y>&wR)mUlAm0J`vI@a_bhUI^@5jEUzP%8%G zbrn_K2h(uHEx~PM+s&edgIaHWD4)q(lhoYYq&>&2m>^r~ZVt=&CRScgx6WS!%v22! z)(xT(>tag9_zpg4tLbP|)Fou96kFPQi8eAnDnN?hO7YyY2E|bjRxhRmRrh&lmG9Uc zq(dxoPzBxXJP*g{D(}MX?w2hh?>Id#FasIVZbI{NUOÐJRc**Zb|RptnSTYC3CP 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 E2c?(x761SM diff --git a/contrib/idn/mdnkit/doc/ja/spec/img/components.jpg b/contrib/idn/mdnkit/doc/ja/spec/img/components.jpg deleted file mode 100644 index c942983070498737eedf7a8fe207c98eeced895d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48119 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 diff --git a/contrib/idn/mdnkit/doc/ja/spec/img/components2.jpg b/contrib/idn/mdnkit/doc/ja/spec/img/components2.jpg deleted file mode 100644 index 413e58f1fb965c1a58efb768fbf7f214123b3a3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40075 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 BSRnua diff --git a/contrib/idn/mdnkit/doc/ja/spec/img/translator.jpg b/contrib/idn/mdnkit/doc/ja/spec/img/translator.jpg deleted file mode 100644 index e826e8ac311cd79195375c5bf4915dd52008a2c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49308 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 I4L=Y66En;z3;+NC diff --git a/contrib/idn/mdnkit/doc/ja/spec/img/winsock1.jpg b/contrib/idn/mdnkit/doc/ja/spec/img/winsock1.jpg deleted file mode 100644 index b541798e8f7d0cc4f17de33d73ea4bad984a4064..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5067 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 G#Qy-quIIl1 diff --git a/contrib/idn/mdnkit/doc/ja/spec/library.html b/contrib/idn/mdnkit/doc/ja/spec/library.html deleted file mode 100644 index 879b5d0bbf..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/library.html +++ /dev/null @@ -1,2573 +0,0 @@ - - - - - -MDN libarary specification - - - - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ

      - - - -
      - -

      ‹@”\ŠT—v

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ϊ·‚ÉŠÖ‚í‚éŠeŽí‚̈—‚ð -ŽÀ‘•‚·‚郂ƒWƒ…[ƒ‹‚ÌW‡‚Å‚·B‚±‚̃‰ƒCƒuƒ‰ƒŠ‚͈ȉº‚̂悤‚È‹@”\‚ð -’ñ‹Ÿ‚µ‚Ü‚·B - -

        -
      • ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) •ÏŠ· -
      • •¶Žš—ñ‚̳‹K‰» -
      • DNS ƒƒbƒZ[ƒW‚̉ðÍAÄ‘g‚Ý—§‚Ä -
      • ZLD (Zero Level Domain) ‚̃}ƒbƒ`ƒ“ƒOAíœA’ljÁ -
      • ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì”»•Ê -
      • ƒNƒ‰ƒCƒAƒ“ƒg—pÝ’èƒtƒ@ƒCƒ‹‚̓ǂݞ‚Ý -
      - -
      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒR[ƒhƒZƒbƒg) •ÏŠ·

      - -

      •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µA‚»‚ÌŒ‹‰Ê‚ð•Ô‚µ‚Ü‚·B -MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì“à•”‚Å‚ÍA•¶Žš—ñ‚Í‚·‚×‚Ä UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚邯‚µ‚Ä -Žæ‚舵‚í‚ê‚Ü‚·B‚»‚±‚ÅA‚±‚̃‚ƒWƒ…[ƒ‹‚Í -

        -
      • ‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ· -
      • UTF-8 ‚©‚ç‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ· -
      -‚ðƒTƒ|[ƒg‚µ‚Ü‚·B - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚͑傫‚­•ª‚¯‚ÄAŽŸ‚Ì2Ží—Þ‚ª‚ ‚è‚Ü‚·B -

        -
      • ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO (ƒVƒtƒgJISAEUC “™) -
      • ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ÅŽg—p‚·‚邽‚߂ɃfƒUƒCƒ“‚³‚ꂽ“Á•ʂȃGƒ“ƒR[ƒfƒBƒ“ƒO -(UTF-5ARACE “™) -
      -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚ł͑OŽÒ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É -iconv() ƒ†[ƒeƒBƒŠƒeƒB‚ðŽg—p‚µAŒãŽÒ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É‚Í -“ÆŽ©‚̕ϊ·ŠÖ”‚ðŽÀ‘•‚µ‚ÄŽg—p‚µ‚Ä‚¢‚Ü‚·B - -

      - -

      •¶Žš—ñ‚̳‹K‰»

      - -

      —^‚¦‚ç‚ꂽ•¶Žš—ñ‚ð³‹K‰»‚µ‚Ü‚·B•W€‚ł͎Ÿ‚É‚ ‚°‚鳋K‰»‚ðƒTƒ|[ƒg‚µ‚Ü‚·B -

        -
      • ASCII ‚̬•¶Žš¨‘å•¶Žš•ÏŠ· -
      • ASCII ‚Ì‘å•¶Žš¨¬•¶Žš•ÏŠ· -
      • UnicodeData.txt ‚É]‚Á‚½¬•¶Žš¨‘å•¶Žš•ÏŠ· -
      • UnicodeData.txt ‚É]‚Á‚½‘å•¶Žš¨¬•¶Žš•ÏŠ· -
      • Unicode Normalization Form C -
      • Unicode Normalization Form KC -
      • “ú–{Œê‚Ì”¼Šp‚©‚Ȩ‘SŠpƒJƒ^ƒJƒi•ÏŠ· -
      • ‘SŠpƒ}ƒCƒiƒX‹L†¨”¼ŠpƒnƒCƒtƒ“•ÏŠ· -
      • ‹å“_(B)A‘SŠpƒsƒŠƒIƒh(D)¨ƒsƒŠƒIƒh(.)•ÏŠ· -
      - -
      - -

      DNS ƒƒbƒZ[ƒW‚̉ðÍAÄ‘g‚Ý—§‚Ä

      - -

      DNS ƒvƒƒLƒVƒT[ƒo (dnsproxy) ‚Å‚ÍAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ DNS -ƒƒbƒZ[ƒW‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚ɑ΂µ‚ăGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¢A -‚»‚ÌŒ‹‰Ê‚ð DNS ƒT[ƒo‚É‘—‚è‚Ü‚·B‚±‚Ì‚½‚߂Ɉȉº‚Ì‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

        -
      • DNSƒƒbƒZ[ƒW‚ð‰ðÍ‚µAƒhƒƒCƒ“–¼‚ðŽæ‚èo‚· -
      • •ÏŠ·‚µ‚½ƒhƒƒCƒ“–¼‚ð—p‚¢‚ÄDNSƒƒbƒZ[ƒW‚ðÄ\¬‚·‚é -
      - -
      - -

      ZLD (Zero Level Domain) ‚̃}ƒbƒ`ƒ“ƒOAíœA’ljÁ

      - -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽ¯•Ê‚·‚邽‚ß‚É ZLD ‚ð•K—v‚Æ‚·‚é•ûŽ®‚Ì‚½‚ß‚ÉAZLD ‚É -ŠÖ‚·‚éˆÈ‰º‚Ì‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

        -
      • •¡”‚Ì ZLD ‚Ì’†‚©‚çAƒhƒƒCƒ“–¼‚Ƀ}ƒbƒ`‚·‚é‚à‚Ì‚ð’T‚· -
      • ƒhƒƒCƒ“–¼‚©‚ç ZLD •”•ª‚ð휂·‚é -
      • ƒhƒƒCƒ“–¼‚É ZLD ‚ð’ljÁ‚·‚é -
      - -
      - -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì”»•Ê

      - -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO -(ƒR[ƒhƒZƒbƒg) ‚ðŽ©“®”»•Ê‚µ‚Ü‚·B”»•ʂ͊î–{“I‚ɂ̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚̃ƒP[ƒ‹ -î•ñ‚ð—˜—p‚µ‚Ü‚·‚ªAŠÂ‹«•Ï”‚ÅŽw’è‚·‚邱‚Æ‚à‰Â”\‚ɂȂÁ‚Ä‚¢‚Ü‚·B - -

      - -

      ƒNƒ‰ƒCƒAƒ“ƒg—pÝ’èƒtƒ@ƒCƒ‹‚̓ǂݞ‚Ý

      - -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚郊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO -•ÏŠ·‚ⳋK‰»‚ðs‚¤ê‡AŽg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»•ûŽ®‚Í -Ý’èƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ê‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B - -

      - -


      - -

      ƒ‚ƒWƒ…[ƒ‹ˆê——

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚͈ȉº‚̃‚ƒWƒ…[ƒ‹‚©‚ç\¬‚³‚ê‚Ü‚·B - -

      -
      brace ƒ‚ƒWƒ…[ƒ‹ -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é BRACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹ -
      converter ƒ‚ƒWƒ…[ƒ‹ -
      •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹ -
      debug ƒ‚ƒWƒ…[ƒ‹ -
      ƒfƒoƒbƒO—po—͂̂½‚߂̃†[ƒeƒBƒŠƒeƒBƒ‚ƒWƒ…[ƒ‹ -
      dn ƒ‚ƒWƒ…[ƒ‹ -
      DNS ƒƒbƒZ[ƒW“à‚̃hƒƒCƒ“–¼‚Ì“WŠJEˆ³k‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      lace ƒ‚ƒWƒ…[ƒ‹ -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é LACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹ -
      localencoding ƒ‚ƒWƒ…[ƒ‹ -
      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð„‘ª‚·‚郂ƒWƒ…[ƒ‹ -
      log ƒ‚ƒWƒ…[ƒ‹ -
      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚̃ƒO‚Ìo—͈—‚ð§Œä‚·‚郂ƒWƒ…[ƒ‹ -
      msgheader ƒ‚ƒWƒ…[ƒ‹ -
      DNS ƒƒbƒZ[ƒW‚̃wƒbƒ_‚̉ð̓‚ƒWƒ…[ƒ‹ -
      msgtrans ƒ‚ƒWƒ…[ƒ‹ -
      DNS ƒvƒƒLƒVƒT[ƒo‚Å‚Ì DNS ƒƒbƒZ[ƒW‚̕ϊ·‚ðs‚¤‚½‚߂̃‚ƒWƒ…[ƒ‹ -
      normalizer ƒ‚ƒWƒ…[ƒ‹ -
      •¶Žš—ñ‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      race ƒ‚ƒWƒ…[ƒ‹ -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é RACE - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ƒ‚ƒWƒ…[ƒ‹ -
      res ƒ‚ƒWƒ…[ƒ‹ -
      ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠA‚ ‚é‚¢‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ŃhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤‚½‚߂̃Cƒ“ƒ^ƒtƒF[ƒX‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹ -
      resconf ƒ‚ƒWƒ…[ƒ‹ -
      ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠA‚ ‚é‚¢‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ŃhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚ðs‚¤Û‚ÌÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Þ‚½‚߂̃‚ƒWƒ…[ƒ‹ -
      result ƒ‚ƒWƒ…[ƒ‹ -
      ƒ‰ƒCƒuƒ‰ƒŠ‚ÌŠeŠÖ”‚ª•Ô‚·ƒŠƒUƒ‹ƒgƒR[ƒh‚ðˆµ‚¤ƒ‚ƒWƒ…[ƒ‹ -
      selectiveencode ƒ‚ƒWƒ…[ƒ‹ -
      ƒeƒLƒXƒg‚Ì’†‚©‚ç”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ð’T‚µo‚·ƒ‚ƒWƒ…[ƒ‹ -
      strhash ƒ‚ƒWƒ…[ƒ‹ -
      •¶Žš—ñ‚ðƒL[‚Æ‚·‚éƒnƒbƒVƒ…•\‚ðŽÀŒ»‚·‚郂ƒWƒ…[ƒ‹ -
      translator ƒ‚ƒWƒ…[ƒ‹ -
      —^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É]‚Á‚ăhƒƒCƒ“–¼‚ð•ÏŠ·‚·‚郂ƒWƒ…[ƒ‹ -
      unicode ƒ‚ƒWƒ…[ƒ‹ -
      Unicode ‚ÌŠeŽí•¶Žš‘®«‚ðŽæ“¾‚·‚郂ƒWƒ…[ƒ‹ -
      unormalize ƒ‚ƒWƒ…[ƒ‹ -
      Unicode ‚Å’è‹`‚³‚ê‚Ä‚¢‚é•W€‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      utf5 ƒ‚ƒWƒ…[ƒ‹ -
      ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é UTF-5 - ‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      utf8 ƒ‚ƒWƒ…[ƒ‹ -
      UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO•¶Žš—ñ‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      util ƒ‚ƒWƒ…[ƒ‹ -
      ‘¼‚̃‚ƒWƒ…[ƒ‹‚ÅŽg‚í‚ê‚鋤—pŠÖ”‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹ -
      zldrule ƒ‚ƒWƒ…[ƒ‹ -
      ƒhƒƒCƒ“–¼‚Æ ZLD ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚̌ĂÑo‚µŠÖŒW}‚ðŽ¦‚µ‚Ü‚·B‚½‚¾‚µ‚Ù‚Æ‚ñ‚Ç‚·‚×‚Ä‚Ì -ƒ‚ƒWƒ…[ƒ‹‚©‚çŒÄ‚Ño‚³‚ê‚Ä‚¢‚é debug ƒ‚ƒWƒ…[ƒ‹‚Æ log ƒ‚ƒWƒ…[ƒ‹A‚Ü‚½ -‹¤—pŠÖ”‚ð”[‚ß‚½ util ƒ‚ƒWƒ…[ƒ‹‚Í -Š„ˆ¤‚µ‚Ä‚ ‚è‚Ü‚·B - -

      -libmdn module graph -
      - -
      - -

      ƒ‚ƒWƒ…[ƒ‹Ú×

      - -

      MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ɋ܂܂ê‚é‚·‚ׂẴ‚ƒWƒ…[ƒ‹‚ɂ‚¢‚ÄA‚»‚ÌŽd—l‚ð‹Lq -‚µ‚Ü‚·B -‚Ü‚¸Šeƒ‚ƒWƒ…[ƒ‹‚Å‹¤’ʂɎg—p‚³‚ê‚éAŠÖ”‚ÌƒŠƒ^[ƒ“’l‚ɂ‚¢‚Ä -à–¾‚µ‚½‚ ‚ÆAƒ‚ƒWƒ…[ƒ‹–ˆ‚ÉÚׂð‰ðà‚µ‚Ü‚·B - -


      - -

      APIŠÖ”‚ÌƒŠƒ^[ƒ“’l

      - -

      MDNƒ‰ƒCƒuƒ‰ƒŠ‚̂قƂñ‚Ç‘S‚Ä‚ÌAPIŠÖ”‚ÍAƒŠƒ^[ƒ“’l‚Æ‚µ‚Ä -—ñ‹“Œ^‚Å‚ ‚émdn_result_t Œ^‚Ì’l‚ð•Ô‚µ‚Ü‚·B’l‚̈ꗗ‚Æ‚»‚̈Ӗ¡‚ð -ަ‚µ‚Ü‚·B -

      -
      mdn_success -
      ˆ—‚ª¬Œ÷‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_notfound -
      ŒŸõˆ—‚Ȃǂɂ¨‚¢‚ÄAŒ©‚‚©‚ç‚È‚©‚Á‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_invalid_encoding -
      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É‚¨‚¢‚ÄA“ü—Í‚³‚ꂽ•¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª - ŠÔˆá‚Á‚Ä‚¢‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_invalid_syntax -
      ƒtƒ@ƒCƒ‹‚È‚Ç‚Ì‘Ž®‚ɊԈႢ‚ª‚ ‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_invalid_name -
      Žw’肳‚ꂽ–¼‘O‚ªŠÔˆá‚Á‚Ä‚¢‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_invalid_message -
      “ü—Í‚³‚ꂽDNSƒƒbƒZ[ƒW‚ª³‚µ‚­‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_buffer_overflow -
      Œ‹‰Ê‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚̑傫‚³‚ª‘«‚è‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_noentry -
      Žw’肳‚ꂽ€–Ú‚ª‘¶Ý‚µ‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_nomemory -
      ƒƒ‚ƒŠ‚̃AƒƒP[ƒVƒ‡ƒ“‚ÉŽ¸”s‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_nofile -
      Žw’肳‚ꂽƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚È‚¢‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_nomapping -
      •¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚ð•ÏŠ·‚·‚éÛA - •ÏŠ·ƒ^[ƒQƒbƒg‚Ì•¶ŽšW‡‚Ɋ܂܂ê‚È‚¢•¶Žš‚ª‚ ‚Á‚½ (‚‚܂è - ³‚µ‚­•ÏŠ·‚Å‚«‚È‚©‚Á‚½) ‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_context_required -
      •¶Žš‚Ì‘å•¶Žš¬•¶Žš•ÏŠ·‚ÌÛ‚ÉA³‚µ‚¢•ÏŠ·‚ðs‚¤‚ɂ͕¶–¬î•ñ‚ª - •K—v‚Å‚ ‚邱‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      mdn_failure -
      ã‹L‚Ì‚¢‚¸‚ê‚É‚à“–‚Ă͂܂ç‚È‚¢ƒGƒ‰[‚ª”­¶‚µ‚½‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -
      - -
      - -

      brace ƒ‚ƒWƒ…[ƒ‹

      - -

      brace ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é - -BRACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚Ì -‰ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñB -converter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚Ä -BRACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__brace_open -
      -
      -mdn_result_t
      -mdn__brace_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      BRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__brace_close -
      -
      -mdn_result_t
      -mdn__brace_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      BRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__brace_convert -
      -
      -mdn_result_t
      -mdn__brace_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      BRACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B -“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -dir ‚ªmdn_converter_l2u‚È‚ç -BRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l -‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çBRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      converter ƒ‚ƒWƒ…[ƒ‹

      - -

      converter ƒ‚ƒWƒ…[ƒ‹‚ÍA•¶Žš—ñ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO(ƒR[ƒhƒZƒbƒg)‚ð -•ÏŠ·‚µ‚Ü‚·BMDN ƒ‰ƒCƒuƒ‰ƒŠ‚Í“à•”ˆ—‚É UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶Žš—ñ‚ð -Žg—p‚·‚邽‚ßA‚±‚̃‚ƒWƒ…[ƒ‹‚̓[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚Ì -ŠÔ‚Ì‘ŠŒÝ•ÏŠ·‚ðs‚¢‚Ü‚·B - -

      Œ»ÝƒTƒ|[ƒg‚³‚ê‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

        -
      • iconv() ‚ªƒTƒ|[ƒg‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO
        - iconv() ‚Ƃ͔ėp“I‚ȃR[ƒhƒZƒbƒg•ÏŠ·‹@”\‚ð’ñ‹Ÿ‚·‚éŠÖ”‚ÅA - ‚±‚ÌŠÖ”‚ªƒTƒ|[ƒg‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðƒTƒ|[ƒg‚µ‚Ü‚·B - iconv() ‚ªƒTƒ|[ƒg‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍŽÀ‘•ˆË‘¶‚Ȃ̂ÅA - ‹ï‘Ì“I‚ɂǂ̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‰Â”\‚Ȃ̂©‚Í iconv() ‚Ì - ƒhƒLƒ…ƒƒ“ƒg‚ð‚²——‚­‚¾‚³‚¢B -
      • UTF-5
        - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-jseng-utf5-01.txt - ‚ð‚²——‚­‚¾‚³‚¢B -
      • RACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-race-02.txt - ‚ð‚²——‚­‚¾‚³‚¢B -
      • BRACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-brace-00.txt - ‚ð‚²——‚­‚¾‚³‚¢B -
      • LACE
        - ‚±‚ê‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•û–@‚Æ‚µ‚Ä’ñˆÄ‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B - Ú‚µ‚­‚Í - draft-ietf-idn-lace-00.txt - ‚ð‚²——‚­‚¾‚³‚¢B -
      - -

      ‚Ü‚½Aconverter ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚Ì‚½‚ß‚É -“Á•Ê‚ÉÝŒv‚³‚ꂽ‚à‚Ì‚ÅAˆê”Ê“I‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ɂ͕K‚¸‚µ‚à“K‚µ‚Ü‚¹‚ñB -—Ⴆ‚Î UTF-5ARACEABRACEALACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓hƒƒCƒ“–¼‚Ì -‹æØ‚è•¶Žš‚Å‚ ‚éƒsƒŠƒIƒh‚ð“Á•ʂɈµ‚¢‚Ü‚·B - -

      converter ƒ‚ƒWƒ…[ƒ‹‚ÍuƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -‚ ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚Ì‘ŠŒÝ•ÏŠ·‚ðs‚¤‚É‚ÍA‚Ü‚¸ -‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð쬂µ‚Ü‚·BŽÀÛ‚Ì -ƒR[ƒh•ÏŠ·‚ɂ̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ð’¼ÚŽw’è‚·‚é‚̂ł͂Ȃ­A‚±‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ðŽw’肵‚Ü‚·BƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í -mdn_converter_t Œ^‚Å‚ ‚èAŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -typedef struct mdn_converter *mdn_converter_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_converter_initialize -
      -
      -mdn_result_t
      -mdn_converter_initialize(void)
      -
      -

      ƒ‚ƒWƒ…[ƒ‹‚̉Šú‰»ˆ—‚ðs‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É - •K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_create -
      -
      -mdn_result_t
      -mdn_converter_create(const char *name, mdn_converter_t *ctxp,
      -        int delayedopen)
      -
      -

      name ‚ÅŽw’肳‚ê‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ðì¬A‰Šú‰»‚µActxp ‚ÌŽw‚·—̈æ‚É -Ši”[‚µ‚Ü‚·B -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄAŒ»Ý‚̂Ƃ±‚ë -UTF-5ARACEABRACEALACE -‚̕ϊ·‹@”\‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -‚±‚êˆÈŠO‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽw’肳‚ꂽꇂɂÍAƒVƒXƒeƒ€‚Ì’ñ‹Ÿ‚·‚é -iconv() ƒ†[ƒeƒBƒŠƒeƒB‚ð—p‚¢‚ĕϊ·‚ªs‚í‚ê‚Ü‚·B -‚±‚Ìê‡A‚±‚ÌŠÖ”‚̌ĂÑo‚µŽž‚Éiconv_open() ‚Ì -ŒÄ‚Ño‚µ‚ªs‚í‚ê‚Ü‚·‚ªA -delayedopen ‚ª^‚È‚ç‚ÎŽÀÛ‚É•¶Žš—ñ‚̕ϊ·‚ªs‚í‚ê‚é‚܂Š-iconv_open() ‚̌ĂÑo‚µ‚ª’x‰„‚³‚ê‚Ü‚·B -

      ‚Ü‚½mdn_converter_register -‚ð—p‚¢‚ÄV‚½‚ȃ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð’ljÁ‚·‚邱‚Æ‚à‰Â”\‚Å‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_nameA -mdn_nomemoryA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_destroy -
      -
      -void
      -mdn_converter_destroy(mdn_converter_t ctx)
      -
      -

      mdn_converter_create ‚Å -쬂µ‚½ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B -

      - -

      mdn_converter_convert -
      -
      -mdn_result_t
      -mdn_converter_convert(mdn_converter_t ctx,
      -	mdn_converter_dir_t dir, const char *from,
      -	char *to, size_t tolen)
      -
      -

      mdn_converter_create ‚Å -쬂µ‚½ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð—p‚¢‚Ä -•¶Žš—ñ from ‚ðƒR[ƒh•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚ÉŠi”[‚µ‚Ü‚·B -tolen ‚Í to ‚Ì’·‚³‚Å‚·B -dir ‚͕ϊ·‚Ì•ûŒü‚ÌŽw’è‚ÅA -

        -
      • mdn_converter_l2u‚È‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ· -
      • mdn_converter_u2l‚È‚ç UTF-8 ‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ· -
      -‚ƂȂè‚Ü‚·B -

      ISO-2022-JP‚̂悤‚Éó‘Ô‚ð‚à‚ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽg—p‚µ‚½ê‡A -iconv() ‚ƈقȂèA‚±‚ÌŠÖ”‚̌ĂÑo‚µŠÔ‚Åó‘Ԃ͕ۑ¶‚³‚ê‚Ü‚¹‚ñB -•ÏŠ·‚Í–ˆ‰ñ‰Šúó‘Ô‚©‚çŽn‚Ü‚è‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_invalid_nameA -mdn_nomemoryA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_localencoding -
      -
      -char *
      -mdn_converter_localencoding(mdn_converter_t ctx)
      -
      -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg ctx ‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ð -•Ô‚µ‚Ü‚·B -

      - -

      mdn_converter_isasciicompatible -
      -
      -int
      -mdn_converter_isasciicompatible(mdn_converter_t ctx)
      -
      -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg ctx ‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚Ç‚¤‚©‚ð•Ô‚µ‚Ü‚·BASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚ç -0‚łȂ¢’l‚ªA‚»‚¤‚łȂ¢‚È‚ç1‚ª•Ô‚è‚Ü‚·B -

      ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO -(ASCII-compatible Encoding) ‚Æ‚ÍA -‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ŃGƒ“ƒR[ƒh‚³‚ꂽƒhƒƒCƒ“–¼‚ª -’Êí‚ÌASCII‚̃hƒƒCƒ“–¼‚Æ‹æ•ʂł«‚È‚¢A‚‚܂è‰p”Žš‚¨‚æ‚Ñ -ƒnƒCƒtƒ“‚݂̂Å\¬‚³‚ê‚邿‚¤‚ȃGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‚±‚Æ‚ÅA -‹ï‘Ì“I‚É‚Í RACE ‚Ȃǂª‘Š“–‚µ‚Ü‚·B -‚±‚ê‚ç‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ˆê”ʂɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä—p‚¢‚ç‚ê‚邱‚Æ‚Í -‚ ‚è‚Ü‚¹‚ñ‚ªADNS ƒvƒƒgƒRƒ‹ã‚ŃhƒƒCƒ“–¼‚ð•\‚·‚½‚߂̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä‚Í -(]—ˆ‚Ì DNS ƒT[ƒo“™‚ª‚È‚ñ‚Ì•ÏX‚à‚È‚µ‚ÉŽg‚¦‚邱‚Æ‚à‚ ‚Á‚Ä) —L—ÍŽ‹‚³‚ê‚Ä‚¢‚é -‚à‚̂ł·B -

      - -

      mdn_converter_addalias -
      -
      -mdn_result_t
      -mdn_converter_addalias(const char *alias_name, const char *real_name)
      -
      -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ real_name ‚ɑ΂µ‚ÄAalias_name -‚Æ‚¢‚¤•Ê–¼‚ð“o˜^‚µ‚Ü‚·B“o˜^‚µ‚½•Ê–¼‚Í -mdn_converter_create ‚Ì -name ˆø”‚ÉŽw’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_aliasfile -
      -
      -mdn_result_t
      -mdn_converter_aliasfile(const char *path)
      -
      -

      ƒtƒ@ƒCƒ‹ path ‚ÅŽw’肳‚ê‚éƒtƒ@ƒCƒ‹‚ð“ǂݞ‚ÝA‚»‚Ì“à—e‚É -]‚Á‚ĕʖ¼‚ð“o˜^‚µ‚Ü‚·B -

      ƒtƒ@ƒCƒ‹ path ‚ÍŽŸ‚̂悤‚È’Pƒ‚ÈŒ`Ž®‚Ìs‚©‚ç‚È‚é -ƒeƒLƒXƒgƒtƒ@ƒCƒ‹‚Å‚·B -

      -    •Ê–¼    ³Ž®–¼
      -
      -

      ‚Ü‚½ #‚ÅŽn‚Ü‚és‚̓Rƒƒ“ƒg‚Ƃ݂Ȃ³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nofileA -mdn_invalid_syntaxA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_resetalias -
      -
      -mdn_result_t
      -mdn_converter_resetalias(void)
      -
      -

      mdn_converter_addalias -‚â mdn_converter_aliasfile -‚Å“o˜^‚µ‚½•Ê–¼‚ðƒŠƒZƒbƒg‚µA•Ê–¼‚ª‘S‚­“o˜^‚³‚ê‚Ä‚¢‚È‚¢‰Šúó‘Ô‚É -–ß‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_converter_register -
      -
      -mdn_result_t
      -mdn_converter_register(const char *name,
      -	mdn_converter_openproc_t open,
      -	mdn_converter_closeproc_t close,
      -	mdn_converter_convertproc_t convert,
      -	int ascii_compatible)
      -
      -

      name ‚Æ‚¢‚¤–¼‘O‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8‚Æ‚Ì -ŠÔ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‹@”\‚ð’ljÁ‚µ‚Ü‚·BopenAcloseA -convert ‚͕ϊ·“™‚̈—ŠÖ”‚ւ̃|ƒCƒ“ƒ^‚Å‚·B -ascii_compatible ‚ɂ͂±‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚È‚ç1‚ðA‚»‚¤‚łȂ¯‚ê‚Î0‚ðŽw’肵‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      debug ƒ‚ƒWƒ…[ƒ‹

      - -

      debug ƒ‚ƒWƒ…[ƒ‹‚̓fƒoƒbƒO—po—͂̂½‚߂̃†[ƒeƒBƒŠƒeƒBƒ‚ƒWƒ…[ƒ‹‚Å‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      -
      mdn_debug_hexstring -
      -
      -char *
      -mdn_debug_hexstring(const char *s, int maxbytes)
      -
      -

      •¶Žš—ñ s ‚ð16i”•\ަ‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -maxbytes ‚Í•\ަ‚·‚éÅ‘å‚Ì’·‚³‚ÅAs‚ª ‚±‚ê‚ð’´‚¦‚½ê‡‚É‚Í -ÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì -‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B -

      - -

      mdn_debug_xstring -
      -
      -char *
      -mdn_debug_xstring(const char *s, int maxbytes)
      -
      -

      •¶Žš—ñ s ‚Ì’†‚ÅAƒR[ƒh‚ª128ˆÈã‚Ì‚à‚Ì‚ð\x{HH}Œ`Ž®‚Å -•\ަ‚µ‚½•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -maxbytes ‚Í•\ަ‚·‚éÅ‘å‚Ì’·‚³‚ÅAs ‚ª‚±‚ê‚ð’´‚¦‚½ê‡‚É‚Í -ÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì -‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B -

      - -

      mdn_debug_hexdata -
      -
      -char *
      -mdn_debug_hexdata(const char *s, int length, int maxlength)
      -
      -

      ’·‚³ length ‚̃oƒCƒg—ñ s ‚ð16i•\ަ‚µ‚½•¶Žš—ñ‚ð -•Ô‚µ‚Ü‚·B -maxbytes ‚Í•\ަ‚·‚éÅ‘å‚̃oƒCƒg’·‚ÅA -length ‚ª‚±‚ê‚ð’´‚¦‚½ê‡‚É‚ÍÅŒã‚É ...‚ª’ljÁ‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é•¶Žš—ñ‚̃ƒ‚ƒŠ—̈æ‚Í–{ŠÖ”‚̕ێ‚·‚éƒXƒ^ƒeƒBƒbƒN•Ï”‚Ì -‚à‚Ì‚ÅA‚»‚Ì“à—e‚Í–{ŠÖ”‚ÌŽŸ‚̌ĂÑo‚µŽž‚܂ŗLŒø‚Å‚·B -

      - -

      mdn_debug_hexdump -
      -
      -void
      -mdn_debug_hexdump(const char *s, int length)
      -
      -

      ’·‚³ length ‚̃oƒCƒg—ñ s ‚Ì16iƒ_ƒ“ƒv‚ð -•W€ƒGƒ‰[o—͂ɕ\ަ‚µ‚Ü‚·B - -

      - -
      - -

      dn ƒ‚ƒWƒ…[ƒ‹

      - -

      dn ƒ‚ƒWƒ…[ƒ‹‚ÍADNS ƒƒbƒZ[ƒW“à‚̃hƒƒCƒ“–¼‚Ì“WŠJEˆ³k‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹ -‚Å‚·B‚±‚ê‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ìres_comp ‚¨‚æ‚Ñres_expand ‚É -‘Š“–‚·‚é‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B - -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚Í–{ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‘¼‚̃‚ƒWƒ…[ƒ‹‚©‚ç‚̂ݗ˜—p‚³‚ê‚邱‚Æ‚ð‘z’肵‚Ä -ÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B - -

      ƒhƒƒCƒ“–¼‚̈³k‚ÌÛ‚ÍAŽŸ‚ÉŽ¦‚·mdn__dn_t Œ^‚̃Rƒ“ƒeƒLƒXƒgî•ñ‚ð -Žg—p‚µ‚Ü‚·B -

      -
      -#define MDN_DN_NPTRS	64
      -typedef struct {
      -	const unsigned char *msg;
      -	int cur;
      -	int offset[MDN_DN_NPTRS];
      -} mdn__dn_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__dn_expand -
      -
      -mdn_result_t
      -mdn__dn_expand(const char *msg, size_t msglen,
      -	const char *compressed, char *expanded,
      -	size_t buflen, size_t *complenp)
      -
      -

      ’·‚³ msglen ‚ÌDNSƒƒbƒZ[ƒW msg ’†‚Ì -ˆ³k‚³‚ꂽƒhƒƒCƒ“–¼ compressed ‚ð“WŠJ‚µA -expanded ‚ÉŒ‹‰Ê‚ðŠi”[‚µ‚Ü‚·B -buflen ‚Í expanded ‚̑傫‚³‚Å‚·B -‚Ü‚½Acompressed ‚Ì’·‚³‚ª *complenp ‚ÉŠi”[‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_message -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__dn_initcompress -
      -
      -void
      -mdn__dn_initcompress(mdn__dn_t *ctx, const char *msg)
      -
      -

      ƒhƒƒCƒ“–¼ˆ³k—p‚̃Rƒ“ƒeƒLƒXƒgî•ñ ctx ‚ð‰Šú‰»‚µ‚Ü‚·B -‚±‚ÌŠÖ”‚Ímdn__dn_compress ‚ðŒÄ‚Ño‚·‘O‚É -•K‚¸ŒÄ‚Ño‚·•K—v‚ª‚ ‚è‚Ü‚·B -msg ‚͈³k‚µ‚½ƒhƒƒCƒ“–¼‚ðŠi”[‚·‚éDNSƒƒbƒZ[ƒW‚Ì -擪ƒAƒhƒŒƒX‚Å‚·B -

      - -

      mdn__dn_compress -
      -
      -mdn_result_t
      -mdn__dn_compress(const char *name, char *sptr, size_t length,
      -	mdn__dn_t *ctx, size_t *complenp)
      -
      -

      name ‚ÌŽw‚·ƒhƒƒCƒ“–¼‚ðˆ³k‚µ‚Ä sptr ‚ÌŽw‚· -ꊂɊi”[‚µ‚Ü‚·Blength ‚Í sptr ‚̋󂫗̈æ‚Ì’·‚³‚Å‚·B -ˆ³k‚ÌÛ‚ÍActx ‚É“ü‚Á‚Ä‚¢‚éˆÈ‘O‚Ɉ³k‚µ‚½ƒhƒƒCƒ“–¼‚Ìî•ñ‚ª -ŽQÆ‚³‚ê‚Ü‚·B -ˆ³k‚µ‚½ƒhƒƒCƒ“–¼‚Ì’·‚³‚ª complenp ‚É“ü‚ê‚ç‚ê‚邯‚Æ‚à‚ÉA -ˆ³k‚É•K—v‚Èî•ñ‚ª ctx ‚ɒljÁ‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_name -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      lace ƒ‚ƒWƒ…[ƒ‹

      - -

      lace ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é - -LACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚Ì -‰ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñB -converter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚Ä -LACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__lace_open -
      -
      -mdn_result_t
      -mdn__lace_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__lace_close -
      -
      -mdn_result_t
      -mdn__lace_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__lace_convert -
      -
      -mdn_result_t
      -mdn__lace_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      LACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B -“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -dir ‚ªmdn_converter_l2u‚È‚ç -LACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l -‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çLACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      localencoding ƒ‚ƒWƒ…[ƒ‹

      - -

      localencoding ƒ‚ƒWƒ…[ƒ‹‚̓ƒP[ƒ‹î•ñ‚ð—˜—p‚µ‚ÄA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð„‘ª‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_localencoding_name -
      -
      -const char *
      -mdn_localencoding_name(void)
      -
      -

      Œ»Ý‚̃ƒP[ƒ‹î•ñ‚ðŒ³‚ÉAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚µ‚Ä‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ -(mdn_converter_create() ‚É“n‚· -–¼‘O) ‚ð„‘ª‚µ‚ĕԂµ‚Ü‚·B -

      „‘ª‚ÍAƒVƒXƒeƒ€‚ªnl_langinfo() ‚ð”õ‚¦‚Ä‚¢‚ê‚΂»‚ê‚ð—˜—p‚µA -‚»‚¤‚łȂ¯‚ê‚Îsetlocale() ‚âŠÂ‹«•Ï”‚Ìî•ñ‚©‚çs‚í‚ê‚Ü‚·B -ŒãŽÒ‚Ìꇂɂ͕K‚¸‚µ‚ೂµ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ª“¾‚ç‚ê‚邯‚ÍŒÀ‚è‚Ü‚¹‚ñB -

      ƒƒP[ƒ‹î•ñ‚©‚糂µ‚¢„‘ª‚ª‚Å‚«‚È‚¢ê‡A‚à‚µ‚­‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ª -ƒƒP[ƒ‹‚ƈقȂéƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð—p‚¢‚Ä“®ì‚µ‚Ä‚¢‚éꇂ̂½‚ß‚ÉA -‚à‚µŠÂ‹«•Ï” MDN_LOCAL_CODESET ‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA -‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃ƒP[ƒ‹‚ÉŠÖ‚í‚炸A‚»‚̕ϔ‚Ì’l‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚Ä -•Ô‚·‚悤‚ɂȂÁ‚Ä‚¢‚Ü‚·B - -

      - -
      - -

      log ƒ‚ƒWƒ…[ƒ‹

      - -

      log ƒ‚ƒWƒ…[ƒ‹‚ÍMDN ƒ‰ƒCƒuƒ‰ƒŠ‚̃ƒO‚Ìo—͈—‚ð§Œä‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -ƒƒO‚̓fƒtƒHƒ‹ƒg‚ł͕W€ƒGƒ‰[o—͂ɑ‚«o‚³‚ê‚Ü‚·‚ªAƒnƒ“ƒhƒ‰‚ð“o˜^‚·‚é -‚±‚Æ‚ÅA•Ê‚Ìo—Í•û–@‚É•ÏX‚·‚邱‚Æ‚à‰Â”\‚Å‚·B -

      ‚Ü‚½ƒƒOƒŒƒxƒ‹‚ðÝ’è‚·‚邱‚Æ‚à‰Â”\‚Å‚·BƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì5’iŠK‚ª -’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -enum {
      -	mdn_log_level_fatal   = 0,
      -	mdn_log_level_error   = 1,
      -	mdn_log_level_warning = 2,
      -	mdn_log_level_info    = 3,
      -	mdn_log_level_trace   = 4,
      -	mdn_log_level_dump    = 5
      -};
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_log_fatal -
      -
      -void
      -mdn_log_fatal(const char *fmt, ...)
      -
      -

      fatal ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍAƒvƒƒOƒ‰ƒ€‚ÌŽÀs‚ª -•s‰Â”\‚Å‚ ‚邿‚¤‚È’v–½“I‚ȃGƒ‰[‚ÌÛ‚É—p‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_error -
      -
      -void
      -mdn_log_error(const char *fmt, ...)
      -
      -

      error ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍA -’v–½“I‚ł͂Ȃ¢ƒGƒ‰[‚ÌÛ‚É—p‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_warning -
      -
      -void
      -mdn_log_warning(const char *fmt, ...)
      -
      -

      warning ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍŒxƒƒbƒZ[ƒW‚ð -•\ަ‚·‚邽‚߂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_info -
      -
      -void
      -mdn_log_info(const char *fmt, ...)
      -
      -

      info ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚̓Gƒ‰[‚ł͂Ȃ­A -—L—p‚ÆŽv‚í‚ê‚éî•ñ‚ðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_trace -
      -
      -void
      -mdn_log_trace(const char *fmt, ...)
      -
      -

      trace ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚ÍAPIŠÖ”‚̃gƒŒ[ƒX -î•ñ‚ðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·Bˆê”ʂɃ‰ƒCƒuƒ‰ƒŠ‚̃fƒoƒbƒO–Ú“IˆÈŠO‚Å -‚±‚̃Œƒxƒ‹‚̃ƒO‚ð‹L˜^‚·‚é•K—v‚͂Ȃ¢‚Å‚µ‚傤B -ˆø”‚Íprintf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_dump -
      -
      -void
      -mdn_log_dump(const char *fmt, ...)
      -
      -

      dump ƒŒƒxƒ‹‚̃ƒO‚ðo—Í‚µ‚Ü‚·B‚±‚̃Œƒxƒ‹‚Í‚³‚ç‚ɃfƒoƒbƒO—p‚Ì -ƒpƒPƒbƒgƒf[ƒ^ƒ_ƒ“ƒv‚Ȃǂðo—Í‚·‚é‚̂ɗp‚¢‚ç‚ê‚Ü‚·B -ˆê”ʂɃ‰ƒCƒuƒ‰ƒŠ‚̃fƒoƒbƒO–Ú“IˆÈŠO‚Å‚±‚̃Œƒxƒ‹‚̃ƒO‚ð‹L˜^‚·‚é -•K—v‚͂Ȃ¢‚Å‚µ‚傤B -ˆø”‚Í printf ‚Æ“¯‚¶Œ`Ž®‚ÅŽw’肵‚Ü‚·B -

      - -

      mdn_log_setlevel -
      -
      -void
      -mdn_log_setlevel(int level)
      -
      -

      ƒƒOo—͂̃Œƒxƒ‹‚ðݒ肵‚Ü‚·Bݒ肵‚½ƒŒƒxƒ‹‚ð’´‚¦‚郌ƒxƒ‹‚Ì -ƒƒO‚Ío—Í‚³‚ê‚Ü‚¹‚ñB‚±‚ÌŠÖ”‚ŃƒOƒŒƒxƒ‹‚ðݒ肵‚È‚¢ê‡A -ŠÂ‹«•Ï” MDN_LOG_LEVEL ‚Éݒ肳‚ꂽ®”’l‚ªŽg—p‚³‚ê‚Ü‚·B -

      - -

      mdn_log_getlevel -
      -
      -int
      -mdn_log_getlevel(void)
      -
      -

      Œ»Ý‚̃ƒOo—͂̃Œƒxƒ‹‚ð•\‚·®”’l‚ðŽæ“¾‚µ‚ĕԂµ‚Ü‚·B -

      - -

      mdn_log_setproc -
      -
      -void
      -mdn_log_setproc(mdn_log_proc_t proc)
      -
      -

      ƒƒO‚Ìo—̓nƒ“ƒhƒ‰‚ðݒ肵‚Ü‚·Bproc ‚̓nƒ“ƒhƒ‰ŠÖ”‚Ö‚Ì -ƒ|ƒCƒ“ƒ^‚Å‚·B‚à‚µƒnƒ“ƒhƒ‰‚ðŽw’肵‚È‚¢ê‡A‚ ‚é‚¢‚Í proc ‚É -NULL ‚ðŽw’肵‚½ê‡‚É‚ÍAƒƒO‚Í•W€ƒGƒ‰[o—Í‚Éo—Í‚³‚ê‚Ü‚·B -

      ƒnƒ“ƒhƒ‰‚ÌŒ^ mdn_log_proc_t ‚ÍŽŸ‚̂悤‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -typedef void  (*mdn_log_proc_t)(int level, const char *msg);
      -
      -
      -level ‚ɂ̓ƒO‚̃Œƒxƒ‹‚ªA‚Ü‚½ msg ‚ɂ͕\ަ‚·‚ׂ« -ƒƒbƒZ[ƒW•¶Žš—ñ‚ª“n‚³‚ê‚Ü‚·B - -
      - -
      - -

      msgheader ƒ‚ƒWƒ…[ƒ‹

      - -

      msgheader ƒ‚ƒWƒ…[ƒ‹‚ÍDNS ƒƒbƒZ[ƒW‚̃wƒbƒ_‚̉ðÍA‚¨‚æ‚Ñ‘g‚Ý—§‚Ä‚ð -s‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -

      ‰ðÍ‚³‚ꂽƒwƒbƒ_î•ñ‚ÍAŽŸ‚ÉŽ¦‚·\‘¢‘̂ɓü‚è‚Ü‚·BŠeƒtƒB[ƒ‹ƒh‚Í -DNS ƒƒbƒZ[ƒWƒwƒbƒ_‚̃tƒB[ƒ‹ƒh‚É‚»‚̂܂ܑΉž‚µ‚Ä‚¢‚é‚Ì‚ÅAà–¾‚ÍÈ—ª‚µ‚Ü‚·B -

      -
      -typedef struct mdn_msgheader {
      -	unsigned int id;
      -	int qr;
      -	int opcode;
      -	int flags;
      -	int rcode;
      -	unsigned int qdcount;
      -	unsigned int ancount;
      -	unsigned int nscount;
      -	unsigned int arcount;
      -} mdn_msgheader_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_msgheader_parse -
      -
      -mdn_result_t
      -mdn_msgheader_parse(const char *msg, size_t msglen,
      -	mdn_msgheader_t *parsed)
      -
      -

      msg ‚Æ msglen ‚ÅŽ¦‚³‚ê‚éDNSƒƒbƒZ[ƒW‚̃wƒbƒ_‚ð -‰ðÍ‚µAparsed ‚ªŽ¦‚·\‘¢‘̂Ɋi”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_message -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_msgheader_unparse -
      -
      -mdn_result_t
      -mdn_msgheader_unparse(mdn_msgheader_t *parsed,
      -	char *msg, size_t msglen)
      -
      -

      ‚±‚ÌŠÖ”‚Ímdn_msgheader_parse ‚Ì -‹t‚̈—‚ðs‚¢‚Ü‚·B‚‚܂èAparsed ‚ÅŽw’肳‚ꂽ\‘¢‘̂̃f[ƒ^‚©‚ç -DNSƒƒbƒZ[ƒW‚̃wƒbƒ_‚ð\¬‚µAmsg ‚Æ msglen ‚Å -ަ‚³‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_msgheader_getid -
      -
      -unsigned int
      -mdn_msgheader_getid(const char *msg)
      -
      -

      msg ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚©‚ç ID ‚ðŽæ‚èo‚µ‚ĕԂµ‚Ü‚·B -‚±‚ÌŠÖ”‚̓wƒbƒ_‘S‘Ì‚ð‰ðÍ‚¹‚¸‚ÉID‚¾‚¯Žæ‚èo‚µ‚½‚¢‚Æ‚«‚ɕ֗˜‚Å‚·B -‚±‚ÌŠÖ”‚ÍAmsg ‚ÌŽw‚·ƒf[ƒ^‚ªDNSƒƒbƒZ[ƒW‚̃wƒbƒ_’·ˆÈã‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚Ü‚·‚Ì‚ÅA•K‚¸ŒÄ‚Ño‚µ‘¤‚ÅŠm”F‚µ‚Ä‚©‚çŒÄ‚Ño‚·‚悤‚É -‚µ‚Ä‚­‚¾‚³‚¢B -

      - -

      mdn_msgheader_setid -
      -
      -void
      -mdn_msgheader_setid(char *msg, unsigned int id)
      -
      -

      msg ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚É id ‚ÅŽw’肳‚ê‚é -ID ‚ðݒ肵‚Ü‚·B -‚±‚ÌŠÖ”‚à msg ‚ÌŽw‚·ƒf[ƒ^‚ªDNSƒƒbƒZ[ƒW‚̃wƒbƒ_’·ˆÈã‚ ‚é -‚±‚Æ‚ð‰¼’è‚µ‚Ä‚¢‚Ü‚·‚Ì‚ÅA•K‚¸ŒÄ‚Ño‚µ‘¤‚ÅŠm”F‚µ‚Ä‚©‚çŒÄ‚Ño‚·‚悤‚É -‚µ‚Ä‚­‚¾‚³‚¢B - -

      - -
      - -

      msgtrans ƒ‚ƒWƒ…[ƒ‹

      - -

      msgtrans ƒ‚ƒWƒ…[ƒ‹‚ÍDNS ƒvƒƒLƒVƒT[ƒo‚Å‚Ì DNS ƒƒbƒZ[ƒW‚̕ϊ·ˆ—‚Ì -‘å•”•ª‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚ȂǑ¼‚Ì‘½‚­‚̃‚ƒWƒ…[ƒ‹‚ð -‚ÌãˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B - -

      DNSƒvƒƒLƒVƒT[ƒo‚É‚¨‚¯‚郃bƒZ[ƒW•ÏŠ·ˆ—‚Í‚¨‚æ‚»ŽŸ‚̂悤‚È‚à‚̂ł·B -

      ‚Ü‚¸ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çDNSƒT[ƒo‚ւ̃ƒbƒZ[ƒW‚̕ϊ·‚Ìꇂ͎Ÿ‚Ì -‚悤‚ɂȂè‚Ü‚·B -

        -
      1. ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çŽóM‚µ‚½ƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚ð‰ðÍ‚µA - ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚Ì ZLD ‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚𔻒肵‚Ü‚·B -
      2. ”»’茋‰Ê‚ð—p‚¢‚ÄAƒhƒƒCƒ“–¼‚©‚çZLD‚𜋎‚µAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðUTF-8‚É - •ÏŠ·‚µ‚Ü‚·B -
      3. ³‹K‰»ˆ—‚ðs‚¢‚Ü‚·B -
      4. ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð UTF-8‚©‚çDNSƒT[ƒo‘¤‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µAZLD‚ð•t‰Á‚µ‚Ü‚·B -
      5. ˆÈã‚̈—‚ðƒƒbƒZ[ƒW‚Ɋ܂܂ê‚é‚·‚ׂẴhƒƒCƒ“–¼‚ɑ΂µ‚Äs‚¢A - •ÏŠ·Œ‹‰Ê‚ðÄ‚Ñ DNS ƒƒbƒZ[ƒWŒ`Ž®‚É‚Ü‚Æ‚ß‚Ä DNS ƒT[ƒo‚É‘—M‚µ‚Ü‚·B -
      - -

      ŽŸ‚ÉDNSƒT[ƒo‚©‚çƒNƒ‰ƒCƒAƒ“ƒg‚ւ̃ƒbƒZ[ƒW‚̕ϊ·‚Ìꇂ͎Ÿ‚Ì -‚悤‚ɂȂè‚Ü‚·B -

        -
      1. DNSƒT[ƒo‚©‚çŽóM‚µ‚½ƒŠƒvƒ‰ƒCƒƒbƒZ[ƒW‚ð‰ðÍ‚µA - ŠÜ‚Ü‚ê‚Ä‚¢‚é‚·‚ׂẴhƒƒCƒ“–¼‚ɑ΂µ‚ÄAZLD‚Ìœ‹ŽAUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO - ‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B -
      2. ‚³‚ç‚ɃNƒ‰ƒCƒAƒ“ƒg‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAZLD‚ð•t‰Á‚µ‚Ü‚·B -
      3. •ÏŠ·Œ‹‰Ê‚ðÄ‚Ñ DNS ƒƒbƒZ[ƒWŒ`Ž®‚ɂ܂Ƃ߂ăNƒ‰ƒCƒAƒ“ƒg‚É‘—M‚µ‚Ü‚·B -
      - -

      ‚±‚̂悤‚ÉADNSƒƒbƒZ[ƒW‚̕ϊ·‚ÉÛ‚µ‚Ä‚ÍA -ƒNƒ‰ƒCƒAƒ“ƒgEƒT[ƒo‘¤‚ÌZLDAƒGƒ“ƒR[ƒfƒBƒ“ƒO“™ -‚¢‚ë‚¢‚ë‚ȃpƒ‰ƒ[ƒ^‚ª•K—v‚ƂȂè‚Ü‚·BAPIŠÖ”‚É‚±‚ê‚ç‚ðŽw’è‚·‚éÛA -‚»‚ꂼ‚ê‚ð•ÊX‚̈ø”‚ÅŽw’è‚·‚é‚͔̂ώG‚Ȃ̂ÅAŽŸ‚̂悤‚È\‘¢‘Ì‚ð -—p‚¢‚Ă܂Ƃ߂ēn‚·‚悤‚É‚µ‚Ä‚ ‚è‚Ü‚·B -

      -
      -typedef struct mdn_msgtrans_param {
      -	int use_local_rule;
      -	mdn_zldrule_t local_rule;
      -	mdn_converter_t local_converter;
      -	mdn_converter_t local_alt_converter;
      -	char *local_zld;
      -	mdn_converter_t target_converter;
      -	mdn_converter_t target_alt_converter;
      -	char *target_zld;
      -	mdn_normalizer_t normalizer;
      -} mdn_msgtrans_param_t;
      -
      -
      -

      use_local_rule‚ÍA“ü—Í‘¤‚̃ƒbƒZ[ƒW‚ÌZLD‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -”»’è•û–@‚ðŽw’肵‚Ü‚·B -

      ‚à‚µ’l‚ª^‚È‚ç‚ÎA‚±‚ê‚ç‚Ílocal_rule‚Å -Žw’肳‚ê‚éZLD‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌW‡‚ƃƒbƒZ[ƒW‚Ɋ܂܂ê‚éƒhƒƒCƒ“–¼‚Ì -ƒ}ƒbƒ`ƒ“ƒOˆ—‚ðs‚¢Aƒ}ƒbƒ`‚µ‚½‚à‚Ì‚ªŽg‚í‚ê‚Ü‚·B -‚±‚ê‚̓Nƒ‰ƒCƒAƒ“ƒg‚©‚çDNSƒT[ƒo‚Ö‚ÌƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚̕ϊ·‚ÌÛ‚É -—p‚¢‚ç‚ê‚Ü‚·B -‚±‚Ìê‡A”»’茋‰Ê‚ªlocal_converter‚Ælocal_zld‚É -‘ã“ü‚³‚ê‚Ü‚·B -

      ˆê•ûAlocal_rule‚ª‹U‚È‚ç‚ÎZLD‚¨‚æ‚уGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -local_converter‚Ælocal_zld‚ÅŽw’肳‚ê‚é‚à‚Ì‚ª‚»‚Ì‚Ü‚Ü -Žg—p‚³‚ê‚Ü‚·B -‚±‚ê‚ÍDNSƒT[ƒo‚©‚çƒNƒ‰ƒCƒAƒ“ƒg‚Ö‚ÌƒŠƒNƒGƒXƒgƒƒbƒZ[ƒW‚̕ϊ·‚ÌÛ‚É -—p‚¢‚ç‚ê‚Ü‚·B -‚±‚Ìê‡local_rule‚Ì’l‚ÍŽg—p‚³‚ê‚Ü‚¹‚ñB -use_local_rule ‚Ì’l‚ÉŠÖ‚í‚炸Alocal_alt_converter ‚Í -“ü—Í‘¤ƒƒbƒZ[ƒW‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ÄŽg—p‚³‚ê‚Ü‚·B -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª‚È‚¢ê‡‚É‚Í NULL ‚ðŽw’肵‚Ü‚·B -

      target_converter‚Ætarget_zld‚Åo—Í‘¤‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÆZLD‚ðŽw’肵‚Ü‚·B -target_alt_converter‚ÍAtarget_converter‚É‚æ‚é -o—Í‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªA•ÏŠ·‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚É -o—Í‘¤‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ªŠÜ‚Ü‚ê‚Ä‚¢‚½‚½‚߂Ɏ¸”s‚µ‚½ê‡‚ÉA -target_converter‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚Ü‚·B -‚È‚¨ local_alt_converter ‚Æ target_alt_converter -‚ɑΉž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í‚¢‚¸‚ê‚à -ASCII ŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      normalizer‚ͳ‹K‰»•ûŽ®‚ðŽw’肵‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      -
      mdn_msgtrans_translate -
      -
      -mdn_result_t
      -mdn_msgtrans_translate(mdn_msgtrans_param_t *param,
      -	const char *msg, size_t msglen,
      -	char *outbuf, size_t outbufsize,
      -	size_t *outmsglenp)
      -
      -

      msg ‚¨‚æ‚Ñ msglen ‚ÅŽw’肳‚ê‚éDNSƒƒbƒZ[ƒW‚ð -•ÏŠ·ƒpƒ‰ƒ[ƒ^ param ‚É‚µ‚½‚ª‚Á‚ĕϊ·‚µAŒ‹‰Ê‚ð -outbuf ‚¨‚æ‚Ñ outbufsize ‚ÅŽ¦‚³‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B -outmsglenp ‚ɂ͕ϊ·Œ‹‰Ê‚̃ƒbƒZ[ƒW’·‚ªŠi”[‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_messageA -mdn_invalid_encodingA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      normalizer ƒ‚ƒWƒ…[ƒ‹

      - -

      normalizer ƒ‚ƒWƒ…[ƒ‹‚Í•¶Žš—ñ‚̳‹K‰»‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -³‹K‰»‚Ì•ûŽ®‚Æ‚µ‚Ă͌»ÝŽŸ‚Ì‚à‚Ì‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -‚Ü‚½•Ê‚ÌV‚½‚ȳ‹K‰»•ûŽ®‚ð’ljÁ“o˜^‚·‚邽‚ß‚ÌAPI‚à—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B -

        -
      • ascii-uppercase
        - ASCII ‚̬•¶Žš‚©‚ç‘å•¶Žš‚ւ̕ϊ· -
      • ascii-lowercase
        - ASCII ‚Ì‘å•¶Žš‚©‚笕¶Žš‚ւ̕ϊ· -
      • unicode-uppercase
        - Unicode ‚Ì•¶Žš‘®«‚ð‹K’肵‚½ - Case Mappings - ‚É‹Lq‚³‚ê‚Ä‚¢‚鬕¶Žš‘å•¶Žšƒ}ƒbƒsƒ“ƒO‚É]‚Á‚½¬•¶Žš‚©‚ç‘å•¶Žš‚ւ̕ϊ· -
      • unicode-lowercase
        - ã‹L‚Æ“¯‚¶•¶‘‚É‚µ‚½‚ª‚Á‚½‘å•¶Žš‚©‚笕¶Žš‚ւ̕ϊ· -
      • unicode-form-c
        - Unicode ‚̳‹K‰»•ûŽ®‚ð‹K’肵‚½ - Unicode Normalization Forms - ‚É‹Lq‚³‚ê‚Ä‚¢‚éNormaliztion form C ‚É]‚¤³‹K‰» -
      • unicode-form-kc
        - “¯•¶‘‚É‹Lq‚³‚ê‚Ä‚¢‚é Unicode Normalization Form KC ‚É - ]‚¤³‹K‰» -
      • ja-kana-fullwidth
        - “ú–{Œê‚Ì”¼Šp‚©‚È‚©‚ç‘SŠpƒJƒ^ƒJƒi‚ւ̕ϊ· -
      • ja-fullwidth
        - ja-kana-fullwidth ‚Æ“¯‚¶B - ‚±‚ê‚͈ȑO‚̃o[ƒWƒ‡ƒ“‚Ƃ̌݊·«‚Ì‚½‚߂Ɏc‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ÅA - «—ˆ‚̃o[ƒWƒ‡ƒ“‚ł͂Ȃ­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·Bja-kana-fullwidth - ‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B -
      • ja-alnum-halfwidth
        - “ú–{Œê‚Ì‘SŠp‰p”Žš‚¨‚æ‚Ñ‘SŠpƒ}ƒCƒiƒX‹L†‚𔼊p•¶Žš‚ɕϊ· -
      • ja-compose-voiced-sound
        - “ú–{Œê‚Ì‘SŠp‚©‚ȂƂ»‚ê‚É‘±‚­‘÷“_(J)”¼‘÷“_(K)‚ð - ‘÷“_E”¼‘÷“_‚‚«‚Ì‚©‚È1•¶Žš‚ɕϊ· -
      • ja-minus-hack
        - “ú–{Œê‚Ì‘SŠpƒ}ƒCƒiƒX‹L†(|)‚©‚çƒnƒCƒtƒ“(-)‚ւ̕ϊ· -
      • ja-delimiter-hack
        - ‹å“_(B)‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh(D)‚©‚çƒsƒŠƒIƒh(.)‚ւ̕ϊ· -
      -

      ÅŒã‚Ìja-delimiter-hack‚Í‹å“_‚¨‚æ‚Ñ‘SŠpƒsƒŠƒIƒh‚ð -ƒhƒƒCƒ“–¼‚̃ZƒpƒŒ[ƒ^‚Å‚ ‚éƒsƒŠƒIƒh‚ÆŒ©‚È‚·‚悤‚É‚·‚é‚à‚Ì‚ÅA -‚±‚ê‚Í–{—ˆ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃†[ƒU“ü—Í‚ÌÛ‚ÌŽèŠÔ‚¨‚æ‚ъԈႢ‚ðŒyŒ¸‚·‚邽‚ß‚É -—pˆÓ‚³‚ꂽ‚à‚̂ł·‚ªAƒuƒ‰ƒEƒU‚É‚æ‚Á‚Ă̓sƒŠƒIƒh‚̂Ȃ¢ƒhƒƒCƒ“–¼‚ª -ƒhƒƒCƒ“–¼‚ł͂Ȃ­ƒL[ƒ[ƒh‚Æ”Fޝ‚³‚ê‚Ä‚µ‚Ü‚¤‚Ȃǂ̖â‘肪‚ ‚èA -‚Ü‚½‚±‚ê‚̓hƒƒCƒ“–¼‚̳‹K‰»‚͈̔͂ðˆí’E‚µ‚Ä‚¢‚邯‚àl‚¦‚ç‚ê‚é‚Ì‚ÅA -‚Å‚«‚邾‚¯‚±‚̳‹K‰»•ûŽ®‚ÌŽg—p‚Í”ð‚¯‚é‚ׂ«‚Å‚·B - -

      ³‹K‰»•ûŽ®‚Í•¡”•¹—p‚·‚邱‚Æ‚à‰Â”\‚ÅA‚±‚Ìꇎw’肵‚½‡‚É“K—p‚³‚ê‚Ü‚·B - -

      normalizer ƒ‚ƒWƒ…[ƒ‹‚Íu³‹K‰»ƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -³‹K‰»‚ðs‚¤‚Éæ—§‚Á‚Ă܂¸³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð쬂µAŽg—p‚·‚é -³‹K‰»•ûŽ®‚ðƒRƒ“ƒeƒLƒXƒg‚É“o˜^‚µ‚Ä‚¨‚«‚Ü‚·B -ŽÀۂ̳‹K‰»ˆ—‚Ìۂɂͳ‹K‰»•ûŽ®‚ł͂Ȃ­A -‚±‚̳‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ðŽw’肵‚Ü‚·B -³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í -mdn_normalizer_t Œ^‚Å‚ ‚èA -ŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -typedef struct mdn_normalizer *mdn_normalizer_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_normalizer_initialize -
      -
      -mdn_result_t
      -mdn_normalizer_initialize(void)
      -
      -

      ƒ‚ƒWƒ…[ƒ‹‚̉Šú‰»ˆ—‚ðs‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É - •K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_normalizer_create -
      -
      -mdn_result_t
      -mdn_normalizer_create(mdn_normalizer_t *ctxp)
      -
      -

      ³‹K‰»—p‚Ì‹ó‚̃Rƒ“ƒeƒLƒXƒg‚ð쬂µActxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B -•Ô‚³‚ê‚éƒRƒ“ƒeƒLƒXƒg‚Í‹ó‚ÅA³‹K‰»•ûŽ®‚͈ê‚‚àŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB -³‹K‰»•ûŽ®‚ð’ljÁ‚·‚é‚É‚Í -mdn_normalizer_add ‚ð—p‚¢‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_normalizer_destroy -
      -
      -void
      -mdn_normalizer_destroy(mdn_normalizer_t ctx)
      -
      -

      mdn_normalizer_create ‚Å -쬂µ‚½³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð휂µAƒAƒƒP[ƒg‚³‚ꂽƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B -

      - -

      mdn_normalizer_add -
      -
      -mdn_result_t
      -mdn_normalizer_add(mdn_normalizer_t ctx, const char *scheme_name)
      -
      -

      mdn_normalizer_create ‚Å -쬂µ‚½³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ÉAscheme_name ‚ÅŽw’肳‚ê‚é -³‹K‰»•ûŽ®‚ð’ljÁ‚µ‚Ü‚·Bˆê‚‚̃Rƒ“ƒeƒLƒXƒg‚É•¡”‚̳‹K‰»•ûŽ®‚ð -’ljÁ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_nameA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_normalizer_normalize -
      -
      -mdn_result_t
      -mdn_normalizer_normalize(mdn_normalizer_t ctx,
      -	const char *from, char *to, size_t tolen)
      -
      -

      UTF-8 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚É ctx ‚Å -Žw’肳‚ê‚鳋K‰»•ûŽ®‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð to ‚Æ tolen ‚Å -Žw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -ctx ‚É•¡”‚̳‹K‰»•ûŽ®‚ªŠÜ‚Ü‚ê‚Ä‚¢‚éê‡A‚»‚ê‚炪 -mdn_normalizer_add ‚ŒljÁ‚µ‚½‡”Ô‚É -“K—p‚³‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_normalizer_register -
      -
      -mdn_result_t
      -mdn_normalizer_register(const char *scheme_name,
      -	mdn_normalizer_proc_t proc)
      -
      -

      V‚µ‚¢³‹K‰»•ûŽ®‚ð scheme_name ‚Æ‚¢‚¤–¼‘O‚Å“o˜^‚µ‚Ü‚·B -proc ‚Í‚»‚̳‹K‰»•ûŽ®‚̈—ŠÖ”‚ւ̃|ƒCƒ“ƒ^‚Å‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      race ƒ‚ƒWƒ…[ƒ‹

      - -

      race ƒ‚ƒWƒ…[ƒ‹‚ÍA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é -RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÆUTF-8‚Ƃ̊Ԃ̕ϊ·‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B‚±‚̃‚ƒWƒ…[ƒ‹‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚̉ºˆÊƒ‚ƒWƒ…[ƒ‹‚Æ‚µ‚ÄŽÀ‘•‚³‚ê‚Ä‚¨‚èA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ª‚±‚̃‚ƒWƒ…[ƒ‹‚ð’¼ÚŒÄ‚Ño‚·‚±‚Ƃ͂ ‚è‚Ü‚¹‚ñB -converter ƒ‚ƒWƒ…[ƒ‹‚ɑ΂µ‚Ä RACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Ƃ̕ϊ·‚ð—v‹‚·‚邯A‚±‚̃‚ƒWƒ…[ƒ‹‚ªŠÔÚ“I‚ɌĂÑo‚³‚ê‚邱‚ƂɂȂè‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__race_open -
      -
      -mdn_result_t
      -mdn__race_open(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒI[ƒvƒ“‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__race_close -
      -
      -mdn_result_t
      -mdn__race_close(mdn_converter_t ctx, mdn_converter_dir_t dir)
      -
      -

      RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̕ϊ·‚ðƒNƒ[ƒY‚µ‚Ü‚·BŽÀۂɂ͉½‚à‚µ‚Ü‚¹‚ñB -

      í‚É mdn_success‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__race_convert -
      -
      -mdn_result_t
      -mdn__race_convert(mdn_converter_t ctx, mdn_converter_dir_t dir,
      -	const char *from, char *to, size_t tolen)
      -
      -

      RACEƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÆUTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚Ì‘ŠŒÝ•ÏŠ·‚ð -s‚¢‚Ü‚·B -“ü—Í•¶Žš—ñ from ‚ð•ÏŠ·‚µAŒ‹‰Ê‚ð to ‚Æ -tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -dir ‚ªmdn_converter_l2u‚È‚ç -RACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÖAmdn_converter_u2l -‚È‚çUTF-8ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ƂȂè‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      res ƒ‚ƒWƒ…[ƒ‹

      - -

      res ƒ‚ƒWƒ…[ƒ‹‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤ (ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“) -‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—A‚‚܂èƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚â -³‹K‰»‚ðs‚¤Û‚Ì‚ƒŒƒxƒ‹ API ‚ð’ñ‹Ÿ‚µ‚Ü‚·B -‚±‚̃‚ƒWƒ…[ƒ‹‚Í‚ ‚Æ‚Åà–¾‚·‚é resconf ƒ‚ƒWƒ…[ƒ‹ -‚ƂƂà‚É—p‚¢‚邱‚Æ‚ð‘O’ñ‚ÉÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B - -

      ‚±‚ê‚ç‚̃‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚é API ‚ðŽg—p‚·‚ê‚ÎA -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚Ȃǂ̊֔‚ð’¼Ú -ŒÄ‚Ño‚·•K—v‚Í‚ ‚è‚Ü‚¹‚ñB - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      -
      mdn_res_localtoucs -
      -
      -mdn_result_t
      -mdn_res_localtoucs(mdn_resconf_t conf, const char *local_name,
      -	char *ucs_name, size_t ucs_name_len)
      -
      -

      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽ -ƒhƒƒCƒ“–¼•¶Žš—ñ local_name ‚ð UTF-8 ‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð -ucs_name ‚ÉŠi”[‚µ‚Ü‚·Bucs_name_len ‚Å -‚ ‚ç‚©‚¶‚ß ucs_name ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B - -

      conf ‚Í resconf ƒ‚ƒWƒ…[ƒ‹ ‚̕Ԃ· -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚Å‚·B‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Î -•ÏŠ·‚Ís‚í‚ꂸAlocal_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name -‚ɃRƒs[‚³‚ê‚Ü‚·B - -

      ƒhƒƒCƒ“–¼ local_name ‚ª]—ˆ‚Ì ASCII ƒhƒƒCƒ“–¼‚Æ‚µ‚Ä -³‚µ‚­ (‚‚܂è‰p”Žš‚¨‚æ‚уnƒCƒtƒ“‚ƃsƒŠƒIƒh‚©‚ç\¬‚³‚ê‚é)A‚©‚ -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ªÝ’肳‚ê‚Ä‚¢‚éê‡Aƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ă̕ϊ·‚ðs‚¤‘O‚É -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚̕ϊ·‚ðŽŽ‚ÝAޏ”s‚µ‚½ê‡‚É -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ÄA -mdn_res_ucstolocal ‚ª -—^‚¦‚ç‚ꂽƒhƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚Å‚«‚¸ -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚½ê‡‚Å‚àA‚»‚ê‚ð–{ŠÖ”‚É—^‚¦‚ê‚Î -³‚µ‚¢ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̃hƒƒCƒ“–¼‚ª“¾‚ç‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -

      mdn_res_ucstolocal -
      -
      -mdn_result_t
      -mdn_res_ucstolocal(mdn_resconf_t conf, const char *ucs_name,
      -	char *local_name, size_t local_name_len)
      -
      -

      mdn_res_localtoucs ‚Ì -‹t‚̕ϊ·A‚‚܂è UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼•¶Žš—ñ ucs_name -‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽg—p‚·‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð -local_name ‚ÉŠi”[‚µ‚Ü‚·Blocal_name_len ‚Å -‚ ‚ç‚©‚¶‚ß local_name ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B - -

      conf ‚Í resconf ƒ‚ƒWƒ…[ƒ‹ ‚̕Ԃ· -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚Å‚·B‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Î -•ÏŠ·‚Ís‚í‚ꂸAlocal_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name -‚ɃRƒs[‚³‚ê‚Ü‚·B - -

      ‚à‚µƒhƒƒCƒ“–¼ ucs_name ‚Ì’†‚Ƀ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì -•¶ŽšW‡‚ɂȂ¢•¶Žš‚ª‚ ‚Á‚ĕϊ·‚ÉŽ¸”s‚µ‚½ê‡AƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg -conf ‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªÝ’肳‚ê‚Ä‚¢‚ê‚ÎA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚É‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªs‚í‚ê‚Ü‚·B -‚±‚ê‚É‚æ‚èA‚½‚Æ‚¦ DNS ƒT[ƒo‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ɋ܂܂ê‚È‚¢•¶Žš‚ð -ŠÜ‚ÞƒhƒƒCƒ“–¼‚ª•Ô‚³‚ꂽꇂɂàƒGƒ‰[‚ƂȂ炸‚ɕϊ·‚ªs‚í‚ê‚Ü‚·B -‚È‚¨A‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚³‚ꂽ•¶Žš—ñ‚Í -mdn_res_localtoucs ‚É‚æ‚Á‚Ä -UTF-8 •¶Žš—ñ‚É–ß‚·‚±‚Æ‚ª‰Â”\‚Å‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -

      mdn_res_normalize -
      -
      -mdn_result_t
      -mdn_res_normalize(mdn_resconf_t conf, const char *name,
      -                  char *normalized_name, size_t normalized_name_len)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ name ‚ɑ΂µ‚ij‹K‰»‚ðŽÀs‚µA -‚»‚ÌŒ‹‰Ê‚ð normalized_name ‚ÉŠi”[‚µ‚Ü‚·B -normalized_name_len ‚Å‚ ‚ç‚©‚¶‚ß normalized_name ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚γ‹K‰»‚Ís‚í‚ꂸA -name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü normalized_name ‚ɃRƒs[‚³‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -

      mdn_res_ucstodns -
      -
      -mdn_result_t
      -mdn_res_ucstodns(mdn_resconf_t conf, const char *ucs_name, char *dns_name,
      -	size_t dns_name_len)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -UTF-8 ‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ ucs_name ‚ð DNS ƒvƒƒgƒRƒ‹ã‚Å -—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð dns_name ‚É -Ši”[‚µ‚Ü‚·B -dns_name_len ‚Å‚ ‚ç‚©‚¶‚ß dns_name_len ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Εϊ·‚Ís‚í‚ꂸA -ucs_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü dns_name ‚ɃRƒs[‚³‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -

      mdn_res_dnstoucs -
      -
      -mdn_result_t
      -mdn_res_dnstoucs(mdn_resconf_t conf, const char *dns_name, char *ucs_name,
      -	size_t ucs_name_len)
      -
      -

      mdn_res_ucstodns ‚Ì‹t•ÏŠ·A -‚‚܂èƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg conf ‚É‚µ‚½‚ª‚Á‚Ä -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Å•\‚³‚ꂽƒhƒƒCƒ“–¼ dns_name -‚ð UTF-8 ‚ɕϊ·‚µA‚»‚ÌŒ‹‰Ê‚ð ucs_name ‚ÉŠi”[‚µ‚Ü‚·B -ucs_name_len ‚Å‚ ‚ç‚©‚¶‚ß ucs_name_len ‚É -Šm•Û‚µ‚½—̈æ‚̑傫‚³‚ðŽw’肵‚Ü‚·B - -

      ‚à‚µ conf ‚ª NULL ‚Å‚ ‚ê‚Εϊ·‚Ís‚í‚ꂸA -dns_name ‚Ì“à—e‚ª‚»‚Ì‚Ü‚Ü ucs_name ‚ɃRƒs[‚³‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_invalid_nameA -mdn_failure -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      resconf ƒ‚ƒWƒ…[ƒ‹

      - -

      resconf ƒ‚ƒWƒ…[ƒ‹‚̓Nƒ‰ƒCƒAƒ“ƒg‘¤ (ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“) -‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤Û‚ÉŽQÆ‚³‚ê‚é -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݞ‚ÝA -ƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ꂽݒè‚É‚µ‚½‚ª‚Á‚½‰Šú‰»‚ðŽÀs‚µ‚Ü‚·B‚Ü‚½ -Ý’èî•ñ‚ðŽæ‚èo‚·‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B - -

      resconf ƒ‚ƒWƒ…[ƒ‹‚ÍuƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚É‹Lq‚³‚ꂽݒè‚Í‚±‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚É -Ši”[‚³‚êA‚±‚̃Rƒ“ƒeƒLƒXƒg‚ðˆø”‚É‚µ‚Ä API ŠÖ”‚ðŒÄ‚Ño‚·‚±‚Ƃɂæ‚Á‚Ä -ݒ肳‚ꂽ’l‚ðŽæ‚èo‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í mdn_resconf_t Œ^‚Å‚ ‚èA -ŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -typedef struct mdn_resconf *mdn_resconf_t;
      -
      -
      - -

      ‚±‚̃‚ƒWƒ…[ƒ‹‚Í’P‘̂łàŽg—p‚Å‚«‚Ü‚·‚ªA -res ƒ‚ƒWƒ…[ƒ‹‚Æ‘g‚݇‚킹‚邱‚Ƃɂæ‚Á‚ÄA -ƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̑½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðŠÈ’P‚És‚¤‚±‚Æ‚ª‚Å‚«‚邿‚¤‚É -ÝŒv‚³‚ê‚Ä‚¢‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_resconf_initialize -
      -
      -mdn_result_t
      -mdn_resconf_initialize(void)
      -
      -

      ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤Û‚É•K—v‚ȉŠú‰»‚ðŽÀs‚µ‚Ü‚·B -–{ƒ‚ƒWƒ…[ƒ‹‚Ì‘¼‚ÌAPIŠÖ”‚ðŒÄ‚Ô‘O‚É•K‚¸ŒÄ‚Ño‚µ‚Ä‚­‚¾‚³‚¢B -–{ƒ‚ƒWƒ…[ƒ‹‚ªŽg—p‚·‚鑼‚̃‚ƒWƒ…[ƒ‹‚̉Šú‰»‚à‚·‚ׂÄs‚¤‚Ì‚ÅA‚±‚êˆÈŠO‚̉Šú‰» -ŠÖ”‚ðŒÄ‚Ño‚·•K—v‚Í‚ ‚è‚Ü‚¹‚ñB -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_resconf_create -
      -
      -mdn_result_t
      -mdn_resconf_create(mdn_resconf_t *ctxp)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ðì¬A‰Šú‰»‚µActxp ‚ÌŽw‚· -—̈æ‚ÉŠi”[‚µ‚Ü‚·B -‰Šúó‘Ô‚Å‚ÍA‚Ü‚¾ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚͓ǂݞ‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB -“ǂݞ‚Þ‚½‚ß‚É‚Í -mdn_resconf_loadfile ‚ðŽÀs‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_resconf_destroy -
      -
      -void
      -mdn_resconf_destroy(mdn_resconf_t ctx)
      -
      -

      mdn_resconf_create ‚Å -쬂³‚ꂽƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B -

      - -

      mdn_resconf_loadfile -
      -
      -mdn_result_t
      -mdn_resconf_loadfile(mdn_resconf_t ctx, const char *file)
      -
      -

      file ‚ÅŽw’肳‚ê‚é -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ð“ǂݞ‚ÝA -Ý’è“à—e‚ðƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚ÉŠi”[‚µ‚Ü‚·B -file ‚ª NULL ‚Ìꇂɂ̓fƒtƒHƒ‹ƒg‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì -“à—e‚ð“ǂݞ‚݂܂·B -

      ‚·‚Å‚ÉÝ’èƒtƒ@ƒCƒ‹‚ª“ǂݞ‚Ü‚ê‚Ä‚¢‚éƒRƒ“ƒeƒLƒXƒg‚ɑ΂µ‚ÄA -•Ê‚ÌÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚ð“ǂݞ‚Þ‚±‚Æ‚à‚Å‚«‚Ü‚·B‚»‚ÌꇂɂÍA -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg‚ÉŠi”[‚³‚ê‚Ä‚¢‚½‘O‚ÌÝ’èƒtƒ@ƒCƒ‹‚Ì“à—e‚Í -‚·‚ׂÄÁ‚¦AV‚½‚ɓǂݞ‚ñ‚¾Ý’èƒtƒ@ƒCƒ‹‚Ì“à—e‚Å’u‚«Š·‚í‚è‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nofileA -mdn_invalid_syntaxA -mdn_invalid_nameA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_resconf_defaultfile -
      -
      -char *
      -mdn_resconf_defaultfile(void)
      -
      -

      ƒfƒtƒHƒ‹ƒg‚̃Nƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚Í mDNkit ‚̃Rƒ“ƒpƒCƒ‹Žž‚ÌÝ’è‚É‚æ‚Á‚ÄŒˆ‚Ü‚è‚Ü‚·‚ªA“Á‚ÉŽw’肵‚È‚¯‚ê‚Î -

      -
      -/usr/local/etc/mdnres.conf
      -
      -
      -‚Å‚·B -

      - -

      mdn_resconf_localconverter -
      -
      -mdn_converter_t
      -mdn_resconf_localconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Ƃ̊Ԃ̕¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚ß‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª”»•ʂł«‚È‚©‚Á‚½ -ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -

      - -

      mdn_resconf_alternateconverter -
      -
      -mdn_converter_t
      -mdn_resconf_alternateconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -•¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚߂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ƃ̓hƒƒCƒ“–¼‚ðƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚邱‚Æ‚ª -‚Å‚«‚È‚©‚Á‚½ê‡‚ÉAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚É—p‚¢‚ç‚ê‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‚±‚Ƃł·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -

      - -

      mdn_resconf_serverconverter -
      -
      -mdn_converter_t
      -mdn_resconf_serverconverter(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ UTF-8 ‚Æ‚ÌŠÔ‚Ì -•¶ŽšƒR[ƒh•ÏŠ·‚ðs‚¤‚½‚߂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B -

      ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -converter ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -

      - -

      mdn_resconf_zld -
      -
      -const char *
      -mdn_resconf_zld(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Æ]—ˆ‚̃hƒƒCƒ“–¼‚Æ‚ð‹æ•Ê‚·‚邽‚߂Ɉꕔ‚Ì -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ƂƂà‚É—p‚¢‚ç‚ê‚é ZLD ‚Ì•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -ZLD ‚ðŽg—p‚µ‚È‚¢Ý’è‚Ìê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B -

      mDNkit ‚̓fƒtƒHƒ‹ƒg‚ÌÝ’è‚Å‚Í ZLD ‚ðƒTƒ|[ƒg‚¹‚¸A‚±‚ÌŠÖ”‚Íí‚É -NULL ‚ð•Ô‚µ‚Ü‚·BmDNkit ‚ð ZLD ‚ðƒTƒ|[ƒg‚·‚邿‚¤‚ÉÝ’è‚·‚é•û–@‚É -‚‚¢‚Ä‚Í mDNkit ‚̃Cƒ“ƒXƒg[ƒ‹ƒKƒCƒh‚Ì -configure ŽÀs -‚Ì€‚ð‚²——‚­‚¾‚³‚¢B -

      - -

      mdn_resconf_normalizer -
      -
      -mdn_normalizer_t
      -mdn_resconf_normalizer(mdn_resconf_t ctx)
      -
      -

      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒRƒ“ƒeƒLƒXƒg ctx ‚Ìî•ñ‚ðŒ³‚ÉA -ƒhƒƒCƒ“–¼‚ð³‹K‰»‚·‚邽‚߂̳‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ð•Ô‚µ‚Ü‚·B -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ª‚Ü‚¾“ǂݞ‚Ü‚ê‚Ä‚¢‚È‚©‚Á‚½‚èAÝ’èƒtƒ@ƒCƒ‹‚É -³‹K‰»•ûŽ®‚ÌŽw’肪‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B -

      ³‹K‰»ƒRƒ“ƒeƒLƒXƒg‚ɂ‚¢‚Ä‚Í -normalizer ƒ‚ƒWƒ…[ƒ‹ ‚Ì€‚ð‚²——‚­‚¾‚³‚¢B - -

      - -
      - -

      result ƒ‚ƒWƒ…[ƒ‹

      - -

      result ƒ‚ƒWƒ…[ƒ‹‚̓‰ƒCƒuƒ‰ƒŠ‚ÌŠeŠÖ”‚ª•Ô‚· -mdn_result_tŒ^‚Ì’l‚ðˆµ‚¤ƒ‚ƒWƒ…[ƒ‹‚ÅA -’l‚©‚ç‚»‚̃R[ƒh‚ɑΉž‚·‚郃bƒZ[ƒW‚ւ̕ϊ·‚ð’ñ‹Ÿ‚µ‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      -
      -
      -char *
      -mdn_result_tostring(mdn_result_t result)
      -
      -

      mdn_result_tŒ^‚Ì’l result ‚ɑΉž‚·‚é -ƒƒbƒZ[ƒW•¶Žš—ñ‚ð•Ô‚µ‚Ü‚·B -

      –¢’è‹`‚̃R[ƒh‚ɑ΂µ‚Ä‚Í unknown result code ‚Æ‚¢‚¤•¶Žš—ñ‚ª -•Ô‚³‚ê‚Ü‚·B - -

      - -
      - -

      selectiveencode ƒ‚ƒWƒ…[ƒ‹

      - -

      selectiveencode ƒ‚ƒWƒ…[ƒ‹‚̓][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚̃eƒLƒXƒg‚Ì’†‚©‚ç -”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ð’T‚µo‚·ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -‚à‚¿‚ë‚ñƒeƒLƒXƒg‚̂ǂ̕”•ª‚ªƒhƒƒCƒ“–¼‚Ȃ̂©‚ð”»’è‚·‚邱‚Ƃ͈ê”Ê“I‚É‚Í -•s‰Â”\‚Ȃ̂ÅAŽÀۂɂ͎Ÿ‚̂悤‚ȑ傫‚ȉ¼’è‚ð’u‚­‚±‚Ƃɂæ‚Á‚Ä -‹ßŽ—“I‚ÉŽÀŒ»‚µ‚Ä‚¢‚Ü‚·B -

        -
      • ”ñASCII•¶Žš‚̓hƒƒCƒ“–¼‚Ì’†‚ɂ̂݌»‚ê‚é -
      -

      ‹ï‘Ì“I‚ɂ͎Ÿ‚̂悤‚ȃAƒ‹ƒSƒŠƒYƒ€‚ð—p‚¢‚ăhƒƒCƒ“–¼‚̗̈挟o‚ðs‚¢‚Ü‚·B -

        -
      1. ƒeƒLƒXƒg‚ð‘–¸‚µ‚ÄA”ñASCII•¶Žš‚ð’T‚·B -
      2. Œ©‚‚©‚Á‚½”ñASCII•¶Žš‚Ì‘OŒã‚Ì•¶Žš‚𒲂×A - ‚»‚Ì•¶Žš‚ðŠÜ‚ÝA‚©‚‘¼‚Ì”ñASCII•¶Žš‚ ‚é‚¢‚Í]—ˆ‚Ì(‘½Œ¾Œê‰»‚³‚ê‚Ä‚¢‚È‚¢) - ƒhƒƒCƒ“–¼‚Æ‚µ‚ÄŽg—p‰Â”\‚È•¶Žš‚¾‚¯‚©‚ç‚È‚é”͈͂ð‹‚ß‚éB -
      3. ‹‚ß‚½”͈͂ðƒhƒƒCƒ“–¼‚Æ‚µ‚ĕԂ·B -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_selectiveencode_findregion -
      -
      -mdn_result_t
      -mdn_selectiveencode_findregion(const char *s,
      -	char **startp, char **endp)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ s ‚ð‘–¸‚µ‚ÄAʼn‚ÉoŒ»‚·‚é -”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚̗̈æ‚ð‹‚ßA‚»‚Ìæ“ª‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ð -startp ‚ÉA—̈æ‚Ì’¼Œã‚Ì•¶Žš‚ðŽw‚·ƒ|ƒCƒ“ƒ^‚ð endp ‚É -‚»‚ꂼ‚êŠi”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfound -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      strhash ƒ‚ƒWƒ…[ƒ‹

      - -

      strhash ƒ‚ƒWƒ…[ƒ‹‚Í•¶Žš—ñ‚ðƒL[‚Æ‚·‚éƒnƒbƒVƒ…•\‚ðŽÀŒ»‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -ƒnƒbƒVƒ…•\‚Í -converter ƒ‚ƒWƒ…[ƒ‹‚â -normalizer ƒ‚ƒWƒ…[ƒ‹‚Ȃǃ‰ƒCƒuƒ‰ƒŠ‚Ì‘¼‚̃‚ƒWƒ…[ƒ‹‚Å -Žg—p‚³‚ê‚Ü‚·B -”ñí‚Ɉê”Ê“I‚ȃnƒbƒVƒ…•\‚ÌŽÀ‘•‚Å‚ ‚èA“Á•M‚·‚ׂ«“_‚Í‚ ‚è‚Ü‚¹‚ñc -ˆê‚‚¾‚¯‚ ‚è‚Ü‚·B“o˜^‚͂ł«‚Ü‚·‚ªíœ‚Ì‹@”\‚ª‚ ‚è‚Ü‚¹‚ñB–{ƒ‰ƒCƒuƒ‰ƒŠ‚Å‚Í -•K—v‚È‚¢‚©‚ç‚Å‚·B - -

      ƒnƒbƒVƒ…•\‚̃TƒCƒY‚Í—v‘f‚Ì‘”‚ª‘‚¦‚é‚É]‚Á‚đ傫‚­‚È‚è‚Ü‚·B - -

      ƒnƒbƒVƒ…•\‚ÍŽŸ‚ÉŽ¦‚· mdn_strhash_t Œ^‚Ì opaque ƒf[ƒ^‚Æ‚µ‚Ä -•\‚³‚ê‚Ü‚·B -

      -
      -typedef struct mdn_strhash *mdn_strhash_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_strhash_create -
      -
      -mdn_result_t
      -mdn_strhash_create(mdn_strhash_t *hashp)
      -
      -

      ‹ó‚̃nƒbƒVƒ…•\‚ð쬂µA‚»‚̃nƒ“ƒhƒ‹‚ð hashp ‚ÌŽw‚·—̈æ‚É -Ši”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_strhash_destroy -
      -
      -void
      -mdn_strhash_destroy(mdn_strhash_t hash)
      -
      -

      mdn_strhash_create ‚Å쬂µ‚½ -ƒnƒbƒVƒ…•\‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B -

      - -

      mdn_strhash_put -
      -
      -mdn_result_t
      -mdn_strhash_put(mdn_strhash_t hash, const char *key,
      -	void *value)
      -
      -

      mdn_strhash_create ‚Å쬂µ‚½ -ƒnƒbƒVƒ…•\ hash ‚ɃL[ keyA’l value ‚Ì‘g‚ð -“o˜^‚µ‚Ü‚·B -•¶Žš—ñ key ‚̓Rƒs[‚³‚ê‚Ü‚·‚Ì‚ÅA‚±‚ÌŠÖ”‚̌ĂÑo‚µŒã -key ‚ÌŽw‚·ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ä‚àA•¶Žš—ñ‚Ì“à—e‚ð‘‚«Š·‚¦‚Ä‚à -‰e‹¿‚Í‚ ‚è‚Ü‚¹‚ñB‚±‚ê‚ɑ΂µ‚Ä value ‚Ì“à—e‚̓Rƒs[‚³‚ê‚È‚¢‚̂Š-’ˆÓ‚µ‚Ä‚­‚¾‚³‚¢ (‚à‚¿‚ë‚ñ‚æ‚­l‚¦‚Ă݂ê‚΃Rƒs[‚³‚ê‚È‚¢‚±‚Ƃ͎©–¾‚Å‚·‚ª)B -

      “¯‚¶ƒL[‚ðŽg—p‚µ‚Ä•¡”‰ñ“o˜^‚µ‚½ê‡AÅŒã‚É“o˜^‚³‚ꂽ‚à‚Ì‚¾‚¯‚ª -—LŒø‚Å‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_strhash_get -
      -
      -mdn_result_t
      -mdn_strhash_get(mdn_strhash_t hash,
      -	const char *key, void **valuep)
      -
      -

      ƒnƒbƒVƒ…•\ hash ‚©‚çƒL[ key ‚ðŽ‚Â—v‘f‚ðŒŸõ‚µA -‘Ήž‚·‚é—v‘f‚ª‚ ‚ê‚΂»‚Ì’l‚ð valuep ‚ÉŠi”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_noentry -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_strhash_exists -
      -
      -int
      -mdn_strhash_exists(mdn_strhash_t hash, const char *key)
      -
      -

      ƒnƒbƒVƒ…•\ hash ‚ɃL[ key ‚ðŽ‚Â—v‘f‚ª‚ ‚ê‚Î -1‚ðA‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B - -

      - -
      - -

      translator ƒ‚ƒWƒ…[ƒ‹

      - -

      translator ƒ‚ƒWƒ…[ƒ‹‚ÍA—^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É]‚Á‚ăhƒƒCƒ“–¼‚ð -•ÏŠ·‚·‚郂ƒWƒ…[ƒ‹‚Å‚·Bƒpƒ‰ƒ[ƒ^‚Æ‚µ‚Ă͎Ÿ‚É‚ ‚°‚éƒf[ƒ^‚ð—^‚¦‚Ü‚·B -

        -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO (ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO) -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚Ì‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO - (ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO) -
      • “ü—͂Ƃµ‚Ä“n‚·ƒhƒƒCƒ“–¼‚ÌZLD (ƒ[ƒJƒ‹ ZLD) -
      • ³‹K‰»•ûŽ® -
      • ƒhƒƒCƒ“–¼‚̕ϊ·Œã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO (ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO) -
      • ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªŽ¸”s‚µ‚½Žž‚É—p‚¢‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO - (ƒ^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO) -
      • ƒhƒƒCƒ“–¼‚̕ϊ·Œã‚ÌZLD (ƒ^[ƒQƒbƒgZLD) -
      - -

      ƒhƒƒCƒ“–¼‚̕ϊ·‚̎葱‚«‚Í‚â‚â•¡ŽG‚Å‚·B‚±‚ê‚ÍŽŸ‚Ì——R‚É‚æ‚è‚Ü‚·B -

        -
      • ƒhƒƒCƒ“–¼‚Æ‚µ‚Äí‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ª“n‚³‚ê‚é‚킯‚ł͂Ȃ­A - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚à“n‚³‚ê‚é‰Â”\«‚ª‚ ‚èA - ‚»‚̂ǂ¿‚ç‚Å‚ ‚é‚©‚É‚æ‚Á‚Ĉ—‚ð•Ï‚¦‚é•K—v‚ª‚ ‚邱‚Æ -
      • ‚Ü‚½‚±‚Ì2‚‚𔻕ʂ·‚鈗‚ªASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ìê‡ - ŠÈ’P‚ł͂Ȃ­AZLD“™‚ðŽQÆ‚·‚é•K—v‚ª‚ ‚邱‚Æ -
      • ‚³‚ç‚Ƀ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ŃGƒ“ƒR[ƒh‚³‚ꂽƒhƒƒCƒ“–¼‚à - “n‚³‚ê‚é‰Â”\«‚ª‚ ‚邱‚Æ -
      • ‚³‚ç‚Ƀ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªŽ¸”s‚µ‚½Žž‚É‚Í - ‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð‘ã‚í‚è‚ÉŽg—p‚·‚é•K—v‚ª‚ ‚邱‚Æ -
      - -

      ‹ï‘Ì“I‚É‚ÍAŽŸ‚̂悤‚ȃAƒ‹ƒSƒŠƒYƒ€‚ðŽg—p‚µ‚ĕϊ·‚ðs‚¢‚Ü‚·B -

        -
      1. ƒ[ƒJƒ‹ZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚é (‹ó‚łȂ¢) ‚©‚Ç‚¤‚©‚𒲂ׂéB -
      2. ’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA“n‚³‚ꂽƒhƒƒCƒ“–¼‚ª‚»‚ê‚Ƀ}ƒbƒ`‚·‚é‚©‚Ç‚¤‚©’²‚ׂéB -
      3. ƒ}ƒbƒ`‚·‚ê‚Α½Œ¾ŒêƒhƒƒCƒ“–¼‚¾‚Æ”»’f‚µAƒhƒƒCƒ“–¼‚©‚çZLD‚𜋎‚µA - 6‚̃R[ƒh•ÏŠ·ˆ—‚ւƈڂéB
        - ƒ}ƒbƒ`‚µ‚È‚¯‚ê‚ÎA]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚¾‚Æ‚µ‚Ä‚»‚Ì‚Ü‚Ü - ƒRƒs[‚µAˆ—‚ðI—¹‚·‚éB -
      4. ƒ[ƒJƒ‹ZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚È‚¯‚ê‚ÎAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª - ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚Ç‚¤‚©A‚Ü‚½“n‚³‚ꂽƒhƒƒCƒ“–¼‚ª - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚Æ‚µ‚ij‚µ‚¢‚à‚̂ł ‚é‚©‚Ç‚¤‚©‚𒲂ׂéB -
      5. ‚à‚µASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©A‚ ‚é‚¢‚Í“n‚³‚ꂽƒhƒƒCƒ“–¼‚É - ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚Æ‚µ‚ij‚µ‚­‚È‚¢•¶Žš‚ª¬‚¶‚Á‚Ä‚¢‚ê‚Î - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Å‚ ‚邯‚µ‚Ä6‚̃R[ƒh•ÏŠ·ˆ—‚ւƈڂéB
        - ‚»‚êˆÈŠO‚ÌꇂɂÍ]—ˆ‚ÌASCIIƒhƒƒCƒ“–¼‚¾‚Æ‚µ‚Ä‚»‚Ì‚Ü‚Ü - ƒRƒs[‚µAˆ—‚ðI—¹‚·‚éB -
      6. ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚ÎA‚Ü‚¸ - ƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç UTF-8 ‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB - ¬Œ÷‚·‚ê‚Î8‚̳‹K‰»ˆ—‚ւƈڂéB -
      7. ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çUTF-8‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB -
      8. ³‹K‰»ˆ—‚ðŽÀs‚·‚éB -
      9. UTF-8‚©‚çƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւƃR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB -
      10. ‚à‚µƒhƒƒCƒ“–¼‚Ƀ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ª‚ ‚Á‚Ä - •ÏŠ·‚ÉŽ¸”s‚µ‚½ê‡‚É‚ÍA‘ã‚í‚è‚É UTF-8 ‚©‚ç‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì - ƒR[ƒh•ÏŠ·‚ðŽÀs‚·‚éB -
      11. ƒ^[ƒQƒbƒgZLD‚ª’è‹`‚³‚ê‚Ä‚¢‚ê‚΃hƒƒCƒ“–¼‚ɒljÁ‚·‚éB -
      - -

      ˆÈã‚̈—‚ðƒtƒ[ƒ`ƒƒ[ƒg‚Å•\‚µ‚½‚Ì‚ªŽŸ‚Ì}‚Å‚·B - -

      -name translation flowchart -
      - -

      –{ƒ‚ƒWƒ…[ƒ‹‚̓Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚É -converter ƒ‚ƒWƒ…[ƒ‹‚ðA‚Ü‚½³‹K‰»‚É -normalizer ƒ‚ƒWƒ…[ƒ‹‚ð‚»‚ê‚¼‚êŽg—p‚µ‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_translator_translate -
      -
      -mdn_result_t
      -mdn_translator_translate(mdn_converter_t local_converter,
      -	mdn_converter_t local_alternate_converter,
      -	const char *local_zld,
      -	mdn_normalizer_t normalizer,
      -	mdn_converter_t target_converter,
      -	mdn_converter_t target_alternate_converter,
      -	const char *target_zld,
      -	const char *from, char *to, size_t tolen)
      -
      -

      —^‚¦‚ç‚ꂽƒpƒ‰ƒ[ƒ^‚É‚µ‚½‚ª‚Á‚ăhƒƒCƒ“–¼ from ‚ð•ÏŠ·‚µA -Œ‹‰Ê‚ð to ‚Æ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚ÉŠi”[‚µ‚Ü‚·B -

      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒOAƒ[ƒJƒ‹‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒOA -ƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚¨‚æ‚у^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì–¼Ì‚ł͂Ȃ­A -‘Ήž‚·‚éconverter ƒ‚ƒWƒ…[ƒ‹‚Ì -ƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg local_converterA -alternate_converter ‚¨‚æ‚Ñ target_converter ‚Å -Žw’肵‚Ü‚·B -

      ƒ^[ƒQƒbƒg‘ã‘ÖƒGƒ“ƒR[ƒfƒBƒ“ƒO target_alternate_converter ‚ÍA -target_converter ‚É‚æ‚éƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ªA -ƒhƒƒCƒ“–¼‚ªƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶ŽšW‡‚ɂȂ¢•¶Žš‚ðŠÜ‚ñ‚Å‚¢‚邽‚ß‚É -ޏ”s‚µ‚½Žž‚ÉAƒ^[ƒQƒbƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì‘ã‚í‚è‚ÉŽg—p‚³‚ê‚Ü‚·B -

      ³‹K‰»‚Ínormalizer ƒ‚ƒWƒ…[ƒ‹‚̳‹K‰»ƒRƒ“ƒeƒLƒXƒg -normalizer ‚ÅŽw’肵‚Ü‚·B -

      ƒ[ƒJƒ‹ZLD‚¨‚æ‚у^[ƒQƒbƒgZLD‚Í -mdn_translator_canonicalzld -‚Å•W€Œ`Ž®‚ɕϊ·‚µ‚½‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_buffer_overflowA -mdn_invalid_encodingA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_translator_canonicalzld -
      -
      -mdn_result_t
      -mdn_translator_canonicalzld(const char *zld,
      -	char **canonicalizedp)
      -
      -

      ZLD zld ‚ð•W€Œ`Ž®‚ɕϊ·‚µA‚»‚̃|ƒCƒ“ƒ^‚ð -canonicalizedp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B -•ÏŠ·‚³‚ꂽ•¶Žš—ñ (*canonicalizedp) ‚̗̈æ‚Í -malloc() ‚³‚ê‚Ä‚¢‚Ü‚·‚Ì‚ÅA•s—v‚ɂȂÁ‚½‚ç free() ‚Å -‰ð•ú‚µ‚Ä‚­‚¾‚³‚¢B -

      ‚±‚±‚Å‚¢‚¤ ZLD ‚Ì•W€Œ`Ž®‚Ƃ͎Ÿ‚̂悤‚ÈŒ`Ž®‚Ì‚à‚Ì‚ðŽw‚µ‚Ü‚·B -

        -
      • ‹ó‚ÌZLD ("" ‚ ‚é‚¢‚Í ".") ‚Ì•W€Œ`Ž®‚Í NULL -
      • 擪‚ªƒsƒŠƒIƒh (.) ‚©‚çŽn‚Ü‚Á‚Ä‚¢‚ê‚΃sƒŠƒIƒh‚𜋎 -
      • ŌオƒsƒŠƒIƒh (.) ‚ÅI‚í‚Á‚Ä‚¢‚È‚¯‚ê‚΃sƒŠƒIƒh‚ð’ljÁ -
      • ¬•¶Žš‚Í‚·‚×‚Ä‘å•¶Žš‚ɕϊ· -
      -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_translator_matchzld -
      -
      -int
      -mdn_translator_matchzld(const char *domain,
      -	const char *zld)
      -
      -

      ƒhƒƒCƒ“–¼ domain ‚Æ ZLD zld ‚ªƒ}ƒbƒ`‚·‚é‚©‚Ç‚¤‚© -‚𒲂×Aƒ}ƒbƒ`‚·‚ê‚Î1‚ðA‚µ‚È‚¯‚ê‚Î0‚ð•Ô‚µ‚Ü‚·B -

      ZLD ‚Í -mdn_translator_canonicalzld -‚Å•W€Œ`Ž®‚ɕϊ·‚µ‚½‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB - -

      - -
      - -

      unicode ƒ‚ƒWƒ…[ƒ‹

      - -

      unicode ƒ‚ƒWƒ…[ƒ‹‚ÍA -UnicodeData.txt -‚É‹Lq‚³‚ê‚Ä‚¢‚éAUnicode ‚ÌŠeŽí•¶Žš‘®«‚ðŽæ“¾‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B‚È‚¨A -Unicode.txt ‚É‹Lq‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚̈Ӗ¡A‚¨‚æ‚уtƒ@ƒCƒ‹Œ`Ž®‚ɂ‚¢‚Ä‚Í -UnicodeData File Format‚ð‚²——‚­‚¾‚³‚¢B - -

      –{ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‘½‚­‚̃‚ƒWƒ…[ƒ‹‚Í Unicode ‚̃f[ƒ^‚ð UTF-8ƒGƒ“ƒR[ƒh‚³‚ꂽ -•¶Žš—ñŒ`Ž®‚ňµ‚¢‚Ü‚·‚ªA‚±‚̃‚ƒWƒ…[ƒ‹‚Í unsigned long Œ^‚Ì -ƒf[ƒ^‚Æ‚µ‚Ĉµ‚¢‚Ü‚·BŠÜ‚Ü‚ê‚é’l‚Í UCS-4 ‚Å‚·B - -

      -‚±‚̃‚ƒWƒ…[ƒ‹‚Å‚Í Unicode •¶Žš‚Ì‘å•¶Žš¬•¶Žš‚Ì‘ŠŒÝ•ÏŠ·‹@”\‚à -’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B ‚±‚ê‚Í - -Unicode Technical Report #21: Case Mappings ‚Å -’è‹`‚³‚ê‚Ä‚¢‚é‚à‚̂ł·B -Unicode •¶Žš‚Ì’†‚ɂ͂²‚­ˆê•”‚Å‚·‚ª‘å•¶Žš¬•¶Žš‚̕ϊ·‚ð‚·‚éÛ‚É -•¶–¬î•ñ‚ð•K—v‚Æ‚·‚é‚à‚Ì‚ª‚ ‚èA‚±‚ê‚ÍŽŸ‚̂悤‚È—ñ‹“Œ^‚̃f[ƒ^‚ÅŽw’肵‚Ü‚·B -

      -
      -typedef enum {
      -	mdn__unicode_context_unknown,
      -	mdn__unicode_context_final,
      -	mdn__unicode_context_nonfinal
      -} mdn__unicode_context_t;
      -
      -
      -•¶–¬‚ª FINAL ‚Ìê‡‚É‚Í mdn__unicode_context_final ‚ðA‚Ü‚½ -NON_FINAL ‚Ìê‡‚É‚Í mdn__unicode_context_nonfinal ‚ðŽw’肵‚Ü‚·B -mdn__unicode_context_unknown ‚Í•¶–¬î•ñ‚ª‚í‚©‚ç‚È‚¢ (’²‚ׂĂ¢‚È‚¢) -‚±‚Æ‚ðŽ¦‚µ‚Ü‚·B -•¶–¬î•ñ‚ÉŠÖ‚µ‚ÄÚ‚µ‚­‚Íã‹L•¶Œ£‚ð‚²——‚­‚¾‚³‚¢B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__unicode_canonicalclass -
      -
      -int
      -mdn__unicode_canonicalclass(unsigned long c);
      -
      -

      Unicode •¶Žš c ‚Ì Canonical Combining Class ‚ð‹‚߂܂·B -Canonical Combining Class ‚ª’è‹`‚³‚ê‚Ä‚¢‚È‚¢•¶Žš‚ɂ‚¢‚Ä‚Í 0 ‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn__unicode_decompose -
      -
      -mdn_result_t
      -mdn__unicode_decompose(int compat,
      -	unsigned long *v, size_t vlen,
      -	unsigned long c, int *decomp_lenp)
      -
      -

      Unicode •¶Žš c ‚ð UnicodeData.txt ‚ÌCharacter -Decomposition Mapping ‚É‚µ‚½‚ª‚Á‚Ä decompose ‚µA‚»‚ÌŒ‹‰Ê‚ð -v ‚¨‚æ‚Ñ vlen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -compat ‚Ì’l‚ª^‚È‚ç Compatibility Decomposition ‚ðA -‹U‚È‚çCanonical Decomposition ‚ðs‚¢‚Ü‚·B -

      decompose ‚ÍÄ‹A“I‚És‚í‚ê‚Ü‚·B‚‚܂èCharacter Decomposition Mapping -‚É‚µ‚½‚ª‚Á‚Ä•ª‰ð‚µ‚½Še•¶Žš‚ɂ‚¢‚Ä‚³‚ç‚É decompose ˆ—‚ªs‚í‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfoundA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unicode_compose -
      -
      -mdn_result_t
      -mdn__unicode_compose(unsigned long c1,
      -	unsigned long c2, unsigned long *compp)
      -
      -

      c1 ‚Æ c2 ‚Ì2•¶Žš‚Ì Unicode •¶Žš‚̃V[ƒPƒ“ƒX‚ð -UnicodeData.txt ‚ÌCharacter Decomposition Mapping ‚É‚µ‚½‚ª‚Á‚Ä -compose ‚µA‚»‚ÌŒ‹‰Ê‚ð compp ‚ÌŽw‚·—̈æ‚É‘‚«ž‚݂܂·B -•K‚¸ Canonical Composition ‚ªs‚í‚ê‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfound -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unicode_iscompositecandidate -
      -
      -int
      -mdn__unicode_iscompositecandidate(unsigned long c)
      -
      -

      Unicode•¶Žš c ‚©‚çŽn‚Ü‚é Canonical Composition ‚ª‘¶Ý‚·‚é‚© -‚Ç‚¤‚©‚𒲂×A‘¶Ý‚·‚é‰Â”\«‚ª‚ ‚ê‚Î 1 ‚ð‰Â”\«‚ª‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚̓qƒ“ƒgî•ñ‚Å‚ ‚èA1‚ª•Ô‚Á‚Ä‚«‚½‚Æ‚µ‚Ä‚àŽÀÛ‚É‚Í Composition ‚ª -‘¶Ý‚µ‚È‚¢‚±‚Æ‚à‚ ‚蓾‚Ü‚·B‹t‚É 0 ‚ª•Ô‚Á‚Ä‚­‚ê‚ΊmŽÀ‚É‘¶Ý‚µ‚Ü‚¹‚ñB -

      Unicode ‚Ì‘S•¶Žš‚Ì’†‚Å Canonical Composition ‚Ìæ“ª‚Æ‚È‚é•¶Žš‚Í” -­‚È‚¢‚Ì‚ÅAmdn__unicode_compose ‚Ì -ŒŸõ‚̃I[ƒoƒwƒbƒh‚ðŒ¸‚ç‚·‚½‚߂ɂ ‚ç‚©‚¶‚߃f[ƒ^‚ðƒXƒNƒŠ[ƒjƒ“ƒO‚·‚é–Ú“I‚É -Žg—p‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      - -

      mdn__unicode_toupper -
      -
      -mdn_result_t
      -mdn__unicode_toupper(unsigned long c, mdn__unicode_context_t ctx,
      -	unsigned long *v, size_t vlen, int *convlenp)
      -
      -

      Unicode•¶Žš c ‚ð UnicodeData.txt ‚Ì Uppercase Mapping -î•ñ‚¨‚æ‚Ñ SpecialCasing.txt‚Ìî•ñ‚É‚µ‚½‚ª‚Á‚Ä‘å•¶Žš‚ɕϊ·‚µAŒ‹‰Ê‚ð -v ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·Bvlen ‚Í‚ ‚ç‚©‚¶‚ß -v ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚Å‚·B•ÏŠ·Œ‹‰Ê‚Ì•¶Žš”‚Í -*convlenp ‚ɕԂ³‚ê‚Ü‚·B -•ÏŠ·Œ‹‰Ê‚ª•¡”‚Ì•¶Žš‚ɂȂ邱‚Æ‚ª‚ ‚邱‚ƂɒˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -‚Ü‚½ƒƒP[ƒ‹ˆË‘¶‚̕ϊ·‚Ís‚¢‚Ü‚¹‚ñB - -

      ctx ‚Í•¶Žš c ‚ÌoŒ»‚·‚é -•¶–¬î•ñ‚Å‚·B -‚Ù‚Æ‚ñ‚ǂ̕¶Žš‚ł͕ϊ·‚ÌÛ‚É•¶–¬î•ñ‚Í•s—v‚È‚½‚ßA -’Êí‚Í mdn__unicode_context_unknown ‚ðŽw’肵‚Ä‚¨‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚à‚µ•¶–¬î•ñ‚ª•K—v‚Èê‡A–{ŠÖ”‚Í–ß‚è’l‚Æ‚µ‚Ä mdn_context_required -‚ð•Ô‚·‚Ì‚ÅA•¶–¬î•ñ‚ðŽæ“¾‚µ‚Ä‚©‚ç‰ü‚߂ČĂÑo‚·‚±‚Æ‚ª‰Â”\‚Å‚·B -•¶–¬î•ñ‚̎擾‚É‚Í -mdn__unicode_getcontext ‚ðŽg—p‚µ‚Ü‚·B - -

      ‚à‚µ‘Ήž‚·‚é‘å•¶Žš‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Í c ‚ª‚»‚Ì‚Ü‚Ü -v ‚ÉŠi”[‚³‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_context_requiredA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unicode_tolower -
      -
      -mdn_result_t
      -mdn__unicode_tolower(unsigned long c, mdn__unicode_context_t ctx,
      -	unsigned long *v, size_t vlen, int *convlenp)
      -
      -

      Unicode•¶Žš c ‚ð UnicodeData.txt ‚Ì Uppercase Mapping -î•ñ‚¨‚æ‚Ñ SpecialCasing.txt‚Ìî•ñ‚É‚µ‚½‚ª‚Á‚Ĭ•¶Žš‚ɕϊ·‚µAŒ‹‰Ê‚ð -v ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·Bvlen ‚Í‚ ‚ç‚©‚¶‚ß -v ‚ÉŠm•Û‚µ‚½—̈æ‚̑傫‚³‚Å‚·B•ÏŠ·Œ‹‰Ê‚Ì•¶Žš”‚Í -*convlenp ‚ɕԂ³‚ê‚Ü‚·B -•ÏŠ·Œ‹‰Ê‚ª•¡”‚Ì•¶Žš‚ɂȂ邱‚Æ‚ª‚ ‚邱‚ƂɒˆÓ‚µ‚Ä‚­‚¾‚³‚¢B -‚Ü‚½ƒƒP[ƒ‹ˆË‘¶‚̕ϊ·‚Ís‚¢‚Ü‚¹‚ñB - -

      ctx ‚Í•¶Žš c ‚ÌoŒ»‚·‚é -•¶–¬î•ñ‚Å‚·B -‚Ù‚Æ‚ñ‚ǂ̕¶Žš‚ł͕ϊ·‚ÌÛ‚É•¶–¬î•ñ‚Í•s—v‚È‚½‚ßA -’Êí‚Í mdn__unicode_context_unknown ‚ðŽw’肵‚Ä‚¨‚­‚±‚Æ‚ª‚Å‚«‚Ü‚·B -‚à‚µ•¶–¬î•ñ‚ª•K—v‚Èê‡A–{ŠÖ”‚Í–ß‚è’l‚Æ‚µ‚Ä mdn_context_required -‚ð•Ô‚·‚Ì‚ÅA•¶–¬î•ñ‚ðŽæ“¾‚µ‚Ä‚©‚ç‰ü‚߂ČĂÑo‚·‚±‚Æ‚ª‰Â”\‚Å‚·B -•¶–¬î•ñ‚̎擾‚É‚Í -mdn__unicode_getcontext ‚ðŽg—p‚µ‚Ü‚·B - -

      ‚à‚µ‘Ήž‚·‚鬕¶Žš‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Í c ‚ª‚»‚Ì‚Ü‚Ü -v ‚ÉŠi”[‚³‚ê‚Ü‚·B - -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_context_requiredA -mdn_buffer_overflow -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unicode_getcontext -
      -
      -mdn__unicode_context_t
      -mdn__unicode_getcontext(unsigned long c)
      -
      -

      ‘å•¶Žš¬•¶Žš•ÏŠ·‚Å—p‚¢‚ç‚ê‚é•¶–¬î•ñ‚ð•Ô‚µ‚Ü‚·B -•¶–¬î•ñ‚ðŽæ“¾‚·‚é‚ɂ͎Ÿ‚̂悤‚É‚µ‚Ü‚·B -‚Ü‚¸‘å•¶Žš¬•¶Žš•ÏŠ·‚Ì‘ÎÛ•¶Žš‚É‘±‚­ŽŸ‚Ì•¶Žš‚ðŽæ“¾‚µA‚±‚ÌŠÖ”‚ð -ŒÄ‚Ño‚µ‚Ü‚·B‚à‚µ•Ô‚³‚ê‚é’l‚ª mdn__unicode_context_final -‚ ‚é‚¢‚Í mdn__unicode_context_nonfinal ‚Ì‚¢‚¸‚ê‚©‚Å‚ ‚ê‚Î -‚»‚ꂪ‹‚߂镶–¬î•ñ‚Å‚·B -mdn__unicode_context_unknown ‚Ìꇂɂ͂³‚ç‚É‘±‚­•¶Žš‚ðŽæ“¾‚µA -‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚Ü‚·B‚±‚̂悤‚É‚µ‚Ä mdn__unicode_context_final -‚© mdn__unicode_context_nonfinal ‚©‚¢‚¸‚ê‚©‚Ì’l‚ª“¾‚ç‚ê‚é‚܂Š-ˆ—‚ðŒJ‚è•Ô‚µ‚Ü‚·B‚à‚µ•¶Žš—ñ‚ÌÅŒã‚܂ŗˆ‚½ê‡‚É‚ÍA•¶–¬‚Í -mdn__unicode_context_final ‚ƂȂè‚Ü‚·B - -

      ‹ï‘Ì“I‚ɂ͂±‚ÌŠÖ”‚ÍŽŸ‚̂悤‚Ȉ—‚ðs‚¢‚Ü‚·B -Unicode •¶Žš c ‚Ì "General Category" ‘®«‚ðŽQÆ‚µA -‚»‚ꂪ "Lu" "Ll" "Lt" ‚Ì‚¢‚¸‚ê‚©‚Å‚ ‚ê‚Î -mdn__unicode_context_nonfinal ‚ðA"Mn" ‚Å‚ ‚ê‚Î -mdn__unicode_context_unknown ‚ðA‚»‚êˆÈŠO‚Å‚ ‚ê‚Î -mdn__unicode_context_final ‚ð•Ô‚µ‚Ü‚·B - -

      - -
      - -

      unormalize ƒ‚ƒWƒ…[ƒ‹

      - -

      unormalize ƒ‚ƒWƒ…[ƒ‹‚ÍAUnicode ‚Å’è‹`‚³‚ê‚Ä‚¢‚é•W€‚̳‹K‰»‚ð -s‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·BUnicode ‚̳‹K‰»‚Í -Unicode Technical Report #15: Unicode Normalization Forms -‚Å’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B–{ƒ‚ƒWƒ…[ƒ‹‚Í‚±‚Ì•¶‘‚É‚ ‚°‚ç‚ꂽ4‚‚̳‹K‰»Œ`Ž®‚ð -ŽÀ‘•‚µ‚Ä‚¢‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn__unormalize_formc -
      -
      -mdn_result_t
      -mdn__unormalize_formc(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form C ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unormalize_formd -
      -
      -mdn_result_t
      -mdn__unormalize_formd(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form D ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unormalize_formkc -
      -
      -mdn_result_t
      -mdn__unormalize_formkc(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form KC ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn__unormalize_formkd -
      -
      -mdn_result_t
      -mdn__unormalize_formkd(const char *from, char *to, size_t tolen)
      -
      -

      UTF-8‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ from ‚ɑ΂µ‚Ä -³‹K‰» Unicode Normalization Form KD ‚ð“K—p‚µA‚»‚ÌŒ‹‰Ê‚ð -to ‚¨‚æ‚Ñ tolen ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚݂܂·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_invalid_encodingA -mdn_buffer_overflowA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - -
      - -

      utf5 ƒ‚ƒWƒ…[ƒ‹

      - -

      utf5 ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ûŽ®‚̈ê‚‚Ƃµ‚Ä -’ñˆÄ‚³‚ê‚Ä‚¢‚é -UTF-5 ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚ÌŠî–{ˆ—‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_utf5_getwc -
      -
      -int
      -mdn_utf5_getwc(const char *s, size_t len,
      -	unsigned long *vp)
      -
      -

      UTF-5‚ŃGƒ“ƒR[ƒh‚³‚ꂽ’·‚³ len ƒoƒCƒg‚Ì•¶Žš—ñ s ‚Ì -擪‚Ì•¶Žš‚ðŽæ‚èo‚µAUCS-4 ‚ɕϊ·‚µ‚Ä vp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚·‚邯 -‚Æ‚à‚ÉA•¶Žš‚Ì (UTF-5ƒGƒ“ƒR[ƒh‚Å‚Ì) ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·B -‚à‚µ len ‚ª’Z‚·‚¬‚Ä•¶Žš‚Ì“r’†‚ÅI‚í‚Á‚Ä‚¢‚½‚èAƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª -ŠÔˆá‚Á‚Ä‚¢‚éê‡‚É‚Í 0 ‚ª•Ô‚³‚ê‚Ü‚·B -

      - -

      mdn_utf5_putwc -
      -
      -int
      -mdn_utf5_putwc(char *s, size_t len, unsigned long v)
      -
      -

      UCS-4 •¶Žš v ‚ðUTF-5ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µAs -‚¨‚æ‚Ñ len ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚ނƂƂà‚ÉA‘‚«ž‚ñ‚¾ƒoƒCƒg”‚ð -•Ô‚µ‚Ü‚·B‚½‚¾‚µ len ‚ª’Z‚·‚¬‚Ä‘‚«ž‚߂Ȃ¢ê‡‚É‚Í0‚ð•Ô‚µ‚Ü‚·B -

      ‘‚«ž‚ñ‚¾UTF-5•¶Žš—ñ‚Í NUL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB - -

      - -
      - -

      utf8 ƒ‚ƒWƒ…[ƒ‹

      - -

      utf8 ƒ‚ƒWƒ…[ƒ‹‚ÍUTF-8 ‚ŃGƒ“ƒR[ƒh‚³‚ꂽ•¶Žš—ñ‚ÌŠî–{ˆ—‚ðs‚¤ -ƒ‚ƒWƒ…[ƒ‹‚Å‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_utf8_mblen -
      -
      -int
      -mdn_utf8_mblen(const char *s)
      -
      -

      UTF-8 •¶Žš—ñ s ‚Ìæ“ª•¶Žš‚Ì’·‚³(ƒoƒCƒg”)‚ð•Ô‚µ‚Ü‚·B -‚à‚µ s ‚ªŽw‚·ƒoƒCƒg‚ª UTF-8 ‚Ìæ“ªƒoƒCƒg‚Æ‚µ‚ij‚µ‚­‚È‚¢‚à‚̂ł ‚é -ê‡‚É‚Í 0 ‚ð•Ô‚µ‚Ü‚·B -

      ‚±‚ÌŠÖ”‚Í s ‚Ìæ“ªƒoƒCƒg‚݂̂𒲂ׂĒ·‚³‚ð•Ô‚µ‚Ü‚·B‚µ‚½‚ª‚Á‚Ä -2ƒoƒCƒg–ÚˆÈ~‚É•s³‚ȃoƒCƒg‚ª‚ ‚é‰Â”\«‚ª‘¶Ý‚µ‚Ü‚·B“Á‚É“r’†‚É NUL ƒoƒCƒg‚ª -‚ ‚é‰Â”\«‚à‚ ‚é‚Ì‚ÅAs ‚ª³“–‚È UTF-8 •¶Žš—ñ‚Å‚ ‚邱‚Æ‚ªŠmŽÀ‚Å‚Í -‚È‚¢ê‡‚ɂ͋C‚ð‚‚¯‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      - -

      mdn_utf8_getmb -
      -
      -int
      -mdn_utf8_getmb(const char *s, size_t len, char *buf)
      -
      -

      ’·‚³ len ƒoƒCƒg‚Ì UTF-8 •¶Žš—ñ s ‚Ìæ“ª‚Ì1•¶Žš‚ð -buf ‚ɃRƒs[‚µAƒRƒs[‚µ‚½ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·B -‚à‚µ len ‚ª’Z‚·‚¬‚½‚èAs ‚ªŽw‚·•¶Žš‚ª UTF-8 ‚Æ‚µ‚Ä -³‚µ‚­‚È‚¢ê‡‚ɂ̓Rƒs[‚Ís‚킸A0 ‚ð•Ô‚µ‚Ü‚·B -

      buf ‚Í”CˆÓ‚Ì UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì•¶Žš‚ª•ÛŽ‚Å‚«‚é‘å‚«‚³ -‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB‚·‚Ȃ킿A6ƒoƒCƒgˆÈã‚Ì’·‚³‚ðŽ‚Á‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      ‘‚«ž‚ñ‚¾UTF-8•¶Žš—ñ‚Í NUL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB -

      - -

      mdn_utf8_getwc -
      -
      -int
      -mdn_utf8_getwc(const char *s, size_t len,
      -	unsigned long *vp)
      -
      -

      mdn_utf8_getmb ‚Ƃقړ¯‚¶‚Å‚·‚ªA -s ‚©‚çŽæ‚èo‚µ‚½•¶Žš‚ð -UCS-4‚ɕϊ·‚µ‚Ä vp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚·‚邯‚±‚낪ˆÙ‚È‚è‚Ü‚·B -

      - -

      mdn_utf8_putwc -
      -
      -int
      -mdn_utf8_putwc(char *s, size_t len, unsigned long v)
      -
      -

      UCS-4 •¶Žš v ‚ð UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚ÄA -s ‚¨‚æ‚Ñ len ‚ÅŽw’肳‚ê‚é—̈æ‚É‘‚«ž‚ނƂƂà‚ÉA -‘‚«ž‚ñ‚¾ƒoƒCƒg”‚ð•Ô‚µ‚Ü‚·Bv ‚Ì’l‚ª•s³‚Å‚ ‚Á‚½‚è -len ‚ª’Z‚·‚¬‚½ê‡‚É‚Í 0 ‚ð•Ô‚µ‚Ü‚·B -

      ‘‚«ž‚ñ‚¾UTF-8•¶Žš—ñ‚Í NUL •¶Žš‚ÅI’[‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB -

      - -

      mdn_utf8_isvalidstring -
      -
      -int
      -mdn_utf8_isvalidstring(const char *s)
      -
      -

      NUL •¶Žš‚ÅI’[‚³‚ꂽ•¶Žš—ñ s ‚ª³‚µ‚¢ UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO -‚Å‚ ‚é‚©‚Ç‚¤‚©’²‚×A³‚µ‚¯‚ê‚Î 1 ‚ðA³‚µ‚­‚È‚¯‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B -

      - -

      mdn_utf8_findfirstbyte -
      -
      -char *
      -mdn_utf8_findfirstbyte(const char *s,
      -	const char *known_top)
      -
      -

      •¶Žš—ñ known_top ’†‚Ì s ‚ªŽw‚·ƒoƒCƒg‚ðŠÜ‚Þ -UTF-8 •¶Žš‚Ìæ“ªƒoƒCƒg‚𒲂ׂĕԂµ‚Ü‚·B‚»‚Ì•¶Žš‚ª³‚µ‚¢ UTF-8 -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ł͂Ȃ¢ê‡Aknown_top ‚©‚ç s ‚Ü‚Å‚Ì -ŠÔ‚Éæ“ªƒoƒCƒg‚ª‚È‚©‚Á‚½ê‡‚É‚Í NULL ‚ð•Ô‚µ‚Ü‚·B - -

      - -
      - -

      util ƒ‚ƒWƒ…[ƒ‹

      - -

      util ƒ‚ƒWƒ…[ƒ‹‚Í‘¼‚̃‚ƒWƒ…[ƒ‹‚ÅŽg‚í‚ê‚郆[ƒeƒBƒŠƒeƒB[“I‚È -‹@”\‚ð’ñ‹Ÿ‚·‚郂ƒWƒ…[ƒ‹‚Å‚·B -Œ»Ý‚̂Ƃ±‚ë‚Í‘å•¶Žš¬•¶Žš‚Ì‹æ•Ê‚ð‚µ‚È‚¢•¶Žš—ñƇ‚Ì‹@”\‚݂̂ð -’ñ‹Ÿ‚µ‚Ä‚¢‚Ü‚·B - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      -
      mdn_util_casematch -
      -
      -int
      -mdn_util_casematch(const char *s1, const char *s2, size_t n)
      -
      -

      •¶Žš—ñ s1 ‚Æ s2 ‚Ìæ“ª‚©‚çÅ‘å n ƒoƒCƒg‚ð -”äŠr‚µA“¯ˆê‚©‚Ç‚¤‚©‚𔻒肵‚Ü‚·B -ASCII •¶Žš‚Ì‘å•¶Žš‚Ƭ•¶Žš (‚‚܂è A ‚©‚ç Z ‚Æ a ‚©‚ç z) ‚Í“¯ˆê‚Ƃ݂Ȃµ‚Ü‚·B -“¯ˆê‚Å‚ ‚ê‚Î 1 ‚ðAˆá‚Á‚Ä‚¢‚ê‚Î 0 ‚ð•Ô‚µ‚Ü‚·B -‚±‚ê‚Í‘½‚­‚̃VƒXƒeƒ€‚Å—pˆÓ‚³‚ê‚Ä‚¢‚é strcasencmp ‚ƕԂè’l‚ÌŽd—l‚ð -œ‚¯‚΂قړ¯—l‚Ì‹@”\‚ð’ñ‹Ÿ‚·‚éŠÖ”‚Å‚·B -

      -

      - -


      - -

      zldrule ƒ‚ƒWƒ…[ƒ‹

      - -

      zldrule ƒ‚ƒWƒ…[ƒ‹‚̓hƒƒCƒ“–¼‚Æ ZLD ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·B -ƒhƒƒCƒ“–¼‚ÉŽg—p‚³‚ê‚é‰Â”\«‚Ì‚ ‚é ZLD ‚ÌƒŠƒXƒg‚Æ‚»‚ꂼ‚ê‚Ì ZLD ‚ɑΉž‚µ‚½ -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌƒŠƒXƒg‚ðŽ‚¿A—^‚¦‚ç‚ꂽƒhƒƒCƒ“–¼‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðs‚Á‚Ä -ƒ}ƒbƒ`‚µ‚½ ZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•Ô‚µ‚Ü‚·B - -

      zldrule ƒ‚ƒWƒ…[ƒ‹‚̓}ƒbƒ`ƒ“ƒO‚Ì‚½‚ß‚ÉuƒRƒ“ƒeƒLƒXƒgv‚Æ‚¢‚¤ŠT”O‚ð—p‚¢‚Ü‚·B -ƒ}ƒbƒ`ƒ“ƒO‚Éæ—§‚Á‚Ă܂¸ƒRƒ“ƒeƒLƒXƒg‚ð쬂µA‚»‚ê‚ɑ΂µ‚Ä -ZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð“o˜^‚µ‚Ä‚¢‚«‚Ü‚·B -‚»‚µ‚ÄŽÀۂɃhƒƒCƒ“–¼‚ƃ}ƒbƒ`ƒ“ƒO‚ðs‚¤Û‚ɂ͂±‚̃Rƒ“ƒeƒLƒXƒg‚ð—p‚¢‚Ä -ƒ}ƒbƒ`ƒ“ƒO‚ÉŽg—p‚·‚éZLD ‚ƃGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌƒŠƒXƒg‚ðŽw’肵‚Ü‚·B -ƒRƒ“ƒeƒLƒXƒg‚ÌŒ^‚Í -mdn_zldrule_t Œ^‚Å‚ ‚èAŽŸ‚̂悤‚È opaque Œ^‚Æ‚µ‚Ä’è‹`‚³‚ê‚Ä‚¢‚Ü‚·B -

      -
      -typedef struct mdn_zldrule *mdn_zldrule_t;
      -
      -
      - -

      ˆÈ‰º‚Ƀ‚ƒWƒ…[ƒ‹‚Ì’ñ‹Ÿ‚·‚éAPIŠÖ”‚ðŽ¦‚µ‚Ü‚·B - -

      - -
      mdn_zldrule_create -
      -
      -mdn_result_t
      -mdn_zldrule_create(mdn_zldrule_t *ctxp)
      -
      -

      ZLD‚̃}ƒbƒ`ƒ“ƒO‚ðs‚¤‚½‚߂̃Rƒ“ƒeƒLƒXƒg‚ð쬂µA -ctxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_zldrule_destroy -
      -
      -void
      -mdn_zldrule_destroy(mdn_zldrule_t ctx)
      -
      -

      mdn_zldrule_create ‚Å쬂µ‚½ -ƒRƒ“ƒeƒLƒXƒg ctx ‚ð휂µAŠm•Û‚µ‚½ƒƒ‚ƒŠ‚ð‰ð•ú‚µ‚Ü‚·B -

      - -

      mdn_zldrule_add -
      -
      -mdn_result_t
      -mdn_zldrule_add(mdn_zldrule_t ctx, const char *zld,
      -	const char **encodings, int nencodings)
      -
      -

      mdn_zldrule_create ‚Å쬂µ‚½ -ƒRƒ“ƒeƒLƒXƒg ctx ‚ÉAZLD zld ‚Æ -encodings ‚¨‚æ‚Ñ nencodings ‚ÅŽw’肳‚ê‚é -ƒGƒ“ƒR[ƒfƒBƒ“ƒOƒŠƒXƒg‚Ì‘g‚ð“o˜^‚µ‚Ü‚·B -

      ‹ó‚Ì ZLDA‚‚܂è "" ‚â "." ‚Í”CˆÓ‚̃hƒƒCƒ“–¼‚Ƀ}ƒbƒ`‚µ‚Ü‚·B -‚µ‚½‚ª‚Á‚ÄZLD‚Æ‚µ‚Ä‹ó‚Ì’l‚ðŽw’è‚·‚邱‚Ƃɂæ‚Á‚ÄA‚¢‚¸‚ê‚Ì -ZLD ‚É‚àƒ}ƒbƒ`‚µ‚È‚©‚Á‚½ê‡‚̃fƒtƒHƒ‹ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’è‚·‚邱‚Æ‚ª -‰Â”\‚Å‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_nomemory -‚Ì‚¢‚¸‚ê‚©‚Å‚·B -

      - -

      mdn_zldrule_select -
      -
      -mdn_result_t
      -mdn_zldrule_select(mdn_zldrule_t ctx, const char *domain,
      -	char **zldp, mdn_converter_t *convctxp)
      -
      -

      ƒRƒ“ƒeƒLƒXƒg ctx ‚Ɋ܂܂ê‚Ä‚¢‚é ZLD ‚ÌƒŠƒXƒg‚Æ -ƒhƒƒCƒ“–¼ domain ‚Ƃ̃}ƒbƒ`ƒ“ƒO‚ðŽŽ‚Ý‚Ü‚·Bƒ}ƒbƒ`ƒ“ƒO‚Í -ZLD‚ª’·‚¢ (ZLD ‚ð\¬‚·‚郉ƒxƒ‹‚Ì”‚ª‘½‚¢) ‚à‚Ì‚©‚燂És‚í‚ê‚Ü‚·B -

      ƒ}ƒbƒ`‚·‚éZLD‚ª‚ ‚Á‚½ê‡Azldp ‚ÌŽw‚·—̈æ‚ÉAƒ}ƒbƒ`‚µ‚½ -ZLD ‚ւ̃|ƒCƒ“ƒ^‚ªŠi”[‚³‚ê‚Ü‚·B•Ô‚³‚ê‚éƒ|ƒCƒ“ƒ^‚Í‚·‚Å‚É -mdn_translator_canonicalzld -‚É‚æ‚Á‚Ä•W€Œ`Ž®‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅA‚»‚Ì‚Ü‚Ü -mdn_translator_translate ‚Ö‚Ì -ˆø”‚Æ‚µ‚Ä“n‚·‚±‚Æ‚ª‚Å‚«‚Ü‚·B -

      ƒ}ƒbƒ`‚µ‚½ZLD ‚ɑΉž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªˆê‚‚¾‚¯‚È‚çA‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO -‚ɑΉž‚·‚éƒR[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ª convctxp ‚ÌŽw‚·—̈æ‚É -Ši”[‚³‚ê‚Ü‚·B -‘Ήž‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª•¡”‚ ‚ê‚ÎAƒŠƒXƒg‚Ìæ“ª‚©‚ç‡‚É -domain ‚ª‚»‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚ij‚µ‚¢‚©‚Ç‚¤‚©‚𒲂ׂ܂·B -‚à‚µ³‚µ‚¢‚à‚Ì‚ª‚ ‚ê‚ÎAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚̂̃R[ƒh•ÏŠ·ƒRƒ“ƒeƒLƒXƒg‚ª -convctxp ‚ÌŽw‚·—̈æ‚ÉŠi”[‚³‚ê‚Ü‚·B³‚µ‚¢‚à‚Ì‚ª‚È‚¯‚ê‚Î -convctxp ‚ɂ͉½‚à‘‚«ž‚܂ꂸAmdn_invalid_encoding‚ª -•Ô‚³‚ê‚Ü‚·B -

      ƒ}ƒbƒ`‚·‚é ZLD ‚ª‚È‚¯‚ê‚Î mdn_notfound‚ð•Ô‚µ‚Ĉ—‚ðI—¹‚µ‚Ü‚·B -

      •Ô‚³‚ê‚é’l‚Í -mdn_successA -mdn_notfoundA -mdn_invalid_encoding -‚Ì‚¢‚¸‚ê‚©‚Å‚·B - -

      - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/mdnconv.html b/contrib/idn/mdnkit/doc/ja/spec/mdnconv.html deleted file mode 100644 index c0eeb457a8..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/mdnconv.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - -mdnconv specification - - - - -

      mdnconv

      - -

       

      - -

      ŠT—v

      - -

      mdnconv ‚̓l[ƒ€ƒT[ƒo‚ÌÝ’èƒtƒ@ƒCƒ‹ named.conf ‚â -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì‚½‚߂̃R[ƒhƒZƒbƒg (ƒGƒ“ƒR[ƒfƒBƒ“ƒO) •ÏŠ·ƒc[ƒ‹‚Å‚·B -

      mdnconv ‚͈ø”‚ÅŽw’肳‚ꂽƒtƒ@ƒCƒ‹A‚ ‚é‚¢‚Í•W€“ü—Í‚©‚ç -ƒeƒLƒXƒg‚ð“ü—Í‚µAƒIƒvƒVƒ‡ƒ“‚ÅŽw’肳‚ꂽƒR[ƒhƒZƒbƒg•ÏŠ·‚¨‚æ‚ѳ‹K‰»‚ð -ŽÀs‚µAŒ‹‰Ê‚ð•W€o—͂ɑ‚«o‚µ‚Ü‚·B - -

      ‹ï‘Ì“I‚ÈŽg‚¢•û‚ÉŠÖ‚µ‚Ă͗˜—pŽÒƒKƒCƒh‚Ì -named.confA -ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚Ì쬂̀‚ð‚²——‚­‚¾‚³‚¢B - -

      - -

      ‹N“®

      - -
      -
      -% mdnconv [ƒIƒvƒVƒ‡ƒ“...]  [ƒtƒ@ƒCƒ‹...]
      -
      -
      - -

      ƒIƒvƒVƒ‡ƒ“

      - -
      -
      -in in-code -
      “ü—̓eƒLƒXƒg‚̃R[ƒhƒZƒbƒg–¼ in-code ‚ðŽw’肵‚Ü‚·B - in-code ‚ÉŽw’è‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚ÍAŽŸ‚Ì‚¢‚¸‚ê‚©‚Å‚·B -
        -
      • iconv_open() ‚ªŽó‚¯•t‚¯‚éƒR[ƒhƒZƒbƒg–¼ -
      • UTF-5 -
      • RACE -
      • BRACE -
      • LACE -
      • ã‹L‚̃R[ƒhƒZƒbƒg–¼‚̕ʖ¼ (-alias ƒIƒvƒVƒ‡ƒ“ŽQÆ) -
      -

      Žw’肵‚È‚©‚Á‚½ê‡‚ɂ͌»Ý‚̃ƒP[ƒ‹‚©‚çƒfƒtƒHƒ‹ƒg‚̃R[ƒhƒZƒbƒg‚ð - ‹‚߂܂·B -

      -

      -out out-code -
      o—̓eƒLƒXƒg‚̃R[ƒhƒZƒbƒg–¼ out-code ‚ðŽw’肵‚Ü‚·B - out-code ‚ÉŽw’è‚Å‚«‚éƒR[ƒhƒZƒbƒg–¼‚Í - -in ƒIƒvƒVƒ‡ƒ“‚Ì in-code ‚Æ“¯‚¶‚Å‚·B -

      Žw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - - ƒT[ƒoƒGƒ“ƒR[ƒfƒBƒ“ƒOƒGƒ“ƒgƒŠ - ‚Éݒ肳‚ê‚Ä‚¢‚éƒR[ƒhƒZƒbƒg‚ªŽg—p‚³‚ê‚Ü‚·B -

      -

      -normalize scheme -
      ³‹K‰»‚Ì•ûŽ®‚ðŽw’肵‚Ü‚·Bscheme‚ÉŽw’è‚Å‚«‚é•ûŽ®‚Í - ŽŸ‚Ì‚¢‚¸‚ê‚©‚Å‚·B -
        -
      • ascii-uppercase -
      • ascii-lowercase -
      • unicode-uppercase -
      • unicode-lowercase -
      • unicode-form-c -
      • unicode-form-kc -
      • ja-kana-fullwidth -
      • ja-alnum-halfwidth -
      • ja-compose-voiced-sound -
      • ja-minus-hack -
      • ja-delimiter-hack -
      - ŒÂX‚̳‹K‰»•ûŽ®‚ɂ‚¢‚Ä‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - normalizer ƒ‚ƒWƒ…[ƒ‹‚ð‚²——‚­‚¾‚³‚¢B -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚Í•¡”Žw’è‚·‚邱‚Æ‚ª‰Â”\‚Å‚·B•¡”Žw’肵‚½ê‡‚É‚ÍA - Žw’肵‚½‡‚ɳ‹K‰»‚ªs‚í‚ê‚Ü‚·B - -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - ³‹K‰»ƒGƒ“ƒgƒŠ‚É - Žw’肳‚ê‚Ä‚¢‚鳋K‰»•ûŽ®‚ªŽg—p‚³‚ê‚Ü‚·B -

      -

      -zld ZLD -
      Žg—p‚·‚é ZLD ‚ðŽw’肵‚Ü‚·B•ÏŠ·‚³‚ê‚éƒhƒƒCƒ“–¼‚ª - ƒsƒŠƒIƒh‚ÅI‚í‚é FQDN ‚ÅA‚©‚ÂŌオ ZLD ‚Æ - ˆê’v‚µ‚½ê‡‚É‚ÍAˆê’v‚µ‚½•”•ª‚͕ϊ·‘ÎÛ‚©‚çŠO‚³‚ê‚Ü‚·B - ‚±‚ê‚Í UTF-5 ‚ȂLjꕔ‚Ì ASCIIŒÝŠ·ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É‚¨‚¢‚ÄAZLD •”•ª‚ª - •ÏŠ·‚³‚ê‚È‚¢‚悤‚É‚·‚邽‚߂ɂ·‚邽‚߂ɕK—v‚Ȉ—‚Å‚·B -

      ‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚©‚Á‚½ê‡‚É‚Í - ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚Ì - ƒT[ƒo ZLD ƒGƒ“ƒgƒŠ‚É - Žw’肳‚ê‚Ä‚¢‚é’l‚ªŽg—p‚³‚ê‚Ü‚·B -

      -

      -auto -
      -zld ƒIƒvƒVƒ‡ƒ“‚Æ‘g‚݇‚킹‚ÄŽg—p‚µ‚Ü‚·B - ‚à‚µ•ÏŠ·‘ÎÛ‚Å‚ ‚éA”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚ÌŌオ - ƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¢‚½ê‡‚ÉA-zld ƒIƒvƒVƒ‡ƒ“‚ÅŽw’肵‚½ ZLD - ‚ª‚»‚Ì‚ ‚ƂɎ©“®“I‚É•t‰Á‚³‚ê‚Ü‚·B - ‚±‚ê‚É‚æ‚Á‚ă][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹“™‚É ZLD ‚𖾎¦“I‚É‘‚­•K—v‚ª - ­‚È‚­‚È‚è‚Ü‚·‚ªA‚±‚̕⊮‹@”\‚ÍŠ®‘S‚ł͂Ȃ¢‚Ì‚ÅA–¾Ž¦“I‚É ZLD ‚ð - ‘‚©‚È‚¯‚ê‚΂Ȃç‚È‚¢ê‡‚à‚ ‚è‚Ü‚·Bˆê”Ê“I‚ɂ͂±‚Ì‹@”\‚É - —Š‚ç‚È‚¢•û‚ª‚æ‚¢‚Å‚µ‚傤B -

      -

      -whole -
      ³‹K‰»‚ƃ^[ƒQƒbƒgƒR[ƒhƒZƒbƒg‚ւ̕ϊ·‚ð - “ü—Í‚³‚ꂽƒeƒLƒXƒg‘S‘̂ɑ΂µ‚Äs‚¢‚Ü‚·B‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’肵‚È‚¯‚ê‚Î - ”ñASCII•¶Žš‚ðŠÜ‚ÞƒhƒƒCƒ“–¼‚¾‚Æ”»’f‚³‚ꂽ•”•ª‚݂̂ª•ÏŠ·‘ÎÛ‚Æ - ‚È‚è‚Ü‚·BÚׂ͕ϊ·ˆ—‚ÌÚ×‚ð‚²——‚­‚¾‚³‚¢B -

      -

      -alias path -
      ƒR[ƒhƒZƒbƒg–¼‚̕ʖ¼‚ð’è‹`‚µ‚½ƒtƒ@ƒCƒ‹ path ‚ðŽw’肵‚Ü‚·B - ‚±‚̃tƒ@ƒCƒ‹‚̓eƒLƒXƒgƒtƒ@ƒCƒ‹Œ`Ž®‚ÅA1s‚Ɉê‘g‚¸‚ - ƒR[ƒhƒZƒbƒg–¼‚̕ʖ¼‚Æ³Ž®–¼‚Æ‚ðˆê‚ˆÈã‚̃Xƒy[ƒX‚Å‹æØ‚Á‚Ä‘‚¢‚½ - ‚à‚̂ł·B—Ⴆ‚ÎŽŸ‚Ì—á‚Í Shift_JIS ‚Æ EUC-JP ‚Ì - •Ê–¼‚Æ‚µ‚Ä‚»‚ꂼ‚ê sjisAeuc-jp ‚ð’è‹`‚·‚é‚à‚̂ł·B -
      -
      -# "#" ‚ÅŽn‚Ü‚és‚̓Rƒƒ“ƒg
      -sjis		Shift_JIS
      -euc-jp		EUC-JP
      -
      -
      - -
      -noconf -
      ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ð - “ǂݞ‚܂Ȃ¢‚悤‚É‚µ‚Ü‚·B -

      - -

      -flush -
      s‚²‚Æ‚Éo—Í‚ðƒtƒ‰ƒbƒVƒ…‚µ‚Ü‚·Bmdnconv ‚̓tƒ@ƒCƒ‹‚âƒpƒCƒv‚Ö‚Ì - o—Í‚Ìê‡A’Êí‚Í•¡”s‚̃f[ƒ^‚ð‚܂Ƃ߂đ‚«o‚µ‚Ü‚·‚ªA‚±‚Ì - ƒIƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚邯1s‚²‚Ƃɕϊ·Œ‹‰Ê‚ð‘‚«o‚µ‚Ü‚·B - ’Êí‚Í‚±‚̃IƒvƒVƒ‡ƒ“‚ðŽw’è‚·‚é•K—v‚Í‚ ‚è‚Ü‚¹‚ñ‚ªA - mdnconv ‚ðƒtƒBƒ‹ƒ^ƒvƒƒOƒ‰ƒ€‚Æ‚µ‚Ä‘¼‚̃vƒƒOƒ‰ƒ€‚©‚ç—˜—p‚·‚éê‡‚È‚Ç‚É - •Ö—˜‚È‚±‚Æ‚ª‚ ‚è‚Ü‚·B -
      - -

      •ÏŠ·ˆ—‚ÌÚ×

      - -

      mdnconv ‚ªs‚¤•ÏŠ·ˆ—‚ðƒXƒeƒbƒv‚²‚ƂɋLq‚µ‚Ü‚·B - -

        -
      1. ƒtƒ@ƒCƒ‹‚ ‚é‚¢‚Í•W€“ü—Í‚©‚çƒeƒLƒXƒg‚ð1s“ǂݞ‚݂܂·B -

        -

      2. s––‚̉üsƒR[ƒh‚ðŽæ‚èœ‚«‚Ü‚·B - ‚±‚ê‚Í -whole ƒIƒvƒVƒ‡ƒ“‚ð‚‚¯‚Ä mdnconv ‚ðŽÀs‚µA‚©‚ - o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ª UTF-5 ‚â RACE ‚È‚Ç ASCII ŒÝŠ· - ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÌꇂÉA‰üsƒR[ƒh‚à UTF-5 ‚â RACE ‚Å - ƒGƒ“ƒR[ƒh‚³‚ê‚Ä‚µ‚Ü‚¢A‰üs‚ª‚È‚­‚È‚Á‚Ä‚µ‚Ü‚¤‚Ì‚ð”ð‚¯‚é‚½‚߂ł·B -

        -

      3. s‚ð UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µ‚Ü‚·B•ÏŠ·‚É‚Í - MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì converter ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -

        ’Êí‚Ís‘S‘Ì‚ð UTF-8 ‚ɕϊ·‚µ‚Ü‚·‚ªA“ü—̓R[ƒhƒZƒbƒg‚ª - "RACE" ‚ÌꇂɂÍARACE ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽ¯•Ê‚·‚éƒvƒŠƒtƒBƒbƒNƒX‚ð—p‚¢‚Ä - RACE ƒGƒ“ƒR[ƒh‚³‚ꂽ•”•ª‚Ì‚Ý‚ðŽæ‚èo‚µ‚Ä UTF-8 ‚ɕϊ·‚µ‚Ü‚·B -

        -

      4. •ÏŠ·Œ‹‰Ê‚ª UTF-8 ‚Æ‚µ‚ij‚µ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì utf8 ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B–{—ˆ‚±‚̈—‚Í•s—v‚Ȃ͂¸‚Å‚·‚ªAƒR[ƒh•ÏŠ·‚ÌŽÀ‘•‚É - ƒoƒO‚ª‚ ‚Á‚½ê‡‚É‘‚¢’iŠK‚ÅŒŸo‚Å‚«‚邿‚¤A‚±‚±‚Ń`ƒFƒbƒN‚ð‚·‚é‚æ‚¤‚É - ‚µ‚Ä‚ ‚è‚Ü‚·B -

        -

      5. -whole ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚ê‚ÎŽŸ‚̈—‘ÎÛ‚ÌŽæ‚èo‚µ‚ð”ò‚΂µA - s‘S‘Ì‚ðˆ—‘ÎÛ‚Æ‚µ‚Ä 7. ‚É”ò‚т܂·B -

        -

      6. UTF-8‚ɕϊ·‚³‚ꂽs‚Ì’†‚©‚瑽Œ¾ŒêƒhƒƒCƒ“–¼‚Ì•”•ª‚ðŽæ‚èo‚µ‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - selectiveencode ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·BŽæ‚èo‚³‚ê‚é‚͎̂Ÿ‚̂悤‚È•”•ª•¶Žš—ñ‚Å‚·B -
          -
        • 1•¶ŽšˆÈã‚Ì”ñASCII•¶Žš‚ðŠÜ‚Þ‚±‚ÆB -
        • ]—ˆ‚̃hƒƒCƒ“–¼‚É‹–‚³‚ê‚é•¶Žš (ƒAƒ‹ƒtƒ@ƒxƒbƒgA”ŽšAƒnƒCƒtƒ“)A - ”ñASCII•¶ŽšAƒsƒŠƒIƒh‚¾‚¯‚©‚ç\¬‚³‚ê‚Ä‚¢‚邱‚Æ -
        -

        Žæ‚èo‚³‚ꂽ•”•ª‚݂̂ðˆÈ~‚̳‹K‰»“™‚̈—‘ÎÛ‚Æ‚µ‚Ü‚·B -

        -

      7. ³‹K‰»‚ðs‚¢‚Ü‚·B - ‚±‚ê‚É‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì - normalizer ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -

        -

      8. Ä“x•ÏŠ·Œ‹‰Ê‚ª UTF-8 ‚Æ‚µ‚ij‚µ‚¢ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‚ ‚é‚©‚ðƒ`ƒFƒbƒN‚µ‚Ü‚·B - –{—ˆ‚±‚̈—‚Í•s—v‚Ȃ͂¸‚Å‚·‚ªA³‹K‰»‚ÌŽÀ‘•‚É - ƒoƒO‚ª‚ ‚Á‚½ê‡‚ðl‚¦‚ă`ƒFƒbƒN‚ð“ü‚ê‚Ä‚ ‚è‚Ü‚·B -

        -

      9. ³‹K‰»‚³‚ꂽ•¶Žš—ñ‚ÌŌオƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¨‚èA‚©‚ - -zld ƒIƒvƒVƒ‡ƒ“‚ÅŽw’肳‚ꂽ ZLD ‚Æ•¶Žš—ñ‚ªƒ}ƒbƒ`‚·‚ê‚ÎAZLD ‚Ì•”•ª‚ð - ŽŸ‚̃R[ƒhƒZƒbƒg•ÏŠ·‚Ì‘ÎÛ‚©‚çŠO‚µ‚Ü‚·B‚±‚ê‚Í ZLD ‚Ì•”•ª‚܂Š- (UTF-5 ‚ȂǂÉ) •ÏŠ·‚³‚ê‚Ä‚µ‚Ü‚¤‚Ì‚ð–h‚®‚½‚߂ł·B -

        -

      10. UTF-8 ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç -out ‚ÅŽw’肳‚ꂽo—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µ‚Ü‚·B•ÏŠ·‚É‚Í - MDN ƒ‰ƒCƒuƒ‰ƒŠ‚Ì converter ƒ‚ƒWƒ…[ƒ‹ - ‚ðŽg—p‚µ‚Ü‚·B -

        -

      11. o—̓Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‘O‚Ì•¶Žš—ñ‚ªƒsƒŠƒIƒh‚ÅI‚í‚Á‚Ä‚¨‚èA - ‚©‚ -auto ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚ê‚ÎA•¶Žš—ñ‚ÌŒã‚É ZLD ‚ð•t‰Á‚µ‚Ü‚·B -

        -

      12. -whole ƒIƒvƒVƒ‡ƒ“‚ªŽw’肳‚ê‚Ä‚¢‚½ê‡‚ɂ͕ϊ·‚³‚ꂽ•¶Žš—ñ‚ð‚»‚Ì‚Ü‚Ü - •W€o—Í‚Éo—Í‚µ‚Ü‚·B - Žw’肳‚ê‚Ä‚¢‚È‚©‚Á‚½ê‡‚É‚ÍA•ÏŠ·‚³‚ꂽ•¶Žš—ñ‚Æ 6. ‚ň—‘ÎÛ‚Æ - ‚È‚ç‚È‚©‚Á‚½•”•ª‚Æ‚ðƒ}[ƒW‚µ‚Ä‚©‚ç‚â‚Í‚è•W€o—Í‚Éo—Í‚µ‚Ü‚·B - ‚Ç‚¿‚ç‚ÌꇂàÅŒã‚ɉüsƒR[ƒh‚ðo—Í‚µ‚Ü‚·B -

        -

      13. ‚·‚ׂĂ̓ü—Ís‚ðˆ—‚µI‚í‚ê‚ÎI—¹‚µ‚Ü‚·B‚»‚¤‚łȂ¯‚ê‚Î 1. ‚É - –ß‚è‚Ü‚·B -
      - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/runmdn.html b/contrib/idn/mdnkit/doc/ja/spec/runmdn.html deleted file mode 100644 index 1aeea93ea7..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/runmdn.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - -runmdn specification - - - - - -

      runmdn

      - -

       

      - -

      ŠT—v

      - -

      runmdn ‚Í BIND-4 ‚ ‚é‚¢‚Í BIND-8 ‚ðƒx[ƒX‚Æ‚µ‚½ -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðŽ‚ÂƒNƒ‰ƒCƒAƒ“ƒg‚ðA -ăRƒ“ƒpƒCƒ‹‚È‚µ‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B -

      - -

      ‹N“®

      - -
      -
      -% runmdn ƒRƒ}ƒ“ƒh [ˆø”...]
      -
      -
      - -

      —Ⴆ‚Î telnet ƒRƒ}ƒ“ƒh‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¤‚½‚ß‚É‚Í -ŽŸ‚̂悤‚É‚µ‚Ü‚·B -

      -
      -% runmdn telnet ƒƒOƒCƒ“.‚Ç‚±‚©‚̉ïŽÐ.jp
      -
      -
      - -

      ŽÀ‘•

      - -

      runmdn ‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@\‚ð—p‚¢‚ÄA•W€‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Ɋ܂܂ê‚éŠÖ”‚̈ꕔ‚ðA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‹@”\‚ðŽ‚Â -•ʂ̃o[ƒWƒ‡ƒ“‚É“®“I‚É’uŠ·‚¦‚邱‚Æ‚ÅAƒNƒ‰ƒCƒAƒ“ƒg‚ł̑½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‚ðŽÀŒ»‚µ‚Ü‚·B - -

      ‘½‚­‚̃VƒXƒeƒ€‚ł͋¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‚͊‹«•Ï” -LD_PRELOAD ‚ð—p‚¢‚ÄŽÀŒ»‚³‚ê‚Ä‚¢‚Ü‚·B‚±‚̊‹«•Ï”‚ɃvƒŠƒ[ƒh‚µ‚½‚¢ -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚邯AƒNƒ‰ƒCƒAƒ“ƒg‚ÌŽÀsŽž‚ÉA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É•W€‚Ì‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªƒŠƒ“ƒN‚³‚ê‚é‘O‚É -Žw’肵‚½ƒ‰ƒCƒuƒ‰ƒŠ‚ªƒŠƒ“ƒN‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚Á‚Ä•W€‚̃‰ƒCƒuƒ‰ƒŠŠÖ”‚ð -’uŠ·‚¦‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -

      ‚µ‚½‚ª‚Á‚ÄArunmdn ‚ÌŽÀ‘Ì‚ÍA‚±‚̊‹«•Ï”‚ðݒ肵Aˆø”‚Å -Žw’肳‚ꂽƒRƒ}ƒ“ƒh‚ð‹N“®‚·‚邾‚¯‚̃VƒFƒ‹ƒXƒNƒŠƒvƒg‚Å‚ ‚èAŽÀÛ‚É -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ðs‚¤‚̂̓AƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚é -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ libmdnresolv ‚Å‚·B - -

      libmdnresolv ‚ðƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚èABIND4 ‚ ‚é‚¢‚Í BIND8 ƒx[ƒX‚Ì -ƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Å—p‚¢‚ç‚ê‚Ä‚¢‚鎟‚ÌŠÖ”‚ª’u‚«Š·‚í‚è‚Ü‚·B -

      -
      -dn_comp
      -dn_expand
      -res_hnok
      -res_ownok
      -res_mailok
      -res_dnok
      -
      -
      - -

      ‚»‚ꂼ‚ê‚Ì•ÏX“_‚ðŠÈ’P‚É‹Lq‚µ‚Ü‚·B -

      -
      dn_comp
      -Žw’肳‚ꂽƒhƒƒCƒ“–¼‚ð DNS ƒvƒƒgƒRƒ‹‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“ƒf[ƒ^‚ɕϊ·‚·‚é‘O‚ÉA -ƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚©‚ç DNS ƒvƒƒgƒRƒ‹ã‚Å—p‚¢‚ç‚ê‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Ö‚Ì -•ÏŠ·‚¨‚æ‚ѳ‹K‰»A(•K—v‚È‚ç‚Î) ZLD‚Ì•t‰Á‚ðs‚¢‚Ü‚·B -
      dn_expand
      -DNS ƒvƒƒgƒRƒ‹‚Å—p‚¢‚ç‚ê‚éƒhƒƒCƒ“ƒf[ƒ^‚ðƒhƒƒCƒ“–¼•¶Žš—ñ‚ɕϊ·‚µ‚½ŒãA -(•K—v‚È‚ç) ZLD ‚ð휂µAƒ[ƒJƒ‹ƒR[ƒhƒZƒbƒg‚ւ̕ϊ·‚ðs‚¢‚Ü‚·B -‚Ü‚½’Ê킱‚ÌŠÖ”‚̓hƒƒCƒ“–¼‚Ɋ܂܂ê‚é ASCII ˆÈŠO‚Ì•¶Žš‚ð -ƒoƒbƒNƒXƒ‰ƒbƒVƒ…ƒGƒXƒP[ƒv‚·‚鈗‚ð‚µ‚Ü‚·‚ªA‚±‚ê‚ð—}§‚µ‚Ü‚·B -
      res_hnok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      res_ownok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      res_mailok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      res_dnok
      -‚Ç‚ñ‚È•¶Žš‚ł೓–‚È•¶Žš‚Å‚ ‚邯”»’f‚·‚邿‚¤‚É‚µ‚Ü‚·B -
      - -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»AZLD ‚̈—“™‚Í‚·‚×‚Ä -MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚Ì -res ƒ‚ƒWƒ…[ƒ‹‚ðŽg—p‚µ‚Ä‚¢‚Ü‚·B -

      -Œ»Ý‚ÌŽÀ‘•‚Å‚Í libmdnresolv ‚Í MDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚ð -ŒÄ‚Ño‚·‚̂ł͂Ȃ­Alibmdn Ž©‘Ì‚ð“à•”‚É•ø‚¦ž‚ނ悤‚ÈŒ`‘ԂɂȂÁ‚Ä‚¢‚Ü‚·‚ªA -‚±‚ê‚Í’P‚È‚éŽÀ‘•ã‚Ì“s‡‚©‚ç‚»‚¤‚È‚Á‚Ä‚¢‚邾‚¯‚ÅA˜_—“I‚É‚Í MDN -ƒ‰ƒCƒuƒ‰ƒŠ‚Ì‹@”\‚ðŒÄ‚Ño‚µ‚Ä‚¢‚邯‚¢‚Á‚Ă悢‚Å‚µ‚傤B -
      - -

      ‚Ü‚½Žg—p‚·‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ⳋK‰»‚ÌÝ’è‚Í -ƒNƒ‰ƒCƒAƒ“ƒgÝ’èƒtƒ@ƒCƒ‹‚ÌÝ’è‚ð -—˜—p‚µ‚Ü‚·B - -

      §ŒÀ

      - -

      runmdn ‚ɂ͂¢‚­‚‚©‚̧ŒÀ‚ª‚ ‚èA‚Ç‚ñ‚ȃVƒXƒeƒ€‚Å‚àŽg‚¦‚é‚킯‚Å‚Í -‚ ‚è‚Ü‚¹‚ñB -

        -
      • runmdn ‚Í‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Ì“®“IƒŠƒ“ƒN‹@\‚ð—p‚¢‚Ä‚¢‚é‚Ì‚ÅA -‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚ªŽg—p‚Å‚«‚éƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • ‚Ü‚½ŠÂ‹«•Ï” LD_PRELOAD ‚Ü‚½‚Í—ÞŽ—‚Ì‹@\‚É‚æ‚é -ƒ‰ƒCƒuƒ‰ƒŠ‚̃vƒŠƒ[ƒh‹@”\‚ðŽ‚ÂƒVƒXƒeƒ€‚łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • runmdn ‚Ì‘ÎۂƂȂéƒRƒ}ƒ“ƒh‚ÍƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ðƒXƒ^ƒeƒBƒbƒNƒŠƒ“ƒN -‚µ‚Ä‚¢‚Ă͂Ȃè‚Ü‚¹‚ñB -
      • ƒVƒXƒeƒ€‚̃‰ƒCƒuƒ‰ƒŠ‚ª iconv() ŠÖ”‚ð’ñ‹Ÿ‚µ‚Ä‚¢‚È‚¢ê‡AŠO•”‚Ì -ƒ‰ƒCƒuƒ‰ƒŠ‚ð—p‚¢‚邱‚ƂɂȂè‚Ü‚·‚ªA‚»‚̃‰ƒCƒuƒ‰ƒŠ‚à‹¤—Lƒ‰ƒCƒuƒ‰ƒŠ‚Å -‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      • ƒVƒXƒeƒ€‚ÌƒŠƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚Í BIND4 ‚ ‚é‚¢‚Í BIND8 ƒx[ƒX‚Ì‚à‚̂łȂ¯‚ê‚Î -‚È‚è‚Ü‚¹‚ñB -
      • ƒZƒLƒ…ƒŠƒeƒBã‚Ì——R‚©‚çˆê”Ê‚É setuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚̓vƒŠƒ[ƒh‹@”\‚ª -Žg‚¦‚È‚¢‚悤‚ɂȂÁ‚Ä‚¢‚é‚Ì‚ÅAsetuid ‚³‚ꂽƒRƒ}ƒ“ƒh‚Å‚ ‚Á‚Ă͂Ȃè‚Ü‚¹‚ñB -
      - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/spec.html b/contrib/idn/mdnkit/doc/ja/spec/spec.html deleted file mode 100644 index a30e9cdaa9..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/spec.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - -mDNkit specification - - - - - -

      mDNkit Žd—l‘

      - - - -
      - -

      ‘S‘Ì\¬

      - -

      ƒLƒbƒg‚ð\¬‚·‚éƒRƒ“ƒ|[ƒlƒ“ƒg

      - -

      mDNkit ‚ÍŽŸ‚̂悤‚ȃRƒ“ƒ|[ƒlƒ“ƒg‚©‚ç\¬‚³‚ê‚Ü‚·B - -

        -
      • dnsproxy
        - DNS ƒT[ƒo‚̃vƒƒLƒVƒT[ƒo‚Æ‚µ‚Ä“®ì‚µAƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‚Ì DNS - ƒƒbƒZ[ƒW‚ð DNS ƒT[ƒo‚É’†Œp‚µA‚Ü‚½ DNS ƒT[ƒo‚©‚ç•Ô‚³‚ê‚é - DNS ƒƒbƒZ[ƒW‚ðƒNƒ‰ƒCƒAƒ“ƒg‚É’†Œp‚µ‚Ü‚·B
        - ƒNƒ‰ƒCƒAƒ“ƒg‚©‚ç‘—‚ç‚ê‚Ä‚«‚½ DNS ƒƒbƒZ[ƒW‚𒆌p‚·‚éÛ‚É‚ÍA - ƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðAƒNƒ‰ƒCƒAƒ“ƒg‚ÌŽg—p‚·‚é - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çA‘½Œ¾Œê‰»‚³‚ꂽ DNS ƒT[ƒo‚ÌŽg—p‚·‚é - DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚邯‚Æ‚à‚É - ³‹K‰»‚â ZLD ‚Ìœ‹ŽE•t‰Á‚ðs‚¢‚Ü‚·B
        - ‚Ü‚½ DNS ƒT[ƒo‚©‚ç•Ô‚³‚ꂽ DNS ƒƒbƒZ[ƒW‚𒆌p‚·‚éÛ‚É‚ÍA - ƒƒbƒZ[ƒW’†‚̃hƒƒCƒ“–¼‚ðADNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚ç - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA“¯Žž‚É ZLD ‚Ìœ‹ŽE•t‰Á‚ðs‚¢‚Ü‚·B
        -

        -

      • mdnconv
        - ƒ][ƒ“ƒ}ƒXƒ^ƒtƒ@ƒCƒ‹‚â named.conf ƒtƒ@ƒCƒ‹‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO - •ÏŠ·—pƒc[ƒ‹‚Å‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å‹Lq‚³‚ꂽ‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚ðA - ‘½Œ¾Œê‰»‚³‚ꂽ DNS ƒT[ƒo‚ªŽg—p‚·‚éDNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚É - •ÏŠ·‚µA“¯Žž‚ɳ‹K‰»‚às‚¢‚Ü‚·B -

        -

      • BIND-9 ƒpƒbƒ`
        - BIND-9 ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃pƒbƒ`‚Å‚·B - ‚±‚̃pƒbƒ`‚ð“K—p‚·‚邱‚Ƃɂæ‚èABIND-9 ‚ÌƒŠƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ª•t‰Á‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚è - dnsproxy ‚ðŽg—p‚·‚邱‚ƂȂ­A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B - ‚Ü‚½ dig “™‚̃c[ƒ‹‚Å‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -

        -

      • runmdn
        - BIND-4 ‚ ‚é‚¢‚Í BIND-8 ƒx[ƒX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ðăRƒ“ƒpƒCƒ‹‚·‚邱‚ƂȂµ‚É - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂̃Rƒ}ƒ“ƒh‚Å‚·B - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÌŽÀsŽž‚É MDN ƒ‰ƒCƒuƒ‰ƒŠ‚ð“®“I‚ÉƒŠƒ“ƒN‚·‚邱‚Ƃɂæ‚è - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÉƒŠƒ“ƒN‚³‚ê‚Ä‚¢‚郊ƒ]ƒ‹ƒo‚É‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì - ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»‚Ì‹@”\‚ª•t‰Á‚³‚ê‚Ü‚·B‚±‚ê‚É‚æ‚è - dnsproxy ‚ðŽg—p‚·‚邱‚ƂȂ­A‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ªˆµ‚¦‚邿‚¤‚ɂȂè‚Ü‚·B -

        -

      • mDN Wrapper
        - Windows ƒx[ƒX‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚ß‚ÌA - WINSOCK ‚ɑ΂·‚éWrapper DLL ‚Å‚·B - ’ÊíAWindowsƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÍWINSOCK ‚É‚æ‚Á‚ăhƒƒCƒ“–¼‚ð‰ðŒˆ‚µ‚Ü‚·B - mDN Wrapper ‚ÍAWINSOCK ‚̌ĂÑo‚µ‚ðƒtƒbƒN‚µ‚ÄA - ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ⳋK‰»‚ðs‚È‚¢‚Ü‚·B - “¯‚¶‚悤‚È‚±‚Æ‚Ídnsproxy‚Å‚à‚Å‚«‚Ü‚·‚ªA - mDN Wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍA - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“–ˆ‚ɈقȂÁ‚½ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽó•t‚¯‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

        -

      • MDN ƒ‰ƒCƒuƒ‰ƒŠ
        - ã‹L‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚ªŽg—p‚·‚郉ƒCƒuƒ‰ƒŠ‚Å‚·B‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̕ϊ·‚É - ŠÖ‚í‚é -
          -
        • ƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ· -
        • •¶Žš—ñ‚̳‹K‰» -
        • DNS ƒƒbƒZ[ƒW‚̉ð͂Ƒg‚Ý—§‚Ä -
        • ZLD ‚ÌíœA’ljÁ -
        - ‚Æ‚¢‚¤‹@”\‚ð’ñ‹Ÿ‚µ‚Ü‚·B -

        -

      • 8ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`
        - dnsproxy ‚ð—p‚¢‚Ä‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ⳋK‰»“™‚ð - s‚¤ê‡ADNS ƒT[ƒo‚⃊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚ɂ͂±‚ê‚ç‚Ì‹@”\‚Í•K—v‚ ‚è‚Ü‚¹‚ñB - ‚½‚¾‚µ DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä - UTF-8 “™‚Ì 8 ƒrƒbƒgƒR[ƒh‚ðŽg—p‚·‚éê‡A - ]—ˆ‚Ì DNS ƒT[ƒo‚ÍŽg—p‚·‚邱‚Æ‚ª‚Å‚«‚¸A8ƒrƒbƒgƒR[ƒh‚ðƒGƒ‰[‚É‚¹‚¸‚É - ’Ê‚·‚悤‚ȉü‘¢‚ª•K—v‚Å‚·B
        - ‚Ü‚½ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ª SJIS “™‚Ì 8 ƒrƒbƒgƒR[ƒh‚ðŽg—p‚·‚éê‡A - ‚â‚͂胊ƒ]ƒ‹ƒoƒ‰ƒCƒuƒ‰ƒŠ‚É‚à 8 ƒrƒbƒgƒR[ƒh‚ð‚»‚Ì‚Ü‚Ü’Ê‚µA - ƒGƒ‰[‚É‚µ‚È‚¢‚悤‚É‚·‚邽‚߂̉ü‘¢‚ª•K—v‚Å‚·B
        - ‚³‚ç‚ɃAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì’†‚É‚ÍA“ÆŽ©‚ɃhƒƒCƒ“–¼‚ÌŒŸ¸‚ðs‚¢A - 8 ƒrƒbƒgƒR[ƒh‚ð’Ê‚³‚È‚¢‚à‚Ì‚ª‚ ‚è‚Ü‚·B
        - ‚±‚Ì‚½‚ßA–{ƒLƒbƒg‚Å‚Í -
          -
        • BIND-8 ‚̃l[ƒ€ƒT[ƒoAƒŠƒ]ƒ‹ƒo‚ð 8 ƒrƒbƒgƒXƒ‹[‚É‚·‚邽‚߂̃pƒbƒ` -
        • Web ‚̃LƒƒƒbƒVƒ…ƒT[ƒo‚Å‚ ‚é Squid ‚Ì URL ‰ðÍ•”•ª‚ð 8 ƒrƒbƒgƒXƒ‹[ - ‚É‚·‚邽‚߂̃pƒbƒ` -
        - ‚ð’ñ‹Ÿ‚µ‚Ü‚·B
        - ‚±‚ê‚ç‚Ì 8 ƒrƒbƒgƒXƒ‹[ƒpƒbƒ`‚ÉŠÖ‚µ‚Ă͓Á‚ÉŽd—l‚Ì‹Lq‚Ís‚¢‚Ü‚¹‚ñB -
      - -

      ƒRƒ“ƒ|[ƒlƒ“ƒg\¬}

      - -

      ŠeƒRƒ“ƒ|[ƒlƒ“ƒg‚ª‚Ç‚±‚łǂ̂悤‚ÉŽg‚í‚ê‚é‚Ì‚©‚ðŽ¦‚µ‚½‚Ì‚ªŽŸ‚Ì2–‡‚Ì}‚Å‚·B - -

      1–‡–Ú‚Í‘½Œ¾ŒêƒhƒƒCƒ“–¼‚̈—‚ð dnsproxy ‚ð—˜—p‚µ‚Äs‚¤ê‡‚Ì\¬}‚Å‚·B -

      -

      -mDNkit components #1 -
      - -

      2–‡–Ú‚Í dnsproxy ‚ðŽg—p‚¹‚¸AƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ÌƒŠƒ]ƒ‹ƒo‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì -ˆ—‚ðs‚¤ê‡‚Ì\¬}‚Å‚·B -

      -

      -mDNkit components #2 -
      - -

      }’†AƒCƒ^ƒŠƒbƒN‘̂̕”•ª‚ª–{ƒLƒbƒg‚Ɋ܂܂ê‚éƒRƒ“ƒ|[ƒlƒ“ƒg‚Å‚·B - -

      }‚Ì㔼•ª‚Í SJIS ‚È‚ÇAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‚³‚ê‚é -¢ŠE‚ÅA‰º”¼•ª‚ª UTF-8 ‚È‚ÇA‘½Œ¾Œê‰»‚³‚ꂽ DNS ‚ªŽg—p‚·‚é -DNS ƒvƒƒgƒRƒ‹ã‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ªŽg—p‚³‚ê‚颊E‚Å‚·B -–{ƒLƒbƒg‚ª’ñ‹Ÿ‚·‚éƒRƒ“ƒ|[ƒlƒ“ƒg‚Í‚±‚ê‚ç‚Ì¢ŠE‚ð‚‚Ȃ®‚½‚߂̂à‚̂ł·B - - - diff --git a/contrib/idn/mdnkit/doc/ja/spec/wrapper.html b/contrib/idn/mdnkit/doc/ja/spec/wrapper.html deleted file mode 100644 index 01784febb3..0000000000 --- a/contrib/idn/mdnkit/doc/ja/spec/wrapper.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - -mDN Wrapper - Program Specification - - - - -

      mDN Wrapper

      - -

       

      - -

      ŽÀŒ»•û–@ - Wrapper DLL

      -

      -ƒ‰ƒbƒp[DLL ‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÆŒ³‚ÌDLL ‚Ƃ̊ԂɊ„‚èž‚ñ‚ÅA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚ð‰¡Žæ‚肵‚ÄA -–{—ˆ‚ÌDLL ‚Ƃ͈قȂÁ‚½ˆ—‚ð‚³‚¹‚é‚à‚̂ł·B -

      -how wrapper DLL works -
      -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚̓‰ƒbƒp[‚É“n‚³‚ê‚Ü‚·B -ƒ‰ƒbƒp[‚Í‚»‚±‚ÅA•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄA -Œ³‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño‚µ‚Ü‚·B -‚Ü‚½AŒ³‚ÌDLL ‚̈—Œ‹‰Ê‚͈ê’Uƒ‰ƒbƒp[‚ɕԂ³‚êA -‚±‚±‚Å‚à•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄA -ÅI“I‚ÈŒ‹‰Ê‚ªƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɕԂ³‚ê‚邱‚ƂɂȂè‚Ü‚·B -

      -mDN wrapper ‚Å‚ÍAWINSOCK DLL‚Ì -

      - - - -
      WSOCK32.DLLWINSOCK V1.1
      WS2_32.DLL WINSOCK V2.0
      -
      -‚ɑ΂·‚郉ƒbƒp[DLL ‚ð’ñ‹Ÿ‚µ‚ÄA -‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ‚ª‚Å‚«‚邿‚¤‚É‚µ‚Ü‚·B -
      - - - -
      : - 16ƒrƒbƒg”Å‚ÌWINSOCK (WINSOCK.DLL) ‚Í‘ÎÛŠO‚Å‚·B -
      -
      -

      -

      ˆ—‘ÎÛ‚ÌAPI

      -

      -mDN Wrapper ‚ÍWINSOCK ‚Ì–¼‘O‰ðŒˆ‚ÉŠÖ˜A‚µ‚½API ‚ɂ‚¢‚Ä‚Ì‚Ý -•t‰Á“I‚Ȉ—‚ðs‚È‚¢‚Ü‚·B -ˆ—‚Ì‘ÎۂƂȂéWINSOCK API‚͈ȉº‚Ì‚à‚̂ł·B -

      -
      WINSOCK 1.1, WINSOCK 2.0 ‚Ì—¼•û‚É‚ ‚é‚à‚Ì -
      - - - - - -
      gethostbyaddr
      gethostbyname
      WSAAsyncGetHostByAddr
      WSAAsyncGetHostByName
      -

      -

      WINSOCK 2.0 ‚¾‚¯‚É‚ ‚é‚à‚Ì -
      - - - - -
      WSALookupServiceBeginA
      WSALookupServiceNextA
      WSALookupServiceEnd
      -
      -

      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA -‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚œƎ©‚ɃhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ðs‚È‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAnslookup‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚ÅA -“à•”‚œƎ©‚ÉDNS ƒŠƒNƒGƒXƒg‚̶¬A‰ðŽß‚ðs‚È‚Á‚Ä‚¢‚Ü‚·B -“–‘R‚Ì‚±‚ƂȂª‚çA‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍA -mDN Wrapper ‚ł͑½Œ¾Œê‰»‘Ήž‚³‚¹‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB -

      - - - - - -
      : - dnsproxy‚̓lƒbƒgƒ[ƒNã‚ÅDNS ‚ÌƒŠƒNƒGƒXƒgA - ƒŒƒXƒ|ƒ“ƒX‚ɂ‚¢‚Ä‘½Œ¾Œê‰»‚µ‚Ü‚·‚Ì‚ÅA - ‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚à‘½Œ¾Œê‰»‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - •K—v‚ɉž‚¶‚Ä“KŽžŽg‚¢•ª‚¯‚邯‚¢‚¢‚Å‚µ‚傤B -
      : - WINSOCK 2.0 ‚É‚ÍAWIDE CHARACTER ƒx[ƒX‚Ì–¼‘O‰ðŒˆ‚ÌAPI ‚Æ‚µ‚Ä - - - -
      WSALookupServiceBeginW
      WSALookupServiceNextW
      - ‚à‚ ‚è‚Ü‚·‚ªA‚±‚ê‚ç‚ɂ‚¢‚Ă̓‰ƒbƒv‚µ‚Ü‚¹‚ñB - ‚±‚ê‚ç‚ÌAPI ‚̓}ƒCƒNƒƒ\ƒtƒgŽd—l‚É‚æ‚é‘Û‰»‚ɑΉž‚µ‚½‚à‚̂ł·‚©‚çA - ‚»‚̃tƒŒ[ƒ€ƒ[ƒNã‚ÅŽg‚¤‚ׂ«‚à‚̂ł·B - ‚±‚ê‚ç‚ɂ‚¢‚Ä‚ÍmDN Kit ‚É‚æ‚Á‚Ä‘¼‚Ì‘½Œ¾ŒêƒtƒŒ[ƒ€ƒ[ƒN‚É - •ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚̂͊댯‚ł͂Ȃ¢‚©A‚Æ”»’f‚µ‚Ü‚µ‚½B -
      -
      -

      -

      ˆ—‘ÎÛŠO‚ÌAPI

      -

      -ã‹LˆÈŠO‚ÌWINSOCK API ‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚Í‚È‚É‚à‚µ‚È‚¢‚ÅA -Œ³‚ÌWINSOCK API ‚ðŒÄ‚Ño‚µ‚Ü‚·B -WINSOCK DLL ‚ɂ̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚È‚¢ƒGƒ“ƒgƒŠ‚àŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B -‚»‚ê‚ç‚̃Gƒ“ƒgƒŠ‚ɂ‚¢‚Ä‚ÍAŒÄ‚Ño‚µƒpƒ‰ƒƒ^“™‚ª”»‚ç‚È‚¢‚Ì‚ÅA -ƒ‰ƒbƒp[“à‚̃R[ƒh‚©‚猳‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño‚·‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB -‚»‚±‚ÅAmDN Wrapper ‚Íã‹LˆÈŠO‚̃Gƒ“ƒgƒŠ‚ɂ‚¢‚Ä‚ÍA -function forwarding ‚É‚æ‚Á‚ÄA -DLL ‚̌ĂÑo‚µ‚ªŒ³‚ÌDLL ‚ɃtƒHƒ[ƒh‚³‚ê‚邿‚¤‚É‚µ‚Ä‚¢‚Ü‚·B -

      -'function forwarding' ‚ðŽg‚¤ê‡‚É‚ÍA -ƒ‰ƒbƒp[DLL 쬎ž‚ɃtƒHƒ[ƒhæ‚ÌDLL –¼‚𖾎¦“I‚ÉŽw’è‚·‚é•K—v‚ª‚ ‚èA -‚»‚ÌDLL –¼‚̓‰ƒbƒp[Ž©g‚Ƃ͕ʂ̖¼‘OA -‚·‚Ȃ킿Œ³‚ÌDLL ‚Æ‚à•ʂ̖¼‘OA‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -mDN wrapper ‚Å‚ÍAŒ³‚ÌWINSOCK DLL ‚𖼑O‚ð•Ï‚¦‚ăRƒs[‚µA -‚»‚ê‚ðƒtƒHƒ[ƒhæ‚ÌDLL ‚Æ‚µ‚ÄŽg—p‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      - - - -
      wsock32.dll->wsock32o.dll
      ws2_32.dll ->ws2_32o.dll
      -
      -

      -ƒ‰ƒbƒp[DLL ‚ÍŒ³‚ÌWINSOCK DLL ‚Æ“¯‚¶–¼‘O‚Å쬂³‚ê‚Ü‚·B -]‚Á‚ÄmDN wrapper ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ꂽó‘Ô‚Å‚ÍA -

      - - - - - -
      wsock32.dll mDN Wrapper for WINSOCK V1.1
      ws2_32.dll mDN Wrapper for WINSOCK V2.0
      wsock32o.dllOriginal WINSOCK V1.1 DLL
      ws2_32o.dll Original WINSOCK V2.0 DLL
      -
      -‚ƂȂè‚Ü‚·B -

      -

      ”ñ“¯Šú API

      -

      -ƒhƒƒCƒ“–¼‚̕ϊ·‚ÍAˆÈ‰º‚̃^ƒCƒ~ƒ“ƒO‚Ås‚È‚í‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -

      -
      -
      DNS ‚Ö‚ÌƒŠƒNƒGƒXƒgŽž -
      - - -
      ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO->DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO
      -
      DNS ‚©‚ç‚̉ž“šŽóMŽž -
      - - -
      DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO->ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO
      -
      -
      -

      -“¯ŠúAPI ‚É‚¨‚¢‚Ä‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍA -Œ³‚ÌAPI ‚ðŒÄ‚Ño‚·‘O‚És‚í‚êA -DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍA -Œ³‚ÌAPI ‚©‚畜‹A‚µ‚Ä‚«‚½‚Æ‚±‚ë‚Ås‚È‚í‚ê‚Ü‚·B -

      -‚µ‚©‚µAWINSOCK ‚̈ȉº‚ÌAPI ‚Í”ñ“¯ŠúAPI ‚ÅA -DNS ‚©‚ç‚̉ž“šŽóM‘O‚É•œ‹A‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B -

      -
      -
      WSAAsyncGetHostByAddr -
      WSAAsyncGetHostByName -
      -
      -

      -‚±‚ê‚ç‚ÌAPI ‚É‚¨‚¢‚Ä‚ÍA–¼‘O‰ðŒˆ‚ÌŠ®—¹‚ÍA -Windows ‚ւ̃ƒbƒZ[ƒW‚É‚æ‚Á‚Ä’Ê’m‚³‚ê‚Ü‚·B -‚±‚Ì‚½‚ßA -DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ðs‚È‚¤‚É‚ÍA -ƒ‰ƒbƒp[‚Í’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒ‚̃ƒbƒZ[ƒWƒLƒ…[‚ðƒtƒbƒN‚µ‚ÄA -‚±‚ÌŠ®—¹ƒƒbƒZ[ƒW‚ð•ߊl‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚»‚±‚ÅA”ñ“¯ŠúAPI ‚ªŒÄ‚Ño‚³‚ꂽꇂɂÍAmDN Wrapper ‚ÍA -’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒi‚±‚ê‚ÍAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚É -ƒtƒbƒN‚ðݒ肵‚Ü‚·B -ƒtƒbƒN‚ªŠ®—¹ƒƒbƒZ[ƒWi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ðŒŸo‚µ‚½‚È‚çA -ƒtƒbƒN‚ÍŒ‹‰Ê‚ÌŠi”[—̈æi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ä‚¢‚Ü‚·j‚̃hƒƒCƒ“–¼‚ðA -DNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      -

      Wrapper DLL ‚̃Cƒ“ƒXƒg[ƒ‹

      -

      -WINSOCK DLL ‚ÍWindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É’u‚©‚ê‚Ä‚¢‚Ü‚·B -WINSOCK ‚ðŠmŽÀ‚Ƀ‰ƒbƒv‚·‚é‚É‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É‚¨‚¢‚Ä -

      -
      -
      ƒIƒŠƒWƒiƒ‹WINSOCK DLL ‚Ì–¼‘O‚Ì•ÏX -
      -
      -ren wsock32.dll wsock32o.dll
      -ren ws2_32.dll  ws2_32o.dll
      -
      -
      ƒ‰ƒbƒp[DLL ‚Ì“±“ü -
      -
      	
      -copy somewhere\wsock32.dll wsock32.dll
      -copy somewhere\ws2_32.dll  ws2_32.dll
      -copy another DLLs also
      -
      -
      -
      -‚ðs‚È‚¤•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚µ‚©‚µAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚Å‚±‚̂悤‚ÈDLL ‚Ì’u‚«Š·‚¦‚ðs‚È‚¤‚Ì‚Í -‘å•ϊ댯‚È‘€ì‚ɂȂè‚Ü‚·B -

      - - - - - -
      a) - DLL ‚ð“ü‚ê‘Ö‚¦‚½ó‘Ô‚ÅA‚à‚¤‚¢‚¿‚Ç“¯‚¶‘€ì‚ðs‚È‚¤‚ÆA - ƒIƒŠƒWƒiƒ‹‚ÌWINSOCK DLL ‚ªŽ¸‚í‚ê‚Ä‚µ‚Ü‚¤‚±‚ƂɂȂè‚Ü‚·B -
      b) - ƒT[ƒrƒXƒpƒbƒN‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ȂǂÅA - WINSOCK DLL ‚ðÄ“±“ü‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA - ‚±‚ê‚É‚æ‚Á‚Ä‚àWINSOCK ‚ª—˜—p•s”\‚ɂȂ邱‚Æ‚ª‚ ‚è‚Ü‚·B -
      -
      -

      -‚±‚̂悤‚Èó‘Ô‚É‚È‚é‚ÆAƒlƒbƒgƒ[ƒN‹@”\‚ª‘S‚­Žg‚¦‚È‚­‚È‚Á‚½‚èA -ň«‚ÍWindows ‚Ì‹N“®‚·‚ç‚Å‚«‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B -

      -‚»‚±‚ÅAmDN Wrapper ‚Å‚ÍAã‚̂悤‚ȃVƒXƒeƒ€ƒŒƒxƒ‹‚̃‰ƒbƒv‚ł͂Ȃ­A -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɑ΂·‚郉ƒbƒv‚ðŠî–{‹@”\‚Æ‚µ‚Ä’ñ‹Ÿ‚·‚é‚à‚̂Ƃµ‚Ü‚·B -

      -Windows ‚É‚¨‚¢‚ÄADLL ‚ÍAŠî–{“I‚É‚Í -

      - - - - - -
      ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ
      %SystemRoot%\System32
      %SystemRoot%
      PATH ‚ÅŽwަ‚³‚ê‚éƒfƒBƒŒƒNƒgƒŠ
      -
      -

      -‚̇˜‚ÅŒŸõ‚³‚ê‚ÄAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚Ì‚ªƒ[ƒh‚³‚ê‚Ü‚·B -‚Å‚·‚©‚çAˆê”Ê“I‚É‚ÍA -DLL ‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚ê‚ÎA -‚»‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌWINSOCK ‚̌ĂÑo‚µ‚ðƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -‚½‚¾‚µA‚¢‚­‚‚©‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚Å‚ÍA -ŒŸõƒpƒX‚ðŒo—R‚¹‚¸‚É“Á’è‚ÌDLL ‚ðƒŠƒ“ƒN‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B -‚±‚̂悤‚È\¬‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚ªŽg‚í‚ê‚½ê‡‚É‚Í -mDN Wrapper ‚ł͑Έ‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB -

      - - - -
      : - Netscape‚Í“Á’èDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚ÅA - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ł̓‰ƒbƒv‚Å‚«‚Ü‚¹‚ñB - WINSOCK DLL Ž©‘Ì‚àƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌŠÖ˜ADLL ‚É - ƒoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚Å‚·B - ˆê•ûAInternet Explore‚âWindows Media Player‚Í - •W€‚̃T[ƒ`ƒpƒX‚É]‚Á‚Ä‚¢‚é‚Ì‚ÅA - ƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -
      -
      -

      -

      ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ˆÊ’u

      -

      -WINSOCK 2.0 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚éWindows ‚É‚ÍA -WINSOCK ‚Ì1.1 ‚Æ2.0 ‚Ì‚»‚ꂼ‚ê‚ɑΉž‚·‚éDLL ‚ª‚ ‚èA -WINSOCK 1.1 ‚ÌAPI ‚̌ĂÑo‚µ‚Í -2.0 ‚Ì“¯‚¶ƒGƒ“ƒgƒŠ‚ÉƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -

      -calling winsock2.0 through winsock1.1 -
      -

      -‚±‚ÌꇂɂÍ1.1 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚à2.0 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚àA -‚Æ‚à‚ÉV2.0—p‚ÌDLL ‚É“n‚³‚ê‚é‚Ì‚ÅA -2.0—p‚̃‰ƒbƒp[DLL ‘¤‚¾‚¯‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·‚ðs‚È‚¤‚悤‚É‚·‚é‚ׂ«‚Å‚µ‚傤B -

      -ˆê•ûAWINSOCK 1.1 ‚µ‚©ƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡(Win95)‚É‚ÍA -1.1 ‚ɑΉž‚µ‚½DLL ‚µ‚©‚ ‚è‚Ü‚¹‚ñB -

      -calling only winsock1.1 -
      -

      -‚±‚Ìꇂɂ͕K‘R“I‚É1.1 —p‚̃‰ƒbƒp[DLL ‚Å -ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -

      -mDN Wrapepr ‚ªwindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂÍA -ã‚Ì’Ê‚è‚É“®ì‚·‚é‚Ì‚ÅA -

      - - - -
      WINSOCK 2.0 ‚ ‚è2.0 ƒ‰ƒbƒp[‚ŕϊ·
      WINSOCK 1.1 ‚Ì‚Ý1.1 ƒ‰ƒbƒp[‚ŕϊ·
      -
      -‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚µ‚©‚µA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂ͓®ì‚ª•Ï‚í‚Á‚Ä‚«‚Ü‚·B -Windows •t‘®‚Ì WINSOCK 1.1 DLL‚ÍA -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌWINSOCK 2.0 ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邽‚ßA -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‘¤‚ÌWINSOCK 2.0 ƒ‰ƒbƒp[DLL ‚É‚Í -ƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚Ä‚«‚Ü‚¹‚ñB -‚±‚Ì‚½‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚É‚¨‚¢‚Ä‚ÍA -1.1DLLA2.0DLL‚Ì—¼•û‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -

      -‚±‚̂悤‚ÈDLL ŠÔ‚̃oƒCƒ“ƒfƒBƒ“ƒO‚̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚ÅA -ŠÂ‹«Aƒo[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă͈قȂÁ‚½“®ì‚ð‚·‚é‚©‚à’m‚ê‚Ü‚¹‚ñB -‚»‚±‚ÅmDN Wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ’l‚É‚æ‚Á‚ÄA -ƒ‰ƒbƒp[DLL ‚̂ǂ±‚ŕϊ·‚ðs‚È‚¤‚©‚ðŒˆ’è‚·‚邿‚¤‚É‚µ‚ÄA -ƒCƒ“ƒXƒg[ƒ‹æ‚É‚æ‚é·ˆÙA‚ ‚é‚¢‚̓o[ƒWƒ‡ƒ“‚É‚æ‚é·ˆÙ‚ð‹zŽû‚·‚邿‚¤‚É‚µ‚Ü‚·B -

      -mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
      -
      -ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚È‚¤ˆÊ’u‚ɂ‚¢‚Ä‚ÍA -‚±‚Ì’¼‰º‚̃ŒƒWƒXƒgƒŠ’l WhereiREG_DWORDj ‚É‚æ‚Á‚ÄŒˆ’肵‚Ü‚·B -—LŒø‚È’l‚ÍA -
      -ƒŒƒWƒXƒgƒŠ Where (REG_DWORD) - - - - - - -
      0WINSOCK 1.1AWINSOCK 2.0 ‚Ì—¼•û‚ŕϊ·‚·‚é
      1WINSOCK 2.0 ‚ª‚ ‚ê‚ÎAWINSOCK 2.0‚¾‚¯‚ŕϊ·‚·‚é
      WINSOCK 1.1 ‚¾‚¯‚Ìê‡‚É‚Í WINSOCK 1.1 ‚ŕϊ·‚·‚é
      2WINSOCK 1.1 ‚¾‚¯‚ŕϊ·‚·‚é
      3WINSOCK 2.0 ‚¾‚¯‚ŕϊ·‚·‚é
      -
      -‚Ì‚S’Ê‚è‚Å‚·B -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Ov‚ðA -ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Pv‚ðÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B -ƒŒƒWƒXƒgƒŠ’l‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Íu‚Ov‚ð‘z’肵‚Ü‚·B -‚±‚ê‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ð•W€‚Æ‚µ‚½‚à‚̂ł·B -

      -

      •ÏŠ·Œ³/æ‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO

      -

      -ƒ‰ƒbƒp[DLL ‚Å‚ÍA‰ðŒˆ‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚ðA -ƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA -‚Ü‚½ADNS ‚ª•Ô‚µ‚Ä‚«‚½ƒhƒƒCƒ“–¼(DNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO)‚ð -ƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É–ß‚µ‚Ü‚·B -

      -Œ»ÝADNS ‘¤‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍA -‚¢‚­‚‚à‚Ì•ûŽ®‚ª’ñˆÄ‚³‚ê‚Ä‚¢‚Ü‚·B -ƒ‰ƒbƒp[DLL ‚Í‚»‚ê‚ç‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂ǂꂩ‚Ð‚Æ‚Â‚É -•ÏŠ·‚·‚邿‚¤‚É\¬‚³‚ê‚Ü‚·B -‚±‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ‚ÅŽwަ‚³‚ê‚Ü‚·B -‚±‚̃ŒƒWƒXƒgƒŠ‚É‚ÍAmDN Wrapper ‚̃Cƒ“ƒXƒg[ƒ‹Žž‚É -ƒfƒtƒHƒ‹ƒgƒGƒ“ƒR[ƒfƒBƒ“ƒOiŒ»Žž“_‚Å‚ÍRACEj‚ªÝ’肳‚ê‚Ü‚·B -“–‘RA‚±‚̃ŒƒWƒXƒgƒŠ‚ÍAŒã‚Å‘¼‚Ì‚à‚̂ɕÏX‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -

      -mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN
      -
      -ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·B -DNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ’l Encoding iREG_SZj‚ÅŽwަ‚³‚ê‚Ü‚·B -‚±‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      -ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) -
      -DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðݒ肵‚Ü‚· -
      -
      -

      -ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -’Êí‚̓vƒƒZƒX‚̃R[ƒhƒy[ƒW‚©‚狂߂܂·B -ƒ‰ƒbƒp[DLL ‚ªŽg—p‚·‚é 'iconv' ƒ‰ƒCƒuƒ‰ƒŠ‚ÍA -windows ‚̃R[ƒhƒy[ƒW–¼‚ð -ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚é‚Ì‚ÅA -ƒR[ƒhƒy[ƒW–¼‚ð‚»‚Ì‚Ü‚Üƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B -

      -‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA -“Á’è‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å -ƒhƒƒCƒ“–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚Ä‚µ‚Ü‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B -—Ⴆ‚ÎAIE‚ł̓hƒƒCƒ“–¼‚ðUTF-8 ‚Å•\‹L‚·‚邿‚¤‚É -Žwަ‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B -UTF-8 ‚É‚æ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA -’ñˆÄ‚³‚ê‚Ä‚¢‚鑽Œ¾Œê‰»•ûŽ®‚̂ЂƂ‚ł·‚ªA -‘½Œ¾Œê‰»‚³‚ꂽDNS ƒT[ƒo‚Í‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žó•t‚¯‚È‚¢‚©‚à’m‚ê‚Ü‚¹‚ñB -

      -‚±‚̂悤‚È󋵂ɑΈ‚·‚邽‚ßAmDN Wrapper ‚ÍA -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Æ‚µ‚Ä -ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚àŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É‚µ‚Ü‚·B -‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€“Á—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒŒƒWƒXƒgƒŠ‹LÚ‚³‚ê‚é‚à‚̂Ƃµ‚Ü‚·B -

      -mDN Wrapper —p‚̃vƒƒOƒ‰ƒ€“Á—L‚̃ŒƒWƒXƒgƒŠÝ’è‚Í -

      - - - -
      HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg
      HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg
      -
      -ˆÈ‰º‚ÉA -ƒvƒƒOƒ‰ƒ€–¼iŽÀsƒ‚ƒWƒ…[ƒ‹ƒtƒ@ƒCƒ‹–¼j‚ðƒL[‚Æ‚µ‚Ä -”z’u‚³‚ê‚Ü‚·B -—Ⴆ‚ÎAInternet Explore ‚ÌꇂɂÍA -ŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ÌIEXPLORE‚ðƒL[‚Æ‚µ‚Ä -
      - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE -
      -ˆÈ‰º‚É’u‚©‚ê‚Ü‚·B -ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAƒŒƒWƒXƒgƒŠ’lEncoding iREG_SZj‚ÅŽwަ‚µ‚Ü‚·B -‚±‚ê‚àlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB -
      -ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) -
      -ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼ -iƒfƒtƒHƒ‹ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚ð•K—v‚Æ‚·‚éê‡j‚ðŽw’肵‚Ü‚·B -
      -
      - -

      ƒƒO

      - -mDN Wrapper ‚ªŠú‘Ò‚µ‚½“®ì‚ð‚µ‚È‚¢ê‡A“®ì‚̃ƒO‚Í–â‘è‰ðŒˆ‚É”ñí‚É -–ð—§‚¿‚Ü‚·BmDN Wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ‚ÌÝ’è‚É‚æ‚èAˆÈ‰º‚Ìݒ肪 -‰Â”\‚Å‚·B -
        -
      • ƒƒOƒŒƒxƒ‹ -
      • ƒƒOƒtƒ@ƒCƒ‹ -
      -

      -ƒƒOƒŒƒxƒ‹AƒƒOƒtƒ@ƒCƒ‹‚Æ‚à‚ÉŽŸ‚̃ŒƒWƒXƒgƒŠ‚̉º‚Åݒ肳‚ê‚Ü‚·B -

      -HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN
      -HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN -
      -

      -ƒƒOƒŒƒxƒ‹‚̓ŒƒWƒXƒgƒŠ’l LogLevel (REG_DWORD) ‚ÅŽw’肵‚Ü‚·B’è‹`‚³‚ê‚Ä‚¢‚é -’l‚ÍŽŸ‚Ì’Ê‚è‚Å‚·B -

      -
      -1 (0xFFFFFFFF)
      [None] ƒƒO‚ðˆêØo—Í‚µ‚È‚¢ -
      0
      [Fatal] ’v–½“IƒGƒ‰[‚Ì‚Ýo—Í -
      1
      [Error] ’v–½“I‚łȂ¢ƒGƒ‰[‚ào—Í -
      2
      [Warning] ŒxƒƒbƒZ[ƒW‚ào—Í -
      3
      [Info] ƒGƒ‰[ˆÈŠO‚Ìî•ñ‚ào—Í -
      4
      [Trace] ƒvƒƒOƒ‰ƒ€‚̃gƒŒ[ƒXî•ñ‚ào—Í -
      -‚È‚¨A‚±‚̃Œƒxƒ‹Žw’è‚Í mDN Wrapper ‚ªŽg—p‚µ‚Ä‚¢‚é -MDN ƒ‰ƒCƒuƒ‰ƒŠ ‚Ìo—Í‚·‚郃O‚̃Œƒxƒ‹Žw’è‚Å‚·B -ƒƒO‚ɂ͂±‚Ì‘¼ mDN Wrapper Ž©g‚ªo—Í‚·‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA‚±‚¿‚ç‚Í -ƒŒƒxƒ‹Žw’è‚͂ł«‚¸A’P‚ɃIƒ“EƒIƒt‚ðØ‚è‘Ö‚¦‚邾‚¯‚Å‚·B-1 ‚ðŽw’肵‚½ê‡‚É‚Í -ƒIƒtA‚»‚êˆÈŠO‚Ì’l‚ðŽw’肵‚½ê‡‚ɂ̓Iƒ“‚ɂȂè‚Ü‚·B -ƒfƒtƒHƒ‹ƒg‚Í -1 ‚Å‚·B -

      -ƒƒOƒtƒ@ƒCƒ‹‚̓ƒO‚ðo—Í‚·‚éƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚é‚à‚Ì‚ÅA -ƒŒƒWƒXƒgƒŠ’l LogFile (REG_SZ) ‚ÅŽw’肵‚Ü‚·BƒfƒtƒHƒ‹ƒg‚Í -mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚½ƒfƒBƒŒƒNƒgƒŠ‚̉º‚Ì "mdn_wrapper.log" ‚Å‚·B -

      -‚È‚¨AƒƒOƒŒƒxƒ‹‚ƃƒOƒtƒ@ƒCƒ‹‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ðŽg—p‚µ‚Ä‚à -Ý’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B -

      -

      ƒŒƒWƒXƒgƒŠÝ’è - ‚܂Ƃß

      -

      -

      ƒŒƒWƒXƒgƒŠ‚Ì—D懈Ê

      -

      -mDN Wrapper ‚ÌÝ’èî•ñ‚ÍAHKEY_LOCAL_MACHINEAHKEY_CURRENT_USER‚Ì -

      - Software\JPNIC\MDN -
      -ˆÈ‰º‚ÉŠi”[‚³‚ê‚Ü‚·B -mDN Wrapper‚Íʼn‚ÉHKEY_LOCAL_MACHINE‚ÌÝ’è‚ð“ǂݞ‚ÝA -HKEY_CURRENT_USER‘¤‚É‚àݒ肪‚ ‚ê‚ÎA‚±‚ê‚Åã‘‚«‚µ‚Ü‚·B -’Êí‚ÍAHKEY_LOCAL_MACHINE ‘¤‚¾‚¯‚ðݒ肵‚Ü‚·B -ƒ†[ƒUŒÂ•ʂɈقȂÁ‚½Ý’è‚ðŽg‚¢‚½‚¢ê‡‚Ì‚ÝA -HKEY_CURRENT_USER‚ðÝ’è‚·‚邿‚¤‚É‚µ‚Ä‚­‚¾‚³‚¢B -

      -“Á‚ÉAƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Íí‚É HKEY_LOCAL_MACHINE ‚Ì -ݒ肵‚©“ǂݑ‚«‚µ‚Ü‚¹‚ñBƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚ðŽg—p‚µ‚Ä -Ý’è‚ðs‚¤ê‡‚ɂ͋C‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B -

      -

      ƒŒƒWƒXƒgƒŠƒL[

      -

      -‘S‘̂̋¤’Ê‚ÌÝ’è‚ÆAƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è‚Æ‚ª‚ ‚è‚Ü‚·B -

      ‹¤’Ê’è‹`

      -
      -        Software\JPNIC\MDN\Where         •ÏŠ·ˆÊ’u
      -	                    0:WINSOCK1.1 WINSOCK2.0‚Ì—¼•û‚Å
      -                            1:WINSOCK2.0 ‚ª‚ ‚ê‚΂»‚¿‚ç‚Å
      -			    2:WINSOCK1.1 ‚¾‚¯‚Å
      -			    3:WINSOCK2.0 ‚¾‚¯‚Å
      -        Software\JPNIC\MDN\Encoding      DNS‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼
      -        Software\JPNIC\MDN\Normalize     ³‹K‰»‚Ì•ûŽ®
      -        Software\JPNIC\MDN\LogLevel      ƒƒOƒŒƒxƒ‹
      -        Software\JPNIC\MDN\LogFile       ƒƒOƒtƒ@ƒCƒ‹
      -
      -

      ƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è

      -

      -•ÏŠ·ˆÊ’uA‚¨‚æ‚уvƒƒOƒ‰ƒ€‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚Í -ƒvƒƒOƒ‰ƒ€–ˆ‚É“Á’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B -‚±‚ê‚ç‚ÍAˆÈ‰º‚̃L[ƒnƒCƒu‚̉º‚ÉA -ƒvƒƒOƒ‰ƒ€–¼‚ðƒL[‚Æ‚·‚é’l‚Åݒ肵‚Ü‚·B -

      - Software\JPNIC\MDN\PerProg\<name>\Where - Software\JPNIC\MDN\PerProg\<name>\Encoding -
      -Žw’肳‚ê‚Ä‚¢‚È‚¢ê‡‚É‚ÍA -
      - - - -
      Where 01.1A2.0 ‚Ì—¼•û‚ŕϊ·
      Encoding ƒvƒƒZƒX‚̃R[ƒhƒy[ƒW
      -
      -‚Ƃ݂Ȃµ‚Ü‚·B - - diff --git a/contrib/idn/mdnkit/include/Makefile.in b/contrib/idn/mdnkit/include/Makefile.in deleted file mode 100644 index 9dcf84268b..0000000000 --- a/contrib/idn/mdnkit/include/Makefile.in +++ /dev/null @@ -1,75 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:46:25 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -SHELL = @SHELL@ - -SUBDIRS = mdn - -all: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done - -install: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done - -clean: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done diff --git a/contrib/idn/mdnkit/include/config.h.in b/contrib/idn/mdnkit/include/config.h.in deleted file mode 100644 index f8fd4795ea..0000000000 --- a/contrib/idn/mdnkit/include/config.h.in +++ /dev/null @@ -1,245 +0,0 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ -/* $Id: config.h.in,v 1.1 2002/01/02 02:46:25 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define as an appropriate type (ex. int) if your system doesn't have. */ -#undef BOOL - -/* Define if you have the bcopy function. */ -#undef HAVE_BCOPY - -/* Define if you have the dlopen function. */ -#undef HAVE_DLOPEN - -/* Define if you have the dlsym function. */ -#undef HAVE_DLSYM - -/* Define if you have the freeaddrinfo function. */ -#undef HAVE_FREEADDRINFO - -/* Define if you have the freehostent function. */ -#undef HAVE_FREEHOSTENT - -/* Define if you have the getaddrinfo function. */ -#undef HAVE_GETADDRINFO - -/* Define if you have the gethostbyaddr function. */ -#undef HAVE_GETHOSTBYADDR - -/* Define if you have the gethostbyaddr_r function. */ -#undef HAVE_GETHOSTBYADDR_R - -/* Define if you have the gethostbyname function. */ -#undef HAVE_GETHOSTBYNAME - -/* Define if you have the gethostbyname2 function. */ -#undef HAVE_GETHOSTBYNAME2 - -/* Define if you have the gethostbyname2_r function. */ -#undef HAVE_GETHOSTBYNAME2_R - -/* Define if you have the gethostbyname_r function. */ -#undef HAVE_GETHOSTBYNAME_R - -/* Define if you have the getipnodebyaddr function. */ -#undef HAVE_GETIPNODEBYADDR - -/* Define if you have the getipnodebyname function. */ -#undef HAVE_GETIPNODEBYNAME - -/* Define if you have the getnameinfo function. */ -#undef HAVE_GETNAMEINFO - -/* Define if you have the memmove function. */ -#undef HAVE_MEMMOVE - -/* Define if you have the nl_langinfo function. */ -#undef HAVE_NL_LANGINFO - -/* Define if you have the setlocale function. */ -#undef HAVE_SETLOCALE - -/* Define if you have the setvbuf function. */ -#undef HAVE_SETVBUF - -/* Define if you have the syslog function. */ -#undef HAVE_SYSLOG - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the header file. */ -#undef HAVE_ARPA_NAMESER_H - -/* Define if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define if you have the header file. */ -#undef HAVE_LANGINFO_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_RESOLV_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define if you want additional ACE converters compiled in. */ -#undef MDN_EXTRA_ACE - -/* Define if your iconv() does not accept UTF-8 as the codeset name for utf-8. */ -#undef MDN_UTF8_ENCODING_NAME - -/* Define if the prefix of RACE encoding differs from 'bq--'. */ -#undef MDN_RACE_PREFIX - -/* Define if the suffix of BRACE encoding differs from '-8q9'. */ -#undef MDN_BRACE_SUFFIX - -/* Define if the prefix of LACE encoding differs from 'lq--'. */ -#undef MDN_LACE_PREFIX - -/* Define if the prefix of UTF-6 encoding differs from 'wq--'. */ -#undef MDN_UTF6_PREFIX - -/* Define if the prefix of DUDE encoding differs from 'dq--'. */ -#undef MDN_DUDE_PREFIX - -/* Define if the prefix of AltDUDE encoding differs from 'a---'. */ -#undef MDN_ALTDUDE_PREFIX - -/* Define if the suffix of AltDUDE encoding differs from ''. */ -#undef MDN_ALTDUDE_SUFFIX - -/* Define if the prefix of AMC-ACE-M encoding differs from ''. */ -#undef MDN_AMCACEM_PREFIX - -/* Define if the suffix of AMC-ACE-M encoding differs from '-amc1'. */ -#undef MDN_AMCACEM_SUFFIX - -/* Define if the prefix of AMC-ACE-O encoding differs from ''. */ -#undef MDN_AMCACEO_PREFIX - -/* Define if the suffix of AMC-ACE-O encoding differs from '-amc2'. */ -#undef MDN_AMCACEO_SUFFIX - -/* Define if the prefix of AMC-ACE-R encoding differs from 'amc3-'. */ -#undef MDN_AMCACER_PREFIX - -/* Define if the prefix of AMC-ACE-V encoding differs from 'amc4-'. */ -#undef MDN_AMCACEV_PREFIX - -/* Define if the prefix of AMC-ACE-W encoding differs from 'amc5-'. */ -#undef MDN_AMCACEW_PREFIX - -/* Define if the prefix of AMC-ACE-Z encoding differs from 'zq--'. */ -#undef MDN_AMCACEZ_PREFIX - -/* Define if the prefix of MACE encoding differs from 'mq--'. */ -#undef MDN_MACE_PREFIX - -/* Define if you have the dl library (-ldl). */ -#undef HAVE_LIBDL - -/* Define as the type of the 1st argument of gethostbyaddr. */ -#undef GHBA_ADDR_T - -/* Define as the type of the 2nd argument of gethostbyaddr. */ -#undef GHBA_ADDRLEN_T - -/* Define as the type of the 2nd argument of getnameinfo. */ -#undef GNI_SALEN_T - -/* Define as the type of the 4th argument of getnameinfo. */ -#undef GNI_HOSTLEN_T - -/* Define as the type of the 6th argument of getnameinfo. */ -#undef GNI_SERVLEN_T - -/* Define as the type of the 7th argument of getnameinfo. */ -#undef GNI_FLAGS_T - -/* Define if the prototype of gethost*_r is glibc flavor. */ -#undef GETHOST_R_GLIBC_FLAVOR - -/* Define as the pathname of the shared libc object if your system has one. */ -#undef SOPATH_LIBC - -/* Define as the pathname of the shared libnsl object if your system has one. */ -#undef SOPATH_LIBNSL diff --git a/contrib/idn/mdnkit/include/config.h.win b/contrib/idn/mdnkit/include/config.h.win deleted file mode 100644 index b1ead9e328..0000000000 --- a/contrib/idn/mdnkit/include/config.h.win +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: config.h.win,v 1.1 2002/01/02 02:46:26 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the setvbuf function. */ -#undef HAVE_SETVBUF - -/* Define if you have the setlocale function. */ -#undef HAVE_SETLOCALE - -/* Define if you have the nl_langinfo function. */ -#undef HAVE_NL_LANGINFO - -/* Define if you have the header file. */ -#undef HAVE_LANGINFO_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if your iconv() does not accept "UTF-8" as the codeset name for utf-8. */ -#undef MDN_UTF8_ENCODING_NAME - -/* Define if you want ZLD feature compiled in. */ -#undef MDN_SUPPORT_ZLD diff --git a/contrib/idn/mdnkit/include/mdn/Makefile.in b/contrib/idn/mdnkit/include/mdn/Makefile.in deleted file mode 100644 index 588bea12f7..0000000000 --- a/contrib/idn/mdnkit/include/mdn/Makefile.in +++ /dev/null @@ -1,129 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:46:26 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -includedir = @includedir@ -mdnincludedir = $(includedir)/mdn - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ - -HDRS = \ - ace.h \ - altdude.h \ - amcacem.h \ - amcaceo.h \ - amcacer.h \ - amcacev.h \ - amcacew.h \ - amcacez.h \ - api.h \ - assert.h \ - brace.h \ - checker.h \ - converter.h \ - debug.h \ - delimitermap.h \ - dude.h \ - dn.h \ - filechecker.h \ - filemapper.h \ - lace.h \ - localencoding.h \ - log.h \ - logmacro.h \ - mace.h \ - mapper.h \ - mapselector.h \ - msgheader.h \ - msgtrans.h \ - nameprep.h \ - normalizer.h \ - race.h \ - res.h \ - resconf.h \ - result.h \ - selectiveencode.h \ - strhash.h \ - ucsmap.h \ - ucsset.h \ - unicode.h \ - unormalize.h \ - utf5.h \ - utf6.h \ - utf8.h \ - util.h \ - version.h - -all: - -install: - $(MKINSTALLDIRS) $(mdnincludedir) - for hdr in $(HDRS); \ - do $(INSTALL_DATA) $(srcdir)/$$hdr $(mdnincludedir); done - -clean: - rm -f *~ - diff --git a/contrib/idn/mdnkit/include/mdn/ace.h b/contrib/idn/mdnkit/include/mdn/ace.h deleted file mode 100644 index 7c54221728..0000000000 --- a/contrib/idn/mdnkit/include/mdn/ace.h +++ /dev/null @@ -1,130 +0,0 @@ -/* $Id: ace.h,v 1.2 2002/02/08 05:38:53 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_ACE_H -#define MDN_ACE_H 1 - -/* - * ACE converter utility module. - */ - -#include - -/* - * ACE identifier type -- prefix or suffix. - */ -enum { - mdn__ace_prefix, - mdn__ace_suffix -}; - -/* - * ACE encoding/decode procedure. - * - * This prototype applies to both encode and decode procedure. Both - * of which converts a domain label (i.e. contains no dots) pointed by - * 'from', whose length is 'fromlen', and stores the result to 'to', - * whose size is 'tolen'. - * the ACE string must not have ACE prefix/suffix, as it is automatically - * handled by 'mdn__ace_convert'. - */ -typedef mdn_result_t (*mdn__ace_proc_t)(const char *from, size_t fromlen, - char *to, size_t tolen); - -/* - * ACE converter property. - * - * 'id_type' shows the type of ACE identifier, which is either - * 'mdn__ace_prefix' or 'mdn__ace_suffix'. 'id_str' is the ACE - * identifier itself. 'encoder' and 'decode' are pointers to the - * encode and decode procedures. - * Encode procedure converts a domain name label in UTF-8 to - * ACE-encoded one, and decode procedure converts ACE-encoded label to - * UTF-8 encoded one. - */ -typedef struct { - int id_type; /* mdn__ace_prefix/mdn__ace_suffix */ - const char *id_str; /* prefix/suffix string */ - mdn__ace_proc_t encoder; /* encode procedure */ - mdn__ace_proc_t decoder; /* decode procedure */ -} mdn__ace_t; - -/* - * Utility for ACE converter. - * - * Convert a domain name given by 'from' and stores the result to - * 'to', whose length is 'tolen'. If 'dir' is 'mdn_convert_u2l', - * 'from' points UTF-8 string which is converted to ACE encoding. If - * 'dir' is 'mdn_convert_l2u', 'from' points ACE string which is - * converted to UTF-8. - * This function first breaks down the given name into labels, - * and encode/decode each label. When encoding, conversion of - * STD13 conforming labels (i.e. valid ASCII labels) is skipped. - * When decoding, if the decoding failed but the label is a legitimate - * ASCII label, those labels are copied verbatim. To reject illegally - * encoded labels, the decoding process performs two kinds of checks: - * 1. check that the decoded string does NOT comform to STD13. - * 2. try encoding the decoded string, and see if the result matches - * to the original string. - */ -extern mdn_result_t -mdn__ace_convert(mdn__ace_t *ctx, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -#endif /* MDN_ACE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/altdude.h b/contrib/idn/mdnkit/include/mdn/altdude.h deleted file mode 100644 index 12fe9444b9..0000000000 --- a/contrib/idn/mdnkit/include/mdn/altdude.h +++ /dev/null @@ -1,88 +0,0 @@ -/* $Id: altdude.h,v 1.2 2002/02/08 05:38:55 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_ALTDUDE_H -#define MDN_ALTDUDE_H 1 - -/* - * AltDUDE Converter. - * - * See Internet Draft draft-ietf-idn-altdude-00.txt for details. Note - * that this implementation does not support "case preservation" - * option. - */ - -#include -#include - -extern mdn_result_t -mdn__altdude_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__altdude_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__altdude_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -#endif /* MDN_ALTDUDE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcacem.h b/contrib/idn/mdnkit/include/mdn/amcacem.h deleted file mode 100644 index cb54ab8ca2..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcacem.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: amcacem.h,v 1.2 2002/02/08 05:38:56 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACEM_H -#define MDN_AMCACEM_H 1 - -/* - * AMC-ACE-M Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-m-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__amcacem_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcacem_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcacem_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACEM_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcaceo.h b/contrib/idn/mdnkit/include/mdn/amcaceo.h deleted file mode 100644 index b4703945e0..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcaceo.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: amcaceo.h,v 1.2 2002/02/08 05:38:57 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACEO_H -#define MDN_AMCACEO_H 1 - -/* - * AMC-ACE-O Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-o-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__amcaceo_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcaceo_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcaceo_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACEO_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcacer.h b/contrib/idn/mdnkit/include/mdn/amcacer.h deleted file mode 100644 index ffd5f899fa..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcacer.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id: amcacer.h,v 1.2 2002/02/08 05:38:58 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACER_H -#define MDN_AMCACER_H 1 - -/* - * AMC-ACE-R Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-r-01.txt for details. - * Note that -01 has some imcompatible changes over -00 spec. - */ - -#include -#include - -extern mdn_result_t -mdn__amcacer_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcacer_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcacer_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcacev.h b/contrib/idn/mdnkit/include/mdn/amcacev.h deleted file mode 100644 index 569dd2e9c5..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcacev.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: amcacev.h,v 1.1 2002/02/08 05:38:59 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACEV_H -#define MDN_AMCACEV_H 1 - -/* - * AMC-ACE-V Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-v-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__amcacev_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcacev_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcacev_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACEV_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcacew.h b/contrib/idn/mdnkit/include/mdn/amcacew.h deleted file mode 100644 index 9d25c32333..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcacew.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: amcacew.h,v 1.1 2002/02/08 05:39:00 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACEW_H -#define MDN_AMCACEW_H 1 - -/* - * AMC-ACE-W Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-w-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__amcacew_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcacew_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcacew_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACEW_H */ diff --git a/contrib/idn/mdnkit/include/mdn/amcacez.h b/contrib/idn/mdnkit/include/mdn/amcacez.h deleted file mode 100644 index 6c8e10a578..0000000000 --- a/contrib/idn/mdnkit/include/mdn/amcacez.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id: amcacez.h,v 1.1 2002/02/08 05:39:00 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_AMCACEZ_H -#define MDN_AMCACEZ_H 1 - -/* - * AMC-ACE-Z (version 0.3.1) Converter. - * - * See Internet Draft draft-ietf-idn-amc-ace-z-01.txt - * for details. - */ - -#include -#include - -extern mdn_result_t -mdn__amcacez_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__amcacez_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__amcacez_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_AMCACEZ_H */ diff --git a/contrib/idn/mdnkit/include/mdn/api.h b/contrib/idn/mdnkit/include/mdn/api.h deleted file mode 100644 index e9b0e9a62a..0000000000 --- a/contrib/idn/mdnkit/include/mdn/api.h +++ /dev/null @@ -1,229 +0,0 @@ -/* $Id: api.h,v 1.2 2002/02/08 05:39:00 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_API_H -#define MDN_API_H 1 - -#include - -/* - * Application Programming Interface for Multilingual Domain Name Handling. - * This module provides high-level APIs for ordinary applications. - * Low-level APIs are also available. See "res.h" for details. - */ - -/* - * Actions - */ -#define MDN_LOCALCONV 0x0001 /* Local encoding <-> UTF-8 conversion */ -#define MDN_IDNCONV 0x0002 /* UTF-8 <-> IDN encoding (ACE) conversion */ -#define MDN_NAMEPREP 0x0004 /* NAMEPREP */ -#define MDN_UNASCHECK 0x0008 /* Unassigned code point check */ -#define MDN_DELIMMAP 0x0100 /* Delimiter mapping */ -#define MDN_LOCALMAP 0x0200 /* Local mapping */ - -/* - * Actions needed for ordinary applications. - */ -#define MDN_ENCODE_APP \ - (MDN_LOCALCONV|MDN_DELIMMAP|MDN_LOCALMAP|MDN_NAMEPREP|MDN_IDNCONV) -#define MDN_DECODE_APP (MDN_IDNCONV|MDN_NAMEPREP|MDN_LOCALCONV) - -/* - * Initialize the whole library, and load configuration from the default - * configuration file (mdn.conf). - * - * Initialization of the library will be done only once when this function - * is called first, while loading of the configuration file will be done - * every time it is called. - * - * If 'mdn_encodename' or 'mdn_decodename' is called without calling this - * function, implicit initialization will be done prior to encoding/decoding - * process. - * - * Returns: - * mdn_success -- ok. - * mdn_nofile -- cannot open the configuration file. - * mdn_invalid_syntax -- syntax error found in the file. - * mdn_invalid_name -- there are invalid names (encoding, - * normalization etc.). - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_nameinit(void); - -/* - * Encode multilingual domain name for name resolution. - * - * The encoding process consists of the following 5 steps. - * - * 1. local encoding (such as Shift-JIS or Big5) to UTF-8 conversion. - * 2. delimiter mapping, which maps certain characters to period - * (U+002E, FULL STOP) character. - * 3. non-standard local mapping, whose exact rule is determined by - * the TLD of the domain name to be encoded. This allows - * locale-specific mapping for each ccTLD. - * 4. NAMEPREP, as described in the Internet Draft - * (draft-ietf-idn-nameprep-XX). This step has an option of - * prohibiting use of unassigned code points in the domain name. - * 5. UTF-8 to IDN encoding (ACE) conversion. - * - * Some steps can be skipped according to the application's needs. - * For example, if the application holds the multilingual domain names in - * UTF-8, step 1 above won't be necessary. - * - * 'actions' specifies what actions to take when encoding, and is - * a bitwise-or of the following flags: - * - * MDN_LOCALCONV -- perform local encoding to UTF-8 conversion (step 1) - * MDN_DELIMMAP -- perform delimiter mapping (step 2) - * MDN_LOCALMAP -- perform local mapping (step 3) - * MDN_NAMEPREP -- perform NAMEPREP (step 4) - * MDN_UNASCHECK -- perform optional unassigned codepoint check - * (also step 4) - * MDN_IDNCONV -- perform UTF-8 to IDN encoding conversion (step 5) - * - * Note that if no flags are specified, 'mdn_encodename' does nothing - * fancy, just copies the given name verbatim. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_action -- invalid action flag specified. - * mdn_invalid_encoding -- the given string has invalid/illegal - * byte sequence. - * mdn_prohibited -- prohibited/unassigned code point found. - * mdn_buffer_overflow -- 'tolen' is too small. - * mdn_nomemory -- malloc failed. - * - * Also, if this function is called without calling 'mdn_nameinit', - * the following error codes might be returned. - * mdn_nofile -- cannot open the configuration file. - * mdn_invalid_syntax -- syntax error found in the file. - * mdn_invalid_name -- there are invalid names (encoding, - * normalization etc.). - */ -extern mdn_result_t -mdn_encodename(int actions, const char *from, char *to, size_t tolen); - -/* - * Decode multilingual domain name returned from resolver. - * - * The decoding process consists of the following 2 steps. It is much - * simpler than the encoding process because no name preparation is - * necessary. - * - * 1. server encoding (ACE) to UTF-8 conversion. - * 2. UTF-8 to local encoding conversion. - * - * 'actions' specifies what actions to take when decoding, and is - * a bitwise-or of the following flags: - * - * MDN_IDNCONV -- perform IDN encoding to UTF-8 conversion (step 1) - * MDN_NAMEPREP -- perform NAMEPREP for verification (step 2) - * MDN_UNASCHECK -- perform optional unassigned codepoint check for - * verification (also step 2) - * MDN_LOCALCONV -- perform UTF-8 to local encoding conversion (step 3) - * - * Note that if no flags are specified, 'mdn_decodename' does nothing - * but copying the given name verbatim. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_action -- invalid action flag specified. - * mdn_invalid_encoding -- the given string has invalid/illegal - * byte sequence. - * mdn_buffer_overflow -- 'tolen' is too small. - * mdn_nomemory -- malloc failed. - * - * Also, if this function is called without calling 'mdn_nameinit', - * the following error codes might be returned. - * mdn_nofile -- cannot open the configuration file. - * mdn_invalid_syntax -- syntax error found in the file. - * mdn_invalid_name -- there are invalid names (encoding, - * normalization etc.). - */ -extern mdn_result_t -mdn_decodename(int actions, const char *from, char *to, size_t tolen); - -/* - * For convenience. - */ -#define mdn_localtoutf8(from, to, tolen) \ - mdn_encodename(MDN_LOCALCONV, from, to, len) -#define mdn_delimitermap(from, to, tolen) \ - mdn_encodename(MDN_DELIMMAP, from, to, len) -#define mdn_localmap(from, to, tolen) \ - mdn_encodename(MDN_LOCALMAP, from, to, len) -#define mdn_nameprep(from, to, tolen) \ - mdn_encodename(MDN_NAMEPREP, from, to, len) -#define mdn_utf8toidn(from, to, tolen) \ - mdn_encodename(MDN_IDNCONV, from, to, len) -#define mdn_idntoutf8(from, to, tolen) \ - mdn_decodename(MDN_IDNCONV, from, to, tolen) -#define mdn_utf8tolocal(from, to, tolen) \ - mdn_decodename(MDN_LOCALCONV, from, to, tolen) -#define mdn_nameprepcheck(from, to, tolen) \ - mdn_decodename(MDN_NAMEPREP, from, to, tolen) - -#define mdn_localtoidn(from, to, tolen) \ - mdn_encodename(MDN_ENCODE_APP, from, to, tolen) -#define mdn_idntolocal(from, to, tolen) \ - mdn_decodename(MDN_DECODE_APP, from, to, tolen) - -#endif /* MDN_API_H */ diff --git a/contrib/idn/mdnkit/include/mdn/assert.h b/contrib/idn/mdnkit/include/mdn/assert.h deleted file mode 100644 index 656643e254..0000000000 --- a/contrib/idn/mdnkit/include/mdn/assert.h +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id: assert.h,v 1.1 2002/01/02 02:46:29 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_ASSERT_H -#define MDN_ASSERT_H 1 - -#ifndef DEBUG -#define NDEBUG -#endif - -#include - -# endif /* MDN_ASSERT_H */ diff --git a/contrib/idn/mdnkit/include/mdn/brace.h b/contrib/idn/mdnkit/include/mdn/brace.h deleted file mode 100644 index dac7a7f86a..0000000000 --- a/contrib/idn/mdnkit/include/mdn/brace.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $Id: brace.h,v 1.1 2002/01/02 02:46:29 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_BRACE_H -#define MDN_BRACE_H 1 - -/* - * BRACE Converter. - * - * See Internet Draft draft-ietf-idn-brace-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__brace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata); - -extern mdn_result_t -mdn__brace_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__brace_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_BRACE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/checker.h b/contrib/idn/mdnkit/include/mdn/checker.h deleted file mode 100644 index 070e9a6378..0000000000 --- a/contrib/idn/mdnkit/include/mdn/checker.h +++ /dev/null @@ -1,178 +0,0 @@ -/* $Id: checker.h,v 1.2 2002/02/08 05:39:04 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_CHECKER_H -#define MDN_CHECKER_H 1 - -/* - * Character Checker. - * - * Perfom checking characters in the specified domain name. - */ - -#include -#include -#include - -/* - * Schems name prefixes for the standard nameprep prohibit/unassigned - * checks. - * - * If you'd like to add the unassigned check scheme of "nameprep-XX" - * to a checker context, MDN_CHECKER_UNASSIGNED_PREFIX + "nameprep-XX" - * (i.e. "unassigned#nameprep-XX") is the scheme name passed to - * mdn_checker_add(). - */ -#define MDN_CHECKER_PROHIBIT_PREFIX "prohibit#" -#define MDN_CHECKER_UNASSIGNED_PREFIX "unassigned#" - -/* - * Checker object type. - */ -typedef struct mdn_checker *mdn_checker_t; - -/* - * Initialize module. Must be called before any other calls of - * the functions of this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_checker_initialize(void); - -/* - * Create a checker context. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_checker_create(mdn_checker_t *ctxp); - -/* - * Decrement reference count of the checker `ctx' created by - * 'mdn_checker_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the checker. - */ -extern void -mdn_checker_destroy(mdn_checker_t ctx); - -/* - * Increment reference count of the checker `ctx' created by - * 'mdn_checker_create'. - */ -extern void -mdn_checker_incrref(mdn_checker_t ctx); - -/* - * Add checking scheme `name' to the checker to `ctx'. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_name -- the given name is not valid. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_checker_add(mdn_checker_t ctx, const char *name); - -extern mdn_result_t -mdn_checker_addall(mdn_checker_t ctx, const char **names, int nnames); - -/* - * Check an UTF-8 name. All checking schemes regsitered in `ctx' - * are applied in the regisration order. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- the input string has invalid/illegal - * UTF-8 sequence. - */ -extern mdn_result_t -mdn_checker_lookup(mdn_checker_t ctx, const char *utf8, const char **found); - -/* - * Checking procedure type. - */ -typedef mdn_result_t (*mdn_checker_createproc_t)(const char *parameter, - void **ctxp); -typedef void (*mdn_checker_destroyproc_t)(void *ctx); -typedef mdn_result_t (*mdn_checker_lookupproc_t)(void *ctx, const char *utf8, - const char **found); - -/* - * Register a new checking scheme. - * - * You can override the default normalization schemes, if you want. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_checker_register(const char *prefix, - mdn_checker_createproc_t create, - mdn_checker_destroyproc_t destroy, - mdn_checker_lookupproc_t lookup); - -#endif /* MDN_CHECKER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/converter.h b/contrib/idn/mdnkit/include/mdn/converter.h deleted file mode 100644 index 9d777de332..0000000000 --- a/contrib/idn/mdnkit/include/mdn/converter.h +++ /dev/null @@ -1,262 +0,0 @@ -/* $Id: converter.h,v 1.1 2002/01/02 02:46:30 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_CONVERTER_H -#define MDN_CONVERTER_H 1 - -/* - * Codeset converter. - * - * This module provides conversions from some local codeset to UTF-8 - * and vice versa. - */ - -#include - -/* - * Converter context type (opaque). - */ -typedef struct mdn_converter *mdn_converter_t; - -/* - * Conversion direction (local codeset -> UTF-8 or the opposite) - */ -typedef enum { - mdn_converter_l2u, /* local-to-utf8 */ - mdn_converter_u2l /* utf8-to-local */ -} mdn_converter_dir_t; - -/* - * Conversion flags. - */ -#define MDN_CONVERTER_DELAYEDOPEN 1 -#define MDN_CONVERTER_RTCHECK 2 - -/* - * Encoding types. - */ -#define MDN_NONACE 0 -#define MDN_ACE_STRICTCASE 1 -#define MDN_ACE_LOOSECASE 2 - -/* - * Initialize module. Must be called before any other calls of - * the functions of this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_converter_initialize(void); - -/* - * Create a conversion context. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_name -- specified codeset is not supported. - * mdn_nomemory -- malloc failed. - * mdn_failure -- other failure (unknown cause). - */ -extern mdn_result_t -mdn_converter_create(const char *name, mdn_converter_t *ctxp, - int flags); - -/* - * Decrement reference count of the converter `ctx' created by - * 'mdn_converter_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the converter. - */ -extern void -mdn_converter_destroy(mdn_converter_t ctx); - -/* - * Increment reference count of the converter `ctx' created by - * 'mdn_converter_create'. - */ -extern void -mdn_converter_incrref(mdn_converter_t ctx); - -/* - * Convert between local codeset and UTF-8. Note that each conversion - * is started with initial state. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- the input string has invalid/illegal - * byte sequence. - * mdn_invalid_name -- codeset is not supported (this error - * should happen only if 'delayedopen' - * flag was set when mdn_converter_create - * was called) - * mdn_failure -- other failure. - */ -extern mdn_result_t -mdn_converter_convert(mdn_converter_t ctx, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -/* - * Macros for convenience. - */ -#define mdn_converter_localtoutf8(ctx, from, to, tolen) \ - mdn_converter_convert((ctx), mdn_converter_l2u, (from), (to), (tolen)) - -#define mdn_converter_utf8tolocal(ctx, from, to, tolen) \ - mdn_converter_convert((ctx), mdn_converter_u2l, (from), (to), (tolen)) - -/* - * Get the name of local codeset. The returned name may be different from - * the one specified to mdn_converter_create, if the specified one was an - * alias. - * - * Returns: - * the local codeset name. - */ -extern char * -mdn_converter_localencoding(mdn_converter_t ctx); - -/* - * Return the encoding type of this local encoding. - * - * Returns: - * MDN_NOACE -- encoding is not ACE. - * MDN_ACE_STRICTCASE -- encoding is ACE. - * decoder of this ACE preserve letter case. - * MDN_ACE_LOOSECASE -- encoding type is ACE. - * decoder cannot preserve letter case. - */ -extern int -mdn_converter_encodingtype(mdn_converter_t ctx); - -/* - * Return if this local encoding is ACE (Ascii Compatible Encoding). - * - * Returns: - * 1 -- yes, it is ACE. - * 0 -- no. - */ -extern int -mdn_converter_isasciicompatible(mdn_converter_t ctx); - -/* - * Register an alias for a codeset name. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_converter_addalias(const char *alias_name, const char *real_name); - -/* - * Register aliases defined by the specified file. - * - * Returns: - * mdn_success -- ok. - * mdn_nofile -- no such file. - * mdn_invalid_syntax -- file is malformed. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_converter_aliasfile(const char *path); - -/* - * Unregister all the aliases. - */ -extern mdn_result_t -mdn_converter_resetalias(void); - - -/* - * New converter registration. - */ - -/* - * Conversion operation functions. - */ -typedef mdn_result_t (*mdn_converter_openproc_t)(mdn_converter_t ctx, - mdn_converter_dir_t dir, - void **privdata); -typedef mdn_result_t (*mdn_converter_closeproc_t)(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir); -typedef mdn_result_t (*mdn_converter_convertproc_t)(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir, - const char *from, - char *to, size_t tolen); - -/* - * Register a new converter. - * 'encoding_type' is a value which mdn_converter_encodingtype() returns. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_converter_register(const char *name, - mdn_converter_openproc_t open, - mdn_converter_closeproc_t close, - mdn_converter_convertproc_t convert, - int encoding_type); - -#endif /* MDN_CONVERTER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/debug.h b/contrib/idn/mdnkit/include/mdn/debug.h deleted file mode 100644 index 27469bc118..0000000000 --- a/contrib/idn/mdnkit/include/mdn/debug.h +++ /dev/null @@ -1,72 +0,0 @@ -/* $Id: debug.h,v 1.1 2002/01/02 02:46:30 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_DEBUG_H -#define MDN_DEBUG_H 1 - -/* - * Debug utility - */ - -extern char *mdn_debug_hexstring(const char *s, int maxbytes); -extern char *mdn_debug_xstring(const char *s, int maxbytes); -extern char *mdn_debug_hexdata(const char *s, int length, int maxlength); -extern void mdn_debug_hexdump(const char *s, int length); - -#endif /* MDN_DEBUG_H */ diff --git a/contrib/idn/mdnkit/include/mdn/delimitermap.h b/contrib/idn/mdnkit/include/mdn/delimitermap.h deleted file mode 100644 index 5a5719259f..0000000000 --- a/contrib/idn/mdnkit/include/mdn/delimitermap.h +++ /dev/null @@ -1,148 +0,0 @@ -/* $Id: delimitermap.h,v 1.2 2002/02/08 05:39:07 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_DELIMITERMAP_H -#define MDN_DELIMITERMAP_H 1 - -/* - * Mapper. - * - * Perfom mapping local delimiters to `.'. - */ - -#include - -/* - * Map object type. - */ -typedef struct mdn_delimitermap *mdn_delimitermap_t; - -/* - * Create a delimitermap context. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_delimitermap_create(mdn_delimitermap_t *ctxp); - -/* - * Decrement reference count of the delimitermap `ctx' created by - * 'mdn_delimitermap_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the delimitermap. - */ -extern void -mdn_delimitermap_destroy(mdn_delimitermap_t ctx); - -/* - * Increment reference count of the delimitermap `ctx' created by - * 'mdn_delimitermap_create'. - */ -extern void -mdn_delimitermap_incrref(mdn_delimitermap_t ctx); - -/* - * Add a local delimiter. - * The context must be in the building phase -- that is, before - * 'mdn_delimitermap_fix' is called for the context. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_invalid_codepoint -- delimiter is not valid UCS-4 character. - * mdn_failure -- already fixed by 'mdn_delimitermap_fix'. - */ -extern mdn_result_t -mdn_delimitermap_add(mdn_delimitermap_t ctx, unsigned long delimiter); - -extern mdn_result_t -mdn_delimitermap_addall(mdn_delimitermap_t ctx, unsigned long *delimiters, - int ndelimiters); - -/* - * Perform internal arrangement of mapping. - * Once the context is fixed by this function, it becomes immutable, - * and it shifts into 'lookup' phase. - */ -extern void -mdn_delimitermap_fix(mdn_delimitermap_t ctx); - -/* - * Map local delimiters in an UTF-8 domain name to `.'. - * The context must be in the lookup phase -- in other words, - * 'mdn_delimitermap_fix' must be called for the context before calling - * this function. - * - * Note that if no delimiter is added to the context, the function copies - * the string and doesn't check that the input string has valid UTF-8 - * sequence. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- the input string has invalid/illegal - * UTF-8 sequence. - * mdn_failure -- not fixed by 'mdn_delimitermap_fix' yet. - */ -extern mdn_result_t -mdn_delimitermap_map(mdn_delimitermap_t ctx, const char *from, char *to, - size_t tolen); - -#endif /* MDN_DELIMITERMAP_H */ diff --git a/contrib/idn/mdnkit/include/mdn/dn.h b/contrib/idn/mdnkit/include/mdn/dn.h deleted file mode 100644 index 1b3df48a3c..0000000000 --- a/contrib/idn/mdnkit/include/mdn/dn.h +++ /dev/null @@ -1,117 +0,0 @@ -/* $Id: dn.h,v 1.1 2002/01/02 02:46:30 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_DN_H -#define MDN_DN_H 1 - -#define MDN_DN_NPTRS 64 - -/* - * Domain name compression/expansion. - * - * The interface this module provides is similar to the standard - * dn_comp and dn_expand, but with a twist. - */ - -#include - -/* - * Compression context. - */ -typedef struct { - const unsigned char *msg; - int cur; - int offset[MDN_DN_NPTRS]; -} mdn__dn_t; - -/* - * Expand a compressed domain name. - * - * It is similar to dn_expand in resolver library. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- 'buflen' is too small. - * mdn_invalid_message -- the specified message is not valid. - */ -extern mdn_result_t -mdn__dn_expand(const char *msg, size_t msglen, const char *compressed, - char *expanded, size_t buflen, size_t *complenp); - -/* - * Initialize compression context. - */ -extern void -mdn__dn_initcompress(mdn__dn_t *ctx, const char *msg); - -/* - * Compress a domain name. - * - * It is similar to dn_comp. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- 'length' is too small. - * mdn_invalid_name -- the specified name is invalid. - */ -extern mdn_result_t -mdn__dn_compress(const char *name, char *sptr, size_t length, - mdn__dn_t *ctx, size_t *complenp); - -#endif /* MDN_DN_H */ diff --git a/contrib/idn/mdnkit/include/mdn/dude.h b/contrib/idn/mdnkit/include/mdn/dude.h deleted file mode 100644 index efba60a204..0000000000 --- a/contrib/idn/mdnkit/include/mdn/dude.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id: dude.h,v 1.2 2002/02/08 05:39:10 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_DUDE_H -#define MDN_DUDE_H 1 - -/* - * DUDE Converter. - * - * See Internet Draft draft-ietf-idn-dude-02.txt for details. Note - * that this implementation does not support the optional feature of - * DUDE, which is "Mixed-case annotation". Implementing this feature - * requires reimplementation of NAMEPREP process of libmdn. - */ - -#include -#include - -extern mdn_result_t -mdn__dude_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata); - -extern mdn_result_t -mdn__dude_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__dude_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -#endif /* MDN_DUDE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/filechecker.h b/contrib/idn/mdnkit/include/mdn/filechecker.h deleted file mode 100644 index cde4d1796c..0000000000 --- a/contrib/idn/mdnkit/include/mdn/filechecker.h +++ /dev/null @@ -1,144 +0,0 @@ -/* $Id: filechecker.h,v 1.2 2002/02/08 05:39:11 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_FILECHECKER_H -#define MDN_FILECHECKER_H 1 - -/* - * Character checker -- check if there are any characters specified - * by a file in the given string. - */ - -#include - -/* - * Check object type. - */ -typedef struct mdn__filechecker *mdn__filechecker_t; - -/* - * Read the contents of the given file and create a context for - * checking. - * - * 'file' is the pathname of the file, which specifies the set of - * characters to be checked. The file is a simple text file, and - * each line must be of the form either - * - * or - * - - * (or comment, see below) where is a UCS code point - * represented as hexadecimal string with optional prefix `U+' - * (ex. `0041' or `U+FEDC'). - * - * The former specifies just one character (a code point, to be precise), - * while the latter specified a range of characters. In the case of - * a character range, the first code point (before hyphen) must not be - * greater than the second code point (after hyphen). - * - * Lines starting with `#' are comments. - * - * If file is read with no errors, the created context is stored in - * '*ctxp', and 'mdn_success' is returned. Otherwise, the contents - * of '*ctxp' is undefined. - * - * Returns: - * mdn_success -- ok. - * mdn_nofile -- cannot open the specified file. - * mdn_nomemory -- malloc failed. - * mdn_invalid_syntax -- file format is not valid. - */ -extern mdn_result_t -mdn__filechecker_create(const char *file, mdn__filechecker_t *ctxp); - -/* - * Release memory for the specified context. - */ -extern void -mdn__filechecker_destroy(mdn__filechecker_t ctx); - -/* - * See if the given string contains any specified characters. - * - * Check if there is any characters pecified by the context 'ctx' in - * the string 'str', which must be a valid UTF-8 string. If there - * are none, NULL is stored in '*found'. Otherwise, the pointer to - * the first occurence of such character is stored in '*found'. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_encoding -- 'str' is not a valid UTF-8 string. - */ -extern mdn_result_t -mdn__filechecker_lookup(mdn__filechecker_t ctx, const char *str, - const char **found); - -/* - * The following functions are for internal use. - * They are used for this module to be add to the checker module. - */ -extern mdn_result_t -mdn__filechecker_createproc(const char *parameter, void **ctxp); - -extern void -mdn__filechecker_destroyproc(void *ctxp); - -extern mdn_result_t -mdn__filechecker_lookupproc(void *ctx, const char *str, const char **found); - -#endif /* MDN_FILECHECKER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/filemapper.h b/contrib/idn/mdnkit/include/mdn/filemapper.h deleted file mode 100644 index cc19be046b..0000000000 --- a/contrib/idn/mdnkit/include/mdn/filemapper.h +++ /dev/null @@ -1,145 +0,0 @@ -/* $Id: filemapper.h,v 1.2 2002/02/08 05:39:12 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_FILEMAPPER_H -#define MDN_FILEMAPPER_H 1 - -/* - * Perform character mapping (substitution) according to a - * map file. - */ - -#include - -/* - * Mapping object type. - */ -typedef struct mdn__filemapper *mdn__filemapper_t; - -/* - * Read the contents of the given map file and create a context for mapping. - * - * 'file' is the pathname of the file, which specifies the character - * mapping. The file is a simple text file, and each line specifies - * a mapping of a single character. The format of each line is - * - * ; [..][;] - * - * where is a UCS code point represented as a hexadecimal - * string with optional prefix `U+' (ex. `0041' or `U+FEDC'). - * The code point before the first semicolon will be mapped to the - * sequence of code points separated by space characters after the - * first semicolon. The sequence may be empty, denoting wiping out - * the character. - * - * For example, - * U+0041; U+0061 -- maps 'A' to 'a' - * 20;; -- wipes out ' ' - * - * Anything after the second semicolon is ignored. Also lines beginning - * with '#' are treated as comments. - * - * If there is no error, the created context is stored in '*ctxp'. - * - * Returns: - * mdn_success -- ok. - * mdn_nofile -- cannot open the specified file. - * mdn_nomemory -- malloc failed. - * mdn_invalid_syntax -- file format is not valid. - */ -extern mdn_result_t -mdn__filemapper_create(const char *file, mdn__filemapper_t *ctxp); - -/* - * Release memory for the given context. - */ -extern void -mdn__filemapper_destroy(mdn__filemapper_t ctx); - -/* - * Perform character substitution. - * - * Each character in the string 'from' is examined and if it - * has a mapping, it is substituted to the corresponding - * character sequence. The substituted string is stored in 'to', - * whose length is specified by 'tolen'. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- result buffer is too small. - * mdn_invalid_encoding -- 'str' is not a valid UTF-8 string. - */ -extern mdn_result_t -mdn__filemapper_map(mdn__filemapper_t ctx, const char *from, - char *to, size_t tolen); - -/* - * The following functions are for internal use. - * They are used for this module to be add to the mapper module. - */ -extern mdn_result_t -mdn__filemapper_createproc(const char *parameter, void **ctxp); - -extern void -mdn__filemapper_destroyproc(void *ctxp); - -extern mdn_result_t -mdn__filemapper_mapproc(void *ctx, const char *from, char *to, size_t tolen); - -#endif /* MDN_FILEMAPPER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/lace.h b/contrib/idn/mdnkit/include/mdn/lace.h deleted file mode 100644 index 29f0e6ec02..0000000000 --- a/contrib/idn/mdnkit/include/mdn/lace.h +++ /dev/null @@ -1,82 +0,0 @@ -/* $Id: lace.h,v 1.1 2002/01/02 02:46:31 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_LACE_H -#define MDN_LACE_H 1 - -/* - * LACE Converter. - * - * See Internet Draft draft-ietf-idn-lace-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__lace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata); - -extern mdn_result_t -mdn__lace_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__lace_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -#endif /* MDN_LACE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/localencoding.h b/contrib/idn/mdnkit/include/mdn/localencoding.h deleted file mode 100644 index 5e3d50a76c..0000000000 --- a/contrib/idn/mdnkit/include/mdn/localencoding.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: localencoding.h,v 1.1 2002/01/02 02:46:31 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_LOCALENCODING_H -#define MDN_LOCALENCODING_H 1 - -/* - * Local codeset detection. - * - * Determine the local codeset (the codeset used by the current application), - * based on the locale information. - */ - -#define MDN_LOCALCS_ENV "MDN_LOCAL_CODESET" - -/* - * Get the codeset name corresponding to the current locale, - * suitable for passing to 'mdn_converter_create'. - * - * If the codeset cannot be determined, the locale name itself - * will be returned in the hope that codeset alias file translates it - * to the right name. - * - * If it cannot retrieve the current locale name, NULL will be - * returned. - */ -extern const char *mdn_localencoding_name(void); - -#endif /* MDN_LOCALENCODING_H */ diff --git a/contrib/idn/mdnkit/include/mdn/log.h b/contrib/idn/mdnkit/include/mdn/log.h deleted file mode 100644 index 53f232e9aa..0000000000 --- a/contrib/idn/mdnkit/include/mdn/log.h +++ /dev/null @@ -1,113 +0,0 @@ -/* $Id: log.h,v 1.1 2002/01/02 02:46:31 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_LOG_H -#define MDN_LOG_H 1 - -/* - * MDN library logging facility. - */ - -/* - * Log level definition. - */ -enum { - mdn_log_level_fatal = 0, - mdn_log_level_error = 1, - mdn_log_level_warning = 2, - mdn_log_level_info = 3, - mdn_log_level_trace = 4, - mdn_log_level_dump = 5 -}; - -/* - * Log handler type. - */ -typedef void (*mdn_log_proc_t)(int level, const char *msg); - -/* - * Log routines. - */ -extern void mdn_log_fatal(const char *fmt, ...); -extern void mdn_log_error(const char *fmt, ...); -extern void mdn_log_warning(const char *fmt, ...); -extern void mdn_log_info(const char *fmt, ...); -extern void mdn_log_trace(const char *fmt, ...); -extern void mdn_log_dump(const char *fmt, ...); - -/* - * Set/get log level. - * - * If log level has not been explicitly defined by 'mdn_log_setlevel', - * the default level is determined by the value of enrironment - * variable 'MDN_LOG_LEVEL'. - */ -extern void mdn_log_setlevel(int level); -extern int mdn_log_getlevel(void); - -/* - * Set log handler. - * - * If no log handler is set, log goes to stderr by default. - * You can reset the handler to the default one by specifying - * NULL. - */ -extern void mdn_log_setproc(mdn_log_proc_t proc); - -#endif /* MDN_LOG_H */ diff --git a/contrib/idn/mdnkit/include/mdn/logmacro.h b/contrib/idn/mdnkit/include/mdn/logmacro.h deleted file mode 100644 index 9d862afd08..0000000000 --- a/contrib/idn/mdnkit/include/mdn/logmacro.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $Id: logmacro.h,v 1.1 2002/01/02 02:46:32 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_LOGMACRO_H -#define MDN_LOGMACRO_H 1 - -#include - -#define FATAL(x) mdn_log_fatal x -#define ERROR(x) mdn_log_error x -#define WARNING(x) mdn_log_warning x -#define INFO(x) LOG_AT_LEVEL(mdn_log_level_info, mdn_log_info, x) -#define TRACE(x) LOG_AT_LEVEL(mdn_log_level_trace, mdn_log_trace, x) - -#ifdef DEBUG -#define DUMP(x) LOG_AT_LEVEL(mdn_log_level_dump, mdn_log_dump, x) -#else -#define DUMP(x) -#endif /* DEBUG */ - -#define LOG_AT_LEVEL(lv, fun, x) do {if (LOGLEVEL >= (lv)) fun x; } while (0) -#define LOGLEVEL mdn_log_getlevel() - -#endif /* MDN_LOGMACRO_H */ diff --git a/contrib/idn/mdnkit/include/mdn/mace.h b/contrib/idn/mdnkit/include/mdn/mace.h deleted file mode 100644 index f79d16a7d3..0000000000 --- a/contrib/idn/mdnkit/include/mdn/mace.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id: mace.h,v 1.1 2002/02/08 05:39:19 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_MACE_H -#define MDN_MACE_H 1 - -/* - * MACE Converter. - * - * See Internet Draft draft-ietf-idn-mace-00.txt (but not yet - * published at the time of this writing) for details. - */ - -#include -#include - -extern mdn_result_t -mdn__mace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata); - -extern mdn_result_t -mdn__mace_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__mace_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_MACE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/mapper.h b/contrib/idn/mdnkit/include/mdn/mapper.h deleted file mode 100644 index 6e9e08f319..0000000000 --- a/contrib/idn/mdnkit/include/mdn/mapper.h +++ /dev/null @@ -1,166 +0,0 @@ -/* $Id: mapper.h,v 1.2 2002/02/08 05:39:19 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_MAPPER_H -#define MDN_MAPPER_H 1 - -/* - * Mapper. - * - * Perfom mapping the specified domain name. - */ - -#include -#include -#include - -/* - * Map object type. - */ -typedef struct mdn_mapper *mdn_mapper_t; - -/* - * Initialize module. Must be called before any other calls of - * the functions of this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapper_initialize(void); - -/* - * Create a mapper context. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapper_create(mdn_mapper_t *ctxp); - -/* - * Decrement reference count of the mapper `ctx' created by - * 'mdn_mapper_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the mapper. - */ -extern void -mdn_mapper_destroy(mdn_mapper_t ctx); - -/* - * Increment reference count of the mapper `ctx' created by - * 'mdn_mapper_create'. - */ -extern void -mdn_mapper_incrref(mdn_mapper_t ctx); - -/* - * Add mapping scheme `name' to the mapper to `ctx'. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_name -- the given name is not valid. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapper_add(mdn_mapper_t ctx, const char *name); - -extern mdn_result_t -mdn_mapper_addall(mdn_mapper_t ctx, const char **names, int nnames); - -/* - * Map an UTF-8 domain name. All mapping schemes regsitered in `ctx' - * are applied in the regisration order. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- the input string has invalid/illegal - * UTF-8 sequence. - */ -extern mdn_result_t -mdn_mapper_map(mdn_mapper_t ctx, const char *from, char *to, size_t tolen); - -/* - * Mapping procedure type. - */ -typedef mdn_result_t (*mdn_mapper_createproc_t)(const char *parameter, - void **ctxp); -typedef void (*mdn_mapper_destroyproc_t)(void *ctxp); -typedef mdn_result_t (*mdn_mapper_mapproc_t)(void *ctx, const char *from, - char *, size_t); - -/* - * Register a new mapping scheme. - * - * You can override the default normalization schemes, if you want. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapper_register(const char *prefix, - mdn_mapper_createproc_t create, - mdn_mapper_destroyproc_t destroy, - mdn_mapper_mapproc_t map); - -#endif /* MDN_MAPPER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/mapselector.h b/contrib/idn/mdnkit/include/mdn/mapselector.h deleted file mode 100644 index 7370154230..0000000000 --- a/contrib/idn/mdnkit/include/mdn/mapselector.h +++ /dev/null @@ -1,162 +0,0 @@ -/* $Id: mapselector.h,v 1.2 2002/02/08 05:39:21 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_MAPSELECTOR_H -#define MDN_MAPSELECTOR_H 1 - -/* - * Map selector. - * - * Perfom mapping the specified domain name according with the TLD - * of the donmain name. - */ - -#include -#include - -/* - * Special TLDs for map selection. - */ -#define MDN_MAPSELECTOR_NO_TLD "-" -#define MDN_MAPSELECTOR_DEFAULT "." - -/* - * Mapselector object type. - */ -typedef struct mdn_mapselector *mdn_mapselector_t; - -/* - * Initialize module. Must be called before any other calls of - * the functions of this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapselector_initialize(void); - -/* - * Create a mapselector context. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapselector_create(mdn_mapselector_t *ctxp); - -/* - * Decrement reference count of the mapselector `ctx' created by - * 'mdn_mapselector_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the mapselector. - */ -extern void -mdn_mapselector_destroy(mdn_mapselector_t ctx); - -/* - * Increment reference count of the mapselector `ctx' created by - * 'mdn_mapselector_create'. - */ -extern void -mdn_mapselector_incrref(mdn_mapselector_t ctx); - -/* - * Return the mapper for `tld' registered in `ctx', or return NULL if - * mapper for `tld' is not registered. - */ -extern mdn_mapper_t -mdn_mapselector_mapper(mdn_mapselector_t ctx, const char *tld); - -/* - * Add mapping scheme `name' to the mapper for `tld' to the mapselector - * context `ctx'. If no mapper for `TLD' has not been registered, the - * function creates a new mapper for `tld', and then adds the given mapping - * scheme to the mapper. Otherwise, it adds the scheme to the mapper for - * TLD registered in `ctx'. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_name -- the given tld or name is not valid. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_mapselector_add(mdn_mapselector_t ctx, const char *tld, const char *name); - -extern mdn_result_t -mdn_mapselector_addall(mdn_mapselector_t ctx, const char *tld, - const char **names, int nnames); - -/* - * Map an UTF-8 domain name with the mapper for TLD of the domain name. - * If there is no mapper suitable for the domain name, the function - * simply copies the doman name. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- the input string has invalid/illegal - * UTF-8 sequence. - */ -extern mdn_result_t -mdn_mapselector_map(mdn_mapselector_t ctx, - const char *from, char *to, size_t tolen); - -#endif /* MDN_MAPSELECTOR_H */ diff --git a/contrib/idn/mdnkit/include/mdn/msgheader.h b/contrib/idn/mdnkit/include/mdn/msgheader.h deleted file mode 100644 index 8b6c8cab1f..0000000000 --- a/contrib/idn/mdnkit/include/mdn/msgheader.h +++ /dev/null @@ -1,113 +0,0 @@ -/* $Id: msgheader.h,v 1.1 2002/01/02 02:46:33 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_MSGHEADER_H -#define MDN_MSGHEADER_H 1 - -/* - * DNS message header parsing/construction. - */ - -#include - -/* - * Parsed DNS message header. - */ -typedef struct mdn_msgheader { - unsigned int id; - int qr; - int opcode; - int flags; - int rcode; - unsigned int qdcount; - unsigned int ancount; - unsigned int nscount; - unsigned int arcount; -} mdn_msgheader_t; - -/* - * Parse DNS message header into mdn_msgheader_t type. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_message -- message is too short. - */ -extern mdn_result_t -mdn_msgheader_parse(const char *msg, size_t msglen, mdn_msgheader_t *parsed); - -/* - * Pack mdn_msgheader_t data. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- output buffer is too small. - */ -extern mdn_result_t -mdn_msgheader_unparse(mdn_msgheader_t *parsed, char *msg, size_t msglen); - -/* - * Convenient functions. - * - * They do not check the length of the message. Caller must make sure - * the message is not smaller than the header size (12 octets). - */ -extern unsigned int mdn_msgheader_getid(const char *msg); -extern void mdn_msgheader_setid(char *msg, unsigned int id); - -#endif /* MDN_MSGHEADER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/msgtrans.h b/contrib/idn/mdnkit/include/mdn/msgtrans.h deleted file mode 100644 index 7637071582..0000000000 --- a/contrib/idn/mdnkit/include/mdn/msgtrans.h +++ /dev/null @@ -1,90 +0,0 @@ -/* $Id: msgtrans.h,v 1.1 2002/01/02 02:46:33 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_MSGTRANS_H -#define MDN_MSGTRANS_H 1 - -/* - * DNS message translator. - * - * Parse a DNS message, translate each domain name in it according - * to a rule, and rebuild a message with the translated domain names. - */ - -#include -#include - -/* - * Translate DNS message according to the parameters given. - * - * The parameters are given by 'resconf', which is created by - * 'mdn_resconf_create'. - * - * Returns: - * mdn_success -- ok, translated successfully. - * mdn_invalid_message -- the specified message is not valid. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_msgtrans_translate(mdn_resconf_t resconf, - const char *msg, size_t msglen, - char *outbuf, size_t outbufsize, size_t *outmsglenp); - -#endif /* MDN_MSGTRANS_H */ diff --git a/contrib/idn/mdnkit/include/mdn/nameprep.h b/contrib/idn/mdnkit/include/mdn/nameprep.h deleted file mode 100644 index 1929dc25a0..0000000000 --- a/contrib/idn/mdnkit/include/mdn/nameprep.h +++ /dev/null @@ -1,155 +0,0 @@ -/* $Id: nameprep.h,v 1.2 2002/02/08 05:39:24 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_NAMEPREP_H -#define MDN_NAMEPREP_H 1 - -/* - * Perform NAMEPREP (mapping, prohibited/unassigned checking). - */ - -#include - -/* - * A Handle for nameprep operations. - */ -typedef struct mdn_nameprep *mdn_nameprep_t; - - -/* - * Create a handle for nameprep operations. - * The handle is stored in '*handlep', which is used other functions - * in this module. - * The version of the NAMEPREP specification can be specified with - * 'version' parameter. If 'version' is NULL, the latest version - * is used. - * - * Returns: - * mdn_success -- ok. - * mdn_notfound -- specified version not found. - */ -extern mdn_result_t -mdn_nameprep_create(const char *version, mdn_nameprep_t *handlep); - -/* - * Close a handle, which was created by 'mdn_nameprep_create'. - */ -extern void -mdn_nameprep_destroy(mdn_nameprep_t handle); - -/* - * Perform character mapping on UTF-8 string specified by 'from', and - * store the result into 'to', whose length is specified by 'tolen'. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_encoding -- input is not a valid UTF-8 string. - * mdn_buffer_overflow -- result buffer is too small. - */ -extern mdn_result_t -mdn_nameprep_map(mdn_nameprep_t handle, const char *from, - char *to, size_t tolen); - -/* - * Check if a UTF-8 string 's' contains any prohibited characters specified - * by the draft. If found, the pointer to the first such character is stored - * into '*found'. Otherwise '*found' will be NULL. - * - * Returns: - * mdn_success -- no prohibited character found. - * mdn_invalid_encoding -- input is not a valid UTF-8 string. - */ -extern mdn_result_t -mdn_nameprep_isprohibited(mdn_nameprep_t handle, const char *s, - const char **found); - -/* - * Check if a UTF-8 string 's' contains any unassigned characters specified - * by the draft. If found, the pointer to the first such character is stored - * into '*found'. Otherwise '*found' will be NULL. - * - * Returns: - * mdn_success -- no unassigned character found. - * mdn_invalid_encoding -- input is not a valid UTF-8 string. - */ -extern mdn_result_t -mdn_nameprep_isunassigned(mdn_nameprep_t handle, const char *s, - const char **found); - -/* - * The following functions are for internal use. - * They are used for this module to be add to the checker and mapper modules. - */ -extern mdn_result_t -mdn__nameprep_createproc(const char *parameter, void **handlep); - -extern void -mdn__nameprep_destroyproc(void *handle); - -extern mdn_result_t -mdn__nameprep_mapproc(void *handle, const char *from, char *to, size_t tolen); - -extern mdn_result_t -mdn__nameprep_prohibitproc(void *handle, const char *str, const char **found); - -extern mdn_result_t -mdn__nameprep_unassignedproc(void *handle, const char *str, - const char **found); - -#endif /* MDN_NAMEPREP_H */ diff --git a/contrib/idn/mdnkit/include/mdn/normalizer.h b/contrib/idn/mdnkit/include/mdn/normalizer.h deleted file mode 100644 index 6ac8c36a43..0000000000 --- a/contrib/idn/mdnkit/include/mdn/normalizer.h +++ /dev/null @@ -1,163 +0,0 @@ -/* $Id: normalizer.h,v 1.1 2002/01/02 02:46:33 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_NORMALIZER_H -#define MDN_NORMALIZER_H 1 - -/* - * Domain name normalizer. - * - * Perform normalization on the specified strings. String must be - * in UTF-8 encoding. - */ - -#include - -/* - * Normalizer type (opaque). - */ -typedef struct mdn_normalizer *mdn_normalizer_t; - -/* - * Normalizer procedure type. - */ -typedef mdn_result_t (*mdn_normalizer_proc_t)(const char *from, - char *to, size_t tolen); - -/* - * Initialize this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_normalizer_initialize(void); - -/* - * Create a empty normalizer. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_normalizer_create(mdn_normalizer_t *ctxp); - -/* - * Decrement reference count of the normalizer `ctx' created by - * 'mdn_normalizer_create', if it is still refered by another object. - * Otherwise, release all the memory allocated to the normalizer. - */ -extern void -mdn_normalizer_destroy(mdn_normalizer_t ctx); - -/* - * Increment reference count of the normalizer `ctx' created by - * 'mdn_normalizer_create'. - */ -extern void -mdn_normalizer_incrref(mdn_normalizer_t ctx); - -/* - * Add a normalization scheme to a normalizer. - * - * Multiple shemes can be added to a normalizer, and they will be - * applied in order. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_name -- unknown scheme was specified. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_normalizer_add(mdn_normalizer_t ctx, const char *scheme_name); - -extern mdn_result_t -mdn_normalizer_addall(mdn_normalizer_t ctx, const char **scheme_names, - int nschemes); - -/* - * Perform normalization(s) defined by a normalizer to the specified string, - * If the normalizer has two or more normalization schemes, they are - * applied in order. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- input is not a valid UTF-8 string. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_normalizer_normalize(mdn_normalizer_t ctx, const char *from, - char *to, size_t tolen); - -/* - * Register a new normalization scheme. - * - * You can override the default normalization schemes, if you want. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_normalizer_register(const char *scheme_name, mdn_normalizer_proc_t proc); - -#endif /* MDN_NORMALIZER_H */ diff --git a/contrib/idn/mdnkit/include/mdn/race.h b/contrib/idn/mdnkit/include/mdn/race.h deleted file mode 100644 index 2fa679a7c4..0000000000 --- a/contrib/idn/mdnkit/include/mdn/race.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id: race.h,v 1.1 2002/01/02 02:46:33 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_RACE_H -#define MDN_RACE_H 1 - -/* - * RACE Converter. - * - * See Internet Draft draft-ietf-idn-race-03.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__race_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata); - -extern mdn_result_t -mdn__race_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__race_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen); - -#endif /* MDN_RACE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/res.h b/contrib/idn/mdnkit/include/mdn/res.h deleted file mode 100644 index 986def00eb..0000000000 --- a/contrib/idn/mdnkit/include/mdn/res.h +++ /dev/null @@ -1,240 +0,0 @@ -/* $Id: res.h,v 1.1 2002/01/02 02:46:34 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_RES_H -#define MDN_RES_H 1 - -/* - * Resolver library support. - * - * All the functions provided by this module requires MDN resolver - * configuration context of type 'mdn_resconf_t' as an argument. - * This context holds information described in the configuration file - * (mdnres.conf). See mdn_resconf module for details. - * - * All functions also accept NULL as the context, but since - * no conversion/normalization will be done in this case, it is - * pretty useless. - */ - -#include -#include - -/* - * Convert and check the string. - * - * This function converts the string `from' to `to', checks `from' or - * combination of them, using `insn'. - * - * `insn' is a sequence of characters as follows: - * - * l convert the local codeset string to UTF-8. - * L convert the UTF-8 string to the local codeset. - * d perform local delimiter mapping. - * M perfrom TLD based local mapping. - * m perform the nameprep mapping. - * n perform nameprep normalization. - * p check whether the string contains nameprep prohibited - * character. - * N equivalent to "mnp". - * u check whether the string contains nameprep unassigned - * codepoint. - * I convert the UTF-8 string to ACE. - * i convert the ACE string to UTF-8. - * !m inspect if nameprep mapping has been performed to the - * string. If hasn't, convert the string to ACE. - * !n inspect if nameprep normalizaion has been performed - * to the string. If hasn't, convert the string to ACE. - * !p search the string for nameprep prohibited character. - * If found, convert the string to ACE. - * !N equivalent to "!m!n!p". - * !u search the string for nameprep unassigned codepoint. - * If found, convert the string to ACE. - * - * Returns: - * mdn_success -- ok. - * mdn_buffer_overflow -- output buffer is too small. - * mdn_invalid_encoding -- input string has invalid byte sequence. - * mdn_invalid_name -- local encoding (codeset) name is invalid. - * mdn_invalid_action -- `insn' contains invalid action. - * mdn_invalid_nomemory -- out of memory. - * mdn_invalid_nomapping -- no mapping to output codeset. - * mdn_prohibited -- input string has a prohibited character. - * mdn_failure -- other failure. - */ -extern mdn_result_t -mdn_res_nameconv(mdn_resconf_t ctx, const char *insn, const char *from, - char *to, size_t tolen); - -/* - * Convert the local codeset string to UTF-8. - */ -extern mdn_result_t -mdn_res_localtoucs(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_localtoucs(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "l", from, to, tolen) - -/* - * Convert the UTF-8 string to the local codeset. - */ -extern mdn_result_t -mdn_res_ucstolocal(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_ucstolocal(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "L", from, to, tolen) - -/* - * Perform the nameprep mapping. - */ -extern mdn_result_t -mdn_res_map(mdn_resconf_t ctx, const char *from, char *to, size_t tolen); - -#define mdn_res_map(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "m", from, to, tolen) - -/* - * Perform nameprep normalization. - */ -extern mdn_result_t -mdn_res_normalize(mdn_resconf_t ctx, const char *from, char *to, size_t tolen); - -#define mdn_res_normalize(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "n", from, to, tolen) - -/* - * Check whether the string contains nameprep prohibited character. - */ -extern mdn_result_t -mdn_res_prohibitcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_prohibitcheck(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "p", from, to, tolen) - -/* - * NAMEPREP. - */ -extern mdn_result_t -mdn_res_nameprep(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_nameprep(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "N", from, to, tolen) - -/* - * NAMEPREP check. - */ -extern mdn_result_t -mdn_res_nameprepcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_nameprepcheck(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "!N", from, to, tolen) - -/* - * Check whether the string contains nameprep unassigned character. - */ -extern mdn_result_t -mdn_res_unassignedcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_unassignedcheck(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "u", from, to, tolen) - -/* - * Perform local delimiter mapping. - */ -extern mdn_result_t -mdn_res_delimitermap(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen); - -#define mdn_res_delimitermap(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "d", from, to, tolen) - -/* - * Perfrom TLD based local mapping. - */ -extern mdn_result_t -mdn_res_localmap(mdn_resconf_t ctx, const char *from, char *to, size_t tolen); - -#define mdn_res_localmap(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "M", from, to, tolen) - -/* - * Convert the UTF-8 string to ACE. - */ -extern mdn_result_t -mdn_res_ucstodns(mdn_resconf_t ctx, const char *from, char *to, size_t tolen); - -#define mdn_res_ucstodns(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "I", from, to, tolen) - -/* - * Convert the ACE string to UTF-8. - */ -extern mdn_result_t -mdn_res_dnstoucs(mdn_resconf_t ctx, const char *from, char *to, size_t tolen); - -#define mdn_res_dnstoucs(ctx, from, to, tolen) \ - mdn_res_nameconv(ctx, "i", from, to, tolen) - -#endif /* MDN_RES_H */ diff --git a/contrib/idn/mdnkit/include/mdn/resconf.h b/contrib/idn/mdnkit/include/mdn/resconf.h deleted file mode 100644 index 9a2c2f3317..0000000000 --- a/contrib/idn/mdnkit/include/mdn/resconf.h +++ /dev/null @@ -1,290 +0,0 @@ -/* $Id: resconf.h,v 1.1 2002/01/02 02:46:34 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_RESCONF_H -#define MDN_RESCONF_H 1 - -/* - * MDN resolver configuration. - */ - -#include -#include -#include -#include -#include -#include -#include - -/* - * Configuration type (opaque). - */ -typedef struct mdn_resconf *mdn_resconf_t; - -/* - * Initialize. - * - * Initialize this module and underlying ones. Must be called before - * any other functions of this module. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_resconf_initialize(void); - -/* - * Create a configuration context. - * - * Create an empty context and store it in '*ctxp'. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_resconf_create(mdn_resconf_t *ctxp); - -/* - * Destroy the configuration context. - * - * Destroy the configuration context created by 'mdn_resconf_create', - * and release memory for it. - */ -extern void -mdn_resconf_destroy(mdn_resconf_t ctx); - -/* - * Increment reference count of the context created by 'mdn_resconf_create'. - */ -extern void -mdn_resconf_incrref(mdn_resconf_t ctx); - -/* - * Load configuration file. - * - * Parse an MDN configuration file whose name is specified by 'file', - * store the result in 'ctx'. If 'file' is NULL, the default file is - * loaded. - * - * Returns: - * mdn_success -- ok. - * mdn_nofile -- couldn't open specified file. - * mdn_invalid_syntax -- syntax error found. - * mdn_invalid_name -- invalid encoding/nomalization name is - * specified. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_resconf_loadfile(mdn_resconf_t ctx, const char *file); - -/* - * Get the pathname of the default configuration file. - * - * Returns: - * the pathname of the default MDN configuration file. - */ -extern char * -mdn_resconf_defaultfile(void); - -/* - * Get an object of lower module that `ctx' holds. - */ -extern mdn_delimitermap_t -mdn_resconf_getdelimitermap(mdn_resconf_t ctx); - -extern mdn_converter_t -mdn_resconf_getidnconverter(mdn_resconf_t ctx); - -extern mdn_converter_t -mdn_resconf_getlocalconverter(mdn_resconf_t ctx); - -extern mdn_mapselector_t -mdn_resconf_getlocalmapselector(mdn_resconf_t ctx); - -extern mdn_mapper_t -mdn_resconf_getmapper(mdn_resconf_t ctx); - -extern mdn_normalizer_t -mdn_resconf_getnormalizer(mdn_resconf_t ctx); - -extern mdn_checker_t -mdn_resconf_getprohibitchecker(mdn_resconf_t ctx); - -extern mdn_checker_t -mdn_resconf_getunassignedchecker(mdn_resconf_t ctx); - -/* - * Set an object of lower module to `ctx'. - */ -extern void -mdn_resconf_setdelimitermap(mdn_resconf_t ctx, - mdn_delimitermap_t delimiter_mapper); - -extern void -mdn_resconf_setidnconverter(mdn_resconf_t ctx, - mdn_converter_t idn_coverter); - -extern void -mdn_resconf_setlocalconverter(mdn_resconf_t ctx, - mdn_converter_t local_converter); - -extern void -mdn_resconf_setlocalmapselector(mdn_resconf_t ctx, - mdn_mapselector_t map_selector); - -extern void -mdn_resconf_setmapper(mdn_resconf_t ctx, mdn_mapper_t mapper); - -extern void -mdn_resconf_setnormalizer(mdn_resconf_t ctx, mdn_normalizer_t normalizer); - -extern void -mdn_resconf_setprohibitchecker(mdn_resconf_t ctx, - mdn_checker_t prohibit_checker); - -extern void -mdn_resconf_setunassignedchecker(mdn_resconf_t ctx, - mdn_checker_t unassigned_checker); - -/* - * Set name or add names to an object of lower module that `ctx' holds. - */ -extern mdn_result_t -mdn_resconf_setidnconvertername(mdn_resconf_t ctx, const char *name, - int flags); - -extern mdn_result_t -mdn_resconf_addalldelimitermapucs(mdn_resconf_t ctx, unsigned long *v, int nv); - -extern mdn_result_t -mdn_resconf_setlocalconvertername(mdn_resconf_t ctx, const char *name, - int flags); - -extern mdn_result_t -mdn_resconf_addalllocalmapselectornames(mdn_resconf_t ctx, const char *tld, - const char **names, int nnames); - -extern mdn_result_t -mdn_resconf_addallmappernames(mdn_resconf_t ctx, const char **names, - int nnames); - -extern mdn_result_t -mdn_resconf_addallnormalizernames(mdn_resconf_t ctx, const char **names, - int nnames); - -extern mdn_result_t -mdn_resconf_addallprohibitcheckernames(mdn_resconf_t ctx, const char **names, - int nnames); - -extern mdn_result_t -mdn_resconf_addallunassignedcheckernames(mdn_resconf_t ctx, const char **names, - int nnames); - -extern mdn_result_t -mdn_resconf_setnameprepversion(mdn_resconf_t ctx, const char *version); - -/* - * These macros are provided for backward compatibility to mDNkit 2.1 - * and older. - */ -extern void -mdn_resconf_setalternateconverter(mdn_resconf_t ctx, - mdn_converter_t alternate_converter); - -extern mdn_result_t -mdn_resconf_setalternateconvertername(mdn_resconf_t ctx, const char *name, - int flags); - -extern mdn_converter_t -mdn_resconf_getalternateconverter(mdn_resconf_t ctx); - - -/* - * These macros are provided for backward compatibility to mDNkit 1.x. - */ -#define mdn_resconf_localconverter(ctx) \ - mdn_resconf_getlocalconverter(ctx) - -#define mdn_resconf_idnconverter(ctx) \ - mdn_resconf_getidnconverter(ctx) - -#define mdn_resconf_alternateconverter(ctx) \ - mdn_resconf_getalternateconverter(ctx) - -#define mdn_resconf_normalizer(ctx) \ - mdn_resconf_getnormalizer(ctx) - -#define mdn_resconf_mapper(ctx) \ - mdn_resconf_getmapper(ctx) - -#define mdn_resconf_delimitermap(ctx) \ - mdn_resconf_getdelimitermap(ctx) - -#define mdn_resconf_localmapselector(ctx) \ - mdn_resconf_getlocalmapselector(ctx) - -#define mdn_resconf_prohibitchecker(ctx) \ - mdn_resconf_getprohibitchecker(ctx) - -#define mdn_resconf_unassignedchecker(ctx) \ - mdn_resconf_getunassignedchecker(ctx) - -#endif /* MDN_RESCONF_H */ diff --git a/contrib/idn/mdnkit/include/mdn/result.h b/contrib/idn/mdnkit/include/mdn/result.h deleted file mode 100644 index 036512f866..0000000000 --- a/contrib/idn/mdnkit/include/mdn/result.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id: result.h,v 1.1 2002/01/02 02:46:34 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_RESULT_H -#define MDN_RESULT_H 1 - -/* - * MDN library result code. - */ -typedef enum { - mdn_success, - mdn_notfound, - mdn_invalid_encoding, - mdn_invalid_syntax, - mdn_invalid_name, - mdn_invalid_message, - mdn_invalid_action, - mdn_invalid_codepoint, - mdn_buffer_overflow, - mdn_noentry, - mdn_nomemory, - mdn_nofile, - mdn_nomapping, - mdn_context_required, - mdn_prohibited, - mdn_failure /* !!This must be the last one!! */ -} mdn_result_t; - -/* - * Get the string description of a result code. - */ -extern char * -mdn_result_tostring(mdn_result_t result); - -#endif /* MDN_RESULT_H */ diff --git a/contrib/idn/mdnkit/include/mdn/selectiveencode.h b/contrib/idn/mdnkit/include/mdn/selectiveencode.h deleted file mode 100644 index 784ebfa708..0000000000 --- a/contrib/idn/mdnkit/include/mdn/selectiveencode.h +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id: selectiveencode.h,v 1.1 2002/01/02 02:46:35 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_SELECTIVENCODE_H -#define MDN_SELECTIVENCODE_H 1 - -/* - * Find where to convert. - * - * Find a substring for which MDN domain name codeset conversion is necessary. - */ - -#include - -/* - * Scan the given string 's' (in UTF-8 encoding) looking for a substring - * made of - * + at least one non-ascii character and - * + zero or more legitimate domain-name characters (i.e. ascii alphabets, - * digits and hyphens) and periods. - * - * Returns: - * mdn_success -- ok, found. - * mdn_notfound -- not found. - */ -extern mdn_result_t -mdn_selectiveencode_findregion(const char *s, char **startp, char **endp); - -#endif /* MDN_SELECTIVENCODE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/strhash.h b/contrib/idn/mdnkit/include/mdn/strhash.h deleted file mode 100644 index 2c7ad08a75..0000000000 --- a/contrib/idn/mdnkit/include/mdn/strhash.h +++ /dev/null @@ -1,131 +0,0 @@ -/* $Id: strhash.h,v 1.1 2002/01/02 02:46:35 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_STRHASH_H -#define MDN_STRHASH_H 1 - -/* - * String-keyed hash table - * - * Just a hash table. Nothing special. Number of hash buckets - * grows automatically. - */ - -#include - -/* - * Hash table type, which is opaque. - */ -typedef struct mdn_strhash *mdn_strhash_t; - -/* - * Hash value free proc. - */ -typedef void (*mdn_strhash_freeproc_t)(void *value); - -/* - * Create a hash table. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_strhash_create(mdn_strhash_t *hashp); - -/* - * Delete a hash table created by 'mdn_strhash_create'. - * If 'proc' is not NULL, it is called for each value in the - * hash to release memory for them. - */ -extern void -mdn_strhash_destroy(mdn_strhash_t hash, mdn_strhash_freeproc_t proc); - -/* - * Register an item to the hash table. This function makes a - * private copy of the key string. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_strhash_put(mdn_strhash_t hash, const char *key, void *value); - -/* - * Find an item with the specified key. - * - * Returns: - * mdn_success -- ok. found. - * mdn_noentry -- not found. - */ -extern mdn_result_t -mdn_strhash_get(mdn_strhash_t hash, const char *key, void **valuep); - -/* - * Check if an item with the specified key exists. - * - * Returns: - * 1 -- yes. - * 0 -- no. - */ -extern int -mdn_strhash_exists(mdn_strhash_t hash, const char *key); - -#endif /* MDN_STRHASH_H */ diff --git a/contrib/idn/mdnkit/include/mdn/ucsmap.h b/contrib/idn/mdnkit/include/mdn/ucsmap.h deleted file mode 100644 index 4c2ca2cecc..0000000000 --- a/contrib/idn/mdnkit/include/mdn/ucsmap.h +++ /dev/null @@ -1,138 +0,0 @@ -/* $Id: ucsmap.h,v 1.2 2002/02/08 05:39:36 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UCSMAP_H -#define MDN_UCSMAP_H 1 - -/* - * Perform UCS character mapping. - * This module support one-to-N mapping (N may be zero, one or more). - */ - -#include - -/* - * Mapper type (opaque). - */ -typedef struct mdn_ucsmap *mdn_ucsmap_t; - -/* - * Create an empty mapping. The reference count is set to 1. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_ucsmap_create(mdn_ucsmap_t *ctxp); - -/* - * Decrement the reference count of the given set, and if it reaches zero, - * release all the memory allocated for it. - */ -extern void -mdn_ucsmap_destroy(mdn_ucsmap_t ctx); - -/* - * Increment the reference count of the given set by one, so that - * the map can be shared. - */ -extern void -mdn_ucsmap_incrref(mdn_ucsmap_t ctx); - -/* - * Add a mapping. - * 'ucs' is the character to be mapped, 'map' points an array of mapped - * characters of length 'maplen'. 'map' may be NULL if 'maplen' is zero, - * meaning one-to-none mapping. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_failure -- already fixed by 'mdn_ucsmap_fix', - * or too large maplen. - */ -extern mdn_result_t -mdn_ucsmap_add(mdn_ucsmap_t ctx, unsigned long ucs, unsigned long *map, - size_t maplen); - -/* - * Perform internal arrangement of the map for lookup. - * Once it is fixed, 'mdn_ucsmap_add' cannot be permitted to the map. - */ -extern void -mdn_ucsmap_fix(mdn_ucsmap_t ctx); - -/* - * Find the mapping for the given character. - * 'mdn_ucsmap_fix' must be performed before calling this function. - * Find the mapping for 'v' and store the result to 'to'. The length - * of the mapped sequence is stored in '*maplenp'. 'tolen' specifies - * the length allocated for 'to'. - * - * Returns: - * mdn_success -- ok. - * mdn_nomapping -- specified character has no mapping. - * mdn_failure -- not fixed by 'mdn_ucsmap_fix' yet. - */ -mdn_result_t -mdn_ucsmap_map(mdn_ucsmap_t ctx, unsigned long v, unsigned long *to, - size_t tolen, size_t *maplenp); - -#endif /* MDN_UCSMAP_H */ diff --git a/contrib/idn/mdnkit/include/mdn/ucsset.h b/contrib/idn/mdnkit/include/mdn/ucsset.h deleted file mode 100644 index f1642a11a4..0000000000 --- a/contrib/idn/mdnkit/include/mdn/ucsset.h +++ /dev/null @@ -1,152 +0,0 @@ -/* $Id: ucsset.h,v 1.2 2002/02/08 05:39:37 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UCSSET_H -#define MDN_UCSSET_H 1 - -/* - * A 'set' of UCS codepoints. - */ - -#include - -/* - * Type representing a set (opaque). - */ -typedef struct mdn_ucsset *mdn_ucsset_t; - - -/* - * Create an empty set. The reference count is set to 1. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - */ -extern mdn_result_t -mdn_ucsset_create(mdn_ucsset_t *ctxp); - -/* - * Decrement the reference count of the given set, and if it reaches zero, - * release all the memory allocated for it. - */ -extern void -mdn_ucsset_destroy(mdn_ucsset_t ctx); - -/* - * Increments the reference count by one. - */ -extern void -mdn_ucsset_incrref(mdn_ucsset_t ctx); - -/* - * Add a UCS code point to the set. - * The set must be in the building phase -- that is, before 'mdn_ucsset_fix' - * is called for the set. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_code -- code point out of range. - * mdn_nomemory -- malloc failed. - * mdn_failure -- already fixed by 'mdn_ucsset_fix'. - */ -extern mdn_result_t -mdn_ucsset_add(mdn_ucsset_t ctx, unsigned long v); - -/* - * Add a range of code points (from 'from' to 'to', inclusive) to the set. - * 'from' must not be greater than 'to'. - * This function is similar to 'mdn_ucsset_add' except that it accepts - * range of code points. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_code -- code point out of range, or the range - * specification is invalid. - * mdn_nomemory -- malloc failed. - * mdn_failure -- already fixed by 'mdn_ucsset_fix'. - */ -extern mdn_result_t -mdn_ucsset_addrange(mdn_ucsset_t ctx, unsigned long from, unsigned long to); - -/* - * Perform internal arrangement of the set for lookup. - * Before calling this function, a set is in 'building' phase, and code - * points can be added freely by 'mdn_ucsset_add' or 'mdn_ucsset_addrange'. - * But once it is fixed by this function, the set becomes immutable, and - * it shifts into 'lookup' phase. - */ -extern void -mdn_ucsset_fix(mdn_ucsset_t ctx); - -/* - * Find if the given code point is in the set. - * The set must be in the lookup phase -- in other words, 'mdn_ucsset_fix' - * must be called for the set before calling this function. - * '*found' is set to 1 if the specified code point is in the set, 0 otherwise. - * - * Returns: - * mdn_success -- ok. - * mdn_invalid_code -- specified code point is out of range. - * mdn_failure -- not fixed by 'mdn_ucsset_fix' yet. - */ -mdn_result_t -mdn_ucsset_lookup(mdn_ucsset_t ctx, unsigned long v, int *found); - -#endif /* MDN_UCSSET_H */ diff --git a/contrib/idn/mdnkit/include/mdn/unicode.h b/contrib/idn/mdnkit/include/mdn/unicode.h deleted file mode 100644 index b3a2b04019..0000000000 --- a/contrib/idn/mdnkit/include/mdn/unicode.h +++ /dev/null @@ -1,243 +0,0 @@ -/* $Id: unicode.h,v 1.1 2002/01/02 02:46:35 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UNICODE_H -#define MDN_UNICODE_H 1 - -/* - * Unicode attributes retriever. - * - * All the information this module provides is based on UnicodeData.txt, - * CompositionExclusions-1.txt and SpecialCasing.txt, all of which can be - * obtained from unicode.org. - * - * Unicode characters are represented as 'unsigned long'. - */ - -#include - -/* - * A Handle for Unicode versions. - */ -typedef struct mdn__unicode_ops *mdn__unicode_version_t; - -/* - * Context information for case conversion. - */ -typedef enum { - mdn__unicode_context_unknown, - mdn__unicode_context_final, - mdn__unicode_context_nonfinal -} mdn__unicode_context_t; - -/* - * Create a handle for a specific Unicode version. - * The version number (such as "3.0.1") is specified by 'version' parameter. - * If it is NULL, the latest version is used. - * The handle is stored in '*versionp', which is used various functions - * in this and unormalize modules. - * - * Returns: - * mdn_success -- ok. - * mdn_notfound -- specified version not found. - */ -extern mdn_result_t -mdn__unicode_create(const char *version, mdn__unicode_version_t *versionp); - -/* - * Close a handle which was created by 'mdn__unicode_create'. - */ -extern void -mdn__unicode_destroy(mdn__unicode_version_t version); - -/* - * Get canonical class. - * - * For characters out of unicode range (i.e. above 0xffff), 0 will - * be returned. - */ -extern int -mdn__unicode_canonicalclass(mdn__unicode_version_t version, unsigned long c); - -/* - * Decompose a character. - * - * Decompose character given by 'c', and put the result into 'v', - * which can hold 'vlen' characters. The number of decomposed characters - * will be stored in '*decomp_lenp'. - * - * If 'compat' is true, compatibility decomposition is performed. - * Otherwise canonical decomposition is done. - * - * Since decomposition is done recursively, no further decomposition - * will be needed. - * - * Returns: - * mdn_success -- ok, decomposed. - * mdn_notfound -- no decomposition possible. - * mdn_buffer_overflow -- 'vlen' is too small. - */ -extern mdn_result_t -mdn__unicode_decompose(mdn__unicode_version_t version, - int compat, unsigned long *v, size_t vlen, - unsigned long c, int *decomp_lenp); - -/* - * Perform canonical composition. - * - * Do canonical composition to the character sequence 'c1' and 'c2', put the - * result into '*compp'. - * - * Since Unicode Nomalization Froms requires only canonical composition, - * compatibility composition is not supported. - * - * Returns: - * mdn_success -- ok, composed. - * mdn_notfound -- no composition possible. - */ -extern mdn_result_t -mdn__unicode_compose(mdn__unicode_version_t version, - unsigned long c1, unsigned long c2, unsigned long *compp); - -/* - * Returns if there may be a canonical composition sequence which starts - * with the given character. - * - * Returns: - * 1 -- there may be a composition sequence - * (maybe not). - * 0 -- no, there is definitely no such sequences. - */ -extern int -mdn__unicode_iscompositecandidate(mdn__unicode_version_t version, - unsigned long c); - -/* - * Translate lowercase character to uppercase, and vice versa, according - * to Unicode Technical Report #21 "Case Mappings". - * - * Both functions perform conversion on the given unicode character 'c', - * put the result into 'v', whose size is specified by 'vlen'. The actual - * number of characters stored in 'v' are returned as '*convlenp'. - * In case 'c' has no mapping, 'v[0]' will contain 'c', and '*convlenp' - * will be 1. - * - * Note that these functions perform locale-independent case conversion. - * - * There are some characters whose case mapping depends on the context. - * 'ctx' specifies the context, which can be obtained by - * 'mdn__unicode_getcontext'. Most of the time you can just specify - * 'mdn__unicode_context_unknown' as 'ctx', and if those functions - * return 'mdn_context_required', you can get the context using - * 'mdn__unicode_getcontext' and try again. - * - * Returns: - * mdn_success -- successfully converted. - * mdn_context_required -- context information is needed to - * perform case conversion on 'c'. - * mdn_buffer_overflow -- 'vlen' is too small. - */ -extern mdn_result_t -mdn__unicode_toupper(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp); -extern mdn_result_t -mdn__unicode_tolower(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp); - -/* - * Determine the context needed by the case conversion functions. - * - * Case conversion functions above needs context information for some - * characters. To get the context, you should call this function with - * the next character as the parameter. If you get final or nonfinal, - * you're done. If you get unknown, move on to the next character until - * you get final or nonfinal. - * - * Returns: - * mdn__unicode_context_final -- context is 'FINAL'. - * mdn__unicode_context_nonfinal -- context is 'NON_FINAL'. - * mdn__unicode_context_unknown -- context cannot be determined, - * try the next character. - */ -extern mdn__unicode_context_t -mdn__unicode_getcontext(mdn__unicode_version_t version, unsigned long c); - -/* - * Perform case-folding for caseless matching, defined by Unicode - * Technical Report #21 "Case Mappings". - * - * Performs case-folding on the given unicode character 'c' and put - * the result into 'v', whose size is specified by 'vlen'. The actual - * number of characters stored in 'v' are returned as '*foldlenp'. In - * case 'c' has no mapping, 'v[0]' will contain 'c', and '*foldlenp' - * will be 1. - * - * Returns: - * mdn_success -- successfully converted. - * mdn_buffer_overflow -- 'vlen' is too small. - */ -extern mdn_result_t -mdn__unicode_casefold(mdn__unicode_version_t version, - unsigned long c, unsigned long *v, size_t vlen, - int *foldlenp); - -#endif /* MDN_UNICODE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/unormalize.h b/contrib/idn/mdnkit/include/mdn/unormalize.h deleted file mode 100644 index c67c629f06..0000000000 --- a/contrib/idn/mdnkit/include/mdn/unormalize.h +++ /dev/null @@ -1,106 +0,0 @@ -/* $Id: unormalize.h,v 1.1 2002/01/02 02:46:36 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UNORMALIZE_H -#define MDN_UNORMALIZE_H 1 - -/* - * Unicode Normalizations. - * - * Perform 4 normalizations defined by 'Unicode Normalization Forms' - * (http://www.unicode.org/unicode/reports/tr15) - * - * All of the functions use UTF-8 encoding for input/output. - */ - -#include -#include - -/* - * Perform Unicode Normalication Form C, D, KC and KD. - * - * They take NUL-terminated UTF-8 encoded string 'from', perform - * the normalization specified by 'version', put the result - * (also a NUL-terminated UTF-8 encoded string) to 'to', which must be - * able to hold at least 'tolen' bytes. - * - * Returns: - * mdn_success -- ok. - * mdn_nomemory -- malloc failed. - * mdn_invalid_encoding -- input text is not a valid UTF-8 string. - * mdn_buffer_overflow -- 'tolen' is too small. - */ -extern mdn_result_t -mdn__unormalize_formc(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen); - -extern mdn_result_t -mdn__unormalize_formd(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen); - -extern mdn_result_t -mdn__unormalize_formkc(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen); - -extern mdn_result_t -mdn__unormalize_formkd(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen); - -#endif /* MDN_UNORMALIZE_H */ diff --git a/contrib/idn/mdnkit/include/mdn/utf5.h b/contrib/idn/mdnkit/include/mdn/utf5.h deleted file mode 100644 index 72b09961ea..0000000000 --- a/contrib/idn/mdnkit/include/mdn/utf5.h +++ /dev/null @@ -1,96 +0,0 @@ -/* $Id: utf5.h,v 1.1 2002/01/02 02:46:36 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UTF5_H -#define MDN_UTF5_H 1 - -/* - * UTF-5 encoded string facility. - */ - -/* - * Get one character. - * - * Get the first character of the UTF-5 string pointed by 's', translate - * it into UCS-4 (an unsigned log value), and store it to '*vp'. - * - * It returns the number of bytes read, or zero if the encoding is invalid. - * - * This routine treats period (".") specially, that is, "." is recognized - * as a valid UTF-5 sequence which translated into itself. This is very - * convenient when converting domain names, but you should note that - * "." is NOT a valid byte in UTF-5 encoded sequece. - */ -extern int -mdn_utf5_getwc(const char *s, size_t len, unsigned long *vp); - -/* - * Put one character. - * - * This function is an opposite of 'mdn_utf8_getwc'. It takes a UCS-4 - * value 'v', convert it to UTF-5 encoded sequence, and store it to 's', - * whose length is 'len'. It returns the number of bytes written, or - * zero 'v' is out of range or 'len' is too small. - * - * The above note regarding "." also applies to this function. - */ -extern int -mdn_utf5_putwc(char *s, size_t len, unsigned long v); - -#endif /* MDN_UTF5_H */ diff --git a/contrib/idn/mdnkit/include/mdn/utf6.h b/contrib/idn/mdnkit/include/mdn/utf6.h deleted file mode 100644 index 1f268b1d32..0000000000 --- a/contrib/idn/mdnkit/include/mdn/utf6.h +++ /dev/null @@ -1,82 +0,0 @@ -/* $Id: utf6.h,v 1.2 2002/02/08 05:39:42 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UTF6_H -#define MDN_UTF6_H 1 - -/* - * UTF6 Converter. - * - * See Internet Draft draft-ietf-idn-utf6-00.txt for details. - */ - -#include -#include - -extern mdn_result_t -mdn__utf6_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata); - -extern mdn_result_t -mdn__utf6_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir); - -extern mdn_result_t -mdn__utf6_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen); - -#endif /* MDN_UTF6_H */ diff --git a/contrib/idn/mdnkit/include/mdn/utf8.h b/contrib/idn/mdnkit/include/mdn/utf8.h deleted file mode 100644 index 8d12b07058..0000000000 --- a/contrib/idn/mdnkit/include/mdn/utf8.h +++ /dev/null @@ -1,143 +0,0 @@ -/* $Id: utf8.h,v 1.1 2002/01/02 02:46:36 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UTF8_H -#define MDN_UTF8_H 1 - -/* - * UTF-8 encoded string facility. - */ - -/* - * Get the length of a character. - * - * Get the length (in bytes) of a character whose first byte is pointed - * by 's'. Since this function only looks one first byte to determine the - * length, it is possible some of the following bytes are invalid. - */ -extern int -mdn_utf8_mblen(const char *s); - -/* - * Get one character. - * - * Get the first character of the string pointed by 's', and copy it - * to 'buf', whose length is 'len'. Returns the number of bytes copied, - * or zero if the encoding is invalid or len is too small. - * - * The area pointed by 'buf' must be large enough to store any UTF-8 encoded - * character. - * - * Note that the copied string is not NUL-terminated. - */ -extern int -mdn_utf8_getmb(const char *s, size_t len, char *buf); - -/* - * Get one character in UCS-4. - * - * Similar to 'mdn_utf8_getmb', except that the result is not in UTF-8 - * encoding, but in UCS-4 format (plain 32bit integer value). - */ -extern int -mdn_utf8_getwc(const char *s, size_t len, unsigned long *vp); - -/* - * Put one character. - * - * This function is an opposite of 'mdn_utf8_getwc'. It takes a UCS-4 - * value 'v', convert it to UTF-8 encoded sequence, and store it to 's', - * whose length is 'len'. It returns the number of bytes written, or - * zero 'v' is out of range or 'len' is too small. - */ -extern int -mdn_utf8_putwc(char *s, size_t len, unsigned long v); - -/* - * Check the validity of UTF-8 encoded character. - * - * Check if the character pointed by 's' is a valid UTF-8 encoded - * character. Return the length of the character (in bytes) if it is valid, - * 0 otherwise. - */ -extern int -mdn_utf8_isvalidchar(const char *s); - -/* - * Check the validity of UTF-8 encoded string. - * - * Check if the NUL-terminated string 's' is valid as a UTF-8 encoded - * string. Return 1 if it is valid, 0 otherwise. - */ -extern int -mdn_utf8_isvalidstring(const char *s); - -/* - * Find first byte of a character. - * - * Find the first byte of a character 's' points to. 's' may point - * the 2nd or later byte of a character. 'known_top' is a pointer to - * a string which contains 's', and is known to be the first byte of - * a character. If it couldn't find the first byte between 'known_top' - * and 's', NULL will be returned. - */ -extern char * -mdn_utf8_findfirstbyte(const char *s, const char *known_top); - -#endif /* MDN_UTF8_H */ diff --git a/contrib/idn/mdnkit/include/mdn/util.h b/contrib/idn/mdnkit/include/mdn/util.h deleted file mode 100644 index 3fdb5933bf..0000000000 --- a/contrib/idn/mdnkit/include/mdn/util.h +++ /dev/null @@ -1,111 +0,0 @@ -/* $Id: util.h,v 1.1 2002/01/02 02:46:37 marka Exp $ */ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_UTIL_H -#define MDN_UTIL_H 1 - -/* - * Utility functions. - */ - -/* - * Case-insensitive string match. - * - * This function compares two strings in case-insensitive way, like - * strcasencmp() function which can be found in many systems. - * However, this function only disregards the case difference of ASCII - * letters ([A-Za-z]), so it is locale independent. - * The result is 1 if 's1' and 's2' match, 0 otherwise. - */ -extern int -mdn_util_casematch(const char *s1, const char *s2, size_t n); - -/* - * Get a range of valid domain name characters. - * - * This function sees each character in string 's' until 'end', - * and checks if it is valid as a character in ASCII domain names. - * It returns a pointer to the first invalid character, or 'end' - * if all characters are valid. - */ -extern const char * -mdn_util_domainspan(const char *s, const char *end); - -/* - * Test whether a string is valid domain name defined by STD 13. - * - * This function sees each character in string 's' until 'end', and - * checks if the string is valid as an ASCII domain name that STD 13 - * defines. If valid, it returns 1. Otherwise, it returns 0. - */ -extern int -mdn_util_validstd13(const char *s, const char *end); - -/* - * UTF-8 to UTF-16 conversion and vice versa. - */ -extern mdn_result_t -mdn_util_utf8toutf16(const char *utf8, size_t fromlen, - unsigned short *utf16, size_t tolen, size_t *reslenp); - -extern mdn_result_t -mdn_util_utf16toutf8(const unsigned short *utf16, size_t fromlen, - char *utf8, size_t tolen, size_t *reslenp); - -#endif /* MDN_UTIL_H */ diff --git a/contrib/idn/mdnkit/include/mdn/version.h b/contrib/idn/mdnkit/include/mdn/version.h deleted file mode 100644 index f5fc3628ec..0000000000 --- a/contrib/idn/mdnkit/include/mdn/version.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $Id: version.h,v 1.2 2002/02/08 05:39:46 marka Exp $ */ -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef MDN_VERSION_H -#define MDN_VERSION_H 1 - -/* - * Version number of this package. - */ -#define MDNKIT_VERSION "2.2.3" -#define MDNKIT_MAJOR_VERSION 2 -#define MDNKIT_MINOR_VERSION 2 - -/* - * Get the version of the library (libmdn). - */ -extern const char * -mdn_version_getstring(void); - -#endif /* MDN_VERSION_H */ diff --git a/contrib/idn/mdnkit/install-sh b/contrib/idn/mdnkit/install-sh deleted file mode 100644 index ebc66913e9..0000000000 --- a/contrib/idn/mdnkit/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/contrib/idn/mdnkit/lib/Makefile.in b/contrib/idn/mdnkit/lib/Makefile.in deleted file mode 100644 index c19a96c58c..0000000000 --- a/contrib/idn/mdnkit/lib/Makefile.in +++ /dev/null @@ -1,224 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:46:37 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -LIB_CURRENT = 7 -LIB_REVISION = 3 -LIB_AGE = 0 - -.SUFFIXES: .lo - -top_builddir = .. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -libdir = @libdir@ -sysconfdir = @sysconfdir@ -datadir = @datadir@ -mapdir = $(datadir)/mdnkit -preference = @CONF_PREFERENCE@ -install_conf = @INSTALL_DEFAULT_CONF@ - -CC = @CC@ -RANLIB = @RANLIB@ -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ -LIBTOOL = @LIBTOOL@ - -ICONVINC = @ICONVINC@ -ICONVLIB = @ICONVLIB@ - -OPTS = -INCS = -I$(srcdir)/../include -I../include $(ICONVINC) -DEFS = -DMDN_RESCONF_DIR="\"$(sysconfdir)\"" - -CFLAGS = $(OPTS) $(INCS) $(DEFS) @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -SRCS = \ - ace.c \ - altdude.c \ - amcacem.c \ - amcaceo.c \ - amcacer.c \ - amcacev.c \ - amcacew.c \ - amcacez.c \ - api.c \ - brace.c \ - checker.c \ - converter.c \ - debug.c \ - delimitermap.c \ - dn.c \ - dude.c \ - filechecker.c \ - filemapper.c \ - lace.c \ - localencoding.c \ - log.c \ - mace.c \ - mapper.c \ - mapselector.c \ - msgheader.c \ - msgtrans.c \ - nameprep.c \ - nameprep_template.c \ - nameprepdata.c \ - normalizer.c \ - race.c \ - res.c \ - resconf.c \ - result.c \ - selectiveencode.c \ - strhash.c \ - ucsmap.c \ - ucsset.c \ - unicode.c \ - unicode_template.c \ - unicodedata_301.c \ - unicodedata_310.c \ - unormalize.c \ - utf5.c \ - utf6.c \ - utf8.c \ - util.c \ - version.c - -OBJS = \ - ace.lo \ - altdude.lo \ - amcacem.lo \ - amcaceo.lo \ - amcacer.lo \ - amcacev.lo \ - amcacew.lo \ - amcacez.lo \ - api.lo \ - brace.lo \ - checker.lo \ - converter.lo \ - debug.lo \ - delimitermap.lo \ - dn.lo \ - dude.lo \ - filechecker.lo \ - filemapper.lo \ - lace.lo \ - localencoding.lo \ - log.lo \ - mace.lo \ - mapper.lo \ - mapselector.lo \ - msgheader.lo \ - msgtrans.lo \ - nameprep.lo \ - normalizer.lo \ - race.lo \ - res.lo \ - resconf.lo \ - result.lo \ - selectiveencode.lo \ - strhash.lo \ - ucsmap.lo \ - ucsset.lo \ - unicode.lo \ - unormalize.lo \ - utf5.lo \ - utf6.lo \ - utf8.lo \ - util.lo \ - version.lo - -LIB = libmdn - -.c.lo: - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< - -all: $(LIB).la mdn.conf.sample - -$(LIB).la: $(OBJS) - $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ - -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ - -rpath $(libdir) $(OBJS) - -mdn.conf.sample: mdn.conf.sample.in - sed -e 's%[@]mapdir[@]%$(mapdir)%' \ - -e 's%[@]preference[@]%$(preference)%' \ - -e 's%^#\[$(preference)\] *%%' < $(srcdir)/mdn.conf.sample.in > $@ - -install: $(LIB).la mdn.conf.sample - $(MKINSTALLDIRS) $(libdir) - $(LIBTOOL) $(INSTALL_DATA) $(LIB).la $(libdir) - -[ -f $(libdir)/$(LIB).a ] && $(RANLIB) $(libdir)/$(LIB).a - $(MKINSTALLDIRS) $(sysconfdir) - $(INSTALL_DATA) mdn.conf.sample $(sysconfdir) - @if [ $(install_conf) = yes -a ! -f $(sysconfdir)/mdn.conf ]; then \ - echo "** installing default mdn.conf"; \ - $(INSTALL_DATA) mdn.conf.sample $(sysconfdir)/mdn.conf; \ - fi - -clean: - rm -f *.o *.lo *.la *.a core *.core *~ - rm -f mdn.conf.sample - rm -fr .libs/ diff --git a/contrib/idn/mdnkit/lib/ace.c b/contrib/idn/mdnkit/lib/ace.c deleted file mode 100644 index 1615e03203..0000000000 --- a/contrib/idn/mdnkit/lib/ace.c +++ /dev/null @@ -1,291 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: ace.c,v 1.2 2002/02/08 05:39:49 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -static mdn_result_t l2u(mdn__ace_t *ctx, const char *from, const char *end, - char *to, size_t tolen, size_t *clenp); -static mdn_result_t u2l(mdn__ace_t *ctx, const char *from, const char *end, - char *to, size_t tolen, size_t *clenp); - -mdn_result_t -mdn__ace_convert(mdn__ace_t *ctx, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - assert(ctx != NULL && ctx->encoder != NULL && ctx->decoder != NULL && - from != NULL && to != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - for (;;) { - const char *end; - size_t convlen = 0; - mdn_result_t r; - - /* - * Find the end of this component (label). - */ - if ((end = strchr(from, '.')) == NULL) - end = from + strlen(from); - - /* - * Convert it. - */ - if (end > from) { - if (dir == mdn_converter_l2u) - r = l2u(ctx, from, end, to, tolen, &convlen); - else - r = u2l(ctx, from, end, to, tolen, &convlen); - if (r != mdn_success) - return (r); - } - - /* - * Copy '.' or NUL. - */ - if (tolen <= convlen) - return (mdn_buffer_overflow); - - to += convlen; - *to++ = *end; - tolen -= convlen + 1; - - /* - * Finished? - */ - if (*end == '\0') { - break; - } else if (*(end + 1) == '\0') { - /* End with '.' */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '\0'; - tolen--; - break; - } - - from = end + 1; - } - - return (mdn_success); -} - -static mdn_result_t -l2u(mdn__ace_t *ctx, const char *from, const char *end, - char *to, size_t tolen, size_t *clenp) -{ - size_t acelen = end - from; - size_t idlen = strlen(ctx->id_str); - size_t utflen; - const char *top; - mdn_result_t r; - char *buf; - char local_buf[256]; - - if (ctx->id_type == mdn__ace_prefix && - acelen >= idlen && - mdn_util_casematch(from, ctx->id_str, idlen)) { - /* - * Prefix found. - */ - top = from + idlen; - acelen -= idlen; - } else if (ctx->id_type == mdn__ace_suffix && - acelen >= idlen && - mdn_util_casematch(end - idlen, ctx->id_str, idlen)) { - /* - * Suffix found. - */ - top = from; - acelen -= idlen; - } else { - /* - * Not ACE encoded. - */ - copy: - /* - * Check if it comforms to STD-13. - */ - if (!mdn_util_validstd13(from, end)) { - /* invalid character found */ - return (mdn_invalid_encoding); - } - - /* - * Copy verbatim. - */ - acelen = end - from; - if (tolen < acelen) - return (mdn_buffer_overflow); - (void)memcpy(to, from, acelen); - - *clenp = acelen; - return (mdn_success); - } - - /* - * Now, top and acelen refers the ACE encoded name - * without prefix/suffix. - */ - - /* Decode it. */ - r = (*ctx->decoder)(top, acelen, to, tolen); - if (r == mdn_invalid_encoding) - goto copy; - else if (r != mdn_success) - return (r); - - *clenp = utflen = strlen(to); - - /* - * Check if the decode result is a STD13 conforming name. - */ - if (mdn_util_validstd13(to, to + utflen)) - return (mdn_invalid_encoding); - - /* - * Do round-trip conversion check. Encode the decoded result, - * and compare it with the original. If they don't match, - * the original name must be illegally encoded. - * - * We need a buffer at least acelen+1 (for the NUL byte) bytes long. - */ - if (acelen >= sizeof(local_buf)) { - if ((buf = malloc(acelen + 1)) == NULL) - return (mdn_nomemory); - } else { - buf = local_buf; - } - if ((*ctx->encoder)(to, utflen, buf, acelen + 1) != mdn_success || - strlen(buf) != acelen || - !mdn_util_casematch(buf, top, acelen)) { - r = mdn_invalid_encoding; - } - if (buf != local_buf) - free(buf); - - return (r); -} - -static mdn_result_t -u2l(mdn__ace_t *ctx, const char *from, const char *end, - char *to, size_t tolen, size_t *clenp) -{ - size_t len = end - from; - - /* - * See if encoding is really necessary. - */ - if (!mdn_util_validstd13(from, end)) { - /* - * Conversion is necessary. - */ - mdn_result_t r; - size_t idlen = strlen(ctx->id_str); - size_t acelen; - - if (ctx->id_type == mdn__ace_prefix) { - /* Prepend prefix. */ - if (tolen < idlen) - return (mdn_buffer_overflow); - (void)memcpy(to, ctx->id_str, idlen); - to += idlen; - tolen -= idlen; - } - - r = (*ctx->encoder)(from, len, to, tolen); - if (r != mdn_success) - return (r); - acelen = strlen(to); - - if (ctx->id_type == mdn__ace_suffix) { - /* Append suffix. */ - if (acelen + idlen > tolen) - return (mdn_buffer_overflow); - (void)memcpy(to + acelen, ctx->id_str, idlen); - } - - len = idlen + acelen; - } else { - /* - * Conversion is NOT necessary. - * Copy verbatim. - */ - - if (tolen < len) - return (mdn_buffer_overflow); - - (void)memcpy(to, from, len); - } - *clenp = len; - return (mdn_success); -} diff --git a/contrib/idn/mdnkit/lib/altdude.c b/contrib/idn/mdnkit/lib/altdude.c deleted file mode 100644 index 5664d7388c..0000000000 --- a/contrib/idn/mdnkit/lib/altdude.c +++ /dev/null @@ -1,306 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: altdude.c,v 1.2 2002/02/08 05:39:50 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-altdude-00.txt doesn't specify the ACE - * signature for ALTDUDE, we have to choose one. - */ -#if !defined(MDN_ALTDUDE_PREFIX) && !defined(MDN_ALTDUDE_SUFFIX) -#define MDN_ALTDUDE_PREFIX "a---" -#endif - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -static mdn_result_t altdude_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t altdude_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static int get_nibblelength(unsigned long v); -static int altdude_getwc(const char *s, size_t len, - unsigned long *vp); -static int altdude_putwc(char *s, size_t len, unsigned long v); - -static mdn__ace_t altdude_ctx = { -#ifdef MDN_ALTDUDE_PREFIX - mdn__ace_prefix, - MDN_ALTDUDE_PREFIX, -#else - mdn__ace_suffix, - MDN_ALTDUDE_SUFFIX, -#endif - altdude_encode, - altdude_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__altdude_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__altdude_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__altdude_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__altdude_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&altdude_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__altdude_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -altdude_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - unsigned long prev, v; - - prev = 96; - while (fromlen > 0) { - if (from[0] == '-') { - v = '-'; - from++; - fromlen--; - } else { - len = altdude_getwc(from, fromlen, &v); - if (len == 0) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - v = prev ^ v; - - /* - * Since round-trip check is performed later - * by mdn__ace_convert(), we don't need the - * following sanity checking. - * - * if (v == '-' || get_nibblelength(v) != len) - * return (mdn_invalid_encoding); - */ - - prev = v; - } - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -altdude_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - unsigned long prev, c; - - prev = 96; - while (fromlen > 0) { - len = mdn_utf8_getwc(from, fromlen, &c); - from += len; - fromlen -= len; - if (len == 0) - return (mdn_invalid_encoding); - if (c == '-') { - /* - * Hyphens are treated specially. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '-'; - tolen--; - } else { - len = altdude_putwc(to, tolen, prev ^ c); - if (len == 0) - return (mdn_buffer_overflow); - prev = c; - to += len; - tolen -= len; - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - - return (mdn_success); -} - -static int -get_nibblelength(unsigned long v) { - assert(v <= 0x7fffffff); - - if (v < (1<<16)) { /* v <= 16bit */ - if (v < (1<<8)) /* v <= 8bit */ - return ((v < (1<<4)) ? 1 : 2); - else /* 8bit < v <= 16bit */ - return ((v < (1<<12)) ? 3 : 4); - } else { /* 16bit < c */ - if (v < (1<<24)) /* 16bit < c <= 24bit */ - return ((v < (1<<20)) ? 5 : 6); - else /* 24bit < c <= 31bit */ - return ((v < (1<<28)) ? 7 : 8); - } -} - -static int -altdude_getwc(const char *s, size_t len, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - v = (v << 4) + (c & 0xf); - - len--; - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - return (0); /* final character missing */ -} - -static int -altdude_putwc(char *s, size_t len, unsigned long v) { - int i, w, shift; - - if ((w = get_nibblelength(v)) > len) - return (0); - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(v & 0xf) + shift]; - v >>= 4; - shift = 16; - } - return (w); -} diff --git a/contrib/idn/mdnkit/lib/amcacem.c b/contrib/idn/mdnkit/lib/amcacem.c deleted file mode 100644 index 191c3e8a9d..0000000000 --- a/contrib/idn/mdnkit/lib/amcacem.c +++ /dev/null @@ -1,829 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcacem.c,v 1.2 2002/02/08 05:39:51 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The current draft, there is discrepancy between the spec and the - * sample implementation/examples. Defining the following symbol - * makes this code agree with the sample code. - */ -/* #define CONFORM_TO_SAMPLE */ - -/* - * Although draft-ietf-idn-amc-ace-m-00.txt doesn't specify the ACE - * signature, we have to choose one. - */ -#if !defined(MDN_AMCACEM_PREFIX) && !defined(MDN_AMCACEM_SUFFIX) -#define MDN_AMCACEM_SUFFIX "-amc1" -#endif - -#define AMCACEM_MAX_CODEPOINT 0x10ffff - -enum { amcacem_narrow_style, amcacem_wide_style }; - -#define UCSBUF_LOCAL_SIZE 40 - -typedef struct ucsbuf { - unsigned long *ucs; - size_t size; - size_t len; - unsigned long local[UCSBUF_LOCAL_SIZE]; -} ucsbuf_t; - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -#define AMCACEM_SPECIAL_RANGE_FIRST 0x20 -#define AMCACEM_SPECIAL_RANGE_END 0x36f -unsigned long acem_special_row[8] = { - 0x020, 0x05b, 0x07b, 0x0a0, 0x0c0, 0x0df, 0x134, 0x270, -}; - -static mdn_result_t amcacem_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacem_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static int most_populous_row(const unsigned long *ucs, - size_t len); -static int most_populous_16win(const unsigned long *ucs, - size_t len, unsigned long base); -static int most_populous_20kwin(const unsigned long *ucs, - size_t len, unsigned long base); -static unsigned long row_offset(int row); -static int choose_style(const unsigned long *ucs, size_t len, - int a, int b, int c); -static int estimate(int style, const unsigned long *ucs, - size_t ulen, int a, int b, int c); -static unsigned long base32decode(const char *s, int len, int *err); -static mdn_result_t utf8_to_ucs4(const char *utf8, size_t fromlen, - ucsbuf_t *b); -static void ucsbuf_init(ucsbuf_t *b); -static mdn_result_t ucsbuf_grow(ucsbuf_t *b); -static mdn_result_t ucsbuf_append(ucsbuf_t *b, unsigned long v); -static void ucsbuf_free(ucsbuf_t *b); -static int is_ldh(unsigned long v); - -static mdn__ace_t amcacem_ctx = { -#ifdef MDN_AMCACEM_PREFIX - mdn__ace_prefix, - MDN_AMCACEM_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACEM_SUFFIX, -#endif - amcacem_encode, - amcacem_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__amcacem_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcacem_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcacem_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcaceo_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcacem_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcacem_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcacem_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - int literal_mode = 0; - int a, b, c; - unsigned long offseta, offsetb, offsetc; - int style; - int err = 0; - - /* - * Decode header. - */ - if (fromlen < 3) - return (mdn_invalid_encoding); - - a = b = c = 0; /* for lint */ - style = amcacem_narrow_style; /* for lint */ - - switch (base32decode(from, 1, &err) & 0x18) { - case 0: - style = amcacem_narrow_style; - b = base32decode(from, 2, &err); - a = base32decode(from + 2, 1, &err); - from += 3; - fromlen -= 3; - break; - case 0x8: - if (fromlen < 4) - return (mdn_invalid_encoding); - style = amcacem_narrow_style; - b = base32decode(from, 3, &err) & 0x1fff; - a = base32decode(from + 3, 1, &err); - from += 4; - fromlen -= 4; - break; - case 0x10: - style = amcacem_wide_style; - b = base32decode(from, 2, &err) & 0xff; - c = base32decode(from + 2, 1, &err); - from += 3; - fromlen -= 3; - break; - case 0x18: - if (fromlen < 5) - return (mdn_invalid_encoding); - style = amcacem_wide_style; - b = base32decode(from, 3, &err) & 0x1fff; - c = base32decode(from + 3, 2, &err); - from += 5; - fromlen -= 5; - break; - } - if (err) - return (mdn_invalid_encoding); - - offsetb = row_offset(b); - offseta = ((offsetb >> 3) + a) << 3; - if (style == amcacem_narrow_style) - offsetc = (offsetb >> 12) << 12; - else - offsetc = c << 11; - - while (fromlen > 0) { - unsigned long v; - - if (from[0] == '-') { - if (fromlen > 1 && from[1] == '-') { - v = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - continue; - } - } else if (literal_mode) { - v = from[0]; - from++; - fromlen--; - } else { - v = base32decode(from, 1, &err); - if (err) - return (mdn_invalid_encoding); - if (v < 16) { - if (style == amcacem_narrow_style) { - v += offseta; - len = 1; - } else { - if (fromlen < 3) - return (mdn_invalid_encoding); - v = base32decode(from, 3, &err) - + offsetc + 0x1000; - if (err) - return (mdn_invalid_encoding); - len = 3; - } - } else { - v = 0; - for (len = 0; len < 5; len++) { - int x; - if (tolen <= len) - return (mdn_invalid_encoding); - x = base32decode(from + len, 1, &err); - v = (v << 4) + (x & 0xf); - if (x < 16) - break; - } - if (err) - return (mdn_invalid_encoding); - - switch (++len) { - case 2: - v += offsetb; - break; - case 3: - v += offsetc; - break; - case 4: - break; - case 5: - v += 0x10000; - break; - default: - return (mdn_invalid_encoding); - } - } - from += len; - fromlen -= len; - } - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - - return (mdn_success); -} - -static mdn_result_t -amcacem_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - ucsbuf_t ucsb; - unsigned long *buf; - size_t len; - int literal_mode = 0; - int a, b, c; - unsigned long offseta, offsetb, offsetc; - mdn_result_t r; - int style; - int i; - - /* - * Convert input string to UCS-4. - */ - ucsbuf_init(&ucsb); - if ((r = utf8_to_ucs4(from, fromlen, &ucsb)) != mdn_success) - return (r); - - buf = ucsb.ucs; - len = ucsb.len; - - /* - * Now 'buf' contains UCS-4 string consisting of 'len' characters. - */ - - /* - * Make sure all the codepoints are below 0x110000. - */ - for (i = 0; i < len; i++) { - if (buf[i] > AMCACEM_MAX_CODEPOINT) - return (mdn_invalid_encoding); - } - - b = most_populous_row(buf, len); - offsetb = row_offset(b); - a = most_populous_16win(buf, len, offsetb); - offseta = ((offsetb >> 3) + a) << 3; - c = most_populous_20kwin(buf, len, offsetb); - - style = choose_style(buf, len, a, b, c); - - if (style == amcacem_narrow_style) { - if (b <= 0xff) { - if (tolen < 3) - goto overflow; - to[0] = base32encode[b >> 5]; - to[1] = base32encode[b & 0x1f]; - to[2] = base32encode[a]; - to += 3; - tolen -= 3; - } else { - if (tolen < 4) - goto overflow; - to[0] = base32encode[8 + (b >> 10)]; - to[1] = base32encode[(b >> 5) & 0x1f]; - to[2] = base32encode[b & 0x1f]; - to[3] = base32encode[a]; - to += 4; - tolen -= 4; - } - offsetc = (offsetb >> 12) << 12; - } else { - if (b <= 0xff && c <= 0x1f) { - if (tolen < 3) - goto overflow; - to[0] = base32encode[0x10 + (b >> 5)]; - to[1] = base32encode[b & 0x1f]; - to[2] = base32encode[c]; - to += 3; - tolen -= 3; - } else { - if (tolen < 5) - goto overflow; - to[0] = base32encode[0x18 + (b >> 10)]; - to[1] = base32encode[(b >> 5) & 0x1f]; - to[2] = base32encode[b & 0x1f]; - to[3] = base32encode[c >> 5]; - to[4] = base32encode[c & 0x1f]; - to += 5; - tolen -= 5; - } - offsetc = c << 11; - } - - for (i = 0; i < len; i++) { - unsigned long c = buf[i]; - - if (c == '-') { - /* - * Convert "-" to "--". - */ - if (tolen < 2) - return (mdn_buffer_overflow); - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (is_ldh(c)) { - /* - * LDH characters. - */ - if (literal_mode == 0) { - /* - * Go into literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 1; - } - if (tolen < 1) - goto overflow; - *to++ = c; - tolen--; - } else { - /* - * Non-LDH characters. - */ - if (literal_mode != 0) { - /* - * Get out of literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 0; - - } - if (style == amcacem_narrow_style && - offseta <= c && c <= offseta + 0xf) { - if (tolen < 1) - goto overflow; - *to++ = base32encode[c - offseta]; - tolen--; - } else if (offsetb <= c && c <= offsetb + 0xff) { - if (tolen < 2) - goto overflow; - c -= offsetb; - to[0] = base32encode[0x10 + (c >> 4)]; - to[1] = base32encode[c & 0xf]; - to += 2; - tolen -= 2; - } else if (offsetc <= c && c <= offsetc + 0xfff) { - if (tolen < 3) - goto overflow; - c -= offsetc; - to[0] = base32encode[0x10 + (c >> 8)]; - to[1] = base32encode[0x10 + ((c >> 4) & 0xf)]; - to[2] = base32encode[c & 0xf]; - to += 3; - tolen -= 3; - } else if (style == amcacem_wide_style && - offsetc +0x1000 <= c && - c <= offsetc + 0x4fff) { - if (tolen < 3) - goto overflow; - c -= offsetc + 0x1000; - to[0] = base32encode[c >> 10]; - to[1] = base32encode[(c >> 5) & 0x1f]; - to[2] = base32encode[c & 0x1f]; - to += 3; - tolen -= 3; - } else if (c <= 0xffff) { - if (tolen < 4) - goto overflow; - to[0] = base32encode[0x10 + (c >> 12)]; - to[1] = base32encode[0x10 + ((c >> 8) & 0xf)]; - to[2] = base32encode[0x10 + ((c >> 4) & 0xf)]; - to[3] = base32encode[c & 0xf]; - to += 4; - tolen -= 4; - } else { - if (tolen < 5) - goto overflow; - c -= 0x10000; - to[0] = base32encode[0x10 + (c >> 16)]; - to[1] = base32encode[0x10 + ((c >> 12) & 0xf)]; - to[2] = base32encode[0x10 + ((c >> 8) & 0xf)]; - to[3] = base32encode[0x10 + ((c >> 4) & 0xf)]; - to[4] = base32encode[c & 0xf]; - to += 5; - tolen -= 5; - } - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - - ucsbuf_free(&ucsb); - return (mdn_success); - - overflow: - ucsbuf_free(&ucsb); - return (mdn_buffer_overflow); -} - -static int -most_populous_row(const unsigned long *ucs, size_t len) { - int pop[256]; - int bestpop; - int bestrow; - int i, j; - - memset(pop, 0, sizeof(pop)); - for (i = 0; i < len; i++) { - unsigned long c = ucs[i]; - - if (is_ldh(c)) - continue; - - pop[c >> 8]++; - - if (c >= AMCACEM_SPECIAL_RANGE_FIRST && - c <= AMCACEM_SPECIAL_RANGE_END) { - for (j = 0; j < 8; j++) { - if (c >= acem_special_row[j] && - c < acem_special_row[j] + 256) { - pop[0xd8 + j]++; - } - } - } - } - - bestpop = -1; - bestrow = 0; /* for lint */ - for (i = 0; i < 256; i++) { - if (pop[i] > bestpop) { - bestpop = pop[i]; - bestrow = i; - } - } - return (bestrow); -} - -static int -most_populous_16win(const unsigned long *ucs, size_t len, - unsigned long base) -{ - unsigned long hi, lo; - int i; - int pop[32]; - int bestpop; - int bestwin; - - memset(pop, 0, sizeof(pop)); - - lo = (base >> 3) << 3; - hi = (((base >> 3) + 31) << 3) + 16; - - for (i = 0; i < len; i++) { - int blk; - - if (ucs[i] < lo || ucs[i] >= hi || is_ldh(ucs[i])) - continue; - - blk = (ucs[i] - lo) / 8; - if (blk < 32) - pop[blk]++; - if (blk > 0) - pop[blk - 1]++; - } - - bestpop = -1; - bestwin = 0; /* for lint */ - for (i = 0; i < 32; i++) { - if (pop[i] > bestpop) { - bestpop = pop[i]; - bestwin = i; - } - } - return (bestwin); -} - -static int -most_populous_20kwin(const unsigned long *ucs, size_t len, - unsigned long base) -{ - int i, j; - int bestcnt = -1; - int bestwin = 0; - - for (i = 0; i < len; i++) { - unsigned long c = ucs[i]; - unsigned long n, lo, hi; - int count; - - count = 0; - n = c >> 11; - lo = n << 11; - hi = lo + 0x4fff; - - for (j = 0; j < len; j++) { - unsigned long v = ucs[j]; -#ifndef CONFORM_TO_SAMPLE - /* - * The draft says not to count code points in row B, - * but the sample code does, and example encoding - * agrees with the sample code. - */ - if ((base <= v && v < base + 256) || is_ldh(v)) -#else - if (is_ldh(v)) -#endif - continue; - if (lo <= v && v <= hi) - count++; - } - if (count > bestcnt || (count == bestcnt && n < bestwin)) { - bestcnt = count; - bestwin = n; - } - } - return (bestwin); -} - -static unsigned long -row_offset(int row) { - assert (0 <= row && row < 256); - - if (0xd8 <= row && row <= 0xdf) { - return (acem_special_row[row - 0xd8]); - } else { - return (row << 8); - } -} - -static int -choose_style(const unsigned long *ucs, size_t len, int a, int b, int c) { - int narrow = estimate(amcacem_narrow_style, ucs, len, a, b, c); - int wide = estimate(amcacem_wide_style, ucs, len, a, b, c); - - if (narrow <= wide) - return (amcacem_narrow_style); - else - return (amcacem_wide_style); -} - -static int -estimate(int style, const unsigned long *ucs, size_t ulen, - int a, int b, int c) -{ - unsigned long offseta, offsetb, offsetc; - int i; - int len; - - offsetb = row_offset(b); - offseta = ((offsetb >> 3) + a) << 3; - - if (style == amcacem_narrow_style) { - offsetc = (offsetb >> 12) << 12; - if (b <= 0xff) - len = 3; - else - len = 4; - } else { - offsetc = c << 11; - if (b <= 0xff && c <= 0x1f) - len = 3; - else - len = 5; - } - - for (i = 0; i < ulen; i++) { - unsigned long c = ucs[i]; - - if (is_ldh(c)) - continue; - if (style == amcacem_narrow_style && - offseta <= c && c <= offseta + 0xf) - len++; - else if (offsetb <= c && c <= offsetb + 0xff) - len += 2; - else if (offsetc <= c && c <= offsetc + 0xfff) - len += 3; - else if (style == amcacem_wide_style && - offsetc +0x1000 <= c && c <= offsetc + 0x4fff) - len += 3; - else if (c <= 0xffff) - len += 4; - else - len += 5; - } - return (len); -} - -static unsigned long -base32decode(const char *s, int len, int *err) { - long v = 0; - - while (len-- > 0) { - int c = *s++; - if ('a' <= c && c <= 'z') { - c = base32decode_ascii[c - 'a']; - } else if ('A' <= c && c <= 'Z') { - c = base32decode_ascii[c - 'A']; - } else if ('0' <= c && c <= '9') { - c = base32decode_digit[c - '0']; - } else { - *err = 1; - return (0); - } - v = (v << 5) + c; - } - return (v); -} - -/* - * Common Utility Functions. - */ - -static mdn_result_t -utf8_to_ucs4(const char *utf8, size_t fromlen, ucsbuf_t *b) { - mdn_result_t r; - - while (fromlen > 0) { - unsigned long c; - int w; - - if ((w = mdn_utf8_getwc(utf8, fromlen, &c)) == 0) - return (mdn_invalid_encoding); - utf8 += w; - fromlen -= w; - - if ((r = ucsbuf_append(b, c)) != mdn_success) - return (r); - } - return (mdn_success); -} - -static void -ucsbuf_init(ucsbuf_t *b) { - b->ucs = b->local; - b->size = UCSBUF_LOCAL_SIZE; - b->len = 0; -} - -static mdn_result_t -ucsbuf_grow(ucsbuf_t *b) { - if (b->ucs == b->local) - b->ucs = NULL; - b->size *= 2; - b->ucs = realloc(b->ucs, sizeof(unsigned long) * b->size); - if (b->ucs == NULL) - return (mdn_nomemory); - return (mdn_success); -} - -static mdn_result_t -ucsbuf_append(ucsbuf_t *b, unsigned long v) { - mdn_result_t r; - - if (b->len + 1 > b->size) { - r = ucsbuf_grow(b); - if (r != mdn_success) - return (r); - } - b->ucs[b->len++] = v; - return (mdn_success); -} - -static void -ucsbuf_free(ucsbuf_t *b) { - if (b->ucs != b->local) { - free(b->ucs); - b->ucs = b->local; - } -} - -static int -is_ldh(unsigned long v) { - if (('a' <= v && v <= 'z') || ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9') || v == '-') - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/amcaceo.c b/contrib/idn/mdnkit/lib/amcaceo.c deleted file mode 100644 index 1285b2c9b7..0000000000 --- a/contrib/idn/mdnkit/lib/amcaceo.c +++ /dev/null @@ -1,656 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcaceo.c,v 1.2 2002/02/08 05:39:53 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-amc-ace-o-00.txt doesn't specify the ACE - * signature, we have to choose one. - */ -#if !defined(MDN_AMCACEO_PREFIX) && !defined(MDN_AMCACEO_SUFFIX) -#define MDN_AMCACEO_SUFFIX "-amc2" -#endif - -#define UCSBUF_LOCAL_SIZE 40 - -typedef struct ucsbuf { - unsigned long *ucs; - size_t size; - size_t len; - unsigned long local[UCSBUF_LOCAL_SIZE]; -} ucsbuf_t; - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; -static const unsigned long special_refpoint[] = { - 0x20, 0x50, 0x70, 0xa0, 0xc0, 0xe0, 0x140, 0x270, -}; - -typedef struct { - unsigned long refpoint[5]; - unsigned long prefix[3]; - int best_count; - unsigned long best_refpoint; - unsigned long best_prefix; - unsigned long *input; - size_t input_len; -} amcaceo_encode_ctx; - -typedef struct { - unsigned long refpoint[5]; -} amcaceo_decode_ctx; - -static mdn_result_t amcaceo_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcaceo_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static void init_encode_ctx(amcaceo_encode_ctx *ctx); -static void choose_refpoints(amcaceo_encode_ctx *ctx); -static unsigned long prefix_to_refpoint(int k, unsigned long prefix); -static void census(amcaceo_encode_ctx *ctx, int k, - unsigned long prefix); -static int find_refpoint(unsigned long *refpoint, - int start, unsigned long v); -static int encode_refpoints(amcaceo_encode_ctx *ctx, - char *to, size_t tolen); -static int encode_point(unsigned long *refpoint, - unsigned long v, char *to, size_t tolen); -static int decode_point(unsigned long *refpoint, - const char *from, size_t fromlen, - unsigned long *vp); -static void bootstrap(unsigned long *refpoint, - int k, unsigned long prefix); -static int amcaceo_getwc(const char *s, size_t len, - unsigned long *vp); -static int amcaceo_putwc(char *s, size_t len, - unsigned long v, int w); - -static mdn_result_t utf8_to_ucs4(const char *utf8, size_t fromlen, - ucsbuf_t *b); -static void ucsbuf_init(ucsbuf_t *b); -static mdn_result_t ucsbuf_grow(ucsbuf_t *b); -static mdn_result_t ucsbuf_append(ucsbuf_t *b, unsigned long v); -static void ucsbuf_free(ucsbuf_t *b); -static int is_ldh(unsigned long v); - -static mdn__ace_t amcaceo_ctx = { -#ifdef MDN_AMCACEO_PREFIX - mdn__ace_prefix, - MDN_AMCACEO_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACEO_SUFFIX, -#endif - amcaceo_encode, - amcaceo_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__amcaceo_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcaceo_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcaceo_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcaceo_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcaceo_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcaceo_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcaceo_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - int k; - int literal_mode = 0; - unsigned long v; - unsigned long refpoint[5]; - static unsigned long refpoint_initial[5] = { - 0, 0x10, 0, 0, 0x10000, - }; - - memcpy(refpoint, refpoint_initial, sizeof(refpoint)); - for (k = 2; k >= 0; k--) { - len = decode_point(refpoint, from, fromlen, &v); - if (len == 0) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - bootstrap(refpoint, k, v); - } - - while (fromlen > 0) { - if (from[0] == '-') { - if (fromlen > 1 && from[1] == '-') { - v = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - continue; - } - } else if (literal_mode) { - v = from[0]; - from++; - fromlen--; - } else { - len = decode_point(refpoint, from, fromlen, &v); - if (len == 0) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - } - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -amcaceo_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - ucsbuf_t ucsb; - amcaceo_encode_ctx ctx; - size_t len; - mdn_result_t r; - int literal_mode = 0; - int i; - - /* - * Convert to UCS-4. - */ - ucsbuf_init(&ucsb); - if ((r = utf8_to_ucs4(from, fromlen, &ucsb)) != mdn_success) - return (r); - - /* - * Verify that all the code points are within 0-0x10FFFF range. - */ - for (i = 0; i < ucsb.len; i++) { - if (ucsb.ucs[i] > 0x10FFFF) { - ucsbuf_free(&ucsb); - return (mdn_invalid_encoding); - } - } - - init_encode_ctx(&ctx); - ctx.input = ucsb.ucs; - ctx.input_len = ucsb.len; - choose_refpoints(&ctx); - if ((len = encode_refpoints(&ctx, to, tolen)) == 0) - goto overflow; - - to += len; - tolen -= len; - - for (i = 0; i < ctx.input_len; i++) { - unsigned long v = ctx.input[i]; - - if (v == '-') { - /* - * Convert "-" to "--". - */ - if (tolen < 2) - goto overflow; - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (is_ldh(v)) { - /* - * LDH characters. - */ - if (literal_mode == 0) { - /* - * Go into literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 1; - } - if (tolen < 1) - goto overflow; - *to++ = v; - tolen--; - } else { - /* - * Non-LDH characters. - */ - if (literal_mode != 0) { - /* - * Get out of literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 0; - } - len = encode_point(ctx.refpoint, v, to, tolen); - if (len == 0) - goto overflow; - to += len; - tolen -= len; - } - } - - /* - * Terminate with NUL. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - - to[0] = '\0'; - - ucsbuf_free(&ucsb); - return (mdn_success); - - overflow: - ucsbuf_free(&ucsb); - return (mdn_buffer_overflow); -} - -static void -init_encode_ctx(amcaceo_encode_ctx *ctx) { - ctx->refpoint[0] = 0; - ctx->refpoint[1] = 0; - ctx->refpoint[2] = 0; - ctx->refpoint[3] = 0; - ctx->refpoint[4] = 0x10000; - ctx->prefix[0] = 0; - ctx->prefix[1] = 0; - ctx->prefix[2] = 0; - ctx->best_count = 0; - ctx->best_refpoint = 0; - ctx->input = NULL; - ctx->input_len = 0; -} - -static void -choose_refpoints(amcaceo_encode_ctx *ctx) { - unsigned long *v = ctx->input; - size_t len = ctx->input_len; - int k, i; - - for (k = 0; k < 3; k++) { - unsigned long prefix; - - ctx->best_count = 0; - ctx->best_refpoint = 0; - ctx->best_prefix = 0; - - /* - * Try various prefixes and choose the best one. - */ - for (i = 0; i < len; i++) { - prefix = v[i] >> ((k + 1) * 4); - census(ctx, k, prefix); - } - if (k == 1) { - for (i = 0; i < 8; i++) { - prefix = 0xd8 + i; - census(ctx, k, prefix); - } - } else if (k == 2) { - prefix = 0xd; - census(ctx, k, prefix); - } - ctx->refpoint[k] = ctx->best_refpoint; - ctx->prefix[k] = ctx->best_prefix; - } -} - -static unsigned long -prefix_to_refpoint(int k, unsigned long prefix) { - if (k == 1 && 0xd8 <= prefix && prefix <= 0xdf) - return (special_refpoint[prefix - 0xd8]); - else - return (prefix << ((k + 1) * 4)); -} - -static void -census(amcaceo_encode_ctx *ctx, int k, unsigned long prefix) { - unsigned long *v = ctx->input; - size_t len = ctx->input_len; - int count; - int i; - unsigned long *refpoint = ctx->refpoint; - - ctx->refpoint[k] = prefix_to_refpoint(k, prefix); - - count = 0; - for (i = 0; i < len; i++) { - if (!is_ldh(v[i]) && find_refpoint(refpoint, 0, v[i]) == k) - count++; - } - for (i = 0; i < k; i++) { /* draft say until i <= k */ - if (find_refpoint(refpoint, i + 1, - ctx->prefix[i] << (4 * (i + 1))) == k) - count++; - } - if (count > ctx->best_count) { - ctx->best_count = count; - ctx->best_refpoint = refpoint[k]; - ctx->best_prefix = prefix; - } -} - -static int -find_refpoint(unsigned long *refpoint, int start, unsigned long v) { - int i; - static unsigned long window_size[] = { - 0x10, 0x100, 0x1000, 0x10000, 0x100000, - }; - - for (i = start; i < 5; i++) { - if (v >= refpoint[i] && (v - refpoint[i]) < window_size[i]) - return (i); - } - return (-1); -} - -static int -encode_refpoints(amcaceo_encode_ctx *ctx, char *to, size_t tolen) { - int len; - int total = 0; - int k; - - /* - * No, despite the name, we are encoding prefixes, not refpoints. - */ - - /* - * Set initial fixed refpoints. Otherwise decoder cannot guess - * what they are. The initial value is chosen so that prefix can - * be encoded efficiently. - */ - ctx->refpoint[0] = 0; - ctx->refpoint[1] = 0x10; - - for (k = 2; k >= 0; k--) { - len = encode_point(ctx->refpoint, ctx->prefix[k], to, tolen); - if (len == 0) - return (0); - to += len; - tolen -= len; - total += len; - bootstrap(ctx->refpoint, k, ctx->prefix[k]); - } - - /* - * Here, all the refpoints is automagically restored to the - * original value. - */ - return (total); -} - -static int -encode_point(unsigned long *refpoint, unsigned long v, char *to, size_t tolen) -{ - int k = find_refpoint(refpoint, 0, v); - unsigned long delta = v - refpoint[k]; - - return (amcaceo_putwc(to, tolen, delta, k + 1)); -} - -static int -decode_point(unsigned long *refpoint, const char *from, size_t fromlen, - unsigned long *vp) -{ - unsigned long delta; - int w; - - w = amcaceo_getwc(from, fromlen, &delta); - if (w > 0) - *vp = refpoint[w - 1] + delta; - - return (w); -} - -static void -bootstrap(unsigned long *refpoint, int k, unsigned long prefix) { - int i; - - for (i = 3; i > 0; i--) - refpoint[i] = refpoint[i - 1] << 4; - if (k == 1 && 0xd8 <= prefix && prefix <= 0xdf) - refpoint[0] = special_refpoint[prefix - 0xd8] >> 4; - else - refpoint[0] = prefix << 4; -} - -static int -amcaceo_getwc(const char *s, size_t len, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - v = (v << 4) + (c & 0xf); - - len--; - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - return (0); /* final character missing */ -} - -static int -amcaceo_putwc(char *s, size_t len, unsigned long v, int w) { - int i, shift; - - if (len < w) - return (0); - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(v & 0xf) + shift]; - v >>= 4; - shift = 16; - } - return (w); -} - -/* - * Common Utility Functions. - */ - -static mdn_result_t -utf8_to_ucs4(const char *utf8, size_t fromlen, ucsbuf_t *b) { - mdn_result_t r; - - while (fromlen > 0) { - unsigned long c; - int w; - - if ((w = mdn_utf8_getwc(utf8, fromlen, &c)) == 0) - return (mdn_invalid_encoding); - utf8 += w; - fromlen -= w; - - if ((r = ucsbuf_append(b, c)) != mdn_success) - return (r); - } - return (mdn_success); -} - -static void -ucsbuf_init(ucsbuf_t *b) { - b->ucs = b->local; - b->size = UCSBUF_LOCAL_SIZE; - b->len = 0; -} - -static mdn_result_t -ucsbuf_grow(ucsbuf_t *b) { - if (b->ucs == b->local) - b->ucs = NULL; - b->size *= 2; - b->ucs = realloc(b->ucs, sizeof(unsigned long) * b->size); - if (b->ucs == NULL) - return (mdn_nomemory); - return (mdn_success); -} - -static mdn_result_t -ucsbuf_append(ucsbuf_t *b, unsigned long v) { - mdn_result_t r; - - if (b->len + 1 > b->size) { - r = ucsbuf_grow(b); - if (r != mdn_success) - return (r); - } - b->ucs[b->len++] = v; - return (mdn_success); -} - -static void -ucsbuf_free(ucsbuf_t *b) { - if (b->ucs != b->local) { - free(b->ucs); - b->ucs = b->local; - } -} - -static int -is_ldh(unsigned long v) { - if (('a' <= v && v <= 'z') || ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9') || v == '-') - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/amcacer.c b/contrib/idn/mdnkit/lib/amcacer.c deleted file mode 100644 index 937e81b7a5..0000000000 --- a/contrib/idn/mdnkit/lib/amcacer.c +++ /dev/null @@ -1,449 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcacer.c,v 1.2 2002/02/08 05:39:54 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-amc-ace-r-01.txt doesn't specify the ACE - * signature, we have to choose one. In order to prevent the converted - * name from beginning with a hyphen, we should choose a prefix rather - * than a suffix. - */ -#if !defined(MDN_AMCACER_PREFIX) && !defined(MDN_AMCACER_SUFFIX) -#define MDN_AMCACER_PREFIX "amc3-" -#endif - -#define MAX_UCS 0x10FFFF -#define AMCACER_BUFSIZE 64 - -typedef struct { - unsigned long *history; - unsigned long local_buf[AMCACER_BUFSIZE]; - int history_len; - unsigned long refpoint[6]; - int updated; -} amcacer_encode_ctx; - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -static mdn_result_t amcacer_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacer_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacer_init_ctx(amcacer_encode_ctx *ctx, size_t len); -static void amcacer_free_ctx(amcacer_encode_ctx *ctx); -static void amcacer_update_refpoints(amcacer_encode_ctx *ctx, - unsigned long c); -static int amcacer_getwc(const char *s, size_t len, - unsigned long *vp); -static int amcacer_putwc(char *s, size_t len, - unsigned long v, int w); -static int is_ldh(unsigned long v); - -static mdn__ace_t amcacer_ctx = { -#ifdef MDN_AMCACER_PREFIX - mdn__ace_prefix, - MDN_AMCACER_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACER_SUFFIX, -#endif - amcacer_encode, - amcacer_decode, -}; - -static const unsigned long amcacer_refpoint_initial[6] = { - 0, 0xe0, 0xa0, 0, 0, 0x10000, -}; - - -/* ARGSUSED */ -mdn_result_t -mdn__amcacer_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcacer_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcacer_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcacer_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcacer_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcacer_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcacer_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacer_encode_ctx ctx; - mdn_result_t r; - - /* Initialize context. */ - if ((r = amcacer_init_ctx(&ctx, fromlen)) != mdn_success) - return (r); - - while (fromlen > 0) { - size_t len; - unsigned long v; - - if (from[0] == '-') { - if (fromlen > 1 && from[1] == '-') { - v = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - continue; - } - } else if (literal_mode) { - v = from[0]; - from++; - fromlen--; - } else { - len = amcacer_getwc(from, fromlen, &v); - if (len == 0) { - r = mdn_invalid_encoding; - goto finish; - } - from += len; - fromlen -= len; - v = ctx.refpoint[len] + v; - amcacer_update_refpoints(&ctx, v); - } - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - goto overflow; - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - goto overflow; - *to = '\0'; - - finish: - amcacer_free_ctx(&ctx); - return (r); - - overflow: - r = mdn_buffer_overflow; - goto finish; -} - -static mdn_result_t -amcacer_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacer_encode_ctx ctx; - mdn_result_t r; - - /* Initialize context. */ - if ((r = amcacer_init_ctx(&ctx, fromlen)) != mdn_success) - return (r); - - while (fromlen > 0) { - unsigned long c; - size_t len; - - len = mdn_utf8_getwc(from, fromlen, &c); - from += len; - fromlen -= len; - - if (len == 0 || c >= MAX_UCS) { - /* - * Invalid Unicode code point. - */ - r = mdn_invalid_encoding; - goto ret; - } else if (c == '-') { - /* - * Convert "-" to "--". - */ - if (tolen < 2) - goto overflow; - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (is_ldh(c)) { - /* - * LDH characters. - */ - if (literal_mode == 0) { - /* - * Go into literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 1; - } - if (tolen < 1) - goto overflow; - *to++ = c; - tolen--; - } else { - /* - * Non-LDH characters. - */ - unsigned long *refpoint = ctx.refpoint; - int k; - - if (literal_mode != 0) { - /* - * Get out of literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 0; - } - for (k = 1; k < 6; k++) { - if (c >= refpoint[k] && - c - refpoint[k] < (1 << (4 * k))) - break; - } - k = amcacer_putwc(to, tolen, c - refpoint[k], k); - if (k == 0) - goto overflow; - to += k; - tolen -= k; - amcacer_update_refpoints(&ctx, c); - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - goto overflow; - - *to = '\0'; - r = mdn_success; - ret: - amcacer_free_ctx(&ctx); - return (r); - - overflow: - r = mdn_buffer_overflow; - goto ret; -} - -static mdn_result_t -amcacer_init_ctx(amcacer_encode_ctx *ctx, size_t len) { - if (len > AMCACER_BUFSIZE) { - ctx->history = malloc(sizeof(ctx->history[0]) * len); - if (ctx->history == NULL) - return (mdn_nomemory); - } else { - ctx->history = ctx->local_buf; - } - ctx->history_len = 0; - (void)memcpy(ctx->refpoint, amcacer_refpoint_initial, - sizeof(ctx->refpoint)); - ctx->updated = 0; - return (mdn_success); -} - -static void -amcacer_free_ctx(amcacer_encode_ctx *ctx) { - if (ctx->history != ctx->local_buf) - free(ctx->history); - ctx->history = NULL; -} - -static void -amcacer_update_refpoints(amcacer_encode_ctx *ctx, unsigned long c) { - unsigned long *refpoint = ctx->refpoint; - unsigned long *history = ctx->history; - int k; - - history[ctx->history_len++] = c; - -#define MAX_K(k) (1 << (4 * (k))) -#define ROUND_K(v, k) (((v) >> (4 * (k))) << (4 * (k))) - if (!ctx->updated) { - for (k = 1; k < 4; k++) - refpoint[k] = ROUND_K(c, k); - ctx->updated = 1; - return; - } - - for (k = 1; k < 4; k++) { - unsigned long max = MAX_K(k); - int i; - - for (i = ctx->history_len - 2; i >= 0; i--) { - if ((refpoint[k] ^ history[i]) < max) - break; - if ((c ^ history[i]) < max) { - refpoint[k] = ROUND_K(c, k); - return; - } - } - } -#undef MAX_K -#undef ROUND_K -} - -static int -amcacer_getwc(const char *s, size_t len, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - v = (v << 4) + (c & 0xf); - - len--; - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - return (0); /* final character missing */ -} - -static int -amcacer_putwc(char *s, size_t len, unsigned long v, int w) { - int i, shift; - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(v & 0xf) + shift]; - v >>= 4; - shift = 16; - } - return (w); -} - -static int -is_ldh(unsigned long v) { - if (('a' <= v && v <= 'z') || ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9') || v == '-') - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/amcacev.c b/contrib/idn/mdnkit/lib/amcacev.c deleted file mode 100644 index 4bd50033aa..0000000000 --- a/contrib/idn/mdnkit/lib/amcacev.c +++ /dev/null @@ -1,545 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcacev.c,v 1.1 2002/02/08 05:39:56 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-amc-ace-v-00.txt doesn't specify the ACE - * signature, we have to choose one. In order to prevent the converted - * name from beginning with a hyphen, we should choose a prefix rather - * than a suffix. - */ -#if !defined(MDN_AMCACEV_PREFIX) && !defined(MDN_AMCACEV_SUFFIX) -#define MDN_AMCACEV_PREFIX "amc4-" -#endif - -#define MAX_UCS 0x10FFFF -#define AMCACEV_BUFSIZE 64 - -typedef struct { - unsigned long *history; /* history of non-LDH characters */ - unsigned long local_buf[AMCACEV_BUFSIZE]; - int cur; /* current index */ - int style; /* 0 or 1 */ - unsigned long refpoint[2][6]; /* refpoint[0] is not used. */ -} amcacev_ctx; - -#define IN_WINDOW(ctx, c, st, win) \ - ((c) >= (ctx)->refpoint[st][win] && \ - ((c) - (ctx)->refpoint[st][win]) <= amcacev_winsize[st][win]) - -static const unsigned long amcacev_refpoint_initial[2][6] = { - { 0, 0xe0, 0xa0, 0, 0, 0x10000 }, - { 0, 0, 0, 0, 0, 0x10000 }, -}; -static const unsigned long amcacev_winsize[2][6] = { - { 0, 0xf, 0xff, 0xfff, 0xffff, 0xfffff }, - { 0, 0, 0xff, 0x4fff, 0xffff, 0xfffff }, -}; - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -static mdn_result_t amcacev_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacev_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t init_ctx(amcacev_ctx *ctx, size_t len); -static void release_ctx(amcacev_ctx *ctx); -static void update_ctx(amcacev_ctx *ctx, unsigned long v); -static unsigned long get_refpoint(unsigned long v, int st, int win); -static int eval_compression(amcacev_ctx *ctx); -static unsigned long encode_delta(unsigned long v, - amcacev_ctx *ctx, int *szp); -static int amcacev_getwc(const char *s, size_t len, int style, - unsigned long *vp); -static int amcacev_putwc(char *s, size_t len, - unsigned long delta, int w); -static int is_ldh(unsigned long v); - -static mdn__ace_t amcacev_profile = { -#ifdef MDN_AMCACEV_PREFIX - mdn__ace_prefix, - MDN_AMCACEV_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACEV_SUFFIX, -#endif - amcacev_encode, - amcacev_decode, -}; - - - -/* ARGSUSED */ -mdn_result_t -mdn__amcacev_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcacev_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcacev_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcacev_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcacev_profile, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcacev_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcacev_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacev_ctx ctx; - mdn_result_t r; - - /* Initialize context. */ - if ((r = init_ctx(&ctx, fromlen)) != mdn_success) - return (r); - - while (fromlen > 0) { - unsigned long v; - int len; - - if (from[0] == '-') { - if (fromlen > 1 && from[1] == '-') { - v = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - continue; - } - } else if (literal_mode) { - v = from[0]; - from++; - fromlen--; - } else { - len = amcacev_getwc(from, fromlen, ctx.style, &v); - if (len == 0) - goto invalid_encoding; - from += len; - fromlen -= len; - - v += ctx.refpoint[ctx.style][len]; - - /* Update refpoints. */ - update_ctx(&ctx, v); - } - - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - goto overflow; - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - goto overflow; - *to = '\0'; - - ret: - release_ctx(&ctx); - return (r); - - invalid_encoding: - r = mdn_invalid_encoding; - goto ret; - overflow: - r = mdn_buffer_overflow; - goto ret; -} - -static mdn_result_t -amcacev_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacev_ctx ctx; - mdn_result_t r; - - /* Initialize context. */ - if ((r = init_ctx(&ctx, fromlen)) != mdn_success) - return (r); - - while (fromlen > 0) { - unsigned long c; - size_t len; - - len = mdn_utf8_getwc(from, fromlen, &c); - from += len; - fromlen -= len; - if (len == 0) - goto invalid_encoding; - - if (c >= MAX_UCS) { - /* - * Invalid Unicode code point. - */ - goto invalid_encoding; - } else if (c == '-') { - /* - * Convert "-" to "--". - */ - if (tolen < 2) - goto overflow; - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (is_ldh(c)) { - /* - * LDH characters. - */ - if (literal_mode == 0) { - /* - * Go into literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 1; - } - if (tolen < 1) - goto overflow; - *to++ = c; - tolen--; - } else { - /* - * Non-LDH characters. - */ - int sz; - unsigned long delta; - - if (literal_mode != 0) { - /* - * Get out of literal mode. - */ - if (tolen < 1) - goto overflow; - *to++ = '-'; - tolen--; - literal_mode = 0; - } - delta = encode_delta(c, &ctx, &sz); - sz = amcacev_putwc(to, tolen, delta, sz); - if (sz == 0) - goto overflow; - to += sz; - tolen -= sz; - - /* Add to the history, and update refpoints. */ - update_ctx(&ctx, c); - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - goto overflow; - - *to = '\0'; - - ret: - release_ctx(&ctx); - return (r); - - invalid_encoding: - r = mdn_invalid_encoding; - goto ret; - overflow: - r = mdn_buffer_overflow; - goto ret; -} - -static mdn_result_t -init_ctx(amcacev_ctx *ctx, size_t len) { - if (len <= AMCACEV_BUFSIZE) { - ctx->history = ctx->local_buf; - } else { - ctx->history = malloc(sizeof(ctx->history[0]) * len); - if (ctx->history == NULL) - return (mdn_nomemory); - } - ctx->cur = 0; - ctx->style = 0; - (void)memcpy(ctx->refpoint, amcacev_refpoint_initial, - sizeof(ctx->refpoint)); - return (mdn_success); -} - -static void -release_ctx(amcacev_ctx *ctx) { - if (ctx->history != ctx->local_buf) - free(ctx->history); - ctx->history = NULL; -} - -static void -update_ctx(amcacev_ctx *ctx, unsigned long v) { - int st, win; - - /* Get style */ - if (IN_WINDOW(ctx, v, 0, 1)) - ctx->style = 0; - else if (!IN_WINDOW(ctx, v, 0, 1) && - !IN_WINDOW(ctx, v, 0, 2) && - !IN_WINDOW(ctx, v, 0, 3)) - ctx->style = 1; - - /* Add the character to the history. */ - ctx->history[ctx->cur++] = v; - - for (st = 0; st < 2; st++) { - for (win = (st == 0) ? 1 : 2; win < 4; win++) { - unsigned long oldref = ctx->refpoint[st][win]; - unsigned long newref = get_refpoint(v, st, win); - int enclen1, enclen2; - - if (newref == oldref) - continue; - - enclen1 = eval_compression(ctx); - ctx->refpoint[st][win] = newref; - enclen2 = eval_compression(ctx); - if (enclen2 > enclen1) - ctx->refpoint[st][win] = oldref; - } - } -} - -static unsigned long -get_refpoint(unsigned long v, int st, int win) { -#define ROUND_BITS(v, b) (((v) >> (b)) << (b)) - if (win == 1) { - return (ROUND_BITS(v, 3)); - } else if (win == 2) { - if (0xa0 <= v && v <= 0x17f) - return (0xa0); - else - return (ROUND_BITS(v, 8)); - } else if (win == 3) { - if (0x3000 <= v && v <= 0x9ffff) - return (0x4e00); - else if (st == 1 && 0xa000 <= v && v <= 0xd7ff) - return (0x8800); - else - return (ROUND_BITS(v, (st == 0) ? 19 : 20)); - } else { - FATAL(("get_refpoint: internal error\n")); - return (0); /* for lint */ - } -#undef ROUND_BITS -} - -static int -eval_compression(amcacev_ctx *ctx) { - int i; - int len = 0; - int cur = ctx->cur; - unsigned long *p = ctx->history; - - for (i = 0; i < cur; i++) { - if (!is_ldh(p[i])) { - int sz; - (void)encode_delta(p[i], ctx, &sz); - len += sz; - } - } - return (len); -} - -static unsigned long -encode_delta(unsigned long v, amcacev_ctx *ctx, int *szp) { - int sz; - - for (sz = (ctx->style == 0) ? 1 : 2; sz < 6; sz++) { - if (IN_WINDOW(ctx, v, ctx->style, sz)) { - *szp = sz; - return (v - ctx->refpoint[ctx->style][sz]); - } - } - FATAL(("amcacev_encode_mode: internal error\n")); - return (0); /* for lint */ -} - -static int -amcacev_getwc(const char *s, size_t len, int style, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - int style1_special = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - if (style == 1 && len == orglen && (c & 0x10) == 0) - style1_special = 3; - - len--; - if (style1_special != 0) { - v = (v << 5) + (c & 0x1f); - if (--style1_special == 0) { - *vp = v + 0x1000; - return (3); - } - } else { - v = (v << 4) + (c & 0xf); - - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - } - return (0); /* final character missing */ -} - -static int -amcacev_putwc(char *s, size_t len, unsigned long delta, int w) { - if (len < w) - return (0); - - if (w == 3 && delta >= 0x1000) { - delta -= 0x1000; - s[0] = base32encode[(delta >> 10) & 0x1f]; - s[1] = base32encode[(delta >> 5) & 0x1f]; - s[2] = base32encode[delta & 0x1f]; - } else { - int i, shift; - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(delta & 0xf) + shift]; - delta >>= 4; - shift = 16; - } - } - return (w); -} - -static int -is_ldh(unsigned long v) { - if (('a' <= v && v <= 'z') || ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9') || v == '-') - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/amcacew.c b/contrib/idn/mdnkit/lib/amcacew.c deleted file mode 100644 index 561c449f88..0000000000 --- a/contrib/idn/mdnkit/lib/amcacew.c +++ /dev/null @@ -1,459 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcacew.c,v 1.1 2002/02/08 05:39:57 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-amc-ace-w-00.txt doesn't specify the ACE - * signature, we have to choose one. In order to prevent the converted - * name from beginning with a hyphen, we should choose a prefix rather - * than a suffix. - */ -#if !defined(MDN_AMCACEW_PREFIX) && !defined(MDN_AMCACEW_SUFFIX) -#define MDN_AMCACEW_PREFIX "amc5-" -#endif - -#define MAX_UCS 0x10FFFF - -typedef struct { - int style; /* 0 or 1 */ - unsigned long refpoint[6]; /* refpoint[0] is not used. */ -} amcacew_ctx; - -static const unsigned long amcacew_refpoint_initial[6] = { - 0, 0xe0, 0xa0, 0, 0, 0x10000, -}; - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -static mdn_result_t amcacew_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacew_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static void amcacew_init_ctx(amcacew_ctx *ctx); -static void amcacew_update_ctx(amcacew_ctx *ctx, unsigned long v, - int sz); -static unsigned long amcacew_encode_delta(unsigned long v, - amcacew_ctx *ctx, int *szp); -static int amcacew_getwc(const char *s, size_t len, int style, - unsigned long *vp); -static int amcacew_putwc(char *s, size_t len, - unsigned long delta, int w); -static int is_ldh(unsigned long v); - -static mdn__ace_t amcacew_profile = { -#ifdef MDN_AMCACEW_PREFIX - mdn__ace_prefix, - MDN_AMCACEW_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACEW_SUFFIX, -#endif - amcacew_encode, - amcacew_decode, -}; - - - -/* ARGSUSED */ -mdn_result_t -mdn__amcacew_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcacew_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcacew_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcacew_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcacew_profile, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcacew_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcacew_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacew_ctx ctx; - - /* Initialize refpoints. */ - amcacew_init_ctx(&ctx); - - while (fromlen > 0) { - unsigned long v; - int len; - - if (from[0] == '-') { - if (fromlen > 1 && from[1] == '-') { - v = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - continue; - } - } else if (literal_mode) { - v = from[0]; - from++; - fromlen--; - } else { - len = amcacew_getwc(from, fromlen, ctx.style, &v); - if (len == 0) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - - v += ctx.refpoint[len]; - - amcacew_update_ctx(&ctx, v, len); - } - - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - *to = '\0'; - - return (mdn_success); -} - -static mdn_result_t -amcacew_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal_mode = 0; - amcacew_ctx ctx; - - /* Initialize refpoints. */ - amcacew_init_ctx(&ctx); - - while (fromlen > 0) { - unsigned long c; - size_t len; - - len = mdn_utf8_getwc(from, fromlen, &c); - from += len; - fromlen -= len; - if (len == 0) - return (mdn_invalid_encoding); - - if (c > MAX_UCS) { - /* - * Invalid Unicode code point. - */ - return (mdn_invalid_encoding); - } else if (c == '-') { - /* - * Convert "-" to "--". - */ - if (tolen < 2) - return (mdn_buffer_overflow); - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (is_ldh(c)) { - /* - * LDH characters. - */ - if (literal_mode == 0) { - /* - * Go into literal mode. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '-'; - tolen--; - literal_mode = 1; - } - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = c; - tolen--; - } else { - /* - * Non-LDH characters. - */ - int sz; - unsigned long delta; - - if (literal_mode != 0) { - /* - * Get out of literal mode. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '-'; - tolen--; - literal_mode = 0; - } - delta = amcacew_encode_delta(c, &ctx, &sz); - sz = amcacew_putwc(to, tolen, delta, sz); - if (sz == 0) - return (mdn_buffer_overflow); - to += sz; - tolen -= sz; - amcacew_update_ctx(&ctx, c, sz); - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - - return (mdn_success); -} - -static void -amcacew_init_ctx(amcacew_ctx *ctx) { - ctx->style = 0; - (void)memcpy(ctx->refpoint, amcacew_refpoint_initial, - sizeof(ctx->refpoint)); -} - -static void -amcacew_update_ctx(amcacew_ctx *ctx, unsigned long v, int sz) { - if (sz != 3) - ctx->style = (sz < 3) ? 0 : 1; - -#define ROUND_BITS(v, b) (((v) >> (b)) << (b)) - /* Update refpoint[1] */ - ctx->refpoint[1] = ROUND_BITS(v, 4); - - /* Update refpoint[2] */ - if (sz > 2) { - if (0xa0 <= v && v <= 0x17f) - ctx->refpoint[2] = 0xa0; - else - ctx->refpoint[2] = ROUND_BITS(v, 8); - } - - /* Update refpoint[3] */ - if (sz > 3) { - if (0x3000 <= v && v <= 0x9fff) - ctx->refpoint[3] = 0x4e00; - else if (0xa000 <= v && v <= 0xd7ff && ctx->style == 1) - ctx->refpoint[3] = 0x8800; - else - ctx->refpoint[3] = ROUND_BITS(v, 12); - } -#undef ROUND_BITS -} - -static unsigned long -amcacew_encode_delta(unsigned long v, amcacew_ctx *ctx, int *szp) { - int sz, szinit; - unsigned long *maxdelta; - unsigned long *refpoint = ctx->refpoint; - static unsigned long maxdelta_style0[6] = { - 0, 0xf, 0xff, 0xfff, 0xffff, 0xfffff, - }; - static unsigned long maxdelta_style1[6] = { - 0, 0, 0xff, 0x4fff, 0xffff, 0xfffff, - }; - - if (ctx->style == 0) { - szinit = 1; - maxdelta = maxdelta_style0; - } else { - szinit = 2; - maxdelta = maxdelta_style1; - } - for (sz = szinit; sz < 6; sz++) { - if (v >= refpoint[sz] && v - refpoint[sz] <= maxdelta[sz]) { - *szp = sz; - return (v - refpoint[sz]); - } - } - FATAL(("amcacew_encode_mode: internal error\n")); - return (0); /* for lint */ -} - -static int -amcacew_getwc(const char *s, size_t len, int style, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - int style1_special = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - if (style == 1 && len == orglen && (c & 0x10) == 0) - style1_special = 3; - - len--; - if (style1_special != 0) { - v = (v << 5) + (c & 0x1f); - if (--style1_special == 0) { - *vp = v + 0x1000; - return (3); - } - } else { - v = (v << 4) + (c & 0xf); - - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - } - return (0); /* final character missing */ -} - -static int -amcacew_putwc(char *s, size_t len, unsigned long delta, int w) { - if (len < w) - return (0); - - if (w == 3 && delta >= 0x1000) { - delta -= 0x1000; - s[0] = base32encode[(delta >> 10) & 0x1f]; - s[1] = base32encode[(delta >> 5) & 0x1f]; - s[2] = base32encode[delta & 0x1f]; - } else { - int i, shift; - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(delta & 0xf) + shift]; - delta >>= 4; - shift = 16; - } - } - return (w); -} - -static int -is_ldh(unsigned long v) { - if (('a' <= v && v <= 'z') || ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9') || v == '-') - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/amcacez.c b/contrib/idn/mdnkit/lib/amcacez.c deleted file mode 100644 index d1a429084d..0000000000 --- a/contrib/idn/mdnkit/lib/amcacez.c +++ /dev/null @@ -1,484 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: amcacez.c,v 1.1 2002/02/08 05:39:57 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Although draft-ietf-idn-amc-ace-z-01.txt doesn't specify the ACE - * signature, we have to choose one. In order to prevent the converted - * name from beginning with a hyphen, we should choose a prefix rather - * than a suffix. - */ -#if !defined(MDN_AMCACEZ_PREFIX) && !defined(MDN_AMCACEZ_SUFFIX) -#define MDN_AMCACEZ_PREFIX "zq--" -#endif - -#define INVALID_UCS 0x80000000 -#define MAX_UCS 0x10FFFF - -/* - * As the draft states, it is possible that `delta' may overflow during - * the encoding. The upper bound of 'delta' is: - * <# of chars. of input string> + * - * <# of chars. of input string + 1> - * For this value not to be greater than 0xffffffff (since the calculation - * is done using unsigned long, which is at least 32bit long), the maxmum - * input string size is about 3850 characters, which is long enough for - * a domain label... - */ -#define AMCACEZ_MAXINPUT 3800 - -/* - * Parameters. - */ -#define AMCACEZ_BASE 36 -#define AMCACEZ_TMIN 1 -#define AMCACEZ_TMAX 26 -#define AMCACEZ_SKEW 38 -#define AMCACEZ_DAMP 700 -#define AMCACEZ_INITIAL_BIAS 72 -#define AMCACEZ_INITIAL_N 0x80 - -static mdn_result_t amcacez_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t amcacez_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static int amcacez_getwc(const char *s, size_t len, - int bias, unsigned long *vp); -static int amcacez_putwc(char *s, size_t len, - unsigned long delta, int bias); -static int amcacez_update_bias(unsigned long delta, - size_t npoints, int first); - -static mdn__ace_t amcacez_profile = { -#ifdef MDN_AMCACEZ_PREFIX - mdn__ace_prefix, - MDN_AMCACEZ_PREFIX, -#else - mdn__ace_suffix, - MDN_AMCACEZ_SUFFIX, -#endif - amcacez_encode, - amcacez_decode, -}; - - - -/* ARGSUSED */ -mdn_result_t -mdn__amcacez_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__amcacez_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__amcacez_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__amcacez_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&amcacez_profile, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__amcacez_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -amcacez_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned long *ucs, ucs_tmp[64], c, idx; - size_t uidx, fidx, ucslen; - int first, bias; - mdn_result_t r; - - /* - * Allocate enough memory for UCS-4 code point array 'ucs'. - */ - if (fromlen > 64) { - ucs = malloc(fromlen * sizeof(unsigned long)); - if (ucs == NULL) - return (mdn_nomemory); - } else { - ucs = ucs_tmp; - } - ucslen = 0; - - /* - * Find the last delimiter, and copy the characters - * before it verbatim. - */ - for (fidx = fromlen; fidx > 0; fidx--) { - if (from[fidx - 1] == '-') { - for (uidx = 0; uidx < fidx - 1; uidx++) { - ucs[uidx] = from[uidx]; - } - ucslen = uidx; - break; - } - } - - first = 1; - bias = AMCACEZ_INITIAL_BIAS; - c = AMCACEZ_INITIAL_N; - idx = 0; - while (fidx < fromlen) { - int len; - unsigned long delta; - int i; - - len = amcacez_getwc(from + fidx, fromlen - fidx, bias, &delta); - if (len == 0) - return (mdn_invalid_encoding); - fidx += len; - - bias = amcacez_update_bias(delta, ucslen + 1, first); - first = 0; - idx += delta; - c += idx / (ucslen + 1); - uidx = idx % (ucslen + 1); - - /* Insert 'c' at uidx. */ - for (i = ucslen; i > uidx; i--) - ucs[i] = ucs[i - 1]; - ucs[uidx] = c; - - ucslen++; - idx = uidx + 1; - } - - /* - * Convert from UCS-4 to UTF-8. - */ - for (uidx = 0; uidx < ucslen; uidx++) { - int len = mdn_utf8_putwc(to, tolen, ucs[uidx]); - if (len == 0) - goto overflow; - to += len; - tolen -= len; - } - /* Terminate with NUL. */ - if (tolen <= 0) - goto overflow; - *to = '\0'; - - r = mdn_success; - ret: - if (ucs != ucs_tmp) - free(ucs); - return (r); - - overflow: - r = mdn_buffer_overflow; - goto ret; -} - -static mdn_result_t -amcacez_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned long *ucs, ucs_tmp[64]; - unsigned long cur_code, next_code, delta; - size_t ucslen, ucsdone; - size_t toidx; - int uidx, bias, first; - mdn_result_t r; - - /* - * Convert UTF-8 string 'from' to UCS-4 code point array 'ucs'. - */ - if (fromlen > 64) { - ucs = malloc(fromlen * sizeof(unsigned long)); - if (ucs == NULL) - return (mdn_nomemory); - } else { - ucs = ucs_tmp; - } - ucslen = 0; - while (fromlen > 0) { - unsigned long c; - int len; - - len = mdn_utf8_getwc(from, fromlen, &c); - if (len == 0 || c > MAX_UCS) - goto invalid; - ucs[ucslen++] = c; - from += len; - fromlen -= len; - } - - /* - * If the input string is too long (actually too long to be sane), - * return failure in order to prevent possible overflow. - */ - if (ucslen > AMCACEZ_MAXINPUT) - return (mdn_failure); - - ucsdone = 0; /* number of characters processed */ - toidx = 0; - - /* - * First, pick up basic code points and copy them to 'to'. - */ - for (uidx = 0; uidx < ucslen; uidx++) { - if (ucs[uidx] < 0x80) { - if (toidx >= tolen) - goto overflow; - to[toidx++] = ucs[uidx]; - ucsdone++; - } - } - - /* - * If there are any basic code points, output a delimiter - * (hyphen-minus). - */ - if (toidx > 0) { - if (toidx >= tolen) - goto overflow; - to[toidx++] = '-'; - to += toidx; - tolen -= toidx; - } - - /* - * Then encode non-basic characters. - */ - first = 1; - cur_code = AMCACEZ_INITIAL_N; - bias = AMCACEZ_INITIAL_BIAS; - delta = 0; - while (ucsdone < ucslen) { - int limit = -1, rest; - - /* - * Find the smallest code point equal to or greater - * than 'cur_code'. Also remember the index of the - * last occurence of the code point. - */ - for (next_code = MAX_UCS, uidx = ucslen - 1; - uidx >= 0; uidx--) { - if (ucs[uidx] >= cur_code && ucs[uidx] < next_code) { - next_code = ucs[uidx]; - limit = uidx; - } - } - /* There must be such code point. */ - assert(limit >= 0); - - delta += (next_code - cur_code) * (ucsdone + 1); - cur_code = next_code; - - /* - * Scan the input string again, and encode characters - * whose code point is 'cur_code'. Use 'limit' to avoid - * unnecessary scan. - */ - for (uidx = 0, rest = ucsdone; uidx <= limit; uidx++) { - if (ucs[uidx] < cur_code) { - delta++; - rest--; - } else if (ucs[uidx] == cur_code) { - int sz = amcacez_putwc(to, tolen, delta, bias); - if (sz == 0) - goto overflow; - to += sz; - tolen -= sz; - ucsdone++; - bias = amcacez_update_bias(delta, ucsdone, - first); - delta = 0; - first = 0; - } - } - delta += rest + 1; - cur_code++; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - goto overflow; - *to = '\0'; - - r = mdn_success; - ret: - if (ucs != ucs_tmp) - free(ucs); - return (r); - - invalid: - r = mdn_invalid_encoding; - goto ret; - overflow: - r = mdn_buffer_overflow; - goto ret; -} - -static int -amcacez_getwc(const char *s, size_t len, int bias, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0, w = 1; - int k; - - for (k = AMCACEZ_BASE - bias; len > 0; k += AMCACEZ_BASE) { - int c = *s++; - int t = (k < AMCACEZ_TMIN) ? AMCACEZ_TMIN : - (k > AMCACEZ_TMAX) ? AMCACEZ_TMAX : k; - - len--; - if ('a' <= c && c <= 'z') - c = c - 'a'; - else if ('A' <= c && c <= 'Z') - c = c - 'A'; - else if ('0' <= c && c <= '9') - c = c - '0' + 26; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - v += c * w; - - if (c < t) { - *vp = v; - return (orglen - len); - } - - w *= (AMCACEZ_BASE - t); - } - - return (0); /* final character missing */ -} - -static int -amcacez_putwc(char *s, size_t len, unsigned long delta, int bias) { - const char *amcacez_base36 = "abcdefghijklmnopqrstuvwxyz0123456789"; - int k; - char *sorg = s; - - for (k = AMCACEZ_BASE - bias; 1; k += AMCACEZ_BASE) { - int t = (k < AMCACEZ_TMIN) ? AMCACEZ_TMIN : - (k > AMCACEZ_TMAX) ? AMCACEZ_TMAX : k; - - if (delta < t) - break; - if (len < 1) - return (0); - *s++ = amcacez_base36[t + ((delta - t) % (AMCACEZ_BASE - t))]; - len--; - delta = (delta - t) / (AMCACEZ_BASE - t); - } - if (len < 1) - return (0); - *s++ = amcacez_base36[delta]; - return (s - sorg); -} - -static int -amcacez_update_bias(unsigned long delta, size_t npoints, int first) { - int k = 0; - - delta /= first ? AMCACEZ_DAMP : 2; - delta += delta / npoints; - - while (delta > ((AMCACEZ_BASE - AMCACEZ_TMIN) * AMCACEZ_TMAX) / 2) { - delta /= AMCACEZ_BASE - AMCACEZ_TMIN; - k++; - } - return (AMCACEZ_BASE * k + - (((AMCACEZ_BASE - AMCACEZ_TMIN + 1) * delta) / - (delta + AMCACEZ_SKEW))); -} diff --git a/contrib/idn/mdnkit/lib/api.c b/contrib/idn/mdnkit/lib/api.c deleted file mode 100644 index 706076f98c..0000000000 --- a/contrib/idn/mdnkit/lib/api.c +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: api.c,v 1.2 2002/02/08 05:39:57 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static struct actiondesc { - int bit; - char *desc; -} actiondesc[] = { - { MDN_LOCALCONV, "local-conv" }, - { MDN_IDNCONV, "idn-conv" }, - { MDN_NAMEPREP, "nameprep" }, - { MDN_UNASCHECK, "unassigned-check" }, - { MDN_LOCALMAP, "local-map" }, - { MDN_DELIMMAP, "delimiter-map" }, - { 0, "" }, -}; - -#define ENCODE_MASK \ - (MDN_LOCALCONV|MDN_IDNCONV|MDN_NAMEPREP|MDN_UNASCHECK|\ - MDN_DELIMMAP|MDN_LOCALMAP) -#define DECODE_MASK (MDN_LOCALCONV|MDN_NAMEPREP|MDN_UNASCHECK|MDN_IDNCONV) - -static int initialized; -static mdn_resconf_t default_conf; - -static char *actions_to_string(int actions); - -mdn_result_t -mdn_nameinit(void) { - mdn_result_t r; - static int firsttime = 1; - - TRACE(("mdn_nameinit()\n")); - - initialized = 1; - if (firsttime) { - mdn_resconf_initialize(); - firsttime = 0; - } - if (default_conf != NULL) { - mdn_resconf_destroy(default_conf); - default_conf = NULL; - } - if ((r = mdn_resconf_create(&default_conf)) == mdn_success) { - r = mdn_resconf_loadfile(default_conf, NULL); - } - return (r); -} - -mdn_result_t -mdn_encodename(int actions, const char *from, char *to, size_t tolen) { - char buf[20]; - char *p = buf; - mdn_result_t r; - - assert(from != NULL && to != NULL); - - TRACE(("mdn_encodename(actions=%s, from=\"%s\")\n", - actions_to_string(actions), - mdn_debug_xstring(from, 256))); - - if (actions & ~ENCODE_MASK) { - WARNING(("mdn_encodename: invalid actions 0x%x\n", actions)); - return mdn_invalid_action; - } - - if (!initialized && ((r = mdn_nameinit()) != mdn_success)) - return (r); - - if (actions & MDN_LOCALCONV) - *p++ = 'l'; - if (actions & MDN_LOCALMAP) - *p++ = 'd'; - if (actions & MDN_LOCALMAP) - *p++ = 'M'; - if (actions & MDN_NAMEPREP) { - p[0] = 'm'; - p[1] = 'n'; - p[2] = 'p'; - p += 3; - } - if (actions & MDN_UNASCHECK) - *p++ = 'u'; - if (actions & MDN_IDNCONV) - *p++ = 'I'; - *p = '\0'; - - return (mdn_res_nameconv(default_conf, buf, from, to, tolen)); -} - -mdn_result_t -mdn_decodename(int actions, const char *from, char *to, size_t tolen) { - char buf[20]; - char *p = buf; - mdn_result_t r; - - assert(from != NULL && to != NULL); - - TRACE(("mdn_decodename(actions=%s, from=\"%s\")\n", - actions_to_string(actions), - mdn_debug_xstring(from, 256))); - - if (actions & ~DECODE_MASK) { - WARNING(("mdn_decodename: invalid actions 0x%x\n", actions)); - return mdn_invalid_action; - } - - if (!initialized && ((r = mdn_nameinit()) != mdn_success)) - return (r); - - if (actions & MDN_IDNCONV) - *p++ = 'i'; - if (actions & MDN_NAMEPREP) { - *p++ = '!'; - *p++ = 'N'; - } - if (actions & MDN_UNASCHECK) { - *p++ = '!'; - *p++ = 'u'; - } - if (actions & MDN_LOCALCONV) - *p++ = 'L'; - *p = '\0'; - - return (mdn_res_nameconv(default_conf, buf, from, to, tolen)); -} - -static char * -actions_to_string(int actions) { - static char buf[100]; - int i; - int first = 1; - - buf[0] = '\0'; - for (i = 0; actiondesc[i].bit != 0; i++) { - if (actions & actiondesc[i].bit) { - if (!first) - strcat(buf, "|"); - strcat(buf, actiondesc[i].desc); - first = 0; - } - } - return (buf); -} diff --git a/contrib/idn/mdnkit/lib/brace.c b/contrib/idn/mdnkit/lib/brace.c deleted file mode 100644 index e0601d4284..0000000000 --- a/contrib/idn/mdnkit/lib/brace.c +++ /dev/null @@ -1,666 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: brace.c,v 1.1 2002/01/02 02:46:40 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MDN_BRACE_SUFFIX -#define MDN_BRACE_SUFFIX "-8q9" -#endif -#define BRACE_BUF_SIZE 128 /* more than enough */ -#define BRACE_BASE32(n) (brace_base32[n]) -#define BRACE_RBASE32(c) (brace_rbase32(c)) - -#define IS_LDH(c) \ - (('a' <= (c) && (c) <= 'z') || ('A' <= (c) && (c) <= 'Z') || \ - ('0' <= (c) && (c) <= '9') || (c) == '-') - -/* - * Encoding Styles. - */ -enum { - half_row_style, /* all non-LDH characters are in a single half row */ - full_row_style, /* all non-LDH characters are in a single row */ - mixed_style, - no_row_style -}; - -/* - * Base-32 encoding array. - */ -static char brace_base32[] = "23456789abcdefghijkmnpqrstuvwxyz"; - -static mdn_result_t brace_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t brace_decode_utf16(const char *from, - size_t fromlen, - unsigned short *buf, - size_t *lenp); -static mdn_result_t brace_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t brace_encode_utf16(const unsigned short *p, size_t len, - char *to, size_t tolen, - int encoding_style, - unsigned short row); -static mdn_result_t get_encoding_style(unsigned short *p, size_t len, - int *stylep, unsigned short *rowp); -static int brace_rbase32(int c); - -static mdn__ace_t brace_ctx = { - mdn__ace_suffix, - MDN_BRACE_SUFFIX, - brace_encode, - brace_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__brace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__brace_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) { - return (mdn_success); -} - -mdn_result_t -mdn__brace_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__brace_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&brace_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__brace_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -brace_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[BRACE_BUF_SIZE]; - size_t len, reslen; - mdn_result_t r; - - /* - * Allocate sufficient buffer. - */ - if (fromlen > BRACE_BUF_SIZE) { - if ((buf = malloc(sizeof(*buf) * fromlen)) == NULL) - return (mdn_nomemory); - } else { - /* Use local buffer. */ - buf = local_buf; - } - - /* - * Decode into UTF-16 string. - */ - r = brace_decode_utf16(from, fromlen, buf, &len); - if (r != mdn_success) - goto ret; - - /* - * Now 'buf' points the decompressed string, which must contain - * UTF-16 characters. - */ - - /* - * Convert to utf-8. - */ - r = mdn_util_utf16toutf8(buf, len, to, tolen, &reslen); - if (r != mdn_success) - goto ret; - if (reslen >= tolen) { - r = mdn_buffer_overflow; - goto ret; - } - to[reslen] = '\0'; - - r = mdn_success; - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -brace_decode_utf16(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp) -{ - int encoding_style; - unsigned short row; - unsigned long bitbuf = 0; - int bitlen = 0; - int literal_mode; - int i; - -#define READ_BITS(n) \ - do { \ - int len = (n); \ - while (bitlen < len) { \ - int x; \ - if (fromlen-- <= 0) \ - return (mdn_invalid_encoding); \ - if ((x = BRACE_RBASE32(*from++)) < 0) \ - return (mdn_invalid_encoding); \ - bitbuf = (bitbuf << 5) | x; \ - bitlen += 5; \ - } \ - } while (0) -#define EXTRACT_BITS(n) \ - (bitlen -= (n), ((bitbuf >> bitlen) & ((1<<(n)) - 1))) - - READ_BITS(2); - switch (EXTRACT_BITS(2)) { - case 0: - encoding_style = half_row_style; - READ_BITS(9); - row = EXTRACT_BITS(9) << 7; - break; - case 1: - encoding_style = full_row_style; - READ_BITS(8); - row = EXTRACT_BITS(8) << 8; - break; - case 2: - encoding_style = mixed_style; - READ_BITS(9); - row = EXTRACT_BITS(9) << 7; - break; - case 3: - encoding_style = no_row_style; - row = 0; /* to keep lint happy */ - break; - default: - FATAL(("brace_decode_utf16: internal error\n")); - abort(); - return (mdn_failure); /* to keep lint happy */ - } - - i = 0; - literal_mode = 0; - while (fromlen > 0) { - int c = *from; /* peek */ - - if (c == '-') { - if (fromlen > 0 && from[1] == '-') { - buf[i++] = '-'; - from += 2; - fromlen -= 2; - } else { - literal_mode = !literal_mode; - from++; - fromlen--; - } - } else if (literal_mode) { - buf[i++] = c; - from++; - fromlen--; - } else { - switch (encoding_style) { - case half_row_style: - READ_BITS(7); - buf[i++] = row | EXTRACT_BITS(7); - break; - case full_row_style: - READ_BITS(8); - buf[i++] = row | EXTRACT_BITS(8); - break; - case mixed_style: - READ_BITS(2); - if (EXTRACT_BITS(1)) { - if (EXTRACT_BITS(1)) { - READ_BITS(16); - buf[i++] = EXTRACT_BITS(16); - } else { - READ_BITS(7); - buf[i++] = (row ^ 0x80) | - EXTRACT_BITS(7); - } - } else { - READ_BITS(7); - buf[i++] = row | EXTRACT_BITS(7); - } - break; - case no_row_style: - READ_BITS(16); - buf[i++] = EXTRACT_BITS(16); - break; - } - } - } - - if (bitlen > 4) - return (mdn_invalid_encoding); - - *lenp = i; - return (mdn_success); -#undef READ_BITS -#undef EXTRACT_BITS -} - -static mdn_result_t -brace_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[BRACE_BUF_SIZE]; /* UTF-16 */ - unsigned short row; - mdn_result_t r; - size_t buflen, len; - int encoding_style; - - /* - * Convert to UTF-16. - */ - buf = local_buf; - buflen = BRACE_BUF_SIZE; - for (;;) { - r = mdn_util_utf8toutf16(from, fromlen, - buf, buflen, &len); - if (r == mdn_buffer_overflow) { - buflen *= 2; - if (buf == local_buf) - buf = malloc(sizeof(*buf) * buflen); - else - buf = realloc(buf, sizeof(*buf) * buflen); - if (buf == NULL) - return (mdn_nomemory); - } else if (r == mdn_success) { - break; - } else { - goto finish; - } - } - - /* - * Now 'buf' contains UTF-16 encoded string consisting of - * 'len' characters. - */ - - /* - * Choose encoding style. - */ - r = get_encoding_style(buf, len, &encoding_style, &row); - if (r != mdn_success) - goto finish; - - r = brace_encode_utf16(buf, len, to, tolen, encoding_style, row); - -finish: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -brace_encode_utf16(const unsigned short *p, size_t len, - char *to, size_t tolen, - int encoding_style, unsigned short row) -{ - unsigned long bitbuf = 0; /* bit stream buffer */ - char *save_to; - int bitlen = 0; /* # of bits in 'bitbuf' */ - int nonhyphen; - int i; - -#define FLUSH_BITS_1(p) \ - do { \ - int x = (bitbuf >> (bitlen - 5)) & 0x1f; \ - bitlen -= 5; \ - *p = BRACE_BASE32(x); \ - } while (0) -#define FLUSH_BITS \ - do { \ - while (bitlen >= 5) { \ - if (tolen < 1) \ - return (mdn_buffer_overflow); \ - FLUSH_BITS_1(to); \ - to++, tolen--; \ - } \ - } while (0) -#define PUT(c) \ - do { \ - if (tolen-- < 1) \ - return (mdn_buffer_overflow); \ - *to++ = c; \ - } while (0) - - switch (encoding_style) { - case half_row_style: - /* 00xxxxxxxxx */ - bitbuf = row >> 7; - bitlen = 2 + 9; - break; - case full_row_style: - /* 01xxxxxxxx */ - bitbuf = (1 << 8) | (row >> 8); - bitlen = 2 + 8; - break; - case mixed_style: - /* 10xxxxxxxxx */ - bitbuf = (1 << 10) | (row >> 7); - bitlen = 2 + 9; - break; - case no_row_style: - /* 11 */ - bitbuf = 3; - bitlen = 2; - break; - default: - FATAL(("brace_compress_encode: internal error " - "invalid encoding_style\n")); - abort(); - break; - } - - FLUSH_BITS; - - if (bitlen > 0) { - save_to = to++; - if (tolen-- < 1) - return (mdn_buffer_overflow); - } else { - save_to = NULL; - } - - nonhyphen = 0; - for (i = 0; i < len; i++) { - if (p[i] == 0x2d) { - PUT('-'); - PUT('-'); - } else if (IS_LDH(p[i])) { - if (!nonhyphen) - PUT('-'); - PUT(p[i]); - nonhyphen = 1; - } else { - if (nonhyphen) { - PUT('-'); - } - nonhyphen = 0; - switch (encoding_style) { - case half_row_style: - bitlen += 7; - bitbuf = (bitbuf << 7) | (p[i] & 0x7f); - break; - case full_row_style: - bitlen += 8; - bitbuf = (bitbuf << 8) | (p[i] & 0xff); - break; - case mixed_style: - if ((p[i] & 0xff80) == row) { - bitlen += 8; - bitbuf = (bitbuf << 8) | (p[i] & 0x7f); - } else if ((p[i] & 0xff80) == (row ^ 0x80)) { - bitlen += 9; - bitbuf = (bitbuf << 9) | (1 << 8) | - (p[i] & 0x7f); - } else { - bitlen += 18; - bitbuf = (bitbuf << 18) | (3 << 16) | - p[i]; - } - break; - case no_row_style: - bitlen += 16; - bitbuf = (bitbuf << 16) | p[i]; - break; - } - if (save_to != NULL) - FLUSH_BITS_1(save_to); - FLUSH_BITS; - if (bitlen > 0) { - save_to = to++; - if (tolen-- < 1) - return (mdn_buffer_overflow); - } else { - save_to = NULL; - } - } - } - if (bitlen > 0) { - assert(save_to != NULL && bitlen < 5); - bitbuf <<= 5 - bitlen; - bitlen = 5; - FLUSH_BITS_1(save_to); - } - - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -#undef FLUSH_BITS_1 -#undef FLUSH_BITS -#undef PUT -} - -static mdn_result_t -get_encoding_style(unsigned short *p, size_t len, - int *stylep, unsigned short *rowp) -{ - struct row { - unsigned short upper; - unsigned short num; - unsigned short cmpl; - } *row_cands, row_cands_buf[64]; /* usually 64 is enough */ - int cands_size = 64; - int num_cands = 0; - int num_nonldh = 0; - int style = no_row_style; /* to keep lint happy */ - int best; - int m, m_prime; - int i, j; - - row_cands = row_cands_buf; - - for (i = 0; i < len; i++) { - unsigned int upper; - - /* Ignore LDH characters. */ - if (IS_LDH(p[i])) - continue; - - num_nonldh++; - upper = p[i] & 0xff80; /* upper 9bits */ - - for (j = 0; j < num_cands; j++) { - if (upper == row_cands[j].upper) { - row_cands[j].num++; - goto found; - } - } - if (num_cands >= cands_size) { - /* Make the row buffer bigger. */ - cands_size *= 2; - if (row_cands == row_cands_buf) - row_cands = malloc(sizeof(struct row) * - cands_size); - else - row_cands = realloc(row_cands, - sizeof(struct row) * - cands_size); - if (row_cands == NULL) - return (mdn_nomemory); - } - row_cands[num_cands].upper = upper; - row_cands[num_cands].num = 1; - row_cands[num_cands].cmpl = 0; - num_cands++; - found: - ; - } - - if (num_cands == 0) { - /* - * There is no non-LDH characters. Draft is not clear on - * this case, but the sample implementation uses no-row style. - */ - style = no_row_style; - goto ret; - } - if (num_cands == 1) { - /* - * Choose half-row style. - */ - *rowp = row_cands[0].upper; - style = half_row_style; - goto ret; - } - if (num_cands == 2 && - (row_cands[0].upper ^ row_cands[1].upper) == 0x80) { - /* - * All the non-LDH characters are in the same row. - * Choose full-row style. - */ - *rowp = row_cands[0].upper & ~0x80; - style = full_row_style; - goto ret; - } - - /* - * Get the number of characters in the complementary half-row. - */ - for (i = 1; i < num_cands; i++) { - unsigned int upper = row_cands[i].upper; - - for (j = 0; j < i; j++) { - if ((row_cands[j].upper ^ upper) == 0x80) { - row_cands[i].cmpl = row_cands[j].num; - row_cands[j].cmpl = row_cands[i].num; - break; - } - } - } - - /* - * Choose the best M. - */ -#define M(i) \ - (3 + (num_nonldh * 18 - row_cands[i].num * 10 - row_cands[i].cmpl * 9) / 5) - for (best = 0, m = M(0), i = 1; i < num_cands; i++) { - int m_i = M(i); - if (m_i < m || - (m_i == m && row_cands[i].upper < row_cands[best].upper)) { - best = i; - m = m_i; - } - } -#undef M - m_prime = (6 + num_nonldh * 16) / 5; - if (m_prime <= m) { - style = no_row_style; - } else { - *rowp = row_cands[best].upper; - style = mixed_style; - } - ret: - if (row_cands != row_cands_buf) - free(row_cands); - *stylep = style; - return (mdn_success); -} - -static int -brace_rbase32(int c) { - if ('A' <= c && c <= 'Z') - c = 'a' + (c - 'A'); - if ('2' <= c && c <= '9') - return (c - '2'); - else if ('a' <= c && c <= 'k') - return (c - 'a' + 8); - else if ('m' <= c && c <= 'n') - return (c - 'm' + 19); - else if ('p' <= c && c <= 'z') - return (c - 'p' + 21); - else - return (-1); -} diff --git a/contrib/idn/mdnkit/lib/checker.c b/contrib/idn/mdnkit/lib/checker.c deleted file mode 100644 index 6c23430a40..0000000000 --- a/contrib/idn/mdnkit/lib/checker.c +++ /dev/null @@ -1,553 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: checker.c,v 1.2 2002/02/08 05:40:00 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* - * Type for checking scheme. - */ -typedef struct { - char *prefix; - char *parameter; - mdn_checker_createproc_t create; - mdn_checker_destroyproc_t destroy; - mdn_checker_lookupproc_t lookup; - void *context; -} check_scheme_t; - -/* - * Standard checking schemes. - */ -static const check_scheme_t nameprep_03_prohibit_scheme = { - "prohibit#nameprep-03", - "nameprep-03", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_prohibitproc, - NULL, -}; - -static const check_scheme_t nameprep_03_unasigned_scheme = { - "unassigned#nameprep-03", - "nameprep-03", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_unassignedproc, - NULL, -}; - -static const check_scheme_t nameprep_05_prohibit_scheme = { - "prohibit#nameprep-05", - "nameprep-05", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_prohibitproc, - NULL, -}; - -static const check_scheme_t nameprep_05_unasigned_scheme = { - "unassigned#nameprep-05", - "nameprep-05", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_unassignedproc, - NULL, -}; - -static const check_scheme_t nameprep_06_prohibit_scheme = { - "prohibit#nameprep-06", - "nameprep-06", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_prohibitproc, - NULL, -}; - -static const check_scheme_t nameprep_06_unasigned_scheme = { - "unassigned#nameprep-06", - "nameprep-06", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_unassignedproc, - NULL, -}; - -static const check_scheme_t filecheck_prohibit_scheme = { - "prohibit#fileset", - NULL, - mdn__filechecker_createproc, - mdn__filechecker_destroyproc, - mdn__filechecker_lookupproc, - NULL, -}; - -static const check_scheme_t filecheck_unassigned_scheme = { - "unassigned#fileset", - NULL, - mdn__filechecker_createproc, - mdn__filechecker_destroyproc, - mdn__filechecker_lookupproc, - NULL, -}; - -static const check_scheme_t *standard_check_schemes[] = { - &nameprep_03_unasigned_scheme, - &nameprep_03_prohibit_scheme, - &nameprep_05_unasigned_scheme, - &nameprep_05_prohibit_scheme, - &nameprep_06_unasigned_scheme, - &nameprep_06_prohibit_scheme, - &filecheck_prohibit_scheme, - &filecheck_unassigned_scheme, - NULL, -}; - -/* - * Hash table for checking schemes. - */ -static mdn_strhash_t scheme_hash = NULL; - -/* - * Mapper object type. - */ -struct mdn_checker { - int nschemes; - int scheme_size; - check_scheme_t *schemes; - int reference_count; -}; - -#define MAPPER_INITIAL_SCHEME_SIZE 1 - -mdn_result_t -mdn_checker_initialize(void) { - mdn_result_t r; - check_scheme_t **scheme; - - TRACE(("mdn_checker_initialize()\n")); - - if (scheme_hash != NULL) - return (mdn_success); /* already initialized */ - - r = mdn_strhash_create(&scheme_hash); - if (r != mdn_success) { - WARNING(("mdn_checker_initialize: " - "hash table creation failed\n")); - goto failure; - } - - for (scheme = (check_scheme_t **)standard_check_schemes; - *scheme != NULL; scheme++) { - r = mdn_strhash_put(scheme_hash, (*scheme)->prefix, *scheme); - if (r != mdn_success) { - WARNING(("mdn_checker_initialize: " - "hash table creation failed\n")); - goto failure; - } - } - - return (mdn_success); - -failure: - if (scheme_hash != NULL) { - mdn_strhash_destroy(scheme_hash, NULL); - scheme_hash = NULL; - } - return (r); -} - -mdn_result_t -mdn_checker_create(mdn_checker_t *ctxp) { - mdn_checker_t ctx = NULL; - mdn_result_t r; - - assert(scheme_hash != NULL); - assert(ctxp != NULL); - - TRACE(("mdn_checker_create()\n")); - - ctx = (mdn_checker_t) malloc(sizeof(struct mdn_checker)); - if (ctx == NULL) { - WARNING(("mdn_checker_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->schemes = (check_scheme_t *) malloc(sizeof(check_scheme_t) - * MAPPER_INITIAL_SCHEME_SIZE); - if (ctx->schemes == NULL) { - WARNING(("mdn_checker_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->nschemes = 0; - ctx->scheme_size = MAPPER_INITIAL_SCHEME_SIZE; - ctx->reference_count = 1; - *ctxp = ctx; - - return (mdn_success); - -failure: - if (ctx != NULL) - free(ctx->schemes); - free(ctx); - return (r); -} - -void -mdn_checker_destroy(mdn_checker_t ctx) { - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL); - - TRACE(("mdn_checker_destroy()\n")); - TRACE(("mdn_checker_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_checker_destroy: the object is destroyed\n")); - for (i = 0; i < ctx->nschemes; i++) - ctx->schemes[i].destroy(ctx->schemes[i].context); - free(ctx->schemes); - free(ctx); - } -} - -void -mdn_checker_incrref(mdn_checker_t ctx) { - assert(ctx != NULL && scheme_hash != NULL); - - TRACE(("mdn_checker_incrref()\n")); - TRACE(("mdn_checker_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_result_t -mdn_checker_add(mdn_checker_t ctx, const char *scheme_name) { - mdn_result_t r; - check_scheme_t *scheme; - const char *scheme_prefix; - const char *scheme_parameter; - void *scheme_context = NULL; - char static_buffer[128]; /* large enough */ - char *buffer = static_buffer; - - assert(scheme_hash != NULL); - assert(ctx != NULL); - - TRACE(("mdn_checker_add(scheme_name=%s)\n", - mdn_debug_xstring(scheme_name, 20))); - - /* - * Split `scheme_name' into `scheme_prefix' and `scheme_parameter'. - */ - scheme_parameter = strchr(scheme_name, ':'); - if (scheme_parameter == NULL) { - scheme_prefix = scheme_name; - scheme_parameter = NULL; - } else { - ptrdiff_t scheme_prefixlen; - - scheme_prefixlen = scheme_parameter - scheme_name; - if (scheme_prefixlen + 1 > sizeof(static_buffer)) { - buffer = (char *) malloc(scheme_prefixlen + 1); - if (buffer == NULL) { - r = mdn_nomemory; - goto failure; - } - } - memcpy(buffer, scheme_name, scheme_prefixlen); - *(buffer + scheme_prefixlen) = '\0'; - scheme_prefix = buffer; - scheme_parameter++; - } - - /* - * Find a scheme. - */ - if (mdn_strhash_get(scheme_hash, scheme_prefix, (void **)&scheme) - != mdn_success) { - WARNING(("mdn_checker_add: invalid scheme %s\n", - scheme_name)); - r = mdn_invalid_name; - goto failure; - } - if (scheme_parameter == NULL && scheme->parameter != NULL) - scheme_parameter = scheme->parameter; - - /* - * Add the scheme. - */ - assert(ctx->nschemes <= ctx->scheme_size); - - if (ctx->nschemes == ctx->scheme_size) { - check_scheme_t *new_schemes; - - new_schemes = (check_scheme_t *) realloc(ctx->schemes, - sizeof(check_scheme_t) * ctx->scheme_size * 2); - if (new_schemes == NULL) { - WARNING(("mdn_checker_add: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - ctx->schemes = new_schemes; - ctx->scheme_size *= 2; - } - - r = scheme->create(scheme_parameter, &scheme_context); - if (r != mdn_success) - goto failure; - - memcpy(ctx->schemes + ctx->nschemes, scheme, sizeof(check_scheme_t)); - ctx->schemes[ctx->nschemes].context = scheme_context; - ctx->nschemes++; - - if (buffer != static_buffer) - free(buffer); - - return (mdn_success); - -failure: - if (buffer != static_buffer) - free(buffer); - free(scheme_context); - return (r); -} - -mdn_result_t -mdn_checker_addall(mdn_checker_t ctx, const char **scheme_names, - int nschemes) { - mdn_result_t r; - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL && scheme_names != NULL); - - TRACE(("mdn_checker_addall(nschemes=%d)\n", nschemes)); - - for (i = 0; i < nschemes; i++) { - r = mdn_checker_add(ctx, (const char *)*scheme_names); - if (r != mdn_success) - return (r); - scheme_names++; - } - - return (mdn_success); -} - -mdn_result_t -mdn_checker_lookup(mdn_checker_t ctx, const char *utf8, const char **found) { - mdn_result_t r; - const char *p; - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL && utf8 != NULL && found != NULL); - - TRACE(("mdn_checker_lookup(utf8=\"%s\")\n", - mdn_debug_xstring(utf8, 20))); - - /* - * Lookup. - */ - for (i = 0; i < ctx->nschemes; i++) { - for (p = utf8; *p != '\0'; p = *found + 1) { - r = (ctx->schemes[i].lookup)(ctx->schemes[i].context, - p, found); - if (r != mdn_success) - return (r); - else if (*found == NULL) - break; - else if (**found != '.') - return (mdn_success); - } - } - - *found = NULL; - - return (mdn_success); -} - -mdn_result_t -mdn_checker_register(const char *prefix, - mdn_checker_createproc_t create, - mdn_checker_destroyproc_t destroy, - mdn_checker_lookupproc_t lookup) { - mdn_result_t r; - check_scheme_t *scheme = NULL; - - assert(scheme_hash != NULL); - assert(prefix != NULL && create != NULL && destroy != NULL && - lookup != NULL); - - TRACE(("mdn_checker_register(prefix=%s)\n", prefix)); - - scheme = (check_scheme_t *) malloc(sizeof(check_scheme_t)); - if (scheme == NULL) { - WARNING(("mdn_checker_register: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - scheme->prefix = (char *) malloc(strlen(prefix) + 1); - if (scheme->prefix == NULL) { - WARNING(("mdn_checker_register: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - strcpy(scheme->prefix, prefix); - scheme->parameter = NULL; - scheme->create = create; - scheme->destroy = destroy; - scheme->lookup = lookup; - - r = mdn_strhash_put(scheme_hash, prefix, scheme); - if (r != mdn_success) - WARNING(("mdn_checker_register: registration failed\n")); - - return (r); - -failure: - if (scheme != NULL) - free(scheme->prefix); - free(scheme); - return (r); -} - -#ifdef TEST -#include - -/* - * Test program for this module. - * - * The test program repeatedly prompt you to input a command. The - * following command is currently recognized. - * - * add TLD add selectable check for TLD. (e.g. com, jp) - * DOMANNAME try checking DOMANNAME. - * - * Input EOF to exit. - */ -int -main(int ac, char **av) { - mdn_checker_t ctx; - char from[1024]; - char *found; - size_t fromlen; - mdn_result_t r; - - mdn_log_setlevel(mdn_log_level_trace); - mdn_checker_initialize(); - r = mdn_checker_create(&ctx); - if (r != mdn_success) { - fprintf(stderr, "mdn_checker_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - while (fgets(from, sizeof(from), stdin) != NULL) { - fromlen = strlen(from); - if (from[fromlen - 1] == '\n') - from[fromlen - 1] = '\0'; - if (from[0] == '\0') - continue; - - if (strncmp(from, "add ", 4) == 0) { - r = mdn_checker_add(ctx, from + 4); - if (r != mdn_success) { - fprintf(stderr, "mdn_checker_add: %s\n", - mdn_result_tostring(r)); - conitinue; - } - } else { - r = mdn_checker_lookup(ctx, from, &found); - if (r != mdn_success) { - fprintf(stderr, "mdn_checker_check: %s\n", - mdn_result_tostring(r)); - conitinue; - } - if (found != NULL) - fprintf(stderr, "->%s\n", found); - } - } - - mdn_checker_destroy(ctx); - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/converter.c b/contrib/idn/mdnkit/lib/converter.c deleted file mode 100644 index 3f9e70e222..0000000000 --- a/contrib/idn/mdnkit/lib/converter.c +++ /dev/null @@ -1,1223 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: converter.c,v 1.1 2002/01/02 02:46:40 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef MDN_EXTRA_ACE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif /* MDN_EXTRA_ACE */ - -#ifndef MDN_UTF8_ENCODING_NAME -#define MDN_UTF8_ENCODING_NAME "UTF-8" /* by IANA */ -#endif -#ifndef MDN_UTF6_ENCODING_NAME -#define MDN_UTF6_ENCODING_NAME "UTF-6" -#endif -#ifndef MDN_UTF5_ENCODING_NAME -#define MDN_UTF5_ENCODING_NAME "UTF-5" -#endif -#ifndef MDN_RACE_ENCODING_NAME -#define MDN_RACE_ENCODING_NAME "RACE" -#endif -#ifndef MDN_BRACE_ENCODING_NAME -#define MDN_BRACE_ENCODING_NAME "BRACE" -#endif -#ifndef MDN_LACE_ENCODING_NAME -#define MDN_LACE_ENCODING_NAME "LACE" -#endif -#ifndef MDN_DUDE_ENCODING_NAME -#define MDN_DUDE_ENCODING_NAME "DUDE" -#endif -#ifndef MDN_ALTDUDE_ENCODING_NAME -#define MDN_ALTDUDE_ENCODING_NAME "AltDUDE" -#endif -#ifndef MDN_AMCACEM_ENCODING_NAME -#define MDN_AMCACEM_ENCODING_NAME "AMC-ACE-M" -#endif -#ifndef MDN_AMCACEO_ENCODING_NAME -#define MDN_AMCACEO_ENCODING_NAME "AMC-ACE-O" -#endif -#ifndef MDN_AMCACER_ENCODING_NAME -#define MDN_AMCACER_ENCODING_NAME "AMC-ACE-R" -#endif -#ifndef MDN_AMCACEV_ENCODING_NAME -#define MDN_AMCACEV_ENCODING_NAME "AMC-ACE-V" -#endif -#ifndef MDN_AMCACEW_ENCODING_NAME -#define MDN_AMCACEW_ENCODING_NAME "AMC-ACE-W" -#endif -#ifndef MDN_AMCACEZ_ENCODING_NAME -#define MDN_AMCACEZ_ENCODING_NAME "AMC-ACE-Z" -#endif -#ifndef MDN_MACE_ENCODING_NAME -#define MDN_MACE_ENCODING_NAME "MACE" -#endif - -#define MAX_RECURSE 20 - -typedef struct { - mdn_converter_openproc_t open; - mdn_converter_closeproc_t close; - mdn_converter_convertproc_t convert; - int encoding_type; -} converter_ops_t; - -struct mdn_converter { - char *local_encoding_name; - converter_ops_t *ops; - int flags; - int opened[2]; - int reference_count; - void *private_data; -}; - -static mdn_strhash_t encoding_name_hash; -static mdn_strhash_t encoding_alias_hash; - -static mdn_result_t converter_open(mdn_converter_t ctx, - mdn_converter_dir_t dir); -static mdn_result_t converter_close(mdn_converter_t ctx, - mdn_converter_dir_t dir); -static mdn_result_t register_standard_encoding(void); -static const char *get_realname(const char *name); -static void free_alias_value(void *value); -static mdn_result_t roundtrip_check(mdn_converter_t ctx, - mdn_converter_dir_t dir, - const char *from, const char *to); - -static mdn_result_t converter_none_open(mdn_converter_t ctx, - mdn_converter_dir_t dir, - void **privdata); -static mdn_result_t converter_none_close(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir); -static mdn_result_t converter_none_convert(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir, - const char *from, - char *to, size_t tolen); -static mdn_result_t converter_iconv_open(mdn_converter_t ctx, - mdn_converter_dir_t dir, - void **privdata); -static mdn_result_t converter_iconv_close(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir); -static mdn_result_t converter_iconv_convert(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir, - const char *from, - char *to, size_t tolen); -#ifdef MDN_EXTRA_ACE -static mdn_result_t converter_utf5_open(mdn_converter_t ctx, - mdn_converter_dir_t dir, - void **privdata); -static mdn_result_t converter_utf5_close(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir); -static mdn_result_t converter_utf5_convert(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir, - const char *from, - char *to, size_t tolen); -#endif - -#ifdef DEBUG -static mdn_result_t converter_uescape_open(mdn_converter_t ctx, - mdn_converter_dir_t dir, - void **privdata); -static mdn_result_t converter_uescape_close(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir); -static mdn_result_t converter_uescape_convert(mdn_converter_t ctx, - void *privdata, - mdn_converter_dir_t dir, - const char *from, - char *to, size_t tolen); -#endif - -static converter_ops_t none_converter_ops = { - converter_none_open, - converter_none_close, - converter_none_convert, - MDN_NONACE, -}; - -static converter_ops_t iconv_converter_ops = { - converter_iconv_open, - converter_iconv_close, - converter_iconv_convert, - MDN_NONACE, -}; - -/* - * Initialize. - */ - -mdn_result_t -mdn_converter_initialize(void) { - mdn_result_t r = mdn_success; - mdn_strhash_t hash; - - if (encoding_alias_hash == NULL) { - if ((r = mdn_strhash_create(&hash)) != mdn_success) - return (r); - encoding_alias_hash = hash; - } - if (encoding_name_hash == NULL) { - if ((r = mdn_strhash_create(&hash)) != mdn_success) - return (r); - encoding_name_hash = hash; - r = register_standard_encoding(); - } - return (r); -} - -mdn_result_t -mdn_converter_create(const char *name, mdn_converter_t *ctxp, int flags) { - const char *realname; - mdn_converter_t ctx; - mdn_result_t r; - void *v; - - assert(name != NULL && ctxp != NULL); - - TRACE(("mdn_converter_create(%s)\n", name)); - - realname = get_realname(name); -#ifdef DEBUG - if (strcmp(name, realname) != 0) { - TRACE(("mdn_converter_create: realname=%s\n", realname)); - } -#endif - - *ctxp = NULL; - - /* Allocate memory for a converter context and the name. */ - ctx = malloc(sizeof(struct mdn_converter) + strlen(realname) + 1); - if (ctx == NULL) { - WARNING(("mdn_converter_create: malloc failed\n")); - return (mdn_nomemory); - } - (void)memset(ctx, 0, sizeof(*ctx)); - ctx->local_encoding_name = (char *)(ctx + 1); - (void)strcpy(ctx->local_encoding_name, realname); - ctx->flags = flags; - ctx->reference_count = 1; - ctx->private_data = NULL; - - assert(encoding_name_hash != NULL); - - if (strcmp(realname, MDN_UTF8_ENCODING_NAME) == 0) { - /* No conversion needed */ - ctx->ops = &none_converter_ops; - } else if ((r = mdn_strhash_get(encoding_name_hash, realname, &v)) - == mdn_success) { - /* Special converter found */ - ctx->ops = (converter_ops_t *)v; - } else { - /* General case */ - ctx->ops = &iconv_converter_ops; - } - - if ((flags & MDN_CONVERTER_DELAYEDOPEN) == 0) { - mdn_result_t r; - - if ((r = converter_open(ctx, - mdn_converter_l2u)) != mdn_success) { - WARNING(("mdn_converter_create: open failed " - "(local->utf8)\n")); - return (r); - } - if ((r = converter_open(ctx, - mdn_converter_u2l)) != mdn_success) { - WARNING(("mdn_converter_create: open failed " - "(utf8->local)\n")); - return (r); - } - } - - *ctxp = ctx; - return (mdn_success); -} - -static mdn_result_t -converter_open(mdn_converter_t ctx, mdn_converter_dir_t dir) { - mdn_result_t st = mdn_success; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - if (!ctx->opened[dir]) { - st = (*ctx->ops->open)(ctx, dir, &(ctx->private_data)); - if (st == mdn_success) - ctx->opened[dir] = 1; - } - return (st); -} - -void -mdn_converter_destroy(mdn_converter_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_converter_destroy()\n")); - TRACE(("mdn_converter_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_converter_destroy: the object is destroyed\n")); - (void)converter_close(ctx, mdn_converter_l2u); - (void)converter_close(ctx, mdn_converter_u2l); - free(ctx); - } -} - -void -mdn_converter_incrref(mdn_converter_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_converter_incrref()\n")); - TRACE(("mdn_converter_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -static mdn_result_t -converter_close(mdn_converter_t ctx, mdn_converter_dir_t dir) { - mdn_result_t st = mdn_success; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - if (ctx->opened[dir]) { - st = (*ctx->ops->close)(ctx, ctx->private_data, dir); - if (st == mdn_success) - ctx->opened[dir] = 0; - } - return (st); -} - -char * -mdn_converter_localencoding(mdn_converter_t ctx) { - assert(ctx != NULL); - TRACE(("mdn_converter_localencoding()\n")); - return (ctx->local_encoding_name); -} - -int -mdn_converter_encodingtype(mdn_converter_t ctx) { - assert(ctx != NULL); - TRACE(("mdn_converter_encodingtype()\n")); - return (ctx->ops->encoding_type); -} - -int -mdn_converter_isasciicompatible(mdn_converter_t ctx) { - assert(ctx != NULL); - TRACE(("mdn_converter_isasciicompatible()\n")); - return (ctx->ops->encoding_type != MDN_NONACE); -} - -mdn_result_t -mdn_converter_convert(mdn_converter_t ctx, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn_converter_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - from == NULL ? "(null)" : mdn_debug_xstring(from, 20))); - - if (!ctx->opened[dir]) { - mdn_result_t st = converter_open(ctx, dir); - if (st != mdn_success) - return (st); - } - - if (from == NULL) { - /* for compatibility */ - INFO(("mdn_converter_convert: " - "obsolete feature (reset) invoked\n")); - return (mdn_success); - } - - r = (*ctx->ops->convert)(ctx, ctx->private_data, dir, from, to, tolen); - if (r == mdn_success && dir == mdn_converter_u2l && - (ctx->flags & MDN_CONVERTER_RTCHECK) != 0) { - return (roundtrip_check(ctx, dir, from, to)); - } - - return (r); -} - -/* - * Encoding registration. - */ - -mdn_result_t -mdn_converter_register(const char *name, - mdn_converter_openproc_t open, - mdn_converter_closeproc_t close, - mdn_converter_convertproc_t convert, - int encoding_type) { - converter_ops_t *ops; - mdn_result_t r; - - assert(name != NULL && open != NULL && close != NULL && - convert != NULL); - - TRACE(("mdn_converter_register(name=%s)\n", name)); - - if ((ops = malloc(sizeof(*ops))) == NULL) { - WARNING(("mdn_converter_register: malloc failed\n")); - return (mdn_nomemory); - } - ops->open = open; - ops->close = close; - ops->convert = convert; - ops->encoding_type = encoding_type; - - r = mdn_strhash_put(encoding_name_hash, name, ops); - if (r != mdn_success) - free(ops); - - return (r); -} - -static mdn_result_t -register_standard_encoding(void) { - mdn_result_t r; - - r = mdn_converter_register(MDN_AMCACEZ_ENCODING_NAME, - mdn__amcacez_open, - mdn__amcacez_close, - mdn__amcacez_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_RACE_ENCODING_NAME, - mdn__race_open, - mdn__race_close, - mdn__race_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_DUDE_ENCODING_NAME, - mdn__dude_open, - mdn__dude_close, - mdn__dude_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - -#ifdef MDN_EXTRA_ACE - r = mdn_converter_register(MDN_UTF5_ENCODING_NAME, - converter_utf5_open, - converter_utf5_close, - converter_utf5_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_BRACE_ENCODING_NAME, - mdn__brace_open, - mdn__brace_close, - mdn__brace_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_LACE_ENCODING_NAME, - mdn__lace_open, - mdn__lace_close, - mdn__lace_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_UTF6_ENCODING_NAME, - mdn__utf6_open, - mdn__utf6_close, - mdn__utf6_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_ALTDUDE_ENCODING_NAME, - mdn__altdude_open, - mdn__altdude_close, - mdn__altdude_convert, - MDN_ACE_LOOSECASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_AMCACEM_ENCODING_NAME, - mdn__amcacem_open, - mdn__amcacem_close, - mdn__amcacem_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_AMCACEO_ENCODING_NAME, - mdn__amcaceo_open, - mdn__amcaceo_close, - mdn__amcaceo_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_AMCACER_ENCODING_NAME, - mdn__amcacer_open, - mdn__amcacer_close, - mdn__amcacer_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_AMCACEV_ENCODING_NAME, - mdn__amcacev_open, - mdn__amcacev_close, - mdn__amcacev_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_AMCACEW_ENCODING_NAME, - mdn__amcacew_open, - mdn__amcacew_close, - mdn__amcacew_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); - - r = mdn_converter_register(MDN_MACE_ENCODING_NAME, - mdn__mace_open, - mdn__mace_close, - mdn__mace_convert, - MDN_ACE_STRICTCASE); - if (r != mdn_success) - return (r); -#endif /* MDN_EXTRA_ACE */ - -#ifdef DEBUG - /* This is convenient for debug. Not useful for other purposes. */ - r = mdn_converter_register("U-escape", - converter_uescape_open, - converter_uescape_close, - converter_uescape_convert, - MDN_NONACE); - if (r != mdn_success) - return (r); -#endif /* DEBUG */ - - return (r); -} - -/* - * Encoding alias support. - */ - -mdn_result_t -mdn_converter_addalias(const char *alias_name, const char *real_name) { - char *rn_copy; - - assert(alias_name != NULL && real_name != NULL); - - TRACE(("mdn_converter_addalias(alias_name=%s,real_name=%s)\n", - alias_name, real_name)); - - if (strcmp(alias_name, real_name) == 0) - return (mdn_success); - - if (encoding_alias_hash == NULL) { - WARNING(("mdn_converter_addalias: the module is not \n" - "initialized")); - return (mdn_failure); - } - - if ((rn_copy = malloc(strlen(real_name) + 1)) == NULL) { - WARNING(("mdn_converter_addalias: malloc failed\n")); - return (mdn_nomemory); - } - (void)strcpy(rn_copy, real_name); - (void)mdn_strhash_put(encoding_alias_hash, alias_name, rn_copy); - - return (mdn_success); -} - -mdn_result_t -mdn_converter_aliasfile(const char *path) { - FILE *fp; - int line_no; - mdn_result_t st = mdn_success; - char line[200], alias[200], real[200]; - - assert(path != NULL); - - TRACE(("mdn_converter_aliasfile(path=%s)\n", path)); - - if ((fp = fopen(path, "r")) == NULL) { - return (mdn_nofile); - } - for (line_no = 1; fgets(line, sizeof(line), fp) != NULL; line_no++) { - unsigned char *p = (unsigned char *)line; - - while (isascii(*p) && isspace(*p)) - p++; - if (*p == '#' || *p == '\n') - continue; - if (sscanf((char *)p, "%s %s", alias, real) == 2) { - st = mdn_converter_addalias(alias, real); - if (st != mdn_success) - break; - } else { - WARNING(("mdn_converter_aliasfile: file %s has " - "invalid contents at line %d\n", - path, line_no)); - st = mdn_invalid_syntax; - break; - } - } - fclose(fp); - return st; -} - -mdn_result_t -mdn_converter_resetalias(void) { - mdn_strhash_t hash; - mdn_result_t r; - - TRACE(("mdn_converter_resetalias()\n")); - - hash = encoding_alias_hash; - encoding_alias_hash = NULL; - mdn_strhash_destroy(hash, free_alias_value); - hash = NULL; - r = mdn_strhash_create(&hash); - encoding_alias_hash = hash; - return (r); -} - -static const char * -get_realname(const char *name) { - if (encoding_alias_hash != NULL) { - char *realname; - int recurse = 0; - - while (recurse < MAX_RECURSE) { - mdn_result_t r; - - r = mdn_strhash_get(encoding_alias_hash, - name, (void **)&realname); - if (r != mdn_success) - break; - - name = realname; - recurse++; - } - if (recurse >= MAX_RECURSE) { - WARNING(("mdn_converter: encoding alias table has " - "cyclic reference\n")); - } - } - return (name); -} - -static void -free_alias_value(void *value) { - free(value); -} - -/* - * Round trip check. - */ - -static mdn_result_t -roundtrip_check(mdn_converter_t ctx, mdn_converter_dir_t dir, - const char *from, const char *to) -{ - /* - * One problem with iconv() convertion is that - * iconv() doesn't signal an error if the input - * string contains characters which are valid but - * do not have mapping to the output codeset. - * (the behavior of iconv() for that case is defined as - * `implementation dependent') - * One way to check this case is to perform round-trip - * conversion and see if it is same as the original string. - */ - mdn_result_t r; - char *back_converted; - char buf[256]; - size_t len; - - TRACE(("mdn_converter_convert: round-trip checking (" - " from=\"%s\")\n", mdn_debug_xstring(from, 20))); - - /* Allocate enough buffer. */ - len = strlen(from) + 1; - if (len <= sizeof(buf)) { - back_converted = buf; - len = sizeof(buf); - } else { - back_converted = malloc(len); - if (back_converted == NULL) - return (mdn_nomemory); - } - - /* - * Perform backward conversion. - */ - if (dir == mdn_converter_l2u) - dir = mdn_converter_u2l; - else - dir = mdn_converter_l2u; - r = mdn_converter_convert(ctx, dir, to, back_converted, len); - - switch (r) { - case mdn_success: - if (strcmp(back_converted, from) != 0) - r = mdn_nomapping; - break; - case mdn_invalid_encoding: - case mdn_buffer_overflow: - r = mdn_nomapping; - break; - default: - break; - } - - if (back_converted != buf) - free(back_converted); - - if (r != mdn_success) { - TRACE(("round-trip check failed: %s\n", - mdn_result_tostring(r))); - } - - return (r); -} - -/* - * Identity conversion (or, no conversion at all). - */ - -/* ARGSUSED */ -static mdn_result_t -converter_none_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -static mdn_result_t -converter_none_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) { - return (mdn_success); -} - -static mdn_result_t -converter_none_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen) { - size_t fromlen; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - /* - * Just copying is not enough. We should at least check - * the validity of 'from'. - */ - if (!mdn_utf8_isvalidstring(from)) - return (mdn_invalid_encoding); - - fromlen = strlen(from) + 1; /* including NUL */ - if (fromlen > tolen) - return (mdn_buffer_overflow); - - (void)memcpy(to, from, fromlen); /* including NUL */ - return (mdn_success); -} - - -/* - * Conversion using iconv() interface. - */ - -static mdn_result_t -converter_iconv_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) { - iconv_t ictx; - - if (*privdata == NULL) { - ictx = (iconv_t)(-1); - *privdata = malloc(sizeof(iconv_t) * 2); - if (*privdata == NULL) - return (mdn_nomemory); - *((iconv_t *)*privdata) = (iconv_t)(-1); - *((iconv_t *)*privdata + 1) = (iconv_t)(-1); - } - - if (dir == mdn_converter_l2u) { - ictx = iconv_open(MDN_UTF8_ENCODING_NAME, - ctx->local_encoding_name); - } else { - ictx = iconv_open(ctx->local_encoding_name, - MDN_UTF8_ENCODING_NAME); - } - if (ictx == (iconv_t)(-1)) { - free(*privdata); - switch (errno) { - case ENOMEM: - return (mdn_nomemory); - case EINVAL: - return (mdn_invalid_name); - default: - WARNING(("iconv_open failed with errno %d\n", errno)); - return (mdn_failure); - } - } - - memcpy((iconv_t *)*privdata + dir, &ictx, sizeof(iconv_t)); - - return (mdn_success); -} - -static mdn_result_t -converter_iconv_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) { - iconv_t *ictxp; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - ictxp = (iconv_t *)privdata; - if (ictxp[dir] != (iconv_t)(-1)) - (void)iconv_close(ictxp[dir]); - ictxp[dir] = (iconv_t)(-1); - if (ictxp[mdn_converter_l2u] == (iconv_t)(-1) && - ictxp[mdn_converter_u2l] == (iconv_t)(-1)) { - free(privdata); - } - - return (mdn_success); -} - -static mdn_result_t -converter_iconv_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen) { - iconv_t ictx; - char *toorg = to; - size_t sz; - size_t fromsz; - size_t tosz; - char *p; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - if (tolen <= 0) - return (mdn_buffer_overflow); /* need space for NUL */ - - /* - * For utf-8 -> local conversion, check the validity of - * the input string. - */ - if (dir == mdn_converter_u2l && !mdn_utf8_isvalidstring(from)) { - WARNING(("mdn_converter_convert: " - "input is not a valid UTF-8 string\n")); - return (mdn_invalid_encoding); - } - - /* - * Reset internal state. - */ - ictx = ((iconv_t *)privdata)[dir]; -#if 0 - (void)iconv(ictx, (const char **)NULL, (size_t *)NULL, - (char **)NULL, (size_t *)NULL); -#else - /* - * Above code should work according to the spec, but causes - * segmentation fault with Solaris 2.6. - * So.. a work-around. - */ - fromsz = tosz = 0; - p = NULL; - (void)iconv(ictx, (const char **)NULL, &fromsz, &p, &tosz); -#endif - - fromsz = strlen(from); - tosz = tolen - 1; /* reserve space for terminating NUL */ - sz = iconv(ictx, &from, &fromsz, &to, &tosz); - - if (sz == (size_t)(-1) || fromsz > 0) { - switch (errno) { - case EILSEQ: - case EINVAL: - if (dir == mdn_converter_u2l) { - /* - * We already checked the validity of the - * input string. So we assume a mapping - * error. - */ - return (mdn_nomapping); - } else { - /* - * We assume all the characters in the local - * codeset are included in UCS. This means - * mapping error is not possible, so the - * input string must have some problem. - */ - return (mdn_invalid_encoding); - } - case E2BIG: - return (mdn_buffer_overflow); - default: - WARNING(("iconv failed with errno %d\n", errno)); - return (mdn_failure); - } - } - - if (dir == mdn_converter_l2u) { - /* - * For local -> utf-8 conversion, check the validity of the - * output string. - */ - *to = '\0'; - if (!mdn_utf8_isvalidstring(toorg)) { - WARNING(("mdn_converter_convert: " - "output is not a valid UTF-8 string\n")); - return (mdn_invalid_encoding); - } - } else { - /* - * For utf-8 -> local conversion, append a sequence of - * state reset. - */ - fromsz = 0; - sz = iconv(ictx, (const char **)NULL, &fromsz, &to, &tosz); - if (sz == (size_t)(-1)) { - switch (errno) { - case EILSEQ: - case EINVAL: - return (mdn_invalid_encoding); - case E2BIG: - return (mdn_buffer_overflow); - default: - WARNING(("iconv failed with errno %d\n", - errno)); - return (mdn_failure); - } - } - *to = '\0'; - } - - return (mdn_success); -} - -/* - * Conversion to/from UTF-5. - */ - -#ifdef MDN_EXTRA_ACE - -/* ARGSUSED */ -static mdn_result_t -converter_utf5_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -static mdn_result_t -converter_utf5_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) { - return (mdn_success); -} - -static mdn_result_t -converter_utf5_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen) { - size_t fromlen = strlen(from); - - if (dir == mdn_converter_l2u) { - unsigned long v; - int flen, tlen; - - while (fromlen > 0) { - flen = mdn_utf5_getwc(from, fromlen, &v); - if (flen == 0) { - WARNING(("mdn_converter_convert: " - "invalid character\n")); - return (mdn_invalid_encoding); - } - from += flen; - fromlen -= flen; - - tlen = mdn_utf8_putwc(to, tolen, v); - if (tlen == 0) - goto overflow; - to += tlen; - tolen -= tlen; - } - } else { /* mdn_converter_u2l */ - unsigned long v; - int flen, tlen; - - while (fromlen > 0) { - flen = mdn_utf8_getwc(from, fromlen, &v); - if (flen == 0) { - WARNING(("mdn_converter_convert: " - "invalid character\n")); - return (mdn_invalid_encoding); - } - from += flen; - fromlen -= flen; - - tlen = mdn_utf5_putwc(to, tolen, v); - if (tlen == 0) - goto overflow; - to += tlen; - tolen -= tlen; - } - } - if (tolen <= 0) - goto overflow; - - *to = '\0'; - return (mdn_success); - -overflow: - WARNING(("mdn_converter_convert: buffer overflow\n")); - return (mdn_buffer_overflow); -} - -#endif - -#ifdef DEBUG -/* - * Conversion to/from unicode escape string. - * Arbitrary UCS-4 character can be specified by a special sequence - * \u{XXXXXX} - * where XXXXX denotes any hexadecimal string up to FFFFFFFF. - * This is designed for debugging. - */ - -static int uescape_getwc(const char *from, size_t fromlen, - unsigned long *vp); -static int uescape_putwc(char *to, size_t tolen, unsigned long v); - -/* ARGSUSED */ -static mdn_result_t -converter_uescape_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -static mdn_result_t -converter_uescape_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) { - return (mdn_success); -} - -static mdn_result_t -converter_uescape_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, const char *from, char *to, - size_t tolen) -{ - size_t fromlen = strlen(from); - - if (dir == mdn_converter_l2u) { - unsigned long v; - int flen, tlen; - - while (fromlen > 0) { - flen = uescape_getwc(from, fromlen, &v); - if (flen == 0) { - WARNING(("mdn_converter_convert: " - "invalid character\n")); - return (mdn_invalid_encoding); - } - from += flen; - fromlen -= flen; - - tlen = mdn_utf8_putwc(to, tolen, v); - if (tlen == 0) - goto overflow; - to += tlen; - tolen -= tlen; - } - } else { /* mdn_converter_u2l */ - unsigned long v; - int flen, tlen; - - while (fromlen > 0) { - flen = mdn_utf8_getwc(from, fromlen, &v); - if (flen == 0) { - WARNING(("mdn_converter_convert: " - "invalid character\n")); - return (mdn_invalid_encoding); - } - from += flen; - fromlen -= flen; - - tlen = uescape_putwc(to, tolen, v); - if (tlen == 0) - goto overflow; - to += tlen; - tolen -= tlen; - } - } - if (tolen <= 0) - goto overflow; - - *to = '\0'; - return (mdn_success); - -overflow: - WARNING(("mdn_converter_convert: buffer overflow\n")); - return (mdn_buffer_overflow); -} - -static int -uescape_getwc(const char *from, size_t fromlen, unsigned long *vp) { - char *end; - if (fromlen >= 4 && strncmp(from, "\\u{", 3) == 0 && - (end = memchr(from, '}', fromlen)) != NULL && - end - from <= 3 + 8) { /* '\u{' + 'xxxxxxxx' */ - int len = end - from - 3; - char tmp[9]; - - (void)memcpy(tmp, from + 3, len); - tmp[len] = '\0'; - *vp = strtoul(tmp, NULL, 16); - return (end + 1 - from); - } else if (fromlen > 0) { - *vp = (unsigned char)from[0]; - return (1); - } else { - return (0); - } -} - -static int -uescape_putwc(char *to, size_t tolen, unsigned long v) { - if (v <= 0x7f) { - if (tolen < 1) - return (0); - *to = v; - return (1); - } else if (v <= 0xffffffff) { - char tmp[20]; - int len; - - (void)sprintf(tmp, "\\u{%lx}", v); - len = strlen(tmp); - if (tolen < len) - return (0); - (void)memcpy(to, tmp, len); - return (len); - } else { - return (0); - } -} -#endif diff --git a/contrib/idn/mdnkit/lib/debug.c b/contrib/idn/mdnkit/lib/debug.c deleted file mode 100644 index b0928bb0df..0000000000 --- a/contrib/idn/mdnkit/lib/debug.c +++ /dev/null @@ -1,180 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: debug.c,v 1.1 2002/01/02 02:46:40 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include - -static char *hex = "0123456789abcdef"; - -char * -mdn_debug_hexstring(const char *s, int maxbytes) { - int i; - char *p; - static char buf[256 * 3 + 3 + 1]; /* +3 for "..." */ - - if (maxbytes > 256) - maxbytes = 256; - - for (i = 0, p = buf; i < maxbytes; i++) { - int c = ((unsigned char *)s)[i]; - - if (c == '\0') - break; - *p++ = hex[c >> 4]; - *p++ = hex[c & 15]; - *p++ = ' '; - } - - if (i >= maxbytes) - (void)strcpy(p, "..."); - else - *p = '\0'; - - return (buf); -} - -char * -mdn_debug_xstring(const char *s, int maxbytes) { - int i; - char *p; - static char buf[256 * 4 + 3 + 1]; /* +3 for "..." */ - - if (maxbytes > 256) - maxbytes = 256; - - for (i = 0, p = buf; i < maxbytes; i++) { - int c = ((unsigned char *)s)[i]; - - if (c == '\0') { - break; - } else if (c < 0x20 || c > 0x7e) { - *p++ = '\\'; - *p++ = 'x'; - *p++ = hex[c >> 4]; - *p++ = hex[c & 15]; - } else { - *p++ = c; - } - } - - if (i >= maxbytes) - (void)strcpy(p, "..."); - else - *p = '\0'; - - return (buf); -} - -char * -mdn_debug_hexdata(const char *s, int length, int maxlength) { - int i; - const unsigned char *p = (const unsigned char *)s; - char *q; - static char buf[256 * 3 + 3 + 1]; /* +3 for "..." */ - char *cont = NULL; - - if (maxlength > 256) - maxlength = 256; - - if (length > maxlength) { - length = maxlength; - cont = "..."; - } - - for (i = 0, q = buf; i < length; i++) { - int c = p[i]; - - *q++ = hex[c >> 4]; - *q++ = hex[c & 15]; - *q++ = ' '; - } - - if (cont != NULL) - (void)strcpy(q, "..."); - else - *q = '\0'; - - return (buf); -} - -void -mdn_debug_hexdump(const char *s, int length) { - int i; - const unsigned char *p = (const unsigned char *)s; - - i = 0; - while (length-- > 0) { - if (i % 16 == 0) { - if (i > 0) - fprintf(stderr, "\n"); - fprintf(stderr, "%4x:", i); - } - fprintf(stderr, " %02x", p[i]); - i++; - } - fprintf(stderr, "\n"); -} diff --git a/contrib/idn/mdnkit/lib/delimitermap.c b/contrib/idn/mdnkit/lib/delimitermap.c deleted file mode 100644 index 69a9433c94..0000000000 --- a/contrib/idn/mdnkit/lib/delimitermap.c +++ /dev/null @@ -1,360 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: delimitermap.c,v 1.2 2002/02/08 05:40:04 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -/* - * Mapper object type. - */ -struct mdn_delimitermap { - int ndelimiters; - int delimiter_size; - unsigned long *delimiters; - int reference_count; -}; - -#define DELIMITERMAP_INITIAL_DELIMITER_SIZE 4 - -mdn_result_t -mdn_delimitermap_create(mdn_delimitermap_t *ctxp) { - mdn_delimitermap_t ctx = NULL; - mdn_result_t r; - - assert(ctxp != NULL); - TRACE(("mdn_delimitermap_create()\n")); - - ctx = (mdn_delimitermap_t) malloc(sizeof(struct mdn_delimitermap)); - if (ctx == NULL) { - WARNING(("mdn_mapper_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->delimiters = (unsigned long *) malloc(sizeof(unsigned long) - * DELIMITERMAP_INITIAL_DELIMITER_SIZE); - if (ctx->delimiters == NULL) { - WARNING(("mdn_delimitermap_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - ctx->ndelimiters = 0; - ctx->delimiter_size = DELIMITERMAP_INITIAL_DELIMITER_SIZE; - ctx->reference_count = 1; - *ctxp = ctx; - - return (mdn_success); - -failure: - free(ctx); - return (r); -} - -void -mdn_delimitermap_destroy(mdn_delimitermap_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_delimitermap_destroy()\n")); - TRACE(("mdn_delimitermap_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_mapper_destroy: the object is destroyed\n")); - free(ctx->delimiters); - free(ctx); - } -} - -void -mdn_delimitermap_incrref(mdn_delimitermap_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_delimitermap_incrref()\n")); - TRACE(("mdn_delimitermap_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_result_t -mdn_delimitermap_add(mdn_delimitermap_t ctx, unsigned long delimiter) { - mdn_result_t r; - - assert(ctx != NULL && ctx->ndelimiters <= ctx->delimiter_size); - TRACE(("mdn_delimitermap_add(delimiter=%lX)\n", delimiter)); - - if (ctx->ndelimiters == ctx->delimiter_size) { - unsigned long *new_delimiters; - - new_delimiters = (unsigned long *) realloc(ctx->delimiters, - sizeof(unsigned long) * ctx->delimiter_size * 2); - if (new_delimiters == NULL) { - WARNING(("mdn_checker_add: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - ctx->delimiters = new_delimiters; - ctx->delimiter_size *= 2; - } - - ctx->delimiters[ctx->ndelimiters] = delimiter; - ctx->ndelimiters++; - - return (mdn_success); - -failure: - if (ctx != NULL) - free(ctx->delimiters); - free(ctx); - return (r); -} - -mdn_result_t -mdn_delimitermap_addall(mdn_delimitermap_t ctx, unsigned long *delimiters, - int ndelimiters) { - mdn_result_t r; - int i; - - assert(ctx != NULL && delimiters != NULL); - - TRACE(("mdn_delimitermap_addall(ndelimiters=%d)\n", ndelimiters)); - - for (i = 0; i < ndelimiters; i++) { - r = mdn_delimitermap_add(ctx, *delimiters); - if (r != mdn_success) - return (r); - delimiters++; - } - - return (mdn_success); -} - -mdn_result_t -mdn_delimitermap_map(mdn_delimitermap_t ctx, const char *from, char *to, - size_t tolen) { - size_t fromlen; - size_t mblen; - unsigned long wc; - int i, j; - - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn_delimitermap_map(from=\"%s\")\n", - mdn_debug_xstring(from, 20))); - - fromlen = strlen(from); - - /* - * Copy the string if no delimiter is added. - */ - if (ctx->ndelimiters == 0) { - if (fromlen + 1 > tolen) - return (mdn_buffer_overflow); - memcpy(to, from, fromlen + 1); - return (mdn_success); - } - - /* - * Map. - */ - while (fromlen > 0) { - mblen = mdn_utf8_getwc(from, fromlen, &wc); - if (mblen == 0) - return (mdn_invalid_encoding); - - for (i = 0; i < ctx->ndelimiters; i++) { - if (ctx->delimiters[i] == wc) - break; - } - if (i < ctx->ndelimiters) { - if (tolen < 1) - return (mdn_buffer_overflow); - from += mblen; - *to++ = '.'; - tolen--; - } else { - if (tolen < mblen) - return (mdn_buffer_overflow); - for (j = 0; j < mblen; j++) - *to++ = *from++; - tolen -= mblen; - } - - fromlen -= mblen; - } - - if (tolen < 1) - return (mdn_buffer_overflow); - *to = '\0'; - - return (mdn_success); -} - -#ifdef TEST -#include -#include - -/* - * Test program for this module. - * - * The test program repeatedly prompt you to input a command. The - * following command is currently recognized. - * - * tolen N set the length of output buffer. (1...1024) - * DOMANNAME try mapping DOMANNAME. - * - * Input EOF to exit. - */ -int -main(int ac, char **av) { - mdn_delimitermap_t mapper; - mdn_converter_t converter; - char local[1024], utf8[1024]; - size_t locallen, utf8len = sizeof(utf8); - mdn_result_t r; - - if (ac != 2) { - fprintf(stderr, "usage: %s local-encoding-name\n", av[0]); - exit(EXIT_FAILURE); - } - - mdn_log_setlevel(mdn_log_level_trace); - mdn_converter_initialize(); - - r = mdn_converter_create(av[1], &converter, 0); - if (r != mdn_success) { - fprintf(stderr, "mdn_converter_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - - r = mdn_delimitermap_create(&mapper); - if (r != mdn_success) { - fprintf(stderr, "mdn_delimitermap_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - - r = mdn_delimitermap_add(mapper, 0x3002); - if (r != mdn_success) { - fprintf(stderr, "mdn_delimitermap_add: %s\n", - mdn_result_tostring(r)); - return 1; - } - mdn_delimitermap_fix(mapper); - - while (fgets(local, sizeof(local), stdin) != NULL) { - locallen = strlen(local); - if (local[locallen - 1] == '\n') - local[locallen - 1] = '\0'; - if (local[0] == '\0') - continue; - - if (strncmp(local, "tolen ", 6) == 0) { - utf8len = atoi(local + 6); - } else { - r = mdn_converter_localtoutf8(converter, local, utf8, - sizeof(utf8)); - if (r != mdn_success) { - fprintf(stderr, - "mdn_converter_localtoutf8: %s\n", - mdn_result_tostring(r)); - conitinue; - } - - r = mdn_delimitermap_map(mapper, utf8, utf8, utf8len); - if (r != mdn_success) { - fprintf(stderr, "mdn_delimitermap_map: %s\n", - mdn_result_tostring(r)); - conitinue; - } - - r = mdn_converter_utf8tolocal(converter, utf8, local, - sizeof(local)); - if (r != mdn_success) { - fprintf(stderr, - "mdn_converter_utf8tolocal: %s\n", - mdn_result_tostring(r)); - conitinue; - } - - fprintf(stderr, "%s\n", local); - } - } - - mdn_delimitermap_destroy(mapper); - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/dn.c b/contrib/idn/mdnkit/lib/dn.c deleted file mode 100644 index 33b38444c4..0000000000 --- a/contrib/idn/mdnkit/lib/dn.c +++ /dev/null @@ -1,341 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: dn.c,v 1.1 2002/01/02 02:46:41 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* - * Domain name compression/expansion. - * - * Similar to the functionality of dn_comp/dn_expand in the resolv library. - * In fact, the loop detection in mdn__dn_expand is borrowed from - * ns_name_unpack. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define COMPRESS_MASK 0xc0 -#define COMPRESS_FLAG 0xc0 -#define MAX_OFFSET 0x3fff - -#define MAXNAMELEN 1024 -#define MAXLABEL 63 -#define MAXCOMPRESS 255 - -/* - * uppercase -> lowercase conversion table, to be initialized - * by init_lcase(). - */ -static char lcase[128]; - -static mdn_result_t split_name(const char *name, unsigned char *namebuf); -static int find_label(const unsigned char *p, int limit, - mdn__dn_t *ctx); -static int match(const unsigned char *p, const unsigned char *q, - mdn__dn_t *ctx); -static void append_ptr(mdn__dn_t *ctx, unsigned char *ptr); -static int get_offset(const unsigned char *p); -static void init_lcase(void); - - -mdn_result_t -mdn__dn_expand(const char *msg, size_t msglen, const char *compressed, - char *expanded, size_t buflen, size_t *complenp) -{ - const unsigned char *p = (const unsigned char *)compressed; - const unsigned char *ueom = (const unsigned char *)(msg + msglen); - int compress_len = 0; - size_t checked = 0; - - assert(msg != NULL && expanded != NULL && complenp != NULL); - - /* - * Sanity check. - */ - if (compressed < msg || msg + msglen <= compressed) - return (mdn_invalid_message); - - if (*p == 0) { - /* Root label */ - if (buflen < 2) - return (mdn_buffer_overflow); - (void)strcpy(expanded, "."); - *complenp = 1; - return (mdn_success); - } - - while (p < ueom) { - int c = *p++; - size_t len; - - len = c & ~COMPRESS_MASK; - - if (c == 0) { - if (compress_len == 0) - compress_len = (const char *)p - compressed; - *complenp = compress_len; - return (mdn_success); - } else if ((c & COMPRESS_MASK) == 0) { - if (p + len > ueom) - return (mdn_invalid_message); - if (buflen < len + 2) - return (mdn_buffer_overflow); - (void)memcpy(expanded, p, len); - (void)strcpy(expanded + len, "."); /* dot and NUL */ - p += len; - checked += len + 1; - expanded += len + 1; - buflen -= len + 1; - } else if ((c & COMPRESS_MASK) == COMPRESS_FLAG) { - if (p >= ueom) - return (mdn_invalid_message); - len = (len << 8) + *p++; - if (compress_len == 0) - compress_len = (const char *)p - compressed; - p = (const unsigned char *)(msg + len); - - /* - * Loop detection. - */ - checked += 2; - if (checked >= msglen) { - WARNING(("mdn__dn_expand: loop detected\n")); - return (mdn_invalid_message); - } - } else { - return (mdn_invalid_message); - } - } - return (mdn_invalid_message); -} - -void -mdn__dn_initcompress(mdn__dn_t *ctx, const char *msg) { - ctx->msg = (const unsigned char *)msg; - ctx->cur = 0; -} - -mdn_result_t -mdn__dn_compress(const char *name, char *sptr, size_t length, - mdn__dn_t *ctx, size_t *complenp) -{ - unsigned char namebuf[MAXNAMELEN+1]; - unsigned char *ptr, *p; - mdn_result_t r; - int offset_limit; - static int initialized = 0; - - if (!initialized) { - init_lcase(); - initialized = 1; - } - - /* - * Split domain name into labels. - */ - if ((r = split_name(name, namebuf)) != mdn_success) - return (r); - - p = namebuf; - ptr = (unsigned char *)sptr; - offset_limit = ctx->cur; - while (*p != 0) { - int off; - - if ((off = find_label(p, offset_limit, ctx)) >= 0) { - if (length < 2) - return (mdn_buffer_overflow); - - ptr[0] = COMPRESS_FLAG | (off >> 8); - ptr[1] = off & 0xff; - ptr += 2; - if ((*complenp = (char *)ptr - sptr) > MAXCOMPRESS) - return (mdn_invalid_name); - return (mdn_success); - } else { - int l = *p + 1; - - if (length < l) - return (mdn_buffer_overflow); - - (void)memcpy(ptr, p, l); - append_ptr(ctx, ptr); - - ptr += l; - length -= l; - } - p += *p + 1; - } - if (length < 1) - return (mdn_buffer_overflow); - *ptr++ = 0; - if ((*complenp = (char *)ptr - sptr) > MAXCOMPRESS) - return (mdn_invalid_name); - return (mdn_success); -} - -static mdn_result_t -split_name(const char *name, unsigned char *namebuf) { - const unsigned char *p = (const unsigned char *)name; - const unsigned char *end = p + MAXNAMELEN; - unsigned char *q, *qtop; - - q = namebuf; - qtop = q++; - while (p < end) { - if (*p == '.' || *p == '\0') { - int len = q - qtop - 1; - if (len > MAXLABEL) - return (mdn_invalid_name); - *qtop = len; - qtop = q++; - if (*p == '\0') { - *qtop = 0; - return (mdn_success); - } - p++; - } else { - *q++ = *p++; - } - } - /* Name too long. */ - return (mdn_invalid_name); -} - -static int -find_label(const unsigned char *p, int limit, mdn__dn_t *ctx) { - int i; - - assert(limit <= ctx->cur); - - if (ctx == NULL) - return (-1); - - for (i = 0; i < limit; i++) { - if (match(p, ctx->msg + ctx->offset[i], ctx)) - return (ctx->offset[i]); - } - return (-1); -} - -static int -match(const unsigned char *p, const unsigned char *q, mdn__dn_t *ctx) { - for (;;) { - int len, l; - - /* Dereference 'q'. */ - while ((*q & COMPRESS_FLAG) != 0) { - int offset = get_offset(q); - - if (offset < 0 || offset > MAX_OFFSET) - return (0); - q = ctx->msg + offset; - } - - /* Check length. */ - len = *p++; - if (*q++ != len) - return (0); - - if (len == 0) - return (1); - - /* Compare labels. */ - for (l = 0; l < len; l++, p++, q++) { - if (*p == *q) - continue; - else if (*p < 128 && *q < 128 && - lcase[*p] == lcase[*q]) - continue; - else - return (0); - } - } -} - -static void -append_ptr(mdn__dn_t *ctx, unsigned char *ptr) { - if (ctx != NULL && ctx->cur < MDN_DN_NPTRS && - ptr >= ctx->msg && (ptr - ctx->msg) <= MAX_OFFSET) - ctx->offset[ctx->cur++] = ptr - ctx->msg; -} - -static int -get_offset(const unsigned char *p) { - return (((p[0] & ~COMPRESS_MASK) << 8) | p[1]); -} - -static void -init_lcase(void) { - int i; - - for (i = 0; i < 128; i++) - lcase[i] = i; - for (i = 'A'; i <= 'Z'; i++) - lcase[i] += 'a' - 'A'; -} diff --git a/contrib/idn/mdnkit/lib/dude.c b/contrib/idn/mdnkit/lib/dude.c deleted file mode 100644 index 700780345c..0000000000 --- a/contrib/idn/mdnkit/lib/dude.c +++ /dev/null @@ -1,305 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: dude.c,v 1.2 2002/02/08 05:40:07 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The following prefix is recommended by IETF IDN wg for test purposes. - */ -#if !defined(MDN_DUDE_PREFIX) && !defined(MDN_DUDE_SUFFIX) -#define MDN_DUDE_PREFIX "dq--" -#endif - -static const char *base32encode = "abcdefghijkmnpqrstuvwxyz23456789"; -static const int base32decode_ascii[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11, 12, -1, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, -}; -static const int base32decode_digit[10] = { - -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -}; - -static mdn_result_t dude_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t dude_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static int get_nibblelength(unsigned long v); -static int dude_getwc(const char *s, size_t len, - unsigned long *vp); -static int dude_putwc(char *s, size_t len, unsigned long v); - -static mdn__ace_t dude_ctx = { -#ifdef MDN_DUDE_PREFIX - mdn__ace_prefix, - MDN_DUDE_PREFIX, -#else - mdn__ace_suffix, - MDN_DUDE_SUFFIX, -#endif - dude_encode, - dude_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__dude_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__dude_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__dude_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__dude_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&dude_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__dude_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -dude_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - unsigned long prev, v; - - prev = 96; - while (fromlen > 0) { - if (from[0] == '-') { - v = '-'; - from++; - fromlen--; - } else { - len = dude_getwc(from, fromlen, &v); - if (len == 0) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - v = prev ^ v; - - /* - * Since round-trip check is performed later - * by mdn__ace_convert(), we don't need the - * following sanity checking. - * - * if (v == '-' || get_nibblelength(v) != len) - * return (mdn_invalid_encoding); - */ - - prev = v; - } - len = mdn_utf8_putwc(to, tolen, v); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -dude_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - size_t len; - unsigned long prev, c; - - prev = 96; - while (fromlen > 0) { - len = mdn_utf8_getwc(from, fromlen, &c); - from += len; - fromlen -= len; - if (len == 0) - return (mdn_invalid_encoding); - if (c == '-') { - /* - * Hyphens are treated specially. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '-'; - tolen--; - } else { - len = dude_putwc(to, tolen, prev ^ c); - if (len == 0) - return (mdn_buffer_overflow); - prev = c; - to += len; - tolen -= len; - } - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - - return (mdn_success); -} - -static int -get_nibblelength(unsigned long v) { - assert(v <= 0x7fffffff); - - if (v < (1<<16)) { /* v <= 16bit */ - if (v < (1<<8)) /* v <= 8bit */ - return ((v < (1<<4)) ? 1 : 2); - else /* 8bit < v <= 16bit */ - return ((v < (1<<12)) ? 3 : 4); - } else { /* 16bit < c */ - if (v < (1<<24)) /* 16bit < c <= 24bit */ - return ((v < (1<<20)) ? 5 : 6); - else /* 24bit < c <= 31bit */ - return ((v < (1<<28)) ? 7 : 8); - } -} - -static int -dude_getwc(const char *s, size_t len, unsigned long *vp) { - size_t orglen = len; - unsigned long v = 0; - - while (len > 0) { - int c = *s++; - - if ('a' <= c && c <= 'z') - c = base32decode_ascii[c - 'a']; - else if ('A' <= c && c <= 'Z') - c = base32decode_ascii[c - 'A']; - else if ('0' <= c && c <= '9') - c = base32decode_digit[c - '0']; - else - c = -1; - - if (c < 0) - return (0); /* invalid character */ - - v = (v << 4) + (c & 0xf); - - len--; - if ((c & 0x10) == 0) { - *vp = v; - return (orglen - len); - } - } - return (0); /* final character missing */ -} - -static int -dude_putwc(char *s, size_t len, unsigned long v) { - int i, w, shift; - - if ((w = get_nibblelength(v)) > len) - return (0); - - for (shift = 0, i = w - 1; i >= 0; i--) { - s[i] = base32encode[(v & 0xf) + shift]; - v >>= 4; - shift = 16; - } - return (w); -} diff --git a/contrib/idn/mdnkit/lib/filechecker.c b/contrib/idn/mdnkit/lib/filechecker.c deleted file mode 100644 index 59ff8bac66..0000000000 --- a/contrib/idn/mdnkit/lib/filechecker.c +++ /dev/null @@ -1,324 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: filechecker.c,v 1.2 2002/02/08 05:40:08 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define SUPPORT_VERSIONING - -struct mdn__filechecker { - mdn_ucsset_t set; -}; - -static mdn_result_t read_file(const char *file, FILE *fp, - mdn_ucsset_t set); -static int get_range(char *s, unsigned long *ucs1, - unsigned long *ucs2); -static char *get_ucs(char *p, unsigned long *vp); - - -mdn_result_t -mdn__filechecker_create(const char *file, mdn__filechecker_t *ctxp) { - FILE *fp; - mdn__filechecker_t ctx; - mdn_result_t r; - - assert(file != NULL && ctxp != NULL); - - TRACE(("mdn__filechecker_create(file=\"%-.100s\")\n", file)); - - if ((fp = fopen(file, "r")) == NULL) { - WARNING(("mdn__filechecker_create: cannot open %-.100s\n", - file)); - return (mdn_nofile); - } - - if ((ctx = malloc(sizeof(struct mdn__filechecker))) == NULL) - return (mdn_nomemory); - - if ((r = mdn_ucsset_create(&ctx->set)) != mdn_success) { - free(ctx); - return (r); - } - - r = read_file(file, fp, ctx->set); - fclose(fp); - - if (r == mdn_success) { - mdn_ucsset_fix(ctx->set); - *ctxp = ctx; - } else { - mdn_ucsset_destroy(ctx->set); - free(ctx); - } - return (r); -} - -void -mdn__filechecker_destroy(mdn__filechecker_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn__filechecker_destroy()\n")); - - mdn_ucsset_destroy(ctx->set); - free(ctx); -} - -mdn_result_t -mdn__filechecker_lookup(mdn__filechecker_t ctx, const char *str, - const char **found) -{ - mdn_result_t r = mdn_success; - unsigned long v; - size_t len = strlen(str); - - assert(ctx != NULL && str != NULL); - - while (len > 0) { - int w; - int exists; - - if ((w = mdn_utf8_getwc(str, len, &v)) == 0) - return (mdn_invalid_encoding); - - r = mdn_ucsset_lookup(ctx->set, v, &exists); - - if (r != mdn_success) { - return (r); - } else if (exists) { - /* Found. */ - *found = str; - return (mdn_success); - } - - str += w; - len -= w; - } - *found = NULL; - return (mdn_success); -} - -static mdn_result_t -read_file(const char *file, FILE *fp, mdn_ucsset_t set) { - char line[256]; - mdn_result_t r; - int lineno = 0; - - while (fgets(line, sizeof(line), fp) != NULL) { - char *p = line; - unsigned long ucs1, ucs2; - - lineno++; - while (isspace((unsigned char)*p)) - p++; - if (*p == '\0' || *p == '#') - continue; - -#ifdef SUPPORT_VERSIONING - /* Skip version tag. */ - if (lineno == 1 && strncmp("version=", line, 8) == 0) - continue; -#endif - if (!get_range(p, &ucs1, &ucs2)) { - WARNING(("syntax error in file \"%-.100s\" line %d: " - "%-.100s", file, lineno, line)); - return (mdn_invalid_syntax); - } - if ((r = mdn_ucsset_addrange(set, ucs1, ucs2)) != mdn_success) - return (r); - } - return (mdn_success); -} - -static int -get_range(char *s, unsigned long *ucs1, unsigned long *ucs2) { - if ((s = get_ucs(s, ucs1)) == NULL) - return (0); - *ucs2 = *ucs1; - - switch (s[0]) { - case '\0': - case '\n': - case '#': - case ';': - return (1); - case '-': - break; - default: - return (0); - } - - if ((s = get_ucs(s + 1, ucs2)) == NULL) - return (0); - - if (*ucs1 > *ucs2) { - INFO(("mdn__filechecker_create: invalid range spec " - "U+%X-U+%X\n", *ucs1, *ucs2)); - return (0); - } - - switch (s[0]) { - case '\0': - case '\n': - case '#': - case ';': - return (1); - default: - return (0); - } -} - - -static char * -get_ucs(char *p, unsigned long *vp) { - char *end; - - /* Skip leading space */ - while (isspace((unsigned char)*p)) - p++; - - /* Skip optional 'U+' */ - if (strncmp(p, "U+", 2) == 0) - p += 2; - - *vp = strtoul(p, &end, 16); - if (end == p) { - INFO(("mdn__filechecker_create: UCS code point expected\n")); - return (NULL); - } - p = end; - - /* Skip trailing space */ - while (isspace((unsigned char)*p)) - p++; - return p; -} - -mdn_result_t -mdn__filechecker_createproc(const char *parameter, void **ctxp) { - return mdn__filechecker_create(parameter, (mdn__filechecker_t *)ctxp); -} - -void -mdn__filechecker_destroyproc(void *ctxp) { - mdn__filechecker_destroy((mdn__filechecker_t)ctxp); -} - -mdn_result_t -mdn__filechecker_lookupproc(void *ctx, const char *str, const char **found) { - return mdn__filechecker_lookup((mdn__filechecker_t)ctx, str, found); -} - - -#ifdef TEST -int -main(int ac, char **av) { - mdn__filechecker_t chk; - mdn_result_t r; - char line[1024]; - char *found; - int lineno = 0; - - if (ac < 2) { - fprintf(stderr, "Usage: %s file\n", av[0]); - return 1; - } - r = mdn__filechecker_create(av[1], &chk); - if (r != mdn_success) { - fprintf(stderr, "mdn__filechecker_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - while (fgets(line, sizeof(line), stdin) != NULL) { - int valid; - size_t len = strlen(line); - - lineno++; - /* since \n is likely to be prohibited, remove it beforehand */ - if (line[len - 1] == '\n') - line[len - 1] = '\0'; - - r = mdn__filechecker_check(priv, line, &found); - if (r != mdn_success) { - fprintf(stderr, "error at line %d: %s\n", - lineno, mdn_result_tostring(r)); - return 1; - } - if (found != NULL) { - printf("line %d: invalid\n", lineno); - } - } - return 0; -} -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/filemapper.c b/contrib/idn/mdnkit/lib/filemapper.c deleted file mode 100644 index e4a6394897..0000000000 --- a/contrib/idn/mdnkit/lib/filemapper.c +++ /dev/null @@ -1,404 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: filemapper.c,v 1.2 2002/02/08 05:40:09 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#define SUPPORT_VERSIONING - -#define UCSBUF_LOCAL_SIZE 20 - -typedef struct ucsbuf { - unsigned long *ucs; - size_t size; - size_t len; - unsigned long local[UCSBUF_LOCAL_SIZE]; -} ucsbuf_t; - -struct mdn__filemapper { - mdn_ucsmap_t map; -}; - -static void ucsbuf_init(ucsbuf_t *b); -static mdn_result_t ucsbuf_grow(ucsbuf_t *b); -static mdn_result_t ucsbuf_append(ucsbuf_t *b, unsigned long v); -static void ucsbuf_free(ucsbuf_t *b); -static mdn_result_t read_file(const char *file, FILE *fp, - mdn_ucsmap_t map); -static mdn_result_t get_map(char *p, ucsbuf_t *b); -static char *get_ucs(char *p, unsigned long *vp); - - -mdn_result_t -mdn__filemapper_create(const char *file, mdn__filemapper_t *ctxp) { - FILE *fp; - mdn__filemapper_t ctx; - mdn_result_t r; - - assert(file != NULL && ctxp != NULL); - - TRACE(("mdn__filemapper_create(file=\"%-.100s\")\n", file)); - - if ((fp = fopen(file, "r")) == NULL) { - WARNING(("mdn__filemapper_create: cannot open %-.100s\n", - file)); - return (mdn_nofile); - } - if ((ctx = malloc(sizeof(struct mdn__filemapper))) == NULL) - return (mdn_nomemory); - - if ((r = mdn_ucsmap_create(&ctx->map)) != mdn_success) { - free(ctx); - return (r); - } - - r = read_file(file, fp, ctx->map); - fclose(fp); - - if (r == mdn_success) { - mdn_ucsmap_fix(ctx->map); - *ctxp = ctx; - } else { - mdn_ucsmap_destroy(ctx->map); - free(ctx); - } - return (r); -} - -void -mdn__filemapper_destroy(mdn__filemapper_t ctx) { - - assert(ctx != NULL); - - TRACE(("mdn__filemapper_destroy()\n")); - - mdn_ucsmap_destroy(ctx->map); - free(ctx); -} - -mdn_result_t -mdn__filemapper_map(mdn__filemapper_t ctx, const char *from, - char *to, size_t tolen) -{ - mdn_result_t r = mdn_success; - unsigned long v; - ucsbuf_t ub; - size_t fromlen = strlen(from); - - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn__filemapper_map(from=\"%s\")\n", - mdn_debug_xstring(from, 40))); - - /* Initialize temporary buffer. */ - ucsbuf_init(&ub); - - while (fromlen > 0) { - int i; - int w; - - /* Get one character. */ - if ((w = mdn_utf8_getwc(from, fromlen, &v)) == 0) { - r = mdn_invalid_encoding; - break; - } - from += w; - fromlen -= w; - - again: - /* Try mapping. */ - r = mdn_ucsmap_map(ctx->map, v, ub.ucs, ub.size, &ub.len); - switch (r) { - case mdn_buffer_overflow: - /* Temporary buffer too small. Enlarge and retry. */ - if ((r = ucsbuf_grow(&ub)) != mdn_success) - break; - goto again; - case mdn_nomapping: - /* There is no mapping. */ - r = mdn_success; - /* fallthrough */ - case mdn_success: - for (i = 0; i < ub.len; i++) { - w = mdn_utf8_putwc(to, tolen, ub.ucs[i]); - if (w == 0) { - r = mdn_buffer_overflow; - break; - } - to += w; - tolen -= w; - } - break; - default: - goto ret; - } - } - - ret: - ucsbuf_free(&ub); - - if (r == mdn_success) { - /* Terminate with NUL. */ - if (tolen == 0) - return (mdn_buffer_overflow); - *to = '\0'; - } - - return (r); -} - -static void -ucsbuf_init(ucsbuf_t *b) { - b->ucs = b->local; - b->size = UCSBUF_LOCAL_SIZE; - b->len = 0; -} - -static mdn_result_t -ucsbuf_grow(ucsbuf_t *b) { - if (b->ucs == b->local) - b->ucs = NULL; - b->size *= 2; - b->ucs = realloc(b->ucs, sizeof(unsigned long) * b->size); - if (b->ucs == NULL) - return (mdn_nomemory); - return (mdn_success); -} - -static mdn_result_t -ucsbuf_append(ucsbuf_t *b, unsigned long v) { - mdn_result_t r; - - if (b->len + 1 > b->size) { - r = ucsbuf_grow(b); - if (r != mdn_success) - return (r); - } - b->ucs[b->len++] = v; - return (mdn_success); -} - -static void -ucsbuf_free(ucsbuf_t *b) { - if (b->ucs != b->local) - free(b->ucs); -} - -static mdn_result_t -read_file(const char *file, FILE *fp, mdn_ucsmap_t map) { - char line[1024]; - ucsbuf_t ub; - mdn_result_t r = mdn_success; - int lineno = 0; - - ucsbuf_init(&ub); - - while (fgets(line, sizeof(line), fp) != NULL) { - char *p = line; - - lineno++; - while (isspace((unsigned char)*p)) - p++; - if (*p == '\0' || *p == '#') - continue; -#ifdef SUPPORT_VERSIONING - /* Skip version tag. */ - if (lineno == 1 && strncmp("version=", line, 8) == 0) - continue; -#endif - again: - ub.len = 0; - r = get_map(p, &ub); - switch (r) { - case mdn_success: - r = mdn_ucsmap_add(map, ub.ucs[0], - &ub.ucs[1], ub.len - 1); - break; - case mdn_buffer_overflow: - if ((r = ucsbuf_grow(&ub)) != mdn_success) - break; - goto again; - case mdn_invalid_syntax: - WARNING(("syntax error in file \"%-.100s\" line %d: " - "%-.100s", file, lineno, line)); - /* fall through */ - default: - return (r); - } - } - ucsbuf_free(&ub); - return (r); -} - -static mdn_result_t -get_map(char *p, ucsbuf_t *b) { - unsigned long v; - mdn_result_t r = mdn_success; - - for (;;) { - if ((p = get_ucs(p, &v)) == NULL) - return (mdn_invalid_syntax); - if ((r = ucsbuf_append(b, v)) != mdn_success) - return (r); - if (b->len == 1) { - if (*p != ';') - return (mdn_invalid_syntax); - p++; - while (isspace((unsigned char)*p)) - p++; - } - - if (*p == ';' || *p == '#' || *p == '\0') - return (r); - } - return (r); -} - -static char * -get_ucs(char *p, unsigned long *vp) { - char *end; - - /* Skip leading space */ - while (isspace((unsigned char)*p)) - p++; - - /* Skip optional 'U+' */ - if (strncmp(p, "U+", 2) == 0) - p += 2; - - *vp = strtoul(p, &end, 16); - if (end == p) { - INFO(("mdn__filemapper_create: UCS code point expected\n")); - return (NULL); - } - p = end; - - /* Skip trailing space */ - while (isspace((unsigned char)*p)) - p++; - return p; -} - -mdn_result_t -mdn__filemapper_createproc(const char *parameter, void **ctxp) { - return mdn__filemapper_create(parameter, (mdn__filemapper_t *)ctxp); -} - -void -mdn__filemapper_destroyproc(void *ctxp) { - mdn__filemapper_destroy((mdn__filemapper_t)ctxp); -} - -mdn_result_t -mdn__filemapper_mapproc(void *ctx, const char *from, char *to, size_t tolen) { - return mdn__filemapper_map((mdn__filemapper_t)ctx, from, to, tolen); -} - - -#ifdef TEST -int -main(int ac, char **av) { - mdn__filemapper_t ctx; - mdn_result_t r; - char line[1024], mapped[1024]; - int lineno = 0; - - if (ac == 1) { - while (fgets(line, sizeof(line), stdin) != NULL) { - lineno++; - fputs(line, stdout); - } - } else { - r = mdn__filemapper_create(av[1], &ctx); - if (r != mdn_success) { - fprintf(stderr, "mdn__filemapper_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - while (fgets(line, sizeof(line), stdin) != NULL) { - lineno++; - r = mdn__filemapper_map(ctx, line, mapped, - sizeof(mapped)); - if (r != mdn_success) { - fprintf(stderr, "error at line %d: %s\n", - lineno, mdn_result_tostring(r)); - return 1; - } - fputs(mapped, stdout); - } - } - return 0; -} -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/lace.c b/contrib/idn/mdnkit/lib/lace.c deleted file mode 100644 index 9539c4ce9c..0000000000 --- a/contrib/idn/mdnkit/lib/lace.c +++ /dev/null @@ -1,448 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: lace.c,v 1.1 2002/01/02 02:46:42 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MDN_LACE_PREFIX -#define MDN_LACE_PREFIX "lq--" -#endif - -#define LACE_MAX_COMPRESS_LEN 254 /* max run length */ -#define LACE_BUF_SIZE 128 /* more than enough */ - -static mdn_result_t lace_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t lace_decode_utf16(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp); -static mdn_result_t lace_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t lace_encode_utf16(const unsigned short *p, - size_t len, char *to, size_t tolen, - int compress); -static int is_compress_effective(unsigned short *p, size_t len); - -static mdn__ace_t lace_ctx = { - mdn__ace_prefix, - MDN_LACE_PREFIX, - lace_encode, - lace_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__lace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__lace_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir) { - return (mdn_success); -} - -mdn_result_t -mdn__lace_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__lace_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&lace_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__lace_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -lace_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[LACE_BUF_SIZE]; - size_t len, reslen; - mdn_result_t r; - - /* - * Allocate sufficient buffer. - */ - if (fromlen + 1 > LACE_BUF_SIZE) { - if ((buf = malloc(sizeof(*buf) * (fromlen + 1))) == NULL) - return (mdn_nomemory); - } else { - /* Use local buffer. */ - buf = local_buf; - } - - /* - * Decode base32 and decompress. - */ - r = lace_decode_utf16(from, fromlen, buf, &len); - if (r != mdn_success) - goto ret; - - /* - * Now 'buf' holds the decompressed string, which must contain - * UTF-16 characters. Convert them into UTF-8. - */ - r = mdn_util_utf16toutf8(buf, len, to, tolen, &reslen); - if (r != mdn_success) - goto ret; - - /* - * Terminate with NUL. - */ - if (tolen <= reslen) { - r = mdn_buffer_overflow; - goto ret; - } - *(to + reslen) = '\0'; - - /* - * Encode the result, and compare the result with `from', in - * order to test whether an input string is encoded correctly. - * If `from' was encoded with wrong compression mode, we return - * `mdn_invalid_encoding'. - */ - r = lace_encode(to, reslen, (char *)buf, fromlen + 1); - if (r != mdn_success) - goto ret; - if (!mdn_util_casematch((char *)buf, from, fromlen)) { - r = mdn_invalid_encoding; - goto ret; - } - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -lace_decode_utf16(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp) -{ - unsigned short *p, *q; - unsigned int bitbuf = 0; - int bitlen = 0; - size_t len; - - /* - * Decode Base32 and put the result bytes to 'buf'. - * Since decoded string will be shorter in length, and - * the caller allocated 'buf' so that its length is not - * less than 'fromlen', we don't have to worry about overflow. - */ - p = buf; - while (fromlen-- > 0) { - int c = *from++; - int x; - - if ('a' <= c && c <= 'z') - x = c - 'a'; - else if ('A' <= c && c <= 'Z') - x = c - 'A'; - else if ('2' <= c && c <= '7') - x = c - '2' + 26; - else - return (mdn_invalid_encoding); - - bitbuf = (bitbuf << 5) + x; - bitlen += 5; - if (bitlen >= 8) { - *p++ = (bitbuf >> (bitlen - 8)) & 0xff; - bitlen -= 8; - } - } - - len = p - buf; - - if (len == 0) - return (mdn_invalid_encoding); - - /* - * The number of unused bits MUST be 4 or less, and all the - * bits MUST be zero. - */ - if (bitlen >= 5 || (bitbuf & ((1 << bitlen) - 1)) != 0) - return (mdn_invalid_encoding); - - /* - * Now 'buf' holds the decoded bytes. Rebuild the - * original UTF-16 string. - */ - if (buf[0] == 0xff) { - /* - * Not compressed. - */ - len--; /* skip first byte (0xff) */ - if (len % 2 != 0) { - /* number of bytes must be even. */ - return (mdn_invalid_encoding); - } - for (p = buf + 1, q = buf; len > 0; p += 2, q++, len -= 2) { - *q = (p[0] << 8) | p[1]; - } - } else { - /* - * Compressed. - */ - int count = 0; - unsigned short high = 0; /* initialize for lint */ - - for (p = q = buf; len > 0; p++, q++, len--) { - if (count == 0) { - if (len < 3 || p[0] == 0) - return (mdn_invalid_encoding); - /* Get COUNT and HIGH. */ - count = p[0]; - if (count == 0 || - count > LACE_MAX_COMPRESS_LEN) - return (mdn_invalid_encoding); - high = p[1] << 8; - p += 2; - len -= 2; - } - *q = high | *p; - count--; - } - if (count != 0) - return (mdn_invalid_encoding); - } - - *lenp = q - buf; - return (mdn_success); -} - -static mdn_result_t -lace_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[LACE_BUF_SIZE]; /* UTF-16 */ - mdn_result_t r; - size_t buflen, len; - - /* - * Convert to UTF-16. - */ - buf = local_buf; - buflen = LACE_BUF_SIZE; - for (;;) { - r = mdn_util_utf8toutf16(from, fromlen, - buf, buflen, &len); - if (r == mdn_buffer_overflow) { - buflen *= 2; - if (buf == local_buf) - buf = malloc(sizeof(*buf) * buflen); - else - buf = realloc(buf, sizeof(*buf) * buflen); - if (buf == NULL) - return (mdn_nomemory); - } else if (r == mdn_success) { - break; - } else { - goto ret; - } - } - - /* - * Compress, encode in base-32 and output. - */ - r = lace_encode_utf16(buf, len, to, tolen, - is_compress_effective(buf, len)); - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -lace_encode_utf16(const unsigned short *p, size_t len, - char *to, size_t tolen, int compress) -{ - unsigned long bitbuf = 0; /* bit stream buffer */ - int bitlen = 0; /* # of bits in 'bitbuf' */ - int count = 0; - int i, j; - - if (!compress) { - /* prepend non-compression mark */ - bitbuf = 0xff; - bitlen = 8; - } - - for (i = 0; i <= len; i++) { - if (i == len) { - /* - * End of data. Flush. The current draft (-00) - * doesn't seem to define which value to use for - * padding (which it should). We assume zero. - */ - if (bitlen % 5 == 0) - break; - bitbuf <<= 5 - (bitlen % 5); /* padding with zero */ - bitlen += 5 - (bitlen % 5); - } else if (compress) { - if (count == 0) { - /* - * Get the number of consecutive characters - * with the same high byte. - */ - unsigned short high = p[i] & 0xff00; - - count = 1; - for (j = i + 1; - j < len && count < LACE_MAX_COMPRESS_LEN; - j++) { - if ((p[j] & 0xff00) != high) - break; - count++; - } - bitbuf = (bitbuf << 16) | (count << 8) | - (high >> 8); - bitlen += 16; - } - bitbuf = (bitbuf << 8) | (p[i] & 0xff); - bitlen += 8; - count--; - } else { - bitbuf = (bitbuf << 16) | p[i]; - bitlen += 16; - } - - /* - * Output bits in 'bitbuf' in 5-bit unit. - */ - while (bitlen >= 5) { - int x; - - /* Get top 5 bits. */ - x = (bitbuf >> (bitlen - 5)) & 0x1f; - bitlen -= 5; - - /* Encode. */ - if (x < 26) - x += 'a'; - else - x = (x - 26) + '2'; - - if (tolen < 1) - return (mdn_buffer_overflow); - - *to++ = x; - tolen--; - } - } - - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static int -is_compress_effective(unsigned short *p, size_t len) { - unsigned short last_high = 0x1; /* initialize with an invalid value */ - int nhigh = 0; - int i; - - /* - * Find the number of HIGH value in the compressed string. - */ - for (i = 0; i < len; i++) { - unsigned short high = p[i] & 0xff00; - if (high != last_high) - nhigh++; - last_high = high; - } - - /* - * Compressed string would take 2 * 'nhigh' + 'len' bytes, - * while the original (uncomressed) string would take 2 * 'len'. - * So the difference is 2 * 'nhigh' - len. - */ - if (2 * nhigh <= len) - return (1); /* Compression is effective. */ - else - return (0); /* Nope. */ -} diff --git a/contrib/idn/mdnkit/lib/localencoding.c b/contrib/idn/mdnkit/lib/localencoding.c deleted file mode 100644 index cdfcbc892b..0000000000 --- a/contrib/idn/mdnkit/lib/localencoding.c +++ /dev/null @@ -1,195 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: localencoding.c,v 1.1 2002/01/02 02:46:42 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include - -#ifdef HAVE_LOCALE_H -#include -#endif -#ifdef HAVE_LANGINFO_H -#include -#endif - -#include -#include -#include - -#if defined(HAVE_NL_LANGINFO) && defined(CODESET) - -/* - * This is the correct method to get the codeset name - * corresponding to the current locale. - */ -const char * -mdn_localencoding_name(void) { - char *name; - - TRACE(("mdn_localencoding_name()\n")); - if ((name = getenv(MDN_LOCALCS_ENV)) == NULL) - name = nl_langinfo(CODESET); - TRACE(("local encoding=\"%-.30s\"\n", name == NULL ? "" : name)); - return (name); -} - -#else - -typedef struct locale2encoding { - char *locale_pattern; /* locale name pattern */ - char *encoding; /* MIME-preferred charset name */ -} locale2encoding_t; - -static locale2encoding_t l2e[] = { - { "*.ISO_8859-1", "ISO-8859-1" }, - { "*.ISO_8859-2", "ISO-8859-2" }, - { "*.SJIS", "Shift_JIS" }, - { "*.Shift_JIS", "Shift_JIS" }, - { "ja_JP.EUC", "EUC-JP" }, - { "ko_KR.EUC", "EUC-KR" }, - { "*.big5" "Big5" }, - { "*.Big5" "Big5" }, - { "*.KOI8-R", "KOI8-R" }, - { "*.GB2312", "GB2312" }, -#ifdef hpux - { "japanese", "Shift_JIS" }, -#else - { "japanese", "EUC-JP" }, -#endif - { "ja", "EUC-JP" }, - { NULL, NULL }, -}; - -static const char *locale_to_encoding(const char *name); -static int match(const char *pattern, const char *str); - -const char * -mdn_localencoding_name(void) { - char *name; - - TRACE(("mdn_localencoding_name()\n")); - - if ((name = getenv(MDN_LOCALCS_ENV)) != NULL) { - TRACE(("local encoding=\"%-.30s\"\n", - name == NULL ? "" : name)); - return (name); - } - (void)( -#if HAVE_SETLOCALE - (name = setlocale(LC_CTYPE, NULL)) || -#endif - (name = getenv("LC_ALL")) || - (name = getenv("LC_CTYPE")) || - (name = getenv("LANG"))); - name = (char *)locale_to_encoding(name); - TRACE(("local encoding=\"%-.30s\"\n", name == NULL ? "" : name)); - return (name); -} - -/* - * Locale name to encoding name. - */ -static const char * -locale_to_encoding(const char *name) { - int i; - - if (name == NULL) - return (NULL); - - for (i = 0; l2e[i].locale_pattern != NULL; i++) { - if (match(l2e[i].locale_pattern, name)) - return (l2e[i].encoding); - } - return name; -} - -/* - * Wild card matching function that supports only '*'. - */ -static int -match(const char *pattern, const char *str) { - for (;;) { - int c; - - switch (c = *pattern++) { - case '\0': - return (*str == '\0'); - case '*': - while (!match(pattern, str)) { - if (*str == '\0') - return (0); - str++; - } - return (1); - break; - default: - if (*str++ != c) - return (0); - break; - } - } -} - -#endif diff --git a/contrib/idn/mdnkit/lib/log.c b/contrib/idn/mdnkit/lib/log.c deleted file mode 100644 index a94ab5f20d..0000000000 --- a/contrib/idn/mdnkit/lib/log.c +++ /dev/null @@ -1,231 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: log.c,v 1.1 2002/01/02 02:46:43 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#define LOGLEVEL_ENV "MDN_LOG_LEVEL" - -#ifdef DEBUG -#define DEFAULT_LOG_LEVEL mdn_log_level_info -#else -#define DEFAULT_LOG_LEVEL mdn_log_level_error -#endif - -static int log_level = -1; -static mdn_log_proc_t log_proc; - -static void initialize(void); -static void log(int level, const char *fmt, va_list args); -static void log_to_stderr(int level, const char *buf); - -void -mdn_log_fatal(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_fatal, fmt, args); - va_end(args); - exit(1); -} - -void -mdn_log_error(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_error, fmt, args); - va_end(args); -} - -void -mdn_log_warning(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_warning, fmt, args); - va_end(args); -} - -void -mdn_log_info(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_info, fmt, args); - va_end(args); -} - -void -mdn_log_trace(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_trace, fmt, args); - va_end(args); -} - -void -mdn_log_dump(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - log(mdn_log_level_dump, fmt, args); - va_end(args); -} - -void -mdn_log_setlevel(int level) { - if (level >= 0) - log_level = level; -} - -int -mdn_log_getlevel(void) { - if (log_level < 0) - initialize(); - return log_level; -} - -void -mdn_log_setproc(mdn_log_proc_t proc) { - if (proc == NULL) - log_proc = log_to_stderr; - else - log_proc = proc; -} - -static void -initialize(void) { - char *s; - - if (log_level < 0) { - if ((s = getenv(LOGLEVEL_ENV)) != NULL) { - int level = atoi(s); - if (level >= 0) - log_level = level; - } - if (log_level < 0) - log_level = DEFAULT_LOG_LEVEL; - } - - if (log_proc == NULL) - log_proc = log_to_stderr; -} - -static void -log(int level, const char *fmt, va_list args) { - char buf[1024]; - - initialize(); - - if (log_level < level) - return; - -#if HAVE_VSNPRINTF - (void)vsnprintf(buf, sizeof(buf), fmt, args); -#else - /* Let's hope 1024 is enough.. */ - (void)vsprintf(buf, fmt, args); -#endif - (*log_proc)(level, buf); -} - -static void -log_to_stderr(int level, const char *buf) { - char *title; - char tmp[20]; - - switch (level) { - case mdn_log_level_fatal: - title = "FATAL"; - break; - case mdn_log_level_error: - title = "ERROR"; - break; - case mdn_log_level_warning: - title = "WARNING"; - break; - case mdn_log_level_info: - title = "INFO"; - break; - case mdn_log_level_trace: - title = "TRACE"; - break; - case mdn_log_level_dump: - title = "DUMP"; - break; - default: - (void)sprintf(tmp, "LEVEL%d", level); - title = tmp; - break; - } - fprintf(stderr, "%u: [%s] %s", (unsigned int)getpid(), title, buf); -} diff --git a/contrib/idn/mdnkit/lib/mace.c b/contrib/idn/mdnkit/lib/mace.c deleted file mode 100644 index 3f3e3e6518..0000000000 --- a/contrib/idn/mdnkit/lib/mace.c +++ /dev/null @@ -1,506 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: mace.c,v 1.1 2002/02/08 05:40:14 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * MACE - */ - -#ifndef MDN_MACE_PREFIX -#define MDN_MACE_PREFIX "mq--" -#endif - -/* Mode switcher */ -#define MACE_MODE_SWITCH '-' /* Literal/Non-Literal switching */ - -/* Submode introducer */ -#define MACE_SUBMODE_BMP_A 'w' /* U+0000-U+1FFF, U+A000-U+FFFF */ -#define MACE_SUBMODE_BMP_B 'x' /* U+2000-U+9FFF */ -#define MACE_SUBMODE_NONBMP 'y' /* U+10000-U+10FFFF */ -#define MACE_SUBMODE_COMP 'z' /* 4/9bit differential encoding */ - -/* Initial state */ -#define MACE_SUBMODE_INIT MACE_SUBMODE_BMP_A -#define MACE_PREV_INIT 0 - -#define MACE_COMP_BITS_1 4 -#define MACE_COMP_BITS_2 9 -#define MACE_COMP_MASK ((1 << MACE_COMP_BITS_2) - 1) -#define MACE_SAME_PREFIX(b, c1, c2) (((c1) ^ (c2)) < (1 << (b))) - -#define MACE_INVALID_CHAR 0x80000000 - -static mdn_result_t mace_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t mace_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static int mace_get_submode(int submode, unsigned long c, - unsigned long prev, - const char *rest, size_t rlen); -static int mace_getbase32(const char *s, int w, - unsigned long *vp); -static int mace_encodelength(int submode); -static int mace_getwc(const char *s, size_t len, int mode, - unsigned long ref, unsigned long *vp); -static int mace_putwc(char *s, size_t len, int mode, - unsigned long ref, unsigned long v); -static int peek_next_nonldh(const char *rest, size_t rlen, - unsigned long *cp); -static int letter_or_digit(unsigned long v); - -static mdn__ace_t mace_ctx = { - mdn__ace_prefix, - MDN_MACE_PREFIX, - mace_encode, - mace_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__mace_open(mdn_converter_t ctx, mdn_converter_dir_t dir, - void **privdata) -{ - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__mace_close(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir) -{ - return (mdn_success); -} - -mdn_result_t -mdn__mace_convert(mdn_converter_t ctx, void *privdata, - mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__mace_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&mace_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__mace_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -mace_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal = 0; - int submode = MACE_SUBMODE_INIT; - unsigned long prev = MACE_PREV_INIT; - - while (fromlen > 0) { - int consume = 1; /* # of input octets consumed */ - unsigned long c = MACE_INVALID_CHAR; - - if (from[0] == MACE_MODE_SWITCH) { - /* - * LD/non-LD mode switcher or just a hyphen. - */ - if (fromlen > 1 && from[1] == MACE_MODE_SWITCH) { - c = MACE_MODE_SWITCH; - consume = 2; - } else { - literal = !literal; - } - } else if (literal) { - /* - * Now in LD mode. Just output literally. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - c = from[0]; - } else if (from[0] == 'w' || from[0] == 'W') { - submode = MACE_SUBMODE_BMP_A; - } else if (from[0] == 'x' || from[0] == 'X') { - submode = MACE_SUBMODE_BMP_B; - } else if (from[0] == 'y' || from[0] == 'Y') { - submode = MACE_SUBMODE_NONBMP; - } else if (from[0] == 'z' || from[0] == 'Z') { - submode = MACE_SUBMODE_COMP; - } else { - /* - * Must be base32-format string. - */ - consume = mace_getwc(from, fromlen, submode, - prev, &c); - if (consume == 0) - return (mdn_invalid_encoding); - prev = c; - } - - /* Output decoded character. */ - if (c != MACE_INVALID_CHAR) { - size_t len = mdn_utf8_putwc(to, tolen, c); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - - from += consume; - fromlen -= consume; - } - - /* - * Terminate with NUL. - */ - if (tolen <= 0) - return (mdn_buffer_overflow); - *to = '\0'; - - return (mdn_success); -} - -static mdn_result_t -mace_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - int literal = 0; - int submode = MACE_SUBMODE_INIT; - unsigned long prev = MACE_PREV_INIT; - - while (fromlen > 0) { - unsigned long c; - size_t len; - - /* Get next character. */ - len = mdn_utf8_getwc(from, fromlen, &c); - if (len == 0 || c > 0x10ffff) - return (mdn_invalid_encoding); - from += len; - fromlen -= len; - - if (c == '-') { - /* - * Hyphen. Always encode as `--'. - */ - if (tolen < 2) - return (mdn_buffer_overflow); - to[0] = to[1] = '-'; - to += 2; - tolen -= 2; - } else if (letter_or_digit(c)) { - /* - * Letter or digit. - * Shift to Literal mode if necessary, then - * encode it as it is. - */ - if (!literal) { - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = MACE_MODE_SWITCH; - tolen--; - literal = 1; - } - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = c; - tolen--; - } else { - /* - * Non-LDH character. - */ - int new_submode; - - /* Move back from LD mode if necessary. */ - if (literal) { - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = MACE_MODE_SWITCH; - tolen--; - literal = 0; - } - - /* Determine the new submode and shift to it. */ - new_submode = mace_get_submode(submode, c, prev, - from, fromlen); - if (new_submode != submode) { - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = new_submode; /* introducer */ - tolen--; - submode = new_submode; - } - - /* Encode and output the character. */ - len = mace_putwc(to, tolen, submode, prev, c); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - - prev = c; - } - } - - /* - * Terminate with NUL. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static int -mace_get_submode(int submode, unsigned long c, unsigned long prev, - const char *rest, size_t rlen) -{ - /* - * Determine the submode. - */ - unsigned long nxt; - - /* - * First, check if we should use Compress submode. - */ - if (MACE_SAME_PREFIX(MACE_COMP_BITS_2, prev, c) && - (submode == MACE_SUBMODE_COMP || - c > 0xffff || - MACE_SAME_PREFIX(MACE_COMP_BITS_1, prev, c) || - (peek_next_nonldh(rest, rlen, &nxt) && - MACE_SAME_PREFIX(MACE_COMP_BITS_2, c, nxt)))) - return (MACE_SUBMODE_COMP); - - /* - * Then, determine the submode based on the code point. - */ - if (c > 0xffff) - return (MACE_SUBMODE_NONBMP); - else if (0x2000 <= c && c <= 0x9fff) - return (MACE_SUBMODE_BMP_B); - else - return (MACE_SUBMODE_BMP_A); - -} - -static int -mace_encodelength(int submode) { - switch (submode) { - case MACE_SUBMODE_BMP_A: - case MACE_SUBMODE_BMP_B: - return (3); - case MACE_SUBMODE_NONBMP: - return (4); - default: /* MACE_SUBMODE_COMP */ - return (1); /* actually 1 or 2. caller must decide. */ - } -} - -static int -mace_getbase32(const char *s, int w, unsigned long *vp) { - unsigned long v = 0; - - while (w-- > 0) { - int c = *s++; - - if ('a' <= c && c <= 'v') - c = c - 'a' + 10; - else if ('A' <= c && c <= 'V') - c = c - 'A' + 10; - else if ('0' <= c && c <= '9') - c = c - '0'; - else - return (0); /* invalid character */ - v = (v << 5) + (c & 0x1f); - } - *vp = v; - return (1); -} - -static int -mace_getwc(const char *s, size_t len, int submode, - unsigned long prev, unsigned long *vp) -{ - unsigned long v = 0; - int w = mace_encodelength(submode); - - if (len < w || !mace_getbase32(s, w, &v)) - return (0); - - switch (submode) { - case MACE_SUBMODE_BMP_A: - if (v >= 0x2000) - v += 0x8000; - break; - case MACE_SUBMODE_BMP_B: - v += 0x2000; - break; - case MACE_SUBMODE_NONBMP: - v += 0x10000; - break; - case MACE_SUBMODE_COMP: - if (v > 0xf) { - w = 2; - if (len < w || !mace_getbase32(s, w, &v)) - return (0); - } - v = prev ^ (v & MACE_COMP_MASK); - break; - default: - FATAL(("mace_getwc: internal error")); - break; - } - *vp = v; - - return (w); -} - -static int -mace_putwc(char *s, size_t len, int submode, - unsigned long prev, unsigned long v) -{ - static const char *base32encode = "0123456789abcdefghijklmnopqrstuv"; - int w = mace_encodelength(submode); - int i; - - switch (submode) { - case MACE_SUBMODE_BMP_A: - if (v >= 0xa000) - v -= 0x8000; - break; - case MACE_SUBMODE_BMP_B: - v -= 0x2000; - break; - case MACE_SUBMODE_NONBMP: - v -= 0x10000; - break; - case MACE_SUBMODE_COMP: - v = (prev ^ v) & MACE_COMP_MASK; - if (v > 0xf) { - v |= 0x200; - w++; - } - break; - default: - FATAL(("mace_putwc: internal error")); - break; - } - - if (len < w) - return (0); - - for (i = w - 1; i >= 0; i--) { - s[i] = base32encode[v & 0x1f]; - v >>= 5; - } - return (w); -} - -static int -peek_next_nonldh(const char *rest, size_t rlen, unsigned long *cp) { - /* - * Get the next non-LDH character from 'rest', store its - * code point to '*cp' and return 1. If there are no - * such character, return 0. - */ - while (rlen > 0) { - unsigned long v; - size_t len; - - if ((len = mdn_utf8_getwc(rest, rlen, &v)) == 0) { - break; - } else if (v != '-' && !letter_or_digit(v)) { - *cp = v; - return (1); - } - rest += len; - rlen -= len; - } - return (0); -} - -static int -letter_or_digit(unsigned long v) { - if (('a' <= v && v <= 'z') || - ('A' <= v && v <= 'Z') || - ('0' <= v && v <= '9')) - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/make.wnt b/contrib/idn/mdnkit/lib/make.wnt deleted file mode 100644 index 810df5cb16..0000000000 --- a/contrib/idn/mdnkit/lib/make.wnt +++ /dev/null @@ -1,302 +0,0 @@ -# $Id: make.wnt,v 1.4 2002/02/08 05:40:14 marka Exp $ -# Makefile for MDN library, manually configured for WIN-NT (VC5.0) -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -!include - -INCDIR = ..\include -ICONVDIR = ..\win -LIBS = -SYSLIBS = $(conlibsdll) - -# -# Files to build MDN library -# - -HDRS = $(ICONVDIR)\iconv.h \ - $(INCDIR)\config.h \ - $(INCDIR)\mdn\ace.h \ - $(INCDIR)\mdn\altdude.h \ - $(INCDIR)\mdn\amcacem.h \ - $(INCDIR)\mdn\amcaceo.h \ - $(INCDIR)\mdn\amcacer.h \ - $(INCDIR)\mdn\amcacev.h \ - $(INCDIR)\mdn\amcacew.h \ - $(INCDIR)\mdn\amcacez.h \ - $(INCDIR)\mdn\api.h \ - $(INCDIR)\mdn\assert.h \ - $(INCDIR)\mdn\brace.h \ - $(INCDIR)\mdn\checker.h \ - $(INCDIR)\mdn\converter.h \ - $(INCDIR)\mdn\debug.h \ - $(INCDIR)\mdn\delimitermap.h \ - $(INCDIR)\mdn\dn.h \ - $(INCDIR)\mdn\dude.h \ - $(INCDIR)\mdn\filechecker.h \ - $(INCDIR)\mdn\filemapper.h \ - $(INCDIR)\mdn\lace.h \ - $(INCDIR)\mdn\localencoding.h \ - $(INCDIR)\mdn\log.h \ - $(INCDIR)\mdn\logmacro.h \ - $(INCDIR)\mdn\mace.h \ - $(INCDIR)\mdn\mapper.h \ - $(INCDIR)\mdn\mapselector.h \ - $(INCDIR)\mdn\msgheader.h \ - $(INCDIR)\mdn\msgtrans.h \ - $(INCDIR)\mdn\nameprep.h \ - $(INCDIR)\mdn\normalizer.h \ - $(INCDIR)\mdn\race.h \ - $(INCDIR)\mdn\res.h \ - $(INCDIR)\mdn\resconf.h \ - $(INCDIR)\mdn\result.h \ - $(INCDIR)\mdn\selectiveencode.h \ - $(INCDIR)\mdn\strhash.h \ - $(INCDIR)\mdn\ucsmap.h \ - $(INCDIR)\mdn\ucsset.h \ - $(INCDIR)\mdn\unicode.h \ - $(INCDIR)\mdn\unormalize.h \ - $(INCDIR)\mdn\utf5.h \ - $(INCDIR)\mdn\utf6.h \ - $(INCDIR)\mdn\utf8.h \ - $(INCDIR)\mdn\util.h \ - $(INCDIR)\mdn\version.h - -SRCS = ace.c altdude.c amcacem.c amcaceo.c amcacer.c \ - amcacev.c amcacew.c amcacez.c api.c \ - brace.c checker.c converter.c \ - debug.c delimitermap.c dn.c dude.c \ - filechecker.c filemapper.c \ - lace.c localencoding.c log.c \ - mace.c mapper.c mapselector.c msgheader.c msgtrans.c \ - nameprep.c nameprep_template.c nameprepdata.c normalizer.c \ - race.c res.c resconf.c result.c \ - selectiveencode.c strhash.c \ - ucsmap.c ucsset.c unicode.c unicode_template.c \ - unicodedata_301.c unicodedata_310.c unormalize.c \ - utf5.c utf6.c utf8.c util.c version.c - -OBJS = ace.obj altdude.obj amcacem.obj amcaceo.obj amcacer.obj \ - amcacev.obj amcacew.obj amcacez.obj api.obj \ - brace.obj checker.obj converter.obj \ - debug.obj delimitermap.obj dn.obj dude.obj \ - filechecker.obj filemapper.obj \ - lace.obj localencoding.obj log.obj \ - mace.obj mapper.obj mapselector.obj msgheader.obj msgtrans.obj \ - nameprep.obj normalizer.obj \ - race.obj res.obj resconf.obj result.obj \ - selectiveencode.obj strhash.obj \ - ucsmap.obj ucsset.obj unicode.obj unormalize.obj \ - utf5.obj utf6.obj utf8.obj util.obj version.obj - -LIB = libmdn.lib - -DBG = -DDEBUG - -# -# Target to build -# - -all: $(LIB) - -libmdn.lib: $(OBJS) - -del libmdn.lib - lib /out:libmdn.lib $(OBJS) - -# -# Dependencies -# - -ace.obj: ace.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -altdude.obj: altdude.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcacem.obj: amcacem.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcaceo.obj: amcaceo.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcacer.obj: amcacer.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcacev.obj: amcacev.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcacew.obj: amcacew.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -amcacez.obj: amcacez.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -api.obj: api.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -brace.obj: brace.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -checker.obj: checker.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -converter.obj: converter.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -debug.obj: debug.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -delimitermap.obj: delimitermap.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -dn.obj: dn.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -dude.obj: dude.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -filechecker.obj: filechecker.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -filemapper.obj: filemapper.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -lace.obj: lace.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -localencoding.obj: localencoding.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -log.obj: log.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -mace.obj: mace.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -mapper.obj: mapper.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -mapselector.obj: mapselector.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -msgheader.obj: msgheader.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -msgtrans.obj: msgtrans.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -nameprep.obj: nameprep.c nameprep_template.c nameprepdata.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -normalizer.obj: normalizer.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -race.obj: race.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -res.obj: res.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -resconf.obj: resconf.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -result.obj: result.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -selectiveencode.obj: selectiveencode.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -strhash.obj: strhash.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -ucsmap.obj: ucsmap.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -ucsset.obj: ucsset.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -unicode.obj: unicode.c unicode_template.c unicodedata_301.c unicodedata_310.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -unormalize.obj: unormalize.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -utf5.obj: utf5.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -utf6.obj: utf6.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -utf8.obj: utf8.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -util.obj: util.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - -version.obj: version.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -I$(ICONVDIR) $(DBG) $*.c - - -# -# misc. -# - -install: - -clean: - del *.obj *.lib core *.core *~ - diff --git a/contrib/idn/mdnkit/lib/mapper.c b/contrib/idn/mdnkit/lib/mapper.c deleted file mode 100644 index 4b58903c78..0000000000 --- a/contrib/idn/mdnkit/lib/mapper.c +++ /dev/null @@ -1,599 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: mapper.c,v 1.2 2002/02/08 05:40:16 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* - * Type for mapping scheme. - */ -typedef struct { - char *prefix; - char *parameter; - mdn_mapper_createproc_t create; - mdn_mapper_destroyproc_t destroy; - mdn_mapper_mapproc_t map; - void *context; -} map_scheme_t; - -/* - * Standard mapping schemes. - */ -static const map_scheme_t nameprep_03_scheme = { - "nameprep-03", - "nameprep-03", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_mapproc, - NULL, -}; - -static const map_scheme_t nameprep_05_scheme = { - "nameprep-05", - "nameprep-05", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_mapproc, - NULL, -}; - -static const map_scheme_t nameprep_06_scheme = { - "nameprep-06", - "nameprep-06", - mdn__nameprep_createproc, - mdn__nameprep_destroyproc, - mdn__nameprep_mapproc, - NULL, -}; - -static const map_scheme_t filemap_scheme = { - "filemap", - NULL, - mdn__filemapper_createproc, - mdn__filemapper_destroyproc, - mdn__filemapper_mapproc, - NULL, -}; - -static const map_scheme_t *standard_map_schemes[] = { - &nameprep_03_scheme, - &nameprep_05_scheme, - &nameprep_06_scheme, - &filemap_scheme, - NULL, -}; - -/* - * Hash table for mapping schemes. - */ -static mdn_strhash_t scheme_hash = NULL; - -/* - * Mapper object type. - */ -struct mdn_mapper { - int nschemes; - int scheme_size; - map_scheme_t *schemes; - int reference_count; -}; - -#define MAPPER_INITIAL_SCHEME_SIZE 1 - -mdn_result_t -mdn_mapper_initialize(void) { - mdn_result_t r; - map_scheme_t **scheme; - - TRACE(("mdn_mapper_initialize()\n")); - - if (scheme_hash != NULL) - return (mdn_success); /* already initialized */ - - r = mdn_strhash_create(&scheme_hash); - if (r != mdn_success) { - WARNING(("mdn_mapper_initialize: " - "hash table creation failed\n")); - goto failure; - } - - for (scheme = (map_scheme_t **)standard_map_schemes; - *scheme != NULL; scheme++) { - r = mdn_strhash_put(scheme_hash, (*scheme)->prefix, *scheme); - if (r != mdn_success) { - WARNING(("mdn_mapper_initialize: " - "hash table creation failed\n")); - goto failure; - } - } - - return (mdn_success); - -failure: - if (scheme_hash != NULL) { - mdn_strhash_destroy(scheme_hash, NULL); - scheme_hash = NULL; - } - return (r); -} - -mdn_result_t -mdn_mapper_create(mdn_mapper_t *ctxp) { - mdn_mapper_t ctx = NULL; - mdn_result_t r; - - assert(scheme_hash != NULL); - assert(ctxp != NULL); - - TRACE(("mdn_mapper_create()\n")); - - ctx = (mdn_mapper_t) malloc(sizeof(struct mdn_mapper)); - if (ctx == NULL) { - WARNING(("mdn_mapper_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->schemes = (map_scheme_t *) malloc(sizeof(map_scheme_t) - * MAPPER_INITIAL_SCHEME_SIZE); - if (ctx->schemes == NULL) { - WARNING(("mdn_mapper_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->nschemes = 0; - ctx->scheme_size = MAPPER_INITIAL_SCHEME_SIZE; - ctx->reference_count = 1; - *ctxp = ctx; - - return (mdn_success); - -failure: - if (ctx != NULL) - free(ctx->schemes); - free(ctx); - return (r); -} - -void -mdn_mapper_destroy(mdn_mapper_t ctx) { - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL); - - TRACE(("mdn_mapper_destroy()\n")); - TRACE(("mdn_mapper_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_mapper_destroy: the object is destroyed\n")); - for (i = 0; i < ctx->nschemes; i++) - ctx->schemes[i].destroy(ctx->schemes[i].context); - free(ctx->schemes); - free(ctx); - } -} - -void -mdn_mapper_incrref(mdn_mapper_t ctx) { - assert(ctx != NULL && scheme_hash != NULL); - - TRACE(("mdn_mapper_incrref()\n")); - TRACE(("mdn_mapper_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_result_t -mdn_mapper_add(mdn_mapper_t ctx, const char *scheme_name) { - mdn_result_t r; - map_scheme_t *scheme; - const char *scheme_prefix; - const char *scheme_parameter; - void *scheme_context = NULL; - char static_buffer[128]; /* large enough */ - char *buffer = static_buffer; - - assert(scheme_hash != NULL); - assert(ctx != NULL); - - TRACE(("mdn_mapper_add(scheme_name=%s)\n", - mdn_debug_xstring(scheme_name, 20))); - - /* - * Split `scheme_name' into `scheme_prefix' and `scheme_parameter'. - */ - scheme_parameter = strchr(scheme_name, ':'); - if (scheme_parameter == NULL) { - scheme_prefix = scheme_name; - scheme_parameter = NULL; - } else { - ptrdiff_t scheme_prefixlen; - - scheme_prefixlen = scheme_parameter - scheme_name; - if (scheme_prefixlen + 1 > sizeof(static_buffer)) { - buffer = (char *) malloc(scheme_prefixlen + 1); - if (buffer == NULL) { - r = mdn_nomemory; - goto failure; - } - } - memcpy(buffer, scheme_name, scheme_prefixlen); - *(buffer + scheme_prefixlen) = '\0'; - scheme_prefix = buffer; - scheme_parameter++; - } - - /* - * Find a scheme. - */ - if (mdn_strhash_get(scheme_hash, scheme_prefix, (void **)&scheme) - != mdn_success) { - WARNING(("mdn_mapper_add: invalid scheme %s\n", - scheme_name)); - r = mdn_invalid_name; - goto failure; - } - if (scheme_parameter == NULL && scheme->parameter != NULL) - scheme_parameter = scheme->parameter; - - /* - * Add the scheme. - */ - assert(ctx->nschemes <= ctx->scheme_size); - - if (ctx->nschemes == ctx->scheme_size) { - map_scheme_t *new_schemes; - - new_schemes = (map_scheme_t *) realloc(ctx->schemes, - sizeof(map_scheme_t) * ctx->scheme_size * 2); - if (new_schemes == NULL) { - WARNING(("mdn_mapper_add: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - ctx->schemes = new_schemes; - ctx->scheme_size *= 2; - } - - r = scheme->create(scheme_parameter, &scheme_context); - if (r != mdn_success) - goto failure; - - memcpy(ctx->schemes + ctx->nschemes, scheme, sizeof(map_scheme_t)); - ctx->schemes[ctx->nschemes].context = scheme_context; - ctx->nschemes++; - - if (buffer != static_buffer) - free(buffer); - - return (mdn_success); - -failure: - if (buffer != static_buffer) - free(buffer); - free(scheme_context); - return (r); -} - -mdn_result_t -mdn_mapper_addall(mdn_mapper_t ctx, const char **scheme_names, int nschemes) { - mdn_result_t r; - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL && scheme_names != NULL); - - TRACE(("mdn_mapper_addall(nschemes=%d)\n", nschemes)); - - for (i = 0; i < nschemes; i++) { - r = mdn_mapper_add(ctx, (const char *)*scheme_names); - if (r != mdn_success) - return (r); - scheme_names++; - } - - return (mdn_success); -} - -mdn_result_t -mdn_mapper_map(mdn_mapper_t ctx, const char *from, char *to, size_t tolen) { - mdn_result_t r; - size_t fromlen; - char *src, *dst; - char static_buffers[2][1024]; /* large enough */ - char *dynamic_buffers[2]; - size_t dynamic_buflen[2]; - size_t dstlen; - int idx; - int i; - - assert(scheme_hash != NULL); - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn_mapper_map(from=\"%s\")\n", mdn_debug_xstring(from, 20))); - - /* - * Initialize the buffers to use the local - * storage (stack memory). - */ - dynamic_buffers[0] = NULL; - dynamic_buffers[1] = NULL; - dynamic_buflen[0] = 0; - dynamic_buflen[1] = 0; - - fromlen = strlen(from); - - /* - * If no mapping scheme has been registered, copy the string. - */ - if (ctx->nschemes == 0) { - if (fromlen + 1 > tolen) - return (mdn_buffer_overflow); - memcpy(to, from, fromlen + 1); - return (mdn_success); - } - - /* - * Map. - */ - src = (void *)from; - dstlen = fromlen + 1; - - i = 0; - while (i < ctx->nschemes) { - /* - * Choose destination area to restore the result of a mapping. - */ - if (i + 1 == ctx->nschemes) { - dst = to; - dstlen = tolen; - - } else if (dstlen <= sizeof(static_buffers[0])) { - if (src == static_buffers[0]) - idx = 1; - else - idx = 0; - - dst = static_buffers[idx]; - dstlen = sizeof(static_buffers[0]); - - } else { - if (src == dynamic_buffers[0]) - idx = 1; - else - idx = 0; - - if (dynamic_buflen[idx] == 0) { - dynamic_buffers[idx] = (char *) malloc(dstlen); - if (dynamic_buffers[idx] == NULL) { - r = mdn_nomemory; - goto failure; - } - dynamic_buflen[idx] = dstlen; - - } else if (dynamic_buflen[idx] < dstlen) { - char *newbuf; - - newbuf = realloc(dynamic_buffers[idx], dstlen); - if (newbuf == NULL) { - r = mdn_nomemory; - goto failure; - } - dynamic_buffers[idx] = newbuf; - dynamic_buflen[idx] = dstlen; - } - - dst = dynamic_buffers[idx]; - dstlen = dynamic_buflen[idx]; - } - - /* - * Perform i-th map scheme. - * If buffer size is not enough, we double it and try again. - */ - r = (ctx->schemes[i].map)(ctx->schemes[i].context, src, dst, - dstlen); - if (r == mdn_buffer_overflow && dst != to) { - dstlen *= 2; - continue; - } - if (r != mdn_success) - goto failure; - - src = dst; - i++; - } - - free(dynamic_buffers[0]); - free(dynamic_buffers[1]); - return (mdn_success); - -failure: - free(dynamic_buffers[0]); - free(dynamic_buffers[1]); - return (r); -} - -mdn_result_t -mdn_mapper_register(const char *prefix, - mdn_mapper_createproc_t create, - mdn_mapper_destroyproc_t destroy, - mdn_mapper_mapproc_t map) { - mdn_result_t r; - map_scheme_t *scheme = NULL; - - assert(scheme_hash != NULL); - assert(prefix != NULL && create != NULL && destroy != NULL && - map != NULL); - - TRACE(("mdn_mapper_register(prefix=%s)\n", prefix)); - - scheme = (map_scheme_t *) malloc(sizeof(map_scheme_t)); - if (scheme == NULL) { - WARNING(("mdn_mapper_register: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - scheme->prefix = (char *) malloc(strlen(prefix) + 1); - if (scheme->prefix == NULL) { - WARNING(("mdn_mapper_register: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - strcpy(scheme->prefix, prefix); - scheme->parameter = NULL; - scheme->create = create; - scheme->destroy = destroy; - scheme->map = map; - - r = mdn_strhash_put(scheme_hash, prefix, scheme); - if (r != mdn_success) - WARNING(("mdn_mapper_register: registration failed\n")); - - return (r); - -failure: - if (scheme != NULL) - free(scheme->prefix); - free(scheme); - return (r); -} - -#ifdef TEST -#include - -/* - * Test program for this module. - * - * The test program repeatedly prompt you to input a command. The - * following command is currently recognized. - * - * tolen N set the length of output buffer. (1...1024) - * add TLD add selectable map for TLD. (e.g. com, jp) - * DOMANNAME try mapping DOMANNAME. - * - * Input EOF to exit. - */ -int -main(int ac, char **av) { - mdn_mapper_t ctx; - char from[1024], to[1024]; - size_t fromlen, tolen = sizeof(to); - mdn_result_t r; - - mdn_log_setlevel(mdn_log_level_trace); - mdn_mapper_initialize(); - r = mdn_mapper_create(&ctx); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapper_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - while (fgets(from, sizeof(from), stdin) != NULL) { - fromlen = strlen(from); - if (from[fromlen - 1] == '\n') - from[fromlen - 1] = '\0'; - if (from[0] == '\0') - continue; - - if (strncmp(from, "tolen ", 6) == 0) { - tolen = atoi(from + 6); - } else if (strncmp(from, "add ", 4) == 0) { - r = mdn_mapper_add(ctx, from + 4); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapper_add: %s\n", - mdn_result_tostring(r)); - conitinue; - } - } else { - r = mdn_mapper_map(ctx, from, to, tolen); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapper_map: %s\n", - mdn_result_tostring(r)); - conitinue; - } - fprintf(stderr, "%s\n", to); - } - } - - mdn_mapper_destroy(ctx); - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/mapselector.c b/contrib/idn/mdnkit/lib/mapselector.c deleted file mode 100644 index 9638cb6512..0000000000 --- a/contrib/idn/mdnkit/lib/mapselector.c +++ /dev/null @@ -1,430 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: mapselector.c,v 1.2 2002/02/08 05:40:17 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -struct mdn_mapselector { - mdn_strhash_t maphash; - int reference_count; -}; - -/* - * Maximum length of a top level domain name. (e.g. `com', `jp', ...) - */ -#define MAPSELECTOR_MAX_TLD_LENGTH 63 - -static void *memrchr(const void *s, int c, size_t n); -static void string_ascii_tolower(char *string); - -mdn_result_t -mdn_mapselector_initialize(void) { - TRACE(("mdn_mapselector_initialize()\n")); - - return mdn_mapper_initialize(); -} - -mdn_result_t -mdn_mapselector_create(mdn_mapselector_t *ctxp) { - mdn_mapselector_t ctx = NULL; - mdn_result_t r; - - assert(ctxp != NULL); - TRACE(("mdn_mapselector_create()\n")); - - ctx = (mdn_mapselector_t)malloc(sizeof(struct mdn_mapselector)); - if (ctx == NULL) { - WARNING(("mdn_mapselector_create: malloc failed\n")); - r = mdn_nomemory; - goto failure; - } - - ctx->maphash = NULL; - ctx->reference_count = 1; - - r = mdn_strhash_create(&(ctx->maphash)); - if (r != mdn_success) - goto failure; - - *ctxp = ctx; - - return (mdn_success); - -failure: - if (ctx != NULL) - free(ctx->maphash); - free(ctx); - return (r); -} - -void -mdn_mapselector_destroy(mdn_mapselector_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_mapselector_destroy()\n")); - TRACE(("mdn_mapselector_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_mapselector_destroy: the object is destroyed\n")); - mdn_strhash_destroy(ctx->maphash, - (mdn_strhash_freeproc_t)&mdn_mapper_destroy); - free(ctx); - } -} - -void -mdn_mapselector_incrref(mdn_mapselector_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_mapselector_incrref()\n")); - TRACE(("mdn_mapselector_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_result_t -mdn_mapselector_add(mdn_mapselector_t ctx, const char *tld, const char *name) { - mdn_result_t r; - mdn_mapper_t mapper; - char hash_key[MAPSELECTOR_MAX_TLD_LENGTH + 1]; - - assert(ctx != NULL && tld != NULL); - - TRACE(("mdn_mapselector_add(tld=%s, name=%s)\n", tld, name)); - - if (*tld != '.' || *(tld + 1) != '\0') { - if (*tld == '.') - tld++; - if (strchr(tld, '.') != NULL) - return (mdn_invalid_name); - } - if (strlen(tld) > MAPSELECTOR_MAX_TLD_LENGTH) - return (mdn_invalid_name); - strcpy(hash_key, tld); - string_ascii_tolower(hash_key); - - if (mdn_strhash_get(ctx->maphash, hash_key, (void **)&mapper) - != mdn_success) { - r = mdn_mapper_create(&mapper); - if (r != mdn_success) - return (r); - - r = mdn_strhash_put(ctx->maphash, hash_key, mapper); - if (r != mdn_success) - return (r); - } - - return (mdn_mapper_add(mapper, name)); -} - -mdn_result_t -mdn_mapselector_addall(mdn_mapselector_t ctx, const char *tld, - const char **scheme_names, int nschemes) { - mdn_result_t r; - int i; - - assert(ctx != NULL && tld != NULL && scheme_names != NULL); - - TRACE(("mdn_mapselector_addall(tld=%s, nschemes=%d)\n", - tld, nschemes)); - - for (i = 0; i < nschemes; i++) { - r = mdn_mapselector_add(ctx, tld, (const char *)*scheme_names); - if (r != mdn_success) - return (r); - scheme_names++; - } - - return (mdn_success); -} - -mdn_mapper_t -mdn_mapselector_mapper(mdn_mapselector_t ctx, const char *tld) { - mdn_result_t r; - mdn_mapper_t mapper; - char hash_key[MAPSELECTOR_MAX_TLD_LENGTH + 1]; - - assert(ctx != NULL && tld != NULL); - - TRACE(("mdn_mapselector_mapper(tld=%s)\n", tld)); - - if (*tld != '.' || *(tld + 1) != '\0') { - if (*tld == '.') - tld++; - if (strchr(tld, '.') != NULL) - return (NULL); - } - if (strlen(tld) > MAPSELECTOR_MAX_TLD_LENGTH) - return (NULL); - strcpy(hash_key, tld); - string_ascii_tolower(hash_key); - - mapper = NULL; - r = mdn_strhash_get(ctx->maphash, hash_key, (void **)&mapper); - if (r != mdn_success) - return (NULL); - - mdn_mapper_incrref(mapper); - - return (mapper); -} - -mdn_result_t -mdn_mapselector_map(mdn_mapselector_t ctx, - const char *from, char *to, size_t tolen) { - mdn_result_t r; - mdn_mapper_t mapper = NULL; - char tld[MAPSELECTOR_MAX_TLD_LENGTH + 1]; - size_t fromlen; - size_t tldlen; - const char *last_dot; - - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn_mapselector_map(from=\"%s\")\n", - mdn_debug_xstring(from, 20))); - - fromlen = strlen(from); - - /* - * Get TLD from `from'. - */ - if (from[0] == '\0') { - /* 'from' is empty. */ - tld[0] = '\0'; - } else if (from[0] == '.' && from[1] == '\0') { - /* 'from' is just a '.'. */ - tld[0] = '\0'; - } else if (from[fromlen - 1] == '.') { - /* - * 'from' ends with dot. - */ - const char *tld_top; - - /* Find the second last dot. */ - last_dot = memrchr(from, '.', fromlen - 1); - if (last_dot == NULL) { - /* 'from' is a single label followed by a dot. */ - tld_top = from; - } else { - tld_top = last_dot + 1; - } - tldlen = strlen(tld_top) - 1; - if (tldlen > MAPSELECTOR_MAX_TLD_LENGTH) - return (mdn_invalid_name); - memcpy(tld, tld_top, tldlen); - tld[tldlen] = '\0'; - } else { - /* Find the last dot. */ - last_dot = memrchr(from, '.', fromlen); - if (last_dot == NULL) { - /* 'from' contains no dots. */ - strcpy(tld, MDN_MAPSELECTOR_NO_TLD); - } else { - tldlen = strlen(last_dot + 1); - if (tldlen > MAPSELECTOR_MAX_TLD_LENGTH) - return (mdn_invalid_name); - memcpy(tld, last_dot + 1, tldlen); - tld[tldlen] = '\0'; - } - } - - string_ascii_tolower(tld); - - /* - * Get the mapper for the TLD. - */ - if (tld[0] != '\0' && - mdn_strhash_get(ctx->maphash, tld, (void **)&mapper) - != mdn_success) { - strcpy(tld, MDN_MAPSELECTOR_DEFAULT); - mdn_strhash_get(ctx->maphash, tld, (void **)&mapper); - } - - /* - * Map. - * If default mapper has not been registered, copy the string. - */ - if (mapper == NULL) { - TRACE(("mdn_mapselector_map: no mapper\n")); - if (fromlen + 1 > tolen) - return (mdn_buffer_overflow); - memcpy(to, from, fromlen + 1); - r = mdn_success; - } else { - TRACE(("mdn_mapselector_map: tld=%s\n", tld)); - r = mdn_mapper_map(mapper, from, to, tolen); - } - - return (r); -} - - -/* - * The memrchr() function returns the last occurrence of c (converted to - * an unsigned char) in the first n characters (each character is converted - * to an unsigned char) of the object s, or returns NULL if c does not - * occur. - */ -static void * -memrchr(const void *s, int c, size_t n) { - const unsigned char *p = (const unsigned char *)s; - void *save = NULL; - - if (n == 0) - return (NULL); - - do { - if (*p == c) - save = (void *)p; - p++; - } while (--n != 0); - - return (save); -} - - -static void -string_ascii_tolower(char *string) -{ - unsigned char *p; - - for (p = (unsigned char *) string; *p != '\0'; p++) { - if ('A' <= *p && *p <= 'Z') - *p = *p - 'A' + 'a'; - } -} - -#ifdef TEST -#include - -/* - * Test program for this module. - * - * The test program repeatedly prompt you to input a command. The - * following command is currently recognized. - * - * tolen N set the length of output buffer. (1...1024) - * add TLD add selectable map for TLD. (e.g. com, jp) - * DOMANNAME try mapping DOMANNAME. - * - * Input EOF to exit. - */ -int -main(int ac, char **av) { - mdn_mapselector_t ctx; - char from[1024], to[1024]; - size_t fromlen, tolen = sizeof(to); - mdn_result_t r; - - mdn_log_setlevel(mdn_log_level_trace); - mdn_mapselector_initialize(); - r = mdn_mapselector_create(&ctx); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapselector_create: %s\n", - mdn_result_tostring(r)); - return 1; - } - while (fgets(from, sizeof(from), stdin) != NULL) { - fromlen = strlen(from); - if (from[fromlen - 1] == '\n') - from[fromlen - 1] = '\0'; - if (from[0] == '\0') - continue; - - if (strncmp(from, "tolen ", 6) == 0) { - tolen = atoi(from + 6); - } else if (strncmp(from, "add ", 4) == 0) { - r = mdn_mapselector_add(ctx, from + 4, "dummy"); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapselector_add: %s\n", - mdn_result_tostring(r)); - conitinue; - } - } else { - r = mdn_mapselector_map(ctx, from, to, tolen); - if (r != mdn_success) { - fprintf(stderr, "mdn_mapselector_map: %s\n", - mdn_result_tostring(r)); - conitinue; - } - } - } - - mdn_mapselector_destroy(ctx); - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/mdn.conf.sample.in b/contrib/idn/mdnkit/lib/mdn.conf.sample.in deleted file mode 100644 index 6165c3d2f4..0000000000 --- a/contrib/idn/mdnkit/lib/mdn.conf.sample.in +++ /dev/null @@ -1,151 +0,0 @@ -# $Id: mdn.conf.sample.in,v 1.2 2002/02/08 05:40:19 marka Exp $ -# -# Sample file for mDNkit version 2 resolver configuration file (mdn.conf). -# -# [This file is tailored for preference "@preference@".] -# - -# -# `idn-encoding' entry specifies the encoding name used as the encoding -# of multilingualized names by resolvers and DNS servers. Currently, the -# following encodings are available: -# -# AMC-ACE-Z -# DUDE -# RACE -# UTF-8 -# -# -# syntax) -# idn-encoding -# -idn-encoding RACE - -# -# `nameprep' entry specifies the version of NAMEPREP. -# mDNkit currently supports the following version: -# -# nameprep-03 -- name preparation scheme described in the -# IETF draft `idn-nameprep-03' -# nameprep-05 -- name preparation scheme described in the -# IETF draft `idn-nameprep-05' -# nameprep-06 -- name preparation scheme described in the -# IETF draft `idn-nameprep-06' -# -# syntax) -# nameprep -# -# This entry and the follwoing four entries have the same effect. -# -# nameprep-map -# nameprep-normalize -# nameprep-prohibit -# nameprep-unassigned -# -# If both `nameprep' and more-specific entries (i.e. `nameprep-*' entries) -# are specified, more-specific ones take precedence. -# -nameprep nameprep-06 - -# -# `nameprep-map' entry specifies the mapping scheme of NAMEPREP process. -# Avaialable mapping schemes are: -# -# -- nameprep version -# filemap: -- read mapping rules from a file -# -# syntax) -# nameprep-map ... -# -# If multiple schemes are specified, they are applied in turn. -# -#nameprep-map nameprep-06 - -# -# `nameprep-normalize' entry specifies the normalization scheme of NAMEPREP -# process. Avaialable normalization schemes are: -# -# -- nameprep version -# unicode-form-kc -- Unicode normalization form KC -# defined by the latest standard. -# unicode-form-kc/3.0.1 -- Unicode normalization form KC -# defined by Unicode 3.0.1. -# unicode-form-kc/3.1.0 -- Unicode normalization form KC -# defined by Unicode 3.1. -# -# syntax) -# nameprep-normalize ... -# -# If multiple schemes are specified, they are applied in turn. -# -#nameprep-normalize nameprep-06 - -# -# `nameprep-prohibit' entry specifies the prohibited characters in the -# NAMEPREP process. The following sets are recognized. -# -# -- nameprep version -# fileset: -- read definition from a file. -# -# syntax) -# nameprep-prohibit ... -# -# If multiple sets are specified, they are applied in turn. -# -#nameprep-prohibit nameprep-06 - -# -# `nameprep-unassigned' entry specifies the unassigned characters in the -# NAMEPREP process. The following sets are recognized. -# -# -- nameprep version -# fileset: -- read definition from a file. -# -# syntax) -# nameprep-prohibit ... -# -# If multiple sets are specified, they are applied in turn. -# -#nameprep-unassigned nameprep-06 - -# -# `encoding-alias-file' specifies the file which defines encoding name -# aliases. -# -# syntax) -# encoding-alais-file -# -#encoding-alias-file /some/where/mdnalias.txt - -# -# `local-map' entry specifies TLD (top level domain) based local mapping -# schemes, which is performed before NAMEPREP. Available schemes of -# `local-map' are the same as those of the `nameprep-map' entry. -# -# syntax) -# local-map ... -# -# If the TLD of the domain name matches , local mapping specified -# by is performed on the name. Otherwise no mapping are -# performed. Multiple schemes can be specified; they are applied in -# turn. -# -# There are two special s for specifying a default mapping rule -# and a mapping rule for local names (domain names containing no -# dots). If is `.', its schemes are applied to domain names -# whose TLD does not match any TLDs specified in local-map entries. -# If is `-', its schemes are applied to domain names which -# contain no dots. -# -#local-map - filemap:/some/where/local.map -#local-map . filemap:/some/where/default.map -local-map .jp filemap:@mapdir@/jp.map - -# -# `delimiter-map' entry specifies local domain name delimiters mapped to -# `.'. -# -# syntax) -# delimiter-map ... -# -#[jp] delimiter-map U+3002 U+FF0E diff --git a/contrib/idn/mdnkit/lib/msgheader.c b/contrib/idn/mdnkit/lib/msgheader.c deleted file mode 100644 index 37dab3a05b..0000000000 --- a/contrib/idn/mdnkit/lib/msgheader.c +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: msgheader.c,v 1.1 2002/01/02 02:46:44 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define DNS_HEADER_SIZE 12 - -mdn_result_t -mdn_msgheader_parse(const char *msg, size_t msglen, mdn_msgheader_t *parsed) { - const unsigned char *p = (const unsigned char *)msg; - unsigned int v; - - assert(msg != NULL && parsed != NULL); - - TRACE(("mdn_msgheader_parse(msg=<%s>, msglen=%d)\n", - mdn_debug_hexdata(msg, msglen, 12), msglen)); - - if (msglen < DNS_HEADER_SIZE) - return (mdn_invalid_message); - -#define GET16(off) ((p[off]<<8)+p[(off)+1]) - parsed->id = GET16(0); - v = GET16(2); - parsed->qr = (v & 0x8000) != 0; - parsed->opcode = (v >> 11) & 0xf; - parsed->flags = (v >> 4) & 0x7f; - parsed->rcode = v & 0xf; - parsed->qdcount = GET16(4); - parsed->ancount = GET16(6); - parsed->nscount = GET16(8); - parsed->arcount = GET16(10); -#undef GET16 - - return (mdn_success); -} - -mdn_result_t -mdn_msgheader_unparse(mdn_msgheader_t *parsed, char *msg, size_t msglen) { - unsigned char *p = (unsigned char *)msg; - unsigned int v; - - assert(parsed != NULL && msg != NULL); - - TRACE(("mdn_msgheader_unparse()\n")); - - if (msglen < DNS_HEADER_SIZE) - return (mdn_buffer_overflow); - - v = ((parsed->qr & 1) << 15) + - ((parsed->opcode & 0xf) << 11) + - ((parsed->flags & 0x7f) << 4) + - (parsed->rcode & 0xf); - -#define PUT16(off, v) p[off] = ((v)>>8) & 0xff; p[(off)+1] = (v) & 0xff - PUT16(0, parsed->id); - PUT16(2, v); - PUT16(4, parsed->qdcount); - PUT16(6, parsed->ancount); - PUT16(8, parsed->nscount); - PUT16(10, parsed->arcount); -#undef PUT16 - - return (mdn_success); -} - -unsigned int -mdn_msgheader_getid(const char *msg) { - const unsigned char *p = (const unsigned char *)msg; - - return ((p[0] << 8) + p[1]); -} - -void -mdn_msgheader_setid(char *msg, unsigned int id) { - unsigned char *p = (unsigned char *)msg; - - p[0] = (id >> 8) & 0xff; - p[1] = id & 0xff; -} diff --git a/contrib/idn/mdnkit/lib/msgtrans.c b/contrib/idn/mdnkit/lib/msgtrans.c deleted file mode 100644 index 0b587c52d5..0000000000 --- a/contrib/idn/mdnkit/lib/msgtrans.c +++ /dev/null @@ -1,665 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: msgtrans.c,v 1.1 2002/01/02 02:46:45 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DNS_HEADER_SIZE 12 -#define DNAME_SIZE 512 -#define RRFORMAT_HASH_SIZE 47 - -/* - * Translation directions. - */ -enum { - transdir_query = 0, - transdir_reply = 1 -}; - -/* - * DNS opcodes. - */ -enum { - opcode_query = 0, - opcode_iquery = 1, - opcode_status = 2, - opcode_notify = 4, - opcode_update = 5 -}; - -/* - * Resource record types. - */ -enum { - rrtype_A = 1, - rrtype_NS = 2, - rrtype_MD = 3, - rrtype_MF = 4, - rrtype_CNAME = 5, - rrtype_SOA = 6, - rrtype_MB = 7, - rrtype_MG = 8, - rrtype_MR = 9, - rrtype_NULL = 10, - rrtype_WKS = 11, - rrtype_PTR = 12, - rrtype_HINFO = 13, - rrtype_MINFO = 14, - rrtype_MX = 15, - rrtype_TXT = 16, - rrtype_RP = 17, - rrtype_AFSDB = 18, - rrtype_X25 = 19, - rrtype_ISDN = 20, - rrtype_RT = 21, - rrtype_AAAA = 28 -}; - -/* - * Resource record classes. - */ -enum { - rrclass_IN = 1, - rrclass_CS = 2, - rrclass_CH = 3, - rrclass_ANY = 255 -}; - -typedef struct msgtrans_ctx { - int transdir; /* direction of translation */ - const char *in; /* input message */ - size_t in_len; /* length of it */ - const char *in_ptr; /* current pointer */ - size_t in_remain; /* # of remaining octets */ - char *out; /* output (translated) message */ - char *out_ptr; /* current pointer */ - size_t out_remain; /* # of remaining (available) octets */ - mdn__dn_t dn_ctx; /* for compression */ - mdn_resconf_t conf; /* translation parameters */ -} msgtrans_ctx_t; - -static struct rrformat { - unsigned int type; /* RR type */ - unsigned int class; /* RR class */ - const char *format; /* RDATA format */ - struct rrformat *next; /* hash chain */ -} rrformats[] = { - { rrtype_CNAME, rrclass_ANY, "D" }, - { rrtype_HINFO, rrclass_ANY, "TT" }, - { rrtype_MB, rrclass_ANY, "D" }, - { rrtype_MD, rrclass_ANY, "D" }, - { rrtype_MF, rrclass_ANY, "D" }, - { rrtype_MG, rrclass_ANY, "D" }, - { rrtype_MINFO, rrclass_ANY, "DD" }, - { rrtype_MR, rrclass_ANY, "D" }, - { rrtype_MX, rrclass_ANY, "SD" }, - { rrtype_NULL, rrclass_ANY, "R" }, - { rrtype_NS, rrclass_ANY, "D" }, - { rrtype_PTR, rrclass_ANY, "D" }, - { rrtype_SOA, rrclass_ANY, "DDLLLLL" }, - { rrtype_TXT, rrclass_ANY, "T" }, - { rrtype_A, rrclass_IN, "L" }, - { rrtype_WKS, rrclass_IN, "LCR" }, - { rrtype_RP, rrclass_ANY, "DD" }, - { rrtype_AFSDB, rrclass_ANY, "SD" }, - { rrtype_X25, rrclass_ANY, "T" }, - { rrtype_ISDN, rrclass_ANY, "TT" }, - { rrtype_RT, rrclass_ANY, "SD" }, - { rrtype_AAAA, rrclass_IN, "H" }, - { 0, 0, NULL }, -}; -static struct rrformat *rrformathash[RRFORMAT_HASH_SIZE]; - -/* - * Name translation instructions. - * - * For query, perform - * 1. local encoding to UTF-8 conversion - * 2. delimiter mapping - * 3. local mapping - * 4. nameprep - * 5. UTF-8 to IDN encoding conversion - * - * For reply, - * 1. IDN encoding to UTF-8 conversion - * 2. UTF-8 to local encoding conversion - * - * See mdn/res.h for the mnemonic. - */ -static const char *trans_insn[] = { - "ldMNI", /* insn for QUERY (transdir_query) */ - "i!NL", /* insn for REPLY (transdir_reply) */ -}; - -/* - * Labels of translation directions, used for log messages. - */ -static const char *trans_labels[] = { - "QUERY", /* QUERY (transdir_query) */ - "REPLY", /* REPLY (transdir_reply) */ -}; - -static mdn_result_t copy_header(msgtrans_ctx_t *ctx); -static mdn_result_t translate_question(msgtrans_ctx_t *ctx); -static mdn_result_t translate_rr(msgtrans_ctx_t *ctx); -static mdn_result_t translate_rdata(msgtrans_ctx_t *ctx, - unsigned int rr_type, - unsigned int rr_class, - unsigned int rr_length); -static const char *rdata_format(unsigned int rr_type, - unsigned int rr_class); -static mdn_result_t translate_domain(msgtrans_ctx_t *ctx); -static mdn_result_t get_domainname(msgtrans_ctx_t *ctx, char *buf, - size_t bufsize); -static mdn_result_t put_domainname(msgtrans_ctx_t *ctx, char *name); -static void ctx_init(msgtrans_ctx_t *ctx, - mdn_resconf_t conf, mdn_msgheader_t *header, - const char *msg, size_t msglen, - char *outbuf, size_t outbufsize); -static mdn_result_t copy_rest(msgtrans_ctx_t *ctx); -static mdn_result_t copy_message(msgtrans_ctx_t *ctx, size_t len); -static size_t output_length(msgtrans_ctx_t *ctx); -static void dump_message(const char *title, const char *p, - size_t length); - - -mdn_result_t -mdn_msgtrans_translate(mdn_resconf_t conf, - const char *msg, size_t msglen, - char *outbuf, size_t outbufsize, size_t *outmsglenp) -{ - mdn_result_t r; - msgtrans_ctx_t ctx; - mdn_msgheader_t header; - int i, n; - - assert(conf != NULL && msg != NULL && - outbuf != NULL && outbufsize > 0 && outmsglenp != NULL); - - TRACE(("mdn_msgtrans_translate(msg=<%s>,msglen=%d)\n", - mdn_debug_hexdata(msg, msglen, 64), msglen)); - - if (LOGLEVEL >= mdn_log_level_dump) - dump_message("before translation", msg, msglen); - - /* - * Check message length. - */ - if (msglen < DNS_HEADER_SIZE) { - INFO(("mdn_msgtrans_translate: incoming packet too short " - "(%d octets)\n", msglen)); - return (mdn_invalid_message); - } - - /* - * Parse message header. - */ - if ((r = mdn_msgheader_parse(msg, msglen, &header)) != mdn_success) { - WARNING(("mdn_msgtrans_translate: message header " - "parsing failed: %s\n", - mdn_result_tostring(r))); - return (r); - } - - /* - * Create translation context. - */ - ctx_init(&ctx, conf, &header, msg, msglen, outbuf, outbufsize); - - /* - * We handle only query, notify and update messages. - * Do not process others. - */ - switch (header.opcode) { - case opcode_query: - case opcode_notify: - case opcode_update: - break; - default: - INFO(("mdn_msgtrans_translate: pass through message " - "whose opcode is %d", header.opcode)); - if ((r = copy_rest(&ctx)) == mdn_success) - *outmsglenp = output_length(&ctx); - return (mdn_success); - } - - /* - * Copy header part verbatim. - */ - (void)copy_header(&ctx); - - /* - * Parse question/zone section. - */ - n = header.qdcount; - for (i = 0; i < n; i++) { - if ((r = translate_question(&ctx)) != mdn_success) - return (r); - } - - /* - * Translate other sections. - */ - n = header.ancount + header.nscount + header.arcount; - for (i = 0; i < n; i++) { - if ((r = translate_rr(&ctx)) != mdn_success) - return (r); - } - - if (LOGLEVEL >= mdn_log_level_dump) - dump_message("after translation", - ctx.out, output_length(&ctx)); - - /* - * Is there anything left out? - */ - if (ctx.in_remain != 0) { - WARNING(("mdn_msgtrans_translate: garbage at the end " - "(%d octets)\n", ctx.in_remain)); - /* don't consider this as an error. */ - /* return (mdn_invalid_message); */ - } - - *outmsglenp = output_length(&ctx); - return (mdn_success); -} - -static mdn_result_t -copy_header(msgtrans_ctx_t *ctx) { - return (copy_message(ctx, DNS_HEADER_SIZE)); -} - -static mdn_result_t -translate_question(msgtrans_ctx_t *ctx) { - mdn_result_t r; - char qname[DNAME_SIZE], qname_translated[DNAME_SIZE]; - - /* Get QNAME. */ - if ((r = get_domainname(ctx, qname, sizeof(qname))) != mdn_success) - return (r); - - INFO(("request of QNAME %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], mdn_debug_xstring(qname, 256))); - - /* Translate QNAME. */ - r = mdn_res_nameconv(ctx->conf, trans_insn[ctx->transdir], qname, - qname_translated, sizeof(qname_translated)); - if (r != mdn_success) - goto failure; - r = put_domainname(ctx, qname_translated); - if (r != mdn_success) - goto failure; - - /* Copy QTYPE and QCLASS */ - r = copy_message(ctx, 4); - if (r != mdn_success) - goto failure; - - INFO(("result of QNAME %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], - mdn_debug_xstring(qname_translated, 256))); - - return (mdn_success); - -failure: - INFO(("QNAME %s translation failed, %s\n", - trans_labels[ctx->transdir], mdn_result_tostring(r))); - return (r); -} - -static mdn_result_t -translate_rr(msgtrans_ctx_t *ctx) { - mdn_result_t r; - unsigned char *p; - unsigned int rr_type, rr_class, rr_length; - char dname[DNAME_SIZE], dname_translated[DNAME_SIZE]; - size_t length_before; - - /* Get NAME. */ - if ((r = get_domainname(ctx, dname, sizeof(dname))) != mdn_success) - return (r); - - INFO(("request of RR NAME %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], mdn_debug_xstring(dname, 256))); - - /* Translate NAME. */ - r = mdn_res_nameconv(ctx->conf, trans_insn[ctx->transdir], dname, - dname_translated, sizeof(dname_translated)); - if (r != mdn_success) - goto failure; - r = put_domainname(ctx, dname_translated); - if (r != mdn_success) - goto failure; - - /* Get TYPE and CLASS */ - if (ctx->in_remain < 10) { - r = mdn_invalid_message; - goto failure; - } - p = (unsigned char *)ctx->in_ptr; -#define GET16(off) ((p[off]<<8)+p[(off)+1]) - rr_type = GET16(0); - rr_class = GET16(2); - rr_length = GET16(8); -#undef GET16 - - /* Copy TYPE, CLASS, TTL and RDLENGTH. */ - r = copy_message(ctx, 10); - if (r != mdn_success) - goto failure; - - /* Remember the current output length. */ - length_before = output_length(ctx); - - /* Translate RDATA. */ - r = translate_rdata(ctx, rr_type, rr_class, rr_length); - if (r != mdn_success) - goto failure; - - /* Reset RDLENGTH */ - rr_length = output_length(ctx) - length_before; - ctx->out[length_before - 2] = (rr_length >> 8) & 0xff; - ctx->out[length_before - 1] = rr_length & 0xff; - - INFO(("result of RR NAME %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], - mdn_debug_xstring(dname_translated, 256))); - - return (r); - -failure: - INFO(("RR NAME %s translation failed, %s\n", - trans_labels[ctx->transdir], mdn_result_tostring(r))); - return (r); -} - -static mdn_result_t -translate_rdata(msgtrans_ctx_t *ctx, unsigned int rr_type, - unsigned int rr_class, unsigned int rr_length) -{ - const char *format; - int c; - - if ((format = rdata_format(rr_type, rr_class)) == NULL) { - INFO(("mdn_msgtrans: unknown resource record type %d " - "pass through\n", rr_type)); - return (copy_message(ctx, rr_length)); - } - - while ((c = *format++) != '\0') { - int copy_len; - mdn_result_t r; - - switch (c) { - case 'D': /* domain name */ - { - int remain_org = ctx->in_remain; - - if ((r = translate_domain(ctx)) != mdn_success) - return (r); - rr_length -= remain_org - ctx->in_remain; - continue; - } - case 'T': /* character string */ - copy_len = *((unsigned char *)ctx->in_ptr) + 1; - break; - case 'C': /* 1-octet value */ - copy_len = 1; - break; - case 'S': /* 2-octet value */ - copy_len = 2; - break; - case 'L': /* 4-octet value */ - copy_len = 4; - break; - case 'H': /* 16-octet value (AAAA) */ - copy_len = 16; - break; - case 'R': /* the rest */ - copy_len = rr_length; - break; - default: - copy_len = 0; /* for gcc -Wall */ - FATAL(("mdn_msgtrans: internal error -- " - "unknown format character %c", c)); - /* NOTREACHED */ - break; - } - if ((r = copy_message(ctx, copy_len)) != mdn_success) - return (r); - rr_length -= copy_len; - } - return (mdn_success); -} - -static const char * -rdata_format(unsigned int rr_type, unsigned int rr_class) { - static int initialized; - struct rrformat *rp; - int h; - - if (!initialized) { - /* - * Build hash table. - */ - for (rp = rrformats; rp->format != NULL; rp++) { - h = rp->type % RRFORMAT_HASH_SIZE; - rp->next = rrformathash[h]; - rrformathash[h] = rp; - } - initialized = 1; - } - - /* - * Find the element with the specified type and class. - */ - h = rr_type % RRFORMAT_HASH_SIZE; - for (rp = rrformathash[h]; rp != NULL; rp = rp->next) { - if (rp->type == rr_type && - (rp->class == rr_class || rp->class == rrclass_ANY)) - return (rp->format); - } - return (NULL); -} - -static mdn_result_t -translate_domain(msgtrans_ctx_t *ctx) { - mdn_result_t r; - char dname[DNAME_SIZE], dname_translated[DNAME_SIZE]; - - /* Get NAME. */ - if ((r = get_domainname(ctx, dname, sizeof(dname))) != mdn_success) - return (r); - - INFO(("request of RDATA %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], mdn_debug_xstring(dname, 256))); - - /* Translate NAME. */ - r = mdn_res_nameconv(ctx->conf, trans_insn[ctx->transdir], dname, - dname_translated, sizeof(dname_translated)); - if (r != mdn_success) - goto failure; - if ((r = put_domainname(ctx, dname_translated)) != mdn_success) - goto failure; - - INFO(("result of RDATA %s translation: name=\"%s\"\n", - trans_labels[ctx->transdir], - mdn_debug_xstring(dname_translated, 256))); - - return (mdn_success); - -failure: - INFO(("RDATA %s translation failed, %s\n", - trans_labels[ctx->transdir], mdn_result_tostring(r))); - return (r); -} - -static mdn_result_t -get_domainname(msgtrans_ctx_t *ctx, char *buf, size_t bufsize) { - mdn_result_t r; - size_t n; - - r = mdn__dn_expand(ctx->in, ctx->in_len, ctx->in_ptr, - buf, bufsize, &n); - if (r == mdn_success) { - ctx->in_ptr += n; - ctx->in_remain -= n; - } - return (r); -} - -static mdn_result_t -put_domainname(msgtrans_ctx_t *ctx, char *name) { - mdn_result_t r; - size_t n; - - r = mdn__dn_compress(name, ctx->out_ptr, ctx->out_remain, - &ctx->dn_ctx, &n); - if (r == mdn_success) { - ctx->out_ptr += n; - ctx->out_remain -= n; - } - return (r); -} - -static void -ctx_init(msgtrans_ctx_t *ctx, mdn_resconf_t conf, mdn_msgheader_t *header, - const char *msg, size_t msglen, char *outbuf, size_t outbufsize) -{ - ctx->transdir = (header->qr == 0) ? transdir_query : transdir_reply; - ctx->in = ctx->in_ptr = msg; - ctx->in_len = ctx->in_remain = msglen; - ctx->out = ctx->out_ptr = outbuf; - ctx->out_remain = outbufsize; - mdn__dn_initcompress(&ctx->dn_ctx, outbuf); - ctx->conf = conf; -} - -static mdn_result_t -copy_rest(msgtrans_ctx_t *ctx) { - return (copy_message(ctx, ctx->in_remain)); -} - -static mdn_result_t -copy_message(msgtrans_ctx_t *ctx, size_t len) { - assert(ctx != NULL); - - if (ctx->in_remain < len) - return (mdn_invalid_message); - - if (ctx->out_remain < len) - return (mdn_buffer_overflow); - - (void)memcpy(ctx->out_ptr, ctx->in_ptr, len); - - ctx->in_ptr += len; - ctx->in_remain -= len; - ctx->out_ptr += len; - ctx->out_remain -= len; - - return (mdn_success); -} - -static size_t -output_length(msgtrans_ctx_t *ctx) { - return (ctx->out_ptr - ctx->out); -} - -static void -dump_message(const char *title, const char *p, size_t length) { - DUMP(("message (%s): length %d\n", title, length)); - while (length > 0) { - int len = length < 16 ? length : 16; - DUMP((" %s\n", mdn_debug_hexdata(p, len, 16))); - p += len; - length -= len; - } -} diff --git a/contrib/idn/mdnkit/lib/nameprep.c b/contrib/idn/mdnkit/lib/nameprep.c deleted file mode 100644 index 286cff4d05..0000000000 --- a/contrib/idn/mdnkit/lib/nameprep.c +++ /dev/null @@ -1,301 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: nameprep.c,v 1.2 2002/02/08 05:40:23 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define UCS_MAX 0x7fffffff -#define UNICODE_MAX 0x10ffff - -/* - * The latest version. - */ -#define NAMEPREP_CURRENT "nameprep-05" - -/* - * Load NAMEPREP compiled tables. - */ -#include "nameprepdata.c" - -/* - * Define mapping/checking functions for each version of the draft. - */ - -#define VERSION id03 -#include "nameprep_template.c" -#undef VERSION - -#define VERSION id05 -#include "nameprep_template.c" -#undef VERSION - -#define VERSION id06 -#include "nameprep_template.c" -#undef VERSION - -typedef const char *(*nameprep_mapproc)(unsigned long v); -typedef int (*nameprep_checkproc)(unsigned long v); - -static struct mdn_nameprep { - char *version; - nameprep_mapproc map_proc; - nameprep_checkproc prohibited_proc; - nameprep_checkproc unassigned_proc; -} nameprep_versions[] = { -#define MAKE_NAMEPREP_HANDLE(version, id) \ - { version, \ - compose_sym2(nameprep_map_, id), \ - compose_sym2(nameprep_prohibited_, id), \ - compose_sym2(nameprep_unassigned_, id) } - MAKE_NAMEPREP_HANDLE("nameprep-03", id03), - MAKE_NAMEPREP_HANDLE("nameprep-05", id05), - MAKE_NAMEPREP_HANDLE("nameprep-06", id06), - { NULL, NULL, NULL }, -}; - -static mdn_result_t mdn_nameprep_check(nameprep_checkproc proc, - const char *str, - const char **found); - -mdn_result_t -mdn_nameprep_create(const char *version, mdn_nameprep_t *handlep) { - mdn_nameprep_t handle; - - assert(handlep != NULL); - - TRACE(("mdn_nameprep_create(version=%-.50s)\n", - version == NULL ? "" : version)); - - if (version == NULL) - version = NAMEPREP_CURRENT; - - /* - * Lookup table for the specified version. Since the number of - * versions won't be large (I don't want see draft-23 or such :-), - * simple linear search is OK. - */ - for (handle = nameprep_versions; handle->version != NULL; handle++) { - if (strcmp(handle->version, version) == 0) { - *handlep = handle; - return (mdn_success); - } - } - return (mdn_notfound); -} - -void -mdn_nameprep_destroy(mdn_nameprep_t handle) { - assert(handle != NULL); - - TRACE(("mdn_nameprep_destroy()\n")); - - /* Nothing to do. */ -} - -mdn_result_t -mdn_nameprep_map(mdn_nameprep_t handle, const char *from, - char *to, size_t tolen) { - size_t fromlen; - - assert(handle != NULL && from != NULL && to != NULL); - - TRACE(("mdn_nameprep_map(from=\"%s\")\n", - mdn_debug_xstring(from, 50))); - - fromlen = strlen(from); - while (fromlen > 0) { - unsigned long v; - int w; - const char *mapped; - - if ((w = mdn_utf8_getwc(from, fromlen, &v)) == 0) - return (mdn_invalid_encoding); - - if (v > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (mdn_invalid_codepoint); - } else if (v > UNICODE_MAX) { - /* No mapping is possible. */ - mapped = NULL; - } else { - /* Try mapping. */ - mapped = (*handle->map_proc)(v); - } - - if (mapped == NULL) { - /* No mapping. Just copy verbatim. */ - if (tolen < w) - return (mdn_buffer_overflow); - (void)memcpy(to, from, w); - to += w; - tolen -= w; - } else { - size_t mappedlen = strlen(mapped); - - if (tolen < mappedlen) - return (mdn_buffer_overflow); - (void)memcpy(to, mapped, mappedlen); - to += mappedlen; - tolen -= mappedlen; - } - from += w; - fromlen -= w; - } - if (tolen == 0) - return (mdn_buffer_overflow); - *to = '\0'; - return (mdn_success); -} - -mdn_result_t -mdn_nameprep_isprohibited(mdn_nameprep_t handle, const char *str, - const char **found) -{ - assert(handle != NULL && str != NULL && found != NULL); - - TRACE(("mdn_nameprep_isprohibited(str=\"%s\")\n", - mdn_debug_xstring(str, 50))); - - return (mdn_nameprep_check(handle->prohibited_proc, str, found)); -} - -mdn_result_t -mdn_nameprep_isunassigned(mdn_nameprep_t handle, const char *str, - const char **found) -{ - assert(handle != NULL && str != NULL && found != NULL); - - TRACE(("mdn_nameprep_isunassigned(str=\"%s\")\n", - mdn_debug_xstring(str, 50))); - - return (mdn_nameprep_check(handle->unassigned_proc, str, found)); -} - -static mdn_result_t -mdn_nameprep_check(nameprep_checkproc proc, const char *str, - const char **found) -{ - size_t len; - - len = strlen(str); - while (len > 0) { - unsigned long v; - int w; - - if ((w = mdn_utf8_getwc(str, len, &v)) == 0) - return (mdn_invalid_encoding); - - if (v > UCS_MAX) { - /* This cannot happen, but just in case.. */ - return (mdn_invalid_codepoint); - } else if (v > UNICODE_MAX) { - /* It is invalid.. */ - *found = str; - return (mdn_success); - } else if ((*proc)(v)) { - *found = str; - return (mdn_success); - } - - str += w; - len -= w; - } - *found = NULL; - return (mdn_success); -} - -mdn_result_t -mdn__nameprep_createproc(const char *parameter, void **handlep) { - return mdn_nameprep_create(parameter, (mdn_nameprep_t *)handlep); -} - -void -mdn__nameprep_destroyproc(void *handle) { - mdn_nameprep_destroy((mdn_nameprep_t)handle); -} - -mdn_result_t -mdn__nameprep_mapproc(void *handle, const char *from, char *to, size_t tolen) { - return mdn_nameprep_map((mdn_nameprep_t)handle, from, to, tolen); -} - -mdn_result_t -mdn__nameprep_prohibitproc(void *handle, const char *str, const char **found) { - return mdn_nameprep_isprohibited((mdn_nameprep_t)handle, str, found); -} - -mdn_result_t -mdn__nameprep_unassignedproc(void *handle, const char *str, - const char **found) { - return mdn_nameprep_isunassigned((mdn_nameprep_t)handle, str, found); -} - diff --git a/contrib/idn/mdnkit/lib/nameprep_template.c b/contrib/idn/mdnkit/lib/nameprep_template.c deleted file mode 100644 index 4b327b3f7e..0000000000 --- a/contrib/idn/mdnkit/lib/nameprep_template.c +++ /dev/null @@ -1,136 +0,0 @@ -/* $Id: nameprep_template.c,v 1.2 2002/02/08 05:40:24 marka Exp $ */ - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* - * Include this file once for each version of NAMEPREP. - * VERSION should be defined to appropriate value before inclusion. - */ - -#ifndef NAMEPREP_TEMPLATE_INIT -#define NAMEPREP_TEMPLATE_INIT - -/* Symbol composition. */ -#define compose_sym2(a, b) compose_sym2X(a, b) -#define compose_sym2X(a, b) a ## b -#define compose_sym3(a, b, c) compose_sym3X(a, b, c) -#define compose_sym3X(a, b, c) a ## b ## c - -/* Index calculation for multi-level index tables. */ -#define IDX0(type, v) IDX_0(v, BITS1(type), BITS2(type)) -#define IDX1(type, v) IDX_1(v, BITS1(type), BITS2(type)) -#define IDX2(type, v) IDX_2(v, BITS1(type), BITS2(type)) - -#define IDX_0(v, bits1, bits2) ((v) >> ((bits1) + (bits2))) -#define IDX_1(v, bits1, bits2) (((v) >> (bits2)) & ((1 << (bits1)) - 1)) -#define IDX_2(v, bits1, bits2) ((v) & ((1 << (bits2)) - 1)) - -#define BITS1(type) type ## _BITS_1 -#define BITS2(type) type ## _BITS_2 - -#endif /* NAMEPREP_TEMPLATE_INIT */ - -static const char * -compose_sym2(nameprep_map_, VERSION) (unsigned long v) { - int idx0 = IDX0(MAP, v); - int idx1 = IDX1(MAP, v); - int idx2 = IDX2(MAP, v); - int offset; - -#define IMAP compose_sym3(nameprep_, VERSION, _map_imap) -#define TABLE compose_sym3(nameprep_, VERSION, _map_table) -#define DATA compose_sym3(nameprep_, VERSION, _map_data) - offset = TABLE[IMAP[IMAP[idx0] + idx1]].tbl[idx2]; - if (offset == 0) - return (NULL); /* no mapping */ - return (const char *)(DATA + offset); -#undef IMAP -#undef TABLE -#undef DATA -} - -static int -compose_sym2(nameprep_prohibited_, VERSION) (unsigned long v) { - int idx0 = IDX0(PROH, v); - int idx1 = IDX1(PROH, v); - int idx2 = IDX2(PROH, v); - const unsigned char *bm; - -#define IMAP compose_sym3(nameprep_, VERSION, _prohibited_imap) -#define BITMAP compose_sym3(nameprep_, VERSION, _prohibited_bitmap) - bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; - return (bm[idx2 / 8] & (1 << (idx2 % 8))); -#undef IMAP -#undef BITMAP -} - -static int -compose_sym2(nameprep_unassigned_, VERSION) (unsigned long v) { - int idx0 = IDX0(UNAS, v); - int idx1 = IDX1(UNAS, v); - int idx2 = IDX2(UNAS, v); - const unsigned char *bm; - -#define IMAP compose_sym3(nameprep_, VERSION, _unassigned_imap) -#define BITMAP compose_sym3(nameprep_, VERSION, _unassigned_bitmap) - bm = BITMAP[IMAP[IMAP[idx0] + idx1]].bm; - return (bm[idx2 / 8] & (1 << (idx2 % 8))); -#undef IMAP -#undef BITMAP -} diff --git a/contrib/idn/mdnkit/lib/nameprepdata.c b/contrib/idn/mdnkit/lib/nameprepdata.c deleted file mode 100644 index ee46228d56..0000000000 --- a/contrib/idn/mdnkit/lib/nameprepdata.c +++ /dev/null @@ -1,2726 +0,0 @@ -/* $Id: nameprepdata.c,v 1.2 2002/02/08 05:40:26 marka Exp $ */ -/* $-Id: generate_nameprep_data.pl,v 1.5 2001/10/31 08:51:30 m-kasahr Exp -$ */ -/* - * Do not edit this file! - * This file is generated from NAMEPREP specification. - */ - -#define MAP_BITS_0 9 -#define MAP_BITS_1 7 -#define MAP_BITS_2 5 - -#define PROH_BITS_0 7 -#define PROH_BITS_1 7 -#define PROH_BITS_2 7 - -#define UNAS_BITS_0 7 -#define UNAS_BITS_1 7 -#define UNAS_BITS_2 7 - -static const unsigned short nameprep_id03_map_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 1, 0, 0, 2, 3, 0, - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 14, 15, 16, 17, 18, 19, - 20, 21, 0, 22, 23, 24, 25, 26, - 0, 27, 28, 0, 29, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 0, 0, 0, 0, 48, 0, 0, - 49, 50, 0, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 52, 53, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 54, 55, 56, 57, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 59, - 0, 60, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} nameprep_id03_map_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 54, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, - 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, - 123, 0, 126, 129, 132, 135, 138, 141, 144, 147, - }}, - {{ - 150, 0, 153, 0, 156, 0, 159, 0, 162, 0, 165, - 0, 168, 0, 171, 0, 174, 0, 177, 0, 180, 0, - 183, 0, 186, 0, 189, 0, 192, 0, 195, 0, - }}, - {{ - 198, 0, 201, 0, 204, 0, 207, 0, 210, 0, 213, - 0, 216, 0, 219, 0, 17, 17, 222, 0, 225, 0, - 228, 0, 0, 231, 0, 234, 0, 237, 0, 240, - }}, - {{ - 0, 243, 0, 246, 0, 249, 0, 252, 0, 255, 259, - 0, 262, 0, 265, 0, 268, 0, 271, 0, 274, 0, - 277, 0, 280, 0, 283, 0, 286, 0, 289, 0, - }}, - {{ - 292, 0, 295, 0, 298, 0, 301, 0, 304, 0, 307, - 0, 310, 0, 313, 0, 316, 0, 319, 0, 322, 0, - 325, 0, 328, 331, 0, 334, 0, 337, 0, 37, - }}, - {{ - 0, 340, 343, 0, 346, 0, 349, 352, 0, 355, 358, - 361, 0, 0, 364, 367, 370, 373, 0, 376, 379, 0, - 382, 385, 388, 0, 0, 0, 391, 394, 0, 397, - }}, - {{ - 400, 0, 403, 0, 406, 0, 409, 412, 0, 415, 0, - 0, 418, 0, 421, 424, 0, 427, 430, 433, 0, 436, - 0, 439, 442, 0, 0, 0, 445, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 448, 448, 0, 451, 451, 0, 454, - 454, 0, 457, 0, 460, 0, 463, 0, 466, 0, 469, - 0, 472, 0, 475, 0, 478, 0, 0, 481, 0, - }}, - {{ - 484, 0, 487, 0, 490, 0, 493, 0, 496, 0, 499, - 0, 502, 0, 505, 0, 508, 512, 512, 0, 515, 0, - 518, 521, 524, 0, 527, 0, 530, 0, 533, 0, - }}, - {{ - 536, 0, 539, 0, 542, 0, 545, 0, 548, 0, 551, - 0, 554, 0, 557, 0, 560, 0, 563, 0, 566, 0, - 569, 0, 572, 0, 575, 0, 578, 0, 581, 0, - }}, - {{ - 0, 0, 584, 0, 587, 0, 590, 0, 593, 0, 596, - 0, 599, 0, 602, 0, 605, 0, 608, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 611, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 614, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 618, 0, 621, 624, 627, - 0, 630, 0, 633, 636, 639, 646, 649, 652, 655, 658, - 661, 664, 667, 611, 670, 673, 54, 676, 679, 682, - }}, - {{ - 685, 688, 0, 691, 694, 697, 700, 703, 706, 709, 712, - 715, 0, 0, 0, 0, 718, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 691, 691, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 649, 667, 697, 633, 715, 700, - 685, 0, 0, 0, 725, 0, 728, 0, 731, 0, - }}, - {{ - 734, 0, 737, 0, 740, 0, 743, 0, 746, 0, 749, - 0, 752, 0, 755, 0, 670, 688, 691, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 758, 761, 764, 767, 770, 773, 776, 779, 782, 785, 788, - 791, 794, 797, 800, 803, 806, 809, 812, 815, 818, 821, - 824, 827, 830, 833, 836, 839, 842, 845, 848, 851, - }}, - {{ - 854, 857, 860, 863, 866, 869, 872, 875, 878, 881, 884, - 887, 890, 893, 896, 899, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 902, 0, 905, 0, 908, 0, 911, 0, 914, 0, 917, - 0, 920, 0, 923, 0, 926, 0, 929, 0, 932, 0, - 935, 0, 938, 0, 941, 0, 944, 0, 947, 0, - }}, - {{ - 950, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 953, 0, 956, 0, 959, 0, 962, 0, 965, 0, - 968, 0, 971, 0, 974, 0, 977, 0, 980, 0, - }}, - {{ - 983, 0, 986, 0, 989, 0, 992, 0, 995, 0, 998, - 0, 1001, 0, 1004, 0, 1007, 0, 1010, 0, 1013, 0, - 1016, 0, 1019, 0, 1022, 0, 1025, 0, 1028, 0, - }}, - {{ - 0, 1031, 0, 1034, 0, 0, 0, 1037, 0, 0, 0, - 1040, 0, 0, 0, 0, 1043, 0, 1046, 0, 1049, 0, - 1052, 0, 1055, 0, 1058, 0, 1061, 0, 1064, 0, - }}, - {{ - 1067, 0, 1070, 0, 1073, 0, 1076, 0, 1079, 0, 1082, - 0, 1085, 0, 1088, 0, 1091, 0, 1094, 0, 1097, 0, - 0, 0, 1100, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1103, 1106, 1109, 1112, 1115, - 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, 1142, 1145, - }}, - {{ - 1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, - 1181, 1184, 1187, 1190, 1193, 1196, 1199, 1202, 1205, 1208, 1211, - 1214, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 1217, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, - 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1222, 0, 1226, 0, 1230, 0, 1234, 0, 1238, 0, 1242, - 0, 1246, 0, 1250, 0, 1254, 0, 1258, 0, 1262, 0, - 1266, 0, 1270, 0, 1274, 0, 1278, 0, 1282, 0, - }}, - {{ - 1286, 0, 1290, 0, 1294, 0, 1298, 0, 1302, 0, 1306, - 0, 1310, 0, 1314, 0, 1318, 0, 1322, 0, 1326, 0, - 1330, 0, 1334, 0, 1338, 0, 1342, 0, 1346, 0, - }}, - {{ - 1350, 0, 1354, 0, 1358, 0, 1362, 0, 1366, 0, 1370, - 0, 1374, 0, 1378, 0, 1382, 0, 1386, 0, 1390, 0, - 1394, 0, 1398, 0, 1402, 0, 1406, 0, 1410, 0, - }}, - {{ - 1414, 0, 1418, 0, 1422, 0, 1426, 0, 1430, 0, 1434, - 0, 1438, 0, 1442, 0, 1446, 0, 1450, 0, 1454, 0, - 1458, 0, 1462, 0, 1466, 0, 1470, 0, 1474, 0, - }}, - {{ - 1478, 0, 1482, 0, 1486, 0, 1490, 0, 1494, 0, 1498, - 0, 1502, 0, 1506, 0, 1510, 0, 1514, 0, 1518, 0, - 1522, 1526, 1530, 1534, 1538, 1414, 0, 0, 0, 0, - }}, - {{ - 1542, 0, 1546, 0, 1550, 0, 1554, 0, 1558, 0, 1562, - 0, 1566, 0, 1570, 0, 1574, 0, 1578, 0, 1582, 0, - 1586, 0, 1590, 0, 1594, 0, 1598, 0, 1602, 0, - }}, - {{ - 1606, 0, 1610, 0, 1614, 0, 1618, 0, 1622, 0, 1626, - 0, 1630, 0, 1634, 0, 1638, 0, 1642, 0, 1646, 0, - 1650, 0, 1654, 0, 1658, 0, 1662, 0, 1666, 0, - }}, - {{ - 1670, 0, 1674, 0, 1678, 0, 1682, 0, 1686, 0, 1690, - 0, 1694, 0, 1698, 0, 1702, 0, 1706, 0, 1710, 0, - 1714, 0, 1718, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1722, 1726, 1730, - 1734, 1738, 1742, 1746, 1750, 0, 0, 0, 0, 0, 0, - 0, 0, 1754, 1758, 1762, 1766, 1770, 1774, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1778, 1782, 1786, - 1790, 1794, 1798, 1802, 1806, 0, 0, 0, 0, 0, 0, - 0, 0, 1810, 1814, 1818, 1822, 1826, 1830, 1834, 1838, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1842, 1846, 1850, - 1854, 1858, 1862, 0, 0, 1866, 0, 1871, 0, 1878, 0, - 1885, 0, 0, 1892, 0, 1896, 0, 1900, 0, 1904, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1908, 1912, 1916, - 1920, 1924, 1928, 1932, 1936, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1940, 1946, 1952, 1958, 1964, 1970, 1976, 1982, 1940, 1946, 1952, - 1958, 1964, 1970, 1976, 1982, 1988, 1994, 2000, 2006, 2012, 2018, - 2024, 2030, 1988, 1994, 2000, 2006, 2012, 2018, 2024, 2030, - }}, - {{ - 2036, 2042, 2048, 2054, 2060, 2066, 2072, 2078, 2036, 2042, 2048, - 2054, 2060, 2066, 2072, 2078, 0, 0, 2084, 2090, 2095, 0, - 2100, 2105, 2112, 2116, 2120, 2124, 2090, 0, 611, 0, - }}, - {{ - 0, 0, 2128, 2134, 2139, 0, 2144, 2149, 2156, 2160, 2164, - 2168, 2134, 0, 0, 0, 0, 0, 2172, 639, 0, 0, - 2179, 2184, 2191, 2195, 2199, 2203, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2207, 718, 2214, 0, 2219, 2224, 2231, 2235, 2239, - 2243, 2247, 0, 0, 0, 0, 0, 2251, 2257, 2262, 0, - 2267, 2272, 2279, 2283, 2287, 2291, 2257, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2295, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 5, 2298, 0, 0, 0, 370, 0, 2302, 0, - 15, 15, 15, 0, 0, 17, 17, 23, 0, 0, 27, - 2306, 0, 0, 31, 33, 35, 35, 35, 0, 0, - }}, - {{ - 2309, 2312, 2316, 0, 51, 0, 709, 0, 51, 0, 21, - 72, 3, 5, 0, 0, 9, 11, 0, 25, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2319, 2323, 2327, 2331, 2335, 2339, 2343, 2347, 2351, 2355, 2359, - 2363, 2367, 2371, 2375, 2379, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2383, 2387, 2391, 2395, 2399, 2403, 2407, 2411, 2415, 2419, - }}, - {{ - 2423, 2427, 2431, 2435, 2439, 2443, 2447, 2451, 2455, 2459, 2463, - 2467, 2471, 2475, 2479, 2483, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2487, 0, 2491, 0, 2494, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2497, 2500, 2503, 2507, 2510, 2513, 2516, 2519, 0, 0, 2522, - 2525, 2528, 0, 0, 0, 2532, 2535, 2539, 2543, 2547, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2497, 2551, - 2555, 2559, 0, 0, 0, 0, 0, 0, 0, 2563, 2566, - 2569, 2573, 2576, 2573, 2579, 2582, 2585, 2589, 2592, 2589, - }}, - {{ - 2595, 2599, 0, 2603, 0, 0, 2606, 2613, 2617, 2620, 0, - 2623, 0, 2626, 2629, 0, 0, 0, 0, 0, 0, 0, - 0, 2632, 0, 2635, 2639, 0, 2642, 2645, 0, 0, - }}, - {{ - 2648, 2651, 2654, 2657, 2661, 2665, 2665, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2668, 2673, 2678, - 2683, 2688, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - }}, - {{ - 0, 2693, 2697, 2701, 2705, 2709, 2713, 2717, 2721, 2725, 2729, - 2733, 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2765, 2769, 2773, - 2777, 2781, 2785, 2789, 2793, 0, 0, 0, 0, 0, - }}, -}; - -static const unsigned char nameprep_id03_map_data[] = { - 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, - 0, 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, - 0, 109, 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, - 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, - 0, 121, 0, 122, 0, 0, 206, 188, 0, 195, 160, 0, - 195, 161, 0, 195, 162, 0, 195, 163, 0, 195, 164, 0, - 195, 165, 0, 195, 166, 0, 195, 167, 0, 195, 168, 0, - 195, 169, 0, 195, 170, 0, 195, 171, 0, 195, 172, 0, - 195, 173, 0, 195, 174, 0, 195, 175, 0, 195, 176, 0, - 195, 177, 0, 195, 178, 0, 195, 179, 0, 195, 180, 0, - 195, 181, 0, 195, 182, 0, 195, 184, 0, 195, 185, 0, - 195, 186, 0, 195, 187, 0, 195, 188, 0, 195, 189, 0, - 195, 190, 0, 115, 115, 0, 196, 129, 0, 196, 131, 0, - 196, 133, 0, 196, 135, 0, 196, 137, 0, 196, 139, 0, - 196, 141, 0, 196, 143, 0, 196, 145, 0, 196, 147, 0, - 196, 149, 0, 196, 151, 0, 196, 153, 0, 196, 155, 0, - 196, 157, 0, 196, 159, 0, 196, 161, 0, 196, 163, 0, - 196, 165, 0, 196, 167, 0, 196, 169, 0, 196, 171, 0, - 196, 173, 0, 196, 175, 0, 196, 179, 0, 196, 181, 0, - 196, 183, 0, 196, 186, 0, 196, 188, 0, 196, 190, 0, - 197, 128, 0, 197, 130, 0, 197, 132, 0, 197, 134, 0, - 197, 136, 0, 202, 188, 110, 0, 197, 139, 0, 197, 141, - 0, 197, 143, 0, 197, 145, 0, 197, 147, 0, 197, 149, - 0, 197, 151, 0, 197, 153, 0, 197, 155, 0, 197, 157, - 0, 197, 159, 0, 197, 161, 0, 197, 163, 0, 197, 165, - 0, 197, 167, 0, 197, 169, 0, 197, 171, 0, 197, 173, - 0, 197, 175, 0, 197, 177, 0, 197, 179, 0, 197, 181, - 0, 197, 183, 0, 195, 191, 0, 197, 186, 0, 197, 188, - 0, 197, 190, 0, 201, 147, 0, 198, 131, 0, 198, 133, - 0, 201, 148, 0, 198, 136, 0, 201, 150, 0, 201, 151, - 0, 198, 140, 0, 199, 157, 0, 201, 153, 0, 201, 155, - 0, 198, 146, 0, 201, 160, 0, 201, 163, 0, 201, 169, - 0, 201, 168, 0, 198, 153, 0, 201, 175, 0, 201, 178, - 0, 201, 181, 0, 198, 161, 0, 198, 163, 0, 198, 165, - 0, 202, 128, 0, 198, 168, 0, 202, 131, 0, 198, 173, - 0, 202, 136, 0, 198, 176, 0, 202, 138, 0, 202, 139, - 0, 198, 180, 0, 198, 182, 0, 202, 146, 0, 198, 185, - 0, 198, 189, 0, 199, 134, 0, 199, 137, 0, 199, 140, - 0, 199, 142, 0, 199, 144, 0, 199, 146, 0, 199, 148, - 0, 199, 150, 0, 199, 152, 0, 199, 154, 0, 199, 156, - 0, 199, 159, 0, 199, 161, 0, 199, 163, 0, 199, 165, - 0, 199, 167, 0, 199, 169, 0, 199, 171, 0, 199, 173, - 0, 199, 175, 0, 106, 204, 140, 0, 199, 179, 0, 199, - 181, 0, 198, 149, 0, 198, 191, 0, 199, 185, 0, 199, - 187, 0, 199, 189, 0, 199, 191, 0, 200, 129, 0, 200, - 131, 0, 200, 133, 0, 200, 135, 0, 200, 137, 0, 200, - 139, 0, 200, 141, 0, 200, 143, 0, 200, 145, 0, 200, - 147, 0, 200, 149, 0, 200, 151, 0, 200, 153, 0, 200, - 155, 0, 200, 157, 0, 200, 159, 0, 200, 163, 0, 200, - 165, 0, 200, 167, 0, 200, 169, 0, 200, 171, 0, 200, - 173, 0, 200, 175, 0, 200, 177, 0, 200, 179, 0, 206, - 185, 0, 32, 206, 185, 0, 206, 172, 0, 206, 173, 0, - 206, 174, 0, 206, 175, 0, 207, 140, 0, 207, 141, 0, - 207, 142, 0, 206, 185, 204, 136, 204, 129, 0, 206, 177, - 0, 206, 178, 0, 206, 179, 0, 206, 180, 0, 206, 181, - 0, 206, 182, 0, 206, 183, 0, 206, 184, 0, 206, 186, - 0, 206, 187, 0, 206, 189, 0, 206, 190, 0, 206, 191, - 0, 207, 128, 0, 207, 129, 0, 207, 130, 0, 207, 132, - 0, 207, 133, 0, 207, 134, 0, 207, 135, 0, 207, 136, - 0, 207, 137, 0, 207, 138, 0, 207, 139, 0, 207, 133, - 204, 136, 204, 129, 0, 207, 155, 0, 207, 157, 0, 207, - 159, 0, 207, 161, 0, 207, 163, 0, 207, 165, 0, 207, - 167, 0, 207, 169, 0, 207, 171, 0, 207, 173, 0, 207, - 175, 0, 209, 144, 0, 209, 145, 0, 209, 146, 0, 209, - 147, 0, 209, 148, 0, 209, 149, 0, 209, 150, 0, 209, - 151, 0, 209, 152, 0, 209, 153, 0, 209, 154, 0, 209, - 155, 0, 209, 156, 0, 209, 157, 0, 209, 158, 0, 209, - 159, 0, 208, 176, 0, 208, 177, 0, 208, 178, 0, 208, - 179, 0, 208, 180, 0, 208, 181, 0, 208, 182, 0, 208, - 183, 0, 208, 184, 0, 208, 185, 0, 208, 186, 0, 208, - 187, 0, 208, 188, 0, 208, 189, 0, 208, 190, 0, 208, - 191, 0, 209, 128, 0, 209, 129, 0, 209, 130, 0, 209, - 131, 0, 209, 132, 0, 209, 133, 0, 209, 134, 0, 209, - 135, 0, 209, 136, 0, 209, 137, 0, 209, 138, 0, 209, - 139, 0, 209, 140, 0, 209, 141, 0, 209, 142, 0, 209, - 143, 0, 209, 161, 0, 209, 163, 0, 209, 165, 0, 209, - 167, 0, 209, 169, 0, 209, 171, 0, 209, 173, 0, 209, - 175, 0, 209, 177, 0, 209, 179, 0, 209, 181, 0, 209, - 183, 0, 209, 185, 0, 209, 187, 0, 209, 189, 0, 209, - 191, 0, 210, 129, 0, 210, 141, 0, 210, 143, 0, 210, - 145, 0, 210, 147, 0, 210, 149, 0, 210, 151, 0, 210, - 153, 0, 210, 155, 0, 210, 157, 0, 210, 159, 0, 210, - 161, 0, 210, 163, 0, 210, 165, 0, 210, 167, 0, 210, - 169, 0, 210, 171, 0, 210, 173, 0, 210, 175, 0, 210, - 177, 0, 210, 179, 0, 210, 181, 0, 210, 183, 0, 210, - 185, 0, 210, 187, 0, 210, 189, 0, 210, 191, 0, 211, - 130, 0, 211, 132, 0, 211, 136, 0, 211, 140, 0, 211, - 145, 0, 211, 147, 0, 211, 149, 0, 211, 151, 0, 211, - 153, 0, 211, 155, 0, 211, 157, 0, 211, 159, 0, 211, - 161, 0, 211, 163, 0, 211, 165, 0, 211, 167, 0, 211, - 169, 0, 211, 171, 0, 211, 173, 0, 211, 175, 0, 211, - 177, 0, 211, 179, 0, 211, 181, 0, 211, 185, 0, 213, - 161, 0, 213, 162, 0, 213, 163, 0, 213, 164, 0, 213, - 165, 0, 213, 166, 0, 213, 167, 0, 213, 168, 0, 213, - 169, 0, 213, 170, 0, 213, 171, 0, 213, 172, 0, 213, - 173, 0, 213, 174, 0, 213, 175, 0, 213, 176, 0, 213, - 177, 0, 213, 178, 0, 213, 179, 0, 213, 180, 0, 213, - 181, 0, 213, 182, 0, 213, 183, 0, 213, 184, 0, 213, - 185, 0, 213, 186, 0, 213, 187, 0, 213, 188, 0, 213, - 189, 0, 213, 190, 0, 213, 191, 0, 214, 128, 0, 214, - 129, 0, 214, 130, 0, 214, 131, 0, 214, 132, 0, 214, - 133, 0, 214, 134, 0, 213, 165, 214, 130, 0, 225, 184, - 129, 0, 225, 184, 131, 0, 225, 184, 133, 0, 225, 184, - 135, 0, 225, 184, 137, 0, 225, 184, 139, 0, 225, 184, - 141, 0, 225, 184, 143, 0, 225, 184, 145, 0, 225, 184, - 147, 0, 225, 184, 149, 0, 225, 184, 151, 0, 225, 184, - 153, 0, 225, 184, 155, 0, 225, 184, 157, 0, 225, 184, - 159, 0, 225, 184, 161, 0, 225, 184, 163, 0, 225, 184, - 165, 0, 225, 184, 167, 0, 225, 184, 169, 0, 225, 184, - 171, 0, 225, 184, 173, 0, 225, 184, 175, 0, 225, 184, - 177, 0, 225, 184, 179, 0, 225, 184, 181, 0, 225, 184, - 183, 0, 225, 184, 185, 0, 225, 184, 187, 0, 225, 184, - 189, 0, 225, 184, 191, 0, 225, 185, 129, 0, 225, 185, - 131, 0, 225, 185, 133, 0, 225, 185, 135, 0, 225, 185, - 137, 0, 225, 185, 139, 0, 225, 185, 141, 0, 225, 185, - 143, 0, 225, 185, 145, 0, 225, 185, 147, 0, 225, 185, - 149, 0, 225, 185, 151, 0, 225, 185, 153, 0, 225, 185, - 155, 0, 225, 185, 157, 0, 225, 185, 159, 0, 225, 185, - 161, 0, 225, 185, 163, 0, 225, 185, 165, 0, 225, 185, - 167, 0, 225, 185, 169, 0, 225, 185, 171, 0, 225, 185, - 173, 0, 225, 185, 175, 0, 225, 185, 177, 0, 225, 185, - 179, 0, 225, 185, 181, 0, 225, 185, 183, 0, 225, 185, - 185, 0, 225, 185, 187, 0, 225, 185, 189, 0, 225, 185, - 191, 0, 225, 186, 129, 0, 225, 186, 131, 0, 225, 186, - 133, 0, 225, 186, 135, 0, 225, 186, 137, 0, 225, 186, - 139, 0, 225, 186, 141, 0, 225, 186, 143, 0, 225, 186, - 145, 0, 225, 186, 147, 0, 225, 186, 149, 0, 104, 204, - 177, 0, 116, 204, 136, 0, 119, 204, 138, 0, 121, 204, - 138, 0, 97, 202, 190, 0, 225, 186, 161, 0, 225, 186, - 163, 0, 225, 186, 165, 0, 225, 186, 167, 0, 225, 186, - 169, 0, 225, 186, 171, 0, 225, 186, 173, 0, 225, 186, - 175, 0, 225, 186, 177, 0, 225, 186, 179, 0, 225, 186, - 181, 0, 225, 186, 183, 0, 225, 186, 185, 0, 225, 186, - 187, 0, 225, 186, 189, 0, 225, 186, 191, 0, 225, 187, - 129, 0, 225, 187, 131, 0, 225, 187, 133, 0, 225, 187, - 135, 0, 225, 187, 137, 0, 225, 187, 139, 0, 225, 187, - 141, 0, 225, 187, 143, 0, 225, 187, 145, 0, 225, 187, - 147, 0, 225, 187, 149, 0, 225, 187, 151, 0, 225, 187, - 153, 0, 225, 187, 155, 0, 225, 187, 157, 0, 225, 187, - 159, 0, 225, 187, 161, 0, 225, 187, 163, 0, 225, 187, - 165, 0, 225, 187, 167, 0, 225, 187, 169, 0, 225, 187, - 171, 0, 225, 187, 173, 0, 225, 187, 175, 0, 225, 187, - 177, 0, 225, 187, 179, 0, 225, 187, 181, 0, 225, 187, - 183, 0, 225, 187, 185, 0, 225, 188, 128, 0, 225, 188, - 129, 0, 225, 188, 130, 0, 225, 188, 131, 0, 225, 188, - 132, 0, 225, 188, 133, 0, 225, 188, 134, 0, 225, 188, - 135, 0, 225, 188, 144, 0, 225, 188, 145, 0, 225, 188, - 146, 0, 225, 188, 147, 0, 225, 188, 148, 0, 225, 188, - 149, 0, 225, 188, 160, 0, 225, 188, 161, 0, 225, 188, - 162, 0, 225, 188, 163, 0, 225, 188, 164, 0, 225, 188, - 165, 0, 225, 188, 166, 0, 225, 188, 167, 0, 225, 188, - 176, 0, 225, 188, 177, 0, 225, 188, 178, 0, 225, 188, - 179, 0, 225, 188, 180, 0, 225, 188, 181, 0, 225, 188, - 182, 0, 225, 188, 183, 0, 225, 189, 128, 0, 225, 189, - 129, 0, 225, 189, 130, 0, 225, 189, 131, 0, 225, 189, - 132, 0, 225, 189, 133, 0, 207, 133, 204, 147, 0, 207, - 133, 204, 147, 204, 128, 0, 207, 133, 204, 147, 204, 129, - 0, 207, 133, 204, 147, 205, 130, 0, 225, 189, 145, 0, - 225, 189, 147, 0, 225, 189, 149, 0, 225, 189, 151, 0, - 225, 189, 160, 0, 225, 189, 161, 0, 225, 189, 162, 0, - 225, 189, 163, 0, 225, 189, 164, 0, 225, 189, 165, 0, - 225, 189, 166, 0, 225, 189, 167, 0, 225, 188, 128, 206, - 185, 0, 225, 188, 129, 206, 185, 0, 225, 188, 130, 206, - 185, 0, 225, 188, 131, 206, 185, 0, 225, 188, 132, 206, - 185, 0, 225, 188, 133, 206, 185, 0, 225, 188, 134, 206, - 185, 0, 225, 188, 135, 206, 185, 0, 225, 188, 160, 206, - 185, 0, 225, 188, 161, 206, 185, 0, 225, 188, 162, 206, - 185, 0, 225, 188, 163, 206, 185, 0, 225, 188, 164, 206, - 185, 0, 225, 188, 165, 206, 185, 0, 225, 188, 166, 206, - 185, 0, 225, 188, 167, 206, 185, 0, 225, 189, 160, 206, - 185, 0, 225, 189, 161, 206, 185, 0, 225, 189, 162, 206, - 185, 0, 225, 189, 163, 206, 185, 0, 225, 189, 164, 206, - 185, 0, 225, 189, 165, 206, 185, 0, 225, 189, 166, 206, - 185, 0, 225, 189, 167, 206, 185, 0, 225, 189, 176, 206, - 185, 0, 206, 177, 206, 185, 0, 206, 172, 206, 185, 0, - 206, 177, 205, 130, 0, 206, 177, 205, 130, 206, 185, 0, - 225, 190, 176, 0, 225, 190, 177, 0, 225, 189, 176, 0, - 225, 189, 177, 0, 225, 189, 180, 206, 185, 0, 206, 183, - 206, 185, 0, 206, 174, 206, 185, 0, 206, 183, 205, 130, - 0, 206, 183, 205, 130, 206, 185, 0, 225, 189, 178, 0, - 225, 189, 179, 0, 225, 189, 180, 0, 225, 189, 181, 0, - 206, 185, 204, 136, 204, 128, 0, 206, 185, 205, 130, 0, - 206, 185, 204, 136, 205, 130, 0, 225, 191, 144, 0, 225, - 191, 145, 0, 225, 189, 182, 0, 225, 189, 183, 0, 207, - 133, 204, 136, 204, 128, 0, 207, 129, 204, 147, 0, 207, - 133, 205, 130, 0, 207, 133, 204, 136, 205, 130, 0, 225, - 191, 160, 0, 225, 191, 161, 0, 225, 189, 186, 0, 225, - 189, 187, 0, 225, 191, 165, 0, 225, 189, 188, 206, 185, - 0, 207, 137, 206, 185, 0, 207, 142, 206, 185, 0, 207, - 137, 205, 130, 0, 207, 137, 205, 130, 206, 185, 0, 225, - 189, 184, 0, 225, 189, 185, 0, 225, 189, 188, 0, 225, - 189, 189, 0, 114, 115, 0, 194, 176, 99, 0, 194, 176, - 102, 0, 110, 111, 0, 115, 109, 0, 116, 101, 108, 0, - 116, 109, 0, 226, 133, 176, 0, 226, 133, 177, 0, 226, - 133, 178, 0, 226, 133, 179, 0, 226, 133, 180, 0, 226, - 133, 181, 0, 226, 133, 182, 0, 226, 133, 183, 0, 226, - 133, 184, 0, 226, 133, 185, 0, 226, 133, 186, 0, 226, - 133, 187, 0, 226, 133, 188, 0, 226, 133, 189, 0, 226, - 133, 190, 0, 226, 133, 191, 0, 226, 147, 144, 0, 226, - 147, 145, 0, 226, 147, 146, 0, 226, 147, 147, 0, 226, - 147, 148, 0, 226, 147, 149, 0, 226, 147, 150, 0, 226, - 147, 151, 0, 226, 147, 152, 0, 226, 147, 153, 0, 226, - 147, 154, 0, 226, 147, 155, 0, 226, 147, 156, 0, 226, - 147, 157, 0, 226, 147, 158, 0, 226, 147, 159, 0, 226, - 147, 160, 0, 226, 147, 161, 0, 226, 147, 162, 0, 226, - 147, 163, 0, 226, 147, 164, 0, 226, 147, 165, 0, 226, - 147, 166, 0, 226, 147, 167, 0, 226, 147, 168, 0, 226, - 147, 169, 0, 104, 112, 97, 0, 97, 117, 0, 111, 118, - 0, 112, 97, 0, 110, 97, 0, 206, 188, 97, 0, 109, - 97, 0, 107, 97, 0, 107, 98, 0, 109, 98, 0, 103, - 98, 0, 112, 102, 0, 110, 102, 0, 206, 188, 102, 0, - 104, 122, 0, 107, 104, 122, 0, 109, 104, 122, 0, 103, - 104, 122, 0, 116, 104, 122, 0, 107, 112, 97, 0, 109, - 112, 97, 0, 103, 112, 97, 0, 112, 118, 0, 110, 118, - 0, 206, 188, 118, 0, 109, 118, 0, 107, 118, 0, 112, - 119, 0, 110, 119, 0, 206, 188, 119, 0, 109, 119, 0, - 107, 119, 0, 107, 207, 137, 0, 109, 207, 137, 0, 98, - 113, 0, 99, 226, 136, 149, 107, 103, 0, 99, 111, 46, - 0, 100, 98, 0, 103, 121, 0, 104, 112, 0, 107, 107, - 0, 107, 109, 0, 112, 104, 0, 112, 112, 109, 0, 112, - 114, 0, 115, 118, 0, 119, 98, 0, 102, 102, 0, 102, - 105, 0, 102, 108, 0, 102, 102, 105, 0, 102, 102, 108, - 0, 115, 116, 0, 213, 180, 213, 182, 0, 213, 180, 213, - 165, 0, 213, 180, 213, 171, 0, 213, 190, 213, 182, 0, - 213, 180, 213, 173, 0, 239, 189, 129, 0, 239, 189, 130, - 0, 239, 189, 131, 0, 239, 189, 132, 0, 239, 189, 133, - 0, 239, 189, 134, 0, 239, 189, 135, 0, 239, 189, 136, - 0, 239, 189, 137, 0, 239, 189, 138, 0, 239, 189, 139, - 0, 239, 189, 140, 0, 239, 189, 141, 0, 239, 189, 142, - 0, 239, 189, 143, 0, 239, 189, 144, 0, 239, 189, 145, - 0, 239, 189, 146, 0, 239, 189, 147, 0, 239, 189, 148, - 0, 239, 189, 149, 0, 239, 189, 150, 0, 239, 189, 151, - 0, 239, 189, 152, 0, 239, 189, 153, 0, 239, 189, 154, - 0, -}; - -static const unsigned short nameprep_id03_prohibited_imap[] = { - 68, 196, 196, 324, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 196, 196, 196, 452, - 196, 196, 196, 452, 580, 580, 580, 580, - 580, 580, 580, 580, 0, 1, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 3, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 4, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 5, 6, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 8, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 9, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id03_prohibited_bitmap[] = { - {{ - 255,255,255,255,255,223, 0,252, 1, 0, 0,248, 1, 0, 0,248, - }}, - {{ - 255,255,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,207, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, - }}, - {{ - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, - }}, -}; -static const unsigned short nameprep_id03_unassigned_imap[] = { - 68, 196, 324, 452, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 580, 580, 580, 708, - 580, 580, 580, 708, 836, 836, 836, 836, - 836, 836, 836, 836, 0, 0, 0, 0, - 1, 2, 3, 4, 0, 5, 6, 7, - 8, 9, 10, 11, 12, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 0, 0, - 36, 37, 12, 38, 39, 40, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 0, 41, 42, 43, 44, 45, 46, 47, - 0, 48, 49, 50, 51, 52, 0, 53, - 54, 12, 55, 56, 0, 0, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 57, 0, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 67, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 68, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 69, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 71, 12, 72, 73, 0, 0, 74, 75, - 76, 77, 78, 79, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 80, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id03_unassigned_bitmap[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 3, 0,240,255,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,128,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,248,255,207,187, - }}, - {{ - 15, 40, 0, 0, 4, 0, 0, 0, 0,128, 0, 3, 0, 0,240,255, - }}, - {{ - 128, 12, 0, 0, 0, 0, 0, 0, 96,230, 0, 0, 0, 0,192,252, - }}, - {{ - 255,255,255,255,255,255, 1, 0, 0, 0,128, 1, 1, 0, 0, 0, - }}, - {{ - 0,249, 1, 0, 4, 0, 0, 4,224,255, 0, 0, 0,248,224,255, - }}, - {{ - 255,239,255,119, 1, 0, 0,248, 0, 0,192,255, 0,192, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0,128, - }}, - {{ - 0, 64, 0, 0, 0,224, 0, 0, 0,248,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0,254,255,255,255,255,255,255,255,255,255, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 17, 0, 0, 0, 0, 0, 0, 12, 0,192,224, 0, 0, 0,254,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 58, 44, 96,198,127, 79, 48, 0, 0,248, - }}, - {{ - 27,120, 6, 0, 0, 2,146, 44,120,198,255,161, 63, 0,224,255, - }}, - {{ - 17, 80, 4, 0, 0, 2, 18, 12, 64,196,254,255, 62, 0,255,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 50, 12,112,198, 63, 79, 60, 0,254,255, - }}, - {{ - 19, 56,194, 41,231, 56, 64, 60, 56,194,127,255,127, 0,248,255, - }}, - {{ - 17, 32, 2, 0, 0, 2, 16, 60, 32,194,159,255, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 16, 60, 32,194,159,191, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 0, 60, 48,194,127,255, 60, 0,255,255, - }}, - {{ - 19, 0,128, 3, 0, 0, 4,208,128,123,160, 0,255,255,227,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0,120, 0, 0, 0,240,255,255,255,255, - }}, - {{ - 105,218, 15, 1, 81, 19, 0,196,160,192, 0,204,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,248, 1, 0, - }}, - {{ - 0,240, 0, 1, 0, 0, 0, 32, 0, 96,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 4, 9, 56,252, 0, 0, 0,252,255,255,255,255, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0,192,255, 0, 0, 0, 0,128,247, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 128, 0, 0, 0, 0, 0, 0, 0,128,194,128,194, 0, 0, 0, 0, - }}, - {{ - 128,194, 0, 0, 0,128,194,128,194,128,128, 0, 0,128, 0, 0, - }}, - {{ - 0,128,194,128, 0, 0, 0, 0,128, 0, 0,248, 1, 0, 0,224, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 0,252,255,255, - }}, - {{ - 0,128, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - }}, - {{ - 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 0, 0,192,192, 0, 0, 0, 0,192,192, 0, 85, 0, 0, 0,192, - }}, - {{ - 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 48, 16, 0, 0, 35,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0,128,192,255,255,255, 3, 14, 0, - }}, - {{ - 0,128,255,255, 0, 0,255,255,255,255, 0, 0,240,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0,248,255,255, 7, 0, 0, 0, 0, 0, - }}, - {{ - 240,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - }}, - {{ - 0, 0, 0,248,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,128,255,255,255, 0,248,255,255, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255,255, - }}, - {{ - 0, 0,192,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - }}, - {{ - 0, 0,240, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,255, - }}, - {{ - 33, 12, 0, 0, 0, 1, 0, 0, 0, 80,184,128, 1,255, 63, 0, - }}, - {{ - 0, 0,224, 0, 0, 0, 1,128,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255, 0,240, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 56, 1, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0,224,129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, - }}, - {{ - 31, 0, 0, 0, 0,224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0,128, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0,240,255,255,255, 0, 0, 0,112, - }}, - {{ - 0, 0, 0, 0, 0, 0,254,255, 0,240, 0, 0, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 7, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0,224, 0, 0, 12, 0, 16, 0,162,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,240,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 128,255, 7, 31, 0, 0,128,160, 36, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0,252,255,255,255, 7, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 3, 0, 0, 0, 0, 0, 0,255,255,255,255,255, 0,240, - }}, - {{ - 255,255,255,255,240,255, 0, 0,224, 1, 8, 0,128,240, 40, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 1, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0,128, 3, 3, 3,227,128,128,255, 1, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 63, - }}, -}; -static const unsigned short nameprep_id05_map_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 1040, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 1168, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 1, 0, 0, 2, 3, 0, - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 14, 15, 16, 17, 18, 19, - 20, 21, 0, 22, 23, 24, 25, 26, - 0, 27, 28, 0, 29, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, - 47, 0, 0, 0, 0, 48, 0, 0, - 49, 50, 0, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 52, 53, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 54, 55, 56, 57, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 59, - 0, 60, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 61, 62, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 63, 64, 65, - 66, 76, 77, 69, 70, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} nameprep_id05_map_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 54, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, - 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, - 123, 0, 126, 129, 132, 135, 138, 141, 144, 147, - }}, - {{ - 150, 0, 153, 0, 156, 0, 159, 0, 162, 0, 165, - 0, 168, 0, 171, 0, 174, 0, 177, 0, 180, 0, - 183, 0, 186, 0, 189, 0, 192, 0, 195, 0, - }}, - {{ - 198, 0, 201, 0, 204, 0, 207, 0, 210, 0, 213, - 0, 216, 0, 219, 0, 17, 17, 222, 0, 225, 0, - 228, 0, 0, 231, 0, 234, 0, 237, 0, 240, - }}, - {{ - 0, 243, 0, 246, 0, 249, 0, 252, 0, 255, 259, - 0, 262, 0, 265, 0, 268, 0, 271, 0, 274, 0, - 277, 0, 280, 0, 283, 0, 286, 0, 289, 0, - }}, - {{ - 292, 0, 295, 0, 298, 0, 301, 0, 304, 0, 307, - 0, 310, 0, 313, 0, 316, 0, 319, 0, 322, 0, - 325, 0, 328, 331, 0, 334, 0, 337, 0, 37, - }}, - {{ - 0, 340, 343, 0, 346, 0, 349, 352, 0, 355, 358, - 361, 0, 0, 364, 367, 370, 373, 0, 376, 379, 0, - 382, 385, 388, 0, 0, 0, 391, 394, 0, 397, - }}, - {{ - 400, 0, 403, 0, 406, 0, 409, 412, 0, 415, 0, - 0, 418, 0, 421, 424, 0, 427, 430, 433, 0, 436, - 0, 439, 442, 0, 0, 0, 445, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 448, 448, 0, 451, 451, 0, 454, - 454, 0, 457, 0, 460, 0, 463, 0, 466, 0, 469, - 0, 472, 0, 475, 0, 478, 0, 0, 481, 0, - }}, - {{ - 484, 0, 487, 0, 490, 0, 493, 0, 496, 0, 499, - 0, 502, 0, 505, 0, 508, 512, 512, 0, 515, 0, - 518, 521, 524, 0, 527, 0, 530, 0, 533, 0, - }}, - {{ - 536, 0, 539, 0, 542, 0, 545, 0, 548, 0, 551, - 0, 554, 0, 557, 0, 560, 0, 563, 0, 566, 0, - 569, 0, 572, 0, 575, 0, 578, 0, 581, 0, - }}, - {{ - 0, 0, 584, 0, 587, 0, 590, 0, 593, 0, 596, - 0, 599, 0, 602, 0, 605, 0, 608, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 611, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 614, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 618, 0, 621, 624, 627, - 0, 630, 0, 633, 636, 639, 646, 649, 652, 655, 658, - 661, 664, 667, 611, 670, 673, 54, 676, 679, 682, - }}, - {{ - 685, 688, 0, 691, 694, 697, 700, 703, 706, 709, 712, - 715, 0, 0, 0, 0, 718, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 691, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 649, 667, 697, 633, 715, 700, - 685, 0, 0, 0, 725, 0, 728, 0, 731, 0, - }}, - {{ - 734, 0, 737, 0, 740, 0, 743, 0, 746, 0, 749, - 0, 752, 0, 755, 0, 670, 688, 691, 0, 667, 658, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 758, 761, 764, 767, 770, 773, 776, 779, 782, 785, 788, - 791, 794, 797, 800, 803, 806, 809, 812, 815, 818, 821, - 824, 827, 830, 833, 836, 839, 842, 845, 848, 851, - }}, - {{ - 854, 857, 860, 863, 866, 869, 872, 875, 878, 881, 884, - 887, 890, 893, 896, 899, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 902, 0, 905, 0, 908, 0, 911, 0, 914, 0, 917, - 0, 920, 0, 923, 0, 926, 0, 929, 0, 932, 0, - 935, 0, 938, 0, 941, 0, 944, 0, 947, 0, - }}, - {{ - 950, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 953, 0, 956, 0, 959, 0, 962, 0, 965, 0, - 968, 0, 971, 0, 974, 0, 977, 0, 980, 0, - }}, - {{ - 983, 0, 986, 0, 989, 0, 992, 0, 995, 0, 998, - 0, 1001, 0, 1004, 0, 1007, 0, 1010, 0, 1013, 0, - 1016, 0, 1019, 0, 1022, 0, 1025, 0, 1028, 0, - }}, - {{ - 0, 1031, 0, 1034, 0, 0, 0, 1037, 0, 0, 0, - 1040, 0, 0, 0, 0, 1043, 0, 1046, 0, 1049, 0, - 1052, 0, 1055, 0, 1058, 0, 1061, 0, 1064, 0, - }}, - {{ - 1067, 0, 1070, 0, 1073, 0, 1076, 0, 1079, 0, 1082, - 0, 1085, 0, 1088, 0, 1091, 0, 1094, 0, 1097, 0, - 0, 0, 1100, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1103, 1106, 1109, 1112, 1115, - 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, 1142, 1145, - }}, - {{ - 1148, 1151, 1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, - 1181, 1184, 1187, 1190, 1193, 1196, 1199, 1202, 1205, 1208, 1211, - 1214, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 1217, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, - 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1222, 0, 1226, 0, 1230, 0, 1234, 0, 1238, 0, 1242, - 0, 1246, 0, 1250, 0, 1254, 0, 1258, 0, 1262, 0, - 1266, 0, 1270, 0, 1274, 0, 1278, 0, 1282, 0, - }}, - {{ - 1286, 0, 1290, 0, 1294, 0, 1298, 0, 1302, 0, 1306, - 0, 1310, 0, 1314, 0, 1318, 0, 1322, 0, 1326, 0, - 1330, 0, 1334, 0, 1338, 0, 1342, 0, 1346, 0, - }}, - {{ - 1350, 0, 1354, 0, 1358, 0, 1362, 0, 1366, 0, 1370, - 0, 1374, 0, 1378, 0, 1382, 0, 1386, 0, 1390, 0, - 1394, 0, 1398, 0, 1402, 0, 1406, 0, 1410, 0, - }}, - {{ - 1414, 0, 1418, 0, 1422, 0, 1426, 0, 1430, 0, 1434, - 0, 1438, 0, 1442, 0, 1446, 0, 1450, 0, 1454, 0, - 1458, 0, 1462, 0, 1466, 0, 1470, 0, 1474, 0, - }}, - {{ - 1478, 0, 1482, 0, 1486, 0, 1490, 0, 1494, 0, 1498, - 0, 1502, 0, 1506, 0, 1510, 0, 1514, 0, 1518, 0, - 1522, 1526, 1530, 1534, 1538, 1414, 0, 0, 0, 0, - }}, - {{ - 1542, 0, 1546, 0, 1550, 0, 1554, 0, 1558, 0, 1562, - 0, 1566, 0, 1570, 0, 1574, 0, 1578, 0, 1582, 0, - 1586, 0, 1590, 0, 1594, 0, 1598, 0, 1602, 0, - }}, - {{ - 1606, 0, 1610, 0, 1614, 0, 1618, 0, 1622, 0, 1626, - 0, 1630, 0, 1634, 0, 1638, 0, 1642, 0, 1646, 0, - 1650, 0, 1654, 0, 1658, 0, 1662, 0, 1666, 0, - }}, - {{ - 1670, 0, 1674, 0, 1678, 0, 1682, 0, 1686, 0, 1690, - 0, 1694, 0, 1698, 0, 1702, 0, 1706, 0, 1710, 0, - 1714, 0, 1718, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1722, 1726, 1730, - 1734, 1738, 1742, 1746, 1750, 0, 0, 0, 0, 0, 0, - 0, 0, 1754, 1758, 1762, 1766, 1770, 1774, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1778, 1782, 1786, - 1790, 1794, 1798, 1802, 1806, 0, 0, 0, 0, 0, 0, - 0, 0, 1810, 1814, 1818, 1822, 1826, 1830, 1834, 1838, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1842, 1846, 1850, - 1854, 1858, 1862, 0, 0, 1866, 0, 1871, 0, 1878, 0, - 1885, 0, 0, 1892, 0, 1896, 0, 1900, 0, 1904, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1908, 1912, 1916, - 1920, 1924, 1928, 1932, 1936, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1940, 1946, 1952, 1958, 1964, 1970, 1976, 1982, 1940, 1946, 1952, - 1958, 1964, 1970, 1976, 1982, 1988, 1994, 2000, 2006, 2012, 2018, - 2024, 2030, 1988, 1994, 2000, 2006, 2012, 2018, 2024, 2030, - }}, - {{ - 2036, 2042, 2048, 2054, 2060, 2066, 2072, 2078, 2036, 2042, 2048, - 2054, 2060, 2066, 2072, 2078, 0, 0, 2084, 2090, 2095, 0, - 2100, 2105, 2112, 2116, 2120, 2124, 2090, 0, 611, 0, - }}, - {{ - 0, 0, 2128, 2134, 2139, 0, 2144, 2149, 2156, 2160, 2164, - 2168, 2134, 0, 0, 0, 0, 0, 2172, 639, 0, 0, - 2179, 2184, 2191, 2195, 2199, 2203, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2207, 718, 2214, 0, 2219, 2224, 2231, 2235, 2239, - 2243, 2247, 0, 0, 0, 0, 0, 2251, 2257, 2262, 0, - 2267, 2272, 2279, 2283, 2287, 2291, 2257, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2295, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 5, 2298, 0, 0, 0, 370, 0, 2302, 0, - 15, 15, 15, 0, 0, 17, 17, 23, 0, 0, 27, - 2306, 0, 0, 31, 33, 35, 35, 35, 0, 0, - }}, - {{ - 2309, 2312, 2316, 0, 51, 0, 709, 0, 51, 0, 21, - 72, 3, 5, 0, 0, 9, 11, 0, 25, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2319, 2323, 2327, 2331, 2335, 2339, 2343, 2347, 2351, 2355, 2359, - 2363, 2367, 2371, 2375, 2379, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2383, 2387, 2391, 2395, 2399, 2403, 2407, 2411, 2415, 2419, - }}, - {{ - 2423, 2427, 2431, 2435, 2439, 2443, 2447, 2451, 2455, 2459, 2463, - 2467, 2471, 2475, 2479, 2483, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2487, 0, 2491, 0, 2494, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2497, 2500, 2503, 2507, 2510, 2513, 2516, 2519, 0, 0, 2522, - 2525, 2528, 0, 0, 0, 2532, 2535, 2539, 2543, 2547, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2497, 2551, - 2555, 2559, 0, 0, 0, 0, 0, 0, 0, 2563, 2566, - 2569, 2573, 2576, 2573, 2579, 2582, 2585, 2589, 2592, 2589, - }}, - {{ - 2595, 2599, 0, 2603, 0, 0, 2606, 2613, 2617, 2620, 0, - 2623, 0, 2626, 2629, 0, 0, 0, 0, 0, 0, 0, - 0, 2632, 0, 2635, 2639, 0, 2642, 2645, 0, 0, - }}, - {{ - 2648, 2651, 2654, 2657, 2661, 2665, 2665, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2668, 2673, 2678, - 2683, 2688, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - }}, - {{ - 0, 2693, 2697, 2701, 2705, 2709, 2713, 2717, 2721, 2725, 2729, - 2733, 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2765, 2769, 2773, - 2777, 2781, 2785, 2789, 2793, 0, 0, 0, 0, 0, - }}, - {{ - 2797, 2802, 2807, 2812, 2817, 2822, 2827, 2832, 2837, 2842, 2847, - 2852, 2857, 2862, 2867, 2872, 2877, 2882, 2887, 2892, 2897, 2902, - 2907, 2912, 2917, 2922, 2927, 2932, 2937, 2942, 2947, 2952, - }}, - {{ - 2957, 2962, 2967, 2972, 2977, 2982, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, - 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, - 45, 47, 49, 51, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, - 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, - }}, - {{ - 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, - 47, 49, 51, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 5, - 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, - 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, - }}, - {{ - 49, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 5, 7, - }}, - {{ - 0, 0, 13, 0, 0, 19, 21, 0, 0, 27, 29, - 31, 33, 0, 37, 39, 41, 43, 45, 47, 49, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 3, 5, 7, 9, 11, - 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, - }}, - {{ - 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 1, 3, 0, 7, 9, 11, 13, - 0, 0, 19, 21, 23, 25, 27, 29, 31, 33, 0, - 37, 39, 41, 43, 45, 47, 49, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 3, 0, 7, 9, 11, 13, 0, - }}, - {{ - 17, 19, 21, 23, 25, 0, 29, 0, 0, 0, 37, - 39, 41, 43, 45, 47, 49, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, - }}, - {{ - 41, 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 49, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 3, 5, 7, - }}, - {{ - 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, - 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 646, 649, 652, - 655, 658, 661, 664, 667, 611, 670, 673, 54, 676, 679, - 682, 685, 688, 667, 691, 694, 697, 700, 703, 706, - }}, - {{ - 709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 691, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 646, 649, 652, 655, 658, 661, 664, 667, 611, - 670, 673, 54, 676, 679, 682, 685, 688, 667, 691, 694, - 697, 700, 703, 706, 709, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 691, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 646, 649, 652, 655, - }}, - {{ - 658, 661, 664, 667, 611, 670, 673, 54, 676, 679, 682, - 685, 688, 667, 691, 694, 697, 700, 703, 706, 709, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 691, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 646, 649, 652, 655, 658, 661, 664, 667, 611, 670, - }}, - {{ - 673, 54, 676, 679, 682, 685, 688, 667, 691, 694, 697, - 700, 703, 706, 709, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 691, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 646, 649, 652, 655, 658, 661, - 664, 667, 611, 670, 673, 54, 676, 679, 682, 685, - }}, - {{ - 688, 667, 691, 694, 697, 700, 703, 706, 709, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 691, 0, 0, 0, 0, - }}, -}; - -static const unsigned char nameprep_id05_map_data[] = { - 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, - 0, 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, 108, - 0, 109, 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, - 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, - 0, 121, 0, 122, 0, 0, 206, 188, 0, 195, 160, 0, - 195, 161, 0, 195, 162, 0, 195, 163, 0, 195, 164, 0, - 195, 165, 0, 195, 166, 0, 195, 167, 0, 195, 168, 0, - 195, 169, 0, 195, 170, 0, 195, 171, 0, 195, 172, 0, - 195, 173, 0, 195, 174, 0, 195, 175, 0, 195, 176, 0, - 195, 177, 0, 195, 178, 0, 195, 179, 0, 195, 180, 0, - 195, 181, 0, 195, 182, 0, 195, 184, 0, 195, 185, 0, - 195, 186, 0, 195, 187, 0, 195, 188, 0, 195, 189, 0, - 195, 190, 0, 115, 115, 0, 196, 129, 0, 196, 131, 0, - 196, 133, 0, 196, 135, 0, 196, 137, 0, 196, 139, 0, - 196, 141, 0, 196, 143, 0, 196, 145, 0, 196, 147, 0, - 196, 149, 0, 196, 151, 0, 196, 153, 0, 196, 155, 0, - 196, 157, 0, 196, 159, 0, 196, 161, 0, 196, 163, 0, - 196, 165, 0, 196, 167, 0, 196, 169, 0, 196, 171, 0, - 196, 173, 0, 196, 175, 0, 196, 179, 0, 196, 181, 0, - 196, 183, 0, 196, 186, 0, 196, 188, 0, 196, 190, 0, - 197, 128, 0, 197, 130, 0, 197, 132, 0, 197, 134, 0, - 197, 136, 0, 202, 188, 110, 0, 197, 139, 0, 197, 141, - 0, 197, 143, 0, 197, 145, 0, 197, 147, 0, 197, 149, - 0, 197, 151, 0, 197, 153, 0, 197, 155, 0, 197, 157, - 0, 197, 159, 0, 197, 161, 0, 197, 163, 0, 197, 165, - 0, 197, 167, 0, 197, 169, 0, 197, 171, 0, 197, 173, - 0, 197, 175, 0, 197, 177, 0, 197, 179, 0, 197, 181, - 0, 197, 183, 0, 195, 191, 0, 197, 186, 0, 197, 188, - 0, 197, 190, 0, 201, 147, 0, 198, 131, 0, 198, 133, - 0, 201, 148, 0, 198, 136, 0, 201, 150, 0, 201, 151, - 0, 198, 140, 0, 199, 157, 0, 201, 153, 0, 201, 155, - 0, 198, 146, 0, 201, 160, 0, 201, 163, 0, 201, 169, - 0, 201, 168, 0, 198, 153, 0, 201, 175, 0, 201, 178, - 0, 201, 181, 0, 198, 161, 0, 198, 163, 0, 198, 165, - 0, 202, 128, 0, 198, 168, 0, 202, 131, 0, 198, 173, - 0, 202, 136, 0, 198, 176, 0, 202, 138, 0, 202, 139, - 0, 198, 180, 0, 198, 182, 0, 202, 146, 0, 198, 185, - 0, 198, 189, 0, 199, 134, 0, 199, 137, 0, 199, 140, - 0, 199, 142, 0, 199, 144, 0, 199, 146, 0, 199, 148, - 0, 199, 150, 0, 199, 152, 0, 199, 154, 0, 199, 156, - 0, 199, 159, 0, 199, 161, 0, 199, 163, 0, 199, 165, - 0, 199, 167, 0, 199, 169, 0, 199, 171, 0, 199, 173, - 0, 199, 175, 0, 106, 204, 140, 0, 199, 179, 0, 199, - 181, 0, 198, 149, 0, 198, 191, 0, 199, 185, 0, 199, - 187, 0, 199, 189, 0, 199, 191, 0, 200, 129, 0, 200, - 131, 0, 200, 133, 0, 200, 135, 0, 200, 137, 0, 200, - 139, 0, 200, 141, 0, 200, 143, 0, 200, 145, 0, 200, - 147, 0, 200, 149, 0, 200, 151, 0, 200, 153, 0, 200, - 155, 0, 200, 157, 0, 200, 159, 0, 200, 163, 0, 200, - 165, 0, 200, 167, 0, 200, 169, 0, 200, 171, 0, 200, - 173, 0, 200, 175, 0, 200, 177, 0, 200, 179, 0, 206, - 185, 0, 32, 206, 185, 0, 206, 172, 0, 206, 173, 0, - 206, 174, 0, 206, 175, 0, 207, 140, 0, 207, 141, 0, - 207, 142, 0, 206, 185, 204, 136, 204, 129, 0, 206, 177, - 0, 206, 178, 0, 206, 179, 0, 206, 180, 0, 206, 181, - 0, 206, 182, 0, 206, 183, 0, 206, 184, 0, 206, 186, - 0, 206, 187, 0, 206, 189, 0, 206, 190, 0, 206, 191, - 0, 207, 128, 0, 207, 129, 0, 207, 131, 0, 207, 132, - 0, 207, 133, 0, 207, 134, 0, 207, 135, 0, 207, 136, - 0, 207, 137, 0, 207, 138, 0, 207, 139, 0, 207, 133, - 204, 136, 204, 129, 0, 207, 155, 0, 207, 157, 0, 207, - 159, 0, 207, 161, 0, 207, 163, 0, 207, 165, 0, 207, - 167, 0, 207, 169, 0, 207, 171, 0, 207, 173, 0, 207, - 175, 0, 209, 144, 0, 209, 145, 0, 209, 146, 0, 209, - 147, 0, 209, 148, 0, 209, 149, 0, 209, 150, 0, 209, - 151, 0, 209, 152, 0, 209, 153, 0, 209, 154, 0, 209, - 155, 0, 209, 156, 0, 209, 157, 0, 209, 158, 0, 209, - 159, 0, 208, 176, 0, 208, 177, 0, 208, 178, 0, 208, - 179, 0, 208, 180, 0, 208, 181, 0, 208, 182, 0, 208, - 183, 0, 208, 184, 0, 208, 185, 0, 208, 186, 0, 208, - 187, 0, 208, 188, 0, 208, 189, 0, 208, 190, 0, 208, - 191, 0, 209, 128, 0, 209, 129, 0, 209, 130, 0, 209, - 131, 0, 209, 132, 0, 209, 133, 0, 209, 134, 0, 209, - 135, 0, 209, 136, 0, 209, 137, 0, 209, 138, 0, 209, - 139, 0, 209, 140, 0, 209, 141, 0, 209, 142, 0, 209, - 143, 0, 209, 161, 0, 209, 163, 0, 209, 165, 0, 209, - 167, 0, 209, 169, 0, 209, 171, 0, 209, 173, 0, 209, - 175, 0, 209, 177, 0, 209, 179, 0, 209, 181, 0, 209, - 183, 0, 209, 185, 0, 209, 187, 0, 209, 189, 0, 209, - 191, 0, 210, 129, 0, 210, 141, 0, 210, 143, 0, 210, - 145, 0, 210, 147, 0, 210, 149, 0, 210, 151, 0, 210, - 153, 0, 210, 155, 0, 210, 157, 0, 210, 159, 0, 210, - 161, 0, 210, 163, 0, 210, 165, 0, 210, 167, 0, 210, - 169, 0, 210, 171, 0, 210, 173, 0, 210, 175, 0, 210, - 177, 0, 210, 179, 0, 210, 181, 0, 210, 183, 0, 210, - 185, 0, 210, 187, 0, 210, 189, 0, 210, 191, 0, 211, - 130, 0, 211, 132, 0, 211, 136, 0, 211, 140, 0, 211, - 145, 0, 211, 147, 0, 211, 149, 0, 211, 151, 0, 211, - 153, 0, 211, 155, 0, 211, 157, 0, 211, 159, 0, 211, - 161, 0, 211, 163, 0, 211, 165, 0, 211, 167, 0, 211, - 169, 0, 211, 171, 0, 211, 173, 0, 211, 175, 0, 211, - 177, 0, 211, 179, 0, 211, 181, 0, 211, 185, 0, 213, - 161, 0, 213, 162, 0, 213, 163, 0, 213, 164, 0, 213, - 165, 0, 213, 166, 0, 213, 167, 0, 213, 168, 0, 213, - 169, 0, 213, 170, 0, 213, 171, 0, 213, 172, 0, 213, - 173, 0, 213, 174, 0, 213, 175, 0, 213, 176, 0, 213, - 177, 0, 213, 178, 0, 213, 179, 0, 213, 180, 0, 213, - 181, 0, 213, 182, 0, 213, 183, 0, 213, 184, 0, 213, - 185, 0, 213, 186, 0, 213, 187, 0, 213, 188, 0, 213, - 189, 0, 213, 190, 0, 213, 191, 0, 214, 128, 0, 214, - 129, 0, 214, 130, 0, 214, 131, 0, 214, 132, 0, 214, - 133, 0, 214, 134, 0, 213, 165, 214, 130, 0, 225, 184, - 129, 0, 225, 184, 131, 0, 225, 184, 133, 0, 225, 184, - 135, 0, 225, 184, 137, 0, 225, 184, 139, 0, 225, 184, - 141, 0, 225, 184, 143, 0, 225, 184, 145, 0, 225, 184, - 147, 0, 225, 184, 149, 0, 225, 184, 151, 0, 225, 184, - 153, 0, 225, 184, 155, 0, 225, 184, 157, 0, 225, 184, - 159, 0, 225, 184, 161, 0, 225, 184, 163, 0, 225, 184, - 165, 0, 225, 184, 167, 0, 225, 184, 169, 0, 225, 184, - 171, 0, 225, 184, 173, 0, 225, 184, 175, 0, 225, 184, - 177, 0, 225, 184, 179, 0, 225, 184, 181, 0, 225, 184, - 183, 0, 225, 184, 185, 0, 225, 184, 187, 0, 225, 184, - 189, 0, 225, 184, 191, 0, 225, 185, 129, 0, 225, 185, - 131, 0, 225, 185, 133, 0, 225, 185, 135, 0, 225, 185, - 137, 0, 225, 185, 139, 0, 225, 185, 141, 0, 225, 185, - 143, 0, 225, 185, 145, 0, 225, 185, 147, 0, 225, 185, - 149, 0, 225, 185, 151, 0, 225, 185, 153, 0, 225, 185, - 155, 0, 225, 185, 157, 0, 225, 185, 159, 0, 225, 185, - 161, 0, 225, 185, 163, 0, 225, 185, 165, 0, 225, 185, - 167, 0, 225, 185, 169, 0, 225, 185, 171, 0, 225, 185, - 173, 0, 225, 185, 175, 0, 225, 185, 177, 0, 225, 185, - 179, 0, 225, 185, 181, 0, 225, 185, 183, 0, 225, 185, - 185, 0, 225, 185, 187, 0, 225, 185, 189, 0, 225, 185, - 191, 0, 225, 186, 129, 0, 225, 186, 131, 0, 225, 186, - 133, 0, 225, 186, 135, 0, 225, 186, 137, 0, 225, 186, - 139, 0, 225, 186, 141, 0, 225, 186, 143, 0, 225, 186, - 145, 0, 225, 186, 147, 0, 225, 186, 149, 0, 104, 204, - 177, 0, 116, 204, 136, 0, 119, 204, 138, 0, 121, 204, - 138, 0, 97, 202, 190, 0, 225, 186, 161, 0, 225, 186, - 163, 0, 225, 186, 165, 0, 225, 186, 167, 0, 225, 186, - 169, 0, 225, 186, 171, 0, 225, 186, 173, 0, 225, 186, - 175, 0, 225, 186, 177, 0, 225, 186, 179, 0, 225, 186, - 181, 0, 225, 186, 183, 0, 225, 186, 185, 0, 225, 186, - 187, 0, 225, 186, 189, 0, 225, 186, 191, 0, 225, 187, - 129, 0, 225, 187, 131, 0, 225, 187, 133, 0, 225, 187, - 135, 0, 225, 187, 137, 0, 225, 187, 139, 0, 225, 187, - 141, 0, 225, 187, 143, 0, 225, 187, 145, 0, 225, 187, - 147, 0, 225, 187, 149, 0, 225, 187, 151, 0, 225, 187, - 153, 0, 225, 187, 155, 0, 225, 187, 157, 0, 225, 187, - 159, 0, 225, 187, 161, 0, 225, 187, 163, 0, 225, 187, - 165, 0, 225, 187, 167, 0, 225, 187, 169, 0, 225, 187, - 171, 0, 225, 187, 173, 0, 225, 187, 175, 0, 225, 187, - 177, 0, 225, 187, 179, 0, 225, 187, 181, 0, 225, 187, - 183, 0, 225, 187, 185, 0, 225, 188, 128, 0, 225, 188, - 129, 0, 225, 188, 130, 0, 225, 188, 131, 0, 225, 188, - 132, 0, 225, 188, 133, 0, 225, 188, 134, 0, 225, 188, - 135, 0, 225, 188, 144, 0, 225, 188, 145, 0, 225, 188, - 146, 0, 225, 188, 147, 0, 225, 188, 148, 0, 225, 188, - 149, 0, 225, 188, 160, 0, 225, 188, 161, 0, 225, 188, - 162, 0, 225, 188, 163, 0, 225, 188, 164, 0, 225, 188, - 165, 0, 225, 188, 166, 0, 225, 188, 167, 0, 225, 188, - 176, 0, 225, 188, 177, 0, 225, 188, 178, 0, 225, 188, - 179, 0, 225, 188, 180, 0, 225, 188, 181, 0, 225, 188, - 182, 0, 225, 188, 183, 0, 225, 189, 128, 0, 225, 189, - 129, 0, 225, 189, 130, 0, 225, 189, 131, 0, 225, 189, - 132, 0, 225, 189, 133, 0, 207, 133, 204, 147, 0, 207, - 133, 204, 147, 204, 128, 0, 207, 133, 204, 147, 204, 129, - 0, 207, 133, 204, 147, 205, 130, 0, 225, 189, 145, 0, - 225, 189, 147, 0, 225, 189, 149, 0, 225, 189, 151, 0, - 225, 189, 160, 0, 225, 189, 161, 0, 225, 189, 162, 0, - 225, 189, 163, 0, 225, 189, 164, 0, 225, 189, 165, 0, - 225, 189, 166, 0, 225, 189, 167, 0, 225, 188, 128, 206, - 185, 0, 225, 188, 129, 206, 185, 0, 225, 188, 130, 206, - 185, 0, 225, 188, 131, 206, 185, 0, 225, 188, 132, 206, - 185, 0, 225, 188, 133, 206, 185, 0, 225, 188, 134, 206, - 185, 0, 225, 188, 135, 206, 185, 0, 225, 188, 160, 206, - 185, 0, 225, 188, 161, 206, 185, 0, 225, 188, 162, 206, - 185, 0, 225, 188, 163, 206, 185, 0, 225, 188, 164, 206, - 185, 0, 225, 188, 165, 206, 185, 0, 225, 188, 166, 206, - 185, 0, 225, 188, 167, 206, 185, 0, 225, 189, 160, 206, - 185, 0, 225, 189, 161, 206, 185, 0, 225, 189, 162, 206, - 185, 0, 225, 189, 163, 206, 185, 0, 225, 189, 164, 206, - 185, 0, 225, 189, 165, 206, 185, 0, 225, 189, 166, 206, - 185, 0, 225, 189, 167, 206, 185, 0, 225, 189, 176, 206, - 185, 0, 206, 177, 206, 185, 0, 206, 172, 206, 185, 0, - 206, 177, 205, 130, 0, 206, 177, 205, 130, 206, 185, 0, - 225, 190, 176, 0, 225, 190, 177, 0, 225, 189, 176, 0, - 225, 189, 177, 0, 225, 189, 180, 206, 185, 0, 206, 183, - 206, 185, 0, 206, 174, 206, 185, 0, 206, 183, 205, 130, - 0, 206, 183, 205, 130, 206, 185, 0, 225, 189, 178, 0, - 225, 189, 179, 0, 225, 189, 180, 0, 225, 189, 181, 0, - 206, 185, 204, 136, 204, 128, 0, 206, 185, 205, 130, 0, - 206, 185, 204, 136, 205, 130, 0, 225, 191, 144, 0, 225, - 191, 145, 0, 225, 189, 182, 0, 225, 189, 183, 0, 207, - 133, 204, 136, 204, 128, 0, 207, 129, 204, 147, 0, 207, - 133, 205, 130, 0, 207, 133, 204, 136, 205, 130, 0, 225, - 191, 160, 0, 225, 191, 161, 0, 225, 189, 186, 0, 225, - 189, 187, 0, 225, 191, 165, 0, 225, 189, 188, 206, 185, - 0, 207, 137, 206, 185, 0, 207, 142, 206, 185, 0, 207, - 137, 205, 130, 0, 207, 137, 205, 130, 206, 185, 0, 225, - 189, 184, 0, 225, 189, 185, 0, 225, 189, 188, 0, 225, - 189, 189, 0, 114, 115, 0, 194, 176, 99, 0, 194, 176, - 102, 0, 110, 111, 0, 115, 109, 0, 116, 101, 108, 0, - 116, 109, 0, 226, 133, 176, 0, 226, 133, 177, 0, 226, - 133, 178, 0, 226, 133, 179, 0, 226, 133, 180, 0, 226, - 133, 181, 0, 226, 133, 182, 0, 226, 133, 183, 0, 226, - 133, 184, 0, 226, 133, 185, 0, 226, 133, 186, 0, 226, - 133, 187, 0, 226, 133, 188, 0, 226, 133, 189, 0, 226, - 133, 190, 0, 226, 133, 191, 0, 226, 147, 144, 0, 226, - 147, 145, 0, 226, 147, 146, 0, 226, 147, 147, 0, 226, - 147, 148, 0, 226, 147, 149, 0, 226, 147, 150, 0, 226, - 147, 151, 0, 226, 147, 152, 0, 226, 147, 153, 0, 226, - 147, 154, 0, 226, 147, 155, 0, 226, 147, 156, 0, 226, - 147, 157, 0, 226, 147, 158, 0, 226, 147, 159, 0, 226, - 147, 160, 0, 226, 147, 161, 0, 226, 147, 162, 0, 226, - 147, 163, 0, 226, 147, 164, 0, 226, 147, 165, 0, 226, - 147, 166, 0, 226, 147, 167, 0, 226, 147, 168, 0, 226, - 147, 169, 0, 104, 112, 97, 0, 97, 117, 0, 111, 118, - 0, 112, 97, 0, 110, 97, 0, 206, 188, 97, 0, 109, - 97, 0, 107, 97, 0, 107, 98, 0, 109, 98, 0, 103, - 98, 0, 112, 102, 0, 110, 102, 0, 206, 188, 102, 0, - 104, 122, 0, 107, 104, 122, 0, 109, 104, 122, 0, 103, - 104, 122, 0, 116, 104, 122, 0, 107, 112, 97, 0, 109, - 112, 97, 0, 103, 112, 97, 0, 112, 118, 0, 110, 118, - 0, 206, 188, 118, 0, 109, 118, 0, 107, 118, 0, 112, - 119, 0, 110, 119, 0, 206, 188, 119, 0, 109, 119, 0, - 107, 119, 0, 107, 207, 137, 0, 109, 207, 137, 0, 98, - 113, 0, 99, 226, 136, 149, 107, 103, 0, 99, 111, 46, - 0, 100, 98, 0, 103, 121, 0, 104, 112, 0, 107, 107, - 0, 107, 109, 0, 112, 104, 0, 112, 112, 109, 0, 112, - 114, 0, 115, 118, 0, 119, 98, 0, 102, 102, 0, 102, - 105, 0, 102, 108, 0, 102, 102, 105, 0, 102, 102, 108, - 0, 115, 116, 0, 213, 180, 213, 182, 0, 213, 180, 213, - 165, 0, 213, 180, 213, 171, 0, 213, 190, 213, 182, 0, - 213, 180, 213, 173, 0, 239, 189, 129, 0, 239, 189, 130, - 0, 239, 189, 131, 0, 239, 189, 132, 0, 239, 189, 133, - 0, 239, 189, 134, 0, 239, 189, 135, 0, 239, 189, 136, - 0, 239, 189, 137, 0, 239, 189, 138, 0, 239, 189, 139, - 0, 239, 189, 140, 0, 239, 189, 141, 0, 239, 189, 142, - 0, 239, 189, 143, 0, 239, 189, 144, 0, 239, 189, 145, - 0, 239, 189, 146, 0, 239, 189, 147, 0, 239, 189, 148, - 0, 239, 189, 149, 0, 239, 189, 150, 0, 239, 189, 151, - 0, 239, 189, 152, 0, 239, 189, 153, 0, 239, 189, 154, - 0, 240, 144, 144, 168, 0, 240, 144, 144, 169, 0, 240, - 144, 144, 170, 0, 240, 144, 144, 171, 0, 240, 144, 144, - 172, 0, 240, 144, 144, 173, 0, 240, 144, 144, 174, 0, - 240, 144, 144, 175, 0, 240, 144, 144, 176, 0, 240, 144, - 144, 177, 0, 240, 144, 144, 178, 0, 240, 144, 144, 179, - 0, 240, 144, 144, 180, 0, 240, 144, 144, 181, 0, 240, - 144, 144, 182, 0, 240, 144, 144, 183, 0, 240, 144, 144, - 184, 0, 240, 144, 144, 185, 0, 240, 144, 144, 186, 0, - 240, 144, 144, 187, 0, 240, 144, 144, 188, 0, 240, 144, - 144, 189, 0, 240, 144, 144, 190, 0, 240, 144, 144, 191, - 0, 240, 144, 145, 128, 0, 240, 144, 145, 129, 0, 240, - 144, 145, 130, 0, 240, 144, 145, 131, 0, 240, 144, 145, - 132, 0, 240, 144, 145, 133, 0, 240, 144, 145, 134, 0, - 240, 144, 145, 135, 0, 240, 144, 145, 136, 0, 240, 144, - 145, 137, 0, 240, 144, 145, 138, 0, 240, 144, 145, 139, - 0, 240, 144, 145, 140, 0, 240, 144, 145, 141, 0, -}; - -static const unsigned short nameprep_id05_prohibited_imap[] = { - 68, 196, 196, 324, 196, 196, 196, 452, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 196, 196, 196, 580, 196, 196, 196, 580, - 708, 196, 196, 580, 836, 836, 836, 836, - 836, 836, 836, 836, 0, 1, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 4, 2, 2, 5, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 6, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 7, 8, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 10, - 2, 2, 2, 11, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 12, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 13, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 13, 14, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id05_prohibited_bitmap[] = { - {{ - 255,255,255,255,255,223, 0,252, 1, 0, 0,248, 1, 0, 0,248, - }}, - {{ - 255,255,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,199, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 15, - }}, - {{ - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 7, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, - }}, - {{ - 2, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, - }}, -}; -static const unsigned short nameprep_id05_unassigned_imap[] = { - 68, 196, 324, 452, 580, 708, 708, 836, - 964, 964, 1092, 1220, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 708, 708, 708, 1348, 708, 708, 708, 1348, - 1476, 708, 708, 1348, 964, 964, 964, 964, - 964, 964, 964, 964, 0, 0, 0, 0, - 1, 2, 3, 4, 0, 5, 6, 7, - 8, 9, 10, 11, 12, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 0, 0, - 36, 37, 12, 38, 39, 40, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 0, 41, 42, 43, 44, 45, 46, 47, - 0, 48, 49, 50, 51, 52, 0, 53, - 54, 12, 55, 56, 0, 0, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 57, 0, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 67, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 68, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 69, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 71, 12, 72, 73, 0, 0, 74, 75, - 76, 77, 78, 79, 12, 12, 12, 12, - 12, 12, 80, 12, 81, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 82, 83, 84, - 12, 12, 12, 12, 85, 86, 87, 0, - 0, 88, 0, 89, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 90, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 91, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 0, 0, 0, 0, - 92, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 90, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 90, 93, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, -}; - -static const struct { - unsigned char bm[16]; -} nameprep_id05_unassigned_bitmap[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 3, 0,240,255,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0,128,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,248,255,207,187, - }}, - {{ - 15, 40, 0, 0, 4, 0, 0, 0, 0,128, 0, 3, 0, 0,192,255, - }}, - {{ - 128, 12, 0, 0, 0, 0, 0, 0, 96,230, 0, 0, 0, 0,192,252, - }}, - {{ - 255,255,255,255,255,255, 1, 0, 0, 0,128, 1, 1, 0, 0, 0, - }}, - {{ - 0,249, 1, 0, 4, 0, 0, 4,224,255, 0, 0, 0,248,224,255, - }}, - {{ - 255,239,255,119, 1, 0, 0,248, 0, 0,192,255, 0,192, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0,128, - }}, - {{ - 0, 64, 0, 0, 0,224, 0, 0, 0,248,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0,254,255,255,255,255,255,255,255,255,255, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 17, 0, 0, 0, 0, 0, 0, 12, 0,192,224, 0, 0, 0,254,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 58, 44, 96,198,127, 79, 48, 0, 0,248, - }}, - {{ - 27,120, 6, 0, 0, 2,146, 44,120,198,255,161, 63, 0,224,255, - }}, - {{ - 17, 80, 4, 0, 0, 2, 18, 12, 64,196,254,255, 62, 0,255,255, - }}, - {{ - 17, 96, 6, 0, 0, 2, 50, 12,112,198, 63, 79, 60, 0,254,255, - }}, - {{ - 19, 56,194, 41,231, 56, 64, 60, 56,194,127,255,127, 0,248,255, - }}, - {{ - 17, 32, 2, 0, 0, 2, 16, 60, 32,194,159,255, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 16, 60, 32,194,159,191, 60, 0,255,255, - }}, - {{ - 19, 32, 2, 0, 0, 2, 0, 60, 48,194,127,255, 60, 0,255,255, - }}, - {{ - 19, 0,128, 3, 0, 0, 4,208,128,123,160, 0,255,255,227,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0,120, 0, 0, 0,240,255,255,255,255, - }}, - {{ - 105,218, 15, 1, 81, 19, 0,196,160,192, 0,204,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,248, 1, 0, - }}, - {{ - 0,240, 0, 1, 0, 0, 0, 32, 0, 96,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 4, 9, 56,252, 0, 0, 0,252,255,255,255,255, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0,192,255, 0, 0, 0, 0,128,247, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 128, 0, 0, 0, 0, 0, 0, 0,128,194,128,194, 0, 0, 0, 0, - }}, - {{ - 128,194, 0, 0, 0,128,194,128,194,128,128, 0, 0,128, 0, 0, - }}, - {{ - 0,128,194,128, 0, 0, 0, 0,128, 0, 0,248, 1, 0, 0,224, - }}, - {{ - 255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,255, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,224, 0,252,255,255, - }}, - {{ - 0,128, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - }}, - {{ - 0, 0, 0, 0, 0,252,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, - }}, - {{ - 0, 0,192,192, 0, 0, 0, 0,192,192, 0, 85, 0, 0, 0,192, - }}, - {{ - 0, 0, 0, 0, 0, 0, 32, 0, 32, 0, 48, 16, 0, 0, 35,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0,128,192,255,255,255, 3, 14, 0, - }}, - {{ - 0,128,255,255, 0, 0,255,255,255,255, 0, 0,240,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0,248,255,255, 7, 0, 0, 0, 0, 0, - }}, - {{ - 240,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - }}, - {{ - 0, 0, 0,248,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,128,255,255,255, 0,248,255,255, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255,255, - }}, - {{ - 0, 0,192,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, - }}, - {{ - 0, 0,240, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,255, - }}, - {{ - 33, 12, 0, 0, 0, 1, 0, 0, 0, 80,184,128, 1,255, 63, 0, - }}, - {{ - 0, 0,224, 0, 0, 0, 1,128,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255, 0,240, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 56, 1, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0,224,129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, - }}, - {{ - 31, 0, 0, 0, 0,224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0,128, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0,224, 0, 0, 0, 0,240,255,255,255, 0, 0, 0,112, - }}, - {{ - 0, 0, 0, 0, 0, 0,254,255, 0,240, 0, 0, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 7, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0,128, - }}, - {{ - 0, 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0,224, 0, 0, 12, 0, 16, 0,162,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,240,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 128,255, 7, 31, 0, 0,128,160, 36, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0,252,255,255,255, 7, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 3, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0,240, - }}, - {{ - 255,255,255,255,240,255, 0, 0,224, 1, 8, 0,128,240, 40, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, - }}, - {{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 1, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0,128, 3, 3, 3,227,128,128,255, 1, - }}, - {{ - 0, 0, 0,128,240,255, 0, 0, 0,248,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0,192, 0, 0, 0, 0,192,255,255,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255, - }}, - {{ - 0, 0, 0, 0,128, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,255,255,255,255, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 32,155, 33, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 64, 24, 32, 32, 0, 0, 0,132,160, 3, 2, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, - }}, - {{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 63, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,255,255,255,255,255, - }}, - {{ - 0, 0, 0,192,255,255,255,255,255,255,255,255,255,255,255,255, - }}, - {{ - 253,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; -#define nameprep_id06_map_imap nameprep_id05_map_imap -#define nameprep_id06_map_table nameprep_id05_map_table -#define nameprep_id06_map_data nameprep_id05_map_data - -#define nameprep_id06_prohibited_imap nameprep_id05_prohibited_imap -#define nameprep_id06_prohibited_bitmap nameprep_id05_prohibited_bitmap - -#define nameprep_id06_unassigned_imap nameprep_id05_unassigned_imap -#define nameprep_id06_unassigned_bitmap nameprep_id05_unassigned_bitmap - diff --git a/contrib/idn/mdnkit/lib/normalizer.c b/contrib/idn/mdnkit/lib/normalizer.c deleted file mode 100644 index b14b51095b..0000000000 --- a/contrib/idn/mdnkit/lib/normalizer.c +++ /dev/null @@ -1,769 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: normalizer.c,v 1.1 2002/01/02 02:46:46 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_LOCAL_SCHEME 3 - -#define INITIALIZED (scheme_hash != NULL) - -typedef struct { - char *name; - mdn_normalizer_proc_t proc; -} normalize_scheme_t; - -typedef mdn_result_t (*caseconv_proc_t)(mdn__unicode_version_t, - unsigned long, mdn__unicode_context_t, - unsigned long *, size_t, int *); - -struct mdn_normalizer { - int nschemes; - int scheme_size; - normalize_scheme_t **schemes; - normalize_scheme_t *local_buf[MAX_LOCAL_SCHEME]; - int reference_count; -}; - -static mdn_strhash_t scheme_hash; - -static mdn__unicode_version_t vcur = NULL; -static mdn__unicode_version_t v301 = NULL; -static mdn__unicode_version_t v310 = NULL; -#define INIT_VERSION(version, var) \ - if (var == NULL) { \ - mdn_result_t r = mdn__unicode_create(version, &var); \ - if (r != mdn_success) \ - return (r); \ - } - -static mdn_result_t expand_schemes(mdn_normalizer_t ctx); -static mdn_result_t register_standard_normalizers(void); -static mdn_result_t normalizer_ascii_lowercase(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_ascii_uppercase(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_unicode_lowercase(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_unicode_uppercase(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_unicode_caseconv(caseconv_proc_t caseconv, - const char *from, - char *to, size_t tolen); -static mdn__unicode_context_t get_casemap_context(mdn__unicode_version_t ver, - const char *from, - size_t fromlen); -static mdn_result_t normalizer_unicode_casefold(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formc(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formd(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkc(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkd(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formc_v301(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formd_v301(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkc_v301(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkd_v301(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formc_v310(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formd_v310(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkc_v310(const char *from, - char *to, size_t tolen); -static mdn_result_t normalizer_formkd_v310(const char *from, - char *to, size_t tolen); - -static struct standard_normalizer { - char *name; - mdn_normalizer_proc_t proc; -} standard_normalizer[] = { - { "ascii-lowercase", normalizer_ascii_lowercase }, - { "ascii-uppercase", normalizer_ascii_uppercase }, - { "unicode-lowercase", normalizer_unicode_lowercase }, - { "unicode-uppercase", normalizer_unicode_uppercase }, - { "unicode-foldcase", normalizer_unicode_casefold }, - { "unicode-form-c", normalizer_formc }, - { "unicode-form-d", normalizer_formd }, - { "unicode-form-kc", normalizer_formkc }, - { "unicode-form-kd", normalizer_formkd }, - { "unicode-form-c/3.0.1", normalizer_formc_v301 }, - { "unicode-form-d/3.0.1", normalizer_formd_v301 }, - { "unicode-form-kc/3.0.1", normalizer_formkc_v301 }, - { "unicode-form-kd/3.0.1", normalizer_formkd_v301 }, - { "unicode-form-c/3.1.0", normalizer_formc_v310 }, - { "unicode-form-d/3.1.0", normalizer_formd_v310 }, - { "unicode-form-kc/3.1.0", normalizer_formkc_v310 }, - { "unicode-form-kd/3.1.0", normalizer_formkd_v310 }, - { "nameprep-03", normalizer_formkc_v301 }, - { "nameprep-05", normalizer_formkc_v310 }, - { "nameprep-06", normalizer_formkc_v310 }, - { NULL, NULL }, -}; - -mdn_result_t -mdn_normalizer_initialize(void) { - mdn_strhash_t hash; - mdn_result_t r; - - if (scheme_hash != NULL) - return (mdn_success); /* already initialized */ - - if ((r = mdn_strhash_create(&hash)) != mdn_success) { - WARNING(("mdn_normalizer_initialize: " - "hash table creation failed\n")); - return (r); - } - scheme_hash = hash; - - /* Register standard normalizers */ - return (register_standard_normalizers()); -} - -mdn_result_t -mdn_normalizer_create(mdn_normalizer_t *ctxp) { - mdn_normalizer_t ctx; - - assert(ctxp != NULL); - TRACE(("mdn_normalizer_create()\n")); - - if ((ctx = malloc(sizeof(struct mdn_normalizer))) == NULL) { - WARNING(("mdn_normalizer_create: malloc failed\n")); - return (mdn_nomemory); - } - - ctx->nschemes = 0; - ctx->scheme_size = MAX_LOCAL_SCHEME; - ctx->schemes = ctx->local_buf; - ctx->reference_count = 1; - *ctxp = ctx; - - return (mdn_success); -} - -void -mdn_normalizer_destroy(mdn_normalizer_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_normalizer_destroy()\n")); - TRACE(("mdn_normalizer_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_normalizer_destroy: the object is destroyed\n")); - if (ctx->schemes != ctx->local_buf) - free(ctx->schemes); - free(ctx); - } -} - -void -mdn_normalizer_incrref(mdn_normalizer_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_normalizer_incrref()\n")); - TRACE(("mdn_normalizer_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_result_t -mdn_normalizer_add(mdn_normalizer_t ctx, const char *scheme_name) { - mdn_result_t r; - void *v; - normalize_scheme_t *scheme; - - assert(ctx != NULL && scheme_name != NULL); - - TRACE(("mdn_normalizer_add(scheme_name=%s)\n", scheme_name)); - - assert(INITIALIZED); - - if (mdn_strhash_get(scheme_hash, scheme_name, &v) != mdn_success) { - WARNING(("mdn_normalizer_add: invalid scheme %s\n", - scheme_name)); - return (mdn_invalid_name); - } - - scheme = v; - - assert(ctx->nschemes <= ctx->scheme_size); - - if (ctx->nschemes == ctx->scheme_size && - (r = expand_schemes(ctx)) != mdn_success) { - WARNING(("mdn_normalizer_add: malloc failed\n")); - return (r); - } - - ctx->schemes[ctx->nschemes++] = scheme; - return (mdn_success); -} - -mdn_result_t -mdn_normalizer_addall(mdn_normalizer_t ctx, const char **scheme_names, - int nschemes) { - mdn_result_t r; - int i; - - assert(ctx != NULL && scheme_names != NULL); - - TRACE(("mdn_normalizer_addall(nschemes=%d)\n", nschemes)); - - for (i = 0; i < nschemes; i++) { - r = mdn_normalizer_add(ctx, (const char *)*scheme_names); - if (r != mdn_success) - return (r); - scheme_names++; - } - - return (mdn_success); -} - -mdn_result_t -mdn_normalizer_normalize(mdn_normalizer_t ctx, const char *from, - char *to, size_t tolen) -{ - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn_normalizer_normalize(from=\"%s\")\n", - mdn_debug_xstring(from, 20))); - - if (ctx->nschemes == 0) { - /* No normalization needed. */ - size_t flen = strlen(from); - - if (tolen < flen + 1) - return (mdn_buffer_overflow); - memcpy(to, from, flen + 1); /* +1 for NUL */ - return (mdn_success); - } else if (ctx->nschemes == 1) { - /* No temporary buffer needed. */ - TRACE(("mdn_normalizer_normalize: nomalization %s\n", - ctx->schemes[0]->name)); - return ((*ctx->schemes[0]->proc)(from, to, tolen)); - } else { - /* - * Allocate two intermediate buffers. - */ - char *buffer[2]; - char local_buf[2][1024]; /* usually big enough */ - size_t buffer_size[2]; - mdn_result_t r = mdn_success; - int i; - - /* - * Initialize the buffers to use the local - * storage (stack memory). - */ - buffer[0] = local_buf[0]; - buffer[1] = local_buf[1]; - buffer_size[0] = sizeof(local_buf[0]); - buffer_size[1] = sizeof(local_buf[1]); - - for (i = 0; i < ctx->nschemes; i++) { - const char *f; - char *t; - size_t len; - int f_idx = i % 2; - int t_idx = !f_idx; - - TRACE(("mdn_normalizer_normalize: nomalization %s\n", - ctx->schemes[i]->name)); - - /* - * Set up from/to buffers. - */ - retry: - if (i == 0) - f = from; - else - f = buffer[f_idx]; - if (i == ctx->nschemes - 1) { - t = to; - len = tolen; - } else { - t = buffer[t_idx]; - len = buffer_size[t_idx]; - } - - /* - * Call the normalize procedure. - */ - r = (*ctx->schemes[i]->proc)(f, t, len); - - if (r == mdn_buffer_overflow && t != to) { - /* - * Temporary buffer is too small. - * Make it bigger. - */ - char *p; - - TRACE(("mdn_normalizer_normalize: " - "allocating temporary buffer\n")); - - /* Make it double. */ - buffer_size[t_idx] *= 2; - - if (buffer[t_idx] == local_buf[t_idx]) { - size_t flen = strlen(f) + 100; - if (buffer_size[t_idx] < flen) - buffer_size[t_idx] = flen; - p = malloc(buffer_size[t_idx]); - } else { - p = realloc(buffer[t_idx], - buffer_size[t_idx]); - } - if (p == NULL) { - WARNING(("mdn_normalizer_normalize: " - "malloc failed\n")); - r = mdn_nomemory; - goto ret; - } - buffer[t_idx] = p; - /* Start it over again. */ - goto retry; - } else if (r != mdn_success) { - break; - } - } - - ret: - if (buffer[0] != local_buf[0]) - free(buffer[0]); - if (buffer[1] != local_buf[1]) - free(buffer[1]); - - return (r); - } -} - -mdn_result_t -mdn_normalizer_register(const char *scheme_name, mdn_normalizer_proc_t proc) { - mdn_result_t r; - normalize_scheme_t *scheme; - - assert(scheme_name != NULL && proc != NULL); - - TRACE(("mdn_normalizer_register(scheme_name=%s)\n", scheme_name)); - - assert(INITIALIZED); - - scheme = malloc(sizeof(*scheme) + strlen(scheme_name) + 1); - if (scheme == NULL) { - WARNING(("mdn_normalizer_register: malloc failed\n")); - return (mdn_nomemory); - } - scheme->name = (char *)(scheme + 1); - (void)strcpy(scheme->name, scheme_name); - scheme->proc = proc; - - r = mdn_strhash_put(scheme_hash, scheme_name, scheme); - if (r != mdn_success) - WARNING(("mdn_normalizer_register: registration failed\n")); - - return (r); -} - -static mdn_result_t -expand_schemes(mdn_normalizer_t ctx) { - normalize_scheme_t **new_schemes; - int new_size = ctx->scheme_size * 2; - - if (ctx->schemes == ctx->local_buf) { - new_schemes = malloc(sizeof(normalize_scheme_t) * new_size); - } else { - new_schemes = realloc(ctx->schemes, - sizeof(normalize_scheme_t) * new_size); - } - if (new_schemes == NULL) - return (mdn_nomemory); - - if (ctx->schemes == ctx->local_buf) - memcpy(new_schemes, ctx->local_buf, sizeof(ctx->local_buf)); - - ctx->schemes = new_schemes; - ctx->scheme_size = new_size; - - return (mdn_success); -} - -static mdn_result_t -register_standard_normalizers(void) { - int i; - int failed = 0; - - for (i = 0; standard_normalizer[i].name != NULL; i++) { - mdn_result_t r; - r = mdn_normalizer_register(standard_normalizer[i].name, - standard_normalizer[i].proc); - if (r != mdn_success) { - WARNING(("mdn_normalizer_initialize: " - "failed to register \"%-.100s\"\n", - standard_normalizer[i].name)); - failed++; - } - } - if (failed > 0) - return (mdn_failure); - else - return (mdn_success); -} - -/* - * Standard Normalizer - */ - -static mdn_result_t -normalizer_ascii_lowercase(const char *from, char *to, size_t tolen) { - size_t fromlen = strlen(from); - - while (fromlen > 0 && tolen > 0) { - int w = mdn_utf8_mblen(from); - - if (w == 0 || fromlen < w) - return (mdn_invalid_encoding); - else if (tolen < w) - return (mdn_buffer_overflow); - - if (w == 1 && isupper((unsigned char)*from)) { - *to++ = tolower((unsigned char)(*from++)); - } else { - int i = w; - while (i-- > 0) - *to++ = *from++; - } - fromlen -= w; - tolen -= w; - } - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -normalizer_ascii_uppercase(const char *from, char *to, size_t tolen) { - size_t fromlen = strlen(from); - - while (fromlen > 0 && tolen > 0) { - int w = mdn_utf8_mblen(from); - - if (w == 0 || fromlen < w) - return (mdn_invalid_encoding); - else if (tolen < w) - return (mdn_buffer_overflow); - - if (w == 1 && islower((unsigned char)*from)) { - *to++ = toupper((unsigned char)(*from++)); - } else { - int i = w; - while (i-- > 0) - *to++ = *from++; - } - fromlen -= w; - tolen -= w; - } - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -normalizer_unicode_lowercase(const char *from, char *to, size_t tolen) { - return (normalizer_unicode_caseconv(mdn__unicode_tolower, - from, to, tolen)); -} - -static mdn_result_t -normalizer_unicode_uppercase(const char *from, char *to, size_t tolen) { - return (normalizer_unicode_caseconv(mdn__unicode_toupper, - from, to, tolen)); -} - -static mdn_result_t -normalizer_unicode_caseconv(caseconv_proc_t caseconv, - const char *from, char *to, size_t tolen) -{ - size_t fromlen = strlen(from); - - INIT_VERSION(NULL, vcur); - - while (fromlen > 0 && tolen > 0) { -#define CASEMAPBUFSZ 4 - unsigned long c; - unsigned long v[CASEMAPBUFSZ]; - mdn_result_t r; - mdn__unicode_context_t ctx = mdn__unicode_context_unknown; - int vlen; - int w; - int i; - - if ((w = mdn_utf8_getwc(from, fromlen, &c)) == 0) - return (mdn_invalid_encoding); - from += w; - fromlen -= w; - - redo: - r = (*caseconv)(vcur, c, ctx, v, CASEMAPBUFSZ, &vlen); - switch (r) { - case mdn_success: - break; - case mdn_context_required: - ctx = get_casemap_context(vcur, from, fromlen); - goto redo; - case mdn_buffer_overflow: - FATAL(("mdn_normalizer_normalize: " - "internal buffer overflow\n")); - break; - default: - return (r); - } - - for (i = 0; i < vlen; i++) { - if ((w = mdn_utf8_putwc(to, tolen, v[i])) == 0) - return (mdn_buffer_overflow); - to += w; - tolen -= w; - } - } - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn__unicode_context_t -get_casemap_context(mdn__unicode_version_t ver, - const char *from, size_t fromlen) { - while (fromlen > 0) { - unsigned long v; - mdn__unicode_context_t ctx; - int w; - - if ((w = mdn_utf8_getwc(from, fromlen, &v)) == 0) - return (mdn_invalid_encoding); - from += w; - fromlen -= w; - ctx = mdn__unicode_getcontext(ver, v); - if (ctx == mdn__unicode_context_nonfinal || - ctx == mdn__unicode_context_final) - return (ctx); - } - return (mdn__unicode_context_final); -} - -static mdn_result_t -normalizer_unicode_casefold(const char *from, char *to, size_t tolen) { - size_t fromlen = strlen(from); - - INIT_VERSION(NULL, vcur); - - while (fromlen > 0 && tolen > 0) { -#define CASEFOLDBUFSZ 4 - unsigned long c; - unsigned long v[CASEFOLDBUFSZ]; - mdn_result_t r; - int vlen; - int w; - int i; - - if ((w = mdn_utf8_getwc(from, fromlen, &c)) == 0) - return (mdn_invalid_encoding); - from += w; - fromlen -= w; - - r = mdn__unicode_casefold(vcur, c, v, CASEFOLDBUFSZ, &vlen); - switch (r) { - case mdn_success: - break; - case mdn_buffer_overflow: - FATAL(("mdn_normalizer_normalize: " - "internal buffer overflow\n")); - break; - default: - return (r); - } - - for (i = 0; i < vlen; i++) { - if ((w = mdn_utf8_putwc(to, tolen, v[i])) == 0) - return (mdn_buffer_overflow); - to += w; - tolen -= w; - } - } - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -/* - * Unicode Normalization Forms -- latest version - */ - -static mdn_result_t -normalizer_formc(const char *from, char *to, size_t tolen) { - INIT_VERSION(NULL, vcur); - return (mdn__unormalize_formc(vcur, from, to, tolen)); -} - -static mdn_result_t -normalizer_formd(const char *from, char *to, size_t tolen) { - INIT_VERSION(NULL, vcur); - return (mdn__unormalize_formd(vcur, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkc(const char *from, char *to, size_t tolen) { - INIT_VERSION(NULL, vcur); - return (mdn__unormalize_formkc(vcur, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkd(const char *from, char *to, size_t tolen) { - INIT_VERSION(NULL, vcur); - return (mdn__unormalize_formkd(vcur, from, to, tolen)); -} - -/* - * Unicode Normalization Forms -- version 3.0.1 - */ - -static mdn_result_t -normalizer_formc_v301(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.0.1", v301); - return (mdn__unormalize_formc(v301, from, to, tolen)); -} - -static mdn_result_t -normalizer_formd_v301(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.0.1", v301); - return (mdn__unormalize_formd(v301, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkc_v301(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.0.1", v301); - return (mdn__unormalize_formkc(v301, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkd_v301(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.0.1", v301); - return (mdn__unormalize_formkd(v301, from, to, tolen)); -} - -/* - * Unicode Normalization Forms -- version 3.1.0 - */ - -static mdn_result_t -normalizer_formc_v310(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.1.0", v310); - return (mdn__unormalize_formc(v310, from, to, tolen)); -} - -static mdn_result_t -normalizer_formd_v310(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.1.0", v310); - return (mdn__unormalize_formd(v310, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkc_v310(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.1.0", v310); - return (mdn__unormalize_formkc(v310, from, to, tolen)); -} - -static mdn_result_t -normalizer_formkd_v310(const char *from, char *to, size_t tolen) { - INIT_VERSION("3.1.0", v310); - return (mdn__unormalize_formkd(v310, from, to, tolen)); -} - diff --git a/contrib/idn/mdnkit/lib/race.c b/contrib/idn/mdnkit/lib/race.c deleted file mode 100644 index 5a4216bb19..0000000000 --- a/contrib/idn/mdnkit/lib/race.c +++ /dev/null @@ -1,462 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: race.c,v 1.1 2002/01/02 02:46:46 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MDN_RACE_PREFIX -#define MDN_RACE_PREFIX "bq--" -#endif -#define RACE_2OCTET_MODE 0xd8 -#define RACE_ESCAPE 0xff -#define RACE_ESCAPE_2ND 0x99 - -#define RACE_BUF_SIZE 128 /* more than enough */ - -/* - * Unicode surrogate pair. - */ -#define IS_SURROGATE_HIGH(v) (0xd800 <= (v) && (v) <= 0xdbff) -#define IS_SURROGATE_LOW(v) (0xdc00 <= (v) && (v) <= 0xdfff) -#define SURROGATE_HIGH(v) (SURROGATE_H_OFF + (((v) - 0x10000) >> 10)) -#define SURROGATE_LOW(v) (SURROGATE_L_OFF + ((v) & 0x3ff)) -#define SURROGATE_BASE 0x10000 -#define SURROGATE_H_OFF 0xd800 -#define SURROGATE_L_OFF 0xdc00 -#define COMBINE_SURROGATE(h, l) \ - (SURROGATE_BASE + (((h)-SURROGATE_H_OFF)<<10) + ((l)-SURROGATE_L_OFF)) - -/* - * Compression type. - */ -enum { - compress_one, /* all characters are in a single row */ - compress_two, /* row 0 and another row */ - compress_none /* nope */ -}; - -static mdn_result_t race_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t race_decode_decompress(const char *from, - size_t fromlen, - unsigned short *buf, - size_t *lenp); -static mdn_result_t race_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t race_compress_encode(const unsigned short *p, - size_t len, int compress_mode, - char *to, size_t tolen); -static int get_compress_mode(unsigned short *p, size_t len); - -static mdn__ace_t race_ctx = { - mdn__ace_prefix, - MDN_RACE_PREFIX, - race_encode, - race_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__race_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__race_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir) { - return (mdn_success); -} - -mdn_result_t -mdn__race_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__race_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&race_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__race_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -race_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[RACE_BUF_SIZE]; - size_t len, reslen; - mdn_result_t r; - - /* - * Allocate sufficient buffer. - */ - if (fromlen + 1 > RACE_BUF_SIZE) { - if ((buf = malloc(sizeof(*buf) * (fromlen + 1))) == NULL) - return (mdn_nomemory); - } else { - /* Use local buffer. */ - buf = local_buf; - } - - /* - * Decode base32 and decompress. - */ - r = race_decode_decompress(from, fromlen, buf, &len); - if (r != mdn_success) - goto ret; - - /* - * Now 'buf' points the decompressed string, which must contain - * UTF-16 characters. - */ - - /* - * Convert to UTF-8. - */ - r = mdn_util_utf16toutf8(buf, len, to, tolen, &reslen); - if (r != mdn_success) - goto ret; - - if (tolen <= reslen) { - r = mdn_buffer_overflow; - goto ret; - } - *(to + reslen) = '\0'; - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -race_decode_decompress(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp) -{ - unsigned short *p = buf; - unsigned int bitbuf = 0; - int bitlen = 0; - int i, j; - size_t len; - - while (fromlen-- > 0) { - int c = *from++; - int x; - - if ('a' <= c && c <= 'z') - x = c - 'a'; - else if ('A' <= c && c <= 'Z') - x = c - 'A'; - else if ('2' <= c && c <= '7') - x = c - '2' + 26; - else - return (mdn_invalid_encoding); - - bitbuf = (bitbuf << 5) + x; - bitlen += 5; - if (bitlen >= 8) { - *p++ = (bitbuf >> (bitlen - 8)) & 0xff; - bitlen -= 8; - } - } - len = p - buf; - - /* - * The number of unused bits MUST be 4 or less, and all the - * bits MUST be zero. - */ - if (bitlen >= 5 || (bitbuf & ((1 << bitlen) - 1)) != 0) - return (mdn_invalid_encoding); - - /* - * Now 'buf' holds the decoded string. - */ - - /* - * RACE doesn't permit an input string with only one octet - * (RACE_2OCTET_MODE or a higher octet only). - */ - if (len <= 1) - return (mdn_invalid_encoding); - - /* - * Decompress. - */ - if (buf[0] == RACE_2OCTET_MODE) { - if ((len - 1) % 2 != 0) - return (mdn_invalid_encoding); - for (i = 1, j = 0; i < len; i += 2, j++) - buf[j] = (buf[i] << 8) + buf[i + 1]; - len = j; - } else { - unsigned short c = buf[0] << 8; /* higher octet */ - - for (i = 1, j = 0; i < len; j++) { - if (buf[i] == RACE_ESCAPE) { - if (i + 1 >= len) - return (mdn_invalid_encoding); - else if (buf[i + 1] == RACE_ESCAPE_2ND) - buf[j] = c | 0xff; - else - buf[j] = buf[i + 1]; - i += 2; - - } else if (buf[i] == 0x99 && c == 0x00) { - /* - * The RACE specification says this is error. - */ - return (mdn_invalid_encoding); - - } else { - buf[j] = c | buf[i++]; - } - } - len = j; - } - *lenp = len; - return (mdn_success); -} - -static mdn_result_t -race_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *p, *buf; - unsigned short local_buf[RACE_BUF_SIZE]; /* UTF-16 */ - mdn_result_t r; - size_t len, buflen; - int compress_mode; - int i; - - /* - * Convert to UTF-16. - * Preserve space for a character at the top of the buffer. - */ - buf = local_buf; - buflen = RACE_BUF_SIZE; - for (;;) { - r = mdn_util_utf8toutf16(from, fromlen, - buf + 1, buflen - 1, &len); - if (r == mdn_buffer_overflow) { - buflen *= 2; - if (buf == local_buf) - buf = malloc(sizeof(*buf) * buflen); - else - buf = realloc(buf, sizeof(*buf) * buflen); - if (buf == NULL) - return (mdn_nomemory); - } else if (r == mdn_success) { - break; - } else { - goto ret; - } - } - p = buf + 1; - - /* - * Now 'p' contains UTF-16 encoded string. - */ - - /* - * Check U+0099. - * RACE doesn't permit U+0099 in an input string. - */ - for (i = 0; i < len; i++) { - if (p[i] == 0x0099) { - r = mdn_invalid_encoding; - goto ret; - } - } - - /* - * Compress, encode in base-32 and output. - */ - compress_mode = get_compress_mode(p, len); - r = race_compress_encode(buf, len + 1, compress_mode, to, tolen); - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -race_compress_encode(const unsigned short *p, size_t len, int compress_mode, - char *to, size_t tolen) -{ - unsigned long bitbuf = 0; /* bit stream buffer */ - int bitlen = 0; /* # of bits in 'bitbuf' */ - int i; - - for (i = 0; i <= len; i++) { - if (i == len) { - /* End of data. Flush. */ - if (bitlen == 0) - break; - bitbuf <<= (5 - bitlen); - bitlen = 5; - } else if (i == 0) { - /* Output the first octet (U1 or 0xd8). */ - bitbuf = p[0]; - bitlen = 8; - } else if (compress_mode == compress_none) { - /* Push 16 bit data. */ - bitbuf = (bitbuf << 16) | p[i]; - bitlen += 16; - } else {/* compress_mode == compress_one/compress_two */ - /* Push 8 or 16 bit data. */ - if (compress_mode == compress_two && - (p[i] & 0xff00) == 0) { - /* Upper octet is zero (and not U1). */ - bitbuf = (bitbuf << 16) | 0xff00 | p[i]; - bitlen += 16; - } else if ((p[i] & 0xff) == 0xff) { - /* Lower octet is 0xff. */ - bitbuf = (bitbuf << 16) | - (RACE_ESCAPE << 8) | RACE_ESCAPE_2ND; - bitlen += 16; - } else { - /* Just output lower octet. */ - bitbuf = (bitbuf << 8) | (p[i] & 0xff); - bitlen += 8; - } - } - - /* - * Output bits in 'bitbuf' in 5-bit unit. - */ - while (bitlen >= 5) { - int x; - - /* Get top 5 bits. */ - x = (bitbuf >> (bitlen - 5)) & 0x1f; - bitlen -= 5; - - /* Encode. */ - if (x < 26) - x += 'a'; - else - x = (x - 26) + '2'; - - if (tolen < 1) - return (mdn_buffer_overflow); - - *to++ = x; - tolen--; - } - } - - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static int -get_compress_mode(unsigned short *p, size_t len) { - int zero = 0; - unsigned int upper = 0; - int i; - - for (i = 0; i < len; i++) { - unsigned int hi = p[i] & 0xff00; - - if (hi == 0) { - zero++; - } else if (hi == upper) { - ; - } else if (upper == 0) { - upper = hi; - } else { - p[-1] = RACE_2OCTET_MODE; - return (compress_none); - } - } - p[-1] = upper >> 8; - if (upper > 0 && zero > 0) - return (compress_two); - else - return (compress_one); -} - - diff --git a/contrib/idn/mdnkit/lib/res.c b/contrib/idn/mdnkit/lib/res.c deleted file mode 100644 index c06dda5ab3..0000000000 --- a/contrib/idn/mdnkit/lib/res.c +++ /dev/null @@ -1,890 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: res.c,v 1.1 2002/01/02 02:46:46 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static mdn_result_t nameconv_l(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_L(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_d(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_M(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_m(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_n(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_p(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_u(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_N(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_I(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_i(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_xm(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_xn(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_xp(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_xu(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t nameconv_xN(mdn_resconf_t ctx, const char *from, - char *to, size_t tolen); -static mdn_result_t copy_verbatim(const char *from, char *to, - size_t tolen); - -mdn_result_t -mdn_res_nameconv(mdn_resconf_t ctx, const char *insn, const char *from, - char *to, size_t tolen) -{ - mdn_result_t r; - char *src, *dst; - char static_buffers[2][1024]; /* large enough */ - char *dynamic_buffers[2]; - size_t dynamic_buflen[2]; - const char *ap; - size_t dstlen; - int dstidx; - - assert(ctx != NULL && from != NULL && to != NULL); - - TRACE(("mdn_res_nameconv(insn=%s, from=\"%s\", tolen=%d)\n", - insn, mdn_debug_xstring(from, 256), tolen)); - - /* - * Initialize the buffers to use the local - * storage (stack memory). - */ - dynamic_buffers[0] = NULL; - dynamic_buffers[1] = NULL; - dynamic_buflen[0] = 0; - dynamic_buflen[1] = 0; - - /* - * Convert. - */ - src = (void *)from; - dstlen = sizeof(static_buffers[0]) + 1; - ap = insn; - - while (*ap != '\0') { - if (*ap == ' ' || *ap == '\t') { - ap++; - continue; - } - - /* - * Choose destination area to restore the result of a mapping. - */ - if (dstlen <= sizeof(static_buffers[0])) { - if (src == static_buffers[0]) - dstidx = 1; - else - dstidx = 0; - - dst = static_buffers[dstidx]; - } else { - void *newbuf; - - if (src == dynamic_buffers[0]) - dstidx = 1; - else - dstidx = 0; - - newbuf = (char *)realloc(dynamic_buffers[dstidx], - dstlen); - if (newbuf == NULL) { - r = mdn_nomemory; - goto failure; - } - dynamic_buffers[dstidx] = newbuf; - dynamic_buflen[dstidx] = dstlen; - - dst = dynamic_buffers[dstidx]; - } - - /* - * Perform a conversion or check. - * If buffer size is not enough, we double it and try again. - */ - switch (*ap) { - case 'l': - r = nameconv_l(ctx, src, dst, dstlen); - break; - case 'L': - r = nameconv_L(ctx, src, dst, dstlen); - break; - case 'd': - r = nameconv_d(ctx, src, dst, dstlen); - break; - case 'M': - r = nameconv_M(ctx, src, dst, dstlen); - break; - case 'm': - r = nameconv_m(ctx, src, dst, dstlen); - break; - case 'n': - r = nameconv_n(ctx, src, dst, dstlen); - break; - case 'p': - r = nameconv_p(ctx, src, dst, dstlen); - break; - case 'u': - r = nameconv_u(ctx, src, dst, dstlen); - break; - case 'N': - r = nameconv_N(ctx, src, dst, dstlen); - break; - case 'I': - r = nameconv_I(ctx, src, dst, dstlen); - break; - case 'i': - r = nameconv_i(ctx, src, dst, dstlen); - break; - case '!': - ap++; - switch (*ap) { - case 'm': - r = nameconv_xm(ctx, src, dst, dstlen); - break; - case 'n': - r = nameconv_xn(ctx, src, dst, dstlen); - break; - case 'p': - r = nameconv_xp(ctx, src, dst, dstlen); - break; - case 'u': - r = nameconv_xu(ctx, src, dst, dstlen); - break; - case 'N': - r = nameconv_xN(ctx, src, dst, dstlen); - break; - default: - r = mdn_invalid_action; - break; - } - break; - default: - r = mdn_invalid_action; - break; - } - - if (r == mdn_buffer_overflow) { - dstlen *= 2; - continue; - } else if (r != mdn_success) - goto failure; - - ap++; - src = dst; - } - - r = copy_verbatim(src, to, tolen); - if (r != mdn_success) - goto failure; - - TRACE(("mdn_res_nameconv: to=\"%s\"\n", - mdn_debug_xstring(to, 256))); - - free(dynamic_buffers[0]); - free(dynamic_buffers[1]); - return (mdn_success); - -failure: - TRACE(("mdn_res_nameconv() failed, %s\n", mdn_result_tostring(r))); - free(dynamic_buffers[0]); - free(dynamic_buffers[1]); - return (r); -} - -static mdn_result_t -nameconv_l(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t local_converter; - - local_converter = mdn_resconf_getlocalconverter(ctx); - if (local_converter != NULL) { - r = mdn_converter_localtoutf8(local_converter, from, to, - tolen); - mdn_converter_destroy(local_converter); - } else { - r = copy_verbatim(from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_L(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t local_converter; - - local_converter = mdn_resconf_getlocalconverter(ctx); - if (local_converter != NULL) { - r = mdn_converter_utf8tolocal(local_converter, from, to, - tolen); - mdn_converter_destroy(local_converter); - } else { - r = copy_verbatim(from, to, tolen); - } - if (r == mdn_nomapping) - r = nameconv_I(ctx, from, to, tolen); - - return (r); -} - -static mdn_result_t -nameconv_d(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_delimitermap_t delimiter_mapper; - - delimiter_mapper = mdn_resconf_getdelimitermap(ctx); - if (delimiter_mapper != NULL) { - r = mdn_delimitermap_map(delimiter_mapper, from, to, tolen); - mdn_delimitermap_destroy(delimiter_mapper); - } else { - r = copy_verbatim(from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_M(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_mapselector_t local_mapper; - - local_mapper = mdn_resconf_getlocalmapselector(ctx); - if (local_mapper != NULL) { - r = mdn_mapselector_map(local_mapper, from, to, tolen); - mdn_mapselector_destroy(local_mapper); - } else { - r = copy_verbatim(from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_m(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_mapper_t mapper = NULL; - mdn_result_t r; - size_t fromlen; - size_t steplen; - char static_buffer[1024]; /* large enough */ - char *dynamic_buffer = NULL; - char *label; - char *dot; - - fromlen = strlen(from); - - mapper = mdn_resconf_getmapper(ctx); - if (mapper == NULL) { - r = copy_verbatim(from, to, tolen); - return (r); - } - - if (fromlen + 1 > sizeof(static_buffer)) { - dynamic_buffer = (char *) malloc(fromlen + 1); - if (dynamic_buffer == NULL) { - r = mdn_nomemory; - goto failure; - } - label = dynamic_buffer; - } else { - label = static_buffer; - } - - strcpy(label, from); - - for (;;) { - dot = strchr(label, '.'); - if (dot != NULL) - *dot = '\0'; - - if (*label == '\0' || mdn_util_validstd13(label, NULL)) { - r = copy_verbatim(label, to, tolen); - } else { - r = mdn_mapper_map(mapper, label, to, tolen); - } - if (r != mdn_success) - goto failure; - - steplen = strlen(to); - tolen -= steplen; - to += steplen; - - if (dot == NULL) - break; - - if (tolen <= 1) { - r = mdn_buffer_overflow; - return (r); - } - *to++ = '.'; - tolen--; - - label = dot + 1; - if (*label == '\0') - break; - } - - /* - * Don't delete the following. If `from' ends with ".", `to' is - * terminated by this line. - */ - *to = '\0'; - - free(dynamic_buffer); - mdn_mapper_destroy(mapper); - return (mdn_success); - -failure: - free(dynamic_buffer); - if (mapper != NULL) - mdn_mapper_destroy(mapper); - return (r); -} - -static mdn_result_t -nameconv_n(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_normalizer_t normalizer = NULL; - mdn_result_t r; - size_t fromlen; - size_t steplen; - char static_buffer[1024]; /* large enough */ - char *dynamic_buffer = NULL; - char *label; - char *dot; - - fromlen = strlen(from); - - normalizer = mdn_resconf_getnormalizer(ctx); - if (normalizer == NULL) { - r = copy_verbatim(from, to, tolen); - return (r); - } - - if (fromlen + 1 > sizeof(static_buffer)) { - dynamic_buffer = (char *) malloc(fromlen + 1); - if (dynamic_buffer == NULL) { - r = mdn_nomemory; - goto failure; - } - label = dynamic_buffer; - } else { - label = static_buffer; - } - - strcpy(label, from); - - for (;;) { - dot = strchr(label, '.'); - if (dot != NULL) - *dot = '\0'; - - if (*label == '\0' || mdn_util_validstd13(label, NULL)) { - r = copy_verbatim(label, to, tolen); - } else { - r = mdn_normalizer_normalize(normalizer, label, to, - tolen); - } - if (r != mdn_success) - goto failure; - - steplen = strlen(to); - tolen -= steplen; - to += steplen; - - if (dot == NULL) - break; - - if (tolen <= 1) { - r = mdn_buffer_overflow; - return (r); - } - *to++ = '.'; - tolen--; - - label = dot + 1; - if (*label == '\0') - break; - } - - /* - * Don't delete the following. If `from' ends with ".", `to' is - * terminated by this line. - */ - *to = '\0'; - - free(dynamic_buffer); - mdn_normalizer_destroy(normalizer); - return (mdn_success); - -failure: - free(dynamic_buffer); - if (normalizer != NULL) - mdn_normalizer_destroy(normalizer); - return (r); -} - -static mdn_result_t -nameconv_p(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - const char *found; - mdn_checker_t prohibit_checker; - - prohibit_checker = mdn_resconf_getprohibitchecker(ctx); - if (prohibit_checker != NULL) { - r = mdn_checker_lookup(prohibit_checker, from, &found); - mdn_checker_destroy(prohibit_checker); - if (r == mdn_success && found != NULL) - r = mdn_prohibited; - if (r != mdn_success) - return (r); - } - - r = copy_verbatim(from, to, tolen); - - return (r); -} - -static mdn_result_t -nameconv_u(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_checker_t unassigned_checker; - const char *found; - - unassigned_checker = mdn_resconf_getunassignedchecker(ctx); - if (unassigned_checker != NULL) { - r = mdn_checker_lookup(unassigned_checker, from, &found); - mdn_checker_destroy(unassigned_checker); - if (r == mdn_success && found != NULL) - r = mdn_prohibited; - if (r != mdn_success) - return (r); - } - - r = copy_verbatim(from, to, tolen); - - return (r); -} - -static mdn_result_t -nameconv_N(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - char static_buffer1[1024]; /* large enough */ - char static_buffer2[1024]; /* large enough */ - char *dynamic_buffer1 = NULL; - char *dynamic_buffer2 = NULL; - char *work1, *work2; - - if (tolen <= sizeof(static_buffer1)) { - work1 = static_buffer1; - work2 = static_buffer2; - } else { - dynamic_buffer1 = (char *)malloc(tolen); - dynamic_buffer2 = (char *)malloc(tolen); - if (dynamic_buffer1 == NULL || dynamic_buffer2 == NULL) { - r = mdn_nomemory; - goto failure; - } - work1 = dynamic_buffer1; - work2 = dynamic_buffer2; - } - - r = nameconv_m(ctx, from, work1, tolen); - if (r != mdn_success) - goto failure; - - r = nameconv_n(ctx, work1, work2, tolen); - if (r != mdn_success) - goto failure; - - r = nameconv_p(ctx, work2, to, tolen); - if (r != mdn_success) - goto failure; - - free(dynamic_buffer1); - free(dynamic_buffer2); - return (r); - -failure: - free(dynamic_buffer1); - free(dynamic_buffer2); - return (r); -} - -static mdn_result_t -nameconv_I(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - r = mdn_converter_utf8tolocal(idn_converter, from, to, tolen); - mdn_converter_destroy(idn_converter); - } else { - r = copy_verbatim(from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_i(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - r = mdn_converter_localtoutf8(idn_converter, from, to, tolen); - mdn_converter_destroy(idn_converter); - } else { - r = copy_verbatim(from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_xm(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - int encoding_type; - int isvalid; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - encoding_type = mdn_converter_encodingtype(idn_converter); - mdn_converter_destroy(idn_converter); - } else { - encoding_type = MDN_NONACE; - } - - r = nameconv_m(ctx, from, to, tolen); - if (r != mdn_success) - return (r); - - if (encoding_type == MDN_ACE_STRICTCASE) - isvalid = mdn_util_casematch(from, to, tolen); - else - isvalid = (strcmp(from, to) == 0); - - if (isvalid || encoding_type == MDN_NONACE) - r = copy_verbatim(from, to, tolen); - else - r = nameconv_I(ctx, from, to, tolen); - - return (r); -} - -static mdn_result_t -nameconv_xn(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - int encoding_type; - int isvalid; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - encoding_type = mdn_converter_encodingtype(idn_converter); - mdn_converter_destroy(idn_converter); - } else { - encoding_type = MDN_NONACE; - } - - r = nameconv_n(ctx, from, to, tolen); - if (r != mdn_success) - return (r); - - if (encoding_type == MDN_ACE_STRICTCASE) - isvalid = mdn_util_casematch(from, to, tolen); - else - isvalid = (strcmp(from, to) == 0); - - if (isvalid || encoding_type == MDN_NONACE) - r = copy_verbatim(from, to, tolen); - else - r = nameconv_I(ctx, from, to, tolen); - - return (r); -} - -static mdn_result_t -nameconv_xp(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - int encoding_type; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - encoding_type = mdn_converter_encodingtype(idn_converter); - mdn_converter_destroy(idn_converter); - } else { - encoding_type = MDN_NONACE; - } - - r = nameconv_p(ctx, from, to, tolen); - if (r == mdn_prohibited) { - if (encoding_type == MDN_NONACE) - r = copy_verbatim(from, to, tolen); - else - r = nameconv_I(ctx, from, to, tolen); - } - - return (r); -} - -static mdn_result_t -nameconv_xu(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - int encoding_type; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - encoding_type = mdn_converter_encodingtype(idn_converter); - mdn_converter_destroy(idn_converter); - } else { - encoding_type = MDN_NONACE; - } - - r = nameconv_u(ctx, from, to, tolen); - if (r == mdn_prohibited) { - if (encoding_type == MDN_NONACE) - r = copy_verbatim(from, to, tolen); - else - r = nameconv_I(ctx, from, to, tolen); - } - - return (mdn_success); -} - -static mdn_result_t -nameconv_xN(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - mdn_converter_t idn_converter; - int encoding_type; - int isvalid; - - idn_converter = mdn_resconf_getidnconverter(ctx); - if (idn_converter != NULL) { - encoding_type = mdn_converter_encodingtype(idn_converter); - mdn_converter_destroy(idn_converter); - } else { - encoding_type = MDN_NONACE; - } - - r = nameconv_N(ctx, from, to, tolen); - if (r == mdn_success) { - if (encoding_type == MDN_ACE_STRICTCASE) - isvalid = mdn_util_casematch(from, to, tolen); - else - isvalid = (strcmp(from, to) == 0); - } else if (r == mdn_prohibited) { - isvalid = 0; - } else { - return (r); - } - - if (isvalid || encoding_type == MDN_NONACE) - r = copy_verbatim(from, to, tolen); - else - r = nameconv_I(ctx, from, to, tolen); - - return (r); -} - -static mdn_result_t -copy_verbatim(const char *from, char *to, size_t tolen) { - size_t fromlen = strlen(from); - - if (fromlen + 1 > tolen) - return (mdn_buffer_overflow); - (void)memcpy(to, from, fromlen + 1); - return (mdn_success); -} - -#undef mdn_res_localtoucs -#undef mdn_res_ucstolocal -#undef mdn_res_map -#undef mdn_res_normalize -#undef mdn_res_prohibitcheck -#undef mdn_res_nameprep -#undef mdn_res_nameprepcheck -#undef mdn_res_unassignedcheck -#undef mdn_res_delimitermap -#undef mdn_res_localmap -#undef mdn_res_ucstodns -#undef mdn_res_dnstoucs - -mdn_result_t -mdn_res_localtoucs(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "l", from, to, tolen); -} - -mdn_result_t -mdn_res_ucstolocal(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "L", from, to, tolen); -} - -mdn_result_t -mdn_res_map(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) { - return mdn_res_nameconv(ctx, "m", from, to, tolen); -} - - -mdn_result_t -mdn_res_normalize(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "n", from, to, tolen); -} - -mdn_result_t -mdn_res_prohibitcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "p", from, to, tolen); -} - -mdn_result_t -mdn_res_nameprep(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "N", from, to, tolen); -} - -mdn_result_t -mdn_res_nameprepcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "!N", from, to, tolen); -} - -mdn_result_t -mdn_res_unassignedcheck(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "u", from, to, tolen); -} - -mdn_result_t -mdn_res_delimitermap(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "d", from, to, tolen); -} - -mdn_result_t -mdn_res_localmap(mdn_resconf_t ctx, const char *from, char *to, size_t tolen) { - return mdn_res_nameconv(ctx, "M", from, to, tolen); -} - -mdn_result_t -mdn_res_ucstodns(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "I", from, to, tolen); -} - -mdn_result_t -mdn_res_dnstoucs(mdn_resconf_t ctx, const char *from, char *to, - size_t tolen) { - return mdn_res_nameconv(ctx, "i", from, to, tolen); -} - diff --git a/contrib/idn/mdnkit/lib/resconf.c b/contrib/idn/mdnkit/lib/resconf.c deleted file mode 100644 index e4f27f7e4d..0000000000 --- a/contrib/idn/mdnkit/lib/resconf.c +++ /dev/null @@ -1,1379 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: resconf.c,v 1.1 2002/01/02 02:46:46 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MDN_RESCONF_DIR -#define MDN_RESCONF_DIR "/etc" -#endif -#define MDN_RESCONF_FILE MDN_RESCONF_DIR "/mdn.conf" - -#define MAX_CONF_LINE_LENGTH 255 -#define MAX_CONF_LINE_ARGS 63 - -struct mdn_resconf { - char *local_encoding; - mdn_converter_t local_converter; - mdn_converter_t idn_converter; - mdn_normalizer_t normalizer; - mdn_checker_t prohibit_checker; - mdn_checker_t unassigned_checker; - mdn_mapper_t mapper; - mdn_mapselector_t local_mapper; - mdn_delimitermap_t delimiter_mapper; - int reference_count; -}; - -static mdn_result_t parse_conf(mdn_resconf_t ctx, FILE *fp); -static mdn_result_t parse_delimiter_map(mdn_resconf_t ctx, char *args, - int lineno); -static mdn_result_t parse_encoding_alias_file(mdn_resconf_t ctx, - char *args, int lineno); -static mdn_result_t parse_idn_encoding(mdn_resconf_t ctx, char *args, - int lineno); -static mdn_result_t parse_local_map(mdn_resconf_t ctx, char *args, - int lineno); -static mdn_result_t parse_nameprep(mdn_resconf_t ctx, char *args, - int lineno, char **nameprep); -static mdn_result_t parse_map(mdn_resconf_t ctx, char *args, int lineno); -static mdn_result_t parse_normalize(mdn_resconf_t ctx, char *args, - int lineno); -static mdn_result_t parse_prohibit(mdn_resconf_t ctx, char *args, - int lineno); -static mdn_result_t parse_unassigned(mdn_resconf_t ctx, char *args, - int lineno); -static int split_args(char *s, char **av, int max_ac); -static void resetconf(mdn_resconf_t ctx); -static mdn_result_t update_local_converter(mdn_resconf_t ctx); -static mdn_result_t mystrdup(const char *from, char **top); -static const char * get_ucs(const char *p, unsigned long *vp); - -mdn_result_t -mdn_resconf_initialize(void) { - mdn_result_t r; - - TRACE(("mdn_resconf_initialize()\n")); - - /* - * Initialize sub modules. - */ - if ((r = mdn_converter_initialize()) != mdn_success) - return (r); - if ((r = mdn_normalizer_initialize()) != mdn_success) - return (r); - if ((r = mdn_checker_initialize()) != mdn_success) - return (r); - if ((r = mdn_mapselector_initialize()) != mdn_success) - return (r); - if ((r = mdn_mapper_initialize()) != mdn_success) - return (r); - - return (mdn_success); -} - -mdn_result_t -mdn_resconf_create(mdn_resconf_t *ctxp) { - mdn_resconf_t ctx = NULL; - - assert(ctxp != NULL); - - TRACE(("mdn_resconf_create()\n")); - - if ((ctx = malloc(sizeof(*ctx))) == NULL) - return (mdn_nomemory); - - ctx->local_encoding = NULL; - ctx->local_converter = NULL; - ctx->idn_converter = NULL; - ctx->normalizer = NULL; - ctx->prohibit_checker = NULL; - ctx->unassigned_checker = NULL; - ctx->mapper = NULL; - ctx->local_mapper = NULL; - ctx->delimiter_mapper = NULL; - ctx->reference_count = 1; - - *ctxp = ctx; - - return (mdn_success); -} - -char * -mdn_resconf_defaultfile() { - return MDN_RESCONF_FILE; -} - -mdn_result_t -mdn_resconf_loadfile(mdn_resconf_t ctx, const char *file) { - FILE *fp; - mdn_result_t r; - - assert(ctx != NULL); - - TRACE(("mdn_resconf_loadfile(file=%s)\n", - file == NULL ? "" : file)); - - if ((r = mdn_converter_resetalias()) != mdn_success) - return (r); - - resetconf(ctx); - - if (file == NULL) - file = mdn_resconf_defaultfile(); - if ((fp = fopen(file, "r")) == NULL) { - TRACE(("mdn_resconf_loadfile: cannot open %-.40s\n", file)); - return (mdn_nofile); - } - - r = parse_conf(ctx, fp); - fclose(fp); - - return (r); -} - -void -mdn_resconf_destroy(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_destroy()\n")); - TRACE(("mdn_resconf_destroy: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count - 1)); - - ctx->reference_count--; - if (ctx->reference_count <= 0) { - TRACE(("mdn_converter_destroy: the object is destroyed\n")); - resetconf(ctx); - free(ctx); - } -} - -void -mdn_resconf_incrref(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_incrref()\n")); - TRACE(("mdn_resconf_incrref: update reference count (%d->%d)\n", - ctx->reference_count, ctx->reference_count + 1)); - - ctx->reference_count++; -} - -mdn_converter_t -mdn_resconf_getalternateconverter(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getalternateconverter()\n")); - - return (mdn_resconf_getidnconverter(ctx)); -} - -mdn_delimitermap_t -mdn_resconf_getdelimitermap(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getdelimitermap()\n")); - - if (ctx->delimiter_mapper != NULL) - mdn_delimitermap_incrref(ctx->delimiter_mapper); - return (ctx->delimiter_mapper); -} - -mdn_converter_t -mdn_resconf_getidnconverter(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getidnconverter()\n")); - - if (ctx->idn_converter != NULL) - mdn_converter_incrref(ctx->idn_converter); - return (ctx->idn_converter); -} - -mdn_converter_t -mdn_resconf_getlocalconverter(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getlocalconverter()\n")); - - if (update_local_converter(ctx) != mdn_success) - return (NULL); - mdn_converter_incrref(ctx->local_converter); - return (ctx->local_converter); -} - -mdn_mapselector_t -mdn_resconf_getlocalmapselector(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getlocalmapselector()\n")); - - if (ctx->local_mapper != NULL) - mdn_mapselector_incrref(ctx->local_mapper); - return (ctx->local_mapper); -} - -mdn_mapper_t -mdn_resconf_getmapper(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getmapper()\n")); - - if (ctx->mapper != NULL) - mdn_mapper_incrref(ctx->mapper); - return (ctx->mapper); -} - -mdn_normalizer_t -mdn_resconf_getnormalizer(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getnormalizer()\n")); - - if (ctx->normalizer != NULL) - mdn_normalizer_incrref(ctx->normalizer); - return (ctx->normalizer); -} - -mdn_checker_t -mdn_resconf_getprohibitchecker(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getprohibitchecker()\n")); - - if (ctx->prohibit_checker != NULL) - mdn_checker_incrref(ctx->prohibit_checker); - return (ctx->prohibit_checker); -} - -mdn_checker_t -mdn_resconf_getunassignedchecker(mdn_resconf_t ctx) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_getunassignedchecker()\n")); - - if (ctx->unassigned_checker != NULL) - mdn_checker_incrref(ctx->unassigned_checker); - return (ctx->unassigned_checker); -} - -void -mdn_resconf_setalternateconverter(mdn_resconf_t ctx, - mdn_converter_t alternate_converter) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setalternateconverter()\n")); -} - -void -mdn_resconf_setdelimitermap(mdn_resconf_t ctx, - mdn_delimitermap_t delimiter_mapper) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setdelimitermap()\n")); - - if (ctx->delimiter_mapper != NULL) - mdn_delimitermap_destroy(ctx->delimiter_mapper); - ctx->delimiter_mapper = delimiter_mapper; - if (delimiter_mapper != NULL) - mdn_delimitermap_incrref(ctx->delimiter_mapper); -} - -void -mdn_resconf_setidnconverter(mdn_resconf_t ctx, - mdn_converter_t idn_converter) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setidnconverter()\n")); - - if (ctx->idn_converter != NULL) - mdn_converter_destroy(ctx->idn_converter); - ctx->idn_converter = idn_converter; - if (idn_converter != NULL) - mdn_converter_incrref(ctx->idn_converter); -} - -void -mdn_resconf_setlocalconverter(mdn_resconf_t ctx, - mdn_converter_t local_converter) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setlocalconverter()\n")); - - if (ctx->local_converter != NULL) - mdn_converter_destroy(ctx->local_converter); - free(ctx->local_encoding); - ctx->local_encoding = NULL; /* See update_local_converter(). */ - ctx->local_converter = local_converter; - if (local_converter != NULL) - mdn_converter_incrref(local_converter); -} - -void -mdn_resconf_setlocalmapselector(mdn_resconf_t ctx, - mdn_mapselector_t local_mapper) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setlocalmapselector()\n")); - - if (ctx->local_mapper != NULL) - mdn_mapselector_destroy(ctx->local_mapper); - ctx->local_mapper = local_mapper; - if (local_mapper != NULL) - mdn_mapselector_incrref(ctx->local_mapper); -} - -void -mdn_resconf_setmapper(mdn_resconf_t ctx, mdn_mapper_t mapper) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setmapper()\n")); - - if (ctx->mapper != NULL) - mdn_mapper_destroy(ctx->mapper); - ctx->mapper = mapper; - if (mapper != NULL) - mdn_mapper_incrref(ctx->mapper); -} - -void -mdn_resconf_setnormalizer(mdn_resconf_t ctx, mdn_normalizer_t normalizer) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setnormalizer()\n")); - - if (ctx->normalizer != NULL) - mdn_normalizer_destroy(ctx->normalizer); - ctx->normalizer = normalizer; - if (normalizer != NULL) - mdn_normalizer_incrref(ctx->normalizer); -} - -void -mdn_resconf_setprohibitchecker(mdn_resconf_t ctx, - mdn_checker_t prohibit_checker) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setprohibitchecker()\n")); - - if (ctx->prohibit_checker != NULL) - mdn_checker_destroy(ctx->prohibit_checker); - ctx->prohibit_checker = prohibit_checker; - if (prohibit_checker != NULL) - mdn_checker_incrref(ctx->prohibit_checker); -} - -void -mdn_resconf_setunassignedchecker(mdn_resconf_t ctx, - mdn_checker_t unassigned_checker) { - assert(ctx != NULL); - - TRACE(("mdn_resconf_setunassignedchecker()\n")); - - if (ctx->unassigned_checker != NULL) - mdn_checker_destroy(ctx->unassigned_checker); - ctx->unassigned_checker = unassigned_checker; - if (unassigned_checker != NULL) - mdn_checker_incrref(ctx->unassigned_checker); -} - -mdn_result_t -mdn_resconf_setnameprepversion(mdn_resconf_t ctx, const char *version) -{ - char prohibit_scheme_name[MAX_CONF_LINE_LENGTH + 1]; - char unassigned_scheme_name[MAX_CONF_LINE_LENGTH + 1]; - mdn_mapper_t mapper = NULL; - mdn_normalizer_t normalizer = NULL; - mdn_checker_t prohibit_checker = NULL; - mdn_checker_t unassigned_checker = NULL; - mdn_result_t r; - - assert(ctx != NULL && version != NULL); - - TRACE(("mdn_resconf_setnameprepversion()\n")); - - /* - * Set canonical scheme names. - */ - if (strlen(version) + strlen(MDN_CHECKER_PROHIBIT_PREFIX) - > MAX_CONF_LINE_LENGTH) { - r = mdn_invalid_name; - goto failure; - } - sprintf(prohibit_scheme_name, "%s%s", - MDN_CHECKER_PROHIBIT_PREFIX, version); - - if (strlen(version) + strlen(MDN_CHECKER_UNASSIGNED_PREFIX) - > MAX_CONF_LINE_LENGTH) { - r = mdn_invalid_name; - goto failure; - } - sprintf(unassigned_scheme_name, "%s%s", - MDN_CHECKER_UNASSIGNED_PREFIX, version); - - /* - * Create objects. - */ - r = mdn_mapper_create(&mapper); - if (r != mdn_success) - goto failure; - r = mdn_normalizer_create(&normalizer); - if (r != mdn_success) - goto failure; - r = mdn_checker_create(&prohibit_checker); - if (r != mdn_success) - goto failure; - r = mdn_checker_create(&unassigned_checker); - if (r != mdn_success) - goto failure; - - r = mdn_mapper_add(mapper, version); - if (r != mdn_success) - goto failure; - r = mdn_normalizer_add(normalizer, version); - if (r != mdn_success) - goto failure; - r = mdn_checker_add(prohibit_checker, prohibit_scheme_name); - if (r != mdn_success) - goto failure; - r = mdn_checker_add(unassigned_checker, unassigned_scheme_name); - if (r != mdn_success) - goto failure; - - /* - * Set the objects. - */ - mdn_resconf_setmapper(ctx, mapper); - mdn_resconf_setnormalizer(ctx, normalizer); - mdn_resconf_setprohibitchecker(ctx, prohibit_checker); - mdn_resconf_setunassignedchecker(ctx, unassigned_checker); - - /* - * Destroy the objects. - */ - mdn_mapper_destroy(mapper); - mdn_normalizer_destroy(normalizer); - mdn_checker_destroy(prohibit_checker); - mdn_checker_destroy(unassigned_checker); - - return (mdn_success); - -failure: - if (mapper != NULL) - mdn_mapper_destroy(mapper); - if (normalizer != NULL) - mdn_normalizer_destroy(normalizer); - if (prohibit_checker != NULL) - mdn_checker_destroy(prohibit_checker); - if (unassigned_checker != NULL) - mdn_checker_destroy(unassigned_checker); - - return (r); -} - -mdn_result_t -mdn_resconf_setalternateconvertername(mdn_resconf_t ctx, const char *name, - int flags) { - assert(ctx != NULL && name != NULL); - - TRACE(("mdn_resconf_setalternateconvertername(name=%s, flags=%d)\n", - name, flags)); - - return (mdn_success); -} - -mdn_result_t -mdn_resconf_setidnconvertername(mdn_resconf_t ctx, const char *name, - int flags) { - mdn_converter_t idn_converter; - mdn_result_t r; - - assert(ctx != NULL && name != NULL); - - TRACE(("mdn_resconf_setidnconvertername(name=%s, flags=%d)\n", - name, flags)); - - r = mdn_converter_create(name, &idn_converter, flags); - if (r != mdn_success) - return (r); - - if (ctx->idn_converter != NULL) - mdn_converter_destroy(ctx->idn_converter); - ctx->idn_converter = idn_converter; - - return (mdn_success); -} - -mdn_result_t -mdn_resconf_setlocalconvertername(mdn_resconf_t ctx, const char *name, - int flags) { - mdn_converter_t local_converter; - char *local_encoding = NULL; - mdn_result_t r; - - assert(ctx != NULL); - - TRACE(("mdn_resconf_setlocalconvertername(mame=%s, flags=%d)\n", - name == NULL ? "" : name, flags)); - - if (name == NULL) { - local_converter = NULL; - } else { - r = mdn_converter_create(name, &local_converter, flags); - if (r != mdn_success) { - free(local_encoding); - return (r); - } - } - if (ctx->local_converter != NULL) - mdn_converter_destroy(ctx->local_converter); - free(ctx->local_encoding); - ctx->local_converter = local_converter; - ctx->local_encoding = NULL; /* See update_local_converter(). */ - - return (mdn_success); -} - -mdn_result_t -mdn_resconf_addalldelimitermapucs(mdn_resconf_t ctx, unsigned long *v, - int nv) { - mdn_result_t r; - - TRACE(("mdn_resconf_addalldelimitermapucs(nv=%d)\n", nv)); - - if (ctx->delimiter_mapper == NULL) { - r = mdn_delimitermap_create(&(ctx->delimiter_mapper)); - if (r != mdn_success) - return (r); - } - - r = mdn_delimitermap_addall(ctx->delimiter_mapper, v, nv); - return (r); -} - -mdn_result_t -mdn_resconf_addalllocalmapselectornames(mdn_resconf_t ctx, const char *tld, - const char **names, int nnames) { - mdn_result_t r; - - assert(ctx != NULL && names != NULL); - - TRACE(("mdn_resconf_addalllocalmapselectorname(tld=%s, nnames=%d)\n", - tld, nnames)); - - if (ctx->local_mapper == NULL) { - r = mdn_mapselector_create(&(ctx->local_mapper)); - if (r != mdn_success) - return (r); - } - - r = mdn_mapselector_addall(ctx->local_mapper, tld, names, nnames); - return (r); -} - -mdn_result_t -mdn_resconf_addallmappernames(mdn_resconf_t ctx, const char **names, - int nnames) { - mdn_result_t r; - - assert(ctx != NULL && names != NULL); - - TRACE(("mdn_resconf_addallmappername()\n")); - - if (ctx->mapper == NULL) { - r = mdn_mapper_create(&(ctx->mapper)); - if (r != mdn_success) - return (r); - } - - r = mdn_mapper_addall(ctx->mapper, names, nnames); - return (r); -} - -mdn_result_t -mdn_resconf_addallnormalizernames(mdn_resconf_t ctx, const char **names, - int nnames) { - mdn_result_t r; - - assert(ctx != NULL && names != NULL); - - TRACE(("mdn_resconf_addallnormalizername(nnames=%d)\n", nnames)); - - if (ctx->normalizer == NULL) { - r = mdn_normalizer_create(&(ctx->normalizer)); - if (r != mdn_success) - return (r); - } - - r = mdn_normalizer_addall(ctx->normalizer, names, nnames); - return (r); -} - -mdn_result_t -mdn_resconf_addallprohibitcheckernames(mdn_resconf_t ctx, const char **names, - int nnames) { - char long_name[MAX_CONF_LINE_LENGTH + 1]; - mdn_result_t r; - int i; - - assert(ctx != NULL && names != NULL); - - TRACE(("mdn_resconf_addallprohibitcheckername(nnames=%d)\n", nnames)); - - if (ctx->prohibit_checker == NULL) { - r = mdn_checker_create(&(ctx->prohibit_checker)); - if (r != mdn_success) - return (r); - } - - for (i = 0; i < nnames; i++, names++) { - if (strlen(*names) + strlen(MDN_CHECKER_PROHIBIT_PREFIX) - > MAX_CONF_LINE_LENGTH) { - return (mdn_invalid_name); - } - strcpy(long_name, MDN_CHECKER_PROHIBIT_PREFIX); - strcat(long_name, *names); - - r = mdn_checker_add(ctx->prohibit_checker, long_name); - if (r != mdn_success) - return (r); - } - - return (mdn_success); -} - -mdn_result_t -mdn_resconf_addallunassignedcheckernames(mdn_resconf_t ctx, const char **names, - int nnames) { - char long_name[MAX_CONF_LINE_LENGTH + 1]; - mdn_result_t r; - int i; - - assert(ctx != NULL && names != NULL); - - TRACE(("mdn_resconf_addallunassignedcheckername(nnames=%d)\n", - nnames)); - - if (ctx->unassigned_checker == NULL) { - r = mdn_checker_create(&(ctx->unassigned_checker)); - if (r != mdn_success) - return (r); - } - - for (i = 0; i < nnames; i++, names++) { - if (strlen(*names) + strlen(MDN_CHECKER_UNASSIGNED_PREFIX) - > MAX_CONF_LINE_LENGTH) { - return (mdn_invalid_name); - } - strcpy(long_name, MDN_CHECKER_UNASSIGNED_PREFIX); - strcat(long_name, *names); - - r = mdn_checker_add(ctx->unassigned_checker, long_name); - if (r != mdn_success) - return (r); - } - - return (mdn_success); -} - -static mdn_result_t -parse_conf(mdn_resconf_t ctx, FILE *fp) { - char line[MAX_CONF_LINE_LENGTH + 1]; - int lineno = 0; - char *argv[3]; - int argc; - mdn_result_t r; - char *idn_encoding_args = NULL; - int idn_encoding_lineno = 0; - char *nameprep = NULL; - - /* - * Parse config file. parsing of 'idn-encoding' line is - * postponed because 'alias-file' line must be processed - * before them. - */ - while (fgets(line, sizeof(line), fp) != NULL) { - char *newline; - - lineno++; - newline = strpbrk(line, "\r\n"); - if (newline != NULL) - *newline = '\0'; - else if (fgetc(fp) != EOF) { - mdn_log_error("mdnres: too long line \"%-.30s\", " - "line %d", line, lineno); - return (mdn_invalid_syntax); - } - - argc = split_args(line, argv, 2); - if (argc == -1) { - mdn_log_error("mdnres: syntax error, line %d\n", - lineno); - return (mdn_invalid_syntax); - } else if (argc == 0 || argv[0][0] == '#') { - continue; - } - - if (strcmp(argv[0], "alternate-encoding") == 0) { - continue; - } else if (strcmp(argv[0], "delimiter-map") == 0) { - r = parse_delimiter_map(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "encoding-alias-file") == 0) { - r = parse_encoding_alias_file(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "idn-encoding") == 0) { - r = mystrdup(argv[1], &idn_encoding_args); - if (r != mdn_success) { - mdn_log_error("mdnres: %s, line %d\n", - mdn_result_tostring(r), lineno); - } - idn_encoding_lineno = lineno; - - } else if (strcmp(argv[0], "local-map") == 0) { - r = parse_local_map(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "nameprep") == 0) { - r = parse_nameprep(ctx, argv[1], lineno, &nameprep); - - } else if (strcmp(argv[0], "nameprep-map") == 0) { - r = parse_map(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "nameprep-normalize") == 0) { - r = parse_normalize(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "nameprep-prohibit") == 0) { - r = parse_prohibit(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "nameprep-unassigned") == 0) { - r = parse_unassigned(ctx, argv[1], lineno); - - } else if (strcmp(argv[0], "server-zld") == 0 || - strcmp(argv[0], "alias-file") == 0 || - strcmp(argv[0], "normalize") == 0 || - strcmp(argv[0], "server-encoding") == 0) { - mdn_log_warning("mdnres: obsolete command " - "\"%-.30s\", line %d (ignored)\n", - argv[0], lineno); - r = mdn_success; - } else { - mdn_log_error("mdnres: unrecognized command " - "\"%-.30s\", line %d\n", - argv[0], lineno); - r = mdn_invalid_syntax; - } - if (r != mdn_success) - return (r); - } - - lineno++; - - if (nameprep != NULL) { - if (ctx->mapper == NULL) { - r = parse_map(ctx, nameprep, lineno); - if (r != mdn_success) - return (r); - } - if (ctx->normalizer == NULL) { - r = parse_normalize(ctx, nameprep, lineno); - if (r != mdn_success) - return (r); - } - if (ctx->prohibit_checker == NULL) { - r = parse_prohibit(ctx, nameprep, lineno); - if (r != mdn_success) - return (r); - } - if (ctx->unassigned_checker == NULL) { - r = parse_unassigned(ctx, nameprep, lineno); - if (r != mdn_success) - return (r); - } - } - - if (idn_encoding_args != NULL) { - r = parse_idn_encoding(ctx, idn_encoding_args, - idn_encoding_lineno); - if (r != mdn_success) - return (r); - } - - return (mdn_success); -} - -static mdn_result_t -parse_delimiter_map(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - unsigned long ucs; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for delimiter-map, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - if (ctx->delimiter_mapper == NULL) { - r = mdn_delimitermap_create(&ctx->delimiter_mapper); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create delimiter " - "mapper, %s, line %d\n", - mdn_result_tostring(r), lineno); - return (r); - } - } - - for (i = 0; i < argc; i++) { - if (get_ucs(argv[i], &ucs) == NULL) { - mdn_log_error("mdnres: invalid delimiter " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (mdn_invalid_syntax); - } - r = mdn_delimitermap_add(ctx->delimiter_mapper, ucs); - if (r == mdn_invalid_codepoint) { - mdn_log_error("mdnres: invalid delimiter " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static mdn_result_t -parse_encoding_alias_file(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc != 1) { - mdn_log_error("mdnres: wrong # of args for " - "encoding-alias-file, line %d\n", lineno); - return (mdn_invalid_syntax); - } - - r = mdn_converter_aliasfile(argv[0]); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot set aliasfile, %s, line %d\n", - mdn_result_tostring(r), lineno); - } - - return (r); -} - -static mdn_result_t -parse_idn_encoding(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc != 1) { - mdn_log_error("mdnres: wrong # of args for idn-encoding, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - r = mdn_converter_create(argv[0], &ctx->idn_converter, - MDN_CONVERTER_DELAYEDOPEN); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create idn converter, %s, " - "line %d\n", mdn_result_tostring(r), lineno); - } - - return (r); -} - -static mdn_result_t -parse_local_map(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc < 2 || argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for local-map, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - if (ctx->local_mapper == NULL) { - r = mdn_mapselector_create(&ctx->local_mapper); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create local mapper, " - "%s, line %d\n", - mdn_result_tostring(r), lineno); - return (r); - } - } - - for (i = 1; i < argc; i++) { - r = mdn_mapselector_add(ctx->local_mapper, argv[0], argv[i]); - if (r == mdn_invalid_name) { - mdn_log_error("mdnres: map scheme unavailable " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static mdn_result_t -parse_nameprep(mdn_resconf_t ctx, char *args, int lineno, char **nameprep) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc != 1) { - mdn_log_error("mdnres: wrong # of args for nameprep, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - r = mystrdup(argv[0], nameprep); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot set nameprep, %s, line %d\n", - mdn_result_tostring(r), lineno); - } - - return (r); -} - -static mdn_result_t -parse_map(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for map, line %d\n", - lineno); - return (mdn_invalid_syntax); - } - - if (ctx->mapper == NULL) { - r = mdn_mapper_create(&ctx->mapper); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create mapper, %s, " - "line %d\n", mdn_result_tostring(r), - lineno); - return (r); - } - } - - for (i = 0; i < argc; i++) { - r = mdn_mapper_add(ctx->mapper, argv[i]); - if (r == mdn_invalid_name) { - mdn_log_error("mdnres: map scheme unavailable " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static mdn_result_t -parse_normalize(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for normalize, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - if (ctx->normalizer == NULL) { - r = mdn_normalizer_create(&ctx->normalizer); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create normalizer, %s, " - "line %d\n", mdn_result_tostring(r), - lineno); - return (r); - } - } - - for (i = 0; i < argc; i++) { - r = mdn_normalizer_add(ctx->normalizer, argv[i]); - if (r == mdn_invalid_name) { - mdn_log_error("mdnres: unknown normalization scheme " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static mdn_result_t -parse_prohibit(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - char scheme_name[MAX_CONF_LINE_LENGTH + 1]; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for prohibit, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - if (ctx->prohibit_checker == NULL) { - r = mdn_checker_create(&ctx->prohibit_checker); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create prohibit " - "checker, %s, line %d\n", - mdn_result_tostring(r), lineno); - return (r); - } - } - - for (i = 0; i < argc; i++) { - sprintf(scheme_name, "%s%s", MDN_CHECKER_PROHIBIT_PREFIX, - argv[i]); - r = mdn_checker_add(ctx->prohibit_checker, scheme_name); - if (r == mdn_invalid_name) { - mdn_log_error("mdnres: prohibit scheme unavailable " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static mdn_result_t -parse_unassigned(mdn_resconf_t ctx, char *args, int lineno) { - mdn_result_t r; - char *argv[MAX_CONF_LINE_ARGS + 1]; - int argc; - char scheme_name[MAX_CONF_LINE_LENGTH + 1]; - int i; - - argc = split_args(args, argv, MAX_CONF_LINE_ARGS + 1); - - if (argc > MAX_CONF_LINE_ARGS) { - mdn_log_error("mdnres: wrong # of args for unassigned, " - "line %d\n", lineno); - return (mdn_invalid_syntax); - } - - if (ctx->unassigned_checker == NULL) { - r = mdn_checker_create(&ctx->unassigned_checker); - if (r != mdn_success) { - mdn_log_error("mdnres: cannot create unassigned " - "checker, %s, line %d\n", - mdn_result_tostring(r), lineno); - return (r); - } - } - - for (i = 0; i < argc; i++) { - sprintf(scheme_name, "%s%s", MDN_CHECKER_UNASSIGNED_PREFIX, - argv[i]); - r = mdn_checker_add(ctx->unassigned_checker, scheme_name); - if (r == mdn_invalid_name) { - mdn_log_error("mdnres: unassigned scheme unavailable " - "\"%-.30s\", line %d\n", - argv[i], lineno); - return (r); - } else if (r != mdn_success) { - return (r); - } - } - - return (mdn_success); -} - -static int -split_args(char *s, char **av, int max_ac) { - int ac; - int i; - - for (ac = 0; *s != '\0' && ac < max_ac; ac++) { - if (ac > 0) - *s++ = '\0'; - while (isspace((unsigned char)*s)) - s++; - if (*s == '\0') - break; - if (*s == '"' || *s == '\'') { - int qc = *s++; - av[ac] = s; - while (*s != qc) { - if (*s == '\0') - return (-1); - s++; - } - } else { - av[ac] = s; - while (*s != '\0' && !isspace((unsigned char)*s)) - s++; - } - } - - for (i = ac; i < max_ac; i++) - av[i] = NULL; - - return (ac); -} - -static void -resetconf(mdn_resconf_t ctx) { - free(ctx->local_encoding); - ctx->local_encoding = NULL; - - mdn_resconf_setlocalconverter(ctx, NULL); - mdn_resconf_setidnconverter(ctx, NULL); - mdn_resconf_setdelimitermap(ctx, NULL); - mdn_resconf_setlocalmapselector(ctx, NULL); - mdn_resconf_setmapper(ctx, NULL); - mdn_resconf_setnormalizer(ctx, NULL); - mdn_resconf_setprohibitchecker(ctx, NULL); - mdn_resconf_setunassignedchecker(ctx, NULL); -} - -static mdn_result_t -update_local_converter(mdn_resconf_t ctx) { - mdn_result_t r; - const char *new_local_encoding; - - /* - * This condition comes true only when the converter is set by - * mdn_resconf_setlocalconverter(). In this case, we don't - * update the local converter. - */ - if (ctx->local_encoding == NULL && ctx->local_converter != NULL) - return (mdn_success); - - /* - * Update the local converer if the local encoding is changed. - */ - new_local_encoding = mdn_localencoding_name(); - if (new_local_encoding == NULL) { - mdn_log_error("cannot determine local codeset name\n"); - return (mdn_notfound); - } - - if (ctx->local_encoding != NULL && - ctx->local_converter != NULL && - strcmp(ctx->local_encoding, new_local_encoding) == 0) { - return (mdn_success); - } - - free(ctx->local_encoding); - ctx->local_encoding = NULL; - if (ctx->local_converter != NULL) { - mdn_converter_destroy(ctx->local_converter); - ctx->local_converter = NULL; - } - - r = mystrdup(new_local_encoding, &ctx->local_encoding); - if (r != mdn_success) - return (r); - r = mdn_converter_create(ctx->local_encoding, - &ctx->local_converter, - MDN_CONVERTER_RTCHECK); - return (r); -} - -static mdn_result_t -mystrdup(const char *from, char **top) { - char *s; - - if (*top != NULL) { - free(*top); - *top = NULL; - } - - if (from == NULL) - from = ""; - s = malloc(strlen(from) + 1); - if (s == NULL) - return (mdn_nomemory); - (void)strcpy(s, from); - *top = s; - return (mdn_success); -} - -static const char * -get_ucs(const char *p, unsigned long *vp) { - char *end; - - /* Skip leading space */ - while (isspace((unsigned char)*p)) - p++; - - /* Skip optional 'U+' */ - if (strncmp(p, "U+", 2) == 0) - p += 2; - - *vp = strtoul(p, &end, 16); - if (end == p) { - return (NULL); - } - p = end; - - /* Skip trailing space */ - while (isspace((unsigned char)*p)) - p++; - return p; -} - -#ifdef TEST - -int -main(int argc, char *argv[]) -{ - mdn_resconf_t resconf; - mdn_result_t r; - char *conf_file; - - if (argc == 1) - conf_file = mdn_resconf_defaultfile(); - else - conf_file = argv[1]; - - r = mdn_resconf_initialize(); - if (r != mdn_success) { - fprintf(stderr, "%s: %s\n", argv[0], mdn_result_tostring(r)); - exit(1); - } - - r = mdn_resconf_create(&resconf); - if (r != mdn_success) { - fprintf(stderr, "%s: %s\n", argv[0], mdn_result_tostring(r)); - exit(1); - } - - r = mdn_resconf_loadfile(resconf, conf_file); - if (r != mdn_success) { - fprintf(stderr, "%s: %s, %s\n", argv[0], - mdn_result_tostring(r), conf_file); - exit(1); - } - - mdn_resconf_destroy(resconf); - - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/lib/result.c b/contrib/idn/mdnkit/lib/result.c deleted file mode 100644 index d5947a4a60..0000000000 --- a/contrib/idn/mdnkit/lib/result.c +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: result.c,v 1.1 2002/01/02 02:46:47 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include - -static char *result_string[] = { - "success", - "not found", - "invalid encoding found", - "syntax error", - "invalid name", - "invalid message", - "invalid action", - "invalid code point", - "buffer overflow", - "no such entry", - "out of memory", - "no such file", - "no mapping to output codeset", - "context information required", - "prohibited character found", - "generic failure", -}; - -char * -mdn_result_tostring(mdn_result_t result) { - if (result < 0 || result > mdn_failure) - return ("unknown result code"); - - return (result_string[result]); -} diff --git a/contrib/idn/mdnkit/lib/selectiveencode.c b/contrib/idn/mdnkit/lib/selectiveencode.c deleted file mode 100644 index f450ef82f8..0000000000 --- a/contrib/idn/mdnkit/lib/selectiveencode.c +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: selectiveencode.c,v 1.1 2002/01/02 02:46:47 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include - -static int is_domain_delimiter(char c); -static char *find_nonascii(const char *s); - -mdn_result_t -mdn_selectiveencode_findregion(const char *s, - char **startp, char **endp) -{ - char *non_ascii; - char *start, *end; - - assert(s != NULL && startp != NULL && endp != NULL); - - TRACE(("mdn_selectiveencode_findregion(s=\"%s\")\n", - mdn_debug_xstring(s, 20))); - - /* - * Scan the specified string looking for non-ascii character. - */ - if ((non_ascii = find_nonascii(s)) == NULL) - return (mdn_notfound); - - /* - * Non-ascii character found. - * Determine the region to encode. - */ - - /* - * First, we scan backwards to find the beginning of the region - * that should be converted. - */ - start = non_ascii; - while (start > s) { - char *prev = mdn_utf8_findfirstbyte(start - 1, s); - if (is_domain_delimiter(*prev)) - break; /* Found */ - start = prev; - } - *startp = start; - - /* - * Next we scan forwards looking for the end of the region. - */ - end = non_ascii + mdn_utf8_mblen(non_ascii); - while (!is_domain_delimiter(*end)) - end += mdn_utf8_mblen(end); - *endp = end; - - return (mdn_success); -} - -static int -is_domain_delimiter(char c) { - return ((unsigned char)c < 0x80 && - !('A' <= c && c <= 'Z') && - !('a' <= c && c <= 'z') && - !('0' <= c && c <= '9') && - c != '-' && c != '.'); -} - -static char * -find_nonascii(const char *s) { - while (*s != '\0' && (unsigned char)*s < 0x80) - s++; - if (*s == '\0') - return (NULL); - else - return ((char *)s); -} diff --git a/contrib/idn/mdnkit/lib/strhash.c b/contrib/idn/mdnkit/lib/strhash.c deleted file mode 100644 index ac99b32856..0000000000 --- a/contrib/idn/mdnkit/lib/strhash.c +++ /dev/null @@ -1,299 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: strhash.c,v 1.1 2002/01/02 02:46:47 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -/* - * Initially, the number of hash buckets is INITIAL_HASH_SIZE. - * As the more elements are put in the hash, the number of elements - * per bucket will exceed THRESHOLD eventually. When it happens, - * the number of buckets will be multiplied by FACTOR. - */ -#define INITIAL_HASH_SIZE 67 -#define FACTOR 7 -#define THRESHOLD 5 - -#define HASH_MULT 31 - -typedef struct strhash_entry { - struct strhash_entry *next; - unsigned long hash_value; - char *key; - void *value; -} strhash_entry_t; - -struct mdn_strhash { - int nbins; - int nelements; - strhash_entry_t **bins; -}; - -static unsigned long hash_value(const char *key); -static strhash_entry_t *find_entry(strhash_entry_t *entry, const char *key, - unsigned long hash); -static strhash_entry_t *new_entry(const char *key, void *value); -static mdn_result_t expand_bins(mdn_strhash_t hash, int new_size); - -mdn_result_t -mdn_strhash_create(mdn_strhash_t *hashp) { - mdn_strhash_t hash; - mdn_result_t r; - - TRACE(("mdn_strhash_create()\n")); - - assert(hashp != NULL); - - *hashp = NULL; - - if ((hash = malloc(sizeof(struct mdn_strhash))) == NULL) { - WARNING(("mdn_strhash_create: malloc failed (hash)\n")); - return (mdn_nomemory); - } - hash->nbins = 0; - hash->nelements = 0; - hash->bins = NULL; - if ((r = expand_bins(hash, INITIAL_HASH_SIZE)) != mdn_success) { - WARNING(("mdn_strhash_create: malloc failed (bins)\n")); - free(hash); - return (r); - } - - *hashp = hash; - - return (mdn_success); -} - -void -mdn_strhash_destroy(mdn_strhash_t hash, mdn_strhash_freeproc_t proc) { - int i; - - assert(hash != NULL && hash->bins != NULL); - - for (i = 0; i < hash->nbins; i++) { - strhash_entry_t *bin = hash->bins[i]; - strhash_entry_t *next; - - while (bin != NULL) { - next = bin->next; - if (proc != NULL) - (*proc)(bin->value); - free(bin); - bin = next; - } - } - free(hash->bins); - free(hash); -} - -mdn_result_t -mdn_strhash_put(mdn_strhash_t hash, const char *key, void *value) { - unsigned long h, h_index; - strhash_entry_t *entry; - - assert(hash != NULL && key != NULL); - - h = hash_value(key); - h_index = h % hash->nbins; - - if ((entry = find_entry(hash->bins[h_index], key, h)) != NULL) { - /* Entry exists. Replace the value. */ - entry->value = value; - } else { - /* Create new entry. */ - if ((entry = new_entry(key, value)) == NULL) { - return (mdn_nomemory); - } - /* Insert it to the list. */ - entry->next = hash->bins[h_index]; - hash->bins[h_index] = entry; - hash->nelements++; - - if (hash->nelements > hash->nbins * THRESHOLD) { - mdn_result_t r; - r = expand_bins(hash, hash->nbins * FACTOR); - if (r != mdn_success) { - TRACE(("mdn_strhash_put: hash table " - "expansion failed\n")); - } - } - } - - return (mdn_success); -} - -mdn_result_t -mdn_strhash_get(mdn_strhash_t hash, const char *key, void **valuep) { - unsigned long h; - strhash_entry_t *entry; - - assert(hash != NULL && key != NULL && valuep != NULL); - - h = hash_value(key); - entry = find_entry(hash->bins[h % hash->nbins], key, h); - if (entry == NULL) - return (mdn_noentry); - - *valuep = entry->value; - return (mdn_success); -} - -int -mdn_strhash_exists(mdn_strhash_t hash, const char *key) { - unsigned long h; - - assert(hash != NULL && key != NULL); - - h = hash_value(key); - return (find_entry(hash->bins[h % hash->nbins], key, h) != NULL); -} - -static unsigned long -hash_value(const char *key) { - unsigned long h = 0; - unsigned char *p = (unsigned char *)key; - int c; - - while ((c = *p++) != '\0') { - h = h * HASH_MULT + c; - } - return (h); -} - -static strhash_entry_t * -find_entry(strhash_entry_t *entry, const char *key, unsigned long hash) { - assert(key != NULL); - - while (entry != NULL) { - if (entry->hash_value == hash && strcmp(key, entry->key) == 0) - return (entry); - entry = entry->next; - } - return (NULL); -} - -static strhash_entry_t * -new_entry(const char *key, void *value) { - strhash_entry_t *entry; - int len; - - assert(key != NULL); - - len = strlen(key) + 1; - if ((entry = malloc(sizeof(strhash_entry_t) + len)) == NULL) { - return (NULL); - } - entry->next = NULL; - entry->hash_value = hash_value(key); - entry->key = (char *)(entry + 1); - (void)strcpy(entry->key, key); - entry->value = value; - - return (entry); -} - -static mdn_result_t -expand_bins(mdn_strhash_t hash, int new_size) { - strhash_entry_t **old_bins, **new_bins; - int old_size; - int old_index, new_index; - - new_bins = malloc(sizeof(strhash_entry_t *) * new_size); - if (new_bins == NULL) - return (mdn_nomemory); - - memset(new_bins, 0, sizeof(strhash_entry_t *) * new_size); - - old_bins = hash->bins; - old_size = hash->nbins; - for (old_index = 0; old_index < old_size; old_index++) { - strhash_entry_t *entries = old_bins[old_index]; - - while (entries != NULL) { - strhash_entry_t *e = entries; - - /* Remove the top element from the linked list. */ - entries = entries->next; - - /* ..and move to the new hash. */ - new_index = e->hash_value % new_size; - e->next = new_bins[new_index]; - new_bins[new_index] = e; - } - } - - hash->nbins = new_size; - hash->bins = new_bins; - - if (old_bins != NULL) - free(old_bins); - - return (mdn_success); -} diff --git a/contrib/idn/mdnkit/lib/ucsmap.c b/contrib/idn/mdnkit/lib/ucsmap.c deleted file mode 100644 index 0e99c938bd..0000000000 --- a/contrib/idn/mdnkit/lib/ucsmap.c +++ /dev/null @@ -1,393 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: ucsmap.c,v 1.2 2002/02/08 05:40:37 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#define INIT_SIZE 50 -#define DEFAULT_BUF_SIZE 500 -#define UCSMAP_HASH_SIZE 103 -#define MAX_MAPLEN 0xffff - -/* - * This module implements UCS 1-to-N mapping. - * To speed up mapping table lookup, a combination of hash and - * binary search is used. - */ - -/* - * Mapping entry. - * Entries are sorted by its hash index and code point. - */ -typedef struct { - short hidx; /* hash index */ - unsigned short len; /* length of mapped sequence */ - unsigned long ucs; /* code point to be mapped */ - unsigned long *map; /* mapped sequence of code points */ -} ucsmap_entry_t; - -/* - * Hash table entry. - * Since the entries pointed by ucsmap_hash_t.entry are sorted, - * binary search can be used. - */ -typedef struct { - ucsmap_entry_t *entry; /* sorted by code point */ - int n; /* length of 'entry' */ -} ucsmap_hash_t; - -/* - * UCS character buffer for storing target character sequence. - */ -typedef struct ucsmap_buf { - struct ucsmap_buf *next; - unsigned long buf[1]; /* actually a variable length array */ -} ucsmap_buf_t; - -/* - * Mapping object. - */ -typedef struct mdn_ucsmap { - ucsmap_hash_t hash[UCSMAP_HASH_SIZE]; - ucsmap_entry_t *entries; /* array of entries */ - size_t entry_size; /* allocated size */ - size_t nentries; /* # of entries in use */ - ucsmap_buf_t *mapdata; /* list of character buffers */ - size_t mapdata_size; /* allocated size of current buffer */ - size_t mapdata_used; /* # of chars in use */ - int fixed; /* already fixed? */ - int refcnt; /* reference count */ -} ucsmap_t; - -static int ucsmap_hash(unsigned long v); -static unsigned long *save_mapped_sequence(mdn_ucsmap_t ctx, - unsigned long *map, - size_t maplen); -static void free_mapbuf(ucsmap_buf_t *buf); -static int comp_entry(const void *v1, const void *v2); - -mdn_result_t -mdn_ucsmap_create(mdn_ucsmap_t *ctxp) { - mdn_ucsmap_t ctx; - - assert(ctxp != NULL); - - TRACE(("mdn_ucsmap_create()\n")); - - if ((ctx = malloc(sizeof(*ctx))) == NULL) { - WARNING(("mdn_ucsmap_create: malloc failed\n")); - return (mdn_nomemory); - } - - ctx->entry_size = 0; - ctx->nentries = 0; - ctx->entries = NULL; - ctx->mapdata = NULL; - ctx->mapdata_size = 0; - ctx->mapdata_used = 0; - ctx->fixed = 0; - ctx->refcnt = 1; - *ctxp = ctx; - return (mdn_success); -} - -void -mdn_ucsmap_destroy(mdn_ucsmap_t ctx) { - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsmap_destroy()\n")); - - if (--ctx->refcnt == 0) { - if (ctx->entries != NULL) - free(ctx->entries); - if (ctx->mapdata != NULL) - free_mapbuf(ctx->mapdata); - free(ctx); - } -} - -void -mdn_ucsmap_incrref(mdn_ucsmap_t ctx) { - assert(ctx != NULL && ctx->refcnt > 0); - - ctx->refcnt++; -} - -mdn_result_t -mdn_ucsmap_add(mdn_ucsmap_t ctx, unsigned long ucs, - unsigned long *map, size_t maplen) -{ - ucsmap_entry_t *e; - - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsmap_add(ucs=U+%lX, maplen=%u)\n", ucs, maplen)); - - /* Make sure it is not fixed yet. */ - if (ctx->fixed) { - WARNING(("mdn_ucsmap_add: attempt to add to fixed map\n")); - return (mdn_failure); - } - - if (maplen > MAX_MAPLEN) { - WARNING(("mdn_ucsmap_add: maplen too large (> %d)\n", - MAX_MAPLEN)); - return (mdn_failure); - } - - /* Append an entry. */ - if (ctx->nentries >= ctx->entry_size) { - if (ctx->entry_size == 0) - ctx->entry_size = INIT_SIZE; - else - ctx->entry_size *= 2; - ctx->entries = realloc(ctx->entries, - sizeof(*e) * ctx->entry_size); - } - e = &ctx->entries[ctx->nentries]; - e->hidx = ucsmap_hash(ucs); - e->len = maplen; - e->ucs = ucs; - if (maplen > 0) { - /* Save mapped sequence in the buffer. */ - e->map = save_mapped_sequence(ctx, map, maplen); - if (e->map == NULL) - return (mdn_nomemory); - } else { - /* - * Zero 'maplen' is perfectly valid meaning one-to-zero - * mapping. - */ - e->map = NULL; - } - ctx->nentries++; - - return (mdn_success); -} - -void -mdn_ucsmap_fix(mdn_ucsmap_t ctx) { - ucsmap_entry_t *e; - int last_hidx; - int i; - - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsmap_fix()\n")); - - if (ctx->fixed) - return; - - ctx->fixed = 1; - - /* Initialize hash. */ - for (i = 0; i < UCSMAP_HASH_SIZE; i++) { - ctx->hash[i].entry = NULL; - ctx->hash[i].n = 0; - } - - if (ctx->nentries == 0) - return; - - /* Sort entries by the hash value and code point. */ - qsort(ctx->entries, ctx->nentries, sizeof(ucsmap_entry_t), comp_entry); - - /* - * Now the entries are sorted by their hash value, and - * sorted by its code point among the ones with the same hash value. - */ - - /* Build hash table. */ - last_hidx = -1; - for (i = 0, e = ctx->entries; i < ctx->nentries; i++, e++) { - if (e->hidx != last_hidx) { - ctx->hash[e->hidx].entry = e; - last_hidx = e->hidx; - } - ctx->hash[last_hidx].n++; - } -} - -mdn_result_t -mdn_ucsmap_map(mdn_ucsmap_t ctx, unsigned long v, unsigned long *to, - size_t tolen, size_t *maplenp) { - int hash; - ucsmap_entry_t *e; - int n; - int hi, lo, mid; - - assert(ctx != NULL && ctx->refcnt > 0 && to != NULL && - maplenp != NULL); - - TRACE(("mdn_ucsmap_map(v=U+%lX)\n", v)); - - if (!ctx->fixed) { - WARNING(("mdn_ucsmap_map: not fixed yet\n")); - return (mdn_failure); - } - - /* First, look up hash table. */ - hash = ucsmap_hash(v); - if ((n = ctx->hash[hash].n) == 0) - goto nomap; - - /* Then do binary search. */ - e = ctx->hash[hash].entry; - lo = 0; - hi = n - 1; - while (lo <= hi) { - mid = (lo + hi) / 2; - if (v < e[mid].ucs) - hi = mid - 1; - else if (v > e[mid].ucs) - lo = mid + 1; - else { - /* Found. */ - if (tolen < e[mid].len) - return (mdn_buffer_overflow); - memcpy(to, e[mid].map, sizeof(*to) * e[mid].len); - *maplenp = e[mid].len; - return (mdn_success); - } - } - - /* - * Not found. Put the original character to 'to' - * just for convenience. - */ - nomap: - if (tolen < 1) - return (mdn_buffer_overflow); - *to = v; - *maplenp = 1; - return (mdn_nomapping); -} - -static int -ucsmap_hash(unsigned long v) { - return (v % UCSMAP_HASH_SIZE); -} - -static unsigned long * -save_mapped_sequence(mdn_ucsmap_t ctx, unsigned long *map, size_t maplen) { - ucsmap_buf_t *buf; - unsigned long *p; - size_t allocsize; - - /* - * If the current buffer (the first one in the ctx->mapdata list) - * has enough space, use it. Otherwise, allocate a new buffer and - * insert it at the beginning of the list. - */ - if (ctx->mapdata_used + maplen > ctx->mapdata_size) { - if (maplen > DEFAULT_BUF_SIZE) - allocsize = maplen * 2; - else - allocsize = DEFAULT_BUF_SIZE; - buf = malloc(sizeof(ucsmap_hash_t) + - sizeof(unsigned long) * (allocsize - 1)); - if (buf == NULL) - return (NULL); - buf->next = ctx->mapdata; - ctx->mapdata = buf; - ctx->mapdata_size = allocsize; - ctx->mapdata_used = 0; - } - p = ctx->mapdata->buf + ctx->mapdata_used; - memcpy(p, map, sizeof(unsigned long) * maplen); - ctx->mapdata_used += maplen; - return (p); -} - -static void -free_mapbuf(ucsmap_buf_t *buf) { - while (buf != NULL) { - ucsmap_buf_t *next = buf->next; - free(buf); - buf = next; - } -} - -static int -comp_entry(const void *v1, const void *v2) { - const ucsmap_entry_t *e1 = v1; - const ucsmap_entry_t *e2 = v2; - - if (e1->hidx < e2->hidx) - return (-1); - else if (e1->hidx > e2->hidx) - return (1); - else if (e1->ucs < e2->ucs) - return (-1); - else if (e1->ucs > e2->ucs) - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/ucsset.c b/contrib/idn/mdnkit/lib/ucsset.c deleted file mode 100644 index bd1b1e7b5f..0000000000 --- a/contrib/idn/mdnkit/lib/ucsset.c +++ /dev/null @@ -1,382 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: ucsset.c,v 1.2 2002/02/08 05:40:38 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define UCS_MAX 0x80000000UL - -#define INIT_SIZE 50 - -/* - * Code point range. - * - * The set of code points is represented by an array of code point ranges. - * In the building phase, specified ranges by 'mdn_ucsset_add' or - * 'mdn_ucsset_addrange' are simply appended to the array. - * And 'mdn_ucsset_fix' sorts the array by the code point value, and also - * merges any intersecting ranges. Since the array is sorted, a binary - * search can be used for looking up. - */ -typedef struct { - unsigned long from; - unsigned long to; -} range_t; - -/* - * Code point segment. - * - * To speed up searching further, the entire region of UCS-4 code points - * (U+0000 - U+7FFFFFFF) are divided into segments. For each segment, - * the first and last element of the range array corresponding to the - * segment are computed by 'mdn_ucsset_fix'. This narrows down the - * (initial) search range. - */ -typedef struct { - int range_start; /* index of ucsset.ranges */ - int range_end; /* ditto */ -} segment_t; - -/* - * Code point to segment index conversion. - * - * Below is the function that maps a code point to the corresponding segment. - * The mapping is non-uniform, so that BMP, the following 16 planes that - * comprise Unicode code points together with BMP, and other planes - * have different granularity. - */ -#define SEG_THLD1 0x10000 /* BMP */ -#define SEG_THLD2 0x110000 /* Unicode (BMP+16planes) */ -#define SEG_SFT1 10 /* BMP: 1K code points/segment */ -#define SEG_SFT2 14 /* following 16 planes: 16K cp/seg */ -#define SEG_SFT3 24 /* rest: 16M cp/seg */ -#define SEG_OFF1 (SEG_THLD1 >> SEG_SFT1) -#define SEG_OFF2 (((SEG_THLD2 - SEG_THLD1) >> SEG_SFT2) + SEG_OFF1) -#define SEG_INDEX(v) \ - (((v) < SEG_THLD1) ? ((v) >> SEG_SFT1) : \ - ((v) < SEG_THLD2) ? ((((v) - SEG_THLD1) >> SEG_SFT2) + SEG_OFF1) : \ - ((((v) - SEG_THLD2) >> SEG_SFT3) + SEG_OFF2)) -#define SEG_LEN (SEG_INDEX(UCS_MAX - 1) + 1) - -/* - * Representation of set of UCS code points. - */ -typedef struct mdn_ucsset { - segment_t segments[SEG_LEN]; - int fixed; - int size; /* allocated size of 'ranges' */ - int nranges; /* num of ranges */ - range_t *ranges; - int refcnt; /* reference count */ -} ucsset; - -static mdn_result_t addrange(mdn_ucsset_t ctx, unsigned long from, - unsigned long to, char *func_name); -static int comp_range(const void *v1, const void *v2); - -mdn_result_t -mdn_ucsset_create(mdn_ucsset_t *ctx) { - mdn_ucsset_t bm; - - assert(ctx != NULL); - - TRACE(("mdn_ucsset_create()\n")); - - if ((bm = malloc(sizeof(ucsset))) == NULL) { - WARNING(("mdn_ucsset_create: malloc failed\n")); - return mdn_nomemory; - } - bm->size = bm->nranges = 0; - bm->ranges = NULL; - bm->fixed = 0; - bm->refcnt = 1; - *ctx = bm; - return (mdn_success); -} - -void -mdn_ucsset_destroy(mdn_ucsset_t ctx) { - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsset_destroy()\n")); - - if (--ctx->refcnt == 0) { - if (ctx->ranges != NULL) - free(ctx->ranges); - free(ctx); - } -} - -void -mdn_ucsset_incrref(mdn_ucsset_t ctx) { - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsset_incrref()\n")); - - ctx->refcnt++; -} - -mdn_result_t -mdn_ucsset_add(mdn_ucsset_t ctx, unsigned long v) { - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsset_add(v=U+%lX)\n", v)); - - return (addrange(ctx, v, v, "mdn_ucsset_add")); -} - -mdn_result_t -mdn_ucsset_addrange(mdn_ucsset_t ctx, unsigned long from, - unsigned long to) -{ - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsset_addrange(from=U+%lX, to=U+%lX)\n", - from, to)); - - return (addrange(ctx, from, to, "mdn_ucsset_addrange")); -} - -void -mdn_ucsset_fix(mdn_ucsset_t ctx) { - int nranges; - range_t *ranges; - segment_t *segments; - int i, j; - - assert(ctx != NULL && ctx->refcnt > 0); - - TRACE(("mdn_ucsset_fix()\n")); - - nranges = ctx->nranges; - ranges = ctx->ranges; - segments = ctx->segments; - - if (ctx->fixed) - return; - - ctx->fixed = 1; - - /* Initialize segment array */ - for (i = 0; i < SEG_LEN; i++) { - segments[i].range_start = -1; - segments[i].range_end = -1; - } - - /* If the set is empty, there's nothing to be done. */ - if (nranges == 0) - return; - - /* Sort ranges. */ - qsort(ranges, nranges, sizeof(range_t), comp_range); - - /* Merge overlapped/continuous ranges. */ - for (i = 0, j = 1; j < nranges; j++) { - if (ranges[i].to + 1 >= ranges[j].from) { - /* can be merged */ - if (ranges[i].to < ranges[j].to) { - ranges[i].to = ranges[j].to; - } - } else { - i++; - if (i < j) - ranges[i] = ranges[j]; - } - } - /* 'i' points the last range in the array. */ - ctx->nranges = nranges = ++i; - - /* Create segment array. */ - for (i = 0; i < nranges; i++) { - int fidx = SEG_INDEX(ranges[i].from); - int tidx = SEG_INDEX(ranges[i].to); - - for (j = fidx; j <= tidx; j++) { - if (segments[j].range_start < 0) - segments[j].range_start = i; - segments[j].range_end = i; - } - } - -#if 0 - /* - * Does the standard guarantee realloc() always succeeds - * when shrinking? - */ - /* Shrink malloc'ed space if possible. */ - ctx->ranges = realloc(ctx->ranges, ctx->nranges * sizeof(range_t)); -#endif -} - -mdn_result_t -mdn_ucsset_lookup(mdn_ucsset_t ctx, unsigned long v, int *found) { - int idx; - segment_t *segments; - - assert(ctx != NULL && ctx->refcnt > 0 && found != NULL); - - TRACE(("mdn_ucsset_lookup(v=U+%lX)\n", v)); - - /* Make sure it is fixed. */ - if (!ctx->fixed) { - WARNING(("mdn_ucsset_lookup: not fixed yet\n")); - return (mdn_failure); - } - - /* Check the given code point. */ - if (v >= UCS_MAX) - return (mdn_invalid_codepoint); - - /* Get the segment 'v' belongs to. */ - segments = ctx->segments; - idx = SEG_INDEX(v); - - /* Do binary search. */ - *found = 0; - if (segments[idx].range_start >= 0) { - int lo = segments[idx].range_start; - int hi = segments[idx].range_end; - range_t *ranges = ctx->ranges; - - while (lo <= hi) { - int mid = (lo + hi) / 2; - if (v < ranges[mid].from) { - hi = mid - 1; - } else if (v > ranges[mid].to) { - lo = mid + 1; - } else { - *found = 1; - break; - } - } - } - return (mdn_success); -} - -static mdn_result_t -addrange(mdn_ucsset_t ctx, unsigned long from, unsigned long to, - char *func_name) -{ - /* Check the given code points. */ - if (from > UCS_MAX) { - WARNING(("%s: code point out of range (U+%lX)\n", - func_name, from)); - return (mdn_invalid_codepoint); - } else if (to > UCS_MAX) { - WARNING(("%s: code point out of range (U+%lX)\n", - func_name, to)); - return (mdn_invalid_codepoint); - } else if (from > to) { - WARNING(("%s: invalid range spec (U+%lX-U+%lX)\n", - func_name, from, to)); - return (mdn_invalid_codepoint); - } - - /* Make sure it is not fixed yet. */ - if (ctx->fixed) { - WARNING(("%s: attempt to add to already fixed object\n", - func_name)); - return (mdn_failure); - } - - /* Append the specified range to the 'ranges' array. */ - if (ctx->nranges >= ctx->size) { - /* Make it bigger. */ - if (ctx->size == 0) - ctx->size = INIT_SIZE; - else - ctx->size *= 2; - ctx->ranges = realloc(ctx->ranges, - ctx->size * sizeof(range_t)); - if (ctx->ranges == NULL) - return (mdn_nomemory); - } - ctx->ranges[ctx->nranges].from = from; - ctx->ranges[ctx->nranges].to = to; - ctx->nranges++; - - return (mdn_success); -} - -static int -comp_range(const void *v1, const void *v2) { - /* - * Range comparation function suitable for qsort(). - */ - const range_t *r1 = v1; - const range_t *r2 = v2; - - if (r1->from < r2->from) - return (-1); - else if (r1->from > r2->from) - return (1); - else - return (0); -} diff --git a/contrib/idn/mdnkit/lib/unicode.c b/contrib/idn/mdnkit/lib/unicode.c deleted file mode 100644 index 1853870087..0000000000 --- a/contrib/idn/mdnkit/lib/unicode.c +++ /dev/null @@ -1,531 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: unicode.c,v 1.1 2002/01/02 02:46:48 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define UNICODE_CURRENT "3.1.0" - -#define UCS_MAX 0x10ffff -#define END_BIT 0x80000000 - -/* - * Some constants for Hangul decomposition/composition. - */ -#define SBase 0xac00 -#define LBase 0x1100 -#define VBase 0x1161 -#define TBase 0x11a7 -#define LCount 19 -#define VCount 21 -#define TCount 28 -#define SLast (SBase + LCount * VCount * TCount) - -/* - * Symbol composition macro. - */ -#define compose_sym(a, b) compose_symX(a, b) -#define compose_symX(a, b) a ## b - -struct composition { - unsigned long c2; /* 2nd character */ - unsigned long comp; /* composed character */ -}; - -#include "unicodedata_301.c" -#define VERSION v301 -#include "unicode_template.c" -#undef VERSION - -#include "unicodedata_310.c" -#define VERSION v310 -#include "unicode_template.c" -#undef VERSION - -typedef int (*unicode_canonclassproc)(unsigned long v); -typedef int (*unicode_decomposeproc)(unsigned long c, - const unsigned long **seqp); -typedef int (*unicode_composeproc)(unsigned long c, - const struct composition **compp); -typedef int (*unicode_toupperproc)(unsigned long c, - const unsigned long **seqp); -typedef int (*unicode_tolowerproc)(unsigned long c, - const unsigned long **seqp); -typedef int (*unicode_casectxproc)(unsigned long c); -typedef int (*unicode_casefoldingproc)(unsigned long c, - const unsigned long **seqp); - -static struct mdn__unicode_ops { - char *version; - unicode_canonclassproc canonclass_proc; - unicode_decomposeproc decompose_proc; - unicode_composeproc compose_proc; - unicode_toupperproc toupper_proc; - unicode_tolowerproc tolower_proc; - unicode_casectxproc casectx_proc; - unicode_casefoldingproc casefolding_proc; -} unicode_versions[] = { -#define MAKE_UNICODE_HANDLE(version, suffix) \ - { version, \ - compose_sym(canonclass_, suffix), \ - compose_sym(decompose_, suffix), \ - compose_sym(compose_, suffix), \ - compose_sym(toupper_, suffix), \ - compose_sym(tolower_, suffix), \ - compose_sym(casemapctx_, suffix), \ - compose_sym(casefolding_, suffix) } - MAKE_UNICODE_HANDLE("3.0.1", v301), - MAKE_UNICODE_HANDLE("3.1.0", v310), - { NULL }, -#undef MAKE_UNICODE_HANDLE -}; - -static mdn_result_t casemap(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp, - int do_uppercase); - -mdn_result_t -mdn__unicode_create(const char *version, - mdn__unicode_version_t *versionp) -{ - mdn__unicode_version_t v; - - assert(versionp != NULL); - TRACE(("mdn__unicode_create(version=%-.50s)\n", - version == NULL ? "" : version)); - - if (version == NULL) - version = UNICODE_CURRENT; - - for (v = unicode_versions; v->version != NULL; v++) { - if (strcmp(v->version, version) == 0) { - *versionp = v; - return (mdn_success); - } - } - return (mdn_notfound); -} - -void -mdn__unicode_destroy(mdn__unicode_version_t version) { - assert(version != NULL); - TRACE(("mdn__unicode_destroy()\n")); - /* Nothing to do */ -} - -int -mdn__unicode_canonicalclass(mdn__unicode_version_t version, unsigned long c) { - if (c > UCS_MAX) - return (0); - - return (*version->canonclass_proc)(c); -} - -mdn_result_t -mdn__unicode_decompose(mdn__unicode_version_t version, - int compat, unsigned long *v, size_t vlen, - unsigned long c, int *decomp_lenp) -{ - unsigned long *vorg = v; - int seqidx; - const unsigned long *seq; - - assert(v != NULL && vlen >= 0 && decomp_lenp != NULL); - - if (c > UCS_MAX) - return (mdn_notfound); - - /* - * First, check for Hangul. - */ - if (SBase <= c && c < SLast) { - int idx, t_offset, v_offset, l_offset; - - idx = c - SBase; - t_offset = idx % TCount; - idx /= TCount; - v_offset = idx % VCount; - l_offset = idx / VCount; - if ((t_offset == 0 && vlen < 2) || (t_offset > 0 && vlen < 3)) - return (mdn_buffer_overflow); - *v++ = LBase + l_offset; - *v++ = VBase + v_offset; - if (t_offset > 0) - *v++ = TBase + t_offset; - *decomp_lenp = v - vorg; - return (mdn_success); - } - - /* - * Look up decomposition table. If no decomposition is defined - * or if it is a compatibility decomosition when canonical - * decomposition requested, return 'mdn_notfound'. - */ - seqidx = (*version->decompose_proc)(c, &seq); - if (seqidx == 0 || (compat == 0 && (seqidx & DECOMP_COMPAT) != 0)) - return (mdn_notfound); - - /* - * Copy the decomposed sequence. The end of the sequence are - * marked with END_BIT. - */ - do { - unsigned long c; - int dlen; - mdn_result_t r; - - c = *seq & ~END_BIT; - - /* Decompose recursively. */ - r = mdn__unicode_decompose(version, compat, v, vlen, c, &dlen); - if (r == mdn_success) { - v += dlen; - vlen -= dlen; - } else if (r == mdn_notfound) { - if (vlen < 1) - return (mdn_buffer_overflow); - *v++ = c; - vlen--; - } else { - return (r); - } - - } while ((*seq++ & END_BIT) == 0); - - *decomp_lenp = v - vorg; - - return (mdn_success); -} - -int -mdn__unicode_iscompositecandidate(mdn__unicode_version_t version, - unsigned long c) -{ - const struct composition *dummy; - - if (c > UCS_MAX) - return (0); - - /* Check for Hangul */ - if ((LBase <= c && c < LBase + LCount) || (SBase <= c && c < SLast)) - return (1); - - /* - * Look up composition table. If there are no composition - * that begins with the given character, it is not a - * composition candidate. - */ - if ((*version->compose_proc)(c, &dummy) == 0) - return (0); - else - return (1); -} - -mdn_result_t -mdn__unicode_compose(mdn__unicode_version_t version, - unsigned long c1, unsigned long c2, unsigned long *compp) -{ - int n; - int lo, hi; - const struct composition *cseq; - - assert(compp != NULL); - - if (c1 > UCS_MAX || c2 > UCS_MAX) - return (mdn_notfound); - - /* - * Check for Hangul. - */ - if (LBase <= c1 && c1 < LBase + LCount && - VBase <= c2 && c2 < VBase + VCount) { - /* - * Hangul L and V. - */ - *compp = SBase + - ((c1 - LBase) * VCount + (c2 - VBase)) * TCount; - return (mdn_success); - } else if (SBase <= c1 && c1 < SLast && - TBase <= c2 && c2 < TBase + TCount && - (c1 - SBase) % TCount == 0) { - /* - * Hangul LV and T. - */ - *compp = c1 + (c2 - TBase); - return (mdn_success); - } - - /* - * Look up composition table. If the result is 0, no composition - * is defined. Otherwise, upper 16bits of the result contains - * the number of composition that begins with 'c1', and the lower - * 16bits is the offset in 'compose_seq'. - */ - if ((n = (*version->compose_proc)(c1, &cseq)) == 0) - return (mdn_notfound); - - /* - * The composite sequences are sorted by the 2nd character 'c2'. - * So we can use binary search. - */ - lo = 0; - hi = n - 1; - while (lo <= hi) { - int mid = (lo + hi) / 2; - - if (cseq[mid].c2 < c2) { - lo = mid + 1; - } else if (cseq[mid].c2 > c2) { - hi = mid - 1; - } else { - *compp = cseq[mid].comp; - return (mdn_success); - } - } - return (mdn_notfound); -} - -mdn_result_t -mdn__unicode_toupper(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp) -{ - return (casemap(version, c, ctx, v, vlen, convlenp, 1)); -} - -mdn_result_t -mdn__unicode_tolower(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp) -{ - return (casemap(version, c, ctx, v, vlen, convlenp, 0)); -} - -static mdn_result_t -casemap(mdn__unicode_version_t version, - unsigned long c, mdn__unicode_context_t ctx, - unsigned long *v, size_t vlen, int *convlenp, int do_uppercase) -{ - const unsigned long *seq; - int seqidx; - - if (vlen < 1) - return (mdn_buffer_overflow); - - if (c > UCS_MAX) - goto nomap; - - /* - * Look up toupper/tolower mapping table. - */ - if (do_uppercase) - seqidx = (*version->toupper_proc)(c, &seq); - else - seqidx = (*version->tolower_proc)(c, &seq); - - /* Zero means there are no mapping. */ - if (seqidx == 0) - goto nomap; - - /* - * There are two kinds of mapping, context-dependent and - * context-independent. It is possible that both mappings - * are defined for a single character, so we have to loop - * through all the mappings. - */ - for (;;) { - int found = 0; - unsigned long flags = *seq++; - - if (flags & CMF_CTXDEP) { - /* - * This is a context-dependent mapping. - * Check the specified context. - */ - switch (ctx) { - case mdn__unicode_context_final: - if (flags & CMF_FINAL) - found = 1; - break; - case mdn__unicode_context_nonfinal: - if (flags & CMF_NONFINAL) - found = 1; - break; - default: /* mdn__unicode_context_unknown */ - /* - * Request context information. - */ - return (mdn_context_required); - } - } else { - /* - * This is an ordinary, context-independent - * mapping. - */ - found = 1; - } - - if (found) { - /* - * Mapping found. Copy it. - */ - int i = 0; - - do { - if (vlen-- < 1) - return (mdn_buffer_overflow); - *v++ = seq[i] & ~END_BIT; - } while ((seq[i++] & END_BIT) == 0); - - *convlenp = i; - return (mdn_success); - } else { - /* - * This entry doesn't match. Try next etnry. - */ - if (flags & CMF_LAST) { - /* This is the last entry. */ - break; - } else { - /* Skip this entry. */ - while ((*seq++ & END_BIT) == 0) - /* do nothing */; - } - } - } - - nomap: - *convlenp = 1; - *v = c; - return (mdn_success); -} - -mdn__unicode_context_t -mdn__unicode_getcontext(mdn__unicode_version_t version, - unsigned long c) -{ -#if 0 - TRACE(("mdn__unicode_getcontext(c=%lx)\n", c)); -#endif - - if (c > UCS_MAX) - return (mdn__unicode_context_final); - - switch ((*version->casectx_proc)(c)) { - case CTX_CASED: - return (mdn__unicode_context_nonfinal); - case CTX_NSM: - return (mdn__unicode_context_unknown); - default: - return (mdn__unicode_context_final); - } -} - -mdn_result_t -mdn__unicode_casefold(mdn__unicode_version_t version, - unsigned long c, unsigned long *v, size_t vlen, - int *foldlenp) -{ - unsigned long *vorg = v; - int seqidx; - const unsigned long *seq; - - assert(v != NULL && vlen >= 0 && foldlenp != NULL); - -#if 0 - TRACE(("mdn__unicode_casefold(compat=%d,vlen=%d,c=%lx)\n", - compat, vlen, c)); -#endif - - if (c > UCS_MAX) - goto nomap; - - /* Look up case folding table. */ - if ((seqidx = (*version->casefolding_proc)(c, &seq)) == 0) - goto nomap; - - do { - if (vlen-- < 1) - return (mdn_buffer_overflow); - *v++ = *seq & ~END_BIT; - } while ((*seq++ & END_BIT) == 0); - - *foldlenp = v - vorg; - - return (mdn_success); - nomap: - if (vlen < 1) - return (mdn_buffer_overflow); - *foldlenp = 1; - *v = c; - return (mdn_success); -} diff --git a/contrib/idn/mdnkit/lib/unicode_template.c b/contrib/idn/mdnkit/lib/unicode_template.c deleted file mode 100644 index 42c4dc60c0..0000000000 --- a/contrib/idn/mdnkit/lib/unicode_template.c +++ /dev/null @@ -1,145 +0,0 @@ -/* $Id: unicode_template.c,v 1.1 2002/02/08 05:40:41 marka Exp $ */ - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef UNICODE_TEMPLATE_INIT -#define UNICODE_TEMPLATE_INIT - -/* - * Macro for multi-level index table. - */ -#define LOOKUPTBL(vprefix, mprefix, v) \ - DMAP(vprefix)[\ - IMAP(vprefix)[\ - IMAP(vprefix)[IDX0(mprefix, v)] + IDX1(mprefix, v)\ - ]\ - ].tbl[IDX2(mprefix, v)] - -#define IDX0(mprefix, v) IDX_0(v, BITS1(mprefix), BITS2(mprefix)) -#define IDX1(mprefix, v) IDX_1(v, BITS1(mprefix), BITS2(mprefix)) -#define IDX2(mprefix, v) IDX_2(v, BITS1(mprefix), BITS2(mprefix)) - -#define IDX_0(v, bits1, bits2) ((v) >> ((bits1) + (bits2))) -#define IDX_1(v, bits1, bits2) (((v) >> (bits2)) & ((1 << (bits1)) - 1)) -#define IDX_2(v, bits1, bits2) ((v) & ((1 << (bits2)) - 1)) - -#define BITS1(mprefix) mprefix ## _BITS_1 -#define BITS2(mprefix) mprefix ## _BITS_2 - -#define IMAP(vprefix) concat4(VERSION, _, vprefix, _imap) -#define DMAP(vprefix) concat4(VERSION, _, vprefix, _table) -#define SEQ(vprefix) concat4(VERSION, _, vprefix, _seq) -#define concat4(a,b,c,d) concat4X(a, b, c, d) -#define concat4X(a,b,c,d) a ## b ## c ## d - -#endif /* UNICODE_TEMPLATE_INIT */ - -static int -compose_sym(canonclass_, VERSION) (unsigned long c) { - /* Look up canonicalclass table. */ - return (LOOKUPTBL(canon_class, CANON_CLASS, c)); -} - -static int -compose_sym(decompose_, VERSION) (unsigned long c, const unsigned long **seqp) -{ - /* Look up decomposition table. */ - int seqidx = LOOKUPTBL(decompose, DECOMP, c); - *seqp = SEQ(decompose) + (seqidx & ~DECOMP_COMPAT); - return (seqidx); -} - -static int -compose_sym(compose_, VERSION) (unsigned long c, - const struct composition **compp) -{ - /* Look up composition table. */ - int seqidx = LOOKUPTBL(compose, CANON_COMPOSE, c); - *compp = SEQ(compose) + (seqidx & 0xffff); - return (seqidx >> 16); -} - -static int -compose_sym(toupper_, VERSION) (unsigned long c, const unsigned long **seqp) { - int seqidx = LOOKUPTBL(toupper, CASEMAP, c); - *seqp = SEQ(toupper) + seqidx; - return (seqidx); -} - -static int -compose_sym(tolower_, VERSION) (unsigned long c, const unsigned long **seqp) { - int seqidx = LOOKUPTBL(tolower, CASEMAP, c); - *seqp = SEQ(tolower) + seqidx; - return (seqidx); -} - -static int -compose_sym(casemapctx_, VERSION) (unsigned long c) { - return (LOOKUPTBL(casemap_ctx, CASEMAP_CTX, c)); -} - -static int -compose_sym(casefolding_, VERSION) (unsigned long c, - const unsigned long **seqp) -{ - int seqidx = LOOKUPTBL(case_folding, CASE_FOLDING, c); - *seqp = SEQ(case_folding) + seqidx; - return (seqidx); -} diff --git a/contrib/idn/mdnkit/lib/unicodedata_301.c b/contrib/idn/mdnkit/lib/unicodedata_301.c deleted file mode 100644 index 56894fd7e4..0000000000 --- a/contrib/idn/mdnkit/lib/unicodedata_301.c +++ /dev/null @@ -1,6803 +0,0 @@ -/* $Id: unicodedata_301.c,v 1.1 2002/02/08 05:40:44 marka Exp $ */ -/* $-Id: generate_normalize_data.pl,v 1.7 2001/09/10 08:16:20 ishisone Exp -$ */ -/* - * Do not edit this file! - * This file is generated from UnicodeData.txt, CompositionExclusions-1.txt, - * SpecialCasing.txt and CaseFolding.txt. - */ - - -/* - * Canonical Class - */ - -#define CANON_CLASS_BITS_0 9 -#define CANON_CLASS_BITS_1 7 -#define CANON_CLASS_BITS_2 5 - -static const unsigned short v301_canon_class_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 3, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 8, 0, - 0, 0, 9, 10, 0, 0, 11, 12, - 13, 14, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 17, 0, 0, 16, 18, 0, - 0, 16, 18, 0, 0, 16, 18, 0, - 0, 16, 18, 0, 0, 0, 18, 0, - 0, 0, 19, 0, 0, 0, 18, 0, - 0, 0, 18, 0, 0, 0, 20, 0, - 0, 21, 22, 0, 0, 23, 24, 0, - 25, 26, 0, 27, 28, 0, 29, 0, - 0, 30, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 33, 34, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 36, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 38, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned char tbl[32]; -} v301_canon_class_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 232, - 220, 220, 220, 220, 232, 216, 220, 220, 220, 220, - }}, - {{ - 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, - 1, 1, 1, 220, 220, 220, 220, 230, 230, 230, - }}, - {{ - 230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, - 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 234, 234, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 230, 230, 230, 230, - 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, - }}, - {{ - 230, 230, 0, 220, 220, 220, 220, 220, 230, 230, 220, - 230, 230, 222, 228, 230, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 0, 20, 21, 22, 0, 23, - }}, - {{ - 0, 24, 25, 0, 230, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, - }}, - {{ - 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, - 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 220, 230, 230, 220, 230, - 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, - }}, - {{ - 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, - 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, - 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, - 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 220, 220, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, - 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, - 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, - }}, - {{ - 130, 0, 230, 230, 9, 0, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, - 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, - }}, - {{ - 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, - 228, 232, 222, 224, 224, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, - }}, - {{ - 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; - -/* - * Canonical Composition - */ - -#define CANON_COMPOSE_BITS_0 9 -#define CANON_COMPOSE_BITS_1 7 -#define CANON_COMPOSE_BITS_2 5 - -static const unsigned short v301_compose_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 1, 2, 3, 0, 4, 5, 6, - 7, 0, 8, 9, 0, 10, 0, 11, - 0, 12, 0, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 14, 15, 16, 0, - 17, 18, 19, 20, 0, 0, 21, 22, - 0, 0, 0, 0, 0, 0, 23, 0, - 0, 24, 25, 0, 0, 0, 26, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 27, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 29, 0, 30, 0, 31, 0, - 0, 0, 32, 0, 0, 33, 34, 0, - 0, 0, 35, 0, 0, 0, 36, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 38, 39, 40, 0, 41, 42, 0, - 43, 44, 45, 46, 0, 47, 48, 49, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 50, 0, 51, 0, - 52, 53, 54, 55, 56, 57, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 58, 59, 60, 61, 62, 63, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned long tbl[32]; -} v301_compose_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 65537, 65538, 65539, 0, - }}, - {{ - 0, 1048580, 196628, 327703, 393244, 1114146, 65587, - 458804, 458811, 983106, 65617, 327762, 393303, 196701, - 589920, 1048681, 131193, 0, 524411, 458883, 458890, - 1245329, 131236, 393382, 131244, 589998, 393399, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 1048765, 196813, 327888, 393429, 1114331, 65772, - 458989, 524532, 917756, 131338, 327948, 393489, 196887, - 590106, 1048867, 131379, 0, 524597, 459069, 524612, - 1245516, 131423, 459105, 131432, 655722, 393588, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 196986, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 262525, 0, 65921, 65922, 131459, - 65925, 0, 0, 262534, 0, 0, 0, - 0, 65930, 0, 0, 0, 0, 262539, - 197007, 65938, 0, 65939, 0, 0, 0, - 262548, 0, 0, 0, - }}, - {{ - 0, 0, 262552, 0, 65948, 65949, 131486, - 65952, 0, 0, 262561, 0, 0, 0, - 0, 65957, 0, 0, 0, 0, 262566, - 197034, 65965, 0, 65966, 0, 0, 0, - 262575, 0, 0, 0, - }}, - {{ - 0, 0, 262579, 262583, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 131515, 131517, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 131519, 131521, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65987, 65988, - 0, 0, 0, 0, - }}, - {{ - 65989, 65990, 0, 0, 0, 0, 0, - 0, 65991, 65992, 65993, 65994, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 65995, - }}, - {{ - 328140, 328145, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 328150, 328155, 0, 0, 0, 0, - 0, 0, 66016, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66017, 66018, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66019, - 66020, 66021, 66022, 0, 0, 0, 0, - 66023, 66024, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66025, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 459242, 0, 0, 0, - 262641, 0, 328181, 0, 459258, 0, 0, - 0, 0, 0, 262657, - }}, - {{ - 0, 66053, 0, 0, 0, 393734, 0, - 0, 0, 328204, 0, 0, 66065, 0, - 66066, 0, 0, 524819, 0, 0, 0, - 262683, 0, 393759, 0, 524837, 0, 0, - 0, 0, 0, 262701, - }}, - {{ - 0, 131633, 0, 0, 0, 524851, 0, - 0, 0, 393787, 197185, 197188, 0, 0, - 66119, 0, 0, 0, 131656, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66122, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 131659, 0, 0, 66125, 0, - 197198, 131665, 66131, 262740, 0, 66136, 0, - 0, 0, 66137, 0, - }}, - {{ - 0, 0, 0, 262746, 0, 0, 0, - 66142, 0, 0, 0, 66143, 0, 66144, - 0, 0, 131681, 0, 0, 66147, 0, - 197220, 131687, 66153, 262762, 0, 66158, 0, - 0, 0, 66159, 0, - }}, - {{ - 0, 0, 0, 262768, 0, 0, 0, - 66164, 0, 0, 0, 66165, 0, 66166, - 0, 0, 0, 0, 0, 0, 0, - 0, 66167, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 66168, - 66169, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66170, 66171, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66172, 66173, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66174, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 197247, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66178, 0, 66179, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 66180, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66181, 0, 0, - 66182, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66183, 0, 0, 0, 0, 0, - 0, 0, 66184, 0, 0, 66185, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 131722, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 197260, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66191, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 131728, - 66194, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66195, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66196, - }}, - {{ - 0, 0, 0, 0, 0, 0, 197269, - 0, 0, 0, 66200, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 131737, - 66203, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 197276, 0, 0, - 66207, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 66208, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66209, 66210, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66211, 66212, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 66213, 66214, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 131751, 131753, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66219, 66220, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66221, 66222, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262831, 262835, 66231, 66232, 66233, 66234, 66235, - 66236, 262845, 262849, 66245, 66246, 66247, 66248, - 66249, 66250, 131787, 131789, 0, 0, 0, - 0, 0, 0, 131791, 131793, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262867, 262871, 66267, 66268, 66269, 66270, 66271, - 66272, 262881, 262885, 66281, 66282, 66283, 66284, - 66285, 66286, 197359, 197362, 0, 0, 0, - 0, 0, 0, 197365, 197368, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 131835, 131837, 0, 0, 0, 0, 0, - 0, 131839, 131841, 0, 0, 0, 0, - 0, 0, 197379, 197382, 0, 0, 0, - 0, 0, 0, 0, 197385, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262924, 262928, 66324, 66325, 66326, 66327, 66328, - 66329, 262938, 262942, 66338, 66339, 66340, 66341, - 66342, 66343, 66344, 0, 0, 0, 66345, - 0, 0, 0, 0, 0, 0, 0, - 66346, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66347, 0, 0, 0, 0, 0, - 0, 0, 0, 197420, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66351, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66352, 0, 0, 0, 0, 0, - 0, 0, 197425, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 66356, 0, 66357, 0, 66358, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 66359, 0, 66360, 0, 66361, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66362, 0, 0, 0, - 0, 66363, 0, 0, 66364, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66365, 0, 66366, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 66367, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66368, 0, 66369, 0, - 0, 66370, 0, 0, 0, 0, 66371, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 66372, 0, 0, 66373, 66374, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66375, 66376, 0, - 0, 66377, 66378, 0, 0, 66379, 66380, - 66381, 66382, 0, 0, - }}, - {{ - 0, 0, 66383, 66384, 0, 0, 66385, - 66386, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66387, 66388, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 66389, 0, 0, 0, 0, - 0, 66390, 66391, 0, 66392, 0, 0, - 0, 0, 0, 0, 66393, 66394, 66395, - 66396, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66397, - 0, 0, 0, 0, 66398, 0, 66399, - 0, 66400, 0, 66401, 0, 66402, 0, - 66403, 0, 66404, 0, 66405, 0, 66406, - 0, 66407, 0, 66408, - }}, - {{ - 0, 66409, 0, 0, 66410, 0, 66411, - 0, 66412, 0, 0, 0, 0, 0, - 0, 131949, 0, 0, 131951, 0, 0, - 131953, 0, 0, 131955, 0, 0, 131957, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66423, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66424, - 0, 0, 0, 0, 66425, 0, 66426, - 0, 66427, 0, 66428, 0, 66429, 0, - 66430, 0, 66431, 0, 66432, 0, 66433, - 0, 66434, 0, 66435, - }}, - {{ - 0, 66436, 0, 0, 66437, 0, 66438, - 0, 66439, 0, 0, 0, 0, 0, - 0, 131976, 0, 0, 131978, 0, 0, - 131980, 0, 0, 131982, 0, 0, 131984, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66450, 66451, 66452, 66453, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66454, 0, 0, - }}, -}; - -static const struct composition v301_compose_seq[] = { - { 0x00000000, 0x00000000 }, { 0x00000338, 0x0000226e }, - { 0x00000338, 0x00002260 }, { 0x00000338, 0x0000226f }, - { 0x00000300, 0x000000c0 }, { 0x00000301, 0x000000c1 }, - { 0x00000302, 0x000000c2 }, { 0x00000303, 0x000000c3 }, - { 0x00000304, 0x00000100 }, { 0x00000306, 0x00000102 }, - { 0x00000307, 0x00000226 }, { 0x00000308, 0x000000c4 }, - { 0x00000309, 0x00001ea2 }, { 0x0000030a, 0x000000c5 }, - { 0x0000030c, 0x000001cd }, { 0x0000030f, 0x00000200 }, - { 0x00000311, 0x00000202 }, { 0x00000323, 0x00001ea0 }, - { 0x00000325, 0x00001e00 }, { 0x00000328, 0x00000104 }, - { 0x00000307, 0x00001e02 }, { 0x00000323, 0x00001e04 }, - { 0x00000331, 0x00001e06 }, { 0x00000301, 0x00000106 }, - { 0x00000302, 0x00000108 }, { 0x00000307, 0x0000010a }, - { 0x0000030c, 0x0000010c }, { 0x00000327, 0x000000c7 }, - { 0x00000307, 0x00001e0a }, { 0x0000030c, 0x0000010e }, - { 0x00000323, 0x00001e0c }, { 0x00000327, 0x00001e10 }, - { 0x0000032d, 0x00001e12 }, { 0x00000331, 0x00001e0e }, - { 0x00000300, 0x000000c8 }, { 0x00000301, 0x000000c9 }, - { 0x00000302, 0x000000ca }, { 0x00000303, 0x00001ebc }, - { 0x00000304, 0x00000112 }, { 0x00000306, 0x00000114 }, - { 0x00000307, 0x00000116 }, { 0x00000308, 0x000000cb }, - { 0x00000309, 0x00001eba }, { 0x0000030c, 0x0000011a }, - { 0x0000030f, 0x00000204 }, { 0x00000311, 0x00000206 }, - { 0x00000323, 0x00001eb8 }, { 0x00000327, 0x00000228 }, - { 0x00000328, 0x00000118 }, { 0x0000032d, 0x00001e18 }, - { 0x00000330, 0x00001e1a }, { 0x00000307, 0x00001e1e }, - { 0x00000301, 0x000001f4 }, { 0x00000302, 0x0000011c }, - { 0x00000304, 0x00001e20 }, { 0x00000306, 0x0000011e }, - { 0x00000307, 0x00000120 }, { 0x0000030c, 0x000001e6 }, - { 0x00000327, 0x00000122 }, { 0x00000302, 0x00000124 }, - { 0x00000307, 0x00001e22 }, { 0x00000308, 0x00001e26 }, - { 0x0000030c, 0x0000021e }, { 0x00000323, 0x00001e24 }, - { 0x00000327, 0x00001e28 }, { 0x0000032e, 0x00001e2a }, - { 0x00000300, 0x000000cc }, { 0x00000301, 0x000000cd }, - { 0x00000302, 0x000000ce }, { 0x00000303, 0x00000128 }, - { 0x00000304, 0x0000012a }, { 0x00000306, 0x0000012c }, - { 0x00000307, 0x00000130 }, { 0x00000308, 0x000000cf }, - { 0x00000309, 0x00001ec8 }, { 0x0000030c, 0x000001cf }, - { 0x0000030f, 0x00000208 }, { 0x00000311, 0x0000020a }, - { 0x00000323, 0x00001eca }, { 0x00000328, 0x0000012e }, - { 0x00000330, 0x00001e2c }, { 0x00000302, 0x00000134 }, - { 0x00000301, 0x00001e30 }, { 0x0000030c, 0x000001e8 }, - { 0x00000323, 0x00001e32 }, { 0x00000327, 0x00000136 }, - { 0x00000331, 0x00001e34 }, { 0x00000301, 0x00000139 }, - { 0x0000030c, 0x0000013d }, { 0x00000323, 0x00001e36 }, - { 0x00000327, 0x0000013b }, { 0x0000032d, 0x00001e3c }, - { 0x00000331, 0x00001e3a }, { 0x00000301, 0x00001e3e }, - { 0x00000307, 0x00001e40 }, { 0x00000323, 0x00001e42 }, - { 0x00000300, 0x000001f8 }, { 0x00000301, 0x00000143 }, - { 0x00000303, 0x000000d1 }, { 0x00000307, 0x00001e44 }, - { 0x0000030c, 0x00000147 }, { 0x00000323, 0x00001e46 }, - { 0x00000327, 0x00000145 }, { 0x0000032d, 0x00001e4a }, - { 0x00000331, 0x00001e48 }, { 0x00000300, 0x000000d2 }, - { 0x00000301, 0x000000d3 }, { 0x00000302, 0x000000d4 }, - { 0x00000303, 0x000000d5 }, { 0x00000304, 0x0000014c }, - { 0x00000306, 0x0000014e }, { 0x00000307, 0x0000022e }, - { 0x00000308, 0x000000d6 }, { 0x00000309, 0x00001ece }, - { 0x0000030b, 0x00000150 }, { 0x0000030c, 0x000001d1 }, - { 0x0000030f, 0x0000020c }, { 0x00000311, 0x0000020e }, - { 0x0000031b, 0x000001a0 }, { 0x00000323, 0x00001ecc }, - { 0x00000328, 0x000001ea }, { 0x00000301, 0x00001e54 }, - { 0x00000307, 0x00001e56 }, { 0x00000301, 0x00000154 }, - { 0x00000307, 0x00001e58 }, { 0x0000030c, 0x00000158 }, - { 0x0000030f, 0x00000210 }, { 0x00000311, 0x00000212 }, - { 0x00000323, 0x00001e5a }, { 0x00000327, 0x00000156 }, - { 0x00000331, 0x00001e5e }, { 0x00000301, 0x0000015a }, - { 0x00000302, 0x0000015c }, { 0x00000307, 0x00001e60 }, - { 0x0000030c, 0x00000160 }, { 0x00000323, 0x00001e62 }, - { 0x00000326, 0x00000218 }, { 0x00000327, 0x0000015e }, - { 0x00000307, 0x00001e6a }, { 0x0000030c, 0x00000164 }, - { 0x00000323, 0x00001e6c }, { 0x00000326, 0x0000021a }, - { 0x00000327, 0x00000162 }, { 0x0000032d, 0x00001e70 }, - { 0x00000331, 0x00001e6e }, { 0x00000300, 0x000000d9 }, - { 0x00000301, 0x000000da }, { 0x00000302, 0x000000db }, - { 0x00000303, 0x00000168 }, { 0x00000304, 0x0000016a }, - { 0x00000306, 0x0000016c }, { 0x00000308, 0x000000dc }, - { 0x00000309, 0x00001ee6 }, { 0x0000030a, 0x0000016e }, - { 0x0000030b, 0x00000170 }, { 0x0000030c, 0x000001d3 }, - { 0x0000030f, 0x00000214 }, { 0x00000311, 0x00000216 }, - { 0x0000031b, 0x000001af }, { 0x00000323, 0x00001ee4 }, - { 0x00000324, 0x00001e72 }, { 0x00000328, 0x00000172 }, - { 0x0000032d, 0x00001e76 }, { 0x00000330, 0x00001e74 }, - { 0x00000303, 0x00001e7c }, { 0x00000323, 0x00001e7e }, - { 0x00000300, 0x00001e80 }, { 0x00000301, 0x00001e82 }, - { 0x00000302, 0x00000174 }, { 0x00000307, 0x00001e86 }, - { 0x00000308, 0x00001e84 }, { 0x00000323, 0x00001e88 }, - { 0x00000307, 0x00001e8a }, { 0x00000308, 0x00001e8c }, - { 0x00000300, 0x00001ef2 }, { 0x00000301, 0x000000dd }, - { 0x00000302, 0x00000176 }, { 0x00000303, 0x00001ef8 }, - { 0x00000304, 0x00000232 }, { 0x00000307, 0x00001e8e }, - { 0x00000308, 0x00000178 }, { 0x00000309, 0x00001ef6 }, - { 0x00000323, 0x00001ef4 }, { 0x00000301, 0x00000179 }, - { 0x00000302, 0x00001e90 }, { 0x00000307, 0x0000017b }, - { 0x0000030c, 0x0000017d }, { 0x00000323, 0x00001e92 }, - { 0x00000331, 0x00001e94 }, { 0x00000300, 0x000000e0 }, - { 0x00000301, 0x000000e1 }, { 0x00000302, 0x000000e2 }, - { 0x00000303, 0x000000e3 }, { 0x00000304, 0x00000101 }, - { 0x00000306, 0x00000103 }, { 0x00000307, 0x00000227 }, - { 0x00000308, 0x000000e4 }, { 0x00000309, 0x00001ea3 }, - { 0x0000030a, 0x000000e5 }, { 0x0000030c, 0x000001ce }, - { 0x0000030f, 0x00000201 }, { 0x00000311, 0x00000203 }, - { 0x00000323, 0x00001ea1 }, { 0x00000325, 0x00001e01 }, - { 0x00000328, 0x00000105 }, { 0x00000307, 0x00001e03 }, - { 0x00000323, 0x00001e05 }, { 0x00000331, 0x00001e07 }, - { 0x00000301, 0x00000107 }, { 0x00000302, 0x00000109 }, - { 0x00000307, 0x0000010b }, { 0x0000030c, 0x0000010d }, - { 0x00000327, 0x000000e7 }, { 0x00000307, 0x00001e0b }, - { 0x0000030c, 0x0000010f }, { 0x00000323, 0x00001e0d }, - { 0x00000327, 0x00001e11 }, { 0x0000032d, 0x00001e13 }, - { 0x00000331, 0x00001e0f }, { 0x00000300, 0x000000e8 }, - { 0x00000301, 0x000000e9 }, { 0x00000302, 0x000000ea }, - { 0x00000303, 0x00001ebd }, { 0x00000304, 0x00000113 }, - { 0x00000306, 0x00000115 }, { 0x00000307, 0x00000117 }, - { 0x00000308, 0x000000eb }, { 0x00000309, 0x00001ebb }, - { 0x0000030c, 0x0000011b }, { 0x0000030f, 0x00000205 }, - { 0x00000311, 0x00000207 }, { 0x00000323, 0x00001eb9 }, - { 0x00000327, 0x00000229 }, { 0x00000328, 0x00000119 }, - { 0x0000032d, 0x00001e19 }, { 0x00000330, 0x00001e1b }, - { 0x00000307, 0x00001e1f }, { 0x00000301, 0x000001f5 }, - { 0x00000302, 0x0000011d }, { 0x00000304, 0x00001e21 }, - { 0x00000306, 0x0000011f }, { 0x00000307, 0x00000121 }, - { 0x0000030c, 0x000001e7 }, { 0x00000327, 0x00000123 }, - { 0x00000302, 0x00000125 }, { 0x00000307, 0x00001e23 }, - { 0x00000308, 0x00001e27 }, { 0x0000030c, 0x0000021f }, - { 0x00000323, 0x00001e25 }, { 0x00000327, 0x00001e29 }, - { 0x0000032e, 0x00001e2b }, { 0x00000331, 0x00001e96 }, - { 0x00000300, 0x000000ec }, { 0x00000301, 0x000000ed }, - { 0x00000302, 0x000000ee }, { 0x00000303, 0x00000129 }, - { 0x00000304, 0x0000012b }, { 0x00000306, 0x0000012d }, - { 0x00000308, 0x000000ef }, { 0x00000309, 0x00001ec9 }, - { 0x0000030c, 0x000001d0 }, { 0x0000030f, 0x00000209 }, - { 0x00000311, 0x0000020b }, { 0x00000323, 0x00001ecb }, - { 0x00000328, 0x0000012f }, { 0x00000330, 0x00001e2d }, - { 0x00000302, 0x00000135 }, { 0x0000030c, 0x000001f0 }, - { 0x00000301, 0x00001e31 }, { 0x0000030c, 0x000001e9 }, - { 0x00000323, 0x00001e33 }, { 0x00000327, 0x00000137 }, - { 0x00000331, 0x00001e35 }, { 0x00000301, 0x0000013a }, - { 0x0000030c, 0x0000013e }, { 0x00000323, 0x00001e37 }, - { 0x00000327, 0x0000013c }, { 0x0000032d, 0x00001e3d }, - { 0x00000331, 0x00001e3b }, { 0x00000301, 0x00001e3f }, - { 0x00000307, 0x00001e41 }, { 0x00000323, 0x00001e43 }, - { 0x00000300, 0x000001f9 }, { 0x00000301, 0x00000144 }, - { 0x00000303, 0x000000f1 }, { 0x00000307, 0x00001e45 }, - { 0x0000030c, 0x00000148 }, { 0x00000323, 0x00001e47 }, - { 0x00000327, 0x00000146 }, { 0x0000032d, 0x00001e4b }, - { 0x00000331, 0x00001e49 }, { 0x00000300, 0x000000f2 }, - { 0x00000301, 0x000000f3 }, { 0x00000302, 0x000000f4 }, - { 0x00000303, 0x000000f5 }, { 0x00000304, 0x0000014d }, - { 0x00000306, 0x0000014f }, { 0x00000307, 0x0000022f }, - { 0x00000308, 0x000000f6 }, { 0x00000309, 0x00001ecf }, - { 0x0000030b, 0x00000151 }, { 0x0000030c, 0x000001d2 }, - { 0x0000030f, 0x0000020d }, { 0x00000311, 0x0000020f }, - { 0x0000031b, 0x000001a1 }, { 0x00000323, 0x00001ecd }, - { 0x00000328, 0x000001eb }, { 0x00000301, 0x00001e55 }, - { 0x00000307, 0x00001e57 }, { 0x00000301, 0x00000155 }, - { 0x00000307, 0x00001e59 }, { 0x0000030c, 0x00000159 }, - { 0x0000030f, 0x00000211 }, { 0x00000311, 0x00000213 }, - { 0x00000323, 0x00001e5b }, { 0x00000327, 0x00000157 }, - { 0x00000331, 0x00001e5f }, { 0x00000301, 0x0000015b }, - { 0x00000302, 0x0000015d }, { 0x00000307, 0x00001e61 }, - { 0x0000030c, 0x00000161 }, { 0x00000323, 0x00001e63 }, - { 0x00000326, 0x00000219 }, { 0x00000327, 0x0000015f }, - { 0x00000307, 0x00001e6b }, { 0x00000308, 0x00001e97 }, - { 0x0000030c, 0x00000165 }, { 0x00000323, 0x00001e6d }, - { 0x00000326, 0x0000021b }, { 0x00000327, 0x00000163 }, - { 0x0000032d, 0x00001e71 }, { 0x00000331, 0x00001e6f }, - { 0x00000300, 0x000000f9 }, { 0x00000301, 0x000000fa }, - { 0x00000302, 0x000000fb }, { 0x00000303, 0x00000169 }, - { 0x00000304, 0x0000016b }, { 0x00000306, 0x0000016d }, - { 0x00000308, 0x000000fc }, { 0x00000309, 0x00001ee7 }, - { 0x0000030a, 0x0000016f }, { 0x0000030b, 0x00000171 }, - { 0x0000030c, 0x000001d4 }, { 0x0000030f, 0x00000215 }, - { 0x00000311, 0x00000217 }, { 0x0000031b, 0x000001b0 }, - { 0x00000323, 0x00001ee5 }, { 0x00000324, 0x00001e73 }, - { 0x00000328, 0x00000173 }, { 0x0000032d, 0x00001e77 }, - { 0x00000330, 0x00001e75 }, { 0x00000303, 0x00001e7d }, - { 0x00000323, 0x00001e7f }, { 0x00000300, 0x00001e81 }, - { 0x00000301, 0x00001e83 }, { 0x00000302, 0x00000175 }, - { 0x00000307, 0x00001e87 }, { 0x00000308, 0x00001e85 }, - { 0x0000030a, 0x00001e98 }, { 0x00000323, 0x00001e89 }, - { 0x00000307, 0x00001e8b }, { 0x00000308, 0x00001e8d }, - { 0x00000300, 0x00001ef3 }, { 0x00000301, 0x000000fd }, - { 0x00000302, 0x00000177 }, { 0x00000303, 0x00001ef9 }, - { 0x00000304, 0x00000233 }, { 0x00000307, 0x00001e8f }, - { 0x00000308, 0x000000ff }, { 0x00000309, 0x00001ef7 }, - { 0x0000030a, 0x00001e99 }, { 0x00000323, 0x00001ef5 }, - { 0x00000301, 0x0000017a }, { 0x00000302, 0x00001e91 }, - { 0x00000307, 0x0000017c }, { 0x0000030c, 0x0000017e }, - { 0x00000323, 0x00001e93 }, { 0x00000331, 0x00001e95 }, - { 0x00000300, 0x00001fed }, { 0x00000301, 0x00000385 }, - { 0x00000342, 0x00001fc1 }, { 0x00000300, 0x00001ea6 }, - { 0x00000301, 0x00001ea4 }, { 0x00000303, 0x00001eaa }, - { 0x00000309, 0x00001ea8 }, { 0x00000304, 0x000001de }, - { 0x00000301, 0x000001fa }, { 0x00000301, 0x000001fc }, - { 0x00000304, 0x000001e2 }, { 0x00000301, 0x00001e08 }, - { 0x00000300, 0x00001ec0 }, { 0x00000301, 0x00001ebe }, - { 0x00000303, 0x00001ec4 }, { 0x00000309, 0x00001ec2 }, - { 0x00000301, 0x00001e2e }, { 0x00000300, 0x00001ed2 }, - { 0x00000301, 0x00001ed0 }, { 0x00000303, 0x00001ed6 }, - { 0x00000309, 0x00001ed4 }, { 0x00000301, 0x00001e4c }, - { 0x00000304, 0x0000022c }, { 0x00000308, 0x00001e4e }, - { 0x00000304, 0x0000022a }, { 0x00000301, 0x000001fe }, - { 0x00000300, 0x000001db }, { 0x00000301, 0x000001d7 }, - { 0x00000304, 0x000001d5 }, { 0x0000030c, 0x000001d9 }, - { 0x00000300, 0x00001ea7 }, { 0x00000301, 0x00001ea5 }, - { 0x00000303, 0x00001eab }, { 0x00000309, 0x00001ea9 }, - { 0x00000304, 0x000001df }, { 0x00000301, 0x000001fb }, - { 0x00000301, 0x000001fd }, { 0x00000304, 0x000001e3 }, - { 0x00000301, 0x00001e09 }, { 0x00000300, 0x00001ec1 }, - { 0x00000301, 0x00001ebf }, { 0x00000303, 0x00001ec5 }, - { 0x00000309, 0x00001ec3 }, { 0x00000301, 0x00001e2f }, - { 0x00000300, 0x00001ed3 }, { 0x00000301, 0x00001ed1 }, - { 0x00000303, 0x00001ed7 }, { 0x00000309, 0x00001ed5 }, - { 0x00000301, 0x00001e4d }, { 0x00000304, 0x0000022d }, - { 0x00000308, 0x00001e4f }, { 0x00000304, 0x0000022b }, - { 0x00000301, 0x000001ff }, { 0x00000300, 0x000001dc }, - { 0x00000301, 0x000001d8 }, { 0x00000304, 0x000001d6 }, - { 0x0000030c, 0x000001da }, { 0x00000300, 0x00001eb0 }, - { 0x00000301, 0x00001eae }, { 0x00000303, 0x00001eb4 }, - { 0x00000309, 0x00001eb2 }, { 0x00000300, 0x00001eb1 }, - { 0x00000301, 0x00001eaf }, { 0x00000303, 0x00001eb5 }, - { 0x00000309, 0x00001eb3 }, { 0x00000300, 0x00001e14 }, - { 0x00000301, 0x00001e16 }, { 0x00000300, 0x00001e15 }, - { 0x00000301, 0x00001e17 }, { 0x00000300, 0x00001e50 }, - { 0x00000301, 0x00001e52 }, { 0x00000300, 0x00001e51 }, - { 0x00000301, 0x00001e53 }, { 0x00000307, 0x00001e64 }, - { 0x00000307, 0x00001e65 }, { 0x00000307, 0x00001e66 }, - { 0x00000307, 0x00001e67 }, { 0x00000301, 0x00001e78 }, - { 0x00000301, 0x00001e79 }, { 0x00000308, 0x00001e7a }, - { 0x00000308, 0x00001e7b }, { 0x00000307, 0x00001e9b }, - { 0x00000300, 0x00001edc }, { 0x00000301, 0x00001eda }, - { 0x00000303, 0x00001ee0 }, { 0x00000309, 0x00001ede }, - { 0x00000323, 0x00001ee2 }, { 0x00000300, 0x00001edd }, - { 0x00000301, 0x00001edb }, { 0x00000303, 0x00001ee1 }, - { 0x00000309, 0x00001edf }, { 0x00000323, 0x00001ee3 }, - { 0x00000300, 0x00001eea }, { 0x00000301, 0x00001ee8 }, - { 0x00000303, 0x00001eee }, { 0x00000309, 0x00001eec }, - { 0x00000323, 0x00001ef0 }, { 0x00000300, 0x00001eeb }, - { 0x00000301, 0x00001ee9 }, { 0x00000303, 0x00001eef }, - { 0x00000309, 0x00001eed }, { 0x00000323, 0x00001ef1 }, - { 0x0000030c, 0x000001ee }, { 0x00000304, 0x000001ec }, - { 0x00000304, 0x000001ed }, { 0x00000304, 0x000001e0 }, - { 0x00000304, 0x000001e1 }, { 0x00000306, 0x00001e1c }, - { 0x00000306, 0x00001e1d }, { 0x00000304, 0x00000230 }, - { 0x00000304, 0x00000231 }, { 0x0000030c, 0x000001ef }, - { 0x00000300, 0x00001fba }, { 0x00000301, 0x00000386 }, - { 0x00000304, 0x00001fb9 }, { 0x00000306, 0x00001fb8 }, - { 0x00000313, 0x00001f08 }, { 0x00000314, 0x00001f09 }, - { 0x00000345, 0x00001fbc }, { 0x00000300, 0x00001fc8 }, - { 0x00000301, 0x00000388 }, { 0x00000313, 0x00001f18 }, - { 0x00000314, 0x00001f19 }, { 0x00000300, 0x00001fca }, - { 0x00000301, 0x00000389 }, { 0x00000313, 0x00001f28 }, - { 0x00000314, 0x00001f29 }, { 0x00000345, 0x00001fcc }, - { 0x00000300, 0x00001fda }, { 0x00000301, 0x0000038a }, - { 0x00000304, 0x00001fd9 }, { 0x00000306, 0x00001fd8 }, - { 0x00000308, 0x000003aa }, { 0x00000313, 0x00001f38 }, - { 0x00000314, 0x00001f39 }, { 0x00000300, 0x00001ff8 }, - { 0x00000301, 0x0000038c }, { 0x00000313, 0x00001f48 }, - { 0x00000314, 0x00001f49 }, { 0x00000314, 0x00001fec }, - { 0x00000300, 0x00001fea }, { 0x00000301, 0x0000038e }, - { 0x00000304, 0x00001fe9 }, { 0x00000306, 0x00001fe8 }, - { 0x00000308, 0x000003ab }, { 0x00000314, 0x00001f59 }, - { 0x00000300, 0x00001ffa }, { 0x00000301, 0x0000038f }, - { 0x00000313, 0x00001f68 }, { 0x00000314, 0x00001f69 }, - { 0x00000345, 0x00001ffc }, { 0x00000345, 0x00001fb4 }, - { 0x00000345, 0x00001fc4 }, { 0x00000300, 0x00001f70 }, - { 0x00000301, 0x000003ac }, { 0x00000304, 0x00001fb1 }, - { 0x00000306, 0x00001fb0 }, { 0x00000313, 0x00001f00 }, - { 0x00000314, 0x00001f01 }, { 0x00000342, 0x00001fb6 }, - { 0x00000345, 0x00001fb3 }, { 0x00000300, 0x00001f72 }, - { 0x00000301, 0x000003ad }, { 0x00000313, 0x00001f10 }, - { 0x00000314, 0x00001f11 }, { 0x00000300, 0x00001f74 }, - { 0x00000301, 0x000003ae }, { 0x00000313, 0x00001f20 }, - { 0x00000314, 0x00001f21 }, { 0x00000342, 0x00001fc6 }, - { 0x00000345, 0x00001fc3 }, { 0x00000300, 0x00001f76 }, - { 0x00000301, 0x000003af }, { 0x00000304, 0x00001fd1 }, - { 0x00000306, 0x00001fd0 }, { 0x00000308, 0x000003ca }, - { 0x00000313, 0x00001f30 }, { 0x00000314, 0x00001f31 }, - { 0x00000342, 0x00001fd6 }, { 0x00000300, 0x00001f78 }, - { 0x00000301, 0x000003cc }, { 0x00000313, 0x00001f40 }, - { 0x00000314, 0x00001f41 }, { 0x00000313, 0x00001fe4 }, - { 0x00000314, 0x00001fe5 }, { 0x00000300, 0x00001f7a }, - { 0x00000301, 0x000003cd }, { 0x00000304, 0x00001fe1 }, - { 0x00000306, 0x00001fe0 }, { 0x00000308, 0x000003cb }, - { 0x00000313, 0x00001f50 }, { 0x00000314, 0x00001f51 }, - { 0x00000342, 0x00001fe6 }, { 0x00000300, 0x00001f7c }, - { 0x00000301, 0x000003ce }, { 0x00000313, 0x00001f60 }, - { 0x00000314, 0x00001f61 }, { 0x00000342, 0x00001ff6 }, - { 0x00000345, 0x00001ff3 }, { 0x00000300, 0x00001fd2 }, - { 0x00000301, 0x00000390 }, { 0x00000342, 0x00001fd7 }, - { 0x00000300, 0x00001fe2 }, { 0x00000301, 0x000003b0 }, - { 0x00000342, 0x00001fe7 }, { 0x00000345, 0x00001ff4 }, - { 0x00000301, 0x000003d3 }, { 0x00000308, 0x000003d4 }, - { 0x00000308, 0x00000407 }, { 0x00000306, 0x000004d0 }, - { 0x00000308, 0x000004d2 }, { 0x00000301, 0x00000403 }, - { 0x00000300, 0x00000400 }, { 0x00000306, 0x000004d6 }, - { 0x00000308, 0x00000401 }, { 0x00000306, 0x000004c1 }, - { 0x00000308, 0x000004dc }, { 0x00000308, 0x000004de }, - { 0x00000300, 0x0000040d }, { 0x00000304, 0x000004e2 }, - { 0x00000306, 0x00000419 }, { 0x00000308, 0x000004e4 }, - { 0x00000301, 0x0000040c }, { 0x00000308, 0x000004e6 }, - { 0x00000304, 0x000004ee }, { 0x00000306, 0x0000040e }, - { 0x00000308, 0x000004f0 }, { 0x0000030b, 0x000004f2 }, - { 0x00000308, 0x000004f4 }, { 0x00000308, 0x000004f8 }, - { 0x00000308, 0x000004ec }, { 0x00000306, 0x000004d1 }, - { 0x00000308, 0x000004d3 }, { 0x00000301, 0x00000453 }, - { 0x00000300, 0x00000450 }, { 0x00000306, 0x000004d7 }, - { 0x00000308, 0x00000451 }, { 0x00000306, 0x000004c2 }, - { 0x00000308, 0x000004dd }, { 0x00000308, 0x000004df }, - { 0x00000300, 0x0000045d }, { 0x00000304, 0x000004e3 }, - { 0x00000306, 0x00000439 }, { 0x00000308, 0x000004e5 }, - { 0x00000301, 0x0000045c }, { 0x00000308, 0x000004e7 }, - { 0x00000304, 0x000004ef }, { 0x00000306, 0x0000045e }, - { 0x00000308, 0x000004f1 }, { 0x0000030b, 0x000004f3 }, - { 0x00000308, 0x000004f5 }, { 0x00000308, 0x000004f9 }, - { 0x00000308, 0x000004ed }, { 0x00000308, 0x00000457 }, - { 0x0000030f, 0x00000476 }, { 0x0000030f, 0x00000477 }, - { 0x00000308, 0x000004da }, { 0x00000308, 0x000004db }, - { 0x00000308, 0x000004ea }, { 0x00000308, 0x000004eb }, - { 0x000005b4, 0x0000fb1d }, { 0x00000653, 0x00000622 }, - { 0x00000654, 0x00000623 }, { 0x00000655, 0x00000625 }, - { 0x00000654, 0x00000624 }, { 0x00000654, 0x00000626 }, - { 0x00000654, 0x000006c2 }, { 0x00000654, 0x000006d3 }, - { 0x00000654, 0x000006c0 }, { 0x0000093c, 0x00000929 }, - { 0x0000093c, 0x00000931 }, { 0x0000093c, 0x00000934 }, - { 0x000009be, 0x000009cb }, { 0x000009d7, 0x000009cc }, - { 0x00000b3e, 0x00000b4b }, { 0x00000b56, 0x00000b48 }, - { 0x00000b57, 0x00000b4c }, { 0x00000bd7, 0x00000b94 }, - { 0x00000bbe, 0x00000bca }, { 0x00000bd7, 0x00000bcc }, - { 0x00000bbe, 0x00000bcb }, { 0x00000c56, 0x00000c48 }, - { 0x00000cd5, 0x00000cc0 }, { 0x00000cc2, 0x00000cca }, - { 0x00000cd5, 0x00000cc7 }, { 0x00000cd6, 0x00000cc8 }, - { 0x00000cd5, 0x00000ccb }, { 0x00000d3e, 0x00000d4a }, - { 0x00000d57, 0x00000d4c }, { 0x00000d3e, 0x00000d4b }, - { 0x00000dca, 0x00000dda }, { 0x00000dcf, 0x00000ddc }, - { 0x00000ddf, 0x00000dde }, { 0x00000dca, 0x00000ddd }, - { 0x0000102e, 0x00001026 }, { 0x00000304, 0x00001e38 }, - { 0x00000304, 0x00001e39 }, { 0x00000304, 0x00001e5c }, - { 0x00000304, 0x00001e5d }, { 0x00000307, 0x00001e68 }, - { 0x00000307, 0x00001e69 }, { 0x00000302, 0x00001eac }, - { 0x00000306, 0x00001eb6 }, { 0x00000302, 0x00001ead }, - { 0x00000306, 0x00001eb7 }, { 0x00000302, 0x00001ec6 }, - { 0x00000302, 0x00001ec7 }, { 0x00000302, 0x00001ed8 }, - { 0x00000302, 0x00001ed9 }, { 0x00000300, 0x00001f02 }, - { 0x00000301, 0x00001f04 }, { 0x00000342, 0x00001f06 }, - { 0x00000345, 0x00001f80 }, { 0x00000300, 0x00001f03 }, - { 0x00000301, 0x00001f05 }, { 0x00000342, 0x00001f07 }, - { 0x00000345, 0x00001f81 }, { 0x00000345, 0x00001f82 }, - { 0x00000345, 0x00001f83 }, { 0x00000345, 0x00001f84 }, - { 0x00000345, 0x00001f85 }, { 0x00000345, 0x00001f86 }, - { 0x00000345, 0x00001f87 }, { 0x00000300, 0x00001f0a }, - { 0x00000301, 0x00001f0c }, { 0x00000342, 0x00001f0e }, - { 0x00000345, 0x00001f88 }, { 0x00000300, 0x00001f0b }, - { 0x00000301, 0x00001f0d }, { 0x00000342, 0x00001f0f }, - { 0x00000345, 0x00001f89 }, { 0x00000345, 0x00001f8a }, - { 0x00000345, 0x00001f8b }, { 0x00000345, 0x00001f8c }, - { 0x00000345, 0x00001f8d }, { 0x00000345, 0x00001f8e }, - { 0x00000345, 0x00001f8f }, { 0x00000300, 0x00001f12 }, - { 0x00000301, 0x00001f14 }, { 0x00000300, 0x00001f13 }, - { 0x00000301, 0x00001f15 }, { 0x00000300, 0x00001f1a }, - { 0x00000301, 0x00001f1c }, { 0x00000300, 0x00001f1b }, - { 0x00000301, 0x00001f1d }, { 0x00000300, 0x00001f22 }, - { 0x00000301, 0x00001f24 }, { 0x00000342, 0x00001f26 }, - { 0x00000345, 0x00001f90 }, { 0x00000300, 0x00001f23 }, - { 0x00000301, 0x00001f25 }, { 0x00000342, 0x00001f27 }, - { 0x00000345, 0x00001f91 }, { 0x00000345, 0x00001f92 }, - { 0x00000345, 0x00001f93 }, { 0x00000345, 0x00001f94 }, - { 0x00000345, 0x00001f95 }, { 0x00000345, 0x00001f96 }, - { 0x00000345, 0x00001f97 }, { 0x00000300, 0x00001f2a }, - { 0x00000301, 0x00001f2c }, { 0x00000342, 0x00001f2e }, - { 0x00000345, 0x00001f98 }, { 0x00000300, 0x00001f2b }, - { 0x00000301, 0x00001f2d }, { 0x00000342, 0x00001f2f }, - { 0x00000345, 0x00001f99 }, { 0x00000345, 0x00001f9a }, - { 0x00000345, 0x00001f9b }, { 0x00000345, 0x00001f9c }, - { 0x00000345, 0x00001f9d }, { 0x00000345, 0x00001f9e }, - { 0x00000345, 0x00001f9f }, { 0x00000300, 0x00001f32 }, - { 0x00000301, 0x00001f34 }, { 0x00000342, 0x00001f36 }, - { 0x00000300, 0x00001f33 }, { 0x00000301, 0x00001f35 }, - { 0x00000342, 0x00001f37 }, { 0x00000300, 0x00001f3a }, - { 0x00000301, 0x00001f3c }, { 0x00000342, 0x00001f3e }, - { 0x00000300, 0x00001f3b }, { 0x00000301, 0x00001f3d }, - { 0x00000342, 0x00001f3f }, { 0x00000300, 0x00001f42 }, - { 0x00000301, 0x00001f44 }, { 0x00000300, 0x00001f43 }, - { 0x00000301, 0x00001f45 }, { 0x00000300, 0x00001f4a }, - { 0x00000301, 0x00001f4c }, { 0x00000300, 0x00001f4b }, - { 0x00000301, 0x00001f4d }, { 0x00000300, 0x00001f52 }, - { 0x00000301, 0x00001f54 }, { 0x00000342, 0x00001f56 }, - { 0x00000300, 0x00001f53 }, { 0x00000301, 0x00001f55 }, - { 0x00000342, 0x00001f57 }, { 0x00000300, 0x00001f5b }, - { 0x00000301, 0x00001f5d }, { 0x00000342, 0x00001f5f }, - { 0x00000300, 0x00001f62 }, { 0x00000301, 0x00001f64 }, - { 0x00000342, 0x00001f66 }, { 0x00000345, 0x00001fa0 }, - { 0x00000300, 0x00001f63 }, { 0x00000301, 0x00001f65 }, - { 0x00000342, 0x00001f67 }, { 0x00000345, 0x00001fa1 }, - { 0x00000345, 0x00001fa2 }, { 0x00000345, 0x00001fa3 }, - { 0x00000345, 0x00001fa4 }, { 0x00000345, 0x00001fa5 }, - { 0x00000345, 0x00001fa6 }, { 0x00000345, 0x00001fa7 }, - { 0x00000300, 0x00001f6a }, { 0x00000301, 0x00001f6c }, - { 0x00000342, 0x00001f6e }, { 0x00000345, 0x00001fa8 }, - { 0x00000300, 0x00001f6b }, { 0x00000301, 0x00001f6d }, - { 0x00000342, 0x00001f6f }, { 0x00000345, 0x00001fa9 }, - { 0x00000345, 0x00001faa }, { 0x00000345, 0x00001fab }, - { 0x00000345, 0x00001fac }, { 0x00000345, 0x00001fad }, - { 0x00000345, 0x00001fae }, { 0x00000345, 0x00001faf }, - { 0x00000345, 0x00001fb2 }, { 0x00000345, 0x00001fc2 }, - { 0x00000345, 0x00001ff2 }, { 0x00000345, 0x00001fb7 }, - { 0x00000300, 0x00001fcd }, { 0x00000301, 0x00001fce }, - { 0x00000342, 0x00001fcf }, { 0x00000345, 0x00001fc7 }, - { 0x00000345, 0x00001ff7 }, { 0x00000300, 0x00001fdd }, - { 0x00000301, 0x00001fde }, { 0x00000342, 0x00001fdf }, - { 0x00000338, 0x0000219a }, { 0x00000338, 0x0000219b }, - { 0x00000338, 0x000021ae }, { 0x00000338, 0x000021cd }, - { 0x00000338, 0x000021cf }, { 0x00000338, 0x000021ce }, - { 0x00000338, 0x00002204 }, { 0x00000338, 0x00002209 }, - { 0x00000338, 0x0000220c }, { 0x00000338, 0x00002224 }, - { 0x00000338, 0x00002226 }, { 0x00000338, 0x00002241 }, - { 0x00000338, 0x00002244 }, { 0x00000338, 0x00002247 }, - { 0x00000338, 0x00002249 }, { 0x00000338, 0x0000226d }, - { 0x00000338, 0x00002262 }, { 0x00000338, 0x00002270 }, - { 0x00000338, 0x00002271 }, { 0x00000338, 0x00002274 }, - { 0x00000338, 0x00002275 }, { 0x00000338, 0x00002278 }, - { 0x00000338, 0x00002279 }, { 0x00000338, 0x00002280 }, - { 0x00000338, 0x00002281 }, { 0x00000338, 0x000022e0 }, - { 0x00000338, 0x000022e1 }, { 0x00000338, 0x00002284 }, - { 0x00000338, 0x00002285 }, { 0x00000338, 0x00002288 }, - { 0x00000338, 0x00002289 }, { 0x00000338, 0x000022e2 }, - { 0x00000338, 0x000022e3 }, { 0x00000338, 0x000022ac }, - { 0x00000338, 0x000022ad }, { 0x00000338, 0x000022ae }, - { 0x00000338, 0x000022af }, { 0x00000338, 0x000022ea }, - { 0x00000338, 0x000022eb }, { 0x00000338, 0x000022ec }, - { 0x00000338, 0x000022ed }, { 0x00003099, 0x00003094 }, - { 0x00003099, 0x0000304c }, { 0x00003099, 0x0000304e }, - { 0x00003099, 0x00003050 }, { 0x00003099, 0x00003052 }, - { 0x00003099, 0x00003054 }, { 0x00003099, 0x00003056 }, - { 0x00003099, 0x00003058 }, { 0x00003099, 0x0000305a }, - { 0x00003099, 0x0000305c }, { 0x00003099, 0x0000305e }, - { 0x00003099, 0x00003060 }, { 0x00003099, 0x00003062 }, - { 0x00003099, 0x00003065 }, { 0x00003099, 0x00003067 }, - { 0x00003099, 0x00003069 }, { 0x00003099, 0x00003070 }, - { 0x0000309a, 0x00003071 }, { 0x00003099, 0x00003073 }, - { 0x0000309a, 0x00003074 }, { 0x00003099, 0x00003076 }, - { 0x0000309a, 0x00003077 }, { 0x00003099, 0x00003079 }, - { 0x0000309a, 0x0000307a }, { 0x00003099, 0x0000307c }, - { 0x0000309a, 0x0000307d }, { 0x00003099, 0x0000309e }, - { 0x00003099, 0x000030f4 }, { 0x00003099, 0x000030ac }, - { 0x00003099, 0x000030ae }, { 0x00003099, 0x000030b0 }, - { 0x00003099, 0x000030b2 }, { 0x00003099, 0x000030b4 }, - { 0x00003099, 0x000030b6 }, { 0x00003099, 0x000030b8 }, - { 0x00003099, 0x000030ba }, { 0x00003099, 0x000030bc }, - { 0x00003099, 0x000030be }, { 0x00003099, 0x000030c0 }, - { 0x00003099, 0x000030c2 }, { 0x00003099, 0x000030c5 }, - { 0x00003099, 0x000030c7 }, { 0x00003099, 0x000030c9 }, - { 0x00003099, 0x000030d0 }, { 0x0000309a, 0x000030d1 }, - { 0x00003099, 0x000030d3 }, { 0x0000309a, 0x000030d4 }, - { 0x00003099, 0x000030d6 }, { 0x0000309a, 0x000030d7 }, - { 0x00003099, 0x000030d9 }, { 0x0000309a, 0x000030da }, - { 0x00003099, 0x000030dc }, { 0x0000309a, 0x000030dd }, - { 0x00003099, 0x000030f7 }, { 0x00003099, 0x000030f8 }, - { 0x00003099, 0x000030f9 }, { 0x00003099, 0x000030fa }, - { 0x00003099, 0x000030fe }, -}; - - -/* - * Canonical/Compatibility Decomposition - */ - -#define DECOMP_BITS_0 9 -#define DECOMP_BITS_1 7 -#define DECOMP_BITS_2 5 -#define DECOMP_COMPAT 32768 - -static const unsigned short v301_decompose_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 0, 0, 0, 1, 2, 3, - 4, 5, 6, 7, 0, 8, 9, 10, - 11, 12, 0, 0, 0, 13, 14, 15, - 0, 0, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 0, 0, 26, 27, - 0, 0, 0, 0, 28, 0, 0, 0, - 0, 29, 0, 30, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 33, 0, 0, 0, 34, 0, - 0, 35, 36, 0, 0, 0, 0, 0, - 0, 0, 37, 0, 38, 0, 39, 0, - 0, 0, 40, 0, 0, 0, 41, 0, - 0, 0, 42, 0, 0, 0, 43, 0, - 0, 44, 0, 0, 0, 45, 46, 0, - 47, 0, 48, 49, 50, 51, 0, 0, - 0, 52, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 0, 0, - 75, 76, 77, 78, 79, 80, 81, 0, - 82, 83, 84, 85, 86, 87, 0, 88, - 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 90, 91, 92, 93, 94, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 95, 0, 0, 96, - 97, 98, 99, 100, 101, 102, 103, 0, - 104, 105, 106, 107, 108, 109, 110, 111, - 0, 112, 113, 114, 115, 0, 0, 0, - 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 0, 0, 0, 0, 0, 0, - 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, - 0, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, -}; - -static const struct { - unsigned short tbl[32]; -} v301_decompose_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 32769, 0, 0, 0, 0, 0, 0, 0, - 32770, 0, 32772, 0, 0, 0, 0, 32773, - 0, 0, 32775, 32776, 32777, 32779, 0, 0, - 32780, 32782, 32783, 0, 32784, 32787, 32790, 0, - }}, - {{ - 25, 27, 29, 31, 33, 35, 0, 37, - 39, 41, 43, 45, 47, 49, 51, 53, - 0, 55, 57, 59, 61, 63, 65, 0, - 0, 67, 69, 71, 73, 75, 0, 0, - }}, - {{ - 77, 79, 81, 83, 85, 87, 0, 89, - 91, 93, 95, 97, 99, 101, 103, 105, - 0, 107, 109, 111, 113, 115, 117, 0, - 0, 119, 121, 123, 125, 127, 0, 129, - }}, - {{ - 131, 133, 135, 137, 139, 141, 143, 145, - 147, 149, 151, 153, 155, 157, 159, 161, - 0, 0, 163, 165, 167, 169, 171, 173, - 175, 177, 179, 181, 183, 185, 187, 189, - }}, - {{ - 191, 193, 195, 197, 199, 201, 0, 0, - 203, 205, 207, 209, 211, 213, 215, 217, - 219, 0, 32989, 32991, 225, 227, 229, 231, - 0, 233, 235, 237, 239, 241, 243, 33013, - }}, - {{ - 33015, 0, 0, 249, 251, 253, 255, 257, - 259, 33029, 0, 0, 263, 265, 267, 269, - 271, 273, 0, 0, 275, 277, 279, 281, - 283, 285, 287, 289, 291, 293, 295, 297, - }}, - {{ - 299, 301, 303, 305, 307, 309, 0, 0, - 311, 313, 315, 317, 319, 321, 323, 325, - 327, 329, 331, 333, 335, 337, 339, 341, - 343, 345, 347, 349, 351, 353, 355, 33125, - }}, - {{ - 358, 360, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 362, - 364, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 33134, 33136, 33138, 33140, - 33142, 33144, 33146, 33148, 33150, 384, 386, 388, - 390, 392, 394, 396, 398, 400, 402, 404, - 406, 408, 410, 412, 414, 0, 416, 418, - }}, - {{ - 420, 422, 424, 426, 0, 0, 428, 430, - 432, 434, 436, 438, 440, 442, 444, 446, - 448, 33218, 33220, 33222, 456, 458, 0, 0, - 460, 462, 464, 466, 468, 470, 472, 474, - }}, - {{ - 476, 478, 480, 482, 484, 486, 488, 490, - 492, 494, 496, 498, 500, 502, 504, 506, - 508, 510, 512, 514, 516, 518, 520, 522, - 524, 526, 528, 530, 0, 0, 532, 534, - }}, - {{ - 0, 0, 0, 0, 0, 0, 536, 538, - 540, 542, 544, 546, 548, 550, 552, 554, - 556, 558, 560, 562, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33332, 33333, 33334, 33335, 33336, 33337, 33338, 33339, - 33340, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33341, 33343, 33345, 33347, 33349, 33351, 0, 0, - }}, - {{ - 33353, 33354, 33355, 33356, 33357, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 590, 591, 0, 592, 593, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 595, 0, 0, 0, - 0, 0, 33364, 0, 0, 0, 598, 0, - }}, - {{ - 0, 0, 0, 0, 33367, 601, 603, 605, - 606, 608, 610, 0, 612, 0, 614, 616, - 618, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 620, 622, 624, 626, 628, 630, - 632, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 634, 636, 638, 640, 642, 0, - 33412, 33413, 33414, 647, 649, 33419, 33420, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33421, 33422, 33423, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 656, 658, 0, 660, 0, 0, 0, 662, - 0, 0, 0, 0, 664, 666, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 670, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 672, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 674, 676, 0, 678, 0, 0, 0, 680, - 0, 0, 0, 0, 682, 684, 686, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 688, 690, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 692, 694, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 696, 698, 700, 702, 0, 0, 704, 706, - 0, 0, 708, 710, 712, 714, 716, 718, - }}, - {{ - 0, 0, 720, 722, 724, 726, 728, 730, - 0, 0, 732, 734, 736, 738, 740, 742, - 744, 746, 748, 750, 752, 754, 0, 0, - 756, 758, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 33528, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 762, 764, 766, 768, 770, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 33540, 33542, 33544, - 33546, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 780, 0, 782, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 784, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 786, 0, 0, 0, 0, 0, 0, - 0, 788, 0, 0, 790, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 792, 794, 796, 798, 800, 802, 804, 806, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 808, 810, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 812, 814, 0, 816, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 818, 0, 0, 820, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 822, 824, 826, 0, 0, 828, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 830, 0, 0, 832, 834, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 836, 838, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 840, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 842, 844, 846, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 848, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 850, 0, 0, 0, 0, 0, 0, 852, - 854, 0, 856, 858, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 860, 862, 864, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 866, 0, 868, 870, 872, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 33642, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 33644, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 33646, 33648, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 33650, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 883, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 885, 0, 0, - 0, 0, 887, 0, 0, 0, 0, 889, - 0, 0, 0, 0, 891, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 893, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 895, 0, 897, 899, 33669, - 903, 33673, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 907, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 909, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 911, 0, 0, - }}, - {{ - 0, 0, 913, 0, 0, 0, 0, 915, - 0, 0, 0, 0, 917, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 919, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 921, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 923, 925, 927, 929, 931, 933, 935, 937, - 939, 941, 943, 945, 947, 949, 951, 953, - 955, 957, 959, 961, 963, 965, 967, 969, - 971, 973, 975, 977, 979, 981, 983, 985, - }}, - {{ - 987, 989, 991, 993, 995, 997, 999, 1001, - 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, - 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, - 1035, 1037, 1039, 1041, 1043, 1045, 1047, 1049, - }}, - {{ - 1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, - 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, - 1083, 1085, 1087, 1089, 1091, 1093, 1095, 1097, - 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113, - }}, - {{ - 1115, 1117, 1119, 1121, 1123, 1125, 1127, 1129, - 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1145, - 1147, 1149, 1151, 1153, 1155, 1157, 1159, 1161, - 1163, 1165, 1167, 1169, 1171, 1173, 1175, 1177, - }}, - {{ - 1179, 1181, 1183, 1185, 1187, 1189, 1191, 1193, - 1195, 1197, 1199, 1201, 1203, 1205, 1207, 1209, - 1211, 1213, 1215, 1217, 1219, 1221, 1223, 1225, - 1227, 1229, 33999, 1233, 0, 0, 0, 0, - }}, - {{ - 1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249, - 1251, 1253, 1255, 1257, 1259, 1261, 1263, 1265, - 1267, 1269, 1271, 1273, 1275, 1277, 1279, 1281, - 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1297, - }}, - {{ - 1299, 1301, 1303, 1305, 1307, 1309, 1311, 1313, - 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1329, - 1331, 1333, 1335, 1337, 1339, 1341, 1343, 1345, - 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, - }}, - {{ - 1363, 1365, 1367, 1369, 1371, 1373, 1375, 1377, - 1379, 1381, 1383, 1385, 1387, 1389, 1391, 1393, - 1395, 1397, 1399, 1401, 1403, 1405, 1407, 1409, - 1411, 1413, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1415, 1417, 1419, 1421, 1423, 1425, 1427, 1429, - 1431, 1433, 1435, 1437, 1439, 1441, 1443, 1445, - 1447, 1449, 1451, 1453, 1455, 1457, 0, 0, - 1459, 1461, 1463, 1465, 1467, 1469, 0, 0, - }}, - {{ - 1471, 1473, 1475, 1477, 1479, 1481, 1483, 1485, - 1487, 1489, 1491, 1493, 1495, 1497, 1499, 1501, - 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, - 1519, 1521, 1523, 1525, 1527, 1529, 1531, 1533, - }}, - {{ - 1535, 1537, 1539, 1541, 1543, 1545, 0, 0, - 1547, 1549, 1551, 1553, 1555, 1557, 0, 0, - 1559, 1561, 1563, 1565, 1567, 1569, 1571, 1573, - 0, 1575, 0, 1577, 0, 1579, 0, 1581, - }}, - {{ - 1583, 1585, 1587, 1589, 1591, 1593, 1595, 1597, - 1599, 1601, 1603, 1605, 1607, 1609, 1611, 1613, - 1615, 1617, 1618, 1620, 1621, 1623, 1624, 1626, - 1627, 1629, 1630, 1632, 1633, 1635, 0, 0, - }}, - {{ - 1636, 1638, 1640, 1642, 1644, 1646, 1648, 1650, - 1652, 1654, 1656, 1658, 1660, 1662, 1664, 1666, - 1668, 1670, 1672, 1674, 1676, 1678, 1680, 1682, - 1684, 1686, 1688, 1690, 1692, 1694, 1696, 1698, - }}, - {{ - 1700, 1702, 1704, 1706, 1708, 1710, 1712, 1714, - 1716, 1718, 1720, 1722, 1724, 1726, 1728, 1730, - 1732, 1734, 1736, 1738, 1740, 0, 1742, 1744, - 1746, 1748, 1750, 1752, 1753, 34523, 1757, 34526, - }}, - {{ - 34528, 1762, 1764, 1766, 1768, 0, 1770, 1772, - 1774, 1776, 1777, 1779, 1780, 1782, 1784, 1786, - 1788, 1790, 1792, 1794, 0, 0, 1795, 1797, - 1799, 1801, 1803, 1805, 0, 1806, 1808, 1810, - }}, - {{ - 1812, 1814, 1816, 1818, 1819, 1821, 1823, 1825, - 1827, 1829, 1831, 1833, 1834, 1836, 1838, 1839, - 0, 0, 1840, 1842, 1844, 0, 1846, 1848, - 1850, 1852, 1853, 1855, 1856, 1858, 34627, 0, - }}, - {{ - 1861, 1862, 34631, 34632, 34633, 34634, 34635, 34636, - 34637, 34638, 34639, 0, 0, 0, 0, 0, - 0, 34640, 0, 0, 0, 0, 0, 34641, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 34643, 34644, 34646, 0, - 0, 0, 0, 0, 0, 0, 0, 34649, - 0, 0, 0, 34650, 34652, 0, 34655, 34657, - 0, 0, 0, 0, 34660, 0, 34662, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 34664, 34666, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 34668, 0, 0, 0, 34669, 34670, 34671, 34672, - 34673, 34674, 34675, 34676, 34677, 34678, 34679, 34680, - }}, - {{ - 34681, 34682, 34683, 34684, 34685, 34686, 34687, 34688, - 34689, 34690, 34691, 34692, 34693, 34694, 34695, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 34696, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 34698, 34701, 34704, 34705, 0, 34707, 34710, 34713, - 0, 34714, 34716, 34717, 34718, 34719, 34720, 34721, - 34722, 34723, 34724, 34725, 0, 34726, 34727, 0, - 0, 34729, 34730, 34731, 34732, 34733, 0, 0, - }}, - {{ - 34734, 34736, 34739, 0, 34741, 0, 1974, 0, - 34743, 0, 1976, 1977, 34746, 34747, 0, 34748, - 34749, 34750, 0, 34751, 34752, 34753, 34754, 34755, - 34756, 34757, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 34758, 34761, 34764, 34767, 34770, - 34773, 34776, 34779, 34782, 34785, 34788, 34791, 34794, - }}, - {{ - 34796, 34797, 34799, 34802, 34804, 34805, 34807, 34810, - 34814, 34816, 34817, 34819, 34822, 34823, 34824, 34825, - 34826, 34827, 34829, 34832, 34834, 34835, 34837, 34840, - 34844, 34846, 34847, 34849, 34852, 34853, 34854, 34855, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2088, 2090, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2092, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2094, 2096, 2098, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2100, 0, 0, 0, - 0, 2102, 0, 0, 2104, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2106, 0, 2108, 0, - 0, 0, 0, 0, 34878, 34880, 0, 34883, - 34885, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2120, 0, 0, 2122, 0, 0, 2124, - 0, 2126, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2128, 0, 2130, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2132, 2134, 2136, - 2138, 2140, 0, 0, 2142, 2144, 0, 0, - 2146, 2148, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2150, 2152, 0, 0, 2154, 2156, 0, 0, - 2158, 2160, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2162, 2164, 2166, 2168, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2170, 2172, 2174, 2176, 0, 0, 0, 0, - 0, 0, 2178, 2180, 2182, 2184, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2186, 2187, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 34956, 34957, 34958, 34959, 34960, 34961, 34962, 34963, - 34964, 34965, 34967, 34969, 34971, 34973, 34975, 34977, - 34979, 34981, 34983, 34985, 34987, 34990, 34993, 34996, - 34999, 35002, 35005, 35008, 35011, 35014, 35018, 35022, - }}, - {{ - 35026, 35030, 35034, 35038, 35042, 35046, 35050, 35054, - 35058, 35060, 35062, 35064, 35066, 35068, 35070, 35072, - 35074, 35076, 35079, 35082, 35085, 35088, 35091, 35094, - 35097, 35100, 35103, 35106, 35109, 35112, 35115, 35118, - }}, - {{ - 35121, 35124, 35127, 35130, 35133, 35136, 35139, 35142, - 35145, 35148, 35151, 35154, 35157, 35160, 35163, 35166, - 35169, 35172, 35175, 35178, 35181, 35184, 35187, 35188, - 35189, 35190, 35191, 35192, 35193, 35194, 35195, 35196, - }}, - {{ - 35197, 35198, 35199, 35200, 35201, 35202, 35203, 35204, - 35205, 35206, 35207, 35208, 35209, 35210, 35211, 35212, - 35213, 35214, 35215, 35216, 35217, 35218, 35219, 35220, - 35221, 35222, 35223, 35224, 35225, 35226, 35227, 35228, - }}, - {{ - 35229, 35230, 35231, 35232, 35233, 35234, 35235, 35236, - 35237, 35238, 35239, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 35240, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 35241, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35242, 35243, 35244, 35245, 35246, 35247, 35248, 35249, - 35250, 35251, 35252, 35253, 35254, 35255, 35256, 35257, - 35258, 35259, 35260, 35261, 35262, 35263, 35264, 35265, - 35266, 35267, 35268, 35269, 35270, 35271, 35272, 35273, - }}, - {{ - 35274, 35275, 35276, 35277, 35278, 35279, 35280, 35281, - 35282, 35283, 35284, 35285, 35286, 35287, 35288, 35289, - 35290, 35291, 35292, 35293, 35294, 35295, 35296, 35297, - 35298, 35299, 35300, 35301, 35302, 35303, 35304, 35305, - }}, - {{ - 35306, 35307, 35308, 35309, 35310, 35311, 35312, 35313, - 35314, 35315, 35316, 35317, 35318, 35319, 35320, 35321, - 35322, 35323, 35324, 35325, 35326, 35327, 35328, 35329, - 35330, 35331, 35332, 35333, 35334, 35335, 35336, 35337, - }}, - {{ - 35338, 35339, 35340, 35341, 35342, 35343, 35344, 35345, - 35346, 35347, 35348, 35349, 35350, 35351, 35352, 35353, - 35354, 35355, 35356, 35357, 35358, 35359, 35360, 35361, - 35362, 35363, 35364, 35365, 35366, 35367, 35368, 35369, - }}, - {{ - 35370, 35371, 35372, 35373, 35374, 35375, 35376, 35377, - 35378, 35379, 35380, 35381, 35382, 35383, 35384, 35385, - 35386, 35387, 35388, 35389, 35390, 35391, 35392, 35393, - 35394, 35395, 35396, 35397, 35398, 35399, 35400, 35401, - }}, - {{ - 35402, 35403, 35404, 35405, 35406, 35407, 35408, 35409, - 35410, 35411, 35412, 35413, 35414, 35415, 35416, 35417, - 35418, 35419, 35420, 35421, 35422, 35423, 35424, 35425, - 35426, 35427, 35428, 35429, 35430, 35431, 35432, 35433, - }}, - {{ - 35434, 35435, 35436, 35437, 35438, 35439, 35440, 35441, - 35442, 35443, 35444, 35445, 35446, 35447, 35448, 35449, - 35450, 35451, 35452, 35453, 35454, 35455, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35456, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35457, 0, - 35458, 35459, 35460, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2693, 0, 2695, 0, - 2697, 0, 2699, 0, 2701, 0, 2703, 0, - 2705, 0, 2707, 0, 2709, 0, 2711, 0, - }}, - {{ - 2713, 0, 2715, 0, 0, 2717, 0, 2719, - 0, 2721, 0, 0, 0, 0, 0, 0, - 2723, 2725, 0, 2727, 2729, 0, 2731, 2733, - 0, 2735, 2737, 0, 2739, 2741, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2743, 0, 0, 0, - 0, 0, 0, 35513, 35515, 0, 2749, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2751, 0, 2753, 0, - 2755, 0, 2757, 0, 2759, 0, 2761, 0, - 2763, 0, 2765, 0, 2767, 0, 2769, 0, - }}, - {{ - 2771, 0, 2773, 0, 0, 2775, 0, 2777, - 0, 2779, 0, 0, 0, 0, 0, 0, - 2781, 2783, 0, 2785, 2787, 0, 2789, 2791, - 0, 2793, 2795, 0, 2797, 2799, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2801, 0, 0, 2803, - 2805, 2807, 2809, 0, 0, 0, 2811, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35581, 35582, 35583, 35584, 35585, 35586, 35587, - 35588, 35589, 35590, 35591, 35592, 35593, 35594, 35595, - }}, - {{ - 35596, 35597, 35598, 35599, 35600, 35601, 35602, 35603, - 35604, 35605, 35606, 35607, 35608, 35609, 35610, 35611, - 35612, 35613, 35614, 35615, 35616, 35617, 35618, 35619, - 35620, 35621, 35622, 35623, 35624, 35625, 35626, 35627, - }}, - {{ - 35628, 35629, 35630, 35631, 35632, 35633, 35634, 35635, - 35636, 35637, 35638, 35639, 35640, 35641, 35642, 35643, - 35644, 35645, 35646, 35647, 35648, 35649, 35650, 35651, - 35652, 35653, 35654, 35655, 35656, 35657, 35658, 35659, - }}, - {{ - 35660, 35661, 35662, 35663, 35664, 35665, 35666, 35667, - 35668, 35669, 35670, 35671, 35672, 35673, 35674, 0, - 0, 0, 35675, 35676, 35677, 35678, 35679, 35680, - 35681, 35682, 35683, 35684, 35685, 35686, 35687, 35688, - }}, - {{ - 35689, 35692, 35695, 35698, 35701, 35704, 35707, 35710, - 35713, 35716, 35719, 35722, 35725, 35728, 35731, 35735, - 35739, 35743, 35747, 35751, 35755, 35759, 35763, 35767, - 35771, 35775, 35779, 35783, 35787, 0, 0, 0, - }}, - {{ - 35791, 35794, 35797, 35800, 35803, 35806, 35809, 35812, - 35815, 35818, 35821, 35824, 35827, 35830, 35833, 35836, - 35839, 35842, 35845, 35848, 35851, 35854, 35857, 35860, - 35863, 35866, 35869, 35872, 35875, 35878, 35881, 35884, - }}, - {{ - 35887, 35890, 35893, 35896, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35899, 35900, 35901, 35902, 35903, 35904, 35905, 35906, - 35907, 35908, 35909, 35910, 35911, 35912, 35913, 35915, - 35917, 35919, 35921, 35923, 35925, 35927, 35929, 35931, - 35933, 35935, 35937, 35939, 0, 0, 0, 0, - }}, - {{ - 35941, 35942, 35943, 35944, 35945, 35946, 35947, 35948, - 35949, 35950, 35951, 35952, 35953, 35954, 35955, 35956, - 35957, 35958, 35959, 35960, 35961, 35962, 35963, 35964, - 35965, 35966, 35967, 35968, 35969, 35970, 35971, 35972, - }}, - {{ - 35973, 35974, 35975, 35976, 35977, 35978, 35979, 35980, - 35981, 35982, 35983, 35984, 35985, 35986, 35987, 35988, - 35989, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35990, 35992, 35994, 35996, 35998, 36000, 36002, 36004, - 36006, 36008, 36011, 36014, 0, 0, 0, 0, - 36017, 36018, 36019, 36020, 36021, 36022, 36023, 36024, - 36025, 36026, 36027, 36028, 36029, 36030, 36031, 36032, - }}, - {{ - 36033, 36034, 36035, 36036, 36037, 36038, 36039, 36040, - 36041, 36042, 36043, 36044, 36045, 36046, 36047, 36048, - 36049, 36050, 36051, 36052, 36053, 36054, 36055, 36056, - 36057, 36058, 36059, 36060, 36061, 36062, 36063, 0, - }}, - {{ - 36064, 36068, 36072, 36076, 36079, 36083, 36086, 36089, - 36094, 36098, 36101, 36104, 36107, 36111, 36115, 36118, - 36121, 36123, 36126, 36130, 36134, 36136, 36141, 36147, - 36152, 36155, 36160, 36165, 36169, 36172, 36175, 36178, - }}, - {{ - 36182, 36187, 36191, 36194, 36197, 36200, 36202, 36204, - 36206, 36208, 36211, 36214, 36219, 36222, 36226, 36231, - 36234, 36236, 36238, 36243, 36247, 36252, 36255, 36260, - 36262, 36265, 36268, 36271, 36274, 36277, 36281, 36284, - }}, - {{ - 36286, 36289, 36292, 36295, 36299, 36302, 36305, 36308, - 36313, 36317, 36319, 36324, 36326, 36330, 36334, 36337, - 36340, 36343, 36347, 36349, 36352, 36356, 36358, 36363, - 36366, 36368, 36370, 36372, 36374, 36376, 36378, 36380, - }}, - {{ - 36382, 36384, 36386, 36389, 36392, 36395, 36398, 36401, - 36404, 36407, 36410, 36413, 36416, 36419, 36422, 36425, - 36428, 36431, 36434, 36436, 36438, 36441, 36443, 0, - 0, 0, 0, 36445, 36447, 36449, 36451, 36453, - }}, - {{ - 36457, 36459, 36461, 36463, 36465, 36467, 36469, 36471, - 36473, 36476, 36480, 36482, 36484, 36486, 36488, 36490, - 36492, 36494, 36497, 36500, 36503, 36506, 36508, 36510, - 36512, 36514, 36516, 36518, 36520, 36522, 36524, 36526, - }}, - {{ - 36529, 36532, 36534, 36537, 36540, 36543, 36545, 36548, - 36551, 36555, 36557, 36560, 36563, 36566, 36569, 36574, - 36580, 36582, 36584, 36586, 36588, 36590, 36592, 36594, - 36596, 36598, 36600, 36602, 36604, 36606, 36608, 36610, - }}, - {{ - 36612, 36614, 36616, 36620, 36622, 36624, 36626, 36630, - 36633, 36635, 36637, 36639, 36641, 36643, 36645, 36647, - 36649, 36651, 36653, 36656, 36658, 36660, 36663, 36666, - 36668, 36672, 36675, 36677, 36679, 36681, 0, 0, - }}, - {{ - 36683, 36685, 36687, 36689, 36691, 36693, 36695, 36697, - 36699, 36701, 36704, 36707, 36710, 36713, 36716, 36719, - 36722, 36725, 36728, 36731, 36734, 36737, 36740, 36743, - 36746, 36749, 36752, 36755, 36758, 36761, 36764, 0, - }}, - {{ - 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, - 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, - 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, - 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, - }}, - {{ - 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, - 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, - 4047, 4048, 4049, 4050, 4051, 4052, 4053, 4054, - 4055, 4056, 4057, 4058, 4059, 4060, 4061, 4062, - }}, - {{ - 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4070, - 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, - 4079, 4080, 4081, 4082, 4083, 4084, 4085, 4086, - 4087, 4088, 4089, 4090, 4091, 4092, 4093, 4094, - }}, - {{ - 4095, 4096, 4097, 4098, 4099, 4100, 4101, 4102, - 4103, 4104, 4105, 4106, 4107, 4108, 4109, 4110, - 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, - 4119, 4120, 4121, 4122, 4123, 4124, 4125, 4126, - }}, - {{ - 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, - 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, - 4143, 4144, 4145, 4146, 4147, 4148, 4149, 4150, - 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, - }}, - {{ - 4159, 4160, 4161, 4162, 4163, 4164, 4165, 4166, - 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, - 4175, 4176, 4177, 4178, 4179, 4180, 4181, 4182, - 4183, 4184, 4185, 4186, 4187, 4188, 4189, 4190, - }}, - {{ - 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, - 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, - 4207, 4208, 4209, 4210, 4211, 4212, 4213, 4214, - 4215, 4216, 4217, 4218, 4219, 4220, 4221, 4222, - }}, - {{ - 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, - 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, - 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, - 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, - }}, - {{ - 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, - 4263, 4264, 4265, 4266, 4267, 4268, 0, 0, - 4269, 0, 4270, 0, 0, 4271, 4272, 4273, - 4274, 4275, 4276, 4277, 4278, 4279, 4280, 0, - }}, - {{ - 4281, 0, 4282, 0, 0, 4283, 4284, 0, - 0, 0, 4285, 4286, 4287, 4288, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 37057, 37059, 37061, 37063, 37066, 37069, 37071, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37073, 37075, 37077, 37079, 37081, - 0, 0, 0, 0, 0, 4315, 0, 4317, - }}, - {{ - 37087, 37088, 37089, 37090, 37091, 37092, 37093, 37094, - 37095, 37096, 4329, 4331, 4333, 4335, 4337, 4339, - 4341, 4343, 4345, 4347, 4349, 4351, 4353, 0, - 4355, 4357, 4359, 4361, 4363, 0, 4365, 0, - }}, - {{ - 4367, 4369, 0, 4371, 4373, 0, 4375, 4377, - 4379, 4381, 4383, 4385, 4387, 4389, 4391, 37161, - 37163, 37164, 37165, 37166, 37167, 37168, 37169, 37170, - 37171, 37172, 37173, 37174, 37175, 37176, 37177, 37178, - }}, - {{ - 37179, 37180, 37181, 37182, 37183, 37184, 37185, 37186, - 37187, 37188, 37189, 37190, 37191, 37192, 37193, 37194, - 37195, 37196, 37197, 37198, 37199, 37200, 37201, 37202, - 37203, 37204, 37205, 37206, 37207, 37208, 37209, 37210, - }}, - {{ - 37211, 37212, 37213, 37214, 37215, 37216, 37217, 37218, - 37219, 37220, 37221, 37222, 37223, 37224, 37225, 37226, - 37227, 37228, 37229, 37230, 37231, 37232, 37233, 37234, - 37235, 37236, 37237, 37238, 37239, 37240, 37241, 37242, - }}, - {{ - 37243, 37244, 37245, 37246, 37247, 37248, 37249, 37250, - 37251, 37252, 37253, 37254, 37255, 37256, 37257, 37258, - 37259, 37260, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37261, 37262, 37263, 37264, 37265, - 37266, 37267, 37268, 37269, 37270, 37271, 37272, 37273, - }}, - {{ - 37274, 37275, 37276, 37277, 37278, 37279, 37280, 37281, - 37282, 37283, 37284, 37286, 37288, 37290, 37292, 37294, - 37296, 37298, 37300, 37302, 37304, 37306, 37308, 37310, - 37312, 37314, 37316, 37318, 37320, 37321, 37322, 37323, - }}, - {{ - 37324, 37326, 37328, 37330, 37332, 37334, 37336, 37338, - 37340, 37342, 37344, 37346, 37348, 37350, 37352, 37354, - 37356, 37358, 37360, 37362, 37364, 37366, 37368, 37370, - 37372, 37374, 37376, 37378, 37380, 37382, 37384, 37386, - }}, - {{ - 37388, 37390, 37392, 37394, 37396, 37398, 37400, 37402, - 37404, 37406, 37408, 37410, 37412, 37414, 37416, 37418, - 37420, 37422, 37424, 37426, 37428, 37430, 37432, 37434, - 37436, 37438, 37440, 37442, 37444, 37446, 37448, 37450, - }}, - {{ - 37452, 37454, 37456, 37458, 37460, 37462, 37464, 37466, - 37468, 37470, 37472, 37474, 37476, 37478, 37480, 37482, - 37484, 37486, 37488, 37490, 37492, 37494, 37496, 37498, - 37500, 37502, 37504, 37506, 37508, 37510, 37512, 37515, - }}, - {{ - 37518, 37521, 37524, 37527, 37530, 37532, 37534, 37536, - 37538, 37540, 37542, 37544, 37546, 37548, 37550, 37552, - 37554, 37556, 37558, 37560, 37562, 37564, 37566, 37568, - 37570, 37572, 37574, 37576, 37578, 37580, 37582, 37584, - }}, - {{ - 37586, 37588, 37590, 37592, 37594, 37596, 37598, 37600, - 37602, 37604, 37606, 37608, 37610, 37612, 37614, 37616, - 37618, 37620, 37622, 37624, 37626, 37628, 37630, 37632, - 37634, 37636, 37638, 37640, 37642, 37644, 37646, 37648, - }}, - {{ - 37650, 37652, 37654, 37656, 37658, 37660, 37662, 37664, - 37666, 37668, 37670, 37672, 37674, 37676, 37678, 37680, - 37682, 37684, 37686, 37688, 37690, 37692, 37694, 37696, - 37698, 37700, 37702, 37704, 37706, 37708, 37710, 37712, - }}, - {{ - 37714, 37716, 37718, 37720, 37722, 37724, 37726, 37728, - 37730, 37732, 37734, 37736, 37738, 37740, 37742, 37744, - 37746, 37748, 37750, 37752, 37754, 37756, 37758, 37760, - 37762, 37764, 37766, 37768, 37770, 37772, 37774, 37776, - }}, - {{ - 37778, 37780, 37782, 37784, 37786, 37788, 37790, 37792, - 37794, 37796, 37798, 37800, 37802, 37804, 37806, 37808, - 37810, 37812, 37814, 37817, 37820, 37823, 37825, 37827, - 37829, 37831, 37833, 37835, 37837, 37839, 37841, 37843, - }}, - {{ - 37845, 37847, 37849, 37851, 37853, 37855, 37857, 37859, - 37861, 37863, 37865, 37867, 37869, 37871, 37873, 37875, - 37877, 37879, 37881, 37883, 37885, 37887, 37889, 37891, - 37893, 37895, 37897, 37899, 37901, 37903, 37905, 37907, - }}, - {{ - 37909, 37911, 37913, 37915, 37917, 37919, 37921, 37923, - 37925, 37927, 37929, 37931, 37933, 37935, 37937, 37939, - 37941, 37943, 37945, 37947, 37949, 37951, 37953, 37955, - 37957, 37959, 37961, 37963, 37965, 37967, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 37969, 37972, 37975, 37978, 37981, 37984, 37987, 37990, - 37993, 37996, 37999, 38002, 38005, 38008, 38011, 38014, - }}, - {{ - 38017, 38020, 38023, 38026, 38029, 38032, 38035, 38038, - 38041, 38044, 38047, 38050, 38053, 38056, 38059, 38062, - 38065, 38068, 38071, 38074, 38077, 38080, 38083, 38086, - 38089, 38092, 38095, 38098, 38101, 38104, 38107, 38110, - }}, - {{ - 38113, 38116, 38119, 38122, 38125, 38128, 38131, 38134, - 38137, 38140, 38143, 38146, 38149, 38152, 38155, 38158, - 0, 0, 38161, 38164, 38167, 38170, 38173, 38176, - 38179, 38182, 38185, 38188, 38191, 38194, 38197, 38200, - }}, - {{ - 38203, 38206, 38209, 38212, 38215, 38218, 38221, 38224, - 38227, 38230, 38233, 38236, 38239, 38242, 38245, 38248, - 38251, 38254, 38257, 38260, 38263, 38266, 38269, 38272, - 38275, 38278, 38281, 38284, 38287, 38290, 38293, 38296, - }}, - {{ - 38299, 38302, 38305, 38308, 38311, 38314, 38317, 38320, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 38323, 38326, 38329, 38333, 38337, 38341, 38345, 38349, - 38353, 38357, 38360, 38378, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 38386, 38387, 38388, 38389, 38390, 38391, 38392, 38393, - 38394, 38395, 38396, 38397, 38398, 38399, 38400, 38401, - }}, - {{ - 38402, 38403, 38404, 38405, 38406, 0, 0, 0, - 0, 38407, 38408, 38409, 38410, 38411, 38412, 38413, - 38414, 38415, 38416, 0, 38417, 38418, 38419, 38420, - 38421, 38422, 38423, 38424, 38425, 38426, 38427, 38428, - }}, - {{ - 38429, 38430, 38431, 38432, 38433, 38434, 38435, 0, - 38436, 38437, 38438, 38439, 0, 0, 0, 0, - 38440, 38442, 38444, 0, 38446, 0, 38448, 38450, - 38452, 38454, 38456, 38458, 38460, 38462, 38464, 38466, - }}, - {{ - 38468, 38469, 38470, 38471, 38472, 38473, 38474, 38475, - 38476, 38477, 38478, 38479, 38480, 38481, 38482, 38483, - 38484, 38485, 38486, 38487, 38488, 38489, 38490, 38491, - 38492, 38493, 38494, 38495, 38496, 38497, 38498, 38499, - }}, - {{ - 38500, 38501, 38502, 38503, 38504, 38505, 38506, 38507, - 38508, 38509, 38510, 38511, 38512, 38513, 38514, 38515, - 38516, 38517, 38518, 38519, 38520, 38521, 38522, 38523, - 38524, 38525, 38526, 38527, 38528, 38529, 38530, 38531, - }}, - {{ - 38532, 38533, 38534, 38535, 38536, 38537, 38538, 38539, - 38540, 38541, 38542, 38543, 38544, 38545, 38546, 38547, - 38548, 38549, 38550, 38551, 38552, 38553, 38554, 38555, - 38556, 38557, 38558, 38559, 38560, 38561, 38562, 38563, - }}, - {{ - 38564, 38565, 38566, 38567, 38568, 38569, 38570, 38571, - 38572, 38573, 38574, 38575, 38576, 38577, 38578, 38579, - 38580, 38581, 38582, 38583, 38584, 38585, 38587, 38589, - 38591, 38593, 38595, 38597, 38599, 0, 0, 0, - }}, - {{ - 0, 38601, 38602, 38603, 38604, 38605, 38606, 38607, - 38608, 38609, 38610, 38611, 38612, 38613, 38614, 38615, - 38616, 38617, 38618, 38619, 38620, 38621, 38622, 38623, - 38624, 38625, 38626, 38627, 38628, 38629, 38630, 38631, - }}, - {{ - 38632, 38633, 38634, 38635, 38636, 38637, 38638, 38639, - 38640, 38641, 38642, 38643, 38644, 38645, 38646, 38647, - 38648, 38649, 38650, 38651, 38652, 38653, 38654, 38655, - 38656, 38657, 38658, 38659, 38660, 38661, 38662, 38663, - }}, - {{ - 38664, 38665, 38666, 38667, 38668, 38669, 38670, 38671, - 38672, 38673, 38674, 38675, 38676, 38677, 38678, 38679, - 38680, 38681, 38682, 38683, 38684, 38685, 38686, 38687, - 38688, 38689, 38690, 38691, 38692, 38693, 38694, 0, - }}, - {{ - 0, 38695, 38696, 38697, 38698, 38699, 38700, 38701, - 38702, 38703, 38704, 38705, 38706, 38707, 38708, 38709, - 38710, 38711, 38712, 38713, 38714, 38715, 38716, 38717, - 38718, 38719, 38720, 38721, 38722, 38723, 38724, 38725, - }}, - {{ - 38726, 38727, 38728, 38729, 38730, 38731, 38732, 38733, - 38734, 38735, 38736, 38737, 38738, 38739, 38740, 38741, - 38742, 38743, 38744, 38745, 38746, 38747, 38748, 38749, - 38750, 38751, 38752, 38753, 38754, 38755, 38756, 38757, - }}, - {{ - 38758, 38759, 38760, 38761, 38762, 38763, 38764, 38765, - 38766, 38767, 38768, 38769, 38770, 38771, 38772, 38773, - 38774, 38775, 38776, 38777, 38778, 38779, 38780, 38781, - 38782, 38783, 38784, 38785, 38786, 38787, 38788, 0, - }}, - {{ - 0, 0, 38789, 38790, 38791, 38792, 38793, 38794, - 0, 0, 38795, 38796, 38797, 38798, 38799, 38800, - 0, 0, 38801, 38802, 38803, 38804, 38805, 38806, - 0, 0, 38807, 38808, 38809, 0, 0, 0, - }}, - {{ - 38810, 38811, 38812, 38813, 38814, 38815, 38816, 0, - 38817, 38818, 38819, 38820, 38821, 38822, 38823, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned long v301_decompose_seq[] = { - 0x00000000, 0x80000020, 0x00000020, 0x80000308, - 0x80000061, 0x00000020, 0x80000304, 0x80000032, - 0x80000033, 0x00000020, 0x80000301, 0x800003bc, - 0x00000020, 0x80000327, 0x80000031, 0x8000006f, - 0x00000031, 0x00002044, 0x80000034, 0x00000031, - 0x00002044, 0x80000032, 0x00000033, 0x00002044, - 0x80000034, 0x00000041, 0x80000300, 0x00000041, - 0x80000301, 0x00000041, 0x80000302, 0x00000041, - 0x80000303, 0x00000041, 0x80000308, 0x00000041, - 0x8000030a, 0x00000043, 0x80000327, 0x00000045, - 0x80000300, 0x00000045, 0x80000301, 0x00000045, - 0x80000302, 0x00000045, 0x80000308, 0x00000049, - 0x80000300, 0x00000049, 0x80000301, 0x00000049, - 0x80000302, 0x00000049, 0x80000308, 0x0000004e, - 0x80000303, 0x0000004f, 0x80000300, 0x0000004f, - 0x80000301, 0x0000004f, 0x80000302, 0x0000004f, - 0x80000303, 0x0000004f, 0x80000308, 0x00000055, - 0x80000300, 0x00000055, 0x80000301, 0x00000055, - 0x80000302, 0x00000055, 0x80000308, 0x00000059, - 0x80000301, 0x00000061, 0x80000300, 0x00000061, - 0x80000301, 0x00000061, 0x80000302, 0x00000061, - 0x80000303, 0x00000061, 0x80000308, 0x00000061, - 0x8000030a, 0x00000063, 0x80000327, 0x00000065, - 0x80000300, 0x00000065, 0x80000301, 0x00000065, - 0x80000302, 0x00000065, 0x80000308, 0x00000069, - 0x80000300, 0x00000069, 0x80000301, 0x00000069, - 0x80000302, 0x00000069, 0x80000308, 0x0000006e, - 0x80000303, 0x0000006f, 0x80000300, 0x0000006f, - 0x80000301, 0x0000006f, 0x80000302, 0x0000006f, - 0x80000303, 0x0000006f, 0x80000308, 0x00000075, - 0x80000300, 0x00000075, 0x80000301, 0x00000075, - 0x80000302, 0x00000075, 0x80000308, 0x00000079, - 0x80000301, 0x00000079, 0x80000308, 0x00000041, - 0x80000304, 0x00000061, 0x80000304, 0x00000041, - 0x80000306, 0x00000061, 0x80000306, 0x00000041, - 0x80000328, 0x00000061, 0x80000328, 0x00000043, - 0x80000301, 0x00000063, 0x80000301, 0x00000043, - 0x80000302, 0x00000063, 0x80000302, 0x00000043, - 0x80000307, 0x00000063, 0x80000307, 0x00000043, - 0x8000030c, 0x00000063, 0x8000030c, 0x00000044, - 0x8000030c, 0x00000064, 0x8000030c, 0x00000045, - 0x80000304, 0x00000065, 0x80000304, 0x00000045, - 0x80000306, 0x00000065, 0x80000306, 0x00000045, - 0x80000307, 0x00000065, 0x80000307, 0x00000045, - 0x80000328, 0x00000065, 0x80000328, 0x00000045, - 0x8000030c, 0x00000065, 0x8000030c, 0x00000047, - 0x80000302, 0x00000067, 0x80000302, 0x00000047, - 0x80000306, 0x00000067, 0x80000306, 0x00000047, - 0x80000307, 0x00000067, 0x80000307, 0x00000047, - 0x80000327, 0x00000067, 0x80000327, 0x00000048, - 0x80000302, 0x00000068, 0x80000302, 0x00000049, - 0x80000303, 0x00000069, 0x80000303, 0x00000049, - 0x80000304, 0x00000069, 0x80000304, 0x00000049, - 0x80000306, 0x00000069, 0x80000306, 0x00000049, - 0x80000328, 0x00000069, 0x80000328, 0x00000049, - 0x80000307, 0x00000049, 0x8000004a, 0x00000069, - 0x8000006a, 0x0000004a, 0x80000302, 0x0000006a, - 0x80000302, 0x0000004b, 0x80000327, 0x0000006b, - 0x80000327, 0x0000004c, 0x80000301, 0x0000006c, - 0x80000301, 0x0000004c, 0x80000327, 0x0000006c, - 0x80000327, 0x0000004c, 0x8000030c, 0x0000006c, - 0x8000030c, 0x0000004c, 0x800000b7, 0x0000006c, - 0x800000b7, 0x0000004e, 0x80000301, 0x0000006e, - 0x80000301, 0x0000004e, 0x80000327, 0x0000006e, - 0x80000327, 0x0000004e, 0x8000030c, 0x0000006e, - 0x8000030c, 0x000002bc, 0x8000006e, 0x0000004f, - 0x80000304, 0x0000006f, 0x80000304, 0x0000004f, - 0x80000306, 0x0000006f, 0x80000306, 0x0000004f, - 0x8000030b, 0x0000006f, 0x8000030b, 0x00000052, - 0x80000301, 0x00000072, 0x80000301, 0x00000052, - 0x80000327, 0x00000072, 0x80000327, 0x00000052, - 0x8000030c, 0x00000072, 0x8000030c, 0x00000053, - 0x80000301, 0x00000073, 0x80000301, 0x00000053, - 0x80000302, 0x00000073, 0x80000302, 0x00000053, - 0x80000327, 0x00000073, 0x80000327, 0x00000053, - 0x8000030c, 0x00000073, 0x8000030c, 0x00000054, - 0x80000327, 0x00000074, 0x80000327, 0x00000054, - 0x8000030c, 0x00000074, 0x8000030c, 0x00000055, - 0x80000303, 0x00000075, 0x80000303, 0x00000055, - 0x80000304, 0x00000075, 0x80000304, 0x00000055, - 0x80000306, 0x00000075, 0x80000306, 0x00000055, - 0x8000030a, 0x00000075, 0x8000030a, 0x00000055, - 0x8000030b, 0x00000075, 0x8000030b, 0x00000055, - 0x80000328, 0x00000075, 0x80000328, 0x00000057, - 0x80000302, 0x00000077, 0x80000302, 0x00000059, - 0x80000302, 0x00000079, 0x80000302, 0x00000059, - 0x80000308, 0x0000005a, 0x80000301, 0x0000007a, - 0x80000301, 0x0000005a, 0x80000307, 0x0000007a, - 0x80000307, 0x0000005a, 0x8000030c, 0x0000007a, - 0x8000030c, 0x80000073, 0x0000004f, 0x8000031b, - 0x0000006f, 0x8000031b, 0x00000055, 0x8000031b, - 0x00000075, 0x8000031b, 0x00000044, 0x8000017d, - 0x00000044, 0x8000017e, 0x00000064, 0x8000017e, - 0x0000004c, 0x8000004a, 0x0000004c, 0x8000006a, - 0x0000006c, 0x8000006a, 0x0000004e, 0x8000004a, - 0x0000004e, 0x8000006a, 0x0000006e, 0x8000006a, - 0x00000041, 0x8000030c, 0x00000061, 0x8000030c, - 0x00000049, 0x8000030c, 0x00000069, 0x8000030c, - 0x0000004f, 0x8000030c, 0x0000006f, 0x8000030c, - 0x00000055, 0x8000030c, 0x00000075, 0x8000030c, - 0x000000dc, 0x80000304, 0x000000fc, 0x80000304, - 0x000000dc, 0x80000301, 0x000000fc, 0x80000301, - 0x000000dc, 0x8000030c, 0x000000fc, 0x8000030c, - 0x000000dc, 0x80000300, 0x000000fc, 0x80000300, - 0x000000c4, 0x80000304, 0x000000e4, 0x80000304, - 0x00000226, 0x80000304, 0x00000227, 0x80000304, - 0x000000c6, 0x80000304, 0x000000e6, 0x80000304, - 0x00000047, 0x8000030c, 0x00000067, 0x8000030c, - 0x0000004b, 0x8000030c, 0x0000006b, 0x8000030c, - 0x0000004f, 0x80000328, 0x0000006f, 0x80000328, - 0x000001ea, 0x80000304, 0x000001eb, 0x80000304, - 0x000001b7, 0x8000030c, 0x00000292, 0x8000030c, - 0x0000006a, 0x8000030c, 0x00000044, 0x8000005a, - 0x00000044, 0x8000007a, 0x00000064, 0x8000007a, - 0x00000047, 0x80000301, 0x00000067, 0x80000301, - 0x0000004e, 0x80000300, 0x0000006e, 0x80000300, - 0x000000c5, 0x80000301, 0x000000e5, 0x80000301, - 0x000000c6, 0x80000301, 0x000000e6, 0x80000301, - 0x000000d8, 0x80000301, 0x000000f8, 0x80000301, - 0x00000041, 0x8000030f, 0x00000061, 0x8000030f, - 0x00000041, 0x80000311, 0x00000061, 0x80000311, - 0x00000045, 0x8000030f, 0x00000065, 0x8000030f, - 0x00000045, 0x80000311, 0x00000065, 0x80000311, - 0x00000049, 0x8000030f, 0x00000069, 0x8000030f, - 0x00000049, 0x80000311, 0x00000069, 0x80000311, - 0x0000004f, 0x8000030f, 0x0000006f, 0x8000030f, - 0x0000004f, 0x80000311, 0x0000006f, 0x80000311, - 0x00000052, 0x8000030f, 0x00000072, 0x8000030f, - 0x00000052, 0x80000311, 0x00000072, 0x80000311, - 0x00000055, 0x8000030f, 0x00000075, 0x8000030f, - 0x00000055, 0x80000311, 0x00000075, 0x80000311, - 0x00000053, 0x80000326, 0x00000073, 0x80000326, - 0x00000054, 0x80000326, 0x00000074, 0x80000326, - 0x00000048, 0x8000030c, 0x00000068, 0x8000030c, - 0x00000041, 0x80000307, 0x00000061, 0x80000307, - 0x00000045, 0x80000327, 0x00000065, 0x80000327, - 0x000000d6, 0x80000304, 0x000000f6, 0x80000304, - 0x000000d5, 0x80000304, 0x000000f5, 0x80000304, - 0x0000004f, 0x80000307, 0x0000006f, 0x80000307, - 0x0000022e, 0x80000304, 0x0000022f, 0x80000304, - 0x00000059, 0x80000304, 0x00000079, 0x80000304, - 0x80000068, 0x80000266, 0x8000006a, 0x80000072, - 0x80000279, 0x8000027b, 0x80000281, 0x80000077, - 0x80000079, 0x00000020, 0x80000306, 0x00000020, - 0x80000307, 0x00000020, 0x8000030a, 0x00000020, - 0x80000328, 0x00000020, 0x80000303, 0x00000020, - 0x8000030b, 0x80000263, 0x8000006c, 0x80000073, - 0x80000078, 0x80000295, 0x80000300, 0x80000301, - 0x80000313, 0x00000308, 0x80000301, 0x800002b9, - 0x00000020, 0x80000345, 0x8000003b, 0x00000020, - 0x80000301, 0x000000a8, 0x80000301, 0x00000391, - 0x80000301, 0x800000b7, 0x00000395, 0x80000301, - 0x00000397, 0x80000301, 0x00000399, 0x80000301, - 0x0000039f, 0x80000301, 0x000003a5, 0x80000301, - 0x000003a9, 0x80000301, 0x000003ca, 0x80000301, - 0x00000399, 0x80000308, 0x000003a5, 0x80000308, - 0x000003b1, 0x80000301, 0x000003b5, 0x80000301, - 0x000003b7, 0x80000301, 0x000003b9, 0x80000301, - 0x000003cb, 0x80000301, 0x000003b9, 0x80000308, - 0x000003c5, 0x80000308, 0x000003bf, 0x80000301, - 0x000003c5, 0x80000301, 0x000003c9, 0x80000301, - 0x800003b2, 0x800003b8, 0x800003a5, 0x000003d2, - 0x80000301, 0x000003d2, 0x80000308, 0x800003c6, - 0x800003c0, 0x800003ba, 0x800003c1, 0x800003c2, - 0x00000415, 0x80000300, 0x00000415, 0x80000308, - 0x00000413, 0x80000301, 0x00000406, 0x80000308, - 0x0000041a, 0x80000301, 0x00000418, 0x80000300, - 0x00000423, 0x80000306, 0x00000418, 0x80000306, - 0x00000438, 0x80000306, 0x00000435, 0x80000300, - 0x00000435, 0x80000308, 0x00000433, 0x80000301, - 0x00000456, 0x80000308, 0x0000043a, 0x80000301, - 0x00000438, 0x80000300, 0x00000443, 0x80000306, - 0x00000474, 0x8000030f, 0x00000475, 0x8000030f, - 0x00000416, 0x80000306, 0x00000436, 0x80000306, - 0x00000410, 0x80000306, 0x00000430, 0x80000306, - 0x00000410, 0x80000308, 0x00000430, 0x80000308, - 0x00000415, 0x80000306, 0x00000435, 0x80000306, - 0x000004d8, 0x80000308, 0x000004d9, 0x80000308, - 0x00000416, 0x80000308, 0x00000436, 0x80000308, - 0x00000417, 0x80000308, 0x00000437, 0x80000308, - 0x00000418, 0x80000304, 0x00000438, 0x80000304, - 0x00000418, 0x80000308, 0x00000438, 0x80000308, - 0x0000041e, 0x80000308, 0x0000043e, 0x80000308, - 0x000004e8, 0x80000308, 0x000004e9, 0x80000308, - 0x0000042d, 0x80000308, 0x0000044d, 0x80000308, - 0x00000423, 0x80000304, 0x00000443, 0x80000304, - 0x00000423, 0x80000308, 0x00000443, 0x80000308, - 0x00000423, 0x8000030b, 0x00000443, 0x8000030b, - 0x00000427, 0x80000308, 0x00000447, 0x80000308, - 0x0000042b, 0x80000308, 0x0000044b, 0x80000308, - 0x00000565, 0x80000582, 0x00000627, 0x80000653, - 0x00000627, 0x80000654, 0x00000648, 0x80000654, - 0x00000627, 0x80000655, 0x0000064a, 0x80000654, - 0x00000627, 0x80000674, 0x00000648, 0x80000674, - 0x000006c7, 0x80000674, 0x0000064a, 0x80000674, - 0x000006d5, 0x80000654, 0x000006c1, 0x80000654, - 0x000006d2, 0x80000654, 0x00000928, 0x8000093c, - 0x00000930, 0x8000093c, 0x00000933, 0x8000093c, - 0x00000915, 0x8000093c, 0x00000916, 0x8000093c, - 0x00000917, 0x8000093c, 0x0000091c, 0x8000093c, - 0x00000921, 0x8000093c, 0x00000922, 0x8000093c, - 0x0000092b, 0x8000093c, 0x0000092f, 0x8000093c, - 0x000009c7, 0x800009be, 0x000009c7, 0x800009d7, - 0x000009a1, 0x800009bc, 0x000009a2, 0x800009bc, - 0x000009af, 0x800009bc, 0x00000a32, 0x80000a3c, - 0x00000a38, 0x80000a3c, 0x00000a16, 0x80000a3c, - 0x00000a17, 0x80000a3c, 0x00000a1c, 0x80000a3c, - 0x00000a2b, 0x80000a3c, 0x00000b47, 0x80000b56, - 0x00000b47, 0x80000b3e, 0x00000b47, 0x80000b57, - 0x00000b21, 0x80000b3c, 0x00000b22, 0x80000b3c, - 0x00000b92, 0x80000bd7, 0x00000bc6, 0x80000bbe, - 0x00000bc7, 0x80000bbe, 0x00000bc6, 0x80000bd7, - 0x00000c46, 0x80000c56, 0x00000cbf, 0x80000cd5, - 0x00000cc6, 0x80000cd5, 0x00000cc6, 0x80000cd6, - 0x00000cc6, 0x80000cc2, 0x00000cca, 0x80000cd5, - 0x00000d46, 0x80000d3e, 0x00000d47, 0x80000d3e, - 0x00000d46, 0x80000d57, 0x00000dd9, 0x80000dca, - 0x00000dd9, 0x80000dcf, 0x00000ddc, 0x80000dca, - 0x00000dd9, 0x80000ddf, 0x00000e4d, 0x80000e32, - 0x00000ecd, 0x80000eb2, 0x00000eab, 0x80000e99, - 0x00000eab, 0x80000ea1, 0x80000f0b, 0x00000f42, - 0x80000fb7, 0x00000f4c, 0x80000fb7, 0x00000f51, - 0x80000fb7, 0x00000f56, 0x80000fb7, 0x00000f5b, - 0x80000fb7, 0x00000f40, 0x80000fb5, 0x00000f71, - 0x80000f72, 0x00000f71, 0x80000f74, 0x00000fb2, - 0x80000f80, 0x00000fb2, 0x80000f81, 0x00000fb3, - 0x80000f80, 0x00000fb3, 0x80000f81, 0x00000f71, - 0x80000f80, 0x00000f92, 0x80000fb7, 0x00000f9c, - 0x80000fb7, 0x00000fa1, 0x80000fb7, 0x00000fa6, - 0x80000fb7, 0x00000fab, 0x80000fb7, 0x00000f90, - 0x80000fb5, 0x00001025, 0x8000102e, 0x00000041, - 0x80000325, 0x00000061, 0x80000325, 0x00000042, - 0x80000307, 0x00000062, 0x80000307, 0x00000042, - 0x80000323, 0x00000062, 0x80000323, 0x00000042, - 0x80000331, 0x00000062, 0x80000331, 0x000000c7, - 0x80000301, 0x000000e7, 0x80000301, 0x00000044, - 0x80000307, 0x00000064, 0x80000307, 0x00000044, - 0x80000323, 0x00000064, 0x80000323, 0x00000044, - 0x80000331, 0x00000064, 0x80000331, 0x00000044, - 0x80000327, 0x00000064, 0x80000327, 0x00000044, - 0x8000032d, 0x00000064, 0x8000032d, 0x00000112, - 0x80000300, 0x00000113, 0x80000300, 0x00000112, - 0x80000301, 0x00000113, 0x80000301, 0x00000045, - 0x8000032d, 0x00000065, 0x8000032d, 0x00000045, - 0x80000330, 0x00000065, 0x80000330, 0x00000228, - 0x80000306, 0x00000229, 0x80000306, 0x00000046, - 0x80000307, 0x00000066, 0x80000307, 0x00000047, - 0x80000304, 0x00000067, 0x80000304, 0x00000048, - 0x80000307, 0x00000068, 0x80000307, 0x00000048, - 0x80000323, 0x00000068, 0x80000323, 0x00000048, - 0x80000308, 0x00000068, 0x80000308, 0x00000048, - 0x80000327, 0x00000068, 0x80000327, 0x00000048, - 0x8000032e, 0x00000068, 0x8000032e, 0x00000049, - 0x80000330, 0x00000069, 0x80000330, 0x000000cf, - 0x80000301, 0x000000ef, 0x80000301, 0x0000004b, - 0x80000301, 0x0000006b, 0x80000301, 0x0000004b, - 0x80000323, 0x0000006b, 0x80000323, 0x0000004b, - 0x80000331, 0x0000006b, 0x80000331, 0x0000004c, - 0x80000323, 0x0000006c, 0x80000323, 0x00001e36, - 0x80000304, 0x00001e37, 0x80000304, 0x0000004c, - 0x80000331, 0x0000006c, 0x80000331, 0x0000004c, - 0x8000032d, 0x0000006c, 0x8000032d, 0x0000004d, - 0x80000301, 0x0000006d, 0x80000301, 0x0000004d, - 0x80000307, 0x0000006d, 0x80000307, 0x0000004d, - 0x80000323, 0x0000006d, 0x80000323, 0x0000004e, - 0x80000307, 0x0000006e, 0x80000307, 0x0000004e, - 0x80000323, 0x0000006e, 0x80000323, 0x0000004e, - 0x80000331, 0x0000006e, 0x80000331, 0x0000004e, - 0x8000032d, 0x0000006e, 0x8000032d, 0x000000d5, - 0x80000301, 0x000000f5, 0x80000301, 0x000000d5, - 0x80000308, 0x000000f5, 0x80000308, 0x0000014c, - 0x80000300, 0x0000014d, 0x80000300, 0x0000014c, - 0x80000301, 0x0000014d, 0x80000301, 0x00000050, - 0x80000301, 0x00000070, 0x80000301, 0x00000050, - 0x80000307, 0x00000070, 0x80000307, 0x00000052, - 0x80000307, 0x00000072, 0x80000307, 0x00000052, - 0x80000323, 0x00000072, 0x80000323, 0x00001e5a, - 0x80000304, 0x00001e5b, 0x80000304, 0x00000052, - 0x80000331, 0x00000072, 0x80000331, 0x00000053, - 0x80000307, 0x00000073, 0x80000307, 0x00000053, - 0x80000323, 0x00000073, 0x80000323, 0x0000015a, - 0x80000307, 0x0000015b, 0x80000307, 0x00000160, - 0x80000307, 0x00000161, 0x80000307, 0x00001e62, - 0x80000307, 0x00001e63, 0x80000307, 0x00000054, - 0x80000307, 0x00000074, 0x80000307, 0x00000054, - 0x80000323, 0x00000074, 0x80000323, 0x00000054, - 0x80000331, 0x00000074, 0x80000331, 0x00000054, - 0x8000032d, 0x00000074, 0x8000032d, 0x00000055, - 0x80000324, 0x00000075, 0x80000324, 0x00000055, - 0x80000330, 0x00000075, 0x80000330, 0x00000055, - 0x8000032d, 0x00000075, 0x8000032d, 0x00000168, - 0x80000301, 0x00000169, 0x80000301, 0x0000016a, - 0x80000308, 0x0000016b, 0x80000308, 0x00000056, - 0x80000303, 0x00000076, 0x80000303, 0x00000056, - 0x80000323, 0x00000076, 0x80000323, 0x00000057, - 0x80000300, 0x00000077, 0x80000300, 0x00000057, - 0x80000301, 0x00000077, 0x80000301, 0x00000057, - 0x80000308, 0x00000077, 0x80000308, 0x00000057, - 0x80000307, 0x00000077, 0x80000307, 0x00000057, - 0x80000323, 0x00000077, 0x80000323, 0x00000058, - 0x80000307, 0x00000078, 0x80000307, 0x00000058, - 0x80000308, 0x00000078, 0x80000308, 0x00000059, - 0x80000307, 0x00000079, 0x80000307, 0x0000005a, - 0x80000302, 0x0000007a, 0x80000302, 0x0000005a, - 0x80000323, 0x0000007a, 0x80000323, 0x0000005a, - 0x80000331, 0x0000007a, 0x80000331, 0x00000068, - 0x80000331, 0x00000074, 0x80000308, 0x00000077, - 0x8000030a, 0x00000079, 0x8000030a, 0x00000061, - 0x800002be, 0x0000017f, 0x80000307, 0x00000041, - 0x80000323, 0x00000061, 0x80000323, 0x00000041, - 0x80000309, 0x00000061, 0x80000309, 0x000000c2, - 0x80000301, 0x000000e2, 0x80000301, 0x000000c2, - 0x80000300, 0x000000e2, 0x80000300, 0x000000c2, - 0x80000309, 0x000000e2, 0x80000309, 0x000000c2, - 0x80000303, 0x000000e2, 0x80000303, 0x00001ea0, - 0x80000302, 0x00001ea1, 0x80000302, 0x00000102, - 0x80000301, 0x00000103, 0x80000301, 0x00000102, - 0x80000300, 0x00000103, 0x80000300, 0x00000102, - 0x80000309, 0x00000103, 0x80000309, 0x00000102, - 0x80000303, 0x00000103, 0x80000303, 0x00001ea0, - 0x80000306, 0x00001ea1, 0x80000306, 0x00000045, - 0x80000323, 0x00000065, 0x80000323, 0x00000045, - 0x80000309, 0x00000065, 0x80000309, 0x00000045, - 0x80000303, 0x00000065, 0x80000303, 0x000000ca, - 0x80000301, 0x000000ea, 0x80000301, 0x000000ca, - 0x80000300, 0x000000ea, 0x80000300, 0x000000ca, - 0x80000309, 0x000000ea, 0x80000309, 0x000000ca, - 0x80000303, 0x000000ea, 0x80000303, 0x00001eb8, - 0x80000302, 0x00001eb9, 0x80000302, 0x00000049, - 0x80000309, 0x00000069, 0x80000309, 0x00000049, - 0x80000323, 0x00000069, 0x80000323, 0x0000004f, - 0x80000323, 0x0000006f, 0x80000323, 0x0000004f, - 0x80000309, 0x0000006f, 0x80000309, 0x000000d4, - 0x80000301, 0x000000f4, 0x80000301, 0x000000d4, - 0x80000300, 0x000000f4, 0x80000300, 0x000000d4, - 0x80000309, 0x000000f4, 0x80000309, 0x000000d4, - 0x80000303, 0x000000f4, 0x80000303, 0x00001ecc, - 0x80000302, 0x00001ecd, 0x80000302, 0x000001a0, - 0x80000301, 0x000001a1, 0x80000301, 0x000001a0, - 0x80000300, 0x000001a1, 0x80000300, 0x000001a0, - 0x80000309, 0x000001a1, 0x80000309, 0x000001a0, - 0x80000303, 0x000001a1, 0x80000303, 0x000001a0, - 0x80000323, 0x000001a1, 0x80000323, 0x00000055, - 0x80000323, 0x00000075, 0x80000323, 0x00000055, - 0x80000309, 0x00000075, 0x80000309, 0x000001af, - 0x80000301, 0x000001b0, 0x80000301, 0x000001af, - 0x80000300, 0x000001b0, 0x80000300, 0x000001af, - 0x80000309, 0x000001b0, 0x80000309, 0x000001af, - 0x80000303, 0x000001b0, 0x80000303, 0x000001af, - 0x80000323, 0x000001b0, 0x80000323, 0x00000059, - 0x80000300, 0x00000079, 0x80000300, 0x00000059, - 0x80000323, 0x00000079, 0x80000323, 0x00000059, - 0x80000309, 0x00000079, 0x80000309, 0x00000059, - 0x80000303, 0x00000079, 0x80000303, 0x000003b1, - 0x80000313, 0x000003b1, 0x80000314, 0x00001f00, - 0x80000300, 0x00001f01, 0x80000300, 0x00001f00, - 0x80000301, 0x00001f01, 0x80000301, 0x00001f00, - 0x80000342, 0x00001f01, 0x80000342, 0x00000391, - 0x80000313, 0x00000391, 0x80000314, 0x00001f08, - 0x80000300, 0x00001f09, 0x80000300, 0x00001f08, - 0x80000301, 0x00001f09, 0x80000301, 0x00001f08, - 0x80000342, 0x00001f09, 0x80000342, 0x000003b5, - 0x80000313, 0x000003b5, 0x80000314, 0x00001f10, - 0x80000300, 0x00001f11, 0x80000300, 0x00001f10, - 0x80000301, 0x00001f11, 0x80000301, 0x00000395, - 0x80000313, 0x00000395, 0x80000314, 0x00001f18, - 0x80000300, 0x00001f19, 0x80000300, 0x00001f18, - 0x80000301, 0x00001f19, 0x80000301, 0x000003b7, - 0x80000313, 0x000003b7, 0x80000314, 0x00001f20, - 0x80000300, 0x00001f21, 0x80000300, 0x00001f20, - 0x80000301, 0x00001f21, 0x80000301, 0x00001f20, - 0x80000342, 0x00001f21, 0x80000342, 0x00000397, - 0x80000313, 0x00000397, 0x80000314, 0x00001f28, - 0x80000300, 0x00001f29, 0x80000300, 0x00001f28, - 0x80000301, 0x00001f29, 0x80000301, 0x00001f28, - 0x80000342, 0x00001f29, 0x80000342, 0x000003b9, - 0x80000313, 0x000003b9, 0x80000314, 0x00001f30, - 0x80000300, 0x00001f31, 0x80000300, 0x00001f30, - 0x80000301, 0x00001f31, 0x80000301, 0x00001f30, - 0x80000342, 0x00001f31, 0x80000342, 0x00000399, - 0x80000313, 0x00000399, 0x80000314, 0x00001f38, - 0x80000300, 0x00001f39, 0x80000300, 0x00001f38, - 0x80000301, 0x00001f39, 0x80000301, 0x00001f38, - 0x80000342, 0x00001f39, 0x80000342, 0x000003bf, - 0x80000313, 0x000003bf, 0x80000314, 0x00001f40, - 0x80000300, 0x00001f41, 0x80000300, 0x00001f40, - 0x80000301, 0x00001f41, 0x80000301, 0x0000039f, - 0x80000313, 0x0000039f, 0x80000314, 0x00001f48, - 0x80000300, 0x00001f49, 0x80000300, 0x00001f48, - 0x80000301, 0x00001f49, 0x80000301, 0x000003c5, - 0x80000313, 0x000003c5, 0x80000314, 0x00001f50, - 0x80000300, 0x00001f51, 0x80000300, 0x00001f50, - 0x80000301, 0x00001f51, 0x80000301, 0x00001f50, - 0x80000342, 0x00001f51, 0x80000342, 0x000003a5, - 0x80000314, 0x00001f59, 0x80000300, 0x00001f59, - 0x80000301, 0x00001f59, 0x80000342, 0x000003c9, - 0x80000313, 0x000003c9, 0x80000314, 0x00001f60, - 0x80000300, 0x00001f61, 0x80000300, 0x00001f60, - 0x80000301, 0x00001f61, 0x80000301, 0x00001f60, - 0x80000342, 0x00001f61, 0x80000342, 0x000003a9, - 0x80000313, 0x000003a9, 0x80000314, 0x00001f68, - 0x80000300, 0x00001f69, 0x80000300, 0x00001f68, - 0x80000301, 0x00001f69, 0x80000301, 0x00001f68, - 0x80000342, 0x00001f69, 0x80000342, 0x000003b1, - 0x80000300, 0x800003ac, 0x000003b5, 0x80000300, - 0x800003ad, 0x000003b7, 0x80000300, 0x800003ae, - 0x000003b9, 0x80000300, 0x800003af, 0x000003bf, - 0x80000300, 0x800003cc, 0x000003c5, 0x80000300, - 0x800003cd, 0x000003c9, 0x80000300, 0x800003ce, - 0x00001f00, 0x80000345, 0x00001f01, 0x80000345, - 0x00001f02, 0x80000345, 0x00001f03, 0x80000345, - 0x00001f04, 0x80000345, 0x00001f05, 0x80000345, - 0x00001f06, 0x80000345, 0x00001f07, 0x80000345, - 0x00001f08, 0x80000345, 0x00001f09, 0x80000345, - 0x00001f0a, 0x80000345, 0x00001f0b, 0x80000345, - 0x00001f0c, 0x80000345, 0x00001f0d, 0x80000345, - 0x00001f0e, 0x80000345, 0x00001f0f, 0x80000345, - 0x00001f20, 0x80000345, 0x00001f21, 0x80000345, - 0x00001f22, 0x80000345, 0x00001f23, 0x80000345, - 0x00001f24, 0x80000345, 0x00001f25, 0x80000345, - 0x00001f26, 0x80000345, 0x00001f27, 0x80000345, - 0x00001f28, 0x80000345, 0x00001f29, 0x80000345, - 0x00001f2a, 0x80000345, 0x00001f2b, 0x80000345, - 0x00001f2c, 0x80000345, 0x00001f2d, 0x80000345, - 0x00001f2e, 0x80000345, 0x00001f2f, 0x80000345, - 0x00001f60, 0x80000345, 0x00001f61, 0x80000345, - 0x00001f62, 0x80000345, 0x00001f63, 0x80000345, - 0x00001f64, 0x80000345, 0x00001f65, 0x80000345, - 0x00001f66, 0x80000345, 0x00001f67, 0x80000345, - 0x00001f68, 0x80000345, 0x00001f69, 0x80000345, - 0x00001f6a, 0x80000345, 0x00001f6b, 0x80000345, - 0x00001f6c, 0x80000345, 0x00001f6d, 0x80000345, - 0x00001f6e, 0x80000345, 0x00001f6f, 0x80000345, - 0x000003b1, 0x80000306, 0x000003b1, 0x80000304, - 0x00001f70, 0x80000345, 0x000003b1, 0x80000345, - 0x000003ac, 0x80000345, 0x000003b1, 0x80000342, - 0x00001fb6, 0x80000345, 0x00000391, 0x80000306, - 0x00000391, 0x80000304, 0x00000391, 0x80000300, - 0x80000386, 0x00000391, 0x80000345, 0x00000020, - 0x80000313, 0x800003b9, 0x00000020, 0x80000313, - 0x00000020, 0x80000342, 0x000000a8, 0x80000342, - 0x00001f74, 0x80000345, 0x000003b7, 0x80000345, - 0x000003ae, 0x80000345, 0x000003b7, 0x80000342, - 0x00001fc6, 0x80000345, 0x00000395, 0x80000300, - 0x80000388, 0x00000397, 0x80000300, 0x80000389, - 0x00000397, 0x80000345, 0x00001fbf, 0x80000300, - 0x00001fbf, 0x80000301, 0x00001fbf, 0x80000342, - 0x000003b9, 0x80000306, 0x000003b9, 0x80000304, - 0x000003ca, 0x80000300, 0x80000390, 0x000003b9, - 0x80000342, 0x000003ca, 0x80000342, 0x00000399, - 0x80000306, 0x00000399, 0x80000304, 0x00000399, - 0x80000300, 0x8000038a, 0x00001ffe, 0x80000300, - 0x00001ffe, 0x80000301, 0x00001ffe, 0x80000342, - 0x000003c5, 0x80000306, 0x000003c5, 0x80000304, - 0x000003cb, 0x80000300, 0x800003b0, 0x000003c1, - 0x80000313, 0x000003c1, 0x80000314, 0x000003c5, - 0x80000342, 0x000003cb, 0x80000342, 0x000003a5, - 0x80000306, 0x000003a5, 0x80000304, 0x000003a5, - 0x80000300, 0x8000038e, 0x000003a1, 0x80000314, - 0x000000a8, 0x80000300, 0x80000385, 0x80000060, - 0x00001f7c, 0x80000345, 0x000003c9, 0x80000345, - 0x000003ce, 0x80000345, 0x000003c9, 0x80000342, - 0x00001ff6, 0x80000345, 0x0000039f, 0x80000300, - 0x8000038c, 0x000003a9, 0x80000300, 0x8000038f, - 0x000003a9, 0x80000345, 0x800000b4, 0x00000020, - 0x80000314, 0x80002002, 0x80002003, 0x80000020, - 0x80000020, 0x80000020, 0x80000020, 0x80000020, - 0x80000020, 0x80000020, 0x80000020, 0x80000020, - 0x80002010, 0x00000020, 0x80000333, 0x8000002e, - 0x0000002e, 0x8000002e, 0x0000002e, 0x0000002e, - 0x8000002e, 0x80000020, 0x00002032, 0x80002032, - 0x00002032, 0x00002032, 0x80002032, 0x00002035, - 0x80002035, 0x00002035, 0x00002035, 0x80002035, - 0x00000021, 0x80000021, 0x00000020, 0x80000305, - 0x0000003f, 0x80000021, 0x00000021, 0x8000003f, - 0x80000030, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x8000002b, - 0x80002212, 0x8000003d, 0x80000028, 0x80000029, - 0x8000006e, 0x80000030, 0x80000031, 0x80000032, - 0x80000033, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x8000002b, - 0x80002212, 0x8000003d, 0x80000028, 0x80000029, - 0x00000052, 0x80000073, 0x00000061, 0x0000002f, - 0x80000063, 0x00000061, 0x0000002f, 0x80000073, - 0x80000043, 0x000000b0, 0x80000043, 0x00000063, - 0x0000002f, 0x8000006f, 0x00000063, 0x0000002f, - 0x80000075, 0x80000190, 0x000000b0, 0x80000046, - 0x80000067, 0x80000048, 0x80000048, 0x80000048, - 0x80000068, 0x80000127, 0x80000049, 0x80000049, - 0x8000004c, 0x8000006c, 0x8000004e, 0x0000004e, - 0x8000006f, 0x80000050, 0x80000051, 0x80000052, - 0x80000052, 0x80000052, 0x00000053, 0x8000004d, - 0x00000054, 0x00000045, 0x8000004c, 0x00000054, - 0x8000004d, 0x8000005a, 0x800003a9, 0x8000005a, - 0x8000004b, 0x800000c5, 0x80000042, 0x80000043, - 0x80000065, 0x80000045, 0x80000046, 0x8000004d, - 0x8000006f, 0x800005d0, 0x800005d1, 0x800005d2, - 0x800005d3, 0x80000069, 0x00000031, 0x00002044, - 0x80000033, 0x00000032, 0x00002044, 0x80000033, - 0x00000031, 0x00002044, 0x80000035, 0x00000032, - 0x00002044, 0x80000035, 0x00000033, 0x00002044, - 0x80000035, 0x00000034, 0x00002044, 0x80000035, - 0x00000031, 0x00002044, 0x80000036, 0x00000035, - 0x00002044, 0x80000036, 0x00000031, 0x00002044, - 0x80000038, 0x00000033, 0x00002044, 0x80000038, - 0x00000035, 0x00002044, 0x80000038, 0x00000037, - 0x00002044, 0x80000038, 0x00000031, 0x80002044, - 0x80000049, 0x00000049, 0x80000049, 0x00000049, - 0x00000049, 0x80000049, 0x00000049, 0x80000056, - 0x80000056, 0x00000056, 0x80000049, 0x00000056, - 0x00000049, 0x80000049, 0x00000056, 0x00000049, - 0x00000049, 0x80000049, 0x00000049, 0x80000058, - 0x80000058, 0x00000058, 0x80000049, 0x00000058, - 0x00000049, 0x80000049, 0x8000004c, 0x80000043, - 0x80000044, 0x8000004d, 0x80000069, 0x00000069, - 0x80000069, 0x00000069, 0x00000069, 0x80000069, - 0x00000069, 0x80000076, 0x80000076, 0x00000076, - 0x80000069, 0x00000076, 0x00000069, 0x80000069, - 0x00000076, 0x00000069, 0x00000069, 0x80000069, - 0x00000069, 0x80000078, 0x80000078, 0x00000078, - 0x80000069, 0x00000078, 0x00000069, 0x80000069, - 0x8000006c, 0x80000063, 0x80000064, 0x8000006d, - 0x00002190, 0x80000338, 0x00002192, 0x80000338, - 0x00002194, 0x80000338, 0x000021d0, 0x80000338, - 0x000021d4, 0x80000338, 0x000021d2, 0x80000338, - 0x00002203, 0x80000338, 0x00002208, 0x80000338, - 0x0000220b, 0x80000338, 0x00002223, 0x80000338, - 0x00002225, 0x80000338, 0x0000222b, 0x8000222b, - 0x0000222b, 0x0000222b, 0x8000222b, 0x0000222e, - 0x8000222e, 0x0000222e, 0x0000222e, 0x8000222e, - 0x0000223c, 0x80000338, 0x00002243, 0x80000338, - 0x00002245, 0x80000338, 0x00002248, 0x80000338, - 0x0000003d, 0x80000338, 0x00002261, 0x80000338, - 0x0000224d, 0x80000338, 0x0000003c, 0x80000338, - 0x0000003e, 0x80000338, 0x00002264, 0x80000338, - 0x00002265, 0x80000338, 0x00002272, 0x80000338, - 0x00002273, 0x80000338, 0x00002276, 0x80000338, - 0x00002277, 0x80000338, 0x0000227a, 0x80000338, - 0x0000227b, 0x80000338, 0x00002282, 0x80000338, - 0x00002283, 0x80000338, 0x00002286, 0x80000338, - 0x00002287, 0x80000338, 0x000022a2, 0x80000338, - 0x000022a8, 0x80000338, 0x000022a9, 0x80000338, - 0x000022ab, 0x80000338, 0x0000227c, 0x80000338, - 0x0000227d, 0x80000338, 0x00002291, 0x80000338, - 0x00002292, 0x80000338, 0x000022b2, 0x80000338, - 0x000022b3, 0x80000338, 0x000022b4, 0x80000338, - 0x000022b5, 0x80000338, 0x80003008, 0x80003009, - 0x80000031, 0x80000032, 0x80000033, 0x80000034, - 0x80000035, 0x80000036, 0x80000037, 0x80000038, - 0x80000039, 0x00000031, 0x80000030, 0x00000031, - 0x80000031, 0x00000031, 0x80000032, 0x00000031, - 0x80000033, 0x00000031, 0x80000034, 0x00000031, - 0x80000035, 0x00000031, 0x80000036, 0x00000031, - 0x80000037, 0x00000031, 0x80000038, 0x00000031, - 0x80000039, 0x00000032, 0x80000030, 0x00000028, - 0x00000031, 0x80000029, 0x00000028, 0x00000032, - 0x80000029, 0x00000028, 0x00000033, 0x80000029, - 0x00000028, 0x00000034, 0x80000029, 0x00000028, - 0x00000035, 0x80000029, 0x00000028, 0x00000036, - 0x80000029, 0x00000028, 0x00000037, 0x80000029, - 0x00000028, 0x00000038, 0x80000029, 0x00000028, - 0x00000039, 0x80000029, 0x00000028, 0x00000031, - 0x00000030, 0x80000029, 0x00000028, 0x00000031, - 0x00000031, 0x80000029, 0x00000028, 0x00000031, - 0x00000032, 0x80000029, 0x00000028, 0x00000031, - 0x00000033, 0x80000029, 0x00000028, 0x00000031, - 0x00000034, 0x80000029, 0x00000028, 0x00000031, - 0x00000035, 0x80000029, 0x00000028, 0x00000031, - 0x00000036, 0x80000029, 0x00000028, 0x00000031, - 0x00000037, 0x80000029, 0x00000028, 0x00000031, - 0x00000038, 0x80000029, 0x00000028, 0x00000031, - 0x00000039, 0x80000029, 0x00000028, 0x00000032, - 0x00000030, 0x80000029, 0x00000031, 0x8000002e, - 0x00000032, 0x8000002e, 0x00000033, 0x8000002e, - 0x00000034, 0x8000002e, 0x00000035, 0x8000002e, - 0x00000036, 0x8000002e, 0x00000037, 0x8000002e, - 0x00000038, 0x8000002e, 0x00000039, 0x8000002e, - 0x00000031, 0x00000030, 0x8000002e, 0x00000031, - 0x00000031, 0x8000002e, 0x00000031, 0x00000032, - 0x8000002e, 0x00000031, 0x00000033, 0x8000002e, - 0x00000031, 0x00000034, 0x8000002e, 0x00000031, - 0x00000035, 0x8000002e, 0x00000031, 0x00000036, - 0x8000002e, 0x00000031, 0x00000037, 0x8000002e, - 0x00000031, 0x00000038, 0x8000002e, 0x00000031, - 0x00000039, 0x8000002e, 0x00000032, 0x00000030, - 0x8000002e, 0x00000028, 0x00000061, 0x80000029, - 0x00000028, 0x00000062, 0x80000029, 0x00000028, - 0x00000063, 0x80000029, 0x00000028, 0x00000064, - 0x80000029, 0x00000028, 0x00000065, 0x80000029, - 0x00000028, 0x00000066, 0x80000029, 0x00000028, - 0x00000067, 0x80000029, 0x00000028, 0x00000068, - 0x80000029, 0x00000028, 0x00000069, 0x80000029, - 0x00000028, 0x0000006a, 0x80000029, 0x00000028, - 0x0000006b, 0x80000029, 0x00000028, 0x0000006c, - 0x80000029, 0x00000028, 0x0000006d, 0x80000029, - 0x00000028, 0x0000006e, 0x80000029, 0x00000028, - 0x0000006f, 0x80000029, 0x00000028, 0x00000070, - 0x80000029, 0x00000028, 0x00000071, 0x80000029, - 0x00000028, 0x00000072, 0x80000029, 0x00000028, - 0x00000073, 0x80000029, 0x00000028, 0x00000074, - 0x80000029, 0x00000028, 0x00000075, 0x80000029, - 0x00000028, 0x00000076, 0x80000029, 0x00000028, - 0x00000077, 0x80000029, 0x00000028, 0x00000078, - 0x80000029, 0x00000028, 0x00000079, 0x80000029, - 0x00000028, 0x0000007a, 0x80000029, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000030, - 0x80006bcd, 0x80009f9f, 0x80004e00, 0x80004e28, - 0x80004e36, 0x80004e3f, 0x80004e59, 0x80004e85, - 0x80004e8c, 0x80004ea0, 0x80004eba, 0x8000513f, - 0x80005165, 0x8000516b, 0x80005182, 0x80005196, - 0x800051ab, 0x800051e0, 0x800051f5, 0x80005200, - 0x8000529b, 0x800052f9, 0x80005315, 0x8000531a, - 0x80005338, 0x80005341, 0x8000535c, 0x80005369, - 0x80005382, 0x800053b6, 0x800053c8, 0x800053e3, - 0x800056d7, 0x8000571f, 0x800058eb, 0x80005902, - 0x8000590a, 0x80005915, 0x80005927, 0x80005973, - 0x80005b50, 0x80005b80, 0x80005bf8, 0x80005c0f, - 0x80005c22, 0x80005c38, 0x80005c6e, 0x80005c71, - 0x80005ddb, 0x80005de5, 0x80005df1, 0x80005dfe, - 0x80005e72, 0x80005e7a, 0x80005e7f, 0x80005ef4, - 0x80005efe, 0x80005f0b, 0x80005f13, 0x80005f50, - 0x80005f61, 0x80005f73, 0x80005fc3, 0x80006208, - 0x80006236, 0x8000624b, 0x8000652f, 0x80006534, - 0x80006587, 0x80006597, 0x800065a4, 0x800065b9, - 0x800065e0, 0x800065e5, 0x800066f0, 0x80006708, - 0x80006728, 0x80006b20, 0x80006b62, 0x80006b79, - 0x80006bb3, 0x80006bcb, 0x80006bd4, 0x80006bdb, - 0x80006c0f, 0x80006c14, 0x80006c34, 0x8000706b, - 0x8000722a, 0x80007236, 0x8000723b, 0x8000723f, - 0x80007247, 0x80007259, 0x8000725b, 0x800072ac, - 0x80007384, 0x80007389, 0x800074dc, 0x800074e6, - 0x80007518, 0x8000751f, 0x80007528, 0x80007530, - 0x8000758b, 0x80007592, 0x80007676, 0x8000767d, - 0x800076ae, 0x800076bf, 0x800076ee, 0x800077db, - 0x800077e2, 0x800077f3, 0x8000793a, 0x800079b8, - 0x800079be, 0x80007a74, 0x80007acb, 0x80007af9, - 0x80007c73, 0x80007cf8, 0x80007f36, 0x80007f51, - 0x80007f8a, 0x80007fbd, 0x80008001, 0x8000800c, - 0x80008012, 0x80008033, 0x8000807f, 0x80008089, - 0x800081e3, 0x800081ea, 0x800081f3, 0x800081fc, - 0x8000820c, 0x8000821b, 0x8000821f, 0x8000826e, - 0x80008272, 0x80008278, 0x8000864d, 0x8000866b, - 0x80008840, 0x8000884c, 0x80008863, 0x8000897e, - 0x8000898b, 0x800089d2, 0x80008a00, 0x80008c37, - 0x80008c46, 0x80008c55, 0x80008c78, 0x80008c9d, - 0x80008d64, 0x80008d70, 0x80008db3, 0x80008eab, - 0x80008eca, 0x80008f9b, 0x80008fb0, 0x80008fb5, - 0x80009091, 0x80009149, 0x800091c6, 0x800091cc, - 0x800091d1, 0x80009577, 0x80009580, 0x8000961c, - 0x800096b6, 0x800096b9, 0x800096e8, 0x80009751, - 0x8000975e, 0x80009762, 0x80009769, 0x800097cb, - 0x800097ed, 0x800097f3, 0x80009801, 0x800098a8, - 0x800098db, 0x800098df, 0x80009996, 0x80009999, - 0x800099ac, 0x80009aa8, 0x80009ad8, 0x80009adf, - 0x80009b25, 0x80009b2f, 0x80009b32, 0x80009b3c, - 0x80009b5a, 0x80009ce5, 0x80009e75, 0x80009e7f, - 0x80009ea5, 0x80009ebb, 0x80009ec3, 0x80009ecd, - 0x80009ed1, 0x80009ef9, 0x80009efd, 0x80009f0e, - 0x80009f13, 0x80009f20, 0x80009f3b, 0x80009f4a, - 0x80009f52, 0x80009f8d, 0x80009f9c, 0x80009fa0, - 0x80000020, 0x80003012, 0x80005341, 0x80005344, - 0x80005345, 0x0000304b, 0x80003099, 0x0000304d, - 0x80003099, 0x0000304f, 0x80003099, 0x00003051, - 0x80003099, 0x00003053, 0x80003099, 0x00003055, - 0x80003099, 0x00003057, 0x80003099, 0x00003059, - 0x80003099, 0x0000305b, 0x80003099, 0x0000305d, - 0x80003099, 0x0000305f, 0x80003099, 0x00003061, - 0x80003099, 0x00003064, 0x80003099, 0x00003066, - 0x80003099, 0x00003068, 0x80003099, 0x0000306f, - 0x80003099, 0x0000306f, 0x8000309a, 0x00003072, - 0x80003099, 0x00003072, 0x8000309a, 0x00003075, - 0x80003099, 0x00003075, 0x8000309a, 0x00003078, - 0x80003099, 0x00003078, 0x8000309a, 0x0000307b, - 0x80003099, 0x0000307b, 0x8000309a, 0x00003046, - 0x80003099, 0x00000020, 0x80003099, 0x00000020, - 0x8000309a, 0x0000309d, 0x80003099, 0x000030ab, - 0x80003099, 0x000030ad, 0x80003099, 0x000030af, - 0x80003099, 0x000030b1, 0x80003099, 0x000030b3, - 0x80003099, 0x000030b5, 0x80003099, 0x000030b7, - 0x80003099, 0x000030b9, 0x80003099, 0x000030bb, - 0x80003099, 0x000030bd, 0x80003099, 0x000030bf, - 0x80003099, 0x000030c1, 0x80003099, 0x000030c4, - 0x80003099, 0x000030c6, 0x80003099, 0x000030c8, - 0x80003099, 0x000030cf, 0x80003099, 0x000030cf, - 0x8000309a, 0x000030d2, 0x80003099, 0x000030d2, - 0x8000309a, 0x000030d5, 0x80003099, 0x000030d5, - 0x8000309a, 0x000030d8, 0x80003099, 0x000030d8, - 0x8000309a, 0x000030db, 0x80003099, 0x000030db, - 0x8000309a, 0x000030a6, 0x80003099, 0x000030ef, - 0x80003099, 0x000030f0, 0x80003099, 0x000030f1, - 0x80003099, 0x000030f2, 0x80003099, 0x000030fd, - 0x80003099, 0x80001100, 0x80001101, 0x800011aa, - 0x80001102, 0x800011ac, 0x800011ad, 0x80001103, - 0x80001104, 0x80001105, 0x800011b0, 0x800011b1, - 0x800011b2, 0x800011b3, 0x800011b4, 0x800011b5, - 0x8000111a, 0x80001106, 0x80001107, 0x80001108, - 0x80001121, 0x80001109, 0x8000110a, 0x8000110b, - 0x8000110c, 0x8000110d, 0x8000110e, 0x8000110f, - 0x80001110, 0x80001111, 0x80001112, 0x80001161, - 0x80001162, 0x80001163, 0x80001164, 0x80001165, - 0x80001166, 0x80001167, 0x80001168, 0x80001169, - 0x8000116a, 0x8000116b, 0x8000116c, 0x8000116d, - 0x8000116e, 0x8000116f, 0x80001170, 0x80001171, - 0x80001172, 0x80001173, 0x80001174, 0x80001175, - 0x80001160, 0x80001114, 0x80001115, 0x800011c7, - 0x800011c8, 0x800011cc, 0x800011ce, 0x800011d3, - 0x800011d7, 0x800011d9, 0x8000111c, 0x800011dd, - 0x800011df, 0x8000111d, 0x8000111e, 0x80001120, - 0x80001122, 0x80001123, 0x80001127, 0x80001129, - 0x8000112b, 0x8000112c, 0x8000112d, 0x8000112e, - 0x8000112f, 0x80001132, 0x80001136, 0x80001140, - 0x80001147, 0x8000114c, 0x800011f1, 0x800011f2, - 0x80001157, 0x80001158, 0x80001159, 0x80001184, - 0x80001185, 0x80001188, 0x80001191, 0x80001192, - 0x80001194, 0x8000119e, 0x800011a1, 0x80004e00, - 0x80004e8c, 0x80004e09, 0x800056db, 0x80004e0a, - 0x80004e2d, 0x80004e0b, 0x80007532, 0x80004e59, - 0x80004e19, 0x80004e01, 0x80005929, 0x80005730, - 0x80004eba, 0x00000028, 0x00001100, 0x80000029, - 0x00000028, 0x00001102, 0x80000029, 0x00000028, - 0x00001103, 0x80000029, 0x00000028, 0x00001105, - 0x80000029, 0x00000028, 0x00001106, 0x80000029, - 0x00000028, 0x00001107, 0x80000029, 0x00000028, - 0x00001109, 0x80000029, 0x00000028, 0x0000110b, - 0x80000029, 0x00000028, 0x0000110c, 0x80000029, - 0x00000028, 0x0000110e, 0x80000029, 0x00000028, - 0x0000110f, 0x80000029, 0x00000028, 0x00001110, - 0x80000029, 0x00000028, 0x00001111, 0x80000029, - 0x00000028, 0x00001112, 0x80000029, 0x00000028, - 0x00001100, 0x00001161, 0x80000029, 0x00000028, - 0x00001102, 0x00001161, 0x80000029, 0x00000028, - 0x00001103, 0x00001161, 0x80000029, 0x00000028, - 0x00001105, 0x00001161, 0x80000029, 0x00000028, - 0x00001106, 0x00001161, 0x80000029, 0x00000028, - 0x00001107, 0x00001161, 0x80000029, 0x00000028, - 0x00001109, 0x00001161, 0x80000029, 0x00000028, - 0x0000110b, 0x00001161, 0x80000029, 0x00000028, - 0x0000110c, 0x00001161, 0x80000029, 0x00000028, - 0x0000110e, 0x00001161, 0x80000029, 0x00000028, - 0x0000110f, 0x00001161, 0x80000029, 0x00000028, - 0x00001110, 0x00001161, 0x80000029, 0x00000028, - 0x00001111, 0x00001161, 0x80000029, 0x00000028, - 0x00001112, 0x00001161, 0x80000029, 0x00000028, - 0x0000110c, 0x0000116e, 0x80000029, 0x00000028, - 0x00004e00, 0x80000029, 0x00000028, 0x00004e8c, - 0x80000029, 0x00000028, 0x00004e09, 0x80000029, - 0x00000028, 0x000056db, 0x80000029, 0x00000028, - 0x00004e94, 0x80000029, 0x00000028, 0x0000516d, - 0x80000029, 0x00000028, 0x00004e03, 0x80000029, - 0x00000028, 0x0000516b, 0x80000029, 0x00000028, - 0x00004e5d, 0x80000029, 0x00000028, 0x00005341, - 0x80000029, 0x00000028, 0x00006708, 0x80000029, - 0x00000028, 0x0000706b, 0x80000029, 0x00000028, - 0x00006c34, 0x80000029, 0x00000028, 0x00006728, - 0x80000029, 0x00000028, 0x000091d1, 0x80000029, - 0x00000028, 0x0000571f, 0x80000029, 0x00000028, - 0x000065e5, 0x80000029, 0x00000028, 0x0000682a, - 0x80000029, 0x00000028, 0x00006709, 0x80000029, - 0x00000028, 0x0000793e, 0x80000029, 0x00000028, - 0x0000540d, 0x80000029, 0x00000028, 0x00007279, - 0x80000029, 0x00000028, 0x00008ca1, 0x80000029, - 0x00000028, 0x0000795d, 0x80000029, 0x00000028, - 0x000052b4, 0x80000029, 0x00000028, 0x00004ee3, - 0x80000029, 0x00000028, 0x0000547c, 0x80000029, - 0x00000028, 0x00005b66, 0x80000029, 0x00000028, - 0x000076e3, 0x80000029, 0x00000028, 0x00004f01, - 0x80000029, 0x00000028, 0x00008cc7, 0x80000029, - 0x00000028, 0x00005354, 0x80000029, 0x00000028, - 0x0000796d, 0x80000029, 0x00000028, 0x00004f11, - 0x80000029, 0x00000028, 0x000081ea, 0x80000029, - 0x00000028, 0x000081f3, 0x80000029, 0x80001100, - 0x80001102, 0x80001103, 0x80001105, 0x80001106, - 0x80001107, 0x80001109, 0x8000110b, 0x8000110c, - 0x8000110e, 0x8000110f, 0x80001110, 0x80001111, - 0x80001112, 0x00001100, 0x80001161, 0x00001102, - 0x80001161, 0x00001103, 0x80001161, 0x00001105, - 0x80001161, 0x00001106, 0x80001161, 0x00001107, - 0x80001161, 0x00001109, 0x80001161, 0x0000110b, - 0x80001161, 0x0000110c, 0x80001161, 0x0000110e, - 0x80001161, 0x0000110f, 0x80001161, 0x00001110, - 0x80001161, 0x00001111, 0x80001161, 0x00001112, - 0x80001161, 0x80004e00, 0x80004e8c, 0x80004e09, - 0x800056db, 0x80004e94, 0x8000516d, 0x80004e03, - 0x8000516b, 0x80004e5d, 0x80005341, 0x80006708, - 0x8000706b, 0x80006c34, 0x80006728, 0x800091d1, - 0x8000571f, 0x800065e5, 0x8000682a, 0x80006709, - 0x8000793e, 0x8000540d, 0x80007279, 0x80008ca1, - 0x8000795d, 0x800052b4, 0x800079d8, 0x80007537, - 0x80005973, 0x80009069, 0x8000512a, 0x80005370, - 0x80006ce8, 0x80009805, 0x80004f11, 0x80005199, - 0x80006b63, 0x80004e0a, 0x80004e2d, 0x80004e0b, - 0x80005de6, 0x800053f3, 0x8000533b, 0x80005b97, - 0x80005b66, 0x800076e3, 0x80004f01, 0x80008cc7, - 0x80005354, 0x8000591c, 0x00000031, 0x80006708, - 0x00000032, 0x80006708, 0x00000033, 0x80006708, - 0x00000034, 0x80006708, 0x00000035, 0x80006708, - 0x00000036, 0x80006708, 0x00000037, 0x80006708, - 0x00000038, 0x80006708, 0x00000039, 0x80006708, - 0x00000031, 0x00000030, 0x80006708, 0x00000031, - 0x00000031, 0x80006708, 0x00000031, 0x00000032, - 0x80006708, 0x800030a2, 0x800030a4, 0x800030a6, - 0x800030a8, 0x800030aa, 0x800030ab, 0x800030ad, - 0x800030af, 0x800030b1, 0x800030b3, 0x800030b5, - 0x800030b7, 0x800030b9, 0x800030bb, 0x800030bd, - 0x800030bf, 0x800030c1, 0x800030c4, 0x800030c6, - 0x800030c8, 0x800030ca, 0x800030cb, 0x800030cc, - 0x800030cd, 0x800030ce, 0x800030cf, 0x800030d2, - 0x800030d5, 0x800030d8, 0x800030db, 0x800030de, - 0x800030df, 0x800030e0, 0x800030e1, 0x800030e2, - 0x800030e4, 0x800030e6, 0x800030e8, 0x800030e9, - 0x800030ea, 0x800030eb, 0x800030ec, 0x800030ed, - 0x800030ef, 0x800030f0, 0x800030f1, 0x800030f2, - 0x000030a2, 0x000030d1, 0x000030fc, 0x800030c8, - 0x000030a2, 0x000030eb, 0x000030d5, 0x800030a1, - 0x000030a2, 0x000030f3, 0x000030da, 0x800030a2, - 0x000030a2, 0x000030fc, 0x800030eb, 0x000030a4, - 0x000030cb, 0x000030f3, 0x800030b0, 0x000030a4, - 0x000030f3, 0x800030c1, 0x000030a6, 0x000030a9, - 0x800030f3, 0x000030a8, 0x000030b9, 0x000030af, - 0x000030fc, 0x800030c9, 0x000030a8, 0x000030fc, - 0x000030ab, 0x800030fc, 0x000030aa, 0x000030f3, - 0x800030b9, 0x000030aa, 0x000030fc, 0x800030e0, - 0x000030ab, 0x000030a4, 0x800030ea, 0x000030ab, - 0x000030e9, 0x000030c3, 0x800030c8, 0x000030ab, - 0x000030ed, 0x000030ea, 0x800030fc, 0x000030ac, - 0x000030ed, 0x800030f3, 0x000030ac, 0x000030f3, - 0x800030de, 0x000030ae, 0x800030ac, 0x000030ae, - 0x000030cb, 0x800030fc, 0x000030ad, 0x000030e5, - 0x000030ea, 0x800030fc, 0x000030ae, 0x000030eb, - 0x000030c0, 0x800030fc, 0x000030ad, 0x800030ed, - 0x000030ad, 0x000030ed, 0x000030b0, 0x000030e9, - 0x800030e0, 0x000030ad, 0x000030ed, 0x000030e1, - 0x000030fc, 0x000030c8, 0x800030eb, 0x000030ad, - 0x000030ed, 0x000030ef, 0x000030c3, 0x800030c8, - 0x000030b0, 0x000030e9, 0x800030e0, 0x000030b0, - 0x000030e9, 0x000030e0, 0x000030c8, 0x800030f3, - 0x000030af, 0x000030eb, 0x000030bc, 0x000030a4, - 0x800030ed, 0x000030af, 0x000030ed, 0x000030fc, - 0x800030cd, 0x000030b1, 0x000030fc, 0x800030b9, - 0x000030b3, 0x000030eb, 0x800030ca, 0x000030b3, - 0x000030fc, 0x800030dd, 0x000030b5, 0x000030a4, - 0x000030af, 0x800030eb, 0x000030b5, 0x000030f3, - 0x000030c1, 0x000030fc, 0x800030e0, 0x000030b7, - 0x000030ea, 0x000030f3, 0x800030b0, 0x000030bb, - 0x000030f3, 0x800030c1, 0x000030bb, 0x000030f3, - 0x800030c8, 0x000030c0, 0x000030fc, 0x800030b9, - 0x000030c7, 0x800030b7, 0x000030c9, 0x800030eb, - 0x000030c8, 0x800030f3, 0x000030ca, 0x800030ce, - 0x000030ce, 0x000030c3, 0x800030c8, 0x000030cf, - 0x000030a4, 0x800030c4, 0x000030d1, 0x000030fc, - 0x000030bb, 0x000030f3, 0x800030c8, 0x000030d1, - 0x000030fc, 0x800030c4, 0x000030d0, 0x000030fc, - 0x000030ec, 0x800030eb, 0x000030d4, 0x000030a2, - 0x000030b9, 0x000030c8, 0x800030eb, 0x000030d4, - 0x000030af, 0x800030eb, 0x000030d4, 0x800030b3, - 0x000030d3, 0x800030eb, 0x000030d5, 0x000030a1, - 0x000030e9, 0x000030c3, 0x800030c9, 0x000030d5, - 0x000030a3, 0x000030fc, 0x800030c8, 0x000030d6, - 0x000030c3, 0x000030b7, 0x000030a7, 0x800030eb, - 0x000030d5, 0x000030e9, 0x800030f3, 0x000030d8, - 0x000030af, 0x000030bf, 0x000030fc, 0x800030eb, - 0x000030da, 0x800030bd, 0x000030da, 0x000030cb, - 0x800030d2, 0x000030d8, 0x000030eb, 0x800030c4, - 0x000030da, 0x000030f3, 0x800030b9, 0x000030da, - 0x000030fc, 0x800030b8, 0x000030d9, 0x000030fc, - 0x800030bf, 0x000030dd, 0x000030a4, 0x000030f3, - 0x800030c8, 0x000030dc, 0x000030eb, 0x800030c8, - 0x000030db, 0x800030f3, 0x000030dd, 0x000030f3, - 0x800030c9, 0x000030db, 0x000030fc, 0x800030eb, - 0x000030db, 0x000030fc, 0x800030f3, 0x000030de, - 0x000030a4, 0x000030af, 0x800030ed, 0x000030de, - 0x000030a4, 0x800030eb, 0x000030de, 0x000030c3, - 0x800030cf, 0x000030de, 0x000030eb, 0x800030af, - 0x000030de, 0x000030f3, 0x000030b7, 0x000030e7, - 0x800030f3, 0x000030df, 0x000030af, 0x000030ed, - 0x800030f3, 0x000030df, 0x800030ea, 0x000030df, - 0x000030ea, 0x000030d0, 0x000030fc, 0x800030eb, - 0x000030e1, 0x800030ac, 0x000030e1, 0x000030ac, - 0x000030c8, 0x800030f3, 0x000030e1, 0x000030fc, - 0x000030c8, 0x800030eb, 0x000030e4, 0x000030fc, - 0x800030c9, 0x000030e4, 0x000030fc, 0x800030eb, - 0x000030e6, 0x000030a2, 0x800030f3, 0x000030ea, - 0x000030c3, 0x000030c8, 0x800030eb, 0x000030ea, - 0x800030e9, 0x000030eb, 0x000030d4, 0x800030fc, - 0x000030eb, 0x000030fc, 0x000030d6, 0x800030eb, - 0x000030ec, 0x800030e0, 0x000030ec, 0x000030f3, - 0x000030c8, 0x000030b2, 0x800030f3, 0x000030ef, - 0x000030c3, 0x800030c8, 0x00000030, 0x800070b9, - 0x00000031, 0x800070b9, 0x00000032, 0x800070b9, - 0x00000033, 0x800070b9, 0x00000034, 0x800070b9, - 0x00000035, 0x800070b9, 0x00000036, 0x800070b9, - 0x00000037, 0x800070b9, 0x00000038, 0x800070b9, - 0x00000039, 0x800070b9, 0x00000031, 0x00000030, - 0x800070b9, 0x00000031, 0x00000031, 0x800070b9, - 0x00000031, 0x00000032, 0x800070b9, 0x00000031, - 0x00000033, 0x800070b9, 0x00000031, 0x00000034, - 0x800070b9, 0x00000031, 0x00000035, 0x800070b9, - 0x00000031, 0x00000036, 0x800070b9, 0x00000031, - 0x00000037, 0x800070b9, 0x00000031, 0x00000038, - 0x800070b9, 0x00000031, 0x00000039, 0x800070b9, - 0x00000032, 0x00000030, 0x800070b9, 0x00000032, - 0x00000031, 0x800070b9, 0x00000032, 0x00000032, - 0x800070b9, 0x00000032, 0x00000033, 0x800070b9, - 0x00000032, 0x00000034, 0x800070b9, 0x00000068, - 0x00000050, 0x80000061, 0x00000064, 0x80000061, - 0x00000041, 0x80000055, 0x00000062, 0x00000061, - 0x80000072, 0x0000006f, 0x80000056, 0x00000070, - 0x80000063, 0x00005e73, 0x80006210, 0x0000662d, - 0x8000548c, 0x00005927, 0x80006b63, 0x0000660e, - 0x80006cbb, 0x0000682a, 0x00005f0f, 0x00004f1a, - 0x8000793e, 0x00000070, 0x80000041, 0x0000006e, - 0x80000041, 0x000003bc, 0x80000041, 0x0000006d, - 0x80000041, 0x0000006b, 0x80000041, 0x0000004b, - 0x80000042, 0x0000004d, 0x80000042, 0x00000047, - 0x80000042, 0x00000063, 0x00000061, 0x8000006c, - 0x0000006b, 0x00000063, 0x00000061, 0x8000006c, - 0x00000070, 0x80000046, 0x0000006e, 0x80000046, - 0x000003bc, 0x80000046, 0x000003bc, 0x80000067, - 0x0000006d, 0x80000067, 0x0000006b, 0x80000067, - 0x00000048, 0x8000007a, 0x0000006b, 0x00000048, - 0x8000007a, 0x0000004d, 0x00000048, 0x8000007a, - 0x00000047, 0x00000048, 0x8000007a, 0x00000054, - 0x00000048, 0x8000007a, 0x000003bc, 0x80002113, - 0x0000006d, 0x80002113, 0x00000064, 0x80002113, - 0x0000006b, 0x80002113, 0x00000066, 0x8000006d, - 0x0000006e, 0x8000006d, 0x000003bc, 0x8000006d, - 0x0000006d, 0x8000006d, 0x00000063, 0x8000006d, - 0x0000006b, 0x8000006d, 0x0000006d, 0x0000006d, - 0x800000b2, 0x00000063, 0x0000006d, 0x800000b2, - 0x0000006d, 0x800000b2, 0x0000006b, 0x0000006d, - 0x800000b2, 0x0000006d, 0x0000006d, 0x800000b3, - 0x00000063, 0x0000006d, 0x800000b3, 0x0000006d, - 0x800000b3, 0x0000006b, 0x0000006d, 0x800000b3, - 0x0000006d, 0x00002215, 0x80000073, 0x0000006d, - 0x00002215, 0x00000073, 0x800000b2, 0x00000050, - 0x80000061, 0x0000006b, 0x00000050, 0x80000061, - 0x0000004d, 0x00000050, 0x80000061, 0x00000047, - 0x00000050, 0x80000061, 0x00000072, 0x00000061, - 0x80000064, 0x00000072, 0x00000061, 0x00000064, - 0x00002215, 0x80000073, 0x00000072, 0x00000061, - 0x00000064, 0x00002215, 0x00000073, 0x800000b2, - 0x00000070, 0x80000073, 0x0000006e, 0x80000073, - 0x000003bc, 0x80000073, 0x0000006d, 0x80000073, - 0x00000070, 0x80000056, 0x0000006e, 0x80000056, - 0x000003bc, 0x80000056, 0x0000006d, 0x80000056, - 0x0000006b, 0x80000056, 0x0000004d, 0x80000056, - 0x00000070, 0x80000057, 0x0000006e, 0x80000057, - 0x000003bc, 0x80000057, 0x0000006d, 0x80000057, - 0x0000006b, 0x80000057, 0x0000004d, 0x80000057, - 0x0000006b, 0x800003a9, 0x0000004d, 0x800003a9, - 0x00000061, 0x0000002e, 0x0000006d, 0x8000002e, - 0x00000042, 0x80000071, 0x00000063, 0x80000063, - 0x00000063, 0x80000064, 0x00000043, 0x00002215, - 0x0000006b, 0x80000067, 0x00000043, 0x0000006f, - 0x8000002e, 0x00000064, 0x80000042, 0x00000047, - 0x80000079, 0x00000068, 0x80000061, 0x00000048, - 0x80000050, 0x00000069, 0x8000006e, 0x0000004b, - 0x8000004b, 0x0000004b, 0x8000004d, 0x0000006b, - 0x80000074, 0x0000006c, 0x8000006d, 0x0000006c, - 0x8000006e, 0x0000006c, 0x0000006f, 0x80000067, - 0x0000006c, 0x80000078, 0x0000006d, 0x80000062, - 0x0000006d, 0x00000069, 0x8000006c, 0x0000006d, - 0x0000006f, 0x8000006c, 0x00000050, 0x80000048, - 0x00000070, 0x0000002e, 0x0000006d, 0x8000002e, - 0x00000050, 0x00000050, 0x8000004d, 0x00000050, - 0x80000052, 0x00000073, 0x80000072, 0x00000053, - 0x80000076, 0x00000057, 0x80000062, 0x00000031, - 0x800065e5, 0x00000032, 0x800065e5, 0x00000033, - 0x800065e5, 0x00000034, 0x800065e5, 0x00000035, - 0x800065e5, 0x00000036, 0x800065e5, 0x00000037, - 0x800065e5, 0x00000038, 0x800065e5, 0x00000039, - 0x800065e5, 0x00000031, 0x00000030, 0x800065e5, - 0x00000031, 0x00000031, 0x800065e5, 0x00000031, - 0x00000032, 0x800065e5, 0x00000031, 0x00000033, - 0x800065e5, 0x00000031, 0x00000034, 0x800065e5, - 0x00000031, 0x00000035, 0x800065e5, 0x00000031, - 0x00000036, 0x800065e5, 0x00000031, 0x00000037, - 0x800065e5, 0x00000031, 0x00000038, 0x800065e5, - 0x00000031, 0x00000039, 0x800065e5, 0x00000032, - 0x00000030, 0x800065e5, 0x00000032, 0x00000031, - 0x800065e5, 0x00000032, 0x00000032, 0x800065e5, - 0x00000032, 0x00000033, 0x800065e5, 0x00000032, - 0x00000034, 0x800065e5, 0x00000032, 0x00000035, - 0x800065e5, 0x00000032, 0x00000036, 0x800065e5, - 0x00000032, 0x00000037, 0x800065e5, 0x00000032, - 0x00000038, 0x800065e5, 0x00000032, 0x00000039, - 0x800065e5, 0x00000033, 0x00000030, 0x800065e5, - 0x00000033, 0x00000031, 0x800065e5, 0x80008c48, - 0x800066f4, 0x80008eca, 0x80008cc8, 0x80006ed1, - 0x80004e32, 0x800053e5, 0x80009f9c, 0x80009f9c, - 0x80005951, 0x800091d1, 0x80005587, 0x80005948, - 0x800061f6, 0x80007669, 0x80007f85, 0x8000863f, - 0x800087ba, 0x800088f8, 0x8000908f, 0x80006a02, - 0x80006d1b, 0x800070d9, 0x800073de, 0x8000843d, - 0x8000916a, 0x800099f1, 0x80004e82, 0x80005375, - 0x80006b04, 0x8000721b, 0x8000862d, 0x80009e1e, - 0x80005d50, 0x80006feb, 0x800085cd, 0x80008964, - 0x800062c9, 0x800081d8, 0x8000881f, 0x80005eca, - 0x80006717, 0x80006d6a, 0x800072fc, 0x800090ce, - 0x80004f86, 0x800051b7, 0x800052de, 0x800064c4, - 0x80006ad3, 0x80007210, 0x800076e7, 0x80008001, - 0x80008606, 0x8000865c, 0x80008def, 0x80009732, - 0x80009b6f, 0x80009dfa, 0x8000788c, 0x8000797f, - 0x80007da0, 0x800083c9, 0x80009304, 0x80009e7f, - 0x80008ad6, 0x800058df, 0x80005f04, 0x80007c60, - 0x8000807e, 0x80007262, 0x800078ca, 0x80008cc2, - 0x800096f7, 0x800058d8, 0x80005c62, 0x80006a13, - 0x80006dda, 0x80006f0f, 0x80007d2f, 0x80007e37, - 0x800096fb, 0x800052d2, 0x8000808b, 0x800051dc, - 0x800051cc, 0x80007a1c, 0x80007dbe, 0x800083f1, - 0x80009675, 0x80008b80, 0x800062cf, 0x80006a02, - 0x80008afe, 0x80004e39, 0x80005be7, 0x80006012, - 0x80007387, 0x80007570, 0x80005317, 0x800078fb, - 0x80004fbf, 0x80005fa9, 0x80004e0d, 0x80006ccc, - 0x80006578, 0x80007d22, 0x800053c3, 0x8000585e, - 0x80007701, 0x80008449, 0x80008aaa, 0x80006bba, - 0x80008fb0, 0x80006c88, 0x800062fe, 0x800082e5, - 0x800063a0, 0x80007565, 0x80004eae, 0x80005169, - 0x800051c9, 0x80006881, 0x80007ce7, 0x8000826f, - 0x80008ad2, 0x800091cf, 0x800052f5, 0x80005442, - 0x80005973, 0x80005eec, 0x800065c5, 0x80006ffe, - 0x8000792a, 0x800095ad, 0x80009a6a, 0x80009e97, - 0x80009ece, 0x8000529b, 0x800066c6, 0x80006b77, - 0x80008f62, 0x80005e74, 0x80006190, 0x80006200, - 0x8000649a, 0x80006f23, 0x80007149, 0x80007489, - 0x800079ca, 0x80007df4, 0x8000806f, 0x80008f26, - 0x800084ee, 0x80009023, 0x8000934a, 0x80005217, - 0x800052a3, 0x800054bd, 0x800070c8, 0x800088c2, - 0x80008aaa, 0x80005ec9, 0x80005ff5, 0x8000637b, - 0x80006bae, 0x80007c3e, 0x80007375, 0x80004ee4, - 0x800056f9, 0x80005be7, 0x80005dba, 0x8000601c, - 0x800073b2, 0x80007469, 0x80007f9a, 0x80008046, - 0x80009234, 0x800096f6, 0x80009748, 0x80009818, - 0x80004f8b, 0x800079ae, 0x800091b4, 0x800096b8, - 0x800060e1, 0x80004e86, 0x800050da, 0x80005bee, - 0x80005c3f, 0x80006599, 0x80006a02, 0x800071ce, - 0x80007642, 0x800084fc, 0x8000907c, 0x80009f8d, - 0x80006688, 0x8000962e, 0x80005289, 0x8000677b, - 0x800067f3, 0x80006d41, 0x80006e9c, 0x80007409, - 0x80007559, 0x8000786b, 0x80007d10, 0x8000985e, - 0x8000516d, 0x8000622e, 0x80009678, 0x8000502b, - 0x80005d19, 0x80006dea, 0x80008f2a, 0x80005f8b, - 0x80006144, 0x80006817, 0x80007387, 0x80009686, - 0x80005229, 0x8000540f, 0x80005c65, 0x80006613, - 0x8000674e, 0x800068a8, 0x80006ce5, 0x80007406, - 0x800075e2, 0x80007f79, 0x800088cf, 0x800088e1, - 0x800091cc, 0x800096e2, 0x8000533f, 0x80006eba, - 0x8000541d, 0x800071d0, 0x80007498, 0x800085fa, - 0x800096a3, 0x80009c57, 0x80009e9f, 0x80006797, - 0x80006dcb, 0x800081e8, 0x80007acb, 0x80007b20, - 0x80007c92, 0x800072c0, 0x80007099, 0x80008b58, - 0x80004ec0, 0x80008336, 0x8000523a, 0x80005207, - 0x80005ea6, 0x800062d3, 0x80007cd6, 0x80005b85, - 0x80006d1e, 0x800066b4, 0x80008f3b, 0x8000884c, - 0x8000964d, 0x8000898b, 0x80005ed3, 0x80005140, - 0x800055c0, 0x8000585a, 0x80006674, 0x800051de, - 0x8000732a, 0x800076ca, 0x8000793c, 0x8000795e, - 0x80007965, 0x8000798f, 0x80009756, 0x80007cbe, - 0x80007fbd, 0x80008612, 0x80008af8, 0x80009038, - 0x800090fd, 0x800098ef, 0x800098fc, 0x80009928, - 0x80009db4, 0x00000066, 0x80000066, 0x00000066, - 0x80000069, 0x00000066, 0x8000006c, 0x00000066, - 0x00000066, 0x80000069, 0x00000066, 0x00000066, - 0x8000006c, 0x0000017f, 0x80000074, 0x00000073, - 0x80000074, 0x00000574, 0x80000576, 0x00000574, - 0x80000565, 0x00000574, 0x8000056b, 0x0000057e, - 0x80000576, 0x00000574, 0x8000056d, 0x000005d9, - 0x800005b4, 0x000005f2, 0x800005b7, 0x800005e2, - 0x800005d0, 0x800005d3, 0x800005d4, 0x800005db, - 0x800005dc, 0x800005dd, 0x800005e8, 0x800005ea, - 0x8000002b, 0x000005e9, 0x800005c1, 0x000005e9, - 0x800005c2, 0x0000fb49, 0x800005c1, 0x0000fb49, - 0x800005c2, 0x000005d0, 0x800005b7, 0x000005d0, - 0x800005b8, 0x000005d0, 0x800005bc, 0x000005d1, - 0x800005bc, 0x000005d2, 0x800005bc, 0x000005d3, - 0x800005bc, 0x000005d4, 0x800005bc, 0x000005d5, - 0x800005bc, 0x000005d6, 0x800005bc, 0x000005d8, - 0x800005bc, 0x000005d9, 0x800005bc, 0x000005da, - 0x800005bc, 0x000005db, 0x800005bc, 0x000005dc, - 0x800005bc, 0x000005de, 0x800005bc, 0x000005e0, - 0x800005bc, 0x000005e1, 0x800005bc, 0x000005e3, - 0x800005bc, 0x000005e4, 0x800005bc, 0x000005e6, - 0x800005bc, 0x000005e7, 0x800005bc, 0x000005e8, - 0x800005bc, 0x000005e9, 0x800005bc, 0x000005ea, - 0x800005bc, 0x000005d5, 0x800005b9, 0x000005d1, - 0x800005bf, 0x000005db, 0x800005bf, 0x000005e4, - 0x800005bf, 0x000005d0, 0x800005dc, 0x80000671, - 0x80000671, 0x8000067b, 0x8000067b, 0x8000067b, - 0x8000067b, 0x8000067e, 0x8000067e, 0x8000067e, - 0x8000067e, 0x80000680, 0x80000680, 0x80000680, - 0x80000680, 0x8000067a, 0x8000067a, 0x8000067a, - 0x8000067a, 0x8000067f, 0x8000067f, 0x8000067f, - 0x8000067f, 0x80000679, 0x80000679, 0x80000679, - 0x80000679, 0x800006a4, 0x800006a4, 0x800006a4, - 0x800006a4, 0x800006a6, 0x800006a6, 0x800006a6, - 0x800006a6, 0x80000684, 0x80000684, 0x80000684, - 0x80000684, 0x80000683, 0x80000683, 0x80000683, - 0x80000683, 0x80000686, 0x80000686, 0x80000686, - 0x80000686, 0x80000687, 0x80000687, 0x80000687, - 0x80000687, 0x8000068d, 0x8000068d, 0x8000068c, - 0x8000068c, 0x8000068e, 0x8000068e, 0x80000688, - 0x80000688, 0x80000698, 0x80000698, 0x80000691, - 0x80000691, 0x800006a9, 0x800006a9, 0x800006a9, - 0x800006a9, 0x800006af, 0x800006af, 0x800006af, - 0x800006af, 0x800006b3, 0x800006b3, 0x800006b3, - 0x800006b3, 0x800006b1, 0x800006b1, 0x800006b1, - 0x800006b1, 0x800006ba, 0x800006ba, 0x800006bb, - 0x800006bb, 0x800006bb, 0x800006bb, 0x800006c0, - 0x800006c0, 0x800006c1, 0x800006c1, 0x800006c1, - 0x800006c1, 0x800006be, 0x800006be, 0x800006be, - 0x800006be, 0x800006d2, 0x800006d2, 0x800006d3, - 0x800006d3, 0x800006ad, 0x800006ad, 0x800006ad, - 0x800006ad, 0x800006c7, 0x800006c7, 0x800006c6, - 0x800006c6, 0x800006c8, 0x800006c8, 0x80000677, - 0x800006cb, 0x800006cb, 0x800006c5, 0x800006c5, - 0x800006c9, 0x800006c9, 0x800006d0, 0x800006d0, - 0x800006d0, 0x800006d0, 0x80000649, 0x80000649, - 0x00000626, 0x80000627, 0x00000626, 0x80000627, - 0x00000626, 0x800006d5, 0x00000626, 0x800006d5, - 0x00000626, 0x80000648, 0x00000626, 0x80000648, - 0x00000626, 0x800006c7, 0x00000626, 0x800006c7, - 0x00000626, 0x800006c6, 0x00000626, 0x800006c6, - 0x00000626, 0x800006c8, 0x00000626, 0x800006c8, - 0x00000626, 0x800006d0, 0x00000626, 0x800006d0, - 0x00000626, 0x800006d0, 0x00000626, 0x80000649, - 0x00000626, 0x80000649, 0x00000626, 0x80000649, - 0x800006cc, 0x800006cc, 0x800006cc, 0x800006cc, - 0x00000626, 0x8000062c, 0x00000626, 0x8000062d, - 0x00000626, 0x80000645, 0x00000626, 0x80000649, - 0x00000626, 0x8000064a, 0x00000628, 0x8000062c, - 0x00000628, 0x8000062d, 0x00000628, 0x8000062e, - 0x00000628, 0x80000645, 0x00000628, 0x80000649, - 0x00000628, 0x8000064a, 0x0000062a, 0x8000062c, - 0x0000062a, 0x8000062d, 0x0000062a, 0x8000062e, - 0x0000062a, 0x80000645, 0x0000062a, 0x80000649, - 0x0000062a, 0x8000064a, 0x0000062b, 0x8000062c, - 0x0000062b, 0x80000645, 0x0000062b, 0x80000649, - 0x0000062b, 0x8000064a, 0x0000062c, 0x8000062d, - 0x0000062c, 0x80000645, 0x0000062d, 0x8000062c, - 0x0000062d, 0x80000645, 0x0000062e, 0x8000062c, - 0x0000062e, 0x8000062d, 0x0000062e, 0x80000645, - 0x00000633, 0x8000062c, 0x00000633, 0x8000062d, - 0x00000633, 0x8000062e, 0x00000633, 0x80000645, - 0x00000635, 0x8000062d, 0x00000635, 0x80000645, - 0x00000636, 0x8000062c, 0x00000636, 0x8000062d, - 0x00000636, 0x8000062e, 0x00000636, 0x80000645, - 0x00000637, 0x8000062d, 0x00000637, 0x80000645, - 0x00000638, 0x80000645, 0x00000639, 0x8000062c, - 0x00000639, 0x80000645, 0x0000063a, 0x8000062c, - 0x0000063a, 0x80000645, 0x00000641, 0x8000062c, - 0x00000641, 0x8000062d, 0x00000641, 0x8000062e, - 0x00000641, 0x80000645, 0x00000641, 0x80000649, - 0x00000641, 0x8000064a, 0x00000642, 0x8000062d, - 0x00000642, 0x80000645, 0x00000642, 0x80000649, - 0x00000642, 0x8000064a, 0x00000643, 0x80000627, - 0x00000643, 0x8000062c, 0x00000643, 0x8000062d, - 0x00000643, 0x8000062e, 0x00000643, 0x80000644, - 0x00000643, 0x80000645, 0x00000643, 0x80000649, - 0x00000643, 0x8000064a, 0x00000644, 0x8000062c, - 0x00000644, 0x8000062d, 0x00000644, 0x8000062e, - 0x00000644, 0x80000645, 0x00000644, 0x80000649, - 0x00000644, 0x8000064a, 0x00000645, 0x8000062c, - 0x00000645, 0x8000062d, 0x00000645, 0x8000062e, - 0x00000645, 0x80000645, 0x00000645, 0x80000649, - 0x00000645, 0x8000064a, 0x00000646, 0x8000062c, - 0x00000646, 0x8000062d, 0x00000646, 0x8000062e, - 0x00000646, 0x80000645, 0x00000646, 0x80000649, - 0x00000646, 0x8000064a, 0x00000647, 0x8000062c, - 0x00000647, 0x80000645, 0x00000647, 0x80000649, - 0x00000647, 0x8000064a, 0x0000064a, 0x8000062c, - 0x0000064a, 0x8000062d, 0x0000064a, 0x8000062e, - 0x0000064a, 0x80000645, 0x0000064a, 0x80000649, - 0x0000064a, 0x8000064a, 0x00000630, 0x80000670, - 0x00000631, 0x80000670, 0x00000649, 0x80000670, - 0x00000020, 0x0000064c, 0x80000651, 0x00000020, - 0x0000064d, 0x80000651, 0x00000020, 0x0000064e, - 0x80000651, 0x00000020, 0x0000064f, 0x80000651, - 0x00000020, 0x00000650, 0x80000651, 0x00000020, - 0x00000651, 0x80000670, 0x00000626, 0x80000631, - 0x00000626, 0x80000632, 0x00000626, 0x80000645, - 0x00000626, 0x80000646, 0x00000626, 0x80000649, - 0x00000626, 0x8000064a, 0x00000628, 0x80000631, - 0x00000628, 0x80000632, 0x00000628, 0x80000645, - 0x00000628, 0x80000646, 0x00000628, 0x80000649, - 0x00000628, 0x8000064a, 0x0000062a, 0x80000631, - 0x0000062a, 0x80000632, 0x0000062a, 0x80000645, - 0x0000062a, 0x80000646, 0x0000062a, 0x80000649, - 0x0000062a, 0x8000064a, 0x0000062b, 0x80000631, - 0x0000062b, 0x80000632, 0x0000062b, 0x80000645, - 0x0000062b, 0x80000646, 0x0000062b, 0x80000649, - 0x0000062b, 0x8000064a, 0x00000641, 0x80000649, - 0x00000641, 0x8000064a, 0x00000642, 0x80000649, - 0x00000642, 0x8000064a, 0x00000643, 0x80000627, - 0x00000643, 0x80000644, 0x00000643, 0x80000645, - 0x00000643, 0x80000649, 0x00000643, 0x8000064a, - 0x00000644, 0x80000645, 0x00000644, 0x80000649, - 0x00000644, 0x8000064a, 0x00000645, 0x80000627, - 0x00000645, 0x80000645, 0x00000646, 0x80000631, - 0x00000646, 0x80000632, 0x00000646, 0x80000645, - 0x00000646, 0x80000646, 0x00000646, 0x80000649, - 0x00000646, 0x8000064a, 0x00000649, 0x80000670, - 0x0000064a, 0x80000631, 0x0000064a, 0x80000632, - 0x0000064a, 0x80000645, 0x0000064a, 0x80000646, - 0x0000064a, 0x80000649, 0x0000064a, 0x8000064a, - 0x00000626, 0x8000062c, 0x00000626, 0x8000062d, - 0x00000626, 0x8000062e, 0x00000626, 0x80000645, - 0x00000626, 0x80000647, 0x00000628, 0x8000062c, - 0x00000628, 0x8000062d, 0x00000628, 0x8000062e, - 0x00000628, 0x80000645, 0x00000628, 0x80000647, - 0x0000062a, 0x8000062c, 0x0000062a, 0x8000062d, - 0x0000062a, 0x8000062e, 0x0000062a, 0x80000645, - 0x0000062a, 0x80000647, 0x0000062b, 0x80000645, - 0x0000062c, 0x8000062d, 0x0000062c, 0x80000645, - 0x0000062d, 0x8000062c, 0x0000062d, 0x80000645, - 0x0000062e, 0x8000062c, 0x0000062e, 0x80000645, - 0x00000633, 0x8000062c, 0x00000633, 0x8000062d, - 0x00000633, 0x8000062e, 0x00000633, 0x80000645, - 0x00000635, 0x8000062d, 0x00000635, 0x8000062e, - 0x00000635, 0x80000645, 0x00000636, 0x8000062c, - 0x00000636, 0x8000062d, 0x00000636, 0x8000062e, - 0x00000636, 0x80000645, 0x00000637, 0x8000062d, - 0x00000638, 0x80000645, 0x00000639, 0x8000062c, - 0x00000639, 0x80000645, 0x0000063a, 0x8000062c, - 0x0000063a, 0x80000645, 0x00000641, 0x8000062c, - 0x00000641, 0x8000062d, 0x00000641, 0x8000062e, - 0x00000641, 0x80000645, 0x00000642, 0x8000062d, - 0x00000642, 0x80000645, 0x00000643, 0x8000062c, - 0x00000643, 0x8000062d, 0x00000643, 0x8000062e, - 0x00000643, 0x80000644, 0x00000643, 0x80000645, - 0x00000644, 0x8000062c, 0x00000644, 0x8000062d, - 0x00000644, 0x8000062e, 0x00000644, 0x80000645, - 0x00000644, 0x80000647, 0x00000645, 0x8000062c, - 0x00000645, 0x8000062d, 0x00000645, 0x8000062e, - 0x00000645, 0x80000645, 0x00000646, 0x8000062c, - 0x00000646, 0x8000062d, 0x00000646, 0x8000062e, - 0x00000646, 0x80000645, 0x00000646, 0x80000647, - 0x00000647, 0x8000062c, 0x00000647, 0x80000645, - 0x00000647, 0x80000670, 0x0000064a, 0x8000062c, - 0x0000064a, 0x8000062d, 0x0000064a, 0x8000062e, - 0x0000064a, 0x80000645, 0x0000064a, 0x80000647, - 0x00000626, 0x80000645, 0x00000626, 0x80000647, - 0x00000628, 0x80000645, 0x00000628, 0x80000647, - 0x0000062a, 0x80000645, 0x0000062a, 0x80000647, - 0x0000062b, 0x80000645, 0x0000062b, 0x80000647, - 0x00000633, 0x80000645, 0x00000633, 0x80000647, - 0x00000634, 0x80000645, 0x00000634, 0x80000647, - 0x00000643, 0x80000644, 0x00000643, 0x80000645, - 0x00000644, 0x80000645, 0x00000646, 0x80000645, - 0x00000646, 0x80000647, 0x0000064a, 0x80000645, - 0x0000064a, 0x80000647, 0x00000640, 0x0000064e, - 0x80000651, 0x00000640, 0x0000064f, 0x80000651, - 0x00000640, 0x00000650, 0x80000651, 0x00000637, - 0x80000649, 0x00000637, 0x8000064a, 0x00000639, - 0x80000649, 0x00000639, 0x8000064a, 0x0000063a, - 0x80000649, 0x0000063a, 0x8000064a, 0x00000633, - 0x80000649, 0x00000633, 0x8000064a, 0x00000634, - 0x80000649, 0x00000634, 0x8000064a, 0x0000062d, - 0x80000649, 0x0000062d, 0x8000064a, 0x0000062c, - 0x80000649, 0x0000062c, 0x8000064a, 0x0000062e, - 0x80000649, 0x0000062e, 0x8000064a, 0x00000635, - 0x80000649, 0x00000635, 0x8000064a, 0x00000636, - 0x80000649, 0x00000636, 0x8000064a, 0x00000634, - 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, - 0x8000062e, 0x00000634, 0x80000645, 0x00000634, - 0x80000631, 0x00000633, 0x80000631, 0x00000635, - 0x80000631, 0x00000636, 0x80000631, 0x00000637, - 0x80000649, 0x00000637, 0x8000064a, 0x00000639, - 0x80000649, 0x00000639, 0x8000064a, 0x0000063a, - 0x80000649, 0x0000063a, 0x8000064a, 0x00000633, - 0x80000649, 0x00000633, 0x8000064a, 0x00000634, - 0x80000649, 0x00000634, 0x8000064a, 0x0000062d, - 0x80000649, 0x0000062d, 0x8000064a, 0x0000062c, - 0x80000649, 0x0000062c, 0x8000064a, 0x0000062e, - 0x80000649, 0x0000062e, 0x8000064a, 0x00000635, - 0x80000649, 0x00000635, 0x8000064a, 0x00000636, - 0x80000649, 0x00000636, 0x8000064a, 0x00000634, - 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, - 0x8000062e, 0x00000634, 0x80000645, 0x00000634, - 0x80000631, 0x00000633, 0x80000631, 0x00000635, - 0x80000631, 0x00000636, 0x80000631, 0x00000634, - 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, - 0x8000062e, 0x00000634, 0x80000645, 0x00000633, - 0x80000647, 0x00000634, 0x80000647, 0x00000637, - 0x80000645, 0x00000633, 0x8000062c, 0x00000633, - 0x8000062d, 0x00000633, 0x8000062e, 0x00000634, - 0x8000062c, 0x00000634, 0x8000062d, 0x00000634, - 0x8000062e, 0x00000637, 0x80000645, 0x00000638, - 0x80000645, 0x00000627, 0x8000064b, 0x00000627, - 0x8000064b, 0x0000062a, 0x0000062c, 0x80000645, - 0x0000062a, 0x0000062d, 0x8000062c, 0x0000062a, - 0x0000062d, 0x8000062c, 0x0000062a, 0x0000062d, - 0x80000645, 0x0000062a, 0x0000062e, 0x80000645, - 0x0000062a, 0x00000645, 0x8000062c, 0x0000062a, - 0x00000645, 0x8000062d, 0x0000062a, 0x00000645, - 0x8000062e, 0x0000062c, 0x00000645, 0x8000062d, - 0x0000062c, 0x00000645, 0x8000062d, 0x0000062d, - 0x00000645, 0x8000064a, 0x0000062d, 0x00000645, - 0x80000649, 0x00000633, 0x0000062d, 0x8000062c, - 0x00000633, 0x0000062c, 0x8000062d, 0x00000633, - 0x0000062c, 0x80000649, 0x00000633, 0x00000645, - 0x8000062d, 0x00000633, 0x00000645, 0x8000062d, - 0x00000633, 0x00000645, 0x8000062c, 0x00000633, - 0x00000645, 0x80000645, 0x00000633, 0x00000645, - 0x80000645, 0x00000635, 0x0000062d, 0x8000062d, - 0x00000635, 0x0000062d, 0x8000062d, 0x00000635, - 0x00000645, 0x80000645, 0x00000634, 0x0000062d, - 0x80000645, 0x00000634, 0x0000062d, 0x80000645, - 0x00000634, 0x0000062c, 0x8000064a, 0x00000634, - 0x00000645, 0x8000062e, 0x00000634, 0x00000645, - 0x8000062e, 0x00000634, 0x00000645, 0x80000645, - 0x00000634, 0x00000645, 0x80000645, 0x00000636, - 0x0000062d, 0x80000649, 0x00000636, 0x0000062e, - 0x80000645, 0x00000636, 0x0000062e, 0x80000645, - 0x00000637, 0x00000645, 0x8000062d, 0x00000637, - 0x00000645, 0x8000062d, 0x00000637, 0x00000645, - 0x80000645, 0x00000637, 0x00000645, 0x8000064a, - 0x00000639, 0x0000062c, 0x80000645, 0x00000639, - 0x00000645, 0x80000645, 0x00000639, 0x00000645, - 0x80000645, 0x00000639, 0x00000645, 0x80000649, - 0x0000063a, 0x00000645, 0x80000645, 0x0000063a, - 0x00000645, 0x8000064a, 0x0000063a, 0x00000645, - 0x80000649, 0x00000641, 0x0000062e, 0x80000645, - 0x00000641, 0x0000062e, 0x80000645, 0x00000642, - 0x00000645, 0x8000062d, 0x00000642, 0x00000645, - 0x80000645, 0x00000644, 0x0000062d, 0x80000645, - 0x00000644, 0x0000062d, 0x8000064a, 0x00000644, - 0x0000062d, 0x80000649, 0x00000644, 0x0000062c, - 0x8000062c, 0x00000644, 0x0000062c, 0x8000062c, - 0x00000644, 0x0000062e, 0x80000645, 0x00000644, - 0x0000062e, 0x80000645, 0x00000644, 0x00000645, - 0x8000062d, 0x00000644, 0x00000645, 0x8000062d, - 0x00000645, 0x0000062d, 0x8000062c, 0x00000645, - 0x0000062d, 0x80000645, 0x00000645, 0x0000062d, - 0x8000064a, 0x00000645, 0x0000062c, 0x8000062d, - 0x00000645, 0x0000062c, 0x80000645, 0x00000645, - 0x0000062e, 0x8000062c, 0x00000645, 0x0000062e, - 0x80000645, 0x00000645, 0x0000062c, 0x8000062e, - 0x00000647, 0x00000645, 0x8000062c, 0x00000647, - 0x00000645, 0x80000645, 0x00000646, 0x0000062d, - 0x80000645, 0x00000646, 0x0000062d, 0x80000649, - 0x00000646, 0x0000062c, 0x80000645, 0x00000646, - 0x0000062c, 0x80000645, 0x00000646, 0x0000062c, - 0x80000649, 0x00000646, 0x00000645, 0x8000064a, - 0x00000646, 0x00000645, 0x80000649, 0x0000064a, - 0x00000645, 0x80000645, 0x0000064a, 0x00000645, - 0x80000645, 0x00000628, 0x0000062e, 0x8000064a, - 0x0000062a, 0x0000062c, 0x8000064a, 0x0000062a, - 0x0000062c, 0x80000649, 0x0000062a, 0x0000062e, - 0x8000064a, 0x0000062a, 0x0000062e, 0x80000649, - 0x0000062a, 0x00000645, 0x8000064a, 0x0000062a, - 0x00000645, 0x80000649, 0x0000062c, 0x00000645, - 0x8000064a, 0x0000062c, 0x0000062d, 0x80000649, - 0x0000062c, 0x00000645, 0x80000649, 0x00000633, - 0x0000062e, 0x80000649, 0x00000635, 0x0000062d, - 0x8000064a, 0x00000634, 0x0000062d, 0x8000064a, - 0x00000636, 0x0000062d, 0x8000064a, 0x00000644, - 0x0000062c, 0x8000064a, 0x00000644, 0x00000645, - 0x8000064a, 0x0000064a, 0x0000062d, 0x8000064a, - 0x0000064a, 0x0000062c, 0x8000064a, 0x0000064a, - 0x00000645, 0x8000064a, 0x00000645, 0x00000645, - 0x8000064a, 0x00000642, 0x00000645, 0x8000064a, - 0x00000646, 0x0000062d, 0x8000064a, 0x00000642, - 0x00000645, 0x8000062d, 0x00000644, 0x0000062d, - 0x80000645, 0x00000639, 0x00000645, 0x8000064a, - 0x00000643, 0x00000645, 0x8000064a, 0x00000646, - 0x0000062c, 0x8000062d, 0x00000645, 0x0000062e, - 0x8000064a, 0x00000644, 0x0000062c, 0x80000645, - 0x00000643, 0x00000645, 0x80000645, 0x00000644, - 0x0000062c, 0x80000645, 0x00000646, 0x0000062c, - 0x8000062d, 0x0000062c, 0x0000062d, 0x8000064a, - 0x0000062d, 0x0000062c, 0x8000064a, 0x00000645, - 0x0000062c, 0x8000064a, 0x00000641, 0x00000645, - 0x8000064a, 0x00000628, 0x0000062d, 0x8000064a, - 0x00000643, 0x00000645, 0x80000645, 0x00000639, - 0x0000062c, 0x80000645, 0x00000635, 0x00000645, - 0x80000645, 0x00000633, 0x0000062e, 0x8000064a, - 0x00000646, 0x0000062c, 0x8000064a, 0x00000635, - 0x00000644, 0x800006d2, 0x00000642, 0x00000644, - 0x800006d2, 0x00000627, 0x00000644, 0x00000644, - 0x80000647, 0x00000627, 0x00000643, 0x00000628, - 0x80000631, 0x00000645, 0x0000062d, 0x00000645, - 0x8000062f, 0x00000635, 0x00000644, 0x00000639, - 0x80000645, 0x00000631, 0x00000633, 0x00000648, - 0x80000644, 0x00000639, 0x00000644, 0x0000064a, - 0x80000647, 0x00000648, 0x00000633, 0x00000644, - 0x80000645, 0x00000635, 0x00000644, 0x80000649, - 0x00000635, 0x00000644, 0x00000649, 0x00000020, - 0x00000627, 0x00000644, 0x00000644, 0x00000647, - 0x00000020, 0x00000639, 0x00000644, 0x0000064a, - 0x00000647, 0x00000020, 0x00000648, 0x00000633, - 0x00000644, 0x80000645, 0x0000062c, 0x00000644, - 0x00000020, 0x0000062c, 0x00000644, 0x00000627, - 0x00000644, 0x80000647, 0x80002025, 0x80002014, - 0x80002013, 0x8000005f, 0x8000005f, 0x80000028, - 0x80000029, 0x8000007b, 0x8000007d, 0x80003014, - 0x80003015, 0x80003010, 0x80003011, 0x8000300a, - 0x8000300b, 0x80003008, 0x80003009, 0x8000300c, - 0x8000300d, 0x8000300e, 0x8000300f, 0x8000203e, - 0x8000203e, 0x8000203e, 0x8000203e, 0x8000005f, - 0x8000005f, 0x8000005f, 0x8000002c, 0x80003001, - 0x8000002e, 0x8000003b, 0x8000003a, 0x8000003f, - 0x80000021, 0x80002014, 0x80000028, 0x80000029, - 0x8000007b, 0x8000007d, 0x80003014, 0x80003015, - 0x80000023, 0x80000026, 0x8000002a, 0x8000002b, - 0x8000002d, 0x8000003c, 0x8000003e, 0x8000003d, - 0x8000005c, 0x80000024, 0x80000025, 0x80000040, - 0x00000020, 0x8000064b, 0x00000640, 0x8000064b, - 0x00000020, 0x8000064c, 0x00000020, 0x8000064d, - 0x00000020, 0x8000064e, 0x00000640, 0x8000064e, - 0x00000020, 0x8000064f, 0x00000640, 0x8000064f, - 0x00000020, 0x80000650, 0x00000640, 0x80000650, - 0x00000020, 0x80000651, 0x00000640, 0x80000651, - 0x00000020, 0x80000652, 0x00000640, 0x80000652, - 0x80000621, 0x80000622, 0x80000622, 0x80000623, - 0x80000623, 0x80000624, 0x80000624, 0x80000625, - 0x80000625, 0x80000626, 0x80000626, 0x80000626, - 0x80000626, 0x80000627, 0x80000627, 0x80000628, - 0x80000628, 0x80000628, 0x80000628, 0x80000629, - 0x80000629, 0x8000062a, 0x8000062a, 0x8000062a, - 0x8000062a, 0x8000062b, 0x8000062b, 0x8000062b, - 0x8000062b, 0x8000062c, 0x8000062c, 0x8000062c, - 0x8000062c, 0x8000062d, 0x8000062d, 0x8000062d, - 0x8000062d, 0x8000062e, 0x8000062e, 0x8000062e, - 0x8000062e, 0x8000062f, 0x8000062f, 0x80000630, - 0x80000630, 0x80000631, 0x80000631, 0x80000632, - 0x80000632, 0x80000633, 0x80000633, 0x80000633, - 0x80000633, 0x80000634, 0x80000634, 0x80000634, - 0x80000634, 0x80000635, 0x80000635, 0x80000635, - 0x80000635, 0x80000636, 0x80000636, 0x80000636, - 0x80000636, 0x80000637, 0x80000637, 0x80000637, - 0x80000637, 0x80000638, 0x80000638, 0x80000638, - 0x80000638, 0x80000639, 0x80000639, 0x80000639, - 0x80000639, 0x8000063a, 0x8000063a, 0x8000063a, - 0x8000063a, 0x80000641, 0x80000641, 0x80000641, - 0x80000641, 0x80000642, 0x80000642, 0x80000642, - 0x80000642, 0x80000643, 0x80000643, 0x80000643, - 0x80000643, 0x80000644, 0x80000644, 0x80000644, - 0x80000644, 0x80000645, 0x80000645, 0x80000645, - 0x80000645, 0x80000646, 0x80000646, 0x80000646, - 0x80000646, 0x80000647, 0x80000647, 0x80000647, - 0x80000647, 0x80000648, 0x80000648, 0x80000649, - 0x80000649, 0x8000064a, 0x8000064a, 0x8000064a, - 0x8000064a, 0x00000644, 0x80000622, 0x00000644, - 0x80000622, 0x00000644, 0x80000623, 0x00000644, - 0x80000623, 0x00000644, 0x80000625, 0x00000644, - 0x80000625, 0x00000644, 0x80000627, 0x00000644, - 0x80000627, 0x80000021, 0x80000022, 0x80000023, - 0x80000024, 0x80000025, 0x80000026, 0x80000027, - 0x80000028, 0x80000029, 0x8000002a, 0x8000002b, - 0x8000002c, 0x8000002d, 0x8000002e, 0x8000002f, - 0x80000030, 0x80000031, 0x80000032, 0x80000033, - 0x80000034, 0x80000035, 0x80000036, 0x80000037, - 0x80000038, 0x80000039, 0x8000003a, 0x8000003b, - 0x8000003c, 0x8000003d, 0x8000003e, 0x8000003f, - 0x80000040, 0x80000041, 0x80000042, 0x80000043, - 0x80000044, 0x80000045, 0x80000046, 0x80000047, - 0x80000048, 0x80000049, 0x8000004a, 0x8000004b, - 0x8000004c, 0x8000004d, 0x8000004e, 0x8000004f, - 0x80000050, 0x80000051, 0x80000052, 0x80000053, - 0x80000054, 0x80000055, 0x80000056, 0x80000057, - 0x80000058, 0x80000059, 0x8000005a, 0x8000005b, - 0x8000005c, 0x8000005d, 0x8000005e, 0x8000005f, - 0x80000060, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x8000007b, - 0x8000007c, 0x8000007d, 0x8000007e, 0x80003002, - 0x8000300c, 0x8000300d, 0x80003001, 0x800030fb, - 0x800030f2, 0x800030a1, 0x800030a3, 0x800030a5, - 0x800030a7, 0x800030a9, 0x800030e3, 0x800030e5, - 0x800030e7, 0x800030c3, 0x800030fc, 0x800030a2, - 0x800030a4, 0x800030a6, 0x800030a8, 0x800030aa, - 0x800030ab, 0x800030ad, 0x800030af, 0x800030b1, - 0x800030b3, 0x800030b5, 0x800030b7, 0x800030b9, - 0x800030bb, 0x800030bd, 0x800030bf, 0x800030c1, - 0x800030c4, 0x800030c6, 0x800030c8, 0x800030ca, - 0x800030cb, 0x800030cc, 0x800030cd, 0x800030ce, - 0x800030cf, 0x800030d2, 0x800030d5, 0x800030d8, - 0x800030db, 0x800030de, 0x800030df, 0x800030e0, - 0x800030e1, 0x800030e2, 0x800030e4, 0x800030e6, - 0x800030e8, 0x800030e9, 0x800030ea, 0x800030eb, - 0x800030ec, 0x800030ed, 0x800030ef, 0x800030f3, - 0x80003099, 0x8000309a, 0x80003164, 0x80003131, - 0x80003132, 0x80003133, 0x80003134, 0x80003135, - 0x80003136, 0x80003137, 0x80003138, 0x80003139, - 0x8000313a, 0x8000313b, 0x8000313c, 0x8000313d, - 0x8000313e, 0x8000313f, 0x80003140, 0x80003141, - 0x80003142, 0x80003143, 0x80003144, 0x80003145, - 0x80003146, 0x80003147, 0x80003148, 0x80003149, - 0x8000314a, 0x8000314b, 0x8000314c, 0x8000314d, - 0x8000314e, 0x8000314f, 0x80003150, 0x80003151, - 0x80003152, 0x80003153, 0x80003154, 0x80003155, - 0x80003156, 0x80003157, 0x80003158, 0x80003159, - 0x8000315a, 0x8000315b, 0x8000315c, 0x8000315d, - 0x8000315e, 0x8000315f, 0x80003160, 0x80003161, - 0x80003162, 0x80003163, 0x800000a2, 0x800000a3, - 0x800000ac, 0x800000af, 0x800000a6, 0x800000a5, - 0x800020a9, 0x80002502, 0x80002190, 0x80002191, - 0x80002192, 0x80002193, 0x800025a0, 0x800025cb, -}; - - -/* - * Lowercase <-> Uppercase mapping - */ - -/* - * Flags for special case mapping. - */ -#define CMF_FINAL 1 -#define CMF_NONFINAL 2 -#define CMF_LAST 16 -#define CMF_CTXDEP (CMF_FINAL|CMF_NONFINAL) - -#define CASEMAP_BITS_0 9 -#define CASEMAP_BITS_1 7 -#define CASEMAP_BITS_2 5 - -static const unsigned short v301_toupper_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 0, 1, 0, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 0, 0, 0, - 0, 0, 18, 0, 19, 20, 21, 22, - 0, 23, 24, 25, 26, 27, 28, 29, - 0, 0, 0, 30, 31, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 49, 50, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 51, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 52, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v301_toupper_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - }}, - {{ - 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, - 102, 0, 104, 106, 108, 110, 112, 114, 116, 118, - }}, - {{ - 0, 120, 0, 122, 0, 124, 0, 126, 0, 128, 0, - 130, 0, 132, 0, 134, 0, 136, 0, 138, 0, 140, - 0, 142, 0, 144, 0, 146, 0, 148, 0, 150, - }}, - {{ - 0, 152, 0, 154, 0, 156, 0, 158, 0, 160, 0, - 162, 0, 164, 0, 166, 0, 168, 0, 170, 0, 172, - 0, 174, 0, 0, 176, 0, 178, 0, 180, 0, - }}, - {{ - 182, 0, 184, 0, 186, 0, 188, 0, 190, 192, 0, - 195, 0, 197, 0, 199, 0, 201, 0, 203, 0, 205, - 0, 207, 0, 209, 0, 211, 0, 213, 0, 215, - }}, - {{ - 0, 217, 0, 219, 0, 221, 0, 223, 0, 225, 0, - 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, - 0, 239, 0, 0, 241, 0, 243, 0, 245, 247, - }}, - {{ - 0, 0, 0, 249, 0, 251, 0, 0, 253, 0, 0, - 0, 255, 0, 0, 0, 0, 0, 257, 0, 0, 259, - 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 263, 0, 265, 0, 267, 0, 0, 269, 0, 0, - 0, 0, 271, 0, 0, 273, 0, 0, 0, 275, 0, - 277, 0, 0, 279, 0, 0, 0, 281, 0, 283, - }}, - {{ - 0, 0, 0, 0, 0, 285, 287, 0, 289, 291, 0, - 293, 295, 0, 297, 0, 299, 0, 301, 0, 303, 0, - 305, 0, 307, 0, 309, 0, 311, 313, 0, 315, - }}, - {{ - 0, 317, 0, 319, 0, 321, 0, 323, 0, 325, 0, - 327, 0, 329, 0, 331, 333, 0, 336, 338, 0, 340, - 0, 0, 0, 342, 0, 344, 0, 346, 0, 348, - }}, - {{ - 0, 350, 0, 352, 0, 354, 0, 356, 0, 358, 0, - 360, 0, 362, 0, 364, 0, 366, 0, 368, 0, 370, - 0, 372, 0, 374, 0, 376, 0, 378, 0, 380, - }}, - {{ - 0, 0, 0, 382, 0, 384, 0, 386, 0, 388, 0, - 390, 0, 392, 0, 394, 0, 396, 0, 398, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 400, 402, 0, - 404, 406, 0, 408, 0, 410, 0, 0, 0, 0, - }}, - {{ - 412, 0, 0, 414, 0, 0, 0, 0, 416, 418, 0, - 0, 0, 0, 0, 420, 0, 0, 422, 0, 0, 424, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 426, 0, 0, 428, 0, 0, 0, 0, 430, 0, 432, - 434, 0, 0, 0, 0, 0, 0, 436, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 444, 446, 448, 450, 452, 456, 458, 460, 462, 464, - 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, - }}, - {{ - 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, - 508, 510, 512, 514, 0, 516, 518, 0, 0, 0, 520, - 522, 0, 0, 0, 0, 524, 0, 526, 0, 528, - }}, - {{ - 0, 530, 0, 532, 0, 534, 0, 536, 0, 538, 0, - 540, 0, 542, 0, 544, 546, 548, 550, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 552, 554, 556, 558, 560, 562, - 564, 566, 568, 570, 572, 574, 576, 578, 580, 582, - }}, - {{ - 584, 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, - 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, - 628, 630, 632, 634, 636, 638, 640, 642, 644, 646, - }}, - {{ - 0, 648, 0, 650, 0, 652, 0, 654, 0, 656, 0, - 658, 0, 660, 0, 662, 0, 664, 0, 666, 0, 668, - 0, 670, 0, 672, 0, 674, 0, 676, 0, 678, - }}, - {{ - 0, 680, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 682, 0, 684, 0, 686, 0, 688, 0, 690, - 0, 692, 0, 694, 0, 696, 0, 698, 0, 700, - }}, - {{ - 0, 702, 0, 704, 0, 706, 0, 708, 0, 710, 0, - 712, 0, 714, 0, 716, 0, 718, 0, 720, 0, 722, - 0, 724, 0, 726, 0, 728, 0, 730, 0, 732, - }}, - {{ - 0, 0, 734, 0, 736, 0, 0, 0, 738, 0, 0, - 0, 740, 0, 0, 0, 0, 742, 0, 744, 0, 746, - 0, 748, 0, 750, 0, 752, 0, 754, 0, 756, - }}, - {{ - 0, 758, 0, 760, 0, 762, 0, 764, 0, 766, 0, - 768, 0, 770, 0, 772, 0, 774, 0, 776, 0, 778, - 0, 0, 0, 780, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 782, 784, 786, 788, 790, 792, 794, 796, 798, 800, - 802, 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, - 824, 826, 828, 830, 832, 834, 836, 838, 840, 842, - }}, - {{ - 844, 846, 848, 850, 852, 854, 856, 858, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 861, 0, 863, 0, 865, 0, 867, 0, 869, 0, - 871, 0, 873, 0, 875, 0, 877, 0, 879, 0, 881, - 0, 883, 0, 885, 0, 887, 0, 889, 0, 891, - }}, - {{ - 0, 893, 0, 895, 0, 897, 0, 899, 0, 901, 0, - 903, 0, 905, 0, 907, 0, 909, 0, 911, 0, 913, - 0, 915, 0, 917, 0, 919, 0, 921, 0, 923, - }}, - {{ - 0, 925, 0, 927, 0, 929, 0, 931, 0, 933, 0, - 935, 0, 937, 0, 939, 0, 941, 0, 943, 0, 945, - 0, 947, 0, 949, 0, 951, 0, 953, 0, 955, - }}, - {{ - 0, 957, 0, 959, 0, 961, 0, 963, 0, 965, 0, - 967, 0, 969, 0, 971, 0, 973, 0, 975, 0, 977, - 0, 979, 0, 981, 0, 983, 0, 985, 0, 987, - }}, - {{ - 0, 989, 0, 991, 0, 993, 0, 995, 0, 997, 0, - 999, 0, 1001, 0, 1003, 0, 1005, 0, 1007, 0, 1009, - 1011, 1014, 1017, 1020, 1023, 1026, 0, 0, 0, 0, - }}, - {{ - 0, 1028, 0, 1030, 0, 1032, 0, 1034, 0, 1036, 0, - 1038, 0, 1040, 0, 1042, 0, 1044, 0, 1046, 0, 1048, - 0, 1050, 0, 1052, 0, 1054, 0, 1056, 0, 1058, - }}, - {{ - 0, 1060, 0, 1062, 0, 1064, 0, 1066, 0, 1068, 0, - 1070, 0, 1072, 0, 1074, 0, 1076, 0, 1078, 0, 1080, - 0, 1082, 0, 1084, 0, 1086, 0, 1088, 0, 1090, - }}, - {{ - 0, 1092, 0, 1094, 0, 1096, 0, 1098, 0, 1100, 0, - 1102, 0, 1104, 0, 1106, 0, 1108, 0, 1110, 0, 1112, - 0, 1114, 0, 1116, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 0, 0, 0, - 0, 0, 0, 0, 0, 1134, 1136, 1138, 1140, 1142, 1144, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1146, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 0, 0, 0, - 0, 0, 0, 0, 0, 1162, 1164, 1166, 1168, 1170, 1172, - 1174, 1176, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1178, 1180, 1182, 1184, 1186, 1188, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1190, 1193, 1195, 1199, 1201, 1205, - 1207, 1211, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, 0, 0, 0, - 0, 0, 0, 0, 0, 1229, 1231, 1233, 1235, 1237, 1239, - 1241, 1243, 1245, 1247, 1249, 1251, 1253, 1255, 0, 0, - }}, - {{ - 1257, 1262, 1267, 1272, 1277, 1282, 1287, 1292, 1297, 1300, 1303, - 1306, 1309, 1312, 1315, 1318, 1321, 1326, 1331, 1336, 1341, 1346, - 1351, 1356, 1361, 1364, 1367, 1370, 1373, 1376, 1379, 1382, - }}, - {{ - 1385, 1390, 1395, 1400, 1405, 1410, 1415, 1420, 1425, 1428, 1431, - 1434, 1437, 1440, 1443, 1446, 1449, 1451, 1453, 1456, 1461, 0, - 1464, 1467, 0, 0, 0, 0, 1471, 0, 1474, 0, - }}, - {{ - 0, 0, 1476, 1479, 1484, 0, 1487, 1490, 0, 0, 0, - 0, 1494, 0, 0, 0, 1497, 1499, 1501, 1505, 0, 0, - 1509, 1512, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1516, 1518, 1520, 1524, 1528, 1531, 1533, 1536, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1540, 1543, 1548, 0, - 1551, 1554, 0, 0, 0, 0, 1558, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1561, 1563, 1565, 1567, 1569, 1571, - 1573, 1575, 1577, 1579, 1581, 1583, 1585, 1587, 1589, 1591, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1593, 1595, 1597, 1599, 1601, 1603, - 1605, 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, 1623, - }}, - {{ - 1625, 1627, 1629, 1631, 1633, 1635, 1637, 1639, 1641, 1643, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1645, 1648, 1651, 1654, 1658, 1662, 1665, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1668, 1671, 1674, - 1677, 1680, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1683, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699, 1701, - 1703, 1705, 1707, 1709, 1711, 1713, 1715, 1717, 1719, 1721, 1723, - 1725, 1727, 1729, 1731, 1733, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned short v301_tolower_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 1, 0, 0, 0, 2, 0, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, - 17, 18, 0, 19, 20, 21, 22, 23, - 0, 24, 25, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 42, 0, 43, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 44, 45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v301_tolower_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, - 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, - 97, 0, 99, 101, 103, 105, 107, 109, 111, 0, - }}, - {{ - 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, - 0, 125, 0, 127, 0, 129, 0, 131, 0, 133, 0, - 135, 0, 137, 0, 139, 0, 141, 0, 143, 0, - }}, - {{ - 145, 0, 147, 0, 149, 0, 151, 0, 153, 0, 155, - 0, 157, 0, 159, 0, 161, 0, 163, 0, 165, 0, - 167, 0, 0, 169, 0, 171, 0, 173, 0, 175, - }}, - {{ - 0, 177, 0, 179, 0, 181, 0, 183, 0, 0, 185, - 0, 187, 0, 189, 0, 191, 0, 193, 0, 195, 0, - 197, 0, 199, 0, 201, 0, 203, 0, 205, 0, - }}, - {{ - 207, 0, 209, 0, 211, 0, 213, 0, 215, 0, 217, - 0, 219, 0, 221, 0, 223, 0, 225, 0, 227, 0, - 229, 0, 231, 233, 0, 235, 0, 237, 0, 0, - }}, - {{ - 0, 239, 241, 0, 243, 0, 245, 247, 0, 249, 251, - 253, 0, 0, 255, 257, 259, 261, 0, 263, 265, 0, - 267, 269, 271, 0, 0, 0, 273, 275, 0, 277, - }}, - {{ - 279, 0, 281, 0, 283, 0, 285, 287, 0, 289, 0, - 0, 291, 0, 293, 295, 0, 297, 299, 301, 0, 303, - 0, 305, 307, 0, 0, 0, 309, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 311, 313, 0, 315, 317, 0, 319, - 321, 0, 323, 0, 325, 0, 327, 0, 329, 0, 331, - 0, 333, 0, 335, 0, 337, 0, 0, 339, 0, - }}, - {{ - 341, 0, 343, 0, 345, 0, 347, 0, 349, 0, 351, - 0, 353, 0, 355, 0, 0, 357, 359, 0, 361, 0, - 363, 365, 367, 0, 369, 0, 371, 0, 373, 0, - }}, - {{ - 375, 0, 377, 0, 379, 0, 381, 0, 383, 0, 385, - 0, 387, 0, 389, 0, 391, 0, 393, 0, 395, 0, - 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, - }}, - {{ - 0, 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, - 0, 417, 0, 419, 0, 421, 0, 423, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 425, 0, 427, 429, 431, - 0, 433, 0, 435, 437, 0, 439, 441, 443, 445, 447, - 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, - }}, - {{ - 469, 471, 0, 473, 477, 479, 481, 483, 485, 487, 489, - 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 493, 0, 495, 0, 497, 0, - }}, - {{ - 499, 0, 501, 0, 503, 0, 505, 0, 507, 0, 509, - 0, 511, 0, 513, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, - 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, - 559, 561, 563, 565, 567, 569, 571, 573, 575, 577, - }}, - {{ - 579, 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, - 601, 603, 605, 607, 609, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 611, 0, 613, 0, 615, 0, 617, 0, 619, 0, 621, - 0, 623, 0, 625, 0, 627, 0, 629, 0, 631, 0, - 633, 0, 635, 0, 637, 0, 639, 0, 641, 0, - }}, - {{ - 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 645, 0, 647, 0, 649, 0, 651, 0, 653, 0, - 655, 0, 657, 0, 659, 0, 661, 0, 663, 0, - }}, - {{ - 665, 0, 667, 0, 669, 0, 671, 0, 673, 0, 675, - 0, 677, 0, 679, 0, 681, 0, 683, 0, 685, 0, - 687, 0, 689, 0, 691, 0, 693, 0, 695, 0, - }}, - {{ - 0, 697, 0, 699, 0, 0, 0, 701, 0, 0, 0, - 703, 0, 0, 0, 0, 705, 0, 707, 0, 709, 0, - 711, 0, 713, 0, 715, 0, 717, 0, 719, 0, - }}, - {{ - 721, 0, 723, 0, 725, 0, 727, 0, 729, 0, 731, - 0, 733, 0, 735, 0, 737, 0, 739, 0, 741, 0, - 0, 0, 743, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 745, 747, 749, 751, 753, - 755, 757, 759, 761, 763, 765, 767, 769, 771, 773, - }}, - {{ - 775, 777, 779, 781, 783, 785, 787, 789, 791, 793, 795, - 797, 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, - 819, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 821, 0, 823, 0, 825, 0, 827, 0, 829, 0, 831, - 0, 833, 0, 835, 0, 837, 0, 839, 0, 841, 0, - 843, 0, 845, 0, 847, 0, 849, 0, 851, 0, - }}, - {{ - 853, 0, 855, 0, 857, 0, 859, 0, 861, 0, 863, - 0, 865, 0, 867, 0, 869, 0, 871, 0, 873, 0, - 875, 0, 877, 0, 879, 0, 881, 0, 883, 0, - }}, - {{ - 885, 0, 887, 0, 889, 0, 891, 0, 893, 0, 895, - 0, 897, 0, 899, 0, 901, 0, 903, 0, 905, 0, - 907, 0, 909, 0, 911, 0, 913, 0, 915, 0, - }}, - {{ - 917, 0, 919, 0, 921, 0, 923, 0, 925, 0, 927, - 0, 929, 0, 931, 0, 933, 0, 935, 0, 937, 0, - 939, 0, 941, 0, 943, 0, 945, 0, 947, 0, - }}, - {{ - 949, 0, 951, 0, 953, 0, 955, 0, 957, 0, 959, - 0, 961, 0, 963, 0, 965, 0, 967, 0, 969, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 971, 0, 973, 0, 975, 0, 977, 0, 979, 0, 981, - 0, 983, 0, 985, 0, 987, 0, 989, 0, 991, 0, - 993, 0, 995, 0, 997, 0, 999, 0, 1001, 0, - }}, - {{ - 1003, 0, 1005, 0, 1007, 0, 1009, 0, 1011, 0, 1013, - 0, 1015, 0, 1017, 0, 1019, 0, 1021, 0, 1023, 0, - 1025, 0, 1027, 0, 1029, 0, 1031, 0, 1033, 0, - }}, - {{ - 1035, 0, 1037, 0, 1039, 0, 1041, 0, 1043, 0, 1045, - 0, 1047, 0, 1049, 0, 1051, 0, 1053, 0, 1055, 0, - 1057, 0, 1059, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1061, 1063, 1065, - 1067, 1069, 1071, 1073, 1075, 0, 0, 0, 0, 0, 0, - 0, 0, 1077, 1079, 1081, 1083, 1085, 1087, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1089, 1091, 1093, - 1095, 1097, 1099, 1101, 1103, 0, 0, 0, 0, 0, 0, - 0, 0, 1105, 1107, 1109, 1111, 1113, 1115, 1117, 1119, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1121, 1123, 1125, - 1127, 1129, 1131, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1133, 0, 1135, 0, 1137, 0, 1139, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1141, 1143, 1145, - 1147, 1149, 1151, 1153, 1155, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1157, 1161, 1165, - 1169, 1173, 1177, 1181, 1185, 0, 0, 0, 0, 0, 0, - 0, 0, 1189, 1193, 1197, 1201, 1205, 1209, 1213, 1217, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1221, 1225, 1229, - 1233, 1237, 1241, 1245, 1249, 0, 0, 0, 0, 0, 0, - 0, 0, 1253, 1255, 1257, 1259, 1261, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1265, 1267, 1269, - 1271, 1273, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1277, 1279, 1281, 1283, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1285, 1287, 1289, - 1291, 1293, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1295, 1297, 1299, 1301, 1303, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 1309, - 1311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1313, 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, 1333, - 1335, 1337, 1339, 1341, 1343, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1345, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, - }}, - {{ - 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, - 1387, 1389, 1391, 1393, 1395, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, 1413, 1415, - 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433, 1435, 1437, - 1439, 1441, 1443, 1445, 1447, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned long v301_toupper_seq[] = { - 0x00000000, 0x00000010, 0x80000041, 0x00000010, - 0x80000042, 0x00000010, 0x80000043, 0x00000010, - 0x80000044, 0x00000010, 0x80000045, 0x00000010, - 0x80000046, 0x00000010, 0x80000047, 0x00000010, - 0x80000048, 0x00000010, 0x80000049, 0x00000010, - 0x8000004a, 0x00000010, 0x8000004b, 0x00000010, - 0x8000004c, 0x00000010, 0x8000004d, 0x00000010, - 0x8000004e, 0x00000010, 0x8000004f, 0x00000010, - 0x80000050, 0x00000010, 0x80000051, 0x00000010, - 0x80000052, 0x00000010, 0x80000053, 0x00000010, - 0x80000054, 0x00000010, 0x80000055, 0x00000010, - 0x80000056, 0x00000010, 0x80000057, 0x00000010, - 0x80000058, 0x00000010, 0x80000059, 0x00000010, - 0x8000005a, 0x00000010, 0x8000039c, 0x00000010, - 0x00000053, 0x80000053, 0x00000010, 0x800000c0, - 0x00000010, 0x800000c1, 0x00000010, 0x800000c2, - 0x00000010, 0x800000c3, 0x00000010, 0x800000c4, - 0x00000010, 0x800000c5, 0x00000010, 0x800000c6, - 0x00000010, 0x800000c7, 0x00000010, 0x800000c8, - 0x00000010, 0x800000c9, 0x00000010, 0x800000ca, - 0x00000010, 0x800000cb, 0x00000010, 0x800000cc, - 0x00000010, 0x800000cd, 0x00000010, 0x800000ce, - 0x00000010, 0x800000cf, 0x00000010, 0x800000d0, - 0x00000010, 0x800000d1, 0x00000010, 0x800000d2, - 0x00000010, 0x800000d3, 0x00000010, 0x800000d4, - 0x00000010, 0x800000d5, 0x00000010, 0x800000d6, - 0x00000010, 0x800000d8, 0x00000010, 0x800000d9, - 0x00000010, 0x800000da, 0x00000010, 0x800000db, - 0x00000010, 0x800000dc, 0x00000010, 0x800000dd, - 0x00000010, 0x800000de, 0x00000010, 0x80000178, - 0x00000010, 0x80000100, 0x00000010, 0x80000102, - 0x00000010, 0x80000104, 0x00000010, 0x80000106, - 0x00000010, 0x80000108, 0x00000010, 0x8000010a, - 0x00000010, 0x8000010c, 0x00000010, 0x8000010e, - 0x00000010, 0x80000110, 0x00000010, 0x80000112, - 0x00000010, 0x80000114, 0x00000010, 0x80000116, - 0x00000010, 0x80000118, 0x00000010, 0x8000011a, - 0x00000010, 0x8000011c, 0x00000010, 0x8000011e, - 0x00000010, 0x80000120, 0x00000010, 0x80000122, - 0x00000010, 0x80000124, 0x00000010, 0x80000126, - 0x00000010, 0x80000128, 0x00000010, 0x8000012a, - 0x00000010, 0x8000012c, 0x00000010, 0x8000012e, - 0x00000010, 0x80000049, 0x00000010, 0x80000132, - 0x00000010, 0x80000134, 0x00000010, 0x80000136, - 0x00000010, 0x80000139, 0x00000010, 0x8000013b, - 0x00000010, 0x8000013d, 0x00000010, 0x8000013f, - 0x00000010, 0x80000141, 0x00000010, 0x80000143, - 0x00000010, 0x80000145, 0x00000010, 0x80000147, - 0x00000010, 0x000002bc, 0x8000004e, 0x00000010, - 0x8000014a, 0x00000010, 0x8000014c, 0x00000010, - 0x8000014e, 0x00000010, 0x80000150, 0x00000010, - 0x80000152, 0x00000010, 0x80000154, 0x00000010, - 0x80000156, 0x00000010, 0x80000158, 0x00000010, - 0x8000015a, 0x00000010, 0x8000015c, 0x00000010, - 0x8000015e, 0x00000010, 0x80000160, 0x00000010, - 0x80000162, 0x00000010, 0x80000164, 0x00000010, - 0x80000166, 0x00000010, 0x80000168, 0x00000010, - 0x8000016a, 0x00000010, 0x8000016c, 0x00000010, - 0x8000016e, 0x00000010, 0x80000170, 0x00000010, - 0x80000172, 0x00000010, 0x80000174, 0x00000010, - 0x80000176, 0x00000010, 0x80000179, 0x00000010, - 0x8000017b, 0x00000010, 0x8000017d, 0x00000010, - 0x80000053, 0x00000010, 0x80000182, 0x00000010, - 0x80000184, 0x00000010, 0x80000187, 0x00000010, - 0x8000018b, 0x00000010, 0x80000191, 0x00000010, - 0x800001f6, 0x00000010, 0x80000198, 0x00000010, - 0x800001a0, 0x00000010, 0x800001a2, 0x00000010, - 0x800001a4, 0x00000010, 0x800001a7, 0x00000010, - 0x800001ac, 0x00000010, 0x800001af, 0x00000010, - 0x800001b3, 0x00000010, 0x800001b5, 0x00000010, - 0x800001b8, 0x00000010, 0x800001bc, 0x00000010, - 0x800001f7, 0x00000010, 0x800001c4, 0x00000010, - 0x800001c4, 0x00000010, 0x800001c7, 0x00000010, - 0x800001c7, 0x00000010, 0x800001ca, 0x00000010, - 0x800001ca, 0x00000010, 0x800001cd, 0x00000010, - 0x800001cf, 0x00000010, 0x800001d1, 0x00000010, - 0x800001d3, 0x00000010, 0x800001d5, 0x00000010, - 0x800001d7, 0x00000010, 0x800001d9, 0x00000010, - 0x800001db, 0x00000010, 0x8000018e, 0x00000010, - 0x800001de, 0x00000010, 0x800001e0, 0x00000010, - 0x800001e2, 0x00000010, 0x800001e4, 0x00000010, - 0x800001e6, 0x00000010, 0x800001e8, 0x00000010, - 0x800001ea, 0x00000010, 0x800001ec, 0x00000010, - 0x800001ee, 0x00000010, 0x0000004a, 0x8000030c, - 0x00000010, 0x800001f1, 0x00000010, 0x800001f1, - 0x00000010, 0x800001f4, 0x00000010, 0x800001f8, - 0x00000010, 0x800001fa, 0x00000010, 0x800001fc, - 0x00000010, 0x800001fe, 0x00000010, 0x80000200, - 0x00000010, 0x80000202, 0x00000010, 0x80000204, - 0x00000010, 0x80000206, 0x00000010, 0x80000208, - 0x00000010, 0x8000020a, 0x00000010, 0x8000020c, - 0x00000010, 0x8000020e, 0x00000010, 0x80000210, - 0x00000010, 0x80000212, 0x00000010, 0x80000214, - 0x00000010, 0x80000216, 0x00000010, 0x80000218, - 0x00000010, 0x8000021a, 0x00000010, 0x8000021c, - 0x00000010, 0x8000021e, 0x00000010, 0x80000222, - 0x00000010, 0x80000224, 0x00000010, 0x80000226, - 0x00000010, 0x80000228, 0x00000010, 0x8000022a, - 0x00000010, 0x8000022c, 0x00000010, 0x8000022e, - 0x00000010, 0x80000230, 0x00000010, 0x80000232, - 0x00000010, 0x80000181, 0x00000010, 0x80000186, - 0x00000010, 0x80000189, 0x00000010, 0x8000018a, - 0x00000010, 0x8000018f, 0x00000010, 0x80000190, - 0x00000010, 0x80000193, 0x00000010, 0x80000194, - 0x00000010, 0x80000197, 0x00000010, 0x80000196, - 0x00000010, 0x8000019c, 0x00000010, 0x8000019d, - 0x00000010, 0x8000019f, 0x00000010, 0x800001a6, - 0x00000010, 0x800001a9, 0x00000010, 0x800001ae, - 0x00000010, 0x800001b1, 0x00000010, 0x800001b2, - 0x00000010, 0x800001b7, 0x00000010, 0x80000399, - 0x00000010, 0x00000399, 0x00000308, 0x80000301, - 0x00000010, 0x80000386, 0x00000010, 0x80000388, - 0x00000010, 0x80000389, 0x00000010, 0x8000038a, - 0x00000010, 0x000003a5, 0x00000308, 0x80000301, - 0x00000010, 0x80000391, 0x00000010, 0x80000392, - 0x00000010, 0x80000393, 0x00000010, 0x80000394, - 0x00000010, 0x80000395, 0x00000010, 0x80000396, - 0x00000010, 0x80000397, 0x00000010, 0x80000398, - 0x00000010, 0x80000399, 0x00000010, 0x8000039a, - 0x00000010, 0x8000039b, 0x00000010, 0x8000039c, - 0x00000010, 0x8000039d, 0x00000010, 0x8000039e, - 0x00000010, 0x8000039f, 0x00000010, 0x800003a0, - 0x00000010, 0x800003a1, 0x00000010, 0x800003a3, - 0x00000010, 0x800003a3, 0x00000010, 0x800003a4, - 0x00000010, 0x800003a5, 0x00000010, 0x800003a6, - 0x00000010, 0x800003a7, 0x00000010, 0x800003a8, - 0x00000010, 0x800003a9, 0x00000010, 0x800003aa, - 0x00000010, 0x800003ab, 0x00000010, 0x8000038c, - 0x00000010, 0x8000038e, 0x00000010, 0x8000038f, - 0x00000010, 0x80000392, 0x00000010, 0x80000398, - 0x00000010, 0x800003a6, 0x00000010, 0x800003a0, - 0x00000010, 0x800003da, 0x00000010, 0x800003dc, - 0x00000010, 0x800003de, 0x00000010, 0x800003e0, - 0x00000010, 0x800003e2, 0x00000010, 0x800003e4, - 0x00000010, 0x800003e6, 0x00000010, 0x800003e8, - 0x00000010, 0x800003ea, 0x00000010, 0x800003ec, - 0x00000010, 0x800003ee, 0x00000010, 0x8000039a, - 0x00000010, 0x800003a1, 0x00000010, 0x800003a3, - 0x00000010, 0x80000410, 0x00000010, 0x80000411, - 0x00000010, 0x80000412, 0x00000010, 0x80000413, - 0x00000010, 0x80000414, 0x00000010, 0x80000415, - 0x00000010, 0x80000416, 0x00000010, 0x80000417, - 0x00000010, 0x80000418, 0x00000010, 0x80000419, - 0x00000010, 0x8000041a, 0x00000010, 0x8000041b, - 0x00000010, 0x8000041c, 0x00000010, 0x8000041d, - 0x00000010, 0x8000041e, 0x00000010, 0x8000041f, - 0x00000010, 0x80000420, 0x00000010, 0x80000421, - 0x00000010, 0x80000422, 0x00000010, 0x80000423, - 0x00000010, 0x80000424, 0x00000010, 0x80000425, - 0x00000010, 0x80000426, 0x00000010, 0x80000427, - 0x00000010, 0x80000428, 0x00000010, 0x80000429, - 0x00000010, 0x8000042a, 0x00000010, 0x8000042b, - 0x00000010, 0x8000042c, 0x00000010, 0x8000042d, - 0x00000010, 0x8000042e, 0x00000010, 0x8000042f, - 0x00000010, 0x80000400, 0x00000010, 0x80000401, - 0x00000010, 0x80000402, 0x00000010, 0x80000403, - 0x00000010, 0x80000404, 0x00000010, 0x80000405, - 0x00000010, 0x80000406, 0x00000010, 0x80000407, - 0x00000010, 0x80000408, 0x00000010, 0x80000409, - 0x00000010, 0x8000040a, 0x00000010, 0x8000040b, - 0x00000010, 0x8000040c, 0x00000010, 0x8000040d, - 0x00000010, 0x8000040e, 0x00000010, 0x8000040f, - 0x00000010, 0x80000460, 0x00000010, 0x80000462, - 0x00000010, 0x80000464, 0x00000010, 0x80000466, - 0x00000010, 0x80000468, 0x00000010, 0x8000046a, - 0x00000010, 0x8000046c, 0x00000010, 0x8000046e, - 0x00000010, 0x80000470, 0x00000010, 0x80000472, - 0x00000010, 0x80000474, 0x00000010, 0x80000476, - 0x00000010, 0x80000478, 0x00000010, 0x8000047a, - 0x00000010, 0x8000047c, 0x00000010, 0x8000047e, - 0x00000010, 0x80000480, 0x00000010, 0x8000048c, - 0x00000010, 0x8000048e, 0x00000010, 0x80000490, - 0x00000010, 0x80000492, 0x00000010, 0x80000494, - 0x00000010, 0x80000496, 0x00000010, 0x80000498, - 0x00000010, 0x8000049a, 0x00000010, 0x8000049c, - 0x00000010, 0x8000049e, 0x00000010, 0x800004a0, - 0x00000010, 0x800004a2, 0x00000010, 0x800004a4, - 0x00000010, 0x800004a6, 0x00000010, 0x800004a8, - 0x00000010, 0x800004aa, 0x00000010, 0x800004ac, - 0x00000010, 0x800004ae, 0x00000010, 0x800004b0, - 0x00000010, 0x800004b2, 0x00000010, 0x800004b4, - 0x00000010, 0x800004b6, 0x00000010, 0x800004b8, - 0x00000010, 0x800004ba, 0x00000010, 0x800004bc, - 0x00000010, 0x800004be, 0x00000010, 0x800004c1, - 0x00000010, 0x800004c3, 0x00000010, 0x800004c7, - 0x00000010, 0x800004cb, 0x00000010, 0x800004d0, - 0x00000010, 0x800004d2, 0x00000010, 0x800004d4, - 0x00000010, 0x800004d6, 0x00000010, 0x800004d8, - 0x00000010, 0x800004da, 0x00000010, 0x800004dc, - 0x00000010, 0x800004de, 0x00000010, 0x800004e0, - 0x00000010, 0x800004e2, 0x00000010, 0x800004e4, - 0x00000010, 0x800004e6, 0x00000010, 0x800004e8, - 0x00000010, 0x800004ea, 0x00000010, 0x800004ec, - 0x00000010, 0x800004ee, 0x00000010, 0x800004f0, - 0x00000010, 0x800004f2, 0x00000010, 0x800004f4, - 0x00000010, 0x800004f8, 0x00000010, 0x80000531, - 0x00000010, 0x80000532, 0x00000010, 0x80000533, - 0x00000010, 0x80000534, 0x00000010, 0x80000535, - 0x00000010, 0x80000536, 0x00000010, 0x80000537, - 0x00000010, 0x80000538, 0x00000010, 0x80000539, - 0x00000010, 0x8000053a, 0x00000010, 0x8000053b, - 0x00000010, 0x8000053c, 0x00000010, 0x8000053d, - 0x00000010, 0x8000053e, 0x00000010, 0x8000053f, - 0x00000010, 0x80000540, 0x00000010, 0x80000541, - 0x00000010, 0x80000542, 0x00000010, 0x80000543, - 0x00000010, 0x80000544, 0x00000010, 0x80000545, - 0x00000010, 0x80000546, 0x00000010, 0x80000547, - 0x00000010, 0x80000548, 0x00000010, 0x80000549, - 0x00000010, 0x8000054a, 0x00000010, 0x8000054b, - 0x00000010, 0x8000054c, 0x00000010, 0x8000054d, - 0x00000010, 0x8000054e, 0x00000010, 0x8000054f, - 0x00000010, 0x80000550, 0x00000010, 0x80000551, - 0x00000010, 0x80000552, 0x00000010, 0x80000553, - 0x00000010, 0x80000554, 0x00000010, 0x80000555, - 0x00000010, 0x80000556, 0x00000010, 0x00000535, - 0x80000552, 0x00000010, 0x80001e00, 0x00000010, - 0x80001e02, 0x00000010, 0x80001e04, 0x00000010, - 0x80001e06, 0x00000010, 0x80001e08, 0x00000010, - 0x80001e0a, 0x00000010, 0x80001e0c, 0x00000010, - 0x80001e0e, 0x00000010, 0x80001e10, 0x00000010, - 0x80001e12, 0x00000010, 0x80001e14, 0x00000010, - 0x80001e16, 0x00000010, 0x80001e18, 0x00000010, - 0x80001e1a, 0x00000010, 0x80001e1c, 0x00000010, - 0x80001e1e, 0x00000010, 0x80001e20, 0x00000010, - 0x80001e22, 0x00000010, 0x80001e24, 0x00000010, - 0x80001e26, 0x00000010, 0x80001e28, 0x00000010, - 0x80001e2a, 0x00000010, 0x80001e2c, 0x00000010, - 0x80001e2e, 0x00000010, 0x80001e30, 0x00000010, - 0x80001e32, 0x00000010, 0x80001e34, 0x00000010, - 0x80001e36, 0x00000010, 0x80001e38, 0x00000010, - 0x80001e3a, 0x00000010, 0x80001e3c, 0x00000010, - 0x80001e3e, 0x00000010, 0x80001e40, 0x00000010, - 0x80001e42, 0x00000010, 0x80001e44, 0x00000010, - 0x80001e46, 0x00000010, 0x80001e48, 0x00000010, - 0x80001e4a, 0x00000010, 0x80001e4c, 0x00000010, - 0x80001e4e, 0x00000010, 0x80001e50, 0x00000010, - 0x80001e52, 0x00000010, 0x80001e54, 0x00000010, - 0x80001e56, 0x00000010, 0x80001e58, 0x00000010, - 0x80001e5a, 0x00000010, 0x80001e5c, 0x00000010, - 0x80001e5e, 0x00000010, 0x80001e60, 0x00000010, - 0x80001e62, 0x00000010, 0x80001e64, 0x00000010, - 0x80001e66, 0x00000010, 0x80001e68, 0x00000010, - 0x80001e6a, 0x00000010, 0x80001e6c, 0x00000010, - 0x80001e6e, 0x00000010, 0x80001e70, 0x00000010, - 0x80001e72, 0x00000010, 0x80001e74, 0x00000010, - 0x80001e76, 0x00000010, 0x80001e78, 0x00000010, - 0x80001e7a, 0x00000010, 0x80001e7c, 0x00000010, - 0x80001e7e, 0x00000010, 0x80001e80, 0x00000010, - 0x80001e82, 0x00000010, 0x80001e84, 0x00000010, - 0x80001e86, 0x00000010, 0x80001e88, 0x00000010, - 0x80001e8a, 0x00000010, 0x80001e8c, 0x00000010, - 0x80001e8e, 0x00000010, 0x80001e90, 0x00000010, - 0x80001e92, 0x00000010, 0x80001e94, 0x00000010, - 0x00000048, 0x80000331, 0x00000010, 0x00000054, - 0x80000308, 0x00000010, 0x00000057, 0x8000030a, - 0x00000010, 0x00000059, 0x8000030a, 0x00000010, - 0x00000041, 0x800002be, 0x00000010, 0x80001e60, - 0x00000010, 0x80001ea0, 0x00000010, 0x80001ea2, - 0x00000010, 0x80001ea4, 0x00000010, 0x80001ea6, - 0x00000010, 0x80001ea8, 0x00000010, 0x80001eaa, - 0x00000010, 0x80001eac, 0x00000010, 0x80001eae, - 0x00000010, 0x80001eb0, 0x00000010, 0x80001eb2, - 0x00000010, 0x80001eb4, 0x00000010, 0x80001eb6, - 0x00000010, 0x80001eb8, 0x00000010, 0x80001eba, - 0x00000010, 0x80001ebc, 0x00000010, 0x80001ebe, - 0x00000010, 0x80001ec0, 0x00000010, 0x80001ec2, - 0x00000010, 0x80001ec4, 0x00000010, 0x80001ec6, - 0x00000010, 0x80001ec8, 0x00000010, 0x80001eca, - 0x00000010, 0x80001ecc, 0x00000010, 0x80001ece, - 0x00000010, 0x80001ed0, 0x00000010, 0x80001ed2, - 0x00000010, 0x80001ed4, 0x00000010, 0x80001ed6, - 0x00000010, 0x80001ed8, 0x00000010, 0x80001eda, - 0x00000010, 0x80001edc, 0x00000010, 0x80001ede, - 0x00000010, 0x80001ee0, 0x00000010, 0x80001ee2, - 0x00000010, 0x80001ee4, 0x00000010, 0x80001ee6, - 0x00000010, 0x80001ee8, 0x00000010, 0x80001eea, - 0x00000010, 0x80001eec, 0x00000010, 0x80001eee, - 0x00000010, 0x80001ef0, 0x00000010, 0x80001ef2, - 0x00000010, 0x80001ef4, 0x00000010, 0x80001ef6, - 0x00000010, 0x80001ef8, 0x00000010, 0x80001f08, - 0x00000010, 0x80001f09, 0x00000010, 0x80001f0a, - 0x00000010, 0x80001f0b, 0x00000010, 0x80001f0c, - 0x00000010, 0x80001f0d, 0x00000010, 0x80001f0e, - 0x00000010, 0x80001f0f, 0x00000010, 0x80001f18, - 0x00000010, 0x80001f19, 0x00000010, 0x80001f1a, - 0x00000010, 0x80001f1b, 0x00000010, 0x80001f1c, - 0x00000010, 0x80001f1d, 0x00000010, 0x80001f28, - 0x00000010, 0x80001f29, 0x00000010, 0x80001f2a, - 0x00000010, 0x80001f2b, 0x00000010, 0x80001f2c, - 0x00000010, 0x80001f2d, 0x00000010, 0x80001f2e, - 0x00000010, 0x80001f2f, 0x00000010, 0x80001f38, - 0x00000010, 0x80001f39, 0x00000010, 0x80001f3a, - 0x00000010, 0x80001f3b, 0x00000010, 0x80001f3c, - 0x00000010, 0x80001f3d, 0x00000010, 0x80001f3e, - 0x00000010, 0x80001f3f, 0x00000010, 0x80001f48, - 0x00000010, 0x80001f49, 0x00000010, 0x80001f4a, - 0x00000010, 0x80001f4b, 0x00000010, 0x80001f4c, - 0x00000010, 0x80001f4d, 0x00000010, 0x000003a5, - 0x80000313, 0x00000010, 0x80001f59, 0x00000010, - 0x000003a5, 0x00000313, 0x80000300, 0x00000010, - 0x80001f5b, 0x00000010, 0x000003a5, 0x00000313, - 0x80000301, 0x00000010, 0x80001f5d, 0x00000010, - 0x000003a5, 0x00000313, 0x80000342, 0x00000010, - 0x80001f5f, 0x00000010, 0x80001f68, 0x00000010, - 0x80001f69, 0x00000010, 0x80001f6a, 0x00000010, - 0x80001f6b, 0x00000010, 0x80001f6c, 0x00000010, - 0x80001f6d, 0x00000010, 0x80001f6e, 0x00000010, - 0x80001f6f, 0x00000010, 0x80001fba, 0x00000010, - 0x80001fbb, 0x00000010, 0x80001fc8, 0x00000010, - 0x80001fc9, 0x00000010, 0x80001fca, 0x00000010, - 0x80001fcb, 0x00000010, 0x80001fda, 0x00000010, - 0x80001fdb, 0x00000010, 0x80001ff8, 0x00000010, - 0x80001ff9, 0x00000010, 0x80001fea, 0x00000010, - 0x80001feb, 0x00000010, 0x80001ffa, 0x00000010, - 0x80001ffb, 0x00000000, 0x00001f08, 0x80000399, - 0x00000010, 0x80001f88, 0x00000000, 0x00001f09, - 0x80000399, 0x00000010, 0x80001f89, 0x00000000, - 0x00001f0a, 0x80000399, 0x00000010, 0x80001f8a, - 0x00000000, 0x00001f0b, 0x80000399, 0x00000010, - 0x80001f8b, 0x00000000, 0x00001f0c, 0x80000399, - 0x00000010, 0x80001f8c, 0x00000000, 0x00001f0d, - 0x80000399, 0x00000010, 0x80001f8d, 0x00000000, - 0x00001f0e, 0x80000399, 0x00000010, 0x80001f8e, - 0x00000000, 0x00001f0f, 0x80000399, 0x00000010, - 0x80001f8f, 0x00000010, 0x00001f08, 0x80000399, - 0x00000010, 0x00001f09, 0x80000399, 0x00000010, - 0x00001f0a, 0x80000399, 0x00000010, 0x00001f0b, - 0x80000399, 0x00000010, 0x00001f0c, 0x80000399, - 0x00000010, 0x00001f0d, 0x80000399, 0x00000010, - 0x00001f0e, 0x80000399, 0x00000010, 0x00001f0f, - 0x80000399, 0x00000000, 0x00001f28, 0x80000399, - 0x00000010, 0x80001f98, 0x00000000, 0x00001f29, - 0x80000399, 0x00000010, 0x80001f99, 0x00000000, - 0x00001f2a, 0x80000399, 0x00000010, 0x80001f9a, - 0x00000000, 0x00001f2b, 0x80000399, 0x00000010, - 0x80001f9b, 0x00000000, 0x00001f2c, 0x80000399, - 0x00000010, 0x80001f9c, 0x00000000, 0x00001f2d, - 0x80000399, 0x00000010, 0x80001f9d, 0x00000000, - 0x00001f2e, 0x80000399, 0x00000010, 0x80001f9e, - 0x00000000, 0x00001f2f, 0x80000399, 0x00000010, - 0x80001f9f, 0x00000010, 0x00001f28, 0x80000399, - 0x00000010, 0x00001f29, 0x80000399, 0x00000010, - 0x00001f2a, 0x80000399, 0x00000010, 0x00001f2b, - 0x80000399, 0x00000010, 0x00001f2c, 0x80000399, - 0x00000010, 0x00001f2d, 0x80000399, 0x00000010, - 0x00001f2e, 0x80000399, 0x00000010, 0x00001f2f, - 0x80000399, 0x00000000, 0x00001f68, 0x80000399, - 0x00000010, 0x80001fa8, 0x00000000, 0x00001f69, - 0x80000399, 0x00000010, 0x80001fa9, 0x00000000, - 0x00001f6a, 0x80000399, 0x00000010, 0x80001faa, - 0x00000000, 0x00001f6b, 0x80000399, 0x00000010, - 0x80001fab, 0x00000000, 0x00001f6c, 0x80000399, - 0x00000010, 0x80001fac, 0x00000000, 0x00001f6d, - 0x80000399, 0x00000010, 0x80001fad, 0x00000000, - 0x00001f6e, 0x80000399, 0x00000010, 0x80001fae, - 0x00000000, 0x00001f6f, 0x80000399, 0x00000010, - 0x80001faf, 0x00000010, 0x00001f68, 0x80000399, - 0x00000010, 0x00001f69, 0x80000399, 0x00000010, - 0x00001f6a, 0x80000399, 0x00000010, 0x00001f6b, - 0x80000399, 0x00000010, 0x00001f6c, 0x80000399, - 0x00000010, 0x00001f6d, 0x80000399, 0x00000010, - 0x00001f6e, 0x80000399, 0x00000010, 0x00001f6f, - 0x80000399, 0x00000010, 0x80001fb8, 0x00000010, - 0x80001fb9, 0x00000010, 0x00001fba, 0x80000399, - 0x00000000, 0x00000391, 0x80000399, 0x00000010, - 0x80001fbc, 0x00000010, 0x00000386, 0x80000399, - 0x00000010, 0x00000391, 0x80000342, 0x00000010, - 0x00000391, 0x00000342, 0x80000399, 0x00000010, - 0x00000391, 0x80000399, 0x00000010, 0x80000399, - 0x00000010, 0x00001fca, 0x80000399, 0x00000000, - 0x00000397, 0x80000399, 0x00000010, 0x80001fcc, - 0x00000010, 0x00000389, 0x80000399, 0x00000010, - 0x00000397, 0x80000342, 0x00000010, 0x00000397, - 0x00000342, 0x80000399, 0x00000010, 0x00000397, - 0x80000399, 0x00000010, 0x80001fd8, 0x00000010, - 0x80001fd9, 0x00000010, 0x00000399, 0x00000308, - 0x80000300, 0x00000010, 0x00000399, 0x00000308, - 0x80000301, 0x00000010, 0x00000399, 0x80000342, - 0x00000010, 0x00000399, 0x00000308, 0x80000342, - 0x00000010, 0x80001fe8, 0x00000010, 0x80001fe9, - 0x00000010, 0x000003a5, 0x00000308, 0x80000300, - 0x00000010, 0x000003a5, 0x00000308, 0x80000301, - 0x00000010, 0x000003a1, 0x80000313, 0x00000010, - 0x80001fec, 0x00000010, 0x000003a5, 0x80000342, - 0x00000010, 0x000003a5, 0x00000308, 0x80000342, - 0x00000010, 0x00001ffa, 0x80000399, 0x00000000, - 0x000003a9, 0x80000399, 0x00000010, 0x80001ffc, - 0x00000010, 0x0000038f, 0x80000399, 0x00000010, - 0x000003a9, 0x80000342, 0x00000010, 0x000003a9, - 0x00000342, 0x80000399, 0x00000010, 0x000003a9, - 0x80000399, 0x00000010, 0x80002160, 0x00000010, - 0x80002161, 0x00000010, 0x80002162, 0x00000010, - 0x80002163, 0x00000010, 0x80002164, 0x00000010, - 0x80002165, 0x00000010, 0x80002166, 0x00000010, - 0x80002167, 0x00000010, 0x80002168, 0x00000010, - 0x80002169, 0x00000010, 0x8000216a, 0x00000010, - 0x8000216b, 0x00000010, 0x8000216c, 0x00000010, - 0x8000216d, 0x00000010, 0x8000216e, 0x00000010, - 0x8000216f, 0x00000010, 0x800024b6, 0x00000010, - 0x800024b7, 0x00000010, 0x800024b8, 0x00000010, - 0x800024b9, 0x00000010, 0x800024ba, 0x00000010, - 0x800024bb, 0x00000010, 0x800024bc, 0x00000010, - 0x800024bd, 0x00000010, 0x800024be, 0x00000010, - 0x800024bf, 0x00000010, 0x800024c0, 0x00000010, - 0x800024c1, 0x00000010, 0x800024c2, 0x00000010, - 0x800024c3, 0x00000010, 0x800024c4, 0x00000010, - 0x800024c5, 0x00000010, 0x800024c6, 0x00000010, - 0x800024c7, 0x00000010, 0x800024c8, 0x00000010, - 0x800024c9, 0x00000010, 0x800024ca, 0x00000010, - 0x800024cb, 0x00000010, 0x800024cc, 0x00000010, - 0x800024cd, 0x00000010, 0x800024ce, 0x00000010, - 0x800024cf, 0x00000010, 0x00000046, 0x80000046, - 0x00000010, 0x00000046, 0x80000049, 0x00000010, - 0x00000046, 0x8000004c, 0x00000010, 0x00000046, - 0x00000046, 0x80000049, 0x00000010, 0x00000046, - 0x00000046, 0x8000004c, 0x00000010, 0x00000053, - 0x80000054, 0x00000010, 0x00000053, 0x80000054, - 0x00000010, 0x00000544, 0x80000546, 0x00000010, - 0x00000544, 0x80000535, 0x00000010, 0x00000544, - 0x8000053b, 0x00000010, 0x0000054e, 0x80000546, - 0x00000010, 0x00000544, 0x8000053d, 0x00000010, - 0x8000ff21, 0x00000010, 0x8000ff22, 0x00000010, - 0x8000ff23, 0x00000010, 0x8000ff24, 0x00000010, - 0x8000ff25, 0x00000010, 0x8000ff26, 0x00000010, - 0x8000ff27, 0x00000010, 0x8000ff28, 0x00000010, - 0x8000ff29, 0x00000010, 0x8000ff2a, 0x00000010, - 0x8000ff2b, 0x00000010, 0x8000ff2c, 0x00000010, - 0x8000ff2d, 0x00000010, 0x8000ff2e, 0x00000010, - 0x8000ff2f, 0x00000010, 0x8000ff30, 0x00000010, - 0x8000ff31, 0x00000010, 0x8000ff32, 0x00000010, - 0x8000ff33, 0x00000010, 0x8000ff34, 0x00000010, - 0x8000ff35, 0x00000010, 0x8000ff36, 0x00000010, - 0x8000ff37, 0x00000010, 0x8000ff38, 0x00000010, - 0x8000ff39, 0x00000010, 0x8000ff3a, -}; - -static const unsigned long v301_tolower_seq[] = { - 0x00000000, 0x00000010, 0x80000061, 0x00000010, - 0x80000062, 0x00000010, 0x80000063, 0x00000010, - 0x80000064, 0x00000010, 0x80000065, 0x00000010, - 0x80000066, 0x00000010, 0x80000067, 0x00000010, - 0x80000068, 0x00000010, 0x80000069, 0x00000010, - 0x8000006a, 0x00000010, 0x8000006b, 0x00000010, - 0x8000006c, 0x00000010, 0x8000006d, 0x00000010, - 0x8000006e, 0x00000010, 0x8000006f, 0x00000010, - 0x80000070, 0x00000010, 0x80000071, 0x00000010, - 0x80000072, 0x00000010, 0x80000073, 0x00000010, - 0x80000074, 0x00000010, 0x80000075, 0x00000010, - 0x80000076, 0x00000010, 0x80000077, 0x00000010, - 0x80000078, 0x00000010, 0x80000079, 0x00000010, - 0x8000007a, 0x00000010, 0x800000e0, 0x00000010, - 0x800000e1, 0x00000010, 0x800000e2, 0x00000010, - 0x800000e3, 0x00000010, 0x800000e4, 0x00000010, - 0x800000e5, 0x00000010, 0x800000e6, 0x00000010, - 0x800000e7, 0x00000010, 0x800000e8, 0x00000010, - 0x800000e9, 0x00000010, 0x800000ea, 0x00000010, - 0x800000eb, 0x00000010, 0x800000ec, 0x00000010, - 0x800000ed, 0x00000010, 0x800000ee, 0x00000010, - 0x800000ef, 0x00000010, 0x800000f0, 0x00000010, - 0x800000f1, 0x00000010, 0x800000f2, 0x00000010, - 0x800000f3, 0x00000010, 0x800000f4, 0x00000010, - 0x800000f5, 0x00000010, 0x800000f6, 0x00000010, - 0x800000f8, 0x00000010, 0x800000f9, 0x00000010, - 0x800000fa, 0x00000010, 0x800000fb, 0x00000010, - 0x800000fc, 0x00000010, 0x800000fd, 0x00000010, - 0x800000fe, 0x00000010, 0x80000101, 0x00000010, - 0x80000103, 0x00000010, 0x80000105, 0x00000010, - 0x80000107, 0x00000010, 0x80000109, 0x00000010, - 0x8000010b, 0x00000010, 0x8000010d, 0x00000010, - 0x8000010f, 0x00000010, 0x80000111, 0x00000010, - 0x80000113, 0x00000010, 0x80000115, 0x00000010, - 0x80000117, 0x00000010, 0x80000119, 0x00000010, - 0x8000011b, 0x00000010, 0x8000011d, 0x00000010, - 0x8000011f, 0x00000010, 0x80000121, 0x00000010, - 0x80000123, 0x00000010, 0x80000125, 0x00000010, - 0x80000127, 0x00000010, 0x80000129, 0x00000010, - 0x8000012b, 0x00000010, 0x8000012d, 0x00000010, - 0x8000012f, 0x00000010, 0x80000069, 0x00000010, - 0x80000133, 0x00000010, 0x80000135, 0x00000010, - 0x80000137, 0x00000010, 0x8000013a, 0x00000010, - 0x8000013c, 0x00000010, 0x8000013e, 0x00000010, - 0x80000140, 0x00000010, 0x80000142, 0x00000010, - 0x80000144, 0x00000010, 0x80000146, 0x00000010, - 0x80000148, 0x00000010, 0x8000014b, 0x00000010, - 0x8000014d, 0x00000010, 0x8000014f, 0x00000010, - 0x80000151, 0x00000010, 0x80000153, 0x00000010, - 0x80000155, 0x00000010, 0x80000157, 0x00000010, - 0x80000159, 0x00000010, 0x8000015b, 0x00000010, - 0x8000015d, 0x00000010, 0x8000015f, 0x00000010, - 0x80000161, 0x00000010, 0x80000163, 0x00000010, - 0x80000165, 0x00000010, 0x80000167, 0x00000010, - 0x80000169, 0x00000010, 0x8000016b, 0x00000010, - 0x8000016d, 0x00000010, 0x8000016f, 0x00000010, - 0x80000171, 0x00000010, 0x80000173, 0x00000010, - 0x80000175, 0x00000010, 0x80000177, 0x00000010, - 0x800000ff, 0x00000010, 0x8000017a, 0x00000010, - 0x8000017c, 0x00000010, 0x8000017e, 0x00000010, - 0x80000253, 0x00000010, 0x80000183, 0x00000010, - 0x80000185, 0x00000010, 0x80000254, 0x00000010, - 0x80000188, 0x00000010, 0x80000256, 0x00000010, - 0x80000257, 0x00000010, 0x8000018c, 0x00000010, - 0x800001dd, 0x00000010, 0x80000259, 0x00000010, - 0x8000025b, 0x00000010, 0x80000192, 0x00000010, - 0x80000260, 0x00000010, 0x80000263, 0x00000010, - 0x80000269, 0x00000010, 0x80000268, 0x00000010, - 0x80000199, 0x00000010, 0x8000026f, 0x00000010, - 0x80000272, 0x00000010, 0x80000275, 0x00000010, - 0x800001a1, 0x00000010, 0x800001a3, 0x00000010, - 0x800001a5, 0x00000010, 0x80000280, 0x00000010, - 0x800001a8, 0x00000010, 0x80000283, 0x00000010, - 0x800001ad, 0x00000010, 0x80000288, 0x00000010, - 0x800001b0, 0x00000010, 0x8000028a, 0x00000010, - 0x8000028b, 0x00000010, 0x800001b4, 0x00000010, - 0x800001b6, 0x00000010, 0x80000292, 0x00000010, - 0x800001b9, 0x00000010, 0x800001bd, 0x00000010, - 0x800001c6, 0x00000010, 0x800001c6, 0x00000010, - 0x800001c9, 0x00000010, 0x800001c9, 0x00000010, - 0x800001cc, 0x00000010, 0x800001cc, 0x00000010, - 0x800001ce, 0x00000010, 0x800001d0, 0x00000010, - 0x800001d2, 0x00000010, 0x800001d4, 0x00000010, - 0x800001d6, 0x00000010, 0x800001d8, 0x00000010, - 0x800001da, 0x00000010, 0x800001dc, 0x00000010, - 0x800001df, 0x00000010, 0x800001e1, 0x00000010, - 0x800001e3, 0x00000010, 0x800001e5, 0x00000010, - 0x800001e7, 0x00000010, 0x800001e9, 0x00000010, - 0x800001eb, 0x00000010, 0x800001ed, 0x00000010, - 0x800001ef, 0x00000010, 0x800001f3, 0x00000010, - 0x800001f3, 0x00000010, 0x800001f5, 0x00000010, - 0x80000195, 0x00000010, 0x800001bf, 0x00000010, - 0x800001f9, 0x00000010, 0x800001fb, 0x00000010, - 0x800001fd, 0x00000010, 0x800001ff, 0x00000010, - 0x80000201, 0x00000010, 0x80000203, 0x00000010, - 0x80000205, 0x00000010, 0x80000207, 0x00000010, - 0x80000209, 0x00000010, 0x8000020b, 0x00000010, - 0x8000020d, 0x00000010, 0x8000020f, 0x00000010, - 0x80000211, 0x00000010, 0x80000213, 0x00000010, - 0x80000215, 0x00000010, 0x80000217, 0x00000010, - 0x80000219, 0x00000010, 0x8000021b, 0x00000010, - 0x8000021d, 0x00000010, 0x8000021f, 0x00000010, - 0x80000223, 0x00000010, 0x80000225, 0x00000010, - 0x80000227, 0x00000010, 0x80000229, 0x00000010, - 0x8000022b, 0x00000010, 0x8000022d, 0x00000010, - 0x8000022f, 0x00000010, 0x80000231, 0x00000010, - 0x80000233, 0x00000010, 0x800003ac, 0x00000010, - 0x800003ad, 0x00000010, 0x800003ae, 0x00000010, - 0x800003af, 0x00000010, 0x800003cc, 0x00000010, - 0x800003cd, 0x00000010, 0x800003ce, 0x00000010, - 0x800003b1, 0x00000010, 0x800003b2, 0x00000010, - 0x800003b3, 0x00000010, 0x800003b4, 0x00000010, - 0x800003b5, 0x00000010, 0x800003b6, 0x00000010, - 0x800003b7, 0x00000010, 0x800003b8, 0x00000010, - 0x800003b9, 0x00000010, 0x800003ba, 0x00000010, - 0x800003bb, 0x00000010, 0x800003bc, 0x00000010, - 0x800003bd, 0x00000010, 0x800003be, 0x00000010, - 0x800003bf, 0x00000010, 0x800003c0, 0x00000010, - 0x800003c1, 0x00000001, 0x800003c2, 0x00000010, - 0x800003c3, 0x00000010, 0x800003c4, 0x00000010, - 0x800003c5, 0x00000010, 0x800003c6, 0x00000010, - 0x800003c7, 0x00000010, 0x800003c8, 0x00000010, - 0x800003c9, 0x00000010, 0x800003ca, 0x00000010, - 0x800003cb, 0x00000010, 0x800003db, 0x00000010, - 0x800003dd, 0x00000010, 0x800003df, 0x00000010, - 0x800003e1, 0x00000010, 0x800003e3, 0x00000010, - 0x800003e5, 0x00000010, 0x800003e7, 0x00000010, - 0x800003e9, 0x00000010, 0x800003eb, 0x00000010, - 0x800003ed, 0x00000010, 0x800003ef, 0x00000010, - 0x80000450, 0x00000010, 0x80000451, 0x00000010, - 0x80000452, 0x00000010, 0x80000453, 0x00000010, - 0x80000454, 0x00000010, 0x80000455, 0x00000010, - 0x80000456, 0x00000010, 0x80000457, 0x00000010, - 0x80000458, 0x00000010, 0x80000459, 0x00000010, - 0x8000045a, 0x00000010, 0x8000045b, 0x00000010, - 0x8000045c, 0x00000010, 0x8000045d, 0x00000010, - 0x8000045e, 0x00000010, 0x8000045f, 0x00000010, - 0x80000430, 0x00000010, 0x80000431, 0x00000010, - 0x80000432, 0x00000010, 0x80000433, 0x00000010, - 0x80000434, 0x00000010, 0x80000435, 0x00000010, - 0x80000436, 0x00000010, 0x80000437, 0x00000010, - 0x80000438, 0x00000010, 0x80000439, 0x00000010, - 0x8000043a, 0x00000010, 0x8000043b, 0x00000010, - 0x8000043c, 0x00000010, 0x8000043d, 0x00000010, - 0x8000043e, 0x00000010, 0x8000043f, 0x00000010, - 0x80000440, 0x00000010, 0x80000441, 0x00000010, - 0x80000442, 0x00000010, 0x80000443, 0x00000010, - 0x80000444, 0x00000010, 0x80000445, 0x00000010, - 0x80000446, 0x00000010, 0x80000447, 0x00000010, - 0x80000448, 0x00000010, 0x80000449, 0x00000010, - 0x8000044a, 0x00000010, 0x8000044b, 0x00000010, - 0x8000044c, 0x00000010, 0x8000044d, 0x00000010, - 0x8000044e, 0x00000010, 0x8000044f, 0x00000010, - 0x80000461, 0x00000010, 0x80000463, 0x00000010, - 0x80000465, 0x00000010, 0x80000467, 0x00000010, - 0x80000469, 0x00000010, 0x8000046b, 0x00000010, - 0x8000046d, 0x00000010, 0x8000046f, 0x00000010, - 0x80000471, 0x00000010, 0x80000473, 0x00000010, - 0x80000475, 0x00000010, 0x80000477, 0x00000010, - 0x80000479, 0x00000010, 0x8000047b, 0x00000010, - 0x8000047d, 0x00000010, 0x8000047f, 0x00000010, - 0x80000481, 0x00000010, 0x8000048d, 0x00000010, - 0x8000048f, 0x00000010, 0x80000491, 0x00000010, - 0x80000493, 0x00000010, 0x80000495, 0x00000010, - 0x80000497, 0x00000010, 0x80000499, 0x00000010, - 0x8000049b, 0x00000010, 0x8000049d, 0x00000010, - 0x8000049f, 0x00000010, 0x800004a1, 0x00000010, - 0x800004a3, 0x00000010, 0x800004a5, 0x00000010, - 0x800004a7, 0x00000010, 0x800004a9, 0x00000010, - 0x800004ab, 0x00000010, 0x800004ad, 0x00000010, - 0x800004af, 0x00000010, 0x800004b1, 0x00000010, - 0x800004b3, 0x00000010, 0x800004b5, 0x00000010, - 0x800004b7, 0x00000010, 0x800004b9, 0x00000010, - 0x800004bb, 0x00000010, 0x800004bd, 0x00000010, - 0x800004bf, 0x00000010, 0x800004c2, 0x00000010, - 0x800004c4, 0x00000010, 0x800004c8, 0x00000010, - 0x800004cc, 0x00000010, 0x800004d1, 0x00000010, - 0x800004d3, 0x00000010, 0x800004d5, 0x00000010, - 0x800004d7, 0x00000010, 0x800004d9, 0x00000010, - 0x800004db, 0x00000010, 0x800004dd, 0x00000010, - 0x800004df, 0x00000010, 0x800004e1, 0x00000010, - 0x800004e3, 0x00000010, 0x800004e5, 0x00000010, - 0x800004e7, 0x00000010, 0x800004e9, 0x00000010, - 0x800004eb, 0x00000010, 0x800004ed, 0x00000010, - 0x800004ef, 0x00000010, 0x800004f1, 0x00000010, - 0x800004f3, 0x00000010, 0x800004f5, 0x00000010, - 0x800004f9, 0x00000010, 0x80000561, 0x00000010, - 0x80000562, 0x00000010, 0x80000563, 0x00000010, - 0x80000564, 0x00000010, 0x80000565, 0x00000010, - 0x80000566, 0x00000010, 0x80000567, 0x00000010, - 0x80000568, 0x00000010, 0x80000569, 0x00000010, - 0x8000056a, 0x00000010, 0x8000056b, 0x00000010, - 0x8000056c, 0x00000010, 0x8000056d, 0x00000010, - 0x8000056e, 0x00000010, 0x8000056f, 0x00000010, - 0x80000570, 0x00000010, 0x80000571, 0x00000010, - 0x80000572, 0x00000010, 0x80000573, 0x00000010, - 0x80000574, 0x00000010, 0x80000575, 0x00000010, - 0x80000576, 0x00000010, 0x80000577, 0x00000010, - 0x80000578, 0x00000010, 0x80000579, 0x00000010, - 0x8000057a, 0x00000010, 0x8000057b, 0x00000010, - 0x8000057c, 0x00000010, 0x8000057d, 0x00000010, - 0x8000057e, 0x00000010, 0x8000057f, 0x00000010, - 0x80000580, 0x00000010, 0x80000581, 0x00000010, - 0x80000582, 0x00000010, 0x80000583, 0x00000010, - 0x80000584, 0x00000010, 0x80000585, 0x00000010, - 0x80000586, 0x00000010, 0x80001e01, 0x00000010, - 0x80001e03, 0x00000010, 0x80001e05, 0x00000010, - 0x80001e07, 0x00000010, 0x80001e09, 0x00000010, - 0x80001e0b, 0x00000010, 0x80001e0d, 0x00000010, - 0x80001e0f, 0x00000010, 0x80001e11, 0x00000010, - 0x80001e13, 0x00000010, 0x80001e15, 0x00000010, - 0x80001e17, 0x00000010, 0x80001e19, 0x00000010, - 0x80001e1b, 0x00000010, 0x80001e1d, 0x00000010, - 0x80001e1f, 0x00000010, 0x80001e21, 0x00000010, - 0x80001e23, 0x00000010, 0x80001e25, 0x00000010, - 0x80001e27, 0x00000010, 0x80001e29, 0x00000010, - 0x80001e2b, 0x00000010, 0x80001e2d, 0x00000010, - 0x80001e2f, 0x00000010, 0x80001e31, 0x00000010, - 0x80001e33, 0x00000010, 0x80001e35, 0x00000010, - 0x80001e37, 0x00000010, 0x80001e39, 0x00000010, - 0x80001e3b, 0x00000010, 0x80001e3d, 0x00000010, - 0x80001e3f, 0x00000010, 0x80001e41, 0x00000010, - 0x80001e43, 0x00000010, 0x80001e45, 0x00000010, - 0x80001e47, 0x00000010, 0x80001e49, 0x00000010, - 0x80001e4b, 0x00000010, 0x80001e4d, 0x00000010, - 0x80001e4f, 0x00000010, 0x80001e51, 0x00000010, - 0x80001e53, 0x00000010, 0x80001e55, 0x00000010, - 0x80001e57, 0x00000010, 0x80001e59, 0x00000010, - 0x80001e5b, 0x00000010, 0x80001e5d, 0x00000010, - 0x80001e5f, 0x00000010, 0x80001e61, 0x00000010, - 0x80001e63, 0x00000010, 0x80001e65, 0x00000010, - 0x80001e67, 0x00000010, 0x80001e69, 0x00000010, - 0x80001e6b, 0x00000010, 0x80001e6d, 0x00000010, - 0x80001e6f, 0x00000010, 0x80001e71, 0x00000010, - 0x80001e73, 0x00000010, 0x80001e75, 0x00000010, - 0x80001e77, 0x00000010, 0x80001e79, 0x00000010, - 0x80001e7b, 0x00000010, 0x80001e7d, 0x00000010, - 0x80001e7f, 0x00000010, 0x80001e81, 0x00000010, - 0x80001e83, 0x00000010, 0x80001e85, 0x00000010, - 0x80001e87, 0x00000010, 0x80001e89, 0x00000010, - 0x80001e8b, 0x00000010, 0x80001e8d, 0x00000010, - 0x80001e8f, 0x00000010, 0x80001e91, 0x00000010, - 0x80001e93, 0x00000010, 0x80001e95, 0x00000010, - 0x80001ea1, 0x00000010, 0x80001ea3, 0x00000010, - 0x80001ea5, 0x00000010, 0x80001ea7, 0x00000010, - 0x80001ea9, 0x00000010, 0x80001eab, 0x00000010, - 0x80001ead, 0x00000010, 0x80001eaf, 0x00000010, - 0x80001eb1, 0x00000010, 0x80001eb3, 0x00000010, - 0x80001eb5, 0x00000010, 0x80001eb7, 0x00000010, - 0x80001eb9, 0x00000010, 0x80001ebb, 0x00000010, - 0x80001ebd, 0x00000010, 0x80001ebf, 0x00000010, - 0x80001ec1, 0x00000010, 0x80001ec3, 0x00000010, - 0x80001ec5, 0x00000010, 0x80001ec7, 0x00000010, - 0x80001ec9, 0x00000010, 0x80001ecb, 0x00000010, - 0x80001ecd, 0x00000010, 0x80001ecf, 0x00000010, - 0x80001ed1, 0x00000010, 0x80001ed3, 0x00000010, - 0x80001ed5, 0x00000010, 0x80001ed7, 0x00000010, - 0x80001ed9, 0x00000010, 0x80001edb, 0x00000010, - 0x80001edd, 0x00000010, 0x80001edf, 0x00000010, - 0x80001ee1, 0x00000010, 0x80001ee3, 0x00000010, - 0x80001ee5, 0x00000010, 0x80001ee7, 0x00000010, - 0x80001ee9, 0x00000010, 0x80001eeb, 0x00000010, - 0x80001eed, 0x00000010, 0x80001eef, 0x00000010, - 0x80001ef1, 0x00000010, 0x80001ef3, 0x00000010, - 0x80001ef5, 0x00000010, 0x80001ef7, 0x00000010, - 0x80001ef9, 0x00000010, 0x80001f00, 0x00000010, - 0x80001f01, 0x00000010, 0x80001f02, 0x00000010, - 0x80001f03, 0x00000010, 0x80001f04, 0x00000010, - 0x80001f05, 0x00000010, 0x80001f06, 0x00000010, - 0x80001f07, 0x00000010, 0x80001f10, 0x00000010, - 0x80001f11, 0x00000010, 0x80001f12, 0x00000010, - 0x80001f13, 0x00000010, 0x80001f14, 0x00000010, - 0x80001f15, 0x00000010, 0x80001f20, 0x00000010, - 0x80001f21, 0x00000010, 0x80001f22, 0x00000010, - 0x80001f23, 0x00000010, 0x80001f24, 0x00000010, - 0x80001f25, 0x00000010, 0x80001f26, 0x00000010, - 0x80001f27, 0x00000010, 0x80001f30, 0x00000010, - 0x80001f31, 0x00000010, 0x80001f32, 0x00000010, - 0x80001f33, 0x00000010, 0x80001f34, 0x00000010, - 0x80001f35, 0x00000010, 0x80001f36, 0x00000010, - 0x80001f37, 0x00000010, 0x80001f40, 0x00000010, - 0x80001f41, 0x00000010, 0x80001f42, 0x00000010, - 0x80001f43, 0x00000010, 0x80001f44, 0x00000010, - 0x80001f45, 0x00000010, 0x80001f51, 0x00000010, - 0x80001f53, 0x00000010, 0x80001f55, 0x00000010, - 0x80001f57, 0x00000010, 0x80001f60, 0x00000010, - 0x80001f61, 0x00000010, 0x80001f62, 0x00000010, - 0x80001f63, 0x00000010, 0x80001f64, 0x00000010, - 0x80001f65, 0x00000010, 0x80001f66, 0x00000010, - 0x80001f67, 0x00000000, 0x80001f80, 0x00000010, - 0x80001f80, 0x00000000, 0x80001f81, 0x00000010, - 0x80001f81, 0x00000000, 0x80001f82, 0x00000010, - 0x80001f82, 0x00000000, 0x80001f83, 0x00000010, - 0x80001f83, 0x00000000, 0x80001f84, 0x00000010, - 0x80001f84, 0x00000000, 0x80001f85, 0x00000010, - 0x80001f85, 0x00000000, 0x80001f86, 0x00000010, - 0x80001f86, 0x00000000, 0x80001f87, 0x00000010, - 0x80001f87, 0x00000000, 0x80001f90, 0x00000010, - 0x80001f90, 0x00000000, 0x80001f91, 0x00000010, - 0x80001f91, 0x00000000, 0x80001f92, 0x00000010, - 0x80001f92, 0x00000000, 0x80001f93, 0x00000010, - 0x80001f93, 0x00000000, 0x80001f94, 0x00000010, - 0x80001f94, 0x00000000, 0x80001f95, 0x00000010, - 0x80001f95, 0x00000000, 0x80001f96, 0x00000010, - 0x80001f96, 0x00000000, 0x80001f97, 0x00000010, - 0x80001f97, 0x00000000, 0x80001fa0, 0x00000010, - 0x80001fa0, 0x00000000, 0x80001fa1, 0x00000010, - 0x80001fa1, 0x00000000, 0x80001fa2, 0x00000010, - 0x80001fa2, 0x00000000, 0x80001fa3, 0x00000010, - 0x80001fa3, 0x00000000, 0x80001fa4, 0x00000010, - 0x80001fa4, 0x00000000, 0x80001fa5, 0x00000010, - 0x80001fa5, 0x00000000, 0x80001fa6, 0x00000010, - 0x80001fa6, 0x00000000, 0x80001fa7, 0x00000010, - 0x80001fa7, 0x00000010, 0x80001fb0, 0x00000010, - 0x80001fb1, 0x00000010, 0x80001f70, 0x00000010, - 0x80001f71, 0x00000000, 0x80001fb3, 0x00000010, - 0x80001fb3, 0x00000010, 0x80001f72, 0x00000010, - 0x80001f73, 0x00000010, 0x80001f74, 0x00000010, - 0x80001f75, 0x00000000, 0x80001fc3, 0x00000010, - 0x80001fc3, 0x00000010, 0x80001fd0, 0x00000010, - 0x80001fd1, 0x00000010, 0x80001f76, 0x00000010, - 0x80001f77, 0x00000010, 0x80001fe0, 0x00000010, - 0x80001fe1, 0x00000010, 0x80001f7a, 0x00000010, - 0x80001f7b, 0x00000010, 0x80001fe5, 0x00000010, - 0x80001f78, 0x00000010, 0x80001f79, 0x00000010, - 0x80001f7c, 0x00000010, 0x80001f7d, 0x00000000, - 0x80001ff3, 0x00000010, 0x80001ff3, 0x00000010, - 0x800003c9, 0x00000010, 0x8000006b, 0x00000010, - 0x800000e5, 0x00000010, 0x80002170, 0x00000010, - 0x80002171, 0x00000010, 0x80002172, 0x00000010, - 0x80002173, 0x00000010, 0x80002174, 0x00000010, - 0x80002175, 0x00000010, 0x80002176, 0x00000010, - 0x80002177, 0x00000010, 0x80002178, 0x00000010, - 0x80002179, 0x00000010, 0x8000217a, 0x00000010, - 0x8000217b, 0x00000010, 0x8000217c, 0x00000010, - 0x8000217d, 0x00000010, 0x8000217e, 0x00000010, - 0x8000217f, 0x00000010, 0x800024d0, 0x00000010, - 0x800024d1, 0x00000010, 0x800024d2, 0x00000010, - 0x800024d3, 0x00000010, 0x800024d4, 0x00000010, - 0x800024d5, 0x00000010, 0x800024d6, 0x00000010, - 0x800024d7, 0x00000010, 0x800024d8, 0x00000010, - 0x800024d9, 0x00000010, 0x800024da, 0x00000010, - 0x800024db, 0x00000010, 0x800024dc, 0x00000010, - 0x800024dd, 0x00000010, 0x800024de, 0x00000010, - 0x800024df, 0x00000010, 0x800024e0, 0x00000010, - 0x800024e1, 0x00000010, 0x800024e2, 0x00000010, - 0x800024e3, 0x00000010, 0x800024e4, 0x00000010, - 0x800024e5, 0x00000010, 0x800024e6, 0x00000010, - 0x800024e7, 0x00000010, 0x800024e8, 0x00000010, - 0x800024e9, 0x00000010, 0x8000ff41, 0x00000010, - 0x8000ff42, 0x00000010, 0x8000ff43, 0x00000010, - 0x8000ff44, 0x00000010, 0x8000ff45, 0x00000010, - 0x8000ff46, 0x00000010, 0x8000ff47, 0x00000010, - 0x8000ff48, 0x00000010, 0x8000ff49, 0x00000010, - 0x8000ff4a, 0x00000010, 0x8000ff4b, 0x00000010, - 0x8000ff4c, 0x00000010, 0x8000ff4d, 0x00000010, - 0x8000ff4e, 0x00000010, 0x8000ff4f, 0x00000010, - 0x8000ff50, 0x00000010, 0x8000ff51, 0x00000010, - 0x8000ff52, 0x00000010, 0x8000ff53, 0x00000010, - 0x8000ff54, 0x00000010, 0x8000ff55, 0x00000010, - 0x8000ff56, 0x00000010, 0x8000ff57, 0x00000010, - 0x8000ff58, 0x00000010, 0x8000ff59, 0x00000010, - 0x8000ff5a, -}; - - -/* - * Cased characters and non-spacing marks (for casemap context) - */ - -#define CASEMAP_CTX_BITS_0 9 -#define CASEMAP_CTX_BITS_1 7 -#define CASEMAP_CTX_BITS_2 5 - -#define CTX_CASED 1 -#define CTX_NSM 2 - -static const unsigned short v301_casemap_ctx_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 1, 1, 0, 2, 3, 3, - 4, 4, 4, 4, 4, 5, 6, 4, - 4, 7, 8, 4, 4, 9, 0, 0, - 10, 10, 11, 12, 13, 14, 15, 16, - 4, 4, 4, 4, 17, 4, 18, 19, - 0, 20, 21, 22, 23, 24, 25, 0, - 0, 0, 26, 27, 0, 0, 28, 29, - 30, 31, 32, 0, 0, 33, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 34, 35, 36, 37, 38, 35, 39, 37, - 40, 35, 41, 42, 34, 35, 43, 0, - 38, 44, 45, 0, 40, 0, 46, 0, - 0, 47, 48, 0, 0, 49, 50, 0, - 0, 0, 51, 0, 0, 0, 52, 0, - 0, 53, 54, 0, 0, 55, 56, 0, - 57, 58, 0, 59, 60, 61, 62, 0, - 0, 63, 57, 0, 0, 4, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 66, 0, - 0, 0, 0, 0, 0, 67, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 68, 4, 4, 69, - 70, 4, 71, 72, 4, 73, 74, 75, - 0, 0, 0, 76, 0, 0, 77, 38, - 78, 79, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 80, 0, 0, 81, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 83, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned char tbl[32]; -} v301_casemap_ctx_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, - }}, - {{ - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, - }}, - {{ - 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, - }}, - {{ - 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, - }}, - {{ - 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - }}, - {{ - 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, - }}, - {{ - 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, - 0, 2, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, - }}, - {{ - 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, - 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, - 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, - }}, - {{ - 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; - -/* - * Case Folding - */ - -#define CASE_FOLDING_BITS_0 9 -#define CASE_FOLDING_BITS_1 7 -#define CASE_FOLDING_BITS_2 5 - -static const unsigned short v301_case_folding_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 1, 0, 0, 2, 3, 0, - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 14, 0, 15, 16, 17, 18, - 19, 20, 0, 21, 22, 23, 24, 25, - 0, 26, 27, 0, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 0, 46, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 47, 48, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 49, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 50, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v301_case_folding_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 0, 51, 52, 53, 54, 55, 56, 57, 58, - }}, - {{ - 60, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, - 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, - 71, 0, 72, 0, 73, 0, 74, 0, 75, 0, - }}, - {{ - 76, 0, 77, 0, 78, 0, 79, 0, 80, 0, 81, - 0, 82, 0, 83, 0, 84, 85, 86, 0, 87, 0, - 88, 0, 0, 89, 0, 90, 0, 91, 0, 92, - }}, - {{ - 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 99, - 0, 100, 0, 101, 0, 102, 0, 103, 0, 104, 0, - 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, - }}, - {{ - 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 115, - 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, 0, - 121, 0, 122, 123, 0, 124, 0, 125, 0, 126, - }}, - {{ - 0, 127, 128, 0, 129, 0, 130, 131, 0, 132, 133, - 134, 0, 0, 135, 136, 137, 138, 0, 139, 140, 0, - 141, 142, 143, 0, 0, 0, 144, 145, 0, 146, - }}, - {{ - 147, 0, 148, 0, 149, 0, 150, 151, 0, 152, 0, - 0, 153, 0, 154, 155, 0, 156, 157, 158, 0, 159, - 0, 160, 161, 0, 0, 0, 162, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 163, 164, 0, 165, 166, 0, 167, - 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, - 0, 174, 0, 175, 0, 176, 0, 0, 177, 0, - }}, - {{ - 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, 183, - 0, 184, 0, 185, 0, 186, 188, 189, 0, 190, 0, - 191, 192, 193, 0, 194, 0, 195, 0, 196, 0, - }}, - {{ - 197, 0, 198, 0, 199, 0, 200, 0, 201, 0, 202, - 0, 203, 0, 204, 0, 205, 0, 206, 0, 207, 0, - 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, - }}, - {{ - 0, 0, 213, 0, 214, 0, 215, 0, 216, 0, 217, - 0, 218, 0, 219, 0, 220, 0, 221, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 223, 0, 224, 225, 226, - 0, 227, 0, 228, 229, 230, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - }}, - {{ - 248, 249, 0, 250, 251, 252, 253, 254, 255, 256, 257, - 258, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 262, 263, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 264, 265, 0, 0, 0, 266, - 267, 0, 0, 0, 268, 0, 269, 0, 270, 0, - }}, - {{ - 271, 0, 272, 0, 273, 0, 274, 0, 275, 0, 276, - 0, 277, 0, 278, 0, 279, 280, 281, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - }}, - {{ - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 330, 0, 331, 0, 332, 0, 333, 0, 334, 0, 335, - 0, 336, 0, 337, 0, 338, 0, 339, 0, 340, 0, - 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, - }}, - {{ - 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 347, 0, 348, 0, 349, 0, 350, 0, 351, 0, - 352, 0, 353, 0, 354, 0, 355, 0, 356, 0, - }}, - {{ - 357, 0, 358, 0, 359, 0, 360, 0, 361, 0, 362, - 0, 363, 0, 364, 0, 365, 0, 366, 0, 367, 0, - 368, 0, 369, 0, 370, 0, 371, 0, 372, 0, - }}, - {{ - 0, 373, 0, 374, 0, 0, 0, 375, 0, 0, 0, - 376, 0, 0, 0, 0, 377, 0, 378, 0, 379, 0, - 380, 0, 381, 0, 382, 0, 383, 0, 384, 0, - }}, - {{ - 385, 0, 386, 0, 387, 0, 388, 0, 389, 0, 390, - 0, 391, 0, 392, 0, 393, 0, 394, 0, 395, 0, - 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - }}, - {{ - 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, - 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 437, 0, 438, 0, 439, 0, 440, 0, 441, 0, 442, - 0, 443, 0, 444, 0, 445, 0, 446, 0, 447, 0, - 448, 0, 449, 0, 450, 0, 451, 0, 452, 0, - }}, - {{ - 453, 0, 454, 0, 455, 0, 456, 0, 457, 0, 458, - 0, 459, 0, 460, 0, 461, 0, 462, 0, 463, 0, - 464, 0, 465, 0, 466, 0, 467, 0, 468, 0, - }}, - {{ - 469, 0, 470, 0, 471, 0, 472, 0, 473, 0, 474, - 0, 475, 0, 476, 0, 477, 0, 478, 0, 479, 0, - 480, 0, 481, 0, 482, 0, 483, 0, 484, 0, - }}, - {{ - 485, 0, 486, 0, 487, 0, 488, 0, 489, 0, 490, - 0, 491, 0, 492, 0, 493, 0, 494, 0, 495, 0, - 496, 0, 497, 0, 498, 0, 499, 0, 500, 0, - }}, - {{ - 501, 0, 502, 0, 503, 0, 504, 0, 505, 0, 506, - 0, 507, 0, 508, 0, 509, 0, 510, 0, 511, 0, - 512, 514, 516, 518, 520, 522, 0, 0, 0, 0, - }}, - {{ - 523, 0, 524, 0, 525, 0, 526, 0, 527, 0, 528, - 0, 529, 0, 530, 0, 531, 0, 532, 0, 533, 0, - 534, 0, 535, 0, 536, 0, 537, 0, 538, 0, - }}, - {{ - 539, 0, 540, 0, 541, 0, 542, 0, 543, 0, 544, - 0, 545, 0, 546, 0, 547, 0, 548, 0, 549, 0, - 550, 0, 551, 0, 552, 0, 553, 0, 554, 0, - }}, - {{ - 555, 0, 556, 0, 557, 0, 558, 0, 559, 0, 560, - 0, 561, 0, 562, 0, 563, 0, 564, 0, 565, 0, - 566, 0, 567, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 568, 569, 570, - 571, 572, 573, 574, 575, 0, 0, 0, 0, 0, 0, - 0, 0, 576, 577, 578, 579, 580, 581, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 582, 583, 584, - 585, 586, 587, 588, 589, 0, 0, 0, 0, 0, 0, - 0, 0, 590, 591, 592, 593, 594, 595, 596, 597, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 598, 599, 600, - 601, 602, 603, 0, 0, 604, 0, 606, 0, 609, 0, - 612, 0, 0, 615, 0, 616, 0, 617, 0, 618, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 619, 620, 621, - 622, 623, 624, 625, 626, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 627, 629, 631, 633, 635, 637, 639, 641, 643, 645, 647, - 649, 651, 653, 655, 657, 659, 661, 663, 665, 667, 669, - 671, 673, 675, 677, 679, 681, 683, 685, 687, 689, - }}, - {{ - 691, 693, 695, 697, 699, 701, 703, 705, 707, 709, 711, - 713, 715, 717, 719, 721, 0, 0, 723, 725, 727, 0, - 729, 731, 734, 735, 736, 737, 738, 0, 740, 0, - }}, - {{ - 0, 0, 741, 743, 745, 0, 747, 749, 752, 753, 754, - 755, 756, 0, 0, 0, 0, 0, 758, 761, 0, 0, - 764, 766, 769, 770, 771, 772, 0, 0, 0, 0, - }}, - {{ - 0, 0, 773, 776, 779, 0, 781, 783, 786, 787, 788, - 789, 790, 0, 0, 0, 0, 0, 791, 793, 795, 0, - 797, 799, 802, 803, 804, 805, 806, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 808, 0, 0, 0, 809, - 810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, - 822, 823, 824, 825, 826, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, - }}, - {{ - 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, - 848, 849, 850, 851, 852, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 853, 855, 857, 859, 862, 865, 867, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 869, 871, 873, - 875, 877, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, - 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, - 900, 901, 902, 903, 904, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned long v301_case_folding_seq[] = { - 0x00000000, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x800003bc, - 0x800000e0, 0x800000e1, 0x800000e2, 0x800000e3, - 0x800000e4, 0x800000e5, 0x800000e6, 0x800000e7, - 0x800000e8, 0x800000e9, 0x800000ea, 0x800000eb, - 0x800000ec, 0x800000ed, 0x800000ee, 0x800000ef, - 0x800000f0, 0x800000f1, 0x800000f2, 0x800000f3, - 0x800000f4, 0x800000f5, 0x800000f6, 0x800000f8, - 0x800000f9, 0x800000fa, 0x800000fb, 0x800000fc, - 0x800000fd, 0x800000fe, 0x00000073, 0x80000073, - 0x80000101, 0x80000103, 0x80000105, 0x80000107, - 0x80000109, 0x8000010b, 0x8000010d, 0x8000010f, - 0x80000111, 0x80000113, 0x80000115, 0x80000117, - 0x80000119, 0x8000011b, 0x8000011d, 0x8000011f, - 0x80000121, 0x80000123, 0x80000125, 0x80000127, - 0x80000129, 0x8000012b, 0x8000012d, 0x8000012f, - 0x80000069, 0x80000069, 0x80000133, 0x80000135, - 0x80000137, 0x8000013a, 0x8000013c, 0x8000013e, - 0x80000140, 0x80000142, 0x80000144, 0x80000146, - 0x80000148, 0x000002bc, 0x8000006e, 0x8000014b, - 0x8000014d, 0x8000014f, 0x80000151, 0x80000153, - 0x80000155, 0x80000157, 0x80000159, 0x8000015b, - 0x8000015d, 0x8000015f, 0x80000161, 0x80000163, - 0x80000165, 0x80000167, 0x80000169, 0x8000016b, - 0x8000016d, 0x8000016f, 0x80000171, 0x80000173, - 0x80000175, 0x80000177, 0x800000ff, 0x8000017a, - 0x8000017c, 0x8000017e, 0x80000073, 0x80000253, - 0x80000183, 0x80000185, 0x80000254, 0x80000188, - 0x80000256, 0x80000257, 0x8000018c, 0x800001dd, - 0x80000259, 0x8000025b, 0x80000192, 0x80000260, - 0x80000263, 0x80000269, 0x80000268, 0x80000199, - 0x8000026f, 0x80000272, 0x80000275, 0x800001a1, - 0x800001a3, 0x800001a5, 0x80000280, 0x800001a8, - 0x80000283, 0x800001ad, 0x80000288, 0x800001b0, - 0x8000028a, 0x8000028b, 0x800001b4, 0x800001b6, - 0x80000292, 0x800001b9, 0x800001bd, 0x800001c6, - 0x800001c6, 0x800001c9, 0x800001c9, 0x800001cc, - 0x800001cc, 0x800001ce, 0x800001d0, 0x800001d2, - 0x800001d4, 0x800001d6, 0x800001d8, 0x800001da, - 0x800001dc, 0x800001df, 0x800001e1, 0x800001e3, - 0x800001e5, 0x800001e7, 0x800001e9, 0x800001eb, - 0x800001ed, 0x800001ef, 0x0000006a, 0x8000030c, - 0x800001f3, 0x800001f3, 0x800001f5, 0x80000195, - 0x800001bf, 0x800001f9, 0x800001fb, 0x800001fd, - 0x800001ff, 0x80000201, 0x80000203, 0x80000205, - 0x80000207, 0x80000209, 0x8000020b, 0x8000020d, - 0x8000020f, 0x80000211, 0x80000213, 0x80000215, - 0x80000217, 0x80000219, 0x8000021b, 0x8000021d, - 0x8000021f, 0x80000223, 0x80000225, 0x80000227, - 0x80000229, 0x8000022b, 0x8000022d, 0x8000022f, - 0x80000231, 0x80000233, 0x800003b9, 0x800003ac, - 0x800003ad, 0x800003ae, 0x800003af, 0x800003cc, - 0x800003cd, 0x800003ce, 0x000003b9, 0x00000308, - 0x80000301, 0x800003b1, 0x800003b2, 0x800003b3, - 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, - 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, - 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, - 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c4, - 0x800003c5, 0x800003c6, 0x800003c7, 0x800003c8, - 0x800003c9, 0x800003ca, 0x800003cb, 0x000003c5, - 0x00000308, 0x80000301, 0x800003c2, 0x800003c2, - 0x800003b2, 0x800003b8, 0x800003c6, 0x800003c0, - 0x800003db, 0x800003dd, 0x800003df, 0x800003e1, - 0x800003e3, 0x800003e5, 0x800003e7, 0x800003e9, - 0x800003eb, 0x800003ed, 0x800003ef, 0x800003ba, - 0x800003c1, 0x800003c2, 0x80000450, 0x80000451, - 0x80000452, 0x80000453, 0x80000454, 0x80000455, - 0x80000456, 0x80000457, 0x80000458, 0x80000459, - 0x8000045a, 0x8000045b, 0x8000045c, 0x8000045d, - 0x8000045e, 0x8000045f, 0x80000430, 0x80000431, - 0x80000432, 0x80000433, 0x80000434, 0x80000435, - 0x80000436, 0x80000437, 0x80000438, 0x80000439, - 0x8000043a, 0x8000043b, 0x8000043c, 0x8000043d, - 0x8000043e, 0x8000043f, 0x80000440, 0x80000441, - 0x80000442, 0x80000443, 0x80000444, 0x80000445, - 0x80000446, 0x80000447, 0x80000448, 0x80000449, - 0x8000044a, 0x8000044b, 0x8000044c, 0x8000044d, - 0x8000044e, 0x8000044f, 0x80000461, 0x80000463, - 0x80000465, 0x80000467, 0x80000469, 0x8000046b, - 0x8000046d, 0x8000046f, 0x80000471, 0x80000473, - 0x80000475, 0x80000477, 0x80000479, 0x8000047b, - 0x8000047d, 0x8000047f, 0x80000481, 0x8000048d, - 0x8000048f, 0x80000491, 0x80000493, 0x80000495, - 0x80000497, 0x80000499, 0x8000049b, 0x8000049d, - 0x8000049f, 0x800004a1, 0x800004a3, 0x800004a5, - 0x800004a7, 0x800004a9, 0x800004ab, 0x800004ad, - 0x800004af, 0x800004b1, 0x800004b3, 0x800004b5, - 0x800004b7, 0x800004b9, 0x800004bb, 0x800004bd, - 0x800004bf, 0x800004c2, 0x800004c4, 0x800004c8, - 0x800004cc, 0x800004d1, 0x800004d3, 0x800004d5, - 0x800004d7, 0x800004d9, 0x800004db, 0x800004dd, - 0x800004df, 0x800004e1, 0x800004e3, 0x800004e5, - 0x800004e7, 0x800004e9, 0x800004eb, 0x800004ed, - 0x800004ef, 0x800004f1, 0x800004f3, 0x800004f5, - 0x800004f9, 0x80000561, 0x80000562, 0x80000563, - 0x80000564, 0x80000565, 0x80000566, 0x80000567, - 0x80000568, 0x80000569, 0x8000056a, 0x8000056b, - 0x8000056c, 0x8000056d, 0x8000056e, 0x8000056f, - 0x80000570, 0x80000571, 0x80000572, 0x80000573, - 0x80000574, 0x80000575, 0x80000576, 0x80000577, - 0x80000578, 0x80000579, 0x8000057a, 0x8000057b, - 0x8000057c, 0x8000057d, 0x8000057e, 0x8000057f, - 0x80000580, 0x80000581, 0x80000582, 0x80000583, - 0x80000584, 0x80000585, 0x80000586, 0x00000565, - 0x80000582, 0x80001e01, 0x80001e03, 0x80001e05, - 0x80001e07, 0x80001e09, 0x80001e0b, 0x80001e0d, - 0x80001e0f, 0x80001e11, 0x80001e13, 0x80001e15, - 0x80001e17, 0x80001e19, 0x80001e1b, 0x80001e1d, - 0x80001e1f, 0x80001e21, 0x80001e23, 0x80001e25, - 0x80001e27, 0x80001e29, 0x80001e2b, 0x80001e2d, - 0x80001e2f, 0x80001e31, 0x80001e33, 0x80001e35, - 0x80001e37, 0x80001e39, 0x80001e3b, 0x80001e3d, - 0x80001e3f, 0x80001e41, 0x80001e43, 0x80001e45, - 0x80001e47, 0x80001e49, 0x80001e4b, 0x80001e4d, - 0x80001e4f, 0x80001e51, 0x80001e53, 0x80001e55, - 0x80001e57, 0x80001e59, 0x80001e5b, 0x80001e5d, - 0x80001e5f, 0x80001e61, 0x80001e63, 0x80001e65, - 0x80001e67, 0x80001e69, 0x80001e6b, 0x80001e6d, - 0x80001e6f, 0x80001e71, 0x80001e73, 0x80001e75, - 0x80001e77, 0x80001e79, 0x80001e7b, 0x80001e7d, - 0x80001e7f, 0x80001e81, 0x80001e83, 0x80001e85, - 0x80001e87, 0x80001e89, 0x80001e8b, 0x80001e8d, - 0x80001e8f, 0x80001e91, 0x80001e93, 0x80001e95, - 0x00000068, 0x80000331, 0x00000074, 0x80000308, - 0x00000077, 0x8000030a, 0x00000079, 0x8000030a, - 0x00000061, 0x800002be, 0x80001e61, 0x80001ea1, - 0x80001ea3, 0x80001ea5, 0x80001ea7, 0x80001ea9, - 0x80001eab, 0x80001ead, 0x80001eaf, 0x80001eb1, - 0x80001eb3, 0x80001eb5, 0x80001eb7, 0x80001eb9, - 0x80001ebb, 0x80001ebd, 0x80001ebf, 0x80001ec1, - 0x80001ec3, 0x80001ec5, 0x80001ec7, 0x80001ec9, - 0x80001ecb, 0x80001ecd, 0x80001ecf, 0x80001ed1, - 0x80001ed3, 0x80001ed5, 0x80001ed7, 0x80001ed9, - 0x80001edb, 0x80001edd, 0x80001edf, 0x80001ee1, - 0x80001ee3, 0x80001ee5, 0x80001ee7, 0x80001ee9, - 0x80001eeb, 0x80001eed, 0x80001eef, 0x80001ef1, - 0x80001ef3, 0x80001ef5, 0x80001ef7, 0x80001ef9, - 0x80001f00, 0x80001f01, 0x80001f02, 0x80001f03, - 0x80001f04, 0x80001f05, 0x80001f06, 0x80001f07, - 0x80001f10, 0x80001f11, 0x80001f12, 0x80001f13, - 0x80001f14, 0x80001f15, 0x80001f20, 0x80001f21, - 0x80001f22, 0x80001f23, 0x80001f24, 0x80001f25, - 0x80001f26, 0x80001f27, 0x80001f30, 0x80001f31, - 0x80001f32, 0x80001f33, 0x80001f34, 0x80001f35, - 0x80001f36, 0x80001f37, 0x80001f40, 0x80001f41, - 0x80001f42, 0x80001f43, 0x80001f44, 0x80001f45, - 0x000003c5, 0x80000313, 0x000003c5, 0x00000313, - 0x80000300, 0x000003c5, 0x00000313, 0x80000301, - 0x000003c5, 0x00000313, 0x80000342, 0x80001f51, - 0x80001f53, 0x80001f55, 0x80001f57, 0x80001f60, - 0x80001f61, 0x80001f62, 0x80001f63, 0x80001f64, - 0x80001f65, 0x80001f66, 0x80001f67, 0x00001f00, - 0x800003b9, 0x00001f01, 0x800003b9, 0x00001f02, - 0x800003b9, 0x00001f03, 0x800003b9, 0x00001f04, - 0x800003b9, 0x00001f05, 0x800003b9, 0x00001f06, - 0x800003b9, 0x00001f07, 0x800003b9, 0x00001f00, - 0x800003b9, 0x00001f01, 0x800003b9, 0x00001f02, - 0x800003b9, 0x00001f03, 0x800003b9, 0x00001f04, - 0x800003b9, 0x00001f05, 0x800003b9, 0x00001f06, - 0x800003b9, 0x00001f07, 0x800003b9, 0x00001f20, - 0x800003b9, 0x00001f21, 0x800003b9, 0x00001f22, - 0x800003b9, 0x00001f23, 0x800003b9, 0x00001f24, - 0x800003b9, 0x00001f25, 0x800003b9, 0x00001f26, - 0x800003b9, 0x00001f27, 0x800003b9, 0x00001f20, - 0x800003b9, 0x00001f21, 0x800003b9, 0x00001f22, - 0x800003b9, 0x00001f23, 0x800003b9, 0x00001f24, - 0x800003b9, 0x00001f25, 0x800003b9, 0x00001f26, - 0x800003b9, 0x00001f27, 0x800003b9, 0x00001f60, - 0x800003b9, 0x00001f61, 0x800003b9, 0x00001f62, - 0x800003b9, 0x00001f63, 0x800003b9, 0x00001f64, - 0x800003b9, 0x00001f65, 0x800003b9, 0x00001f66, - 0x800003b9, 0x00001f67, 0x800003b9, 0x00001f60, - 0x800003b9, 0x00001f61, 0x800003b9, 0x00001f62, - 0x800003b9, 0x00001f63, 0x800003b9, 0x00001f64, - 0x800003b9, 0x00001f65, 0x800003b9, 0x00001f66, - 0x800003b9, 0x00001f67, 0x800003b9, 0x00001f70, - 0x800003b9, 0x000003b1, 0x800003b9, 0x000003ac, - 0x800003b9, 0x000003b1, 0x80000342, 0x000003b1, - 0x00000342, 0x800003b9, 0x80001fb0, 0x80001fb1, - 0x80001f70, 0x80001f71, 0x000003b1, 0x800003b9, - 0x800003b9, 0x00001f74, 0x800003b9, 0x000003b7, - 0x800003b9, 0x000003ae, 0x800003b9, 0x000003b7, - 0x80000342, 0x000003b7, 0x00000342, 0x800003b9, - 0x80001f72, 0x80001f73, 0x80001f74, 0x80001f75, - 0x000003b7, 0x800003b9, 0x000003b9, 0x00000308, - 0x80000300, 0x000003b9, 0x00000308, 0x80000301, - 0x000003b9, 0x80000342, 0x000003b9, 0x00000308, - 0x80000342, 0x80001fd0, 0x80001fd1, 0x80001f76, - 0x80001f77, 0x000003c5, 0x00000308, 0x80000300, - 0x000003c5, 0x00000308, 0x80000301, 0x000003c1, - 0x80000313, 0x000003c5, 0x80000342, 0x000003c5, - 0x00000308, 0x80000342, 0x80001fe0, 0x80001fe1, - 0x80001f7a, 0x80001f7b, 0x80001fe5, 0x00001f7c, - 0x800003b9, 0x000003c9, 0x800003b9, 0x000003ce, - 0x800003b9, 0x000003c9, 0x80000342, 0x000003c9, - 0x00000342, 0x800003b9, 0x80001f78, 0x80001f79, - 0x80001f7c, 0x80001f7d, 0x000003c9, 0x800003b9, - 0x800003c9, 0x8000006b, 0x800000e5, 0x80002170, - 0x80002171, 0x80002172, 0x80002173, 0x80002174, - 0x80002175, 0x80002176, 0x80002177, 0x80002178, - 0x80002179, 0x8000217a, 0x8000217b, 0x8000217c, - 0x8000217d, 0x8000217e, 0x8000217f, 0x800024d0, - 0x800024d1, 0x800024d2, 0x800024d3, 0x800024d4, - 0x800024d5, 0x800024d6, 0x800024d7, 0x800024d8, - 0x800024d9, 0x800024da, 0x800024db, 0x800024dc, - 0x800024dd, 0x800024de, 0x800024df, 0x800024e0, - 0x800024e1, 0x800024e2, 0x800024e3, 0x800024e4, - 0x800024e5, 0x800024e6, 0x800024e7, 0x800024e8, - 0x800024e9, 0x00000066, 0x80000066, 0x00000066, - 0x80000069, 0x00000066, 0x8000006c, 0x00000066, - 0x00000066, 0x80000069, 0x00000066, 0x00000066, - 0x8000006c, 0x00000073, 0x80000074, 0x00000073, - 0x80000074, 0x00000574, 0x80000576, 0x00000574, - 0x80000565, 0x00000574, 0x8000056b, 0x0000057e, - 0x80000576, 0x00000574, 0x8000056d, 0x8000ff41, - 0x8000ff42, 0x8000ff43, 0x8000ff44, 0x8000ff45, - 0x8000ff46, 0x8000ff47, 0x8000ff48, 0x8000ff49, - 0x8000ff4a, 0x8000ff4b, 0x8000ff4c, 0x8000ff4d, - 0x8000ff4e, 0x8000ff4f, 0x8000ff50, 0x8000ff51, - 0x8000ff52, 0x8000ff53, 0x8000ff54, 0x8000ff55, - 0x8000ff56, 0x8000ff57, 0x8000ff58, 0x8000ff59, - 0x8000ff5a, -}; - diff --git a/contrib/idn/mdnkit/lib/unicodedata_310.c b/contrib/idn/mdnkit/lib/unicodedata_310.c deleted file mode 100644 index a86e795f6e..0000000000 --- a/contrib/idn/mdnkit/lib/unicodedata_310.c +++ /dev/null @@ -1,7796 +0,0 @@ -/* $Id: unicodedata_310.c,v 1.1 2002/02/08 05:40:44 marka Exp $ */ -/* $-Id: generate_normalize_data.pl,v 1.7 2001/09/10 08:16:20 ishisone Exp -$ */ -/* - * Do not edit this file! - * This file is generated from UnicodeData.txt, CompositionExclusions-1.txt, - * SpecialCasing.txt and CaseFolding.txt. - */ - - -/* - * Canonical Class - */ - -#define CANON_CLASS_BITS_0 9 -#define CANON_CLASS_BITS_1 7 -#define CANON_CLASS_BITS_2 5 - -static const unsigned short v310_canon_class_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 1040, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 3, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 8, 0, - 0, 0, 9, 10, 0, 0, 11, 12, - 13, 14, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 17, 0, 0, 16, 18, 0, - 0, 16, 18, 0, 0, 16, 18, 0, - 0, 16, 18, 0, 0, 0, 18, 0, - 0, 0, 19, 0, 0, 0, 18, 0, - 0, 0, 18, 0, 0, 0, 20, 0, - 0, 21, 22, 0, 0, 23, 24, 0, - 25, 26, 0, 27, 28, 0, 29, 0, - 0, 30, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 33, 34, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 36, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 38, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 39, 40, 41, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned char tbl[32]; -} v310_canon_class_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 232, - 220, 220, 220, 220, 232, 216, 220, 220, 220, 220, - }}, - {{ - 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, - 1, 1, 1, 220, 220, 220, 220, 230, 230, 230, - }}, - {{ - 230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, - 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 234, 234, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 230, 230, 230, 230, - 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, - }}, - {{ - 230, 230, 0, 220, 220, 220, 220, 220, 230, 230, 220, - 230, 230, 222, 228, 230, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 0, 20, 21, 22, 0, 23, - }}, - {{ - 0, 24, 25, 0, 230, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, - }}, - {{ - 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, - 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 220, 230, 230, 220, 230, - 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, - }}, - {{ - 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, - 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, - 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, - 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 220, 220, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, - 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, - 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, - }}, - {{ - 130, 0, 230, 230, 9, 0, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, - 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, - }}, - {{ - 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, - 228, 232, 222, 224, 224, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, - }}, - {{ - 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 216, 216, 1, 1, 1, 0, - 0, 0, 226, 216, 216, 216, 216, 216, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, - }}, - {{ - 220, 220, 220, 0, 0, 230, 230, 230, 230, 230, 220, - 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, - 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; - -/* - * Canonical Composition - */ - -#define CANON_COMPOSE_BITS_0 9 -#define CANON_COMPOSE_BITS_1 7 -#define CANON_COMPOSE_BITS_2 5 - -static const unsigned short v310_compose_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 1, 2, 3, 0, 4, 5, 6, - 7, 0, 8, 9, 0, 10, 0, 11, - 0, 12, 0, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 14, 15, 16, 0, - 17, 18, 19, 20, 0, 0, 21, 22, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 23, 24, 0, 0, 0, 25, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 29, 0, 30, 0, - 0, 0, 31, 0, 0, 32, 33, 0, - 0, 0, 34, 0, 0, 0, 35, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 38, 39, 0, 40, 41, 0, - 42, 43, 44, 45, 0, 46, 47, 48, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 49, 0, 50, 0, - 51, 52, 53, 54, 55, 56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 57, 58, 59, 60, 61, 62, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned long tbl[32]; -} v310_compose_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 65537, 65538, 65539, 0, - }}, - {{ - 0, 1048580, 196628, 327703, 393244, 1114146, 65587, - 458804, 458811, 983106, 65617, 327762, 393303, 196701, - 589920, 1048681, 131193, 0, 524411, 458883, 458890, - 1245329, 131236, 393382, 131244, 589998, 393399, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 1048765, 196813, 327888, 393429, 1114331, 65772, - 458989, 524532, 917756, 131338, 327948, 393489, 196887, - 590106, 1048867, 131379, 0, 524597, 459069, 524612, - 1245516, 131423, 459105, 131432, 655722, 393588, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 196986, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 262525, 0, 65921, 65922, 131459, - 65925, 0, 0, 262534, 0, 0, 0, - 0, 65930, 0, 0, 0, 0, 262539, - 197007, 65938, 0, 65939, 0, 0, 0, - 262548, 0, 0, 0, - }}, - {{ - 0, 0, 262552, 0, 65948, 65949, 131486, - 65952, 0, 0, 262561, 0, 0, 0, - 0, 65957, 0, 0, 0, 0, 262566, - 197034, 65965, 0, 65966, 0, 0, 0, - 262575, 0, 0, 0, - }}, - {{ - 0, 0, 262579, 262583, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 131515, 131517, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 131519, 131521, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65987, 65988, - 0, 0, 0, 0, - }}, - {{ - 65989, 65990, 0, 0, 0, 0, 0, - 0, 65991, 65992, 65993, 65994, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 65995, - }}, - {{ - 328140, 328145, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 328150, 328155, 0, 0, 0, 0, - 0, 0, 66016, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66017, 66018, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66019, - 66020, 66021, 66022, 0, 0, 0, 0, - 66023, 66024, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66025, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 459242, 0, 0, 0, - 262641, 0, 328181, 0, 459258, 0, 0, - 0, 0, 0, 262657, - }}, - {{ - 0, 66053, 0, 0, 0, 393734, 0, - 0, 0, 328204, 0, 0, 66065, 0, - 66066, 0, 0, 524819, 0, 0, 0, - 262683, 0, 393759, 0, 524837, 0, 0, - 0, 0, 0, 262701, - }}, - {{ - 0, 131633, 0, 0, 0, 524851, 0, - 0, 0, 393787, 197185, 197188, 0, 0, - 66119, 0, 0, 0, 131656, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66122, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 131659, 0, 0, 66125, 0, - 197198, 131665, 66131, 262740, 0, 66136, 0, - 0, 0, 66137, 0, - }}, - {{ - 0, 0, 0, 262746, 0, 0, 0, - 66142, 0, 0, 0, 66143, 0, 66144, - 0, 0, 131681, 0, 0, 66147, 0, - 197220, 131687, 66153, 262762, 0, 66158, 0, - 0, 0, 66159, 0, - }}, - {{ - 0, 0, 0, 262768, 0, 0, 0, - 66164, 0, 0, 0, 66165, 0, 66166, - 0, 0, 0, 0, 0, 0, 0, - 0, 66167, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 66168, - 66169, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66170, 66171, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66172, 66173, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 197246, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66177, 0, 66178, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 66179, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66180, 0, 0, - 66181, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 66182, 0, 0, 0, 0, 0, - 0, 0, 66183, 0, 0, 66184, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 131721, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 197259, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66190, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 131727, - 66193, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66194, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66195, - }}, - {{ - 0, 0, 0, 0, 0, 0, 197268, - 0, 0, 0, 66199, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 131736, - 66202, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 197275, 0, 0, - 66206, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 66207, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66208, 66209, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66210, 66211, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 66212, 66213, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 131750, 131752, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66218, 66219, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66220, 66221, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262830, 262834, 66230, 66231, 66232, 66233, 66234, - 66235, 262844, 262848, 66244, 66245, 66246, 66247, - 66248, 66249, 131786, 131788, 0, 0, 0, - 0, 0, 0, 131790, 131792, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262866, 262870, 66266, 66267, 66268, 66269, 66270, - 66271, 262880, 262884, 66280, 66281, 66282, 66283, - 66284, 66285, 197358, 197361, 0, 0, 0, - 0, 0, 0, 197364, 197367, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 131834, 131836, 0, 0, 0, 0, 0, - 0, 131838, 131840, 0, 0, 0, 0, - 0, 0, 197378, 197381, 0, 0, 0, - 0, 0, 0, 0, 197384, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 262923, 262927, 66323, 66324, 66325, 66326, 66327, - 66328, 262937, 262941, 66337, 66338, 66339, 66340, - 66341, 66342, 66343, 0, 0, 0, 66344, - 0, 0, 0, 0, 0, 0, 0, - 66345, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66346, 0, 0, 0, 0, 0, - 0, 0, 0, 197419, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66350, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66351, 0, 0, 0, 0, 0, - 0, 0, 197424, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 66355, 0, 66356, 0, 66357, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 66358, 0, 66359, 0, 66360, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66361, 0, 0, 0, - 0, 66362, 0, 0, 66363, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66364, 0, 66365, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 66366, 0, 0, 0, - }}, - {{ - 0, 0, 0, 66367, 0, 66368, 0, - 0, 66369, 0, 0, 0, 0, 66370, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 66371, 0, 0, 66372, 66373, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66374, 66375, 0, - 0, 66376, 66377, 0, 0, 66378, 66379, - 66380, 66381, 0, 0, - }}, - {{ - 0, 0, 66382, 66383, 0, 0, 66384, - 66385, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 66386, 66387, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 66388, 0, 0, 0, 0, - 0, 66389, 66390, 0, 66391, 0, 0, - 0, 0, 0, 0, 66392, 66393, 66394, - 66395, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66396, - 0, 0, 0, 0, 66397, 0, 66398, - 0, 66399, 0, 66400, 0, 66401, 0, - 66402, 0, 66403, 0, 66404, 0, 66405, - 0, 66406, 0, 66407, - }}, - {{ - 0, 66408, 0, 0, 66409, 0, 66410, - 0, 66411, 0, 0, 0, 0, 0, - 0, 131948, 0, 0, 131950, 0, 0, - 131952, 0, 0, 131954, 0, 0, 131956, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66422, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 66423, - 0, 0, 0, 0, 66424, 0, 66425, - 0, 66426, 0, 66427, 0, 66428, 0, - 66429, 0, 66430, 0, 66431, 0, 66432, - 0, 66433, 0, 66434, - }}, - {{ - 0, 66435, 0, 0, 66436, 0, 66437, - 0, 66438, 0, 0, 0, 0, 0, - 0, 131975, 0, 0, 131977, 0, 0, - 131979, 0, 0, 131981, 0, 0, 131983, - 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66449, 66450, 66451, 66452, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 66453, 0, 0, - }}, -}; - -static const struct composition v310_compose_seq[] = { - { 0x00000000, 0x00000000 }, { 0x00000338, 0x0000226e }, - { 0x00000338, 0x00002260 }, { 0x00000338, 0x0000226f }, - { 0x00000300, 0x000000c0 }, { 0x00000301, 0x000000c1 }, - { 0x00000302, 0x000000c2 }, { 0x00000303, 0x000000c3 }, - { 0x00000304, 0x00000100 }, { 0x00000306, 0x00000102 }, - { 0x00000307, 0x00000226 }, { 0x00000308, 0x000000c4 }, - { 0x00000309, 0x00001ea2 }, { 0x0000030a, 0x000000c5 }, - { 0x0000030c, 0x000001cd }, { 0x0000030f, 0x00000200 }, - { 0x00000311, 0x00000202 }, { 0x00000323, 0x00001ea0 }, - { 0x00000325, 0x00001e00 }, { 0x00000328, 0x00000104 }, - { 0x00000307, 0x00001e02 }, { 0x00000323, 0x00001e04 }, - { 0x00000331, 0x00001e06 }, { 0x00000301, 0x00000106 }, - { 0x00000302, 0x00000108 }, { 0x00000307, 0x0000010a }, - { 0x0000030c, 0x0000010c }, { 0x00000327, 0x000000c7 }, - { 0x00000307, 0x00001e0a }, { 0x0000030c, 0x0000010e }, - { 0x00000323, 0x00001e0c }, { 0x00000327, 0x00001e10 }, - { 0x0000032d, 0x00001e12 }, { 0x00000331, 0x00001e0e }, - { 0x00000300, 0x000000c8 }, { 0x00000301, 0x000000c9 }, - { 0x00000302, 0x000000ca }, { 0x00000303, 0x00001ebc }, - { 0x00000304, 0x00000112 }, { 0x00000306, 0x00000114 }, - { 0x00000307, 0x00000116 }, { 0x00000308, 0x000000cb }, - { 0x00000309, 0x00001eba }, { 0x0000030c, 0x0000011a }, - { 0x0000030f, 0x00000204 }, { 0x00000311, 0x00000206 }, - { 0x00000323, 0x00001eb8 }, { 0x00000327, 0x00000228 }, - { 0x00000328, 0x00000118 }, { 0x0000032d, 0x00001e18 }, - { 0x00000330, 0x00001e1a }, { 0x00000307, 0x00001e1e }, - { 0x00000301, 0x000001f4 }, { 0x00000302, 0x0000011c }, - { 0x00000304, 0x00001e20 }, { 0x00000306, 0x0000011e }, - { 0x00000307, 0x00000120 }, { 0x0000030c, 0x000001e6 }, - { 0x00000327, 0x00000122 }, { 0x00000302, 0x00000124 }, - { 0x00000307, 0x00001e22 }, { 0x00000308, 0x00001e26 }, - { 0x0000030c, 0x0000021e }, { 0x00000323, 0x00001e24 }, - { 0x00000327, 0x00001e28 }, { 0x0000032e, 0x00001e2a }, - { 0x00000300, 0x000000cc }, { 0x00000301, 0x000000cd }, - { 0x00000302, 0x000000ce }, { 0x00000303, 0x00000128 }, - { 0x00000304, 0x0000012a }, { 0x00000306, 0x0000012c }, - { 0x00000307, 0x00000130 }, { 0x00000308, 0x000000cf }, - { 0x00000309, 0x00001ec8 }, { 0x0000030c, 0x000001cf }, - { 0x0000030f, 0x00000208 }, { 0x00000311, 0x0000020a }, - { 0x00000323, 0x00001eca }, { 0x00000328, 0x0000012e }, - { 0x00000330, 0x00001e2c }, { 0x00000302, 0x00000134 }, - { 0x00000301, 0x00001e30 }, { 0x0000030c, 0x000001e8 }, - { 0x00000323, 0x00001e32 }, { 0x00000327, 0x00000136 }, - { 0x00000331, 0x00001e34 }, { 0x00000301, 0x00000139 }, - { 0x0000030c, 0x0000013d }, { 0x00000323, 0x00001e36 }, - { 0x00000327, 0x0000013b }, { 0x0000032d, 0x00001e3c }, - { 0x00000331, 0x00001e3a }, { 0x00000301, 0x00001e3e }, - { 0x00000307, 0x00001e40 }, { 0x00000323, 0x00001e42 }, - { 0x00000300, 0x000001f8 }, { 0x00000301, 0x00000143 }, - { 0x00000303, 0x000000d1 }, { 0x00000307, 0x00001e44 }, - { 0x0000030c, 0x00000147 }, { 0x00000323, 0x00001e46 }, - { 0x00000327, 0x00000145 }, { 0x0000032d, 0x00001e4a }, - { 0x00000331, 0x00001e48 }, { 0x00000300, 0x000000d2 }, - { 0x00000301, 0x000000d3 }, { 0x00000302, 0x000000d4 }, - { 0x00000303, 0x000000d5 }, { 0x00000304, 0x0000014c }, - { 0x00000306, 0x0000014e }, { 0x00000307, 0x0000022e }, - { 0x00000308, 0x000000d6 }, { 0x00000309, 0x00001ece }, - { 0x0000030b, 0x00000150 }, { 0x0000030c, 0x000001d1 }, - { 0x0000030f, 0x0000020c }, { 0x00000311, 0x0000020e }, - { 0x0000031b, 0x000001a0 }, { 0x00000323, 0x00001ecc }, - { 0x00000328, 0x000001ea }, { 0x00000301, 0x00001e54 }, - { 0x00000307, 0x00001e56 }, { 0x00000301, 0x00000154 }, - { 0x00000307, 0x00001e58 }, { 0x0000030c, 0x00000158 }, - { 0x0000030f, 0x00000210 }, { 0x00000311, 0x00000212 }, - { 0x00000323, 0x00001e5a }, { 0x00000327, 0x00000156 }, - { 0x00000331, 0x00001e5e }, { 0x00000301, 0x0000015a }, - { 0x00000302, 0x0000015c }, { 0x00000307, 0x00001e60 }, - { 0x0000030c, 0x00000160 }, { 0x00000323, 0x00001e62 }, - { 0x00000326, 0x00000218 }, { 0x00000327, 0x0000015e }, - { 0x00000307, 0x00001e6a }, { 0x0000030c, 0x00000164 }, - { 0x00000323, 0x00001e6c }, { 0x00000326, 0x0000021a }, - { 0x00000327, 0x00000162 }, { 0x0000032d, 0x00001e70 }, - { 0x00000331, 0x00001e6e }, { 0x00000300, 0x000000d9 }, - { 0x00000301, 0x000000da }, { 0x00000302, 0x000000db }, - { 0x00000303, 0x00000168 }, { 0x00000304, 0x0000016a }, - { 0x00000306, 0x0000016c }, { 0x00000308, 0x000000dc }, - { 0x00000309, 0x00001ee6 }, { 0x0000030a, 0x0000016e }, - { 0x0000030b, 0x00000170 }, { 0x0000030c, 0x000001d3 }, - { 0x0000030f, 0x00000214 }, { 0x00000311, 0x00000216 }, - { 0x0000031b, 0x000001af }, { 0x00000323, 0x00001ee4 }, - { 0x00000324, 0x00001e72 }, { 0x00000328, 0x00000172 }, - { 0x0000032d, 0x00001e76 }, { 0x00000330, 0x00001e74 }, - { 0x00000303, 0x00001e7c }, { 0x00000323, 0x00001e7e }, - { 0x00000300, 0x00001e80 }, { 0x00000301, 0x00001e82 }, - { 0x00000302, 0x00000174 }, { 0x00000307, 0x00001e86 }, - { 0x00000308, 0x00001e84 }, { 0x00000323, 0x00001e88 }, - { 0x00000307, 0x00001e8a }, { 0x00000308, 0x00001e8c }, - { 0x00000300, 0x00001ef2 }, { 0x00000301, 0x000000dd }, - { 0x00000302, 0x00000176 }, { 0x00000303, 0x00001ef8 }, - { 0x00000304, 0x00000232 }, { 0x00000307, 0x00001e8e }, - { 0x00000308, 0x00000178 }, { 0x00000309, 0x00001ef6 }, - { 0x00000323, 0x00001ef4 }, { 0x00000301, 0x00000179 }, - { 0x00000302, 0x00001e90 }, { 0x00000307, 0x0000017b }, - { 0x0000030c, 0x0000017d }, { 0x00000323, 0x00001e92 }, - { 0x00000331, 0x00001e94 }, { 0x00000300, 0x000000e0 }, - { 0x00000301, 0x000000e1 }, { 0x00000302, 0x000000e2 }, - { 0x00000303, 0x000000e3 }, { 0x00000304, 0x00000101 }, - { 0x00000306, 0x00000103 }, { 0x00000307, 0x00000227 }, - { 0x00000308, 0x000000e4 }, { 0x00000309, 0x00001ea3 }, - { 0x0000030a, 0x000000e5 }, { 0x0000030c, 0x000001ce }, - { 0x0000030f, 0x00000201 }, { 0x00000311, 0x00000203 }, - { 0x00000323, 0x00001ea1 }, { 0x00000325, 0x00001e01 }, - { 0x00000328, 0x00000105 }, { 0x00000307, 0x00001e03 }, - { 0x00000323, 0x00001e05 }, { 0x00000331, 0x00001e07 }, - { 0x00000301, 0x00000107 }, { 0x00000302, 0x00000109 }, - { 0x00000307, 0x0000010b }, { 0x0000030c, 0x0000010d }, - { 0x00000327, 0x000000e7 }, { 0x00000307, 0x00001e0b }, - { 0x0000030c, 0x0000010f }, { 0x00000323, 0x00001e0d }, - { 0x00000327, 0x00001e11 }, { 0x0000032d, 0x00001e13 }, - { 0x00000331, 0x00001e0f }, { 0x00000300, 0x000000e8 }, - { 0x00000301, 0x000000e9 }, { 0x00000302, 0x000000ea }, - { 0x00000303, 0x00001ebd }, { 0x00000304, 0x00000113 }, - { 0x00000306, 0x00000115 }, { 0x00000307, 0x00000117 }, - { 0x00000308, 0x000000eb }, { 0x00000309, 0x00001ebb }, - { 0x0000030c, 0x0000011b }, { 0x0000030f, 0x00000205 }, - { 0x00000311, 0x00000207 }, { 0x00000323, 0x00001eb9 }, - { 0x00000327, 0x00000229 }, { 0x00000328, 0x00000119 }, - { 0x0000032d, 0x00001e19 }, { 0x00000330, 0x00001e1b }, - { 0x00000307, 0x00001e1f }, { 0x00000301, 0x000001f5 }, - { 0x00000302, 0x0000011d }, { 0x00000304, 0x00001e21 }, - { 0x00000306, 0x0000011f }, { 0x00000307, 0x00000121 }, - { 0x0000030c, 0x000001e7 }, { 0x00000327, 0x00000123 }, - { 0x00000302, 0x00000125 }, { 0x00000307, 0x00001e23 }, - { 0x00000308, 0x00001e27 }, { 0x0000030c, 0x0000021f }, - { 0x00000323, 0x00001e25 }, { 0x00000327, 0x00001e29 }, - { 0x0000032e, 0x00001e2b }, { 0x00000331, 0x00001e96 }, - { 0x00000300, 0x000000ec }, { 0x00000301, 0x000000ed }, - { 0x00000302, 0x000000ee }, { 0x00000303, 0x00000129 }, - { 0x00000304, 0x0000012b }, { 0x00000306, 0x0000012d }, - { 0x00000308, 0x000000ef }, { 0x00000309, 0x00001ec9 }, - { 0x0000030c, 0x000001d0 }, { 0x0000030f, 0x00000209 }, - { 0x00000311, 0x0000020b }, { 0x00000323, 0x00001ecb }, - { 0x00000328, 0x0000012f }, { 0x00000330, 0x00001e2d }, - { 0x00000302, 0x00000135 }, { 0x0000030c, 0x000001f0 }, - { 0x00000301, 0x00001e31 }, { 0x0000030c, 0x000001e9 }, - { 0x00000323, 0x00001e33 }, { 0x00000327, 0x00000137 }, - { 0x00000331, 0x00001e35 }, { 0x00000301, 0x0000013a }, - { 0x0000030c, 0x0000013e }, { 0x00000323, 0x00001e37 }, - { 0x00000327, 0x0000013c }, { 0x0000032d, 0x00001e3d }, - { 0x00000331, 0x00001e3b }, { 0x00000301, 0x00001e3f }, - { 0x00000307, 0x00001e41 }, { 0x00000323, 0x00001e43 }, - { 0x00000300, 0x000001f9 }, { 0x00000301, 0x00000144 }, - { 0x00000303, 0x000000f1 }, { 0x00000307, 0x00001e45 }, - { 0x0000030c, 0x00000148 }, { 0x00000323, 0x00001e47 }, - { 0x00000327, 0x00000146 }, { 0x0000032d, 0x00001e4b }, - { 0x00000331, 0x00001e49 }, { 0x00000300, 0x000000f2 }, - { 0x00000301, 0x000000f3 }, { 0x00000302, 0x000000f4 }, - { 0x00000303, 0x000000f5 }, { 0x00000304, 0x0000014d }, - { 0x00000306, 0x0000014f }, { 0x00000307, 0x0000022f }, - { 0x00000308, 0x000000f6 }, { 0x00000309, 0x00001ecf }, - { 0x0000030b, 0x00000151 }, { 0x0000030c, 0x000001d2 }, - { 0x0000030f, 0x0000020d }, { 0x00000311, 0x0000020f }, - { 0x0000031b, 0x000001a1 }, { 0x00000323, 0x00001ecd }, - { 0x00000328, 0x000001eb }, { 0x00000301, 0x00001e55 }, - { 0x00000307, 0x00001e57 }, { 0x00000301, 0x00000155 }, - { 0x00000307, 0x00001e59 }, { 0x0000030c, 0x00000159 }, - { 0x0000030f, 0x00000211 }, { 0x00000311, 0x00000213 }, - { 0x00000323, 0x00001e5b }, { 0x00000327, 0x00000157 }, - { 0x00000331, 0x00001e5f }, { 0x00000301, 0x0000015b }, - { 0x00000302, 0x0000015d }, { 0x00000307, 0x00001e61 }, - { 0x0000030c, 0x00000161 }, { 0x00000323, 0x00001e63 }, - { 0x00000326, 0x00000219 }, { 0x00000327, 0x0000015f }, - { 0x00000307, 0x00001e6b }, { 0x00000308, 0x00001e97 }, - { 0x0000030c, 0x00000165 }, { 0x00000323, 0x00001e6d }, - { 0x00000326, 0x0000021b }, { 0x00000327, 0x00000163 }, - { 0x0000032d, 0x00001e71 }, { 0x00000331, 0x00001e6f }, - { 0x00000300, 0x000000f9 }, { 0x00000301, 0x000000fa }, - { 0x00000302, 0x000000fb }, { 0x00000303, 0x00000169 }, - { 0x00000304, 0x0000016b }, { 0x00000306, 0x0000016d }, - { 0x00000308, 0x000000fc }, { 0x00000309, 0x00001ee7 }, - { 0x0000030a, 0x0000016f }, { 0x0000030b, 0x00000171 }, - { 0x0000030c, 0x000001d4 }, { 0x0000030f, 0x00000215 }, - { 0x00000311, 0x00000217 }, { 0x0000031b, 0x000001b0 }, - { 0x00000323, 0x00001ee5 }, { 0x00000324, 0x00001e73 }, - { 0x00000328, 0x00000173 }, { 0x0000032d, 0x00001e77 }, - { 0x00000330, 0x00001e75 }, { 0x00000303, 0x00001e7d }, - { 0x00000323, 0x00001e7f }, { 0x00000300, 0x00001e81 }, - { 0x00000301, 0x00001e83 }, { 0x00000302, 0x00000175 }, - { 0x00000307, 0x00001e87 }, { 0x00000308, 0x00001e85 }, - { 0x0000030a, 0x00001e98 }, { 0x00000323, 0x00001e89 }, - { 0x00000307, 0x00001e8b }, { 0x00000308, 0x00001e8d }, - { 0x00000300, 0x00001ef3 }, { 0x00000301, 0x000000fd }, - { 0x00000302, 0x00000177 }, { 0x00000303, 0x00001ef9 }, - { 0x00000304, 0x00000233 }, { 0x00000307, 0x00001e8f }, - { 0x00000308, 0x000000ff }, { 0x00000309, 0x00001ef7 }, - { 0x0000030a, 0x00001e99 }, { 0x00000323, 0x00001ef5 }, - { 0x00000301, 0x0000017a }, { 0x00000302, 0x00001e91 }, - { 0x00000307, 0x0000017c }, { 0x0000030c, 0x0000017e }, - { 0x00000323, 0x00001e93 }, { 0x00000331, 0x00001e95 }, - { 0x00000300, 0x00001fed }, { 0x00000301, 0x00000385 }, - { 0x00000342, 0x00001fc1 }, { 0x00000300, 0x00001ea6 }, - { 0x00000301, 0x00001ea4 }, { 0x00000303, 0x00001eaa }, - { 0x00000309, 0x00001ea8 }, { 0x00000304, 0x000001de }, - { 0x00000301, 0x000001fa }, { 0x00000301, 0x000001fc }, - { 0x00000304, 0x000001e2 }, { 0x00000301, 0x00001e08 }, - { 0x00000300, 0x00001ec0 }, { 0x00000301, 0x00001ebe }, - { 0x00000303, 0x00001ec4 }, { 0x00000309, 0x00001ec2 }, - { 0x00000301, 0x00001e2e }, { 0x00000300, 0x00001ed2 }, - { 0x00000301, 0x00001ed0 }, { 0x00000303, 0x00001ed6 }, - { 0x00000309, 0x00001ed4 }, { 0x00000301, 0x00001e4c }, - { 0x00000304, 0x0000022c }, { 0x00000308, 0x00001e4e }, - { 0x00000304, 0x0000022a }, { 0x00000301, 0x000001fe }, - { 0x00000300, 0x000001db }, { 0x00000301, 0x000001d7 }, - { 0x00000304, 0x000001d5 }, { 0x0000030c, 0x000001d9 }, - { 0x00000300, 0x00001ea7 }, { 0x00000301, 0x00001ea5 }, - { 0x00000303, 0x00001eab }, { 0x00000309, 0x00001ea9 }, - { 0x00000304, 0x000001df }, { 0x00000301, 0x000001fb }, - { 0x00000301, 0x000001fd }, { 0x00000304, 0x000001e3 }, - { 0x00000301, 0x00001e09 }, { 0x00000300, 0x00001ec1 }, - { 0x00000301, 0x00001ebf }, { 0x00000303, 0x00001ec5 }, - { 0x00000309, 0x00001ec3 }, { 0x00000301, 0x00001e2f }, - { 0x00000300, 0x00001ed3 }, { 0x00000301, 0x00001ed1 }, - { 0x00000303, 0x00001ed7 }, { 0x00000309, 0x00001ed5 }, - { 0x00000301, 0x00001e4d }, { 0x00000304, 0x0000022d }, - { 0x00000308, 0x00001e4f }, { 0x00000304, 0x0000022b }, - { 0x00000301, 0x000001ff }, { 0x00000300, 0x000001dc }, - { 0x00000301, 0x000001d8 }, { 0x00000304, 0x000001d6 }, - { 0x0000030c, 0x000001da }, { 0x00000300, 0x00001eb0 }, - { 0x00000301, 0x00001eae }, { 0x00000303, 0x00001eb4 }, - { 0x00000309, 0x00001eb2 }, { 0x00000300, 0x00001eb1 }, - { 0x00000301, 0x00001eaf }, { 0x00000303, 0x00001eb5 }, - { 0x00000309, 0x00001eb3 }, { 0x00000300, 0x00001e14 }, - { 0x00000301, 0x00001e16 }, { 0x00000300, 0x00001e15 }, - { 0x00000301, 0x00001e17 }, { 0x00000300, 0x00001e50 }, - { 0x00000301, 0x00001e52 }, { 0x00000300, 0x00001e51 }, - { 0x00000301, 0x00001e53 }, { 0x00000307, 0x00001e64 }, - { 0x00000307, 0x00001e65 }, { 0x00000307, 0x00001e66 }, - { 0x00000307, 0x00001e67 }, { 0x00000301, 0x00001e78 }, - { 0x00000301, 0x00001e79 }, { 0x00000308, 0x00001e7a }, - { 0x00000308, 0x00001e7b }, { 0x00000307, 0x00001e9b }, - { 0x00000300, 0x00001edc }, { 0x00000301, 0x00001eda }, - { 0x00000303, 0x00001ee0 }, { 0x00000309, 0x00001ede }, - { 0x00000323, 0x00001ee2 }, { 0x00000300, 0x00001edd }, - { 0x00000301, 0x00001edb }, { 0x00000303, 0x00001ee1 }, - { 0x00000309, 0x00001edf }, { 0x00000323, 0x00001ee3 }, - { 0x00000300, 0x00001eea }, { 0x00000301, 0x00001ee8 }, - { 0x00000303, 0x00001eee }, { 0x00000309, 0x00001eec }, - { 0x00000323, 0x00001ef0 }, { 0x00000300, 0x00001eeb }, - { 0x00000301, 0x00001ee9 }, { 0x00000303, 0x00001eef }, - { 0x00000309, 0x00001eed }, { 0x00000323, 0x00001ef1 }, - { 0x0000030c, 0x000001ee }, { 0x00000304, 0x000001ec }, - { 0x00000304, 0x000001ed }, { 0x00000304, 0x000001e0 }, - { 0x00000304, 0x000001e1 }, { 0x00000306, 0x00001e1c }, - { 0x00000306, 0x00001e1d }, { 0x00000304, 0x00000230 }, - { 0x00000304, 0x00000231 }, { 0x0000030c, 0x000001ef }, - { 0x00000300, 0x00001fba }, { 0x00000301, 0x00000386 }, - { 0x00000304, 0x00001fb9 }, { 0x00000306, 0x00001fb8 }, - { 0x00000313, 0x00001f08 }, { 0x00000314, 0x00001f09 }, - { 0x00000345, 0x00001fbc }, { 0x00000300, 0x00001fc8 }, - { 0x00000301, 0x00000388 }, { 0x00000313, 0x00001f18 }, - { 0x00000314, 0x00001f19 }, { 0x00000300, 0x00001fca }, - { 0x00000301, 0x00000389 }, { 0x00000313, 0x00001f28 }, - { 0x00000314, 0x00001f29 }, { 0x00000345, 0x00001fcc }, - { 0x00000300, 0x00001fda }, { 0x00000301, 0x0000038a }, - { 0x00000304, 0x00001fd9 }, { 0x00000306, 0x00001fd8 }, - { 0x00000308, 0x000003aa }, { 0x00000313, 0x00001f38 }, - { 0x00000314, 0x00001f39 }, { 0x00000300, 0x00001ff8 }, - { 0x00000301, 0x0000038c }, { 0x00000313, 0x00001f48 }, - { 0x00000314, 0x00001f49 }, { 0x00000314, 0x00001fec }, - { 0x00000300, 0x00001fea }, { 0x00000301, 0x0000038e }, - { 0x00000304, 0x00001fe9 }, { 0x00000306, 0x00001fe8 }, - { 0x00000308, 0x000003ab }, { 0x00000314, 0x00001f59 }, - { 0x00000300, 0x00001ffa }, { 0x00000301, 0x0000038f }, - { 0x00000313, 0x00001f68 }, { 0x00000314, 0x00001f69 }, - { 0x00000345, 0x00001ffc }, { 0x00000345, 0x00001fb4 }, - { 0x00000345, 0x00001fc4 }, { 0x00000300, 0x00001f70 }, - { 0x00000301, 0x000003ac }, { 0x00000304, 0x00001fb1 }, - { 0x00000306, 0x00001fb0 }, { 0x00000313, 0x00001f00 }, - { 0x00000314, 0x00001f01 }, { 0x00000342, 0x00001fb6 }, - { 0x00000345, 0x00001fb3 }, { 0x00000300, 0x00001f72 }, - { 0x00000301, 0x000003ad }, { 0x00000313, 0x00001f10 }, - { 0x00000314, 0x00001f11 }, { 0x00000300, 0x00001f74 }, - { 0x00000301, 0x000003ae }, { 0x00000313, 0x00001f20 }, - { 0x00000314, 0x00001f21 }, { 0x00000342, 0x00001fc6 }, - { 0x00000345, 0x00001fc3 }, { 0x00000300, 0x00001f76 }, - { 0x00000301, 0x000003af }, { 0x00000304, 0x00001fd1 }, - { 0x00000306, 0x00001fd0 }, { 0x00000308, 0x000003ca }, - { 0x00000313, 0x00001f30 }, { 0x00000314, 0x00001f31 }, - { 0x00000342, 0x00001fd6 }, { 0x00000300, 0x00001f78 }, - { 0x00000301, 0x000003cc }, { 0x00000313, 0x00001f40 }, - { 0x00000314, 0x00001f41 }, { 0x00000313, 0x00001fe4 }, - { 0x00000314, 0x00001fe5 }, { 0x00000300, 0x00001f7a }, - { 0x00000301, 0x000003cd }, { 0x00000304, 0x00001fe1 }, - { 0x00000306, 0x00001fe0 }, { 0x00000308, 0x000003cb }, - { 0x00000313, 0x00001f50 }, { 0x00000314, 0x00001f51 }, - { 0x00000342, 0x00001fe6 }, { 0x00000300, 0x00001f7c }, - { 0x00000301, 0x000003ce }, { 0x00000313, 0x00001f60 }, - { 0x00000314, 0x00001f61 }, { 0x00000342, 0x00001ff6 }, - { 0x00000345, 0x00001ff3 }, { 0x00000300, 0x00001fd2 }, - { 0x00000301, 0x00000390 }, { 0x00000342, 0x00001fd7 }, - { 0x00000300, 0x00001fe2 }, { 0x00000301, 0x000003b0 }, - { 0x00000342, 0x00001fe7 }, { 0x00000345, 0x00001ff4 }, - { 0x00000301, 0x000003d3 }, { 0x00000308, 0x000003d4 }, - { 0x00000308, 0x00000407 }, { 0x00000306, 0x000004d0 }, - { 0x00000308, 0x000004d2 }, { 0x00000301, 0x00000403 }, - { 0x00000300, 0x00000400 }, { 0x00000306, 0x000004d6 }, - { 0x00000308, 0x00000401 }, { 0x00000306, 0x000004c1 }, - { 0x00000308, 0x000004dc }, { 0x00000308, 0x000004de }, - { 0x00000300, 0x0000040d }, { 0x00000304, 0x000004e2 }, - { 0x00000306, 0x00000419 }, { 0x00000308, 0x000004e4 }, - { 0x00000301, 0x0000040c }, { 0x00000308, 0x000004e6 }, - { 0x00000304, 0x000004ee }, { 0x00000306, 0x0000040e }, - { 0x00000308, 0x000004f0 }, { 0x0000030b, 0x000004f2 }, - { 0x00000308, 0x000004f4 }, { 0x00000308, 0x000004f8 }, - { 0x00000308, 0x000004ec }, { 0x00000306, 0x000004d1 }, - { 0x00000308, 0x000004d3 }, { 0x00000301, 0x00000453 }, - { 0x00000300, 0x00000450 }, { 0x00000306, 0x000004d7 }, - { 0x00000308, 0x00000451 }, { 0x00000306, 0x000004c2 }, - { 0x00000308, 0x000004dd }, { 0x00000308, 0x000004df }, - { 0x00000300, 0x0000045d }, { 0x00000304, 0x000004e3 }, - { 0x00000306, 0x00000439 }, { 0x00000308, 0x000004e5 }, - { 0x00000301, 0x0000045c }, { 0x00000308, 0x000004e7 }, - { 0x00000304, 0x000004ef }, { 0x00000306, 0x0000045e }, - { 0x00000308, 0x000004f1 }, { 0x0000030b, 0x000004f3 }, - { 0x00000308, 0x000004f5 }, { 0x00000308, 0x000004f9 }, - { 0x00000308, 0x000004ed }, { 0x00000308, 0x00000457 }, - { 0x0000030f, 0x00000476 }, { 0x0000030f, 0x00000477 }, - { 0x00000308, 0x000004da }, { 0x00000308, 0x000004db }, - { 0x00000308, 0x000004ea }, { 0x00000308, 0x000004eb }, - { 0x00000653, 0x00000622 }, { 0x00000654, 0x00000623 }, - { 0x00000655, 0x00000625 }, { 0x00000654, 0x00000624 }, - { 0x00000654, 0x00000626 }, { 0x00000654, 0x000006c2 }, - { 0x00000654, 0x000006d3 }, { 0x00000654, 0x000006c0 }, - { 0x0000093c, 0x00000929 }, { 0x0000093c, 0x00000931 }, - { 0x0000093c, 0x00000934 }, { 0x000009be, 0x000009cb }, - { 0x000009d7, 0x000009cc }, { 0x00000b3e, 0x00000b4b }, - { 0x00000b56, 0x00000b48 }, { 0x00000b57, 0x00000b4c }, - { 0x00000bd7, 0x00000b94 }, { 0x00000bbe, 0x00000bca }, - { 0x00000bd7, 0x00000bcc }, { 0x00000bbe, 0x00000bcb }, - { 0x00000c56, 0x00000c48 }, { 0x00000cd5, 0x00000cc0 }, - { 0x00000cc2, 0x00000cca }, { 0x00000cd5, 0x00000cc7 }, - { 0x00000cd6, 0x00000cc8 }, { 0x00000cd5, 0x00000ccb }, - { 0x00000d3e, 0x00000d4a }, { 0x00000d57, 0x00000d4c }, - { 0x00000d3e, 0x00000d4b }, { 0x00000dca, 0x00000dda }, - { 0x00000dcf, 0x00000ddc }, { 0x00000ddf, 0x00000dde }, - { 0x00000dca, 0x00000ddd }, { 0x0000102e, 0x00001026 }, - { 0x00000304, 0x00001e38 }, { 0x00000304, 0x00001e39 }, - { 0x00000304, 0x00001e5c }, { 0x00000304, 0x00001e5d }, - { 0x00000307, 0x00001e68 }, { 0x00000307, 0x00001e69 }, - { 0x00000302, 0x00001eac }, { 0x00000306, 0x00001eb6 }, - { 0x00000302, 0x00001ead }, { 0x00000306, 0x00001eb7 }, - { 0x00000302, 0x00001ec6 }, { 0x00000302, 0x00001ec7 }, - { 0x00000302, 0x00001ed8 }, { 0x00000302, 0x00001ed9 }, - { 0x00000300, 0x00001f02 }, { 0x00000301, 0x00001f04 }, - { 0x00000342, 0x00001f06 }, { 0x00000345, 0x00001f80 }, - { 0x00000300, 0x00001f03 }, { 0x00000301, 0x00001f05 }, - { 0x00000342, 0x00001f07 }, { 0x00000345, 0x00001f81 }, - { 0x00000345, 0x00001f82 }, { 0x00000345, 0x00001f83 }, - { 0x00000345, 0x00001f84 }, { 0x00000345, 0x00001f85 }, - { 0x00000345, 0x00001f86 }, { 0x00000345, 0x00001f87 }, - { 0x00000300, 0x00001f0a }, { 0x00000301, 0x00001f0c }, - { 0x00000342, 0x00001f0e }, { 0x00000345, 0x00001f88 }, - { 0x00000300, 0x00001f0b }, { 0x00000301, 0x00001f0d }, - { 0x00000342, 0x00001f0f }, { 0x00000345, 0x00001f89 }, - { 0x00000345, 0x00001f8a }, { 0x00000345, 0x00001f8b }, - { 0x00000345, 0x00001f8c }, { 0x00000345, 0x00001f8d }, - { 0x00000345, 0x00001f8e }, { 0x00000345, 0x00001f8f }, - { 0x00000300, 0x00001f12 }, { 0x00000301, 0x00001f14 }, - { 0x00000300, 0x00001f13 }, { 0x00000301, 0x00001f15 }, - { 0x00000300, 0x00001f1a }, { 0x00000301, 0x00001f1c }, - { 0x00000300, 0x00001f1b }, { 0x00000301, 0x00001f1d }, - { 0x00000300, 0x00001f22 }, { 0x00000301, 0x00001f24 }, - { 0x00000342, 0x00001f26 }, { 0x00000345, 0x00001f90 }, - { 0x00000300, 0x00001f23 }, { 0x00000301, 0x00001f25 }, - { 0x00000342, 0x00001f27 }, { 0x00000345, 0x00001f91 }, - { 0x00000345, 0x00001f92 }, { 0x00000345, 0x00001f93 }, - { 0x00000345, 0x00001f94 }, { 0x00000345, 0x00001f95 }, - { 0x00000345, 0x00001f96 }, { 0x00000345, 0x00001f97 }, - { 0x00000300, 0x00001f2a }, { 0x00000301, 0x00001f2c }, - { 0x00000342, 0x00001f2e }, { 0x00000345, 0x00001f98 }, - { 0x00000300, 0x00001f2b }, { 0x00000301, 0x00001f2d }, - { 0x00000342, 0x00001f2f }, { 0x00000345, 0x00001f99 }, - { 0x00000345, 0x00001f9a }, { 0x00000345, 0x00001f9b }, - { 0x00000345, 0x00001f9c }, { 0x00000345, 0x00001f9d }, - { 0x00000345, 0x00001f9e }, { 0x00000345, 0x00001f9f }, - { 0x00000300, 0x00001f32 }, { 0x00000301, 0x00001f34 }, - { 0x00000342, 0x00001f36 }, { 0x00000300, 0x00001f33 }, - { 0x00000301, 0x00001f35 }, { 0x00000342, 0x00001f37 }, - { 0x00000300, 0x00001f3a }, { 0x00000301, 0x00001f3c }, - { 0x00000342, 0x00001f3e }, { 0x00000300, 0x00001f3b }, - { 0x00000301, 0x00001f3d }, { 0x00000342, 0x00001f3f }, - { 0x00000300, 0x00001f42 }, { 0x00000301, 0x00001f44 }, - { 0x00000300, 0x00001f43 }, { 0x00000301, 0x00001f45 }, - { 0x00000300, 0x00001f4a }, { 0x00000301, 0x00001f4c }, - { 0x00000300, 0x00001f4b }, { 0x00000301, 0x00001f4d }, - { 0x00000300, 0x00001f52 }, { 0x00000301, 0x00001f54 }, - { 0x00000342, 0x00001f56 }, { 0x00000300, 0x00001f53 }, - { 0x00000301, 0x00001f55 }, { 0x00000342, 0x00001f57 }, - { 0x00000300, 0x00001f5b }, { 0x00000301, 0x00001f5d }, - { 0x00000342, 0x00001f5f }, { 0x00000300, 0x00001f62 }, - { 0x00000301, 0x00001f64 }, { 0x00000342, 0x00001f66 }, - { 0x00000345, 0x00001fa0 }, { 0x00000300, 0x00001f63 }, - { 0x00000301, 0x00001f65 }, { 0x00000342, 0x00001f67 }, - { 0x00000345, 0x00001fa1 }, { 0x00000345, 0x00001fa2 }, - { 0x00000345, 0x00001fa3 }, { 0x00000345, 0x00001fa4 }, - { 0x00000345, 0x00001fa5 }, { 0x00000345, 0x00001fa6 }, - { 0x00000345, 0x00001fa7 }, { 0x00000300, 0x00001f6a }, - { 0x00000301, 0x00001f6c }, { 0x00000342, 0x00001f6e }, - { 0x00000345, 0x00001fa8 }, { 0x00000300, 0x00001f6b }, - { 0x00000301, 0x00001f6d }, { 0x00000342, 0x00001f6f }, - { 0x00000345, 0x00001fa9 }, { 0x00000345, 0x00001faa }, - { 0x00000345, 0x00001fab }, { 0x00000345, 0x00001fac }, - { 0x00000345, 0x00001fad }, { 0x00000345, 0x00001fae }, - { 0x00000345, 0x00001faf }, { 0x00000345, 0x00001fb2 }, - { 0x00000345, 0x00001fc2 }, { 0x00000345, 0x00001ff2 }, - { 0x00000345, 0x00001fb7 }, { 0x00000300, 0x00001fcd }, - { 0x00000301, 0x00001fce }, { 0x00000342, 0x00001fcf }, - { 0x00000345, 0x00001fc7 }, { 0x00000345, 0x00001ff7 }, - { 0x00000300, 0x00001fdd }, { 0x00000301, 0x00001fde }, - { 0x00000342, 0x00001fdf }, { 0x00000338, 0x0000219a }, - { 0x00000338, 0x0000219b }, { 0x00000338, 0x000021ae }, - { 0x00000338, 0x000021cd }, { 0x00000338, 0x000021cf }, - { 0x00000338, 0x000021ce }, { 0x00000338, 0x00002204 }, - { 0x00000338, 0x00002209 }, { 0x00000338, 0x0000220c }, - { 0x00000338, 0x00002224 }, { 0x00000338, 0x00002226 }, - { 0x00000338, 0x00002241 }, { 0x00000338, 0x00002244 }, - { 0x00000338, 0x00002247 }, { 0x00000338, 0x00002249 }, - { 0x00000338, 0x0000226d }, { 0x00000338, 0x00002262 }, - { 0x00000338, 0x00002270 }, { 0x00000338, 0x00002271 }, - { 0x00000338, 0x00002274 }, { 0x00000338, 0x00002275 }, - { 0x00000338, 0x00002278 }, { 0x00000338, 0x00002279 }, - { 0x00000338, 0x00002280 }, { 0x00000338, 0x00002281 }, - { 0x00000338, 0x000022e0 }, { 0x00000338, 0x000022e1 }, - { 0x00000338, 0x00002284 }, { 0x00000338, 0x00002285 }, - { 0x00000338, 0x00002288 }, { 0x00000338, 0x00002289 }, - { 0x00000338, 0x000022e2 }, { 0x00000338, 0x000022e3 }, - { 0x00000338, 0x000022ac }, { 0x00000338, 0x000022ad }, - { 0x00000338, 0x000022ae }, { 0x00000338, 0x000022af }, - { 0x00000338, 0x000022ea }, { 0x00000338, 0x000022eb }, - { 0x00000338, 0x000022ec }, { 0x00000338, 0x000022ed }, - { 0x00003099, 0x00003094 }, { 0x00003099, 0x0000304c }, - { 0x00003099, 0x0000304e }, { 0x00003099, 0x00003050 }, - { 0x00003099, 0x00003052 }, { 0x00003099, 0x00003054 }, - { 0x00003099, 0x00003056 }, { 0x00003099, 0x00003058 }, - { 0x00003099, 0x0000305a }, { 0x00003099, 0x0000305c }, - { 0x00003099, 0x0000305e }, { 0x00003099, 0x00003060 }, - { 0x00003099, 0x00003062 }, { 0x00003099, 0x00003065 }, - { 0x00003099, 0x00003067 }, { 0x00003099, 0x00003069 }, - { 0x00003099, 0x00003070 }, { 0x0000309a, 0x00003071 }, - { 0x00003099, 0x00003073 }, { 0x0000309a, 0x00003074 }, - { 0x00003099, 0x00003076 }, { 0x0000309a, 0x00003077 }, - { 0x00003099, 0x00003079 }, { 0x0000309a, 0x0000307a }, - { 0x00003099, 0x0000307c }, { 0x0000309a, 0x0000307d }, - { 0x00003099, 0x0000309e }, { 0x00003099, 0x000030f4 }, - { 0x00003099, 0x000030ac }, { 0x00003099, 0x000030ae }, - { 0x00003099, 0x000030b0 }, { 0x00003099, 0x000030b2 }, - { 0x00003099, 0x000030b4 }, { 0x00003099, 0x000030b6 }, - { 0x00003099, 0x000030b8 }, { 0x00003099, 0x000030ba }, - { 0x00003099, 0x000030bc }, { 0x00003099, 0x000030be }, - { 0x00003099, 0x000030c0 }, { 0x00003099, 0x000030c2 }, - { 0x00003099, 0x000030c5 }, { 0x00003099, 0x000030c7 }, - { 0x00003099, 0x000030c9 }, { 0x00003099, 0x000030d0 }, - { 0x0000309a, 0x000030d1 }, { 0x00003099, 0x000030d3 }, - { 0x0000309a, 0x000030d4 }, { 0x00003099, 0x000030d6 }, - { 0x0000309a, 0x000030d7 }, { 0x00003099, 0x000030d9 }, - { 0x0000309a, 0x000030da }, { 0x00003099, 0x000030dc }, - { 0x0000309a, 0x000030dd }, { 0x00003099, 0x000030f7 }, - { 0x00003099, 0x000030f8 }, { 0x00003099, 0x000030f9 }, - { 0x00003099, 0x000030fa }, { 0x00003099, 0x000030fe }, -}; - - -/* - * Canonical/Compatibility Decomposition - */ - -#define DECOMP_BITS_0 9 -#define DECOMP_BITS_1 7 -#define DECOMP_BITS_2 5 -#define DECOMP_COMPAT 32768 - -static const unsigned short v310_decompose_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 1040, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 1168, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 0, 0, 0, 1, 2, 3, - 4, 5, 6, 7, 0, 8, 9, 10, - 11, 12, 0, 0, 0, 13, 14, 15, - 0, 0, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 0, 0, 26, 27, - 0, 0, 0, 0, 28, 0, 0, 0, - 0, 29, 0, 30, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32, 33, 0, 0, 0, 34, 0, - 0, 35, 36, 0, 0, 0, 0, 0, - 0, 0, 37, 0, 38, 0, 39, 0, - 0, 0, 40, 0, 0, 0, 41, 0, - 0, 0, 42, 0, 0, 0, 43, 0, - 0, 44, 0, 0, 0, 45, 46, 0, - 47, 0, 48, 49, 50, 51, 0, 0, - 0, 52, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 0, 0, - 75, 76, 77, 78, 79, 80, 81, 0, - 82, 83, 84, 85, 86, 87, 0, 88, - 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 90, 91, 92, 93, 94, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 95, 0, 0, 96, - 97, 98, 99, 100, 101, 102, 103, 0, - 104, 105, 106, 107, 108, 109, 110, 111, - 0, 112, 113, 114, 115, 0, 0, 0, - 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 0, 0, 0, 0, 0, 0, - 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, - 0, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 181, 182, 0, 183, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, - 233, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v310_decompose_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 32769, 0, 0, 0, 0, 0, 0, 0, - 32770, 0, 32772, 0, 0, 0, 0, 32773, - 0, 0, 32775, 32776, 32777, 32779, 0, 0, - 32780, 32782, 32783, 0, 32784, 32787, 32790, 0, - }}, - {{ - 25, 27, 29, 31, 33, 35, 0, 37, - 39, 41, 43, 45, 47, 49, 51, 53, - 0, 55, 57, 59, 61, 63, 65, 0, - 0, 67, 69, 71, 73, 75, 0, 0, - }}, - {{ - 77, 79, 81, 83, 85, 87, 0, 89, - 91, 93, 95, 97, 99, 101, 103, 105, - 0, 107, 109, 111, 113, 115, 117, 0, - 0, 119, 121, 123, 125, 127, 0, 129, - }}, - {{ - 131, 133, 135, 137, 139, 141, 143, 145, - 147, 149, 151, 153, 155, 157, 159, 161, - 0, 0, 163, 165, 167, 169, 171, 173, - 175, 177, 179, 181, 183, 185, 187, 189, - }}, - {{ - 191, 193, 195, 197, 199, 201, 0, 0, - 203, 205, 207, 209, 211, 213, 215, 217, - 219, 0, 32989, 32991, 225, 227, 229, 231, - 0, 233, 235, 237, 239, 241, 243, 33013, - }}, - {{ - 33015, 0, 0, 249, 251, 253, 255, 257, - 259, 33029, 0, 0, 263, 265, 267, 269, - 271, 273, 0, 0, 275, 277, 279, 281, - 283, 285, 287, 289, 291, 293, 295, 297, - }}, - {{ - 299, 301, 303, 305, 307, 309, 0, 0, - 311, 313, 315, 317, 319, 321, 323, 325, - 327, 329, 331, 333, 335, 337, 339, 341, - 343, 345, 347, 349, 351, 353, 355, 33125, - }}, - {{ - 358, 360, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 362, - 364, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 33134, 33136, 33138, 33140, - 33142, 33144, 33146, 33148, 33150, 384, 386, 388, - 390, 392, 394, 396, 398, 400, 402, 404, - 406, 408, 410, 412, 414, 0, 416, 418, - }}, - {{ - 420, 422, 424, 426, 0, 0, 428, 430, - 432, 434, 436, 438, 440, 442, 444, 446, - 448, 33218, 33220, 33222, 456, 458, 0, 0, - 460, 462, 464, 466, 468, 470, 472, 474, - }}, - {{ - 476, 478, 480, 482, 484, 486, 488, 490, - 492, 494, 496, 498, 500, 502, 504, 506, - 508, 510, 512, 514, 516, 518, 520, 522, - 524, 526, 528, 530, 0, 0, 532, 534, - }}, - {{ - 0, 0, 0, 0, 0, 0, 536, 538, - 540, 542, 544, 546, 548, 550, 552, 554, - 556, 558, 560, 562, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33332, 33333, 33334, 33335, 33336, 33337, 33338, 33339, - 33340, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33341, 33343, 33345, 33347, 33349, 33351, 0, 0, - }}, - {{ - 33353, 33354, 33355, 33356, 33357, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 590, 591, 0, 592, 593, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 595, 0, 0, 0, - 0, 0, 33364, 0, 0, 0, 598, 0, - }}, - {{ - 0, 0, 0, 0, 33367, 601, 603, 605, - 606, 608, 610, 0, 612, 0, 614, 616, - 618, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 620, 622, 624, 626, 628, 630, - 632, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 634, 636, 638, 640, 642, 0, - 33412, 33413, 33414, 647, 649, 33419, 33420, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 33421, 33422, 33423, 0, 33424, 33425, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 658, 660, 0, 662, 0, 0, 0, 664, - 0, 0, 0, 0, 666, 668, 670, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 672, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 674, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 676, 678, 0, 680, 0, 0, 0, 682, - 0, 0, 0, 0, 684, 686, 688, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 690, 692, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 694, 696, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 698, 700, 702, 704, 0, 0, 706, 708, - 0, 0, 710, 712, 714, 716, 718, 720, - }}, - {{ - 0, 0, 722, 724, 726, 728, 730, 732, - 0, 0, 734, 736, 738, 740, 742, 744, - 746, 748, 750, 752, 754, 756, 0, 0, - 758, 760, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 33530, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 764, 766, 768, 770, 772, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 33542, 33544, 33546, - 33548, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 782, 0, 784, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 788, 0, 0, 0, 0, 0, 0, - 0, 790, 0, 0, 792, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 794, 796, 798, 800, 802, 804, 806, 808, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 810, 812, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 814, 816, 0, 818, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 820, 0, 0, 822, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 824, 826, 828, 0, 0, 830, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 832, 0, 0, 834, 836, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 838, 840, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 842, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 844, 846, 848, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 850, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 852, 0, 0, 0, 0, 0, 0, 854, - 856, 0, 858, 860, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 862, 864, 866, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 868, 0, 870, 872, 874, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 33644, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 33646, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 33648, 33650, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 33652, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 885, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 887, 0, 0, - 0, 0, 889, 0, 0, 0, 0, 891, - 0, 0, 0, 0, 893, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 895, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 897, 0, 899, 901, 33671, - 905, 33675, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 909, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 911, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 913, 0, 0, - }}, - {{ - 0, 0, 915, 0, 0, 0, 0, 917, - 0, 0, 0, 0, 919, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 921, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 923, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 925, 927, 929, 931, 933, 935, 937, 939, - 941, 943, 945, 947, 949, 951, 953, 955, - 957, 959, 961, 963, 965, 967, 969, 971, - 973, 975, 977, 979, 981, 983, 985, 987, - }}, - {{ - 989, 991, 993, 995, 997, 999, 1001, 1003, - 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, - 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, - 1037, 1039, 1041, 1043, 1045, 1047, 1049, 1051, - }}, - {{ - 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, - 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, - 1085, 1087, 1089, 1091, 1093, 1095, 1097, 1099, - 1101, 1103, 1105, 1107, 1109, 1111, 1113, 1115, - }}, - {{ - 1117, 1119, 1121, 1123, 1125, 1127, 1129, 1131, - 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, - 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1163, - 1165, 1167, 1169, 1171, 1173, 1175, 1177, 1179, - }}, - {{ - 1181, 1183, 1185, 1187, 1189, 1191, 1193, 1195, - 1197, 1199, 1201, 1203, 1205, 1207, 1209, 1211, - 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, - 1229, 1231, 34001, 1235, 0, 0, 0, 0, - }}, - {{ - 1237, 1239, 1241, 1243, 1245, 1247, 1249, 1251, - 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, - 1269, 1271, 1273, 1275, 1277, 1279, 1281, 1283, - 1285, 1287, 1289, 1291, 1293, 1295, 1297, 1299, - }}, - {{ - 1301, 1303, 1305, 1307, 1309, 1311, 1313, 1315, - 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, - 1333, 1335, 1337, 1339, 1341, 1343, 1345, 1347, - 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, - }}, - {{ - 1365, 1367, 1369, 1371, 1373, 1375, 1377, 1379, - 1381, 1383, 1385, 1387, 1389, 1391, 1393, 1395, - 1397, 1399, 1401, 1403, 1405, 1407, 1409, 1411, - 1413, 1415, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1417, 1419, 1421, 1423, 1425, 1427, 1429, 1431, - 1433, 1435, 1437, 1439, 1441, 1443, 1445, 1447, - 1449, 1451, 1453, 1455, 1457, 1459, 0, 0, - 1461, 1463, 1465, 1467, 1469, 1471, 0, 0, - }}, - {{ - 1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, - 1489, 1491, 1493, 1495, 1497, 1499, 1501, 1503, - 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1519, - 1521, 1523, 1525, 1527, 1529, 1531, 1533, 1535, - }}, - {{ - 1537, 1539, 1541, 1543, 1545, 1547, 0, 0, - 1549, 1551, 1553, 1555, 1557, 1559, 0, 0, - 1561, 1563, 1565, 1567, 1569, 1571, 1573, 1575, - 0, 1577, 0, 1579, 0, 1581, 0, 1583, - }}, - {{ - 1585, 1587, 1589, 1591, 1593, 1595, 1597, 1599, - 1601, 1603, 1605, 1607, 1609, 1611, 1613, 1615, - 1617, 1619, 1620, 1622, 1623, 1625, 1626, 1628, - 1629, 1631, 1632, 1634, 1635, 1637, 0, 0, - }}, - {{ - 1638, 1640, 1642, 1644, 1646, 1648, 1650, 1652, - 1654, 1656, 1658, 1660, 1662, 1664, 1666, 1668, - 1670, 1672, 1674, 1676, 1678, 1680, 1682, 1684, - 1686, 1688, 1690, 1692, 1694, 1696, 1698, 1700, - }}, - {{ - 1702, 1704, 1706, 1708, 1710, 1712, 1714, 1716, - 1718, 1720, 1722, 1724, 1726, 1728, 1730, 1732, - 1734, 1736, 1738, 1740, 1742, 0, 1744, 1746, - 1748, 1750, 1752, 1754, 1755, 34525, 1759, 34528, - }}, - {{ - 34530, 1764, 1766, 1768, 1770, 0, 1772, 1774, - 1776, 1778, 1779, 1781, 1782, 1784, 1786, 1788, - 1790, 1792, 1794, 1796, 0, 0, 1797, 1799, - 1801, 1803, 1805, 1807, 0, 1808, 1810, 1812, - }}, - {{ - 1814, 1816, 1818, 1820, 1821, 1823, 1825, 1827, - 1829, 1831, 1833, 1835, 1836, 1838, 1840, 1841, - 0, 0, 1842, 1844, 1846, 0, 1848, 1850, - 1852, 1854, 1855, 1857, 1858, 1860, 34629, 0, - }}, - {{ - 1863, 1864, 34633, 34634, 34635, 34636, 34637, 34638, - 34639, 34640, 34641, 0, 0, 0, 0, 0, - 0, 34642, 0, 0, 0, 0, 0, 34643, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 34645, 34646, 34648, 0, - 0, 0, 0, 0, 0, 0, 0, 34651, - 0, 0, 0, 34652, 34654, 0, 34657, 34659, - 0, 0, 0, 0, 34662, 0, 34664, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 34666, 34668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 34670, 0, 0, 0, 34671, 34672, 34673, 34674, - 34675, 34676, 34677, 34678, 34679, 34680, 34681, 34682, - }}, - {{ - 34683, 34684, 34685, 34686, 34687, 34688, 34689, 34690, - 34691, 34692, 34693, 34694, 34695, 34696, 34697, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 34698, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 34700, 34703, 34706, 34707, 0, 34709, 34712, 34715, - 0, 34716, 34718, 34719, 34720, 34721, 34722, 34723, - 34724, 34725, 34726, 34727, 0, 34728, 34729, 0, - 0, 34731, 34732, 34733, 34734, 34735, 0, 0, - }}, - {{ - 34736, 34738, 34741, 0, 34743, 0, 1976, 0, - 34745, 0, 1978, 1979, 34748, 34749, 0, 34750, - 34751, 34752, 0, 34753, 34754, 34755, 34756, 34757, - 34758, 34759, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 34760, 34763, 34766, 34769, 34772, - 34775, 34778, 34781, 34784, 34787, 34790, 34793, 34796, - }}, - {{ - 34798, 34799, 34801, 34804, 34806, 34807, 34809, 34812, - 34816, 34818, 34819, 34821, 34824, 34825, 34826, 34827, - 34828, 34829, 34831, 34834, 34836, 34837, 34839, 34842, - 34846, 34848, 34849, 34851, 34854, 34855, 34856, 34857, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2090, 2092, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2094, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2096, 2098, 2100, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2102, 0, 0, 0, - 0, 2104, 0, 0, 2106, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 2108, 0, 2110, 0, - 0, 0, 0, 0, 34880, 34882, 0, 34885, - 34887, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2122, 0, 0, 2124, 0, 0, 2126, - 0, 2128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2130, 0, 2132, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2134, 2136, 2138, - 2140, 2142, 0, 0, 2144, 2146, 0, 0, - 2148, 2150, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2152, 2154, 0, 0, 2156, 2158, 0, 0, - 2160, 2162, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2164, 2166, 2168, 2170, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2172, 2174, 2176, 2178, 0, 0, 0, 0, - 0, 0, 2180, 2182, 2184, 2186, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2188, 2189, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 34958, 34959, 34960, 34961, 34962, 34963, 34964, 34965, - 34966, 34967, 34969, 34971, 34973, 34975, 34977, 34979, - 34981, 34983, 34985, 34987, 34989, 34992, 34995, 34998, - 35001, 35004, 35007, 35010, 35013, 35016, 35020, 35024, - }}, - {{ - 35028, 35032, 35036, 35040, 35044, 35048, 35052, 35056, - 35060, 35062, 35064, 35066, 35068, 35070, 35072, 35074, - 35076, 35078, 35081, 35084, 35087, 35090, 35093, 35096, - 35099, 35102, 35105, 35108, 35111, 35114, 35117, 35120, - }}, - {{ - 35123, 35126, 35129, 35132, 35135, 35138, 35141, 35144, - 35147, 35150, 35153, 35156, 35159, 35162, 35165, 35168, - 35171, 35174, 35177, 35180, 35183, 35186, 35189, 35190, - 35191, 35192, 35193, 35194, 35195, 35196, 35197, 35198, - }}, - {{ - 35199, 35200, 35201, 35202, 35203, 35204, 35205, 35206, - 35207, 35208, 35209, 35210, 35211, 35212, 35213, 35214, - 35215, 35216, 35217, 35218, 35219, 35220, 35221, 35222, - 35223, 35224, 35225, 35226, 35227, 35228, 35229, 35230, - }}, - {{ - 35231, 35232, 35233, 35234, 35235, 35236, 35237, 35238, - 35239, 35240, 35241, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 35242, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 35243, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35244, 35245, 35246, 35247, 35248, 35249, 35250, 35251, - 35252, 35253, 35254, 35255, 35256, 35257, 35258, 35259, - 35260, 35261, 35262, 35263, 35264, 35265, 35266, 35267, - 35268, 35269, 35270, 35271, 35272, 35273, 35274, 35275, - }}, - {{ - 35276, 35277, 35278, 35279, 35280, 35281, 35282, 35283, - 35284, 35285, 35286, 35287, 35288, 35289, 35290, 35291, - 35292, 35293, 35294, 35295, 35296, 35297, 35298, 35299, - 35300, 35301, 35302, 35303, 35304, 35305, 35306, 35307, - }}, - {{ - 35308, 35309, 35310, 35311, 35312, 35313, 35314, 35315, - 35316, 35317, 35318, 35319, 35320, 35321, 35322, 35323, - 35324, 35325, 35326, 35327, 35328, 35329, 35330, 35331, - 35332, 35333, 35334, 35335, 35336, 35337, 35338, 35339, - }}, - {{ - 35340, 35341, 35342, 35343, 35344, 35345, 35346, 35347, - 35348, 35349, 35350, 35351, 35352, 35353, 35354, 35355, - 35356, 35357, 35358, 35359, 35360, 35361, 35362, 35363, - 35364, 35365, 35366, 35367, 35368, 35369, 35370, 35371, - }}, - {{ - 35372, 35373, 35374, 35375, 35376, 35377, 35378, 35379, - 35380, 35381, 35382, 35383, 35384, 35385, 35386, 35387, - 35388, 35389, 35390, 35391, 35392, 35393, 35394, 35395, - 35396, 35397, 35398, 35399, 35400, 35401, 35402, 35403, - }}, - {{ - 35404, 35405, 35406, 35407, 35408, 35409, 35410, 35411, - 35412, 35413, 35414, 35415, 35416, 35417, 35418, 35419, - 35420, 35421, 35422, 35423, 35424, 35425, 35426, 35427, - 35428, 35429, 35430, 35431, 35432, 35433, 35434, 35435, - }}, - {{ - 35436, 35437, 35438, 35439, 35440, 35441, 35442, 35443, - 35444, 35445, 35446, 35447, 35448, 35449, 35450, 35451, - 35452, 35453, 35454, 35455, 35456, 35457, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35459, 0, - 35460, 35461, 35462, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2695, 0, 2697, 0, - 2699, 0, 2701, 0, 2703, 0, 2705, 0, - 2707, 0, 2709, 0, 2711, 0, 2713, 0, - }}, - {{ - 2715, 0, 2717, 0, 0, 2719, 0, 2721, - 0, 2723, 0, 0, 0, 0, 0, 0, - 2725, 2727, 0, 2729, 2731, 0, 2733, 2735, - 0, 2737, 2739, 0, 2741, 2743, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2745, 0, 0, 0, - 0, 0, 0, 35515, 35517, 0, 2751, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2753, 0, 2755, 0, - 2757, 0, 2759, 0, 2761, 0, 2763, 0, - 2765, 0, 2767, 0, 2769, 0, 2771, 0, - }}, - {{ - 2773, 0, 2775, 0, 0, 2777, 0, 2779, - 0, 2781, 0, 0, 0, 0, 0, 0, - 2783, 2785, 0, 2787, 2789, 0, 2791, 2793, - 0, 2795, 2797, 0, 2799, 2801, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2803, 0, 0, 2805, - 2807, 2809, 2811, 0, 0, 0, 2813, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35583, 35584, 35585, 35586, 35587, 35588, 35589, - 35590, 35591, 35592, 35593, 35594, 35595, 35596, 35597, - }}, - {{ - 35598, 35599, 35600, 35601, 35602, 35603, 35604, 35605, - 35606, 35607, 35608, 35609, 35610, 35611, 35612, 35613, - 35614, 35615, 35616, 35617, 35618, 35619, 35620, 35621, - 35622, 35623, 35624, 35625, 35626, 35627, 35628, 35629, - }}, - {{ - 35630, 35631, 35632, 35633, 35634, 35635, 35636, 35637, - 35638, 35639, 35640, 35641, 35642, 35643, 35644, 35645, - 35646, 35647, 35648, 35649, 35650, 35651, 35652, 35653, - 35654, 35655, 35656, 35657, 35658, 35659, 35660, 35661, - }}, - {{ - 35662, 35663, 35664, 35665, 35666, 35667, 35668, 35669, - 35670, 35671, 35672, 35673, 35674, 35675, 35676, 0, - 0, 0, 35677, 35678, 35679, 35680, 35681, 35682, - 35683, 35684, 35685, 35686, 35687, 35688, 35689, 35690, - }}, - {{ - 35691, 35694, 35697, 35700, 35703, 35706, 35709, 35712, - 35715, 35718, 35721, 35724, 35727, 35730, 35733, 35737, - 35741, 35745, 35749, 35753, 35757, 35761, 35765, 35769, - 35773, 35777, 35781, 35785, 35789, 0, 0, 0, - }}, - {{ - 35793, 35796, 35799, 35802, 35805, 35808, 35811, 35814, - 35817, 35820, 35823, 35826, 35829, 35832, 35835, 35838, - 35841, 35844, 35847, 35850, 35853, 35856, 35859, 35862, - 35865, 35868, 35871, 35874, 35877, 35880, 35883, 35886, - }}, - {{ - 35889, 35892, 35895, 35898, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35901, 35902, 35903, 35904, 35905, 35906, 35907, 35908, - 35909, 35910, 35911, 35912, 35913, 35914, 35915, 35917, - 35919, 35921, 35923, 35925, 35927, 35929, 35931, 35933, - 35935, 35937, 35939, 35941, 0, 0, 0, 0, - }}, - {{ - 35943, 35944, 35945, 35946, 35947, 35948, 35949, 35950, - 35951, 35952, 35953, 35954, 35955, 35956, 35957, 35958, - 35959, 35960, 35961, 35962, 35963, 35964, 35965, 35966, - 35967, 35968, 35969, 35970, 35971, 35972, 35973, 35974, - }}, - {{ - 35975, 35976, 35977, 35978, 35979, 35980, 35981, 35982, - 35983, 35984, 35985, 35986, 35987, 35988, 35989, 35990, - 35991, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 35992, 35994, 35996, 35998, 36000, 36002, 36004, 36006, - 36008, 36010, 36013, 36016, 0, 0, 0, 0, - 36019, 36020, 36021, 36022, 36023, 36024, 36025, 36026, - 36027, 36028, 36029, 36030, 36031, 36032, 36033, 36034, - }}, - {{ - 36035, 36036, 36037, 36038, 36039, 36040, 36041, 36042, - 36043, 36044, 36045, 36046, 36047, 36048, 36049, 36050, - 36051, 36052, 36053, 36054, 36055, 36056, 36057, 36058, - 36059, 36060, 36061, 36062, 36063, 36064, 36065, 0, - }}, - {{ - 36066, 36070, 36074, 36078, 36081, 36085, 36088, 36091, - 36096, 36100, 36103, 36106, 36109, 36113, 36117, 36120, - 36123, 36125, 36128, 36132, 36136, 36138, 36143, 36149, - 36154, 36157, 36162, 36167, 36171, 36174, 36177, 36180, - }}, - {{ - 36184, 36189, 36193, 36196, 36199, 36202, 36204, 36206, - 36208, 36210, 36213, 36216, 36221, 36224, 36228, 36233, - 36236, 36238, 36240, 36245, 36249, 36254, 36257, 36262, - 36264, 36267, 36270, 36273, 36276, 36279, 36283, 36286, - }}, - {{ - 36288, 36291, 36294, 36297, 36301, 36304, 36307, 36310, - 36315, 36319, 36321, 36326, 36328, 36332, 36336, 36339, - 36342, 36345, 36349, 36351, 36354, 36358, 36360, 36365, - 36368, 36370, 36372, 36374, 36376, 36378, 36380, 36382, - }}, - {{ - 36384, 36386, 36388, 36391, 36394, 36397, 36400, 36403, - 36406, 36409, 36412, 36415, 36418, 36421, 36424, 36427, - 36430, 36433, 36436, 36438, 36440, 36443, 36445, 0, - 0, 0, 0, 36447, 36449, 36451, 36453, 36455, - }}, - {{ - 36459, 36461, 36463, 36465, 36467, 36469, 36471, 36473, - 36475, 36478, 36482, 36484, 36486, 36488, 36490, 36492, - 36494, 36496, 36499, 36502, 36505, 36508, 36510, 36512, - 36514, 36516, 36518, 36520, 36522, 36524, 36526, 36528, - }}, - {{ - 36531, 36534, 36536, 36539, 36542, 36545, 36547, 36550, - 36553, 36557, 36559, 36562, 36565, 36568, 36571, 36576, - 36582, 36584, 36586, 36588, 36590, 36592, 36594, 36596, - 36598, 36600, 36602, 36604, 36606, 36608, 36610, 36612, - }}, - {{ - 36614, 36616, 36618, 36622, 36624, 36626, 36628, 36632, - 36635, 36637, 36639, 36641, 36643, 36645, 36647, 36649, - 36651, 36653, 36655, 36658, 36660, 36662, 36665, 36668, - 36670, 36674, 36677, 36679, 36681, 36683, 0, 0, - }}, - {{ - 36685, 36687, 36689, 36691, 36693, 36695, 36697, 36699, - 36701, 36703, 36706, 36709, 36712, 36715, 36718, 36721, - 36724, 36727, 36730, 36733, 36736, 36739, 36742, 36745, - 36748, 36751, 36754, 36757, 36760, 36763, 36766, 0, - }}, - {{ - 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, - 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, - 4017, 4018, 4019, 4020, 4021, 4022, 4023, 4024, - 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, - }}, - {{ - 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, - 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, - 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056, - 4057, 4058, 4059, 4060, 4061, 4062, 4063, 4064, - }}, - {{ - 4065, 4066, 4067, 4068, 4069, 4070, 4071, 4072, - 4073, 4074, 4075, 4076, 4077, 4078, 4079, 4080, - 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, - 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, - }}, - {{ - 4097, 4098, 4099, 4100, 4101, 4102, 4103, 4104, - 4105, 4106, 4107, 4108, 4109, 4110, 4111, 4112, - 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120, - 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, - }}, - {{ - 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, - 4137, 4138, 4139, 4140, 4141, 4142, 4143, 4144, - 4145, 4146, 4147, 4148, 4149, 4150, 4151, 4152, - 4153, 4154, 4155, 4156, 4157, 4158, 4159, 4160, - }}, - {{ - 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, - 4169, 4170, 4171, 4172, 4173, 4174, 4175, 4176, - 4177, 4178, 4179, 4180, 4181, 4182, 4183, 4184, - 4185, 4186, 4187, 4188, 4189, 4190, 4191, 4192, - }}, - {{ - 4193, 4194, 4195, 4196, 4197, 4198, 4199, 4200, - 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, - 4209, 4210, 4211, 4212, 4213, 4214, 4215, 4216, - 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, - }}, - {{ - 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, - 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, - 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, - 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, - }}, - {{ - 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, - 4265, 4266, 4267, 4268, 4269, 4270, 0, 0, - 4271, 0, 4272, 0, 0, 4273, 4274, 4275, - 4276, 4277, 4278, 4279, 4280, 4281, 4282, 0, - }}, - {{ - 4283, 0, 4284, 0, 0, 4285, 4286, 0, - 0, 0, 4287, 4288, 4289, 4290, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 37059, 37061, 37063, 37065, 37068, 37071, 37073, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37075, 37077, 37079, 37081, 37083, - 0, 0, 0, 0, 0, 4317, 0, 4319, - }}, - {{ - 37089, 37090, 37091, 37092, 37093, 37094, 37095, 37096, - 37097, 37098, 4331, 4333, 4335, 4337, 4339, 4341, - 4343, 4345, 4347, 4349, 4351, 4353, 4355, 0, - 4357, 4359, 4361, 4363, 4365, 0, 4367, 0, - }}, - {{ - 4369, 4371, 0, 4373, 4375, 0, 4377, 4379, - 4381, 4383, 4385, 4387, 4389, 4391, 4393, 37163, - 37165, 37166, 37167, 37168, 37169, 37170, 37171, 37172, - 37173, 37174, 37175, 37176, 37177, 37178, 37179, 37180, - }}, - {{ - 37181, 37182, 37183, 37184, 37185, 37186, 37187, 37188, - 37189, 37190, 37191, 37192, 37193, 37194, 37195, 37196, - 37197, 37198, 37199, 37200, 37201, 37202, 37203, 37204, - 37205, 37206, 37207, 37208, 37209, 37210, 37211, 37212, - }}, - {{ - 37213, 37214, 37215, 37216, 37217, 37218, 37219, 37220, - 37221, 37222, 37223, 37224, 37225, 37226, 37227, 37228, - 37229, 37230, 37231, 37232, 37233, 37234, 37235, 37236, - 37237, 37238, 37239, 37240, 37241, 37242, 37243, 37244, - }}, - {{ - 37245, 37246, 37247, 37248, 37249, 37250, 37251, 37252, - 37253, 37254, 37255, 37256, 37257, 37258, 37259, 37260, - 37261, 37262, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37263, 37264, 37265, 37266, 37267, - 37268, 37269, 37270, 37271, 37272, 37273, 37274, 37275, - }}, - {{ - 37276, 37277, 37278, 37279, 37280, 37281, 37282, 37283, - 37284, 37285, 37286, 37288, 37290, 37292, 37294, 37296, - 37298, 37300, 37302, 37304, 37306, 37308, 37310, 37312, - 37314, 37316, 37318, 37320, 37322, 37323, 37324, 37325, - }}, - {{ - 37326, 37328, 37330, 37332, 37334, 37336, 37338, 37340, - 37342, 37344, 37346, 37348, 37350, 37352, 37354, 37356, - 37358, 37360, 37362, 37364, 37366, 37368, 37370, 37372, - 37374, 37376, 37378, 37380, 37382, 37384, 37386, 37388, - }}, - {{ - 37390, 37392, 37394, 37396, 37398, 37400, 37402, 37404, - 37406, 37408, 37410, 37412, 37414, 37416, 37418, 37420, - 37422, 37424, 37426, 37428, 37430, 37432, 37434, 37436, - 37438, 37440, 37442, 37444, 37446, 37448, 37450, 37452, - }}, - {{ - 37454, 37456, 37458, 37460, 37462, 37464, 37466, 37468, - 37470, 37472, 37474, 37476, 37478, 37480, 37482, 37484, - 37486, 37488, 37490, 37492, 37494, 37496, 37498, 37500, - 37502, 37504, 37506, 37508, 37510, 37512, 37514, 37517, - }}, - {{ - 37520, 37523, 37526, 37529, 37532, 37534, 37536, 37538, - 37540, 37542, 37544, 37546, 37548, 37550, 37552, 37554, - 37556, 37558, 37560, 37562, 37564, 37566, 37568, 37570, - 37572, 37574, 37576, 37578, 37580, 37582, 37584, 37586, - }}, - {{ - 37588, 37590, 37592, 37594, 37596, 37598, 37600, 37602, - 37604, 37606, 37608, 37610, 37612, 37614, 37616, 37618, - 37620, 37622, 37624, 37626, 37628, 37630, 37632, 37634, - 37636, 37638, 37640, 37642, 37644, 37646, 37648, 37650, - }}, - {{ - 37652, 37654, 37656, 37658, 37660, 37662, 37664, 37666, - 37668, 37670, 37672, 37674, 37676, 37678, 37680, 37682, - 37684, 37686, 37688, 37690, 37692, 37694, 37696, 37698, - 37700, 37702, 37704, 37706, 37708, 37710, 37712, 37714, - }}, - {{ - 37716, 37718, 37720, 37722, 37724, 37726, 37728, 37730, - 37732, 37734, 37736, 37738, 37740, 37742, 37744, 37746, - 37748, 37750, 37752, 37754, 37756, 37758, 37760, 37762, - 37764, 37766, 37768, 37770, 37772, 37774, 37776, 37778, - }}, - {{ - 37780, 37782, 37784, 37786, 37788, 37790, 37792, 37794, - 37796, 37798, 37800, 37802, 37804, 37806, 37808, 37810, - 37812, 37814, 37816, 37819, 37822, 37825, 37827, 37829, - 37831, 37833, 37835, 37837, 37839, 37841, 37843, 37845, - }}, - {{ - 37847, 37849, 37851, 37853, 37855, 37857, 37859, 37861, - 37863, 37865, 37867, 37869, 37871, 37873, 37875, 37877, - 37879, 37881, 37883, 37885, 37887, 37889, 37891, 37893, - 37895, 37897, 37899, 37901, 37903, 37905, 37907, 37909, - }}, - {{ - 37911, 37913, 37915, 37917, 37919, 37921, 37923, 37925, - 37927, 37929, 37931, 37933, 37935, 37937, 37939, 37941, - 37943, 37945, 37947, 37949, 37951, 37953, 37955, 37957, - 37959, 37961, 37963, 37965, 37967, 37969, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 37971, 37974, 37977, 37980, 37983, 37986, 37989, 37992, - 37995, 37998, 38001, 38004, 38007, 38010, 38013, 38016, - }}, - {{ - 38019, 38022, 38025, 38028, 38031, 38034, 38037, 38040, - 38043, 38046, 38049, 38052, 38055, 38058, 38061, 38064, - 38067, 38070, 38073, 38076, 38079, 38082, 38085, 38088, - 38091, 38094, 38097, 38100, 38103, 38106, 38109, 38112, - }}, - {{ - 38115, 38118, 38121, 38124, 38127, 38130, 38133, 38136, - 38139, 38142, 38145, 38148, 38151, 38154, 38157, 38160, - 0, 0, 38163, 38166, 38169, 38172, 38175, 38178, - 38181, 38184, 38187, 38190, 38193, 38196, 38199, 38202, - }}, - {{ - 38205, 38208, 38211, 38214, 38217, 38220, 38223, 38226, - 38229, 38232, 38235, 38238, 38241, 38244, 38247, 38250, - 38253, 38256, 38259, 38262, 38265, 38268, 38271, 38274, - 38277, 38280, 38283, 38286, 38289, 38292, 38295, 38298, - }}, - {{ - 38301, 38304, 38307, 38310, 38313, 38316, 38319, 38322, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 38325, 38328, 38331, 38335, 38339, 38343, 38347, 38351, - 38355, 38359, 38362, 38380, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 38388, 38389, 38390, 38391, 38392, 38393, 38394, 38395, - 38396, 38397, 38398, 38399, 38400, 38401, 38402, 38403, - }}, - {{ - 38404, 38405, 38406, 38407, 38408, 0, 0, 0, - 0, 38409, 38410, 38411, 38412, 38413, 38414, 38415, - 38416, 38417, 38418, 0, 38419, 38420, 38421, 38422, - 38423, 38424, 38425, 38426, 38427, 38428, 38429, 38430, - }}, - {{ - 38431, 38432, 38433, 38434, 38435, 38436, 38437, 0, - 38438, 38439, 38440, 38441, 0, 0, 0, 0, - 38442, 38444, 38446, 0, 38448, 0, 38450, 38452, - 38454, 38456, 38458, 38460, 38462, 38464, 38466, 38468, - }}, - {{ - 38470, 38471, 38472, 38473, 38474, 38475, 38476, 38477, - 38478, 38479, 38480, 38481, 38482, 38483, 38484, 38485, - 38486, 38487, 38488, 38489, 38490, 38491, 38492, 38493, - 38494, 38495, 38496, 38497, 38498, 38499, 38500, 38501, - }}, - {{ - 38502, 38503, 38504, 38505, 38506, 38507, 38508, 38509, - 38510, 38511, 38512, 38513, 38514, 38515, 38516, 38517, - 38518, 38519, 38520, 38521, 38522, 38523, 38524, 38525, - 38526, 38527, 38528, 38529, 38530, 38531, 38532, 38533, - }}, - {{ - 38534, 38535, 38536, 38537, 38538, 38539, 38540, 38541, - 38542, 38543, 38544, 38545, 38546, 38547, 38548, 38549, - 38550, 38551, 38552, 38553, 38554, 38555, 38556, 38557, - 38558, 38559, 38560, 38561, 38562, 38563, 38564, 38565, - }}, - {{ - 38566, 38567, 38568, 38569, 38570, 38571, 38572, 38573, - 38574, 38575, 38576, 38577, 38578, 38579, 38580, 38581, - 38582, 38583, 38584, 38585, 38586, 38587, 38589, 38591, - 38593, 38595, 38597, 38599, 38601, 0, 0, 0, - }}, - {{ - 0, 38603, 38604, 38605, 38606, 38607, 38608, 38609, - 38610, 38611, 38612, 38613, 38614, 38615, 38616, 38617, - 38618, 38619, 38620, 38621, 38622, 38623, 38624, 38625, - 38626, 38627, 38628, 38629, 38630, 38631, 38632, 38633, - }}, - {{ - 38634, 38635, 38636, 38637, 38638, 38639, 38640, 38641, - 38642, 38643, 38644, 38645, 38646, 38647, 38648, 38649, - 38650, 38651, 38652, 38653, 38654, 38655, 38656, 38657, - 38658, 38659, 38660, 38661, 38662, 38663, 38664, 38665, - }}, - {{ - 38666, 38667, 38668, 38669, 38670, 38671, 38672, 38673, - 38674, 38675, 38676, 38677, 38678, 38679, 38680, 38681, - 38682, 38683, 38684, 38685, 38686, 38687, 38688, 38689, - 38690, 38691, 38692, 38693, 38694, 38695, 38696, 0, - }}, - {{ - 0, 38697, 38698, 38699, 38700, 38701, 38702, 38703, - 38704, 38705, 38706, 38707, 38708, 38709, 38710, 38711, - 38712, 38713, 38714, 38715, 38716, 38717, 38718, 38719, - 38720, 38721, 38722, 38723, 38724, 38725, 38726, 38727, - }}, - {{ - 38728, 38729, 38730, 38731, 38732, 38733, 38734, 38735, - 38736, 38737, 38738, 38739, 38740, 38741, 38742, 38743, - 38744, 38745, 38746, 38747, 38748, 38749, 38750, 38751, - 38752, 38753, 38754, 38755, 38756, 38757, 38758, 38759, - }}, - {{ - 38760, 38761, 38762, 38763, 38764, 38765, 38766, 38767, - 38768, 38769, 38770, 38771, 38772, 38773, 38774, 38775, - 38776, 38777, 38778, 38779, 38780, 38781, 38782, 38783, - 38784, 38785, 38786, 38787, 38788, 38789, 38790, 0, - }}, - {{ - 0, 0, 38791, 38792, 38793, 38794, 38795, 38796, - 0, 0, 38797, 38798, 38799, 38800, 38801, 38802, - 0, 0, 38803, 38804, 38805, 38806, 38807, 38808, - 0, 0, 38809, 38810, 38811, 0, 0, 0, - }}, - {{ - 38812, 38813, 38814, 38815, 38816, 38817, 38818, 0, - 38819, 38820, 38821, 38822, 38823, 38824, 38825, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 6058, 6060, - }}, - {{ - 6062, 6064, 6066, 6068, 6070, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6072, 6074, 6076, 6078, 6080, - }}, - {{ - 6082, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 38852, 38853, 38854, 38855, 38856, 38857, 38858, 38859, - 38860, 38861, 38862, 38863, 38864, 38865, 38866, 38867, - 38868, 38869, 38870, 38871, 38872, 38873, 38874, 38875, - 38876, 38877, 38878, 38879, 38880, 38881, 38882, 38883, - }}, - {{ - 38884, 38885, 38886, 38887, 38888, 38889, 38890, 38891, - 38892, 38893, 38894, 38895, 38896, 38897, 38898, 38899, - 38900, 38901, 38902, 38903, 38904, 38905, 38906, 38907, - 38908, 38909, 38910, 38911, 38912, 38913, 38914, 38915, - }}, - {{ - 38916, 38917, 38918, 38919, 38920, 38921, 38922, 38923, - 38924, 38925, 38926, 38927, 38928, 38929, 38930, 38931, - 38932, 38933, 38934, 38935, 38936, 0, 38937, 38938, - 38939, 38940, 38941, 38942, 38943, 38944, 38945, 38946, - }}, - {{ - 38947, 38948, 38949, 38950, 38951, 38952, 38953, 38954, - 38955, 38956, 38957, 38958, 38959, 38960, 38961, 38962, - 38963, 38964, 38965, 38966, 38967, 38968, 38969, 38970, - 38971, 38972, 38973, 38974, 38975, 38976, 38977, 38978, - }}, - {{ - 38979, 38980, 38981, 38982, 38983, 38984, 38985, 38986, - 38987, 38988, 38989, 38990, 38991, 38992, 38993, 38994, - 38995, 38996, 38997, 38998, 38999, 39000, 39001, 39002, - 39003, 39004, 39005, 39006, 39007, 0, 39008, 39009, - }}, - {{ - 0, 0, 39010, 0, 0, 39011, 39012, 0, - 0, 39013, 39014, 39015, 39016, 0, 39017, 39018, - 39019, 39020, 39021, 39022, 39023, 39024, 39025, 39026, - 39027, 39028, 0, 39029, 0, 39030, 39031, 39032, - }}, - {{ - 39033, 0, 39034, 39035, 0, 39036, 39037, 39038, - 39039, 39040, 39041, 39042, 39043, 39044, 39045, 39046, - 39047, 39048, 39049, 39050, 39051, 39052, 39053, 39054, - 39055, 39056, 39057, 39058, 39059, 39060, 39061, 39062, - }}, - {{ - 39063, 39064, 39065, 39066, 39067, 39068, 39069, 39070, - 39071, 39072, 39073, 39074, 39075, 39076, 39077, 39078, - 39079, 39080, 39081, 39082, 39083, 39084, 39085, 39086, - 39087, 39088, 39089, 39090, 39091, 39092, 39093, 39094, - }}, - {{ - 39095, 39096, 39097, 39098, 39099, 39100, 0, 39101, - 39102, 39103, 39104, 0, 0, 39105, 39106, 39107, - 39108, 39109, 39110, 39111, 39112, 0, 39113, 39114, - 39115, 39116, 39117, 39118, 39119, 0, 39120, 39121, - }}, - {{ - 39122, 39123, 39124, 39125, 39126, 39127, 39128, 39129, - 39130, 39131, 39132, 39133, 39134, 39135, 39136, 39137, - 39138, 39139, 39140, 39141, 39142, 39143, 39144, 39145, - 39146, 39147, 0, 39148, 39149, 39150, 39151, 0, - }}, - {{ - 39152, 39153, 39154, 39155, 39156, 0, 39157, 0, - 0, 0, 39158, 39159, 39160, 39161, 39162, 39163, - 39164, 0, 39165, 39166, 39167, 39168, 39169, 39170, - 39171, 39172, 39173, 39174, 39175, 39176, 39177, 39178, - }}, - {{ - 39179, 39180, 39181, 39182, 39183, 39184, 39185, 39186, - 39187, 39188, 39189, 39190, 39191, 39192, 39193, 39194, - 39195, 39196, 39197, 39198, 39199, 39200, 39201, 39202, - 39203, 39204, 39205, 39206, 39207, 39208, 39209, 39210, - }}, - {{ - 39211, 39212, 39213, 39214, 39215, 39216, 39217, 39218, - 39219, 39220, 39221, 39222, 39223, 39224, 39225, 39226, - 39227, 39228, 39229, 39230, 39231, 39232, 39233, 39234, - 39235, 39236, 39237, 39238, 39239, 39240, 39241, 39242, - }}, - {{ - 39243, 39244, 39245, 39246, 39247, 39248, 39249, 39250, - 39251, 39252, 39253, 39254, 39255, 39256, 39257, 39258, - 39259, 39260, 39261, 39262, 39263, 39264, 39265, 39266, - 39267, 39268, 39269, 39270, 39271, 39272, 39273, 39274, - }}, - {{ - 39275, 39276, 39277, 39278, 39279, 39280, 39281, 39282, - 39283, 39284, 39285, 39286, 39287, 39288, 39289, 39290, - 39291, 39292, 39293, 39294, 39295, 39296, 39297, 39298, - 39299, 39300, 39301, 39302, 39303, 39304, 39305, 39306, - }}, - {{ - 39307, 39308, 39309, 39310, 39311, 39312, 39313, 39314, - 39315, 39316, 39317, 39318, 39319, 39320, 39321, 39322, - 39323, 39324, 39325, 39326, 39327, 39328, 39329, 39330, - 39331, 39332, 39333, 39334, 39335, 39336, 39337, 39338, - }}, - {{ - 39339, 39340, 39341, 39342, 39343, 39344, 39345, 39346, - 39347, 39348, 39349, 39350, 39351, 39352, 39353, 39354, - 39355, 39356, 39357, 39358, 39359, 39360, 39361, 39362, - 39363, 39364, 39365, 39366, 39367, 39368, 39369, 39370, - }}, - {{ - 39371, 39372, 39373, 39374, 39375, 39376, 39377, 39378, - 39379, 39380, 39381, 39382, 39383, 39384, 39385, 39386, - 39387, 39388, 39389, 39390, 39391, 39392, 39393, 39394, - 39395, 39396, 39397, 39398, 39399, 39400, 39401, 39402, - }}, - {{ - 39403, 39404, 39405, 39406, 39407, 39408, 39409, 39410, - 39411, 39412, 39413, 39414, 39415, 39416, 39417, 39418, - 39419, 39420, 39421, 39422, 39423, 39424, 39425, 39426, - 39427, 39428, 39429, 39430, 39431, 39432, 39433, 39434, - }}, - {{ - 39435, 39436, 39437, 39438, 39439, 39440, 39441, 39442, - 39443, 39444, 39445, 39446, 39447, 39448, 39449, 39450, - 39451, 39452, 39453, 39454, 39455, 39456, 39457, 39458, - 39459, 39460, 39461, 39462, 39463, 39464, 39465, 39466, - }}, - {{ - 39467, 39468, 39469, 39470, 39471, 39472, 39473, 39474, - 39475, 39476, 39477, 39478, 39479, 39480, 39481, 39482, - 39483, 39484, 39485, 39486, 39487, 39488, 39489, 39490, - 39491, 39492, 39493, 39494, 39495, 39496, 39497, 39498, - }}, - {{ - 39499, 39500, 39501, 39502, 0, 0, 0, 0, - 39503, 39504, 39505, 39506, 39507, 39508, 39509, 39510, - 39511, 39512, 39513, 39514, 39515, 39516, 39517, 39518, - 39519, 39520, 39521, 39522, 39523, 39524, 39525, 39526, - }}, - {{ - 39527, 39528, 39529, 39530, 39531, 39532, 39533, 39534, - 39535, 39536, 39537, 39538, 39539, 39540, 39541, 39542, - 39543, 39544, 39545, 39546, 39547, 39548, 39549, 39550, - 39551, 39552, 39553, 39554, 39555, 39556, 39557, 39558, - }}, - {{ - 39559, 39560, 39561, 39562, 39563, 39564, 39565, 39566, - 39567, 39568, 39569, 39570, 39571, 39572, 39573, 39574, - 39575, 39576, 39577, 39578, 39579, 39580, 39581, 39582, - 39583, 39584, 39585, 39586, 39587, 39588, 39589, 39590, - }}, - {{ - 39591, 39592, 39593, 39594, 39595, 39596, 39597, 39598, - 39599, 39600, 39601, 39602, 39603, 39604, 39605, 39606, - 39607, 39608, 39609, 39610, 39611, 39612, 39613, 39614, - 39615, 39616, 39617, 39618, 39619, 39620, 39621, 39622, - }}, - {{ - 39623, 39624, 39625, 39626, 39627, 39628, 39629, 39630, - 39631, 39632, 39633, 39634, 39635, 39636, 39637, 39638, - 39639, 39640, 39641, 39642, 39643, 39644, 39645, 39646, - 39647, 39648, 39649, 39650, 39651, 39652, 39653, 39654, - }}, - {{ - 39655, 39656, 39657, 39658, 39659, 39660, 39661, 39662, - 39663, 39664, 39665, 39666, 39667, 39668, 39669, 39670, - 39671, 39672, 39673, 39674, 39675, 39676, 39677, 39678, - 39679, 39680, 39681, 39682, 39683, 39684, 39685, 39686, - }}, - {{ - 39687, 39688, 39689, 39690, 39691, 39692, 39693, 39694, - 39695, 39696, 39697, 39698, 39699, 39700, 39701, 39702, - 39703, 39704, 39705, 39706, 39707, 39708, 39709, 39710, - 39711, 39712, 39713, 39714, 39715, 39716, 39717, 39718, - }}, - {{ - 39719, 39720, 39721, 39722, 39723, 39724, 39725, 39726, - 39727, 39728, 39729, 39730, 39731, 39732, 39733, 39734, - 39735, 39736, 39737, 39738, 39739, 39740, 39741, 39742, - 39743, 39744, 39745, 39746, 39747, 39748, 39749, 39750, - }}, - {{ - 39751, 39752, 39753, 39754, 39755, 39756, 39757, 39758, - 39759, 39760, 39761, 39762, 39763, 39764, 39765, 39766, - 39767, 39768, 39769, 39770, 39771, 39772, 39773, 39774, - 39775, 39776, 39777, 39778, 39779, 39780, 39781, 39782, - }}, - {{ - 39783, 39784, 39785, 39786, 39787, 39788, 39789, 39790, - 39791, 39792, 0, 0, 0, 0, 39793, 39794, - 39795, 39796, 39797, 39798, 39799, 39800, 39801, 39802, - 39803, 39804, 39805, 39806, 39807, 39808, 39809, 39810, - }}, - {{ - 39811, 39812, 39813, 39814, 39815, 39816, 39817, 39818, - 39819, 39820, 39821, 39822, 39823, 39824, 39825, 39826, - 39827, 39828, 39829, 39830, 39831, 39832, 39833, 39834, - 39835, 39836, 39837, 39838, 39839, 39840, 39841, 39842, - }}, - {{ - 7075, 7076, 7077, 7078, 7079, 7080, 7081, 7082, - 7083, 7084, 7085, 7086, 7087, 7088, 7089, 7090, - 7091, 7092, 7093, 7094, 7095, 7096, 7097, 7098, - 7099, 7100, 7101, 7102, 7103, 7104, 7105, 7106, - }}, - {{ - 7107, 7108, 7109, 7110, 7111, 7112, 7113, 7114, - 7115, 7116, 7117, 7118, 7119, 7120, 7121, 7122, - 7123, 7124, 7125, 7126, 7127, 7128, 7129, 7130, - 7131, 7132, 7133, 7134, 7135, 7136, 7137, 7138, - }}, - {{ - 7139, 7140, 7141, 7142, 7143, 7144, 7145, 7146, - 7147, 7148, 7149, 7150, 7151, 7152, 7153, 7154, - 7155, 7156, 7157, 7158, 7159, 7160, 7161, 7162, - 7163, 7164, 7165, 7166, 7167, 7168, 7169, 7170, - }}, - {{ - 7171, 7172, 7173, 7174, 7175, 7176, 7177, 7178, - 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, - 7187, 7188, 7189, 7190, 7191, 7192, 7193, 7194, - 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, - }}, - {{ - 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210, - 7211, 7212, 7213, 7214, 7215, 7216, 7217, 7218, - 7219, 7220, 7221, 7222, 7223, 7224, 7225, 7226, - 7227, 7228, 7229, 7230, 7231, 7232, 7233, 7234, - }}, - {{ - 7235, 7236, 7237, 7238, 7239, 7240, 7241, 7242, - 7243, 7244, 7245, 7246, 7247, 7248, 7249, 7250, - 7251, 7252, 7253, 7254, 7255, 7256, 7257, 7258, - 7259, 7260, 7261, 7262, 7263, 7264, 7265, 7266, - }}, - {{ - 7267, 7268, 7269, 7270, 7271, 7272, 7273, 7274, - 7275, 7276, 7277, 7278, 7279, 7280, 7281, 7282, - 7283, 7284, 7285, 7286, 7287, 7288, 7289, 7290, - 7291, 7292, 7293, 7294, 7295, 7296, 7297, 7298, - }}, - {{ - 7299, 7300, 7301, 7302, 7303, 7304, 7305, 7306, - 7307, 7308, 7309, 7310, 7311, 7312, 7313, 7314, - 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, - 7323, 7324, 7325, 7326, 7327, 7328, 7329, 7330, - }}, - {{ - 7331, 7332, 7333, 7334, 7335, 7336, 7337, 7338, - 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, - 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, - 7355, 7356, 7357, 7358, 7359, 7360, 7361, 7362, - }}, - {{ - 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, - 7371, 7372, 7373, 7374, 7375, 7376, 7377, 7378, - 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, - 7387, 7388, 7389, 7390, 7391, 7392, 7393, 7394, - }}, - {{ - 7395, 7396, 7397, 7398, 7399, 7400, 7401, 7402, - 7403, 7404, 7405, 7406, 7407, 7408, 7409, 7410, - 7411, 7412, 7413, 7414, 7415, 7416, 7417, 7418, - 7419, 7420, 7421, 7422, 7423, 7424, 7425, 7426, - }}, - {{ - 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, - 7435, 7436, 7437, 7438, 7439, 7440, 7441, 7442, - 7443, 7444, 7445, 7446, 7447, 7448, 7449, 7450, - 7451, 7452, 7453, 7454, 7455, 7456, 7457, 7458, - }}, - {{ - 7459, 7460, 7461, 7462, 7463, 7464, 7465, 7466, - 7467, 7468, 7469, 7470, 7471, 7472, 7473, 7474, - 7475, 7476, 7477, 7478, 7479, 7480, 7481, 7482, - 7483, 7484, 7485, 7486, 7487, 7488, 7489, 7490, - }}, - {{ - 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, - 7499, 7500, 7501, 7502, 7503, 7504, 7505, 7506, - 7507, 7508, 7509, 7510, 7511, 7512, 7513, 7514, - 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, - }}, - {{ - 7523, 7524, 7525, 7526, 7527, 7528, 7529, 7530, - 7531, 7532, 7533, 7534, 7535, 7536, 7537, 7538, - 7539, 7540, 7541, 7542, 7543, 7544, 7545, 7546, - 7547, 7548, 7549, 7550, 7551, 7552, 7553, 7554, - }}, - {{ - 7555, 7556, 7557, 7558, 7559, 7560, 7561, 7562, - 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, - 7571, 7572, 7573, 7574, 7575, 7576, 7577, 7578, - 7579, 7580, 7581, 7582, 7583, 7584, 7585, 7586, - }}, - {{ - 7587, 7588, 7589, 7590, 7591, 7592, 7593, 7594, - 7595, 7596, 7597, 7598, 7599, 7600, 7601, 7602, - 7603, 7604, 7605, 7606, 7607, 7608, 7609, 7610, - 7611, 7612, 7613, 7614, 7615, 7616, 0, 0, - }}, -}; -static const unsigned long v310_decompose_seq[] = { - 0x00000000, 0x80000020, 0x00000020, 0x80000308, - 0x80000061, 0x00000020, 0x80000304, 0x80000032, - 0x80000033, 0x00000020, 0x80000301, 0x800003bc, - 0x00000020, 0x80000327, 0x80000031, 0x8000006f, - 0x00000031, 0x00002044, 0x80000034, 0x00000031, - 0x00002044, 0x80000032, 0x00000033, 0x00002044, - 0x80000034, 0x00000041, 0x80000300, 0x00000041, - 0x80000301, 0x00000041, 0x80000302, 0x00000041, - 0x80000303, 0x00000041, 0x80000308, 0x00000041, - 0x8000030a, 0x00000043, 0x80000327, 0x00000045, - 0x80000300, 0x00000045, 0x80000301, 0x00000045, - 0x80000302, 0x00000045, 0x80000308, 0x00000049, - 0x80000300, 0x00000049, 0x80000301, 0x00000049, - 0x80000302, 0x00000049, 0x80000308, 0x0000004e, - 0x80000303, 0x0000004f, 0x80000300, 0x0000004f, - 0x80000301, 0x0000004f, 0x80000302, 0x0000004f, - 0x80000303, 0x0000004f, 0x80000308, 0x00000055, - 0x80000300, 0x00000055, 0x80000301, 0x00000055, - 0x80000302, 0x00000055, 0x80000308, 0x00000059, - 0x80000301, 0x00000061, 0x80000300, 0x00000061, - 0x80000301, 0x00000061, 0x80000302, 0x00000061, - 0x80000303, 0x00000061, 0x80000308, 0x00000061, - 0x8000030a, 0x00000063, 0x80000327, 0x00000065, - 0x80000300, 0x00000065, 0x80000301, 0x00000065, - 0x80000302, 0x00000065, 0x80000308, 0x00000069, - 0x80000300, 0x00000069, 0x80000301, 0x00000069, - 0x80000302, 0x00000069, 0x80000308, 0x0000006e, - 0x80000303, 0x0000006f, 0x80000300, 0x0000006f, - 0x80000301, 0x0000006f, 0x80000302, 0x0000006f, - 0x80000303, 0x0000006f, 0x80000308, 0x00000075, - 0x80000300, 0x00000075, 0x80000301, 0x00000075, - 0x80000302, 0x00000075, 0x80000308, 0x00000079, - 0x80000301, 0x00000079, 0x80000308, 0x00000041, - 0x80000304, 0x00000061, 0x80000304, 0x00000041, - 0x80000306, 0x00000061, 0x80000306, 0x00000041, - 0x80000328, 0x00000061, 0x80000328, 0x00000043, - 0x80000301, 0x00000063, 0x80000301, 0x00000043, - 0x80000302, 0x00000063, 0x80000302, 0x00000043, - 0x80000307, 0x00000063, 0x80000307, 0x00000043, - 0x8000030c, 0x00000063, 0x8000030c, 0x00000044, - 0x8000030c, 0x00000064, 0x8000030c, 0x00000045, - 0x80000304, 0x00000065, 0x80000304, 0x00000045, - 0x80000306, 0x00000065, 0x80000306, 0x00000045, - 0x80000307, 0x00000065, 0x80000307, 0x00000045, - 0x80000328, 0x00000065, 0x80000328, 0x00000045, - 0x8000030c, 0x00000065, 0x8000030c, 0x00000047, - 0x80000302, 0x00000067, 0x80000302, 0x00000047, - 0x80000306, 0x00000067, 0x80000306, 0x00000047, - 0x80000307, 0x00000067, 0x80000307, 0x00000047, - 0x80000327, 0x00000067, 0x80000327, 0x00000048, - 0x80000302, 0x00000068, 0x80000302, 0x00000049, - 0x80000303, 0x00000069, 0x80000303, 0x00000049, - 0x80000304, 0x00000069, 0x80000304, 0x00000049, - 0x80000306, 0x00000069, 0x80000306, 0x00000049, - 0x80000328, 0x00000069, 0x80000328, 0x00000049, - 0x80000307, 0x00000049, 0x8000004a, 0x00000069, - 0x8000006a, 0x0000004a, 0x80000302, 0x0000006a, - 0x80000302, 0x0000004b, 0x80000327, 0x0000006b, - 0x80000327, 0x0000004c, 0x80000301, 0x0000006c, - 0x80000301, 0x0000004c, 0x80000327, 0x0000006c, - 0x80000327, 0x0000004c, 0x8000030c, 0x0000006c, - 0x8000030c, 0x0000004c, 0x800000b7, 0x0000006c, - 0x800000b7, 0x0000004e, 0x80000301, 0x0000006e, - 0x80000301, 0x0000004e, 0x80000327, 0x0000006e, - 0x80000327, 0x0000004e, 0x8000030c, 0x0000006e, - 0x8000030c, 0x000002bc, 0x8000006e, 0x0000004f, - 0x80000304, 0x0000006f, 0x80000304, 0x0000004f, - 0x80000306, 0x0000006f, 0x80000306, 0x0000004f, - 0x8000030b, 0x0000006f, 0x8000030b, 0x00000052, - 0x80000301, 0x00000072, 0x80000301, 0x00000052, - 0x80000327, 0x00000072, 0x80000327, 0x00000052, - 0x8000030c, 0x00000072, 0x8000030c, 0x00000053, - 0x80000301, 0x00000073, 0x80000301, 0x00000053, - 0x80000302, 0x00000073, 0x80000302, 0x00000053, - 0x80000327, 0x00000073, 0x80000327, 0x00000053, - 0x8000030c, 0x00000073, 0x8000030c, 0x00000054, - 0x80000327, 0x00000074, 0x80000327, 0x00000054, - 0x8000030c, 0x00000074, 0x8000030c, 0x00000055, - 0x80000303, 0x00000075, 0x80000303, 0x00000055, - 0x80000304, 0x00000075, 0x80000304, 0x00000055, - 0x80000306, 0x00000075, 0x80000306, 0x00000055, - 0x8000030a, 0x00000075, 0x8000030a, 0x00000055, - 0x8000030b, 0x00000075, 0x8000030b, 0x00000055, - 0x80000328, 0x00000075, 0x80000328, 0x00000057, - 0x80000302, 0x00000077, 0x80000302, 0x00000059, - 0x80000302, 0x00000079, 0x80000302, 0x00000059, - 0x80000308, 0x0000005a, 0x80000301, 0x0000007a, - 0x80000301, 0x0000005a, 0x80000307, 0x0000007a, - 0x80000307, 0x0000005a, 0x8000030c, 0x0000007a, - 0x8000030c, 0x80000073, 0x0000004f, 0x8000031b, - 0x0000006f, 0x8000031b, 0x00000055, 0x8000031b, - 0x00000075, 0x8000031b, 0x00000044, 0x8000017d, - 0x00000044, 0x8000017e, 0x00000064, 0x8000017e, - 0x0000004c, 0x8000004a, 0x0000004c, 0x8000006a, - 0x0000006c, 0x8000006a, 0x0000004e, 0x8000004a, - 0x0000004e, 0x8000006a, 0x0000006e, 0x8000006a, - 0x00000041, 0x8000030c, 0x00000061, 0x8000030c, - 0x00000049, 0x8000030c, 0x00000069, 0x8000030c, - 0x0000004f, 0x8000030c, 0x0000006f, 0x8000030c, - 0x00000055, 0x8000030c, 0x00000075, 0x8000030c, - 0x000000dc, 0x80000304, 0x000000fc, 0x80000304, - 0x000000dc, 0x80000301, 0x000000fc, 0x80000301, - 0x000000dc, 0x8000030c, 0x000000fc, 0x8000030c, - 0x000000dc, 0x80000300, 0x000000fc, 0x80000300, - 0x000000c4, 0x80000304, 0x000000e4, 0x80000304, - 0x00000226, 0x80000304, 0x00000227, 0x80000304, - 0x000000c6, 0x80000304, 0x000000e6, 0x80000304, - 0x00000047, 0x8000030c, 0x00000067, 0x8000030c, - 0x0000004b, 0x8000030c, 0x0000006b, 0x8000030c, - 0x0000004f, 0x80000328, 0x0000006f, 0x80000328, - 0x000001ea, 0x80000304, 0x000001eb, 0x80000304, - 0x000001b7, 0x8000030c, 0x00000292, 0x8000030c, - 0x0000006a, 0x8000030c, 0x00000044, 0x8000005a, - 0x00000044, 0x8000007a, 0x00000064, 0x8000007a, - 0x00000047, 0x80000301, 0x00000067, 0x80000301, - 0x0000004e, 0x80000300, 0x0000006e, 0x80000300, - 0x000000c5, 0x80000301, 0x000000e5, 0x80000301, - 0x000000c6, 0x80000301, 0x000000e6, 0x80000301, - 0x000000d8, 0x80000301, 0x000000f8, 0x80000301, - 0x00000041, 0x8000030f, 0x00000061, 0x8000030f, - 0x00000041, 0x80000311, 0x00000061, 0x80000311, - 0x00000045, 0x8000030f, 0x00000065, 0x8000030f, - 0x00000045, 0x80000311, 0x00000065, 0x80000311, - 0x00000049, 0x8000030f, 0x00000069, 0x8000030f, - 0x00000049, 0x80000311, 0x00000069, 0x80000311, - 0x0000004f, 0x8000030f, 0x0000006f, 0x8000030f, - 0x0000004f, 0x80000311, 0x0000006f, 0x80000311, - 0x00000052, 0x8000030f, 0x00000072, 0x8000030f, - 0x00000052, 0x80000311, 0x00000072, 0x80000311, - 0x00000055, 0x8000030f, 0x00000075, 0x8000030f, - 0x00000055, 0x80000311, 0x00000075, 0x80000311, - 0x00000053, 0x80000326, 0x00000073, 0x80000326, - 0x00000054, 0x80000326, 0x00000074, 0x80000326, - 0x00000048, 0x8000030c, 0x00000068, 0x8000030c, - 0x00000041, 0x80000307, 0x00000061, 0x80000307, - 0x00000045, 0x80000327, 0x00000065, 0x80000327, - 0x000000d6, 0x80000304, 0x000000f6, 0x80000304, - 0x000000d5, 0x80000304, 0x000000f5, 0x80000304, - 0x0000004f, 0x80000307, 0x0000006f, 0x80000307, - 0x0000022e, 0x80000304, 0x0000022f, 0x80000304, - 0x00000059, 0x80000304, 0x00000079, 0x80000304, - 0x80000068, 0x80000266, 0x8000006a, 0x80000072, - 0x80000279, 0x8000027b, 0x80000281, 0x80000077, - 0x80000079, 0x00000020, 0x80000306, 0x00000020, - 0x80000307, 0x00000020, 0x8000030a, 0x00000020, - 0x80000328, 0x00000020, 0x80000303, 0x00000020, - 0x8000030b, 0x80000263, 0x8000006c, 0x80000073, - 0x80000078, 0x80000295, 0x80000300, 0x80000301, - 0x80000313, 0x00000308, 0x80000301, 0x800002b9, - 0x00000020, 0x80000345, 0x8000003b, 0x00000020, - 0x80000301, 0x000000a8, 0x80000301, 0x00000391, - 0x80000301, 0x800000b7, 0x00000395, 0x80000301, - 0x00000397, 0x80000301, 0x00000399, 0x80000301, - 0x0000039f, 0x80000301, 0x000003a5, 0x80000301, - 0x000003a9, 0x80000301, 0x000003ca, 0x80000301, - 0x00000399, 0x80000308, 0x000003a5, 0x80000308, - 0x000003b1, 0x80000301, 0x000003b5, 0x80000301, - 0x000003b7, 0x80000301, 0x000003b9, 0x80000301, - 0x000003cb, 0x80000301, 0x000003b9, 0x80000308, - 0x000003c5, 0x80000308, 0x000003bf, 0x80000301, - 0x000003c5, 0x80000301, 0x000003c9, 0x80000301, - 0x800003b2, 0x800003b8, 0x800003a5, 0x000003d2, - 0x80000301, 0x000003d2, 0x80000308, 0x800003c6, - 0x800003c0, 0x800003ba, 0x800003c1, 0x800003c2, - 0x80000398, 0x800003b5, 0x00000415, 0x80000300, - 0x00000415, 0x80000308, 0x00000413, 0x80000301, - 0x00000406, 0x80000308, 0x0000041a, 0x80000301, - 0x00000418, 0x80000300, 0x00000423, 0x80000306, - 0x00000418, 0x80000306, 0x00000438, 0x80000306, - 0x00000435, 0x80000300, 0x00000435, 0x80000308, - 0x00000433, 0x80000301, 0x00000456, 0x80000308, - 0x0000043a, 0x80000301, 0x00000438, 0x80000300, - 0x00000443, 0x80000306, 0x00000474, 0x8000030f, - 0x00000475, 0x8000030f, 0x00000416, 0x80000306, - 0x00000436, 0x80000306, 0x00000410, 0x80000306, - 0x00000430, 0x80000306, 0x00000410, 0x80000308, - 0x00000430, 0x80000308, 0x00000415, 0x80000306, - 0x00000435, 0x80000306, 0x000004d8, 0x80000308, - 0x000004d9, 0x80000308, 0x00000416, 0x80000308, - 0x00000436, 0x80000308, 0x00000417, 0x80000308, - 0x00000437, 0x80000308, 0x00000418, 0x80000304, - 0x00000438, 0x80000304, 0x00000418, 0x80000308, - 0x00000438, 0x80000308, 0x0000041e, 0x80000308, - 0x0000043e, 0x80000308, 0x000004e8, 0x80000308, - 0x000004e9, 0x80000308, 0x0000042d, 0x80000308, - 0x0000044d, 0x80000308, 0x00000423, 0x80000304, - 0x00000443, 0x80000304, 0x00000423, 0x80000308, - 0x00000443, 0x80000308, 0x00000423, 0x8000030b, - 0x00000443, 0x8000030b, 0x00000427, 0x80000308, - 0x00000447, 0x80000308, 0x0000042b, 0x80000308, - 0x0000044b, 0x80000308, 0x00000565, 0x80000582, - 0x00000627, 0x80000653, 0x00000627, 0x80000654, - 0x00000648, 0x80000654, 0x00000627, 0x80000655, - 0x0000064a, 0x80000654, 0x00000627, 0x80000674, - 0x00000648, 0x80000674, 0x000006c7, 0x80000674, - 0x0000064a, 0x80000674, 0x000006d5, 0x80000654, - 0x000006c1, 0x80000654, 0x000006d2, 0x80000654, - 0x00000928, 0x8000093c, 0x00000930, 0x8000093c, - 0x00000933, 0x8000093c, 0x00000915, 0x8000093c, - 0x00000916, 0x8000093c, 0x00000917, 0x8000093c, - 0x0000091c, 0x8000093c, 0x00000921, 0x8000093c, - 0x00000922, 0x8000093c, 0x0000092b, 0x8000093c, - 0x0000092f, 0x8000093c, 0x000009c7, 0x800009be, - 0x000009c7, 0x800009d7, 0x000009a1, 0x800009bc, - 0x000009a2, 0x800009bc, 0x000009af, 0x800009bc, - 0x00000a32, 0x80000a3c, 0x00000a38, 0x80000a3c, - 0x00000a16, 0x80000a3c, 0x00000a17, 0x80000a3c, - 0x00000a1c, 0x80000a3c, 0x00000a2b, 0x80000a3c, - 0x00000b47, 0x80000b56, 0x00000b47, 0x80000b3e, - 0x00000b47, 0x80000b57, 0x00000b21, 0x80000b3c, - 0x00000b22, 0x80000b3c, 0x00000b92, 0x80000bd7, - 0x00000bc6, 0x80000bbe, 0x00000bc7, 0x80000bbe, - 0x00000bc6, 0x80000bd7, 0x00000c46, 0x80000c56, - 0x00000cbf, 0x80000cd5, 0x00000cc6, 0x80000cd5, - 0x00000cc6, 0x80000cd6, 0x00000cc6, 0x80000cc2, - 0x00000cca, 0x80000cd5, 0x00000d46, 0x80000d3e, - 0x00000d47, 0x80000d3e, 0x00000d46, 0x80000d57, - 0x00000dd9, 0x80000dca, 0x00000dd9, 0x80000dcf, - 0x00000ddc, 0x80000dca, 0x00000dd9, 0x80000ddf, - 0x00000e4d, 0x80000e32, 0x00000ecd, 0x80000eb2, - 0x00000eab, 0x80000e99, 0x00000eab, 0x80000ea1, - 0x80000f0b, 0x00000f42, 0x80000fb7, 0x00000f4c, - 0x80000fb7, 0x00000f51, 0x80000fb7, 0x00000f56, - 0x80000fb7, 0x00000f5b, 0x80000fb7, 0x00000f40, - 0x80000fb5, 0x00000f71, 0x80000f72, 0x00000f71, - 0x80000f74, 0x00000fb2, 0x80000f80, 0x00000fb2, - 0x80000f81, 0x00000fb3, 0x80000f80, 0x00000fb3, - 0x80000f81, 0x00000f71, 0x80000f80, 0x00000f92, - 0x80000fb7, 0x00000f9c, 0x80000fb7, 0x00000fa1, - 0x80000fb7, 0x00000fa6, 0x80000fb7, 0x00000fab, - 0x80000fb7, 0x00000f90, 0x80000fb5, 0x00001025, - 0x8000102e, 0x00000041, 0x80000325, 0x00000061, - 0x80000325, 0x00000042, 0x80000307, 0x00000062, - 0x80000307, 0x00000042, 0x80000323, 0x00000062, - 0x80000323, 0x00000042, 0x80000331, 0x00000062, - 0x80000331, 0x000000c7, 0x80000301, 0x000000e7, - 0x80000301, 0x00000044, 0x80000307, 0x00000064, - 0x80000307, 0x00000044, 0x80000323, 0x00000064, - 0x80000323, 0x00000044, 0x80000331, 0x00000064, - 0x80000331, 0x00000044, 0x80000327, 0x00000064, - 0x80000327, 0x00000044, 0x8000032d, 0x00000064, - 0x8000032d, 0x00000112, 0x80000300, 0x00000113, - 0x80000300, 0x00000112, 0x80000301, 0x00000113, - 0x80000301, 0x00000045, 0x8000032d, 0x00000065, - 0x8000032d, 0x00000045, 0x80000330, 0x00000065, - 0x80000330, 0x00000228, 0x80000306, 0x00000229, - 0x80000306, 0x00000046, 0x80000307, 0x00000066, - 0x80000307, 0x00000047, 0x80000304, 0x00000067, - 0x80000304, 0x00000048, 0x80000307, 0x00000068, - 0x80000307, 0x00000048, 0x80000323, 0x00000068, - 0x80000323, 0x00000048, 0x80000308, 0x00000068, - 0x80000308, 0x00000048, 0x80000327, 0x00000068, - 0x80000327, 0x00000048, 0x8000032e, 0x00000068, - 0x8000032e, 0x00000049, 0x80000330, 0x00000069, - 0x80000330, 0x000000cf, 0x80000301, 0x000000ef, - 0x80000301, 0x0000004b, 0x80000301, 0x0000006b, - 0x80000301, 0x0000004b, 0x80000323, 0x0000006b, - 0x80000323, 0x0000004b, 0x80000331, 0x0000006b, - 0x80000331, 0x0000004c, 0x80000323, 0x0000006c, - 0x80000323, 0x00001e36, 0x80000304, 0x00001e37, - 0x80000304, 0x0000004c, 0x80000331, 0x0000006c, - 0x80000331, 0x0000004c, 0x8000032d, 0x0000006c, - 0x8000032d, 0x0000004d, 0x80000301, 0x0000006d, - 0x80000301, 0x0000004d, 0x80000307, 0x0000006d, - 0x80000307, 0x0000004d, 0x80000323, 0x0000006d, - 0x80000323, 0x0000004e, 0x80000307, 0x0000006e, - 0x80000307, 0x0000004e, 0x80000323, 0x0000006e, - 0x80000323, 0x0000004e, 0x80000331, 0x0000006e, - 0x80000331, 0x0000004e, 0x8000032d, 0x0000006e, - 0x8000032d, 0x000000d5, 0x80000301, 0x000000f5, - 0x80000301, 0x000000d5, 0x80000308, 0x000000f5, - 0x80000308, 0x0000014c, 0x80000300, 0x0000014d, - 0x80000300, 0x0000014c, 0x80000301, 0x0000014d, - 0x80000301, 0x00000050, 0x80000301, 0x00000070, - 0x80000301, 0x00000050, 0x80000307, 0x00000070, - 0x80000307, 0x00000052, 0x80000307, 0x00000072, - 0x80000307, 0x00000052, 0x80000323, 0x00000072, - 0x80000323, 0x00001e5a, 0x80000304, 0x00001e5b, - 0x80000304, 0x00000052, 0x80000331, 0x00000072, - 0x80000331, 0x00000053, 0x80000307, 0x00000073, - 0x80000307, 0x00000053, 0x80000323, 0x00000073, - 0x80000323, 0x0000015a, 0x80000307, 0x0000015b, - 0x80000307, 0x00000160, 0x80000307, 0x00000161, - 0x80000307, 0x00001e62, 0x80000307, 0x00001e63, - 0x80000307, 0x00000054, 0x80000307, 0x00000074, - 0x80000307, 0x00000054, 0x80000323, 0x00000074, - 0x80000323, 0x00000054, 0x80000331, 0x00000074, - 0x80000331, 0x00000054, 0x8000032d, 0x00000074, - 0x8000032d, 0x00000055, 0x80000324, 0x00000075, - 0x80000324, 0x00000055, 0x80000330, 0x00000075, - 0x80000330, 0x00000055, 0x8000032d, 0x00000075, - 0x8000032d, 0x00000168, 0x80000301, 0x00000169, - 0x80000301, 0x0000016a, 0x80000308, 0x0000016b, - 0x80000308, 0x00000056, 0x80000303, 0x00000076, - 0x80000303, 0x00000056, 0x80000323, 0x00000076, - 0x80000323, 0x00000057, 0x80000300, 0x00000077, - 0x80000300, 0x00000057, 0x80000301, 0x00000077, - 0x80000301, 0x00000057, 0x80000308, 0x00000077, - 0x80000308, 0x00000057, 0x80000307, 0x00000077, - 0x80000307, 0x00000057, 0x80000323, 0x00000077, - 0x80000323, 0x00000058, 0x80000307, 0x00000078, - 0x80000307, 0x00000058, 0x80000308, 0x00000078, - 0x80000308, 0x00000059, 0x80000307, 0x00000079, - 0x80000307, 0x0000005a, 0x80000302, 0x0000007a, - 0x80000302, 0x0000005a, 0x80000323, 0x0000007a, - 0x80000323, 0x0000005a, 0x80000331, 0x0000007a, - 0x80000331, 0x00000068, 0x80000331, 0x00000074, - 0x80000308, 0x00000077, 0x8000030a, 0x00000079, - 0x8000030a, 0x00000061, 0x800002be, 0x0000017f, - 0x80000307, 0x00000041, 0x80000323, 0x00000061, - 0x80000323, 0x00000041, 0x80000309, 0x00000061, - 0x80000309, 0x000000c2, 0x80000301, 0x000000e2, - 0x80000301, 0x000000c2, 0x80000300, 0x000000e2, - 0x80000300, 0x000000c2, 0x80000309, 0x000000e2, - 0x80000309, 0x000000c2, 0x80000303, 0x000000e2, - 0x80000303, 0x00001ea0, 0x80000302, 0x00001ea1, - 0x80000302, 0x00000102, 0x80000301, 0x00000103, - 0x80000301, 0x00000102, 0x80000300, 0x00000103, - 0x80000300, 0x00000102, 0x80000309, 0x00000103, - 0x80000309, 0x00000102, 0x80000303, 0x00000103, - 0x80000303, 0x00001ea0, 0x80000306, 0x00001ea1, - 0x80000306, 0x00000045, 0x80000323, 0x00000065, - 0x80000323, 0x00000045, 0x80000309, 0x00000065, - 0x80000309, 0x00000045, 0x80000303, 0x00000065, - 0x80000303, 0x000000ca, 0x80000301, 0x000000ea, - 0x80000301, 0x000000ca, 0x80000300, 0x000000ea, - 0x80000300, 0x000000ca, 0x80000309, 0x000000ea, - 0x80000309, 0x000000ca, 0x80000303, 0x000000ea, - 0x80000303, 0x00001eb8, 0x80000302, 0x00001eb9, - 0x80000302, 0x00000049, 0x80000309, 0x00000069, - 0x80000309, 0x00000049, 0x80000323, 0x00000069, - 0x80000323, 0x0000004f, 0x80000323, 0x0000006f, - 0x80000323, 0x0000004f, 0x80000309, 0x0000006f, - 0x80000309, 0x000000d4, 0x80000301, 0x000000f4, - 0x80000301, 0x000000d4, 0x80000300, 0x000000f4, - 0x80000300, 0x000000d4, 0x80000309, 0x000000f4, - 0x80000309, 0x000000d4, 0x80000303, 0x000000f4, - 0x80000303, 0x00001ecc, 0x80000302, 0x00001ecd, - 0x80000302, 0x000001a0, 0x80000301, 0x000001a1, - 0x80000301, 0x000001a0, 0x80000300, 0x000001a1, - 0x80000300, 0x000001a0, 0x80000309, 0x000001a1, - 0x80000309, 0x000001a0, 0x80000303, 0x000001a1, - 0x80000303, 0x000001a0, 0x80000323, 0x000001a1, - 0x80000323, 0x00000055, 0x80000323, 0x00000075, - 0x80000323, 0x00000055, 0x80000309, 0x00000075, - 0x80000309, 0x000001af, 0x80000301, 0x000001b0, - 0x80000301, 0x000001af, 0x80000300, 0x000001b0, - 0x80000300, 0x000001af, 0x80000309, 0x000001b0, - 0x80000309, 0x000001af, 0x80000303, 0x000001b0, - 0x80000303, 0x000001af, 0x80000323, 0x000001b0, - 0x80000323, 0x00000059, 0x80000300, 0x00000079, - 0x80000300, 0x00000059, 0x80000323, 0x00000079, - 0x80000323, 0x00000059, 0x80000309, 0x00000079, - 0x80000309, 0x00000059, 0x80000303, 0x00000079, - 0x80000303, 0x000003b1, 0x80000313, 0x000003b1, - 0x80000314, 0x00001f00, 0x80000300, 0x00001f01, - 0x80000300, 0x00001f00, 0x80000301, 0x00001f01, - 0x80000301, 0x00001f00, 0x80000342, 0x00001f01, - 0x80000342, 0x00000391, 0x80000313, 0x00000391, - 0x80000314, 0x00001f08, 0x80000300, 0x00001f09, - 0x80000300, 0x00001f08, 0x80000301, 0x00001f09, - 0x80000301, 0x00001f08, 0x80000342, 0x00001f09, - 0x80000342, 0x000003b5, 0x80000313, 0x000003b5, - 0x80000314, 0x00001f10, 0x80000300, 0x00001f11, - 0x80000300, 0x00001f10, 0x80000301, 0x00001f11, - 0x80000301, 0x00000395, 0x80000313, 0x00000395, - 0x80000314, 0x00001f18, 0x80000300, 0x00001f19, - 0x80000300, 0x00001f18, 0x80000301, 0x00001f19, - 0x80000301, 0x000003b7, 0x80000313, 0x000003b7, - 0x80000314, 0x00001f20, 0x80000300, 0x00001f21, - 0x80000300, 0x00001f20, 0x80000301, 0x00001f21, - 0x80000301, 0x00001f20, 0x80000342, 0x00001f21, - 0x80000342, 0x00000397, 0x80000313, 0x00000397, - 0x80000314, 0x00001f28, 0x80000300, 0x00001f29, - 0x80000300, 0x00001f28, 0x80000301, 0x00001f29, - 0x80000301, 0x00001f28, 0x80000342, 0x00001f29, - 0x80000342, 0x000003b9, 0x80000313, 0x000003b9, - 0x80000314, 0x00001f30, 0x80000300, 0x00001f31, - 0x80000300, 0x00001f30, 0x80000301, 0x00001f31, - 0x80000301, 0x00001f30, 0x80000342, 0x00001f31, - 0x80000342, 0x00000399, 0x80000313, 0x00000399, - 0x80000314, 0x00001f38, 0x80000300, 0x00001f39, - 0x80000300, 0x00001f38, 0x80000301, 0x00001f39, - 0x80000301, 0x00001f38, 0x80000342, 0x00001f39, - 0x80000342, 0x000003bf, 0x80000313, 0x000003bf, - 0x80000314, 0x00001f40, 0x80000300, 0x00001f41, - 0x80000300, 0x00001f40, 0x80000301, 0x00001f41, - 0x80000301, 0x0000039f, 0x80000313, 0x0000039f, - 0x80000314, 0x00001f48, 0x80000300, 0x00001f49, - 0x80000300, 0x00001f48, 0x80000301, 0x00001f49, - 0x80000301, 0x000003c5, 0x80000313, 0x000003c5, - 0x80000314, 0x00001f50, 0x80000300, 0x00001f51, - 0x80000300, 0x00001f50, 0x80000301, 0x00001f51, - 0x80000301, 0x00001f50, 0x80000342, 0x00001f51, - 0x80000342, 0x000003a5, 0x80000314, 0x00001f59, - 0x80000300, 0x00001f59, 0x80000301, 0x00001f59, - 0x80000342, 0x000003c9, 0x80000313, 0x000003c9, - 0x80000314, 0x00001f60, 0x80000300, 0x00001f61, - 0x80000300, 0x00001f60, 0x80000301, 0x00001f61, - 0x80000301, 0x00001f60, 0x80000342, 0x00001f61, - 0x80000342, 0x000003a9, 0x80000313, 0x000003a9, - 0x80000314, 0x00001f68, 0x80000300, 0x00001f69, - 0x80000300, 0x00001f68, 0x80000301, 0x00001f69, - 0x80000301, 0x00001f68, 0x80000342, 0x00001f69, - 0x80000342, 0x000003b1, 0x80000300, 0x800003ac, - 0x000003b5, 0x80000300, 0x800003ad, 0x000003b7, - 0x80000300, 0x800003ae, 0x000003b9, 0x80000300, - 0x800003af, 0x000003bf, 0x80000300, 0x800003cc, - 0x000003c5, 0x80000300, 0x800003cd, 0x000003c9, - 0x80000300, 0x800003ce, 0x00001f00, 0x80000345, - 0x00001f01, 0x80000345, 0x00001f02, 0x80000345, - 0x00001f03, 0x80000345, 0x00001f04, 0x80000345, - 0x00001f05, 0x80000345, 0x00001f06, 0x80000345, - 0x00001f07, 0x80000345, 0x00001f08, 0x80000345, - 0x00001f09, 0x80000345, 0x00001f0a, 0x80000345, - 0x00001f0b, 0x80000345, 0x00001f0c, 0x80000345, - 0x00001f0d, 0x80000345, 0x00001f0e, 0x80000345, - 0x00001f0f, 0x80000345, 0x00001f20, 0x80000345, - 0x00001f21, 0x80000345, 0x00001f22, 0x80000345, - 0x00001f23, 0x80000345, 0x00001f24, 0x80000345, - 0x00001f25, 0x80000345, 0x00001f26, 0x80000345, - 0x00001f27, 0x80000345, 0x00001f28, 0x80000345, - 0x00001f29, 0x80000345, 0x00001f2a, 0x80000345, - 0x00001f2b, 0x80000345, 0x00001f2c, 0x80000345, - 0x00001f2d, 0x80000345, 0x00001f2e, 0x80000345, - 0x00001f2f, 0x80000345, 0x00001f60, 0x80000345, - 0x00001f61, 0x80000345, 0x00001f62, 0x80000345, - 0x00001f63, 0x80000345, 0x00001f64, 0x80000345, - 0x00001f65, 0x80000345, 0x00001f66, 0x80000345, - 0x00001f67, 0x80000345, 0x00001f68, 0x80000345, - 0x00001f69, 0x80000345, 0x00001f6a, 0x80000345, - 0x00001f6b, 0x80000345, 0x00001f6c, 0x80000345, - 0x00001f6d, 0x80000345, 0x00001f6e, 0x80000345, - 0x00001f6f, 0x80000345, 0x000003b1, 0x80000306, - 0x000003b1, 0x80000304, 0x00001f70, 0x80000345, - 0x000003b1, 0x80000345, 0x000003ac, 0x80000345, - 0x000003b1, 0x80000342, 0x00001fb6, 0x80000345, - 0x00000391, 0x80000306, 0x00000391, 0x80000304, - 0x00000391, 0x80000300, 0x80000386, 0x00000391, - 0x80000345, 0x00000020, 0x80000313, 0x800003b9, - 0x00000020, 0x80000313, 0x00000020, 0x80000342, - 0x000000a8, 0x80000342, 0x00001f74, 0x80000345, - 0x000003b7, 0x80000345, 0x000003ae, 0x80000345, - 0x000003b7, 0x80000342, 0x00001fc6, 0x80000345, - 0x00000395, 0x80000300, 0x80000388, 0x00000397, - 0x80000300, 0x80000389, 0x00000397, 0x80000345, - 0x00001fbf, 0x80000300, 0x00001fbf, 0x80000301, - 0x00001fbf, 0x80000342, 0x000003b9, 0x80000306, - 0x000003b9, 0x80000304, 0x000003ca, 0x80000300, - 0x80000390, 0x000003b9, 0x80000342, 0x000003ca, - 0x80000342, 0x00000399, 0x80000306, 0x00000399, - 0x80000304, 0x00000399, 0x80000300, 0x8000038a, - 0x00001ffe, 0x80000300, 0x00001ffe, 0x80000301, - 0x00001ffe, 0x80000342, 0x000003c5, 0x80000306, - 0x000003c5, 0x80000304, 0x000003cb, 0x80000300, - 0x800003b0, 0x000003c1, 0x80000313, 0x000003c1, - 0x80000314, 0x000003c5, 0x80000342, 0x000003cb, - 0x80000342, 0x000003a5, 0x80000306, 0x000003a5, - 0x80000304, 0x000003a5, 0x80000300, 0x8000038e, - 0x000003a1, 0x80000314, 0x000000a8, 0x80000300, - 0x80000385, 0x80000060, 0x00001f7c, 0x80000345, - 0x000003c9, 0x80000345, 0x000003ce, 0x80000345, - 0x000003c9, 0x80000342, 0x00001ff6, 0x80000345, - 0x0000039f, 0x80000300, 0x8000038c, 0x000003a9, - 0x80000300, 0x8000038f, 0x000003a9, 0x80000345, - 0x800000b4, 0x00000020, 0x80000314, 0x80002002, - 0x80002003, 0x80000020, 0x80000020, 0x80000020, - 0x80000020, 0x80000020, 0x80000020, 0x80000020, - 0x80000020, 0x80000020, 0x80002010, 0x00000020, - 0x80000333, 0x8000002e, 0x0000002e, 0x8000002e, - 0x0000002e, 0x0000002e, 0x8000002e, 0x80000020, - 0x00002032, 0x80002032, 0x00002032, 0x00002032, - 0x80002032, 0x00002035, 0x80002035, 0x00002035, - 0x00002035, 0x80002035, 0x00000021, 0x80000021, - 0x00000020, 0x80000305, 0x0000003f, 0x80000021, - 0x00000021, 0x8000003f, 0x80000030, 0x80000034, - 0x80000035, 0x80000036, 0x80000037, 0x80000038, - 0x80000039, 0x8000002b, 0x80002212, 0x8000003d, - 0x80000028, 0x80000029, 0x8000006e, 0x80000030, - 0x80000031, 0x80000032, 0x80000033, 0x80000034, - 0x80000035, 0x80000036, 0x80000037, 0x80000038, - 0x80000039, 0x8000002b, 0x80002212, 0x8000003d, - 0x80000028, 0x80000029, 0x00000052, 0x80000073, - 0x00000061, 0x0000002f, 0x80000063, 0x00000061, - 0x0000002f, 0x80000073, 0x80000043, 0x000000b0, - 0x80000043, 0x00000063, 0x0000002f, 0x8000006f, - 0x00000063, 0x0000002f, 0x80000075, 0x80000190, - 0x000000b0, 0x80000046, 0x80000067, 0x80000048, - 0x80000048, 0x80000048, 0x80000068, 0x80000127, - 0x80000049, 0x80000049, 0x8000004c, 0x8000006c, - 0x8000004e, 0x0000004e, 0x8000006f, 0x80000050, - 0x80000051, 0x80000052, 0x80000052, 0x80000052, - 0x00000053, 0x8000004d, 0x00000054, 0x00000045, - 0x8000004c, 0x00000054, 0x8000004d, 0x8000005a, - 0x800003a9, 0x8000005a, 0x8000004b, 0x800000c5, - 0x80000042, 0x80000043, 0x80000065, 0x80000045, - 0x80000046, 0x8000004d, 0x8000006f, 0x800005d0, - 0x800005d1, 0x800005d2, 0x800005d3, 0x80000069, - 0x00000031, 0x00002044, 0x80000033, 0x00000032, - 0x00002044, 0x80000033, 0x00000031, 0x00002044, - 0x80000035, 0x00000032, 0x00002044, 0x80000035, - 0x00000033, 0x00002044, 0x80000035, 0x00000034, - 0x00002044, 0x80000035, 0x00000031, 0x00002044, - 0x80000036, 0x00000035, 0x00002044, 0x80000036, - 0x00000031, 0x00002044, 0x80000038, 0x00000033, - 0x00002044, 0x80000038, 0x00000035, 0x00002044, - 0x80000038, 0x00000037, 0x00002044, 0x80000038, - 0x00000031, 0x80002044, 0x80000049, 0x00000049, - 0x80000049, 0x00000049, 0x00000049, 0x80000049, - 0x00000049, 0x80000056, 0x80000056, 0x00000056, - 0x80000049, 0x00000056, 0x00000049, 0x80000049, - 0x00000056, 0x00000049, 0x00000049, 0x80000049, - 0x00000049, 0x80000058, 0x80000058, 0x00000058, - 0x80000049, 0x00000058, 0x00000049, 0x80000049, - 0x8000004c, 0x80000043, 0x80000044, 0x8000004d, - 0x80000069, 0x00000069, 0x80000069, 0x00000069, - 0x00000069, 0x80000069, 0x00000069, 0x80000076, - 0x80000076, 0x00000076, 0x80000069, 0x00000076, - 0x00000069, 0x80000069, 0x00000076, 0x00000069, - 0x00000069, 0x80000069, 0x00000069, 0x80000078, - 0x80000078, 0x00000078, 0x80000069, 0x00000078, - 0x00000069, 0x80000069, 0x8000006c, 0x80000063, - 0x80000064, 0x8000006d, 0x00002190, 0x80000338, - 0x00002192, 0x80000338, 0x00002194, 0x80000338, - 0x000021d0, 0x80000338, 0x000021d4, 0x80000338, - 0x000021d2, 0x80000338, 0x00002203, 0x80000338, - 0x00002208, 0x80000338, 0x0000220b, 0x80000338, - 0x00002223, 0x80000338, 0x00002225, 0x80000338, - 0x0000222b, 0x8000222b, 0x0000222b, 0x0000222b, - 0x8000222b, 0x0000222e, 0x8000222e, 0x0000222e, - 0x0000222e, 0x8000222e, 0x0000223c, 0x80000338, - 0x00002243, 0x80000338, 0x00002245, 0x80000338, - 0x00002248, 0x80000338, 0x0000003d, 0x80000338, - 0x00002261, 0x80000338, 0x0000224d, 0x80000338, - 0x0000003c, 0x80000338, 0x0000003e, 0x80000338, - 0x00002264, 0x80000338, 0x00002265, 0x80000338, - 0x00002272, 0x80000338, 0x00002273, 0x80000338, - 0x00002276, 0x80000338, 0x00002277, 0x80000338, - 0x0000227a, 0x80000338, 0x0000227b, 0x80000338, - 0x00002282, 0x80000338, 0x00002283, 0x80000338, - 0x00002286, 0x80000338, 0x00002287, 0x80000338, - 0x000022a2, 0x80000338, 0x000022a8, 0x80000338, - 0x000022a9, 0x80000338, 0x000022ab, 0x80000338, - 0x0000227c, 0x80000338, 0x0000227d, 0x80000338, - 0x00002291, 0x80000338, 0x00002292, 0x80000338, - 0x000022b2, 0x80000338, 0x000022b3, 0x80000338, - 0x000022b4, 0x80000338, 0x000022b5, 0x80000338, - 0x80003008, 0x80003009, 0x80000031, 0x80000032, - 0x80000033, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x00000031, - 0x80000030, 0x00000031, 0x80000031, 0x00000031, - 0x80000032, 0x00000031, 0x80000033, 0x00000031, - 0x80000034, 0x00000031, 0x80000035, 0x00000031, - 0x80000036, 0x00000031, 0x80000037, 0x00000031, - 0x80000038, 0x00000031, 0x80000039, 0x00000032, - 0x80000030, 0x00000028, 0x00000031, 0x80000029, - 0x00000028, 0x00000032, 0x80000029, 0x00000028, - 0x00000033, 0x80000029, 0x00000028, 0x00000034, - 0x80000029, 0x00000028, 0x00000035, 0x80000029, - 0x00000028, 0x00000036, 0x80000029, 0x00000028, - 0x00000037, 0x80000029, 0x00000028, 0x00000038, - 0x80000029, 0x00000028, 0x00000039, 0x80000029, - 0x00000028, 0x00000031, 0x00000030, 0x80000029, - 0x00000028, 0x00000031, 0x00000031, 0x80000029, - 0x00000028, 0x00000031, 0x00000032, 0x80000029, - 0x00000028, 0x00000031, 0x00000033, 0x80000029, - 0x00000028, 0x00000031, 0x00000034, 0x80000029, - 0x00000028, 0x00000031, 0x00000035, 0x80000029, - 0x00000028, 0x00000031, 0x00000036, 0x80000029, - 0x00000028, 0x00000031, 0x00000037, 0x80000029, - 0x00000028, 0x00000031, 0x00000038, 0x80000029, - 0x00000028, 0x00000031, 0x00000039, 0x80000029, - 0x00000028, 0x00000032, 0x00000030, 0x80000029, - 0x00000031, 0x8000002e, 0x00000032, 0x8000002e, - 0x00000033, 0x8000002e, 0x00000034, 0x8000002e, - 0x00000035, 0x8000002e, 0x00000036, 0x8000002e, - 0x00000037, 0x8000002e, 0x00000038, 0x8000002e, - 0x00000039, 0x8000002e, 0x00000031, 0x00000030, - 0x8000002e, 0x00000031, 0x00000031, 0x8000002e, - 0x00000031, 0x00000032, 0x8000002e, 0x00000031, - 0x00000033, 0x8000002e, 0x00000031, 0x00000034, - 0x8000002e, 0x00000031, 0x00000035, 0x8000002e, - 0x00000031, 0x00000036, 0x8000002e, 0x00000031, - 0x00000037, 0x8000002e, 0x00000031, 0x00000038, - 0x8000002e, 0x00000031, 0x00000039, 0x8000002e, - 0x00000032, 0x00000030, 0x8000002e, 0x00000028, - 0x00000061, 0x80000029, 0x00000028, 0x00000062, - 0x80000029, 0x00000028, 0x00000063, 0x80000029, - 0x00000028, 0x00000064, 0x80000029, 0x00000028, - 0x00000065, 0x80000029, 0x00000028, 0x00000066, - 0x80000029, 0x00000028, 0x00000067, 0x80000029, - 0x00000028, 0x00000068, 0x80000029, 0x00000028, - 0x00000069, 0x80000029, 0x00000028, 0x0000006a, - 0x80000029, 0x00000028, 0x0000006b, 0x80000029, - 0x00000028, 0x0000006c, 0x80000029, 0x00000028, - 0x0000006d, 0x80000029, 0x00000028, 0x0000006e, - 0x80000029, 0x00000028, 0x0000006f, 0x80000029, - 0x00000028, 0x00000070, 0x80000029, 0x00000028, - 0x00000071, 0x80000029, 0x00000028, 0x00000072, - 0x80000029, 0x00000028, 0x00000073, 0x80000029, - 0x00000028, 0x00000074, 0x80000029, 0x00000028, - 0x00000075, 0x80000029, 0x00000028, 0x00000076, - 0x80000029, 0x00000028, 0x00000077, 0x80000029, - 0x00000028, 0x00000078, 0x80000029, 0x00000028, - 0x00000079, 0x80000029, 0x00000028, 0x0000007a, - 0x80000029, 0x80000041, 0x80000042, 0x80000043, - 0x80000044, 0x80000045, 0x80000046, 0x80000047, - 0x80000048, 0x80000049, 0x8000004a, 0x8000004b, - 0x8000004c, 0x8000004d, 0x8000004e, 0x8000004f, - 0x80000050, 0x80000051, 0x80000052, 0x80000053, - 0x80000054, 0x80000055, 0x80000056, 0x80000057, - 0x80000058, 0x80000059, 0x8000005a, 0x80000061, - 0x80000062, 0x80000063, 0x80000064, 0x80000065, - 0x80000066, 0x80000067, 0x80000068, 0x80000069, - 0x8000006a, 0x8000006b, 0x8000006c, 0x8000006d, - 0x8000006e, 0x8000006f, 0x80000070, 0x80000071, - 0x80000072, 0x80000073, 0x80000074, 0x80000075, - 0x80000076, 0x80000077, 0x80000078, 0x80000079, - 0x8000007a, 0x80000030, 0x80006bcd, 0x80009f9f, - 0x80004e00, 0x80004e28, 0x80004e36, 0x80004e3f, - 0x80004e59, 0x80004e85, 0x80004e8c, 0x80004ea0, - 0x80004eba, 0x8000513f, 0x80005165, 0x8000516b, - 0x80005182, 0x80005196, 0x800051ab, 0x800051e0, - 0x800051f5, 0x80005200, 0x8000529b, 0x800052f9, - 0x80005315, 0x8000531a, 0x80005338, 0x80005341, - 0x8000535c, 0x80005369, 0x80005382, 0x800053b6, - 0x800053c8, 0x800053e3, 0x800056d7, 0x8000571f, - 0x800058eb, 0x80005902, 0x8000590a, 0x80005915, - 0x80005927, 0x80005973, 0x80005b50, 0x80005b80, - 0x80005bf8, 0x80005c0f, 0x80005c22, 0x80005c38, - 0x80005c6e, 0x80005c71, 0x80005ddb, 0x80005de5, - 0x80005df1, 0x80005dfe, 0x80005e72, 0x80005e7a, - 0x80005e7f, 0x80005ef4, 0x80005efe, 0x80005f0b, - 0x80005f13, 0x80005f50, 0x80005f61, 0x80005f73, - 0x80005fc3, 0x80006208, 0x80006236, 0x8000624b, - 0x8000652f, 0x80006534, 0x80006587, 0x80006597, - 0x800065a4, 0x800065b9, 0x800065e0, 0x800065e5, - 0x800066f0, 0x80006708, 0x80006728, 0x80006b20, - 0x80006b62, 0x80006b79, 0x80006bb3, 0x80006bcb, - 0x80006bd4, 0x80006bdb, 0x80006c0f, 0x80006c14, - 0x80006c34, 0x8000706b, 0x8000722a, 0x80007236, - 0x8000723b, 0x8000723f, 0x80007247, 0x80007259, - 0x8000725b, 0x800072ac, 0x80007384, 0x80007389, - 0x800074dc, 0x800074e6, 0x80007518, 0x8000751f, - 0x80007528, 0x80007530, 0x8000758b, 0x80007592, - 0x80007676, 0x8000767d, 0x800076ae, 0x800076bf, - 0x800076ee, 0x800077db, 0x800077e2, 0x800077f3, - 0x8000793a, 0x800079b8, 0x800079be, 0x80007a74, - 0x80007acb, 0x80007af9, 0x80007c73, 0x80007cf8, - 0x80007f36, 0x80007f51, 0x80007f8a, 0x80007fbd, - 0x80008001, 0x8000800c, 0x80008012, 0x80008033, - 0x8000807f, 0x80008089, 0x800081e3, 0x800081ea, - 0x800081f3, 0x800081fc, 0x8000820c, 0x8000821b, - 0x8000821f, 0x8000826e, 0x80008272, 0x80008278, - 0x8000864d, 0x8000866b, 0x80008840, 0x8000884c, - 0x80008863, 0x8000897e, 0x8000898b, 0x800089d2, - 0x80008a00, 0x80008c37, 0x80008c46, 0x80008c55, - 0x80008c78, 0x80008c9d, 0x80008d64, 0x80008d70, - 0x80008db3, 0x80008eab, 0x80008eca, 0x80008f9b, - 0x80008fb0, 0x80008fb5, 0x80009091, 0x80009149, - 0x800091c6, 0x800091cc, 0x800091d1, 0x80009577, - 0x80009580, 0x8000961c, 0x800096b6, 0x800096b9, - 0x800096e8, 0x80009751, 0x8000975e, 0x80009762, - 0x80009769, 0x800097cb, 0x800097ed, 0x800097f3, - 0x80009801, 0x800098a8, 0x800098db, 0x800098df, - 0x80009996, 0x80009999, 0x800099ac, 0x80009aa8, - 0x80009ad8, 0x80009adf, 0x80009b25, 0x80009b2f, - 0x80009b32, 0x80009b3c, 0x80009b5a, 0x80009ce5, - 0x80009e75, 0x80009e7f, 0x80009ea5, 0x80009ebb, - 0x80009ec3, 0x80009ecd, 0x80009ed1, 0x80009ef9, - 0x80009efd, 0x80009f0e, 0x80009f13, 0x80009f20, - 0x80009f3b, 0x80009f4a, 0x80009f52, 0x80009f8d, - 0x80009f9c, 0x80009fa0, 0x80000020, 0x80003012, - 0x80005341, 0x80005344, 0x80005345, 0x0000304b, - 0x80003099, 0x0000304d, 0x80003099, 0x0000304f, - 0x80003099, 0x00003051, 0x80003099, 0x00003053, - 0x80003099, 0x00003055, 0x80003099, 0x00003057, - 0x80003099, 0x00003059, 0x80003099, 0x0000305b, - 0x80003099, 0x0000305d, 0x80003099, 0x0000305f, - 0x80003099, 0x00003061, 0x80003099, 0x00003064, - 0x80003099, 0x00003066, 0x80003099, 0x00003068, - 0x80003099, 0x0000306f, 0x80003099, 0x0000306f, - 0x8000309a, 0x00003072, 0x80003099, 0x00003072, - 0x8000309a, 0x00003075, 0x80003099, 0x00003075, - 0x8000309a, 0x00003078, 0x80003099, 0x00003078, - 0x8000309a, 0x0000307b, 0x80003099, 0x0000307b, - 0x8000309a, 0x00003046, 0x80003099, 0x00000020, - 0x80003099, 0x00000020, 0x8000309a, 0x0000309d, - 0x80003099, 0x000030ab, 0x80003099, 0x000030ad, - 0x80003099, 0x000030af, 0x80003099, 0x000030b1, - 0x80003099, 0x000030b3, 0x80003099, 0x000030b5, - 0x80003099, 0x000030b7, 0x80003099, 0x000030b9, - 0x80003099, 0x000030bb, 0x80003099, 0x000030bd, - 0x80003099, 0x000030bf, 0x80003099, 0x000030c1, - 0x80003099, 0x000030c4, 0x80003099, 0x000030c6, - 0x80003099, 0x000030c8, 0x80003099, 0x000030cf, - 0x80003099, 0x000030cf, 0x8000309a, 0x000030d2, - 0x80003099, 0x000030d2, 0x8000309a, 0x000030d5, - 0x80003099, 0x000030d5, 0x8000309a, 0x000030d8, - 0x80003099, 0x000030d8, 0x8000309a, 0x000030db, - 0x80003099, 0x000030db, 0x8000309a, 0x000030a6, - 0x80003099, 0x000030ef, 0x80003099, 0x000030f0, - 0x80003099, 0x000030f1, 0x80003099, 0x000030f2, - 0x80003099, 0x000030fd, 0x80003099, 0x80001100, - 0x80001101, 0x800011aa, 0x80001102, 0x800011ac, - 0x800011ad, 0x80001103, 0x80001104, 0x80001105, - 0x800011b0, 0x800011b1, 0x800011b2, 0x800011b3, - 0x800011b4, 0x800011b5, 0x8000111a, 0x80001106, - 0x80001107, 0x80001108, 0x80001121, 0x80001109, - 0x8000110a, 0x8000110b, 0x8000110c, 0x8000110d, - 0x8000110e, 0x8000110f, 0x80001110, 0x80001111, - 0x80001112, 0x80001161, 0x80001162, 0x80001163, - 0x80001164, 0x80001165, 0x80001166, 0x80001167, - 0x80001168, 0x80001169, 0x8000116a, 0x8000116b, - 0x8000116c, 0x8000116d, 0x8000116e, 0x8000116f, - 0x80001170, 0x80001171, 0x80001172, 0x80001173, - 0x80001174, 0x80001175, 0x80001160, 0x80001114, - 0x80001115, 0x800011c7, 0x800011c8, 0x800011cc, - 0x800011ce, 0x800011d3, 0x800011d7, 0x800011d9, - 0x8000111c, 0x800011dd, 0x800011df, 0x8000111d, - 0x8000111e, 0x80001120, 0x80001122, 0x80001123, - 0x80001127, 0x80001129, 0x8000112b, 0x8000112c, - 0x8000112d, 0x8000112e, 0x8000112f, 0x80001132, - 0x80001136, 0x80001140, 0x80001147, 0x8000114c, - 0x800011f1, 0x800011f2, 0x80001157, 0x80001158, - 0x80001159, 0x80001184, 0x80001185, 0x80001188, - 0x80001191, 0x80001192, 0x80001194, 0x8000119e, - 0x800011a1, 0x80004e00, 0x80004e8c, 0x80004e09, - 0x800056db, 0x80004e0a, 0x80004e2d, 0x80004e0b, - 0x80007532, 0x80004e59, 0x80004e19, 0x80004e01, - 0x80005929, 0x80005730, 0x80004eba, 0x00000028, - 0x00001100, 0x80000029, 0x00000028, 0x00001102, - 0x80000029, 0x00000028, 0x00001103, 0x80000029, - 0x00000028, 0x00001105, 0x80000029, 0x00000028, - 0x00001106, 0x80000029, 0x00000028, 0x00001107, - 0x80000029, 0x00000028, 0x00001109, 0x80000029, - 0x00000028, 0x0000110b, 0x80000029, 0x00000028, - 0x0000110c, 0x80000029, 0x00000028, 0x0000110e, - 0x80000029, 0x00000028, 0x0000110f, 0x80000029, - 0x00000028, 0x00001110, 0x80000029, 0x00000028, - 0x00001111, 0x80000029, 0x00000028, 0x00001112, - 0x80000029, 0x00000028, 0x00001100, 0x00001161, - 0x80000029, 0x00000028, 0x00001102, 0x00001161, - 0x80000029, 0x00000028, 0x00001103, 0x00001161, - 0x80000029, 0x00000028, 0x00001105, 0x00001161, - 0x80000029, 0x00000028, 0x00001106, 0x00001161, - 0x80000029, 0x00000028, 0x00001107, 0x00001161, - 0x80000029, 0x00000028, 0x00001109, 0x00001161, - 0x80000029, 0x00000028, 0x0000110b, 0x00001161, - 0x80000029, 0x00000028, 0x0000110c, 0x00001161, - 0x80000029, 0x00000028, 0x0000110e, 0x00001161, - 0x80000029, 0x00000028, 0x0000110f, 0x00001161, - 0x80000029, 0x00000028, 0x00001110, 0x00001161, - 0x80000029, 0x00000028, 0x00001111, 0x00001161, - 0x80000029, 0x00000028, 0x00001112, 0x00001161, - 0x80000029, 0x00000028, 0x0000110c, 0x0000116e, - 0x80000029, 0x00000028, 0x00004e00, 0x80000029, - 0x00000028, 0x00004e8c, 0x80000029, 0x00000028, - 0x00004e09, 0x80000029, 0x00000028, 0x000056db, - 0x80000029, 0x00000028, 0x00004e94, 0x80000029, - 0x00000028, 0x0000516d, 0x80000029, 0x00000028, - 0x00004e03, 0x80000029, 0x00000028, 0x0000516b, - 0x80000029, 0x00000028, 0x00004e5d, 0x80000029, - 0x00000028, 0x00005341, 0x80000029, 0x00000028, - 0x00006708, 0x80000029, 0x00000028, 0x0000706b, - 0x80000029, 0x00000028, 0x00006c34, 0x80000029, - 0x00000028, 0x00006728, 0x80000029, 0x00000028, - 0x000091d1, 0x80000029, 0x00000028, 0x0000571f, - 0x80000029, 0x00000028, 0x000065e5, 0x80000029, - 0x00000028, 0x0000682a, 0x80000029, 0x00000028, - 0x00006709, 0x80000029, 0x00000028, 0x0000793e, - 0x80000029, 0x00000028, 0x0000540d, 0x80000029, - 0x00000028, 0x00007279, 0x80000029, 0x00000028, - 0x00008ca1, 0x80000029, 0x00000028, 0x0000795d, - 0x80000029, 0x00000028, 0x000052b4, 0x80000029, - 0x00000028, 0x00004ee3, 0x80000029, 0x00000028, - 0x0000547c, 0x80000029, 0x00000028, 0x00005b66, - 0x80000029, 0x00000028, 0x000076e3, 0x80000029, - 0x00000028, 0x00004f01, 0x80000029, 0x00000028, - 0x00008cc7, 0x80000029, 0x00000028, 0x00005354, - 0x80000029, 0x00000028, 0x0000796d, 0x80000029, - 0x00000028, 0x00004f11, 0x80000029, 0x00000028, - 0x000081ea, 0x80000029, 0x00000028, 0x000081f3, - 0x80000029, 0x80001100, 0x80001102, 0x80001103, - 0x80001105, 0x80001106, 0x80001107, 0x80001109, - 0x8000110b, 0x8000110c, 0x8000110e, 0x8000110f, - 0x80001110, 0x80001111, 0x80001112, 0x00001100, - 0x80001161, 0x00001102, 0x80001161, 0x00001103, - 0x80001161, 0x00001105, 0x80001161, 0x00001106, - 0x80001161, 0x00001107, 0x80001161, 0x00001109, - 0x80001161, 0x0000110b, 0x80001161, 0x0000110c, - 0x80001161, 0x0000110e, 0x80001161, 0x0000110f, - 0x80001161, 0x00001110, 0x80001161, 0x00001111, - 0x80001161, 0x00001112, 0x80001161, 0x80004e00, - 0x80004e8c, 0x80004e09, 0x800056db, 0x80004e94, - 0x8000516d, 0x80004e03, 0x8000516b, 0x80004e5d, - 0x80005341, 0x80006708, 0x8000706b, 0x80006c34, - 0x80006728, 0x800091d1, 0x8000571f, 0x800065e5, - 0x8000682a, 0x80006709, 0x8000793e, 0x8000540d, - 0x80007279, 0x80008ca1, 0x8000795d, 0x800052b4, - 0x800079d8, 0x80007537, 0x80005973, 0x80009069, - 0x8000512a, 0x80005370, 0x80006ce8, 0x80009805, - 0x80004f11, 0x80005199, 0x80006b63, 0x80004e0a, - 0x80004e2d, 0x80004e0b, 0x80005de6, 0x800053f3, - 0x8000533b, 0x80005b97, 0x80005b66, 0x800076e3, - 0x80004f01, 0x80008cc7, 0x80005354, 0x8000591c, - 0x00000031, 0x80006708, 0x00000032, 0x80006708, - 0x00000033, 0x80006708, 0x00000034, 0x80006708, - 0x00000035, 0x80006708, 0x00000036, 0x80006708, - 0x00000037, 0x80006708, 0x00000038, 0x80006708, - 0x00000039, 0x80006708, 0x00000031, 0x00000030, - 0x80006708, 0x00000031, 0x00000031, 0x80006708, - 0x00000031, 0x00000032, 0x80006708, 0x800030a2, - 0x800030a4, 0x800030a6, 0x800030a8, 0x800030aa, - 0x800030ab, 0x800030ad, 0x800030af, 0x800030b1, - 0x800030b3, 0x800030b5, 0x800030b7, 0x800030b9, - 0x800030bb, 0x800030bd, 0x800030bf, 0x800030c1, - 0x800030c4, 0x800030c6, 0x800030c8, 0x800030ca, - 0x800030cb, 0x800030cc, 0x800030cd, 0x800030ce, - 0x800030cf, 0x800030d2, 0x800030d5, 0x800030d8, - 0x800030db, 0x800030de, 0x800030df, 0x800030e0, - 0x800030e1, 0x800030e2, 0x800030e4, 0x800030e6, - 0x800030e8, 0x800030e9, 0x800030ea, 0x800030eb, - 0x800030ec, 0x800030ed, 0x800030ef, 0x800030f0, - 0x800030f1, 0x800030f2, 0x000030a2, 0x000030d1, - 0x000030fc, 0x800030c8, 0x000030a2, 0x000030eb, - 0x000030d5, 0x800030a1, 0x000030a2, 0x000030f3, - 0x000030da, 0x800030a2, 0x000030a2, 0x000030fc, - 0x800030eb, 0x000030a4, 0x000030cb, 0x000030f3, - 0x800030b0, 0x000030a4, 0x000030f3, 0x800030c1, - 0x000030a6, 0x000030a9, 0x800030f3, 0x000030a8, - 0x000030b9, 0x000030af, 0x000030fc, 0x800030c9, - 0x000030a8, 0x000030fc, 0x000030ab, 0x800030fc, - 0x000030aa, 0x000030f3, 0x800030b9, 0x000030aa, - 0x000030fc, 0x800030e0, 0x000030ab, 0x000030a4, - 0x800030ea, 0x000030ab, 0x000030e9, 0x000030c3, - 0x800030c8, 0x000030ab, 0x000030ed, 0x000030ea, - 0x800030fc, 0x000030ac, 0x000030ed, 0x800030f3, - 0x000030ac, 0x000030f3, 0x800030de, 0x000030ae, - 0x800030ac, 0x000030ae, 0x000030cb, 0x800030fc, - 0x000030ad, 0x000030e5, 0x000030ea, 0x800030fc, - 0x000030ae, 0x000030eb, 0x000030c0, 0x800030fc, - 0x000030ad, 0x800030ed, 0x000030ad, 0x000030ed, - 0x000030b0, 0x000030e9, 0x800030e0, 0x000030ad, - 0x000030ed, 0x000030e1, 0x000030fc, 0x000030c8, - 0x800030eb, 0x000030ad, 0x000030ed, 0x000030ef, - 0x000030c3, 0x800030c8, 0x000030b0, 0x000030e9, - 0x800030e0, 0x000030b0, 0x000030e9, 0x000030e0, - 0x000030c8, 0x800030f3, 0x000030af, 0x000030eb, - 0x000030bc, 0x000030a4, 0x800030ed, 0x000030af, - 0x000030ed, 0x000030fc, 0x800030cd, 0x000030b1, - 0x000030fc, 0x800030b9, 0x000030b3, 0x000030eb, - 0x800030ca, 0x000030b3, 0x000030fc, 0x800030dd, - 0x000030b5, 0x000030a4, 0x000030af, 0x800030eb, - 0x000030b5, 0x000030f3, 0x000030c1, 0x000030fc, - 0x800030e0, 0x000030b7, 0x000030ea, 0x000030f3, - 0x800030b0, 0x000030bb, 0x000030f3, 0x800030c1, - 0x000030bb, 0x000030f3, 0x800030c8, 0x000030c0, - 0x000030fc, 0x800030b9, 0x000030c7, 0x800030b7, - 0x000030c9, 0x800030eb, 0x000030c8, 0x800030f3, - 0x000030ca, 0x800030ce, 0x000030ce, 0x000030c3, - 0x800030c8, 0x000030cf, 0x000030a4, 0x800030c4, - 0x000030d1, 0x000030fc, 0x000030bb, 0x000030f3, - 0x800030c8, 0x000030d1, 0x000030fc, 0x800030c4, - 0x000030d0, 0x000030fc, 0x000030ec, 0x800030eb, - 0x000030d4, 0x000030a2, 0x000030b9, 0x000030c8, - 0x800030eb, 0x000030d4, 0x000030af, 0x800030eb, - 0x000030d4, 0x800030b3, 0x000030d3, 0x800030eb, - 0x000030d5, 0x000030a1, 0x000030e9, 0x000030c3, - 0x800030c9, 0x000030d5, 0x000030a3, 0x000030fc, - 0x800030c8, 0x000030d6, 0x000030c3, 0x000030b7, - 0x000030a7, 0x800030eb, 0x000030d5, 0x000030e9, - 0x800030f3, 0x000030d8, 0x000030af, 0x000030bf, - 0x000030fc, 0x800030eb, 0x000030da, 0x800030bd, - 0x000030da, 0x000030cb, 0x800030d2, 0x000030d8, - 0x000030eb, 0x800030c4, 0x000030da, 0x000030f3, - 0x800030b9, 0x000030da, 0x000030fc, 0x800030b8, - 0x000030d9, 0x000030fc, 0x800030bf, 0x000030dd, - 0x000030a4, 0x000030f3, 0x800030c8, 0x000030dc, - 0x000030eb, 0x800030c8, 0x000030db, 0x800030f3, - 0x000030dd, 0x000030f3, 0x800030c9, 0x000030db, - 0x000030fc, 0x800030eb, 0x000030db, 0x000030fc, - 0x800030f3, 0x000030de, 0x000030a4, 0x000030af, - 0x800030ed, 0x000030de, 0x000030a4, 0x800030eb, - 0x000030de, 0x000030c3, 0x800030cf, 0x000030de, - 0x000030eb, 0x800030af, 0x000030de, 0x000030f3, - 0x000030b7, 0x000030e7, 0x800030f3, 0x000030df, - 0x000030af, 0x000030ed, 0x800030f3, 0x000030df, - 0x800030ea, 0x000030df, 0x000030ea, 0x000030d0, - 0x000030fc, 0x800030eb, 0x000030e1, 0x800030ac, - 0x000030e1, 0x000030ac, 0x000030c8, 0x800030f3, - 0x000030e1, 0x000030fc, 0x000030c8, 0x800030eb, - 0x000030e4, 0x000030fc, 0x800030c9, 0x000030e4, - 0x000030fc, 0x800030eb, 0x000030e6, 0x000030a2, - 0x800030f3, 0x000030ea, 0x000030c3, 0x000030c8, - 0x800030eb, 0x000030ea, 0x800030e9, 0x000030eb, - 0x000030d4, 0x800030fc, 0x000030eb, 0x000030fc, - 0x000030d6, 0x800030eb, 0x000030ec, 0x800030e0, - 0x000030ec, 0x000030f3, 0x000030c8, 0x000030b2, - 0x800030f3, 0x000030ef, 0x000030c3, 0x800030c8, - 0x00000030, 0x800070b9, 0x00000031, 0x800070b9, - 0x00000032, 0x800070b9, 0x00000033, 0x800070b9, - 0x00000034, 0x800070b9, 0x00000035, 0x800070b9, - 0x00000036, 0x800070b9, 0x00000037, 0x800070b9, - 0x00000038, 0x800070b9, 0x00000039, 0x800070b9, - 0x00000031, 0x00000030, 0x800070b9, 0x00000031, - 0x00000031, 0x800070b9, 0x00000031, 0x00000032, - 0x800070b9, 0x00000031, 0x00000033, 0x800070b9, - 0x00000031, 0x00000034, 0x800070b9, 0x00000031, - 0x00000035, 0x800070b9, 0x00000031, 0x00000036, - 0x800070b9, 0x00000031, 0x00000037, 0x800070b9, - 0x00000031, 0x00000038, 0x800070b9, 0x00000031, - 0x00000039, 0x800070b9, 0x00000032, 0x00000030, - 0x800070b9, 0x00000032, 0x00000031, 0x800070b9, - 0x00000032, 0x00000032, 0x800070b9, 0x00000032, - 0x00000033, 0x800070b9, 0x00000032, 0x00000034, - 0x800070b9, 0x00000068, 0x00000050, 0x80000061, - 0x00000064, 0x80000061, 0x00000041, 0x80000055, - 0x00000062, 0x00000061, 0x80000072, 0x0000006f, - 0x80000056, 0x00000070, 0x80000063, 0x00005e73, - 0x80006210, 0x0000662d, 0x8000548c, 0x00005927, - 0x80006b63, 0x0000660e, 0x80006cbb, 0x0000682a, - 0x00005f0f, 0x00004f1a, 0x8000793e, 0x00000070, - 0x80000041, 0x0000006e, 0x80000041, 0x000003bc, - 0x80000041, 0x0000006d, 0x80000041, 0x0000006b, - 0x80000041, 0x0000004b, 0x80000042, 0x0000004d, - 0x80000042, 0x00000047, 0x80000042, 0x00000063, - 0x00000061, 0x8000006c, 0x0000006b, 0x00000063, - 0x00000061, 0x8000006c, 0x00000070, 0x80000046, - 0x0000006e, 0x80000046, 0x000003bc, 0x80000046, - 0x000003bc, 0x80000067, 0x0000006d, 0x80000067, - 0x0000006b, 0x80000067, 0x00000048, 0x8000007a, - 0x0000006b, 0x00000048, 0x8000007a, 0x0000004d, - 0x00000048, 0x8000007a, 0x00000047, 0x00000048, - 0x8000007a, 0x00000054, 0x00000048, 0x8000007a, - 0x000003bc, 0x80002113, 0x0000006d, 0x80002113, - 0x00000064, 0x80002113, 0x0000006b, 0x80002113, - 0x00000066, 0x8000006d, 0x0000006e, 0x8000006d, - 0x000003bc, 0x8000006d, 0x0000006d, 0x8000006d, - 0x00000063, 0x8000006d, 0x0000006b, 0x8000006d, - 0x0000006d, 0x0000006d, 0x800000b2, 0x00000063, - 0x0000006d, 0x800000b2, 0x0000006d, 0x800000b2, - 0x0000006b, 0x0000006d, 0x800000b2, 0x0000006d, - 0x0000006d, 0x800000b3, 0x00000063, 0x0000006d, - 0x800000b3, 0x0000006d, 0x800000b3, 0x0000006b, - 0x0000006d, 0x800000b3, 0x0000006d, 0x00002215, - 0x80000073, 0x0000006d, 0x00002215, 0x00000073, - 0x800000b2, 0x00000050, 0x80000061, 0x0000006b, - 0x00000050, 0x80000061, 0x0000004d, 0x00000050, - 0x80000061, 0x00000047, 0x00000050, 0x80000061, - 0x00000072, 0x00000061, 0x80000064, 0x00000072, - 0x00000061, 0x00000064, 0x00002215, 0x80000073, - 0x00000072, 0x00000061, 0x00000064, 0x00002215, - 0x00000073, 0x800000b2, 0x00000070, 0x80000073, - 0x0000006e, 0x80000073, 0x000003bc, 0x80000073, - 0x0000006d, 0x80000073, 0x00000070, 0x80000056, - 0x0000006e, 0x80000056, 0x000003bc, 0x80000056, - 0x0000006d, 0x80000056, 0x0000006b, 0x80000056, - 0x0000004d, 0x80000056, 0x00000070, 0x80000057, - 0x0000006e, 0x80000057, 0x000003bc, 0x80000057, - 0x0000006d, 0x80000057, 0x0000006b, 0x80000057, - 0x0000004d, 0x80000057, 0x0000006b, 0x800003a9, - 0x0000004d, 0x800003a9, 0x00000061, 0x0000002e, - 0x0000006d, 0x8000002e, 0x00000042, 0x80000071, - 0x00000063, 0x80000063, 0x00000063, 0x80000064, - 0x00000043, 0x00002215, 0x0000006b, 0x80000067, - 0x00000043, 0x0000006f, 0x8000002e, 0x00000064, - 0x80000042, 0x00000047, 0x80000079, 0x00000068, - 0x80000061, 0x00000048, 0x80000050, 0x00000069, - 0x8000006e, 0x0000004b, 0x8000004b, 0x0000004b, - 0x8000004d, 0x0000006b, 0x80000074, 0x0000006c, - 0x8000006d, 0x0000006c, 0x8000006e, 0x0000006c, - 0x0000006f, 0x80000067, 0x0000006c, 0x80000078, - 0x0000006d, 0x80000062, 0x0000006d, 0x00000069, - 0x8000006c, 0x0000006d, 0x0000006f, 0x8000006c, - 0x00000050, 0x80000048, 0x00000070, 0x0000002e, - 0x0000006d, 0x8000002e, 0x00000050, 0x00000050, - 0x8000004d, 0x00000050, 0x80000052, 0x00000073, - 0x80000072, 0x00000053, 0x80000076, 0x00000057, - 0x80000062, 0x00000031, 0x800065e5, 0x00000032, - 0x800065e5, 0x00000033, 0x800065e5, 0x00000034, - 0x800065e5, 0x00000035, 0x800065e5, 0x00000036, - 0x800065e5, 0x00000037, 0x800065e5, 0x00000038, - 0x800065e5, 0x00000039, 0x800065e5, 0x00000031, - 0x00000030, 0x800065e5, 0x00000031, 0x00000031, - 0x800065e5, 0x00000031, 0x00000032, 0x800065e5, - 0x00000031, 0x00000033, 0x800065e5, 0x00000031, - 0x00000034, 0x800065e5, 0x00000031, 0x00000035, - 0x800065e5, 0x00000031, 0x00000036, 0x800065e5, - 0x00000031, 0x00000037, 0x800065e5, 0x00000031, - 0x00000038, 0x800065e5, 0x00000031, 0x00000039, - 0x800065e5, 0x00000032, 0x00000030, 0x800065e5, - 0x00000032, 0x00000031, 0x800065e5, 0x00000032, - 0x00000032, 0x800065e5, 0x00000032, 0x00000033, - 0x800065e5, 0x00000032, 0x00000034, 0x800065e5, - 0x00000032, 0x00000035, 0x800065e5, 0x00000032, - 0x00000036, 0x800065e5, 0x00000032, 0x00000037, - 0x800065e5, 0x00000032, 0x00000038, 0x800065e5, - 0x00000032, 0x00000039, 0x800065e5, 0x00000033, - 0x00000030, 0x800065e5, 0x00000033, 0x00000031, - 0x800065e5, 0x80008c48, 0x800066f4, 0x80008eca, - 0x80008cc8, 0x80006ed1, 0x80004e32, 0x800053e5, - 0x80009f9c, 0x80009f9c, 0x80005951, 0x800091d1, - 0x80005587, 0x80005948, 0x800061f6, 0x80007669, - 0x80007f85, 0x8000863f, 0x800087ba, 0x800088f8, - 0x8000908f, 0x80006a02, 0x80006d1b, 0x800070d9, - 0x800073de, 0x8000843d, 0x8000916a, 0x800099f1, - 0x80004e82, 0x80005375, 0x80006b04, 0x8000721b, - 0x8000862d, 0x80009e1e, 0x80005d50, 0x80006feb, - 0x800085cd, 0x80008964, 0x800062c9, 0x800081d8, - 0x8000881f, 0x80005eca, 0x80006717, 0x80006d6a, - 0x800072fc, 0x800090ce, 0x80004f86, 0x800051b7, - 0x800052de, 0x800064c4, 0x80006ad3, 0x80007210, - 0x800076e7, 0x80008001, 0x80008606, 0x8000865c, - 0x80008def, 0x80009732, 0x80009b6f, 0x80009dfa, - 0x8000788c, 0x8000797f, 0x80007da0, 0x800083c9, - 0x80009304, 0x80009e7f, 0x80008ad6, 0x800058df, - 0x80005f04, 0x80007c60, 0x8000807e, 0x80007262, - 0x800078ca, 0x80008cc2, 0x800096f7, 0x800058d8, - 0x80005c62, 0x80006a13, 0x80006dda, 0x80006f0f, - 0x80007d2f, 0x80007e37, 0x800096fb, 0x800052d2, - 0x8000808b, 0x800051dc, 0x800051cc, 0x80007a1c, - 0x80007dbe, 0x800083f1, 0x80009675, 0x80008b80, - 0x800062cf, 0x80006a02, 0x80008afe, 0x80004e39, - 0x80005be7, 0x80006012, 0x80007387, 0x80007570, - 0x80005317, 0x800078fb, 0x80004fbf, 0x80005fa9, - 0x80004e0d, 0x80006ccc, 0x80006578, 0x80007d22, - 0x800053c3, 0x8000585e, 0x80007701, 0x80008449, - 0x80008aaa, 0x80006bba, 0x80008fb0, 0x80006c88, - 0x800062fe, 0x800082e5, 0x800063a0, 0x80007565, - 0x80004eae, 0x80005169, 0x800051c9, 0x80006881, - 0x80007ce7, 0x8000826f, 0x80008ad2, 0x800091cf, - 0x800052f5, 0x80005442, 0x80005973, 0x80005eec, - 0x800065c5, 0x80006ffe, 0x8000792a, 0x800095ad, - 0x80009a6a, 0x80009e97, 0x80009ece, 0x8000529b, - 0x800066c6, 0x80006b77, 0x80008f62, 0x80005e74, - 0x80006190, 0x80006200, 0x8000649a, 0x80006f23, - 0x80007149, 0x80007489, 0x800079ca, 0x80007df4, - 0x8000806f, 0x80008f26, 0x800084ee, 0x80009023, - 0x8000934a, 0x80005217, 0x800052a3, 0x800054bd, - 0x800070c8, 0x800088c2, 0x80008aaa, 0x80005ec9, - 0x80005ff5, 0x8000637b, 0x80006bae, 0x80007c3e, - 0x80007375, 0x80004ee4, 0x800056f9, 0x80005be7, - 0x80005dba, 0x8000601c, 0x800073b2, 0x80007469, - 0x80007f9a, 0x80008046, 0x80009234, 0x800096f6, - 0x80009748, 0x80009818, 0x80004f8b, 0x800079ae, - 0x800091b4, 0x800096b8, 0x800060e1, 0x80004e86, - 0x800050da, 0x80005bee, 0x80005c3f, 0x80006599, - 0x80006a02, 0x800071ce, 0x80007642, 0x800084fc, - 0x8000907c, 0x80009f8d, 0x80006688, 0x8000962e, - 0x80005289, 0x8000677b, 0x800067f3, 0x80006d41, - 0x80006e9c, 0x80007409, 0x80007559, 0x8000786b, - 0x80007d10, 0x8000985e, 0x8000516d, 0x8000622e, - 0x80009678, 0x8000502b, 0x80005d19, 0x80006dea, - 0x80008f2a, 0x80005f8b, 0x80006144, 0x80006817, - 0x80007387, 0x80009686, 0x80005229, 0x8000540f, - 0x80005c65, 0x80006613, 0x8000674e, 0x800068a8, - 0x80006ce5, 0x80007406, 0x800075e2, 0x80007f79, - 0x800088cf, 0x800088e1, 0x800091cc, 0x800096e2, - 0x8000533f, 0x80006eba, 0x8000541d, 0x800071d0, - 0x80007498, 0x800085fa, 0x800096a3, 0x80009c57, - 0x80009e9f, 0x80006797, 0x80006dcb, 0x800081e8, - 0x80007acb, 0x80007b20, 0x80007c92, 0x800072c0, - 0x80007099, 0x80008b58, 0x80004ec0, 0x80008336, - 0x8000523a, 0x80005207, 0x80005ea6, 0x800062d3, - 0x80007cd6, 0x80005b85, 0x80006d1e, 0x800066b4, - 0x80008f3b, 0x8000884c, 0x8000964d, 0x8000898b, - 0x80005ed3, 0x80005140, 0x800055c0, 0x8000585a, - 0x80006674, 0x800051de, 0x8000732a, 0x800076ca, - 0x8000793c, 0x8000795e, 0x80007965, 0x8000798f, - 0x80009756, 0x80007cbe, 0x80007fbd, 0x80008612, - 0x80008af8, 0x80009038, 0x800090fd, 0x800098ef, - 0x800098fc, 0x80009928, 0x80009db4, 0x00000066, - 0x80000066, 0x00000066, 0x80000069, 0x00000066, - 0x8000006c, 0x00000066, 0x00000066, 0x80000069, - 0x00000066, 0x00000066, 0x8000006c, 0x0000017f, - 0x80000074, 0x00000073, 0x80000074, 0x00000574, - 0x80000576, 0x00000574, 0x80000565, 0x00000574, - 0x8000056b, 0x0000057e, 0x80000576, 0x00000574, - 0x8000056d, 0x000005d9, 0x800005b4, 0x000005f2, - 0x800005b7, 0x800005e2, 0x800005d0, 0x800005d3, - 0x800005d4, 0x800005db, 0x800005dc, 0x800005dd, - 0x800005e8, 0x800005ea, 0x8000002b, 0x000005e9, - 0x800005c1, 0x000005e9, 0x800005c2, 0x0000fb49, - 0x800005c1, 0x0000fb49, 0x800005c2, 0x000005d0, - 0x800005b7, 0x000005d0, 0x800005b8, 0x000005d0, - 0x800005bc, 0x000005d1, 0x800005bc, 0x000005d2, - 0x800005bc, 0x000005d3, 0x800005bc, 0x000005d4, - 0x800005bc, 0x000005d5, 0x800005bc, 0x000005d6, - 0x800005bc, 0x000005d8, 0x800005bc, 0x000005d9, - 0x800005bc, 0x000005da, 0x800005bc, 0x000005db, - 0x800005bc, 0x000005dc, 0x800005bc, 0x000005de, - 0x800005bc, 0x000005e0, 0x800005bc, 0x000005e1, - 0x800005bc, 0x000005e3, 0x800005bc, 0x000005e4, - 0x800005bc, 0x000005e6, 0x800005bc, 0x000005e7, - 0x800005bc, 0x000005e8, 0x800005bc, 0x000005e9, - 0x800005bc, 0x000005ea, 0x800005bc, 0x000005d5, - 0x800005b9, 0x000005d1, 0x800005bf, 0x000005db, - 0x800005bf, 0x000005e4, 0x800005bf, 0x000005d0, - 0x800005dc, 0x80000671, 0x80000671, 0x8000067b, - 0x8000067b, 0x8000067b, 0x8000067b, 0x8000067e, - 0x8000067e, 0x8000067e, 0x8000067e, 0x80000680, - 0x80000680, 0x80000680, 0x80000680, 0x8000067a, - 0x8000067a, 0x8000067a, 0x8000067a, 0x8000067f, - 0x8000067f, 0x8000067f, 0x8000067f, 0x80000679, - 0x80000679, 0x80000679, 0x80000679, 0x800006a4, - 0x800006a4, 0x800006a4, 0x800006a4, 0x800006a6, - 0x800006a6, 0x800006a6, 0x800006a6, 0x80000684, - 0x80000684, 0x80000684, 0x80000684, 0x80000683, - 0x80000683, 0x80000683, 0x80000683, 0x80000686, - 0x80000686, 0x80000686, 0x80000686, 0x80000687, - 0x80000687, 0x80000687, 0x80000687, 0x8000068d, - 0x8000068d, 0x8000068c, 0x8000068c, 0x8000068e, - 0x8000068e, 0x80000688, 0x80000688, 0x80000698, - 0x80000698, 0x80000691, 0x80000691, 0x800006a9, - 0x800006a9, 0x800006a9, 0x800006a9, 0x800006af, - 0x800006af, 0x800006af, 0x800006af, 0x800006b3, - 0x800006b3, 0x800006b3, 0x800006b3, 0x800006b1, - 0x800006b1, 0x800006b1, 0x800006b1, 0x800006ba, - 0x800006ba, 0x800006bb, 0x800006bb, 0x800006bb, - 0x800006bb, 0x800006c0, 0x800006c0, 0x800006c1, - 0x800006c1, 0x800006c1, 0x800006c1, 0x800006be, - 0x800006be, 0x800006be, 0x800006be, 0x800006d2, - 0x800006d2, 0x800006d3, 0x800006d3, 0x800006ad, - 0x800006ad, 0x800006ad, 0x800006ad, 0x800006c7, - 0x800006c7, 0x800006c6, 0x800006c6, 0x800006c8, - 0x800006c8, 0x80000677, 0x800006cb, 0x800006cb, - 0x800006c5, 0x800006c5, 0x800006c9, 0x800006c9, - 0x800006d0, 0x800006d0, 0x800006d0, 0x800006d0, - 0x80000649, 0x80000649, 0x00000626, 0x80000627, - 0x00000626, 0x80000627, 0x00000626, 0x800006d5, - 0x00000626, 0x800006d5, 0x00000626, 0x80000648, - 0x00000626, 0x80000648, 0x00000626, 0x800006c7, - 0x00000626, 0x800006c7, 0x00000626, 0x800006c6, - 0x00000626, 0x800006c6, 0x00000626, 0x800006c8, - 0x00000626, 0x800006c8, 0x00000626, 0x800006d0, - 0x00000626, 0x800006d0, 0x00000626, 0x800006d0, - 0x00000626, 0x80000649, 0x00000626, 0x80000649, - 0x00000626, 0x80000649, 0x800006cc, 0x800006cc, - 0x800006cc, 0x800006cc, 0x00000626, 0x8000062c, - 0x00000626, 0x8000062d, 0x00000626, 0x80000645, - 0x00000626, 0x80000649, 0x00000626, 0x8000064a, - 0x00000628, 0x8000062c, 0x00000628, 0x8000062d, - 0x00000628, 0x8000062e, 0x00000628, 0x80000645, - 0x00000628, 0x80000649, 0x00000628, 0x8000064a, - 0x0000062a, 0x8000062c, 0x0000062a, 0x8000062d, - 0x0000062a, 0x8000062e, 0x0000062a, 0x80000645, - 0x0000062a, 0x80000649, 0x0000062a, 0x8000064a, - 0x0000062b, 0x8000062c, 0x0000062b, 0x80000645, - 0x0000062b, 0x80000649, 0x0000062b, 0x8000064a, - 0x0000062c, 0x8000062d, 0x0000062c, 0x80000645, - 0x0000062d, 0x8000062c, 0x0000062d, 0x80000645, - 0x0000062e, 0x8000062c, 0x0000062e, 0x8000062d, - 0x0000062e, 0x80000645, 0x00000633, 0x8000062c, - 0x00000633, 0x8000062d, 0x00000633, 0x8000062e, - 0x00000633, 0x80000645, 0x00000635, 0x8000062d, - 0x00000635, 0x80000645, 0x00000636, 0x8000062c, - 0x00000636, 0x8000062d, 0x00000636, 0x8000062e, - 0x00000636, 0x80000645, 0x00000637, 0x8000062d, - 0x00000637, 0x80000645, 0x00000638, 0x80000645, - 0x00000639, 0x8000062c, 0x00000639, 0x80000645, - 0x0000063a, 0x8000062c, 0x0000063a, 0x80000645, - 0x00000641, 0x8000062c, 0x00000641, 0x8000062d, - 0x00000641, 0x8000062e, 0x00000641, 0x80000645, - 0x00000641, 0x80000649, 0x00000641, 0x8000064a, - 0x00000642, 0x8000062d, 0x00000642, 0x80000645, - 0x00000642, 0x80000649, 0x00000642, 0x8000064a, - 0x00000643, 0x80000627, 0x00000643, 0x8000062c, - 0x00000643, 0x8000062d, 0x00000643, 0x8000062e, - 0x00000643, 0x80000644, 0x00000643, 0x80000645, - 0x00000643, 0x80000649, 0x00000643, 0x8000064a, - 0x00000644, 0x8000062c, 0x00000644, 0x8000062d, - 0x00000644, 0x8000062e, 0x00000644, 0x80000645, - 0x00000644, 0x80000649, 0x00000644, 0x8000064a, - 0x00000645, 0x8000062c, 0x00000645, 0x8000062d, - 0x00000645, 0x8000062e, 0x00000645, 0x80000645, - 0x00000645, 0x80000649, 0x00000645, 0x8000064a, - 0x00000646, 0x8000062c, 0x00000646, 0x8000062d, - 0x00000646, 0x8000062e, 0x00000646, 0x80000645, - 0x00000646, 0x80000649, 0x00000646, 0x8000064a, - 0x00000647, 0x8000062c, 0x00000647, 0x80000645, - 0x00000647, 0x80000649, 0x00000647, 0x8000064a, - 0x0000064a, 0x8000062c, 0x0000064a, 0x8000062d, - 0x0000064a, 0x8000062e, 0x0000064a, 0x80000645, - 0x0000064a, 0x80000649, 0x0000064a, 0x8000064a, - 0x00000630, 0x80000670, 0x00000631, 0x80000670, - 0x00000649, 0x80000670, 0x00000020, 0x0000064c, - 0x80000651, 0x00000020, 0x0000064d, 0x80000651, - 0x00000020, 0x0000064e, 0x80000651, 0x00000020, - 0x0000064f, 0x80000651, 0x00000020, 0x00000650, - 0x80000651, 0x00000020, 0x00000651, 0x80000670, - 0x00000626, 0x80000631, 0x00000626, 0x80000632, - 0x00000626, 0x80000645, 0x00000626, 0x80000646, - 0x00000626, 0x80000649, 0x00000626, 0x8000064a, - 0x00000628, 0x80000631, 0x00000628, 0x80000632, - 0x00000628, 0x80000645, 0x00000628, 0x80000646, - 0x00000628, 0x80000649, 0x00000628, 0x8000064a, - 0x0000062a, 0x80000631, 0x0000062a, 0x80000632, - 0x0000062a, 0x80000645, 0x0000062a, 0x80000646, - 0x0000062a, 0x80000649, 0x0000062a, 0x8000064a, - 0x0000062b, 0x80000631, 0x0000062b, 0x80000632, - 0x0000062b, 0x80000645, 0x0000062b, 0x80000646, - 0x0000062b, 0x80000649, 0x0000062b, 0x8000064a, - 0x00000641, 0x80000649, 0x00000641, 0x8000064a, - 0x00000642, 0x80000649, 0x00000642, 0x8000064a, - 0x00000643, 0x80000627, 0x00000643, 0x80000644, - 0x00000643, 0x80000645, 0x00000643, 0x80000649, - 0x00000643, 0x8000064a, 0x00000644, 0x80000645, - 0x00000644, 0x80000649, 0x00000644, 0x8000064a, - 0x00000645, 0x80000627, 0x00000645, 0x80000645, - 0x00000646, 0x80000631, 0x00000646, 0x80000632, - 0x00000646, 0x80000645, 0x00000646, 0x80000646, - 0x00000646, 0x80000649, 0x00000646, 0x8000064a, - 0x00000649, 0x80000670, 0x0000064a, 0x80000631, - 0x0000064a, 0x80000632, 0x0000064a, 0x80000645, - 0x0000064a, 0x80000646, 0x0000064a, 0x80000649, - 0x0000064a, 0x8000064a, 0x00000626, 0x8000062c, - 0x00000626, 0x8000062d, 0x00000626, 0x8000062e, - 0x00000626, 0x80000645, 0x00000626, 0x80000647, - 0x00000628, 0x8000062c, 0x00000628, 0x8000062d, - 0x00000628, 0x8000062e, 0x00000628, 0x80000645, - 0x00000628, 0x80000647, 0x0000062a, 0x8000062c, - 0x0000062a, 0x8000062d, 0x0000062a, 0x8000062e, - 0x0000062a, 0x80000645, 0x0000062a, 0x80000647, - 0x0000062b, 0x80000645, 0x0000062c, 0x8000062d, - 0x0000062c, 0x80000645, 0x0000062d, 0x8000062c, - 0x0000062d, 0x80000645, 0x0000062e, 0x8000062c, - 0x0000062e, 0x80000645, 0x00000633, 0x8000062c, - 0x00000633, 0x8000062d, 0x00000633, 0x8000062e, - 0x00000633, 0x80000645, 0x00000635, 0x8000062d, - 0x00000635, 0x8000062e, 0x00000635, 0x80000645, - 0x00000636, 0x8000062c, 0x00000636, 0x8000062d, - 0x00000636, 0x8000062e, 0x00000636, 0x80000645, - 0x00000637, 0x8000062d, 0x00000638, 0x80000645, - 0x00000639, 0x8000062c, 0x00000639, 0x80000645, - 0x0000063a, 0x8000062c, 0x0000063a, 0x80000645, - 0x00000641, 0x8000062c, 0x00000641, 0x8000062d, - 0x00000641, 0x8000062e, 0x00000641, 0x80000645, - 0x00000642, 0x8000062d, 0x00000642, 0x80000645, - 0x00000643, 0x8000062c, 0x00000643, 0x8000062d, - 0x00000643, 0x8000062e, 0x00000643, 0x80000644, - 0x00000643, 0x80000645, 0x00000644, 0x8000062c, - 0x00000644, 0x8000062d, 0x00000644, 0x8000062e, - 0x00000644, 0x80000645, 0x00000644, 0x80000647, - 0x00000645, 0x8000062c, 0x00000645, 0x8000062d, - 0x00000645, 0x8000062e, 0x00000645, 0x80000645, - 0x00000646, 0x8000062c, 0x00000646, 0x8000062d, - 0x00000646, 0x8000062e, 0x00000646, 0x80000645, - 0x00000646, 0x80000647, 0x00000647, 0x8000062c, - 0x00000647, 0x80000645, 0x00000647, 0x80000670, - 0x0000064a, 0x8000062c, 0x0000064a, 0x8000062d, - 0x0000064a, 0x8000062e, 0x0000064a, 0x80000645, - 0x0000064a, 0x80000647, 0x00000626, 0x80000645, - 0x00000626, 0x80000647, 0x00000628, 0x80000645, - 0x00000628, 0x80000647, 0x0000062a, 0x80000645, - 0x0000062a, 0x80000647, 0x0000062b, 0x80000645, - 0x0000062b, 0x80000647, 0x00000633, 0x80000645, - 0x00000633, 0x80000647, 0x00000634, 0x80000645, - 0x00000634, 0x80000647, 0x00000643, 0x80000644, - 0x00000643, 0x80000645, 0x00000644, 0x80000645, - 0x00000646, 0x80000645, 0x00000646, 0x80000647, - 0x0000064a, 0x80000645, 0x0000064a, 0x80000647, - 0x00000640, 0x0000064e, 0x80000651, 0x00000640, - 0x0000064f, 0x80000651, 0x00000640, 0x00000650, - 0x80000651, 0x00000637, 0x80000649, 0x00000637, - 0x8000064a, 0x00000639, 0x80000649, 0x00000639, - 0x8000064a, 0x0000063a, 0x80000649, 0x0000063a, - 0x8000064a, 0x00000633, 0x80000649, 0x00000633, - 0x8000064a, 0x00000634, 0x80000649, 0x00000634, - 0x8000064a, 0x0000062d, 0x80000649, 0x0000062d, - 0x8000064a, 0x0000062c, 0x80000649, 0x0000062c, - 0x8000064a, 0x0000062e, 0x80000649, 0x0000062e, - 0x8000064a, 0x00000635, 0x80000649, 0x00000635, - 0x8000064a, 0x00000636, 0x80000649, 0x00000636, - 0x8000064a, 0x00000634, 0x8000062c, 0x00000634, - 0x8000062d, 0x00000634, 0x8000062e, 0x00000634, - 0x80000645, 0x00000634, 0x80000631, 0x00000633, - 0x80000631, 0x00000635, 0x80000631, 0x00000636, - 0x80000631, 0x00000637, 0x80000649, 0x00000637, - 0x8000064a, 0x00000639, 0x80000649, 0x00000639, - 0x8000064a, 0x0000063a, 0x80000649, 0x0000063a, - 0x8000064a, 0x00000633, 0x80000649, 0x00000633, - 0x8000064a, 0x00000634, 0x80000649, 0x00000634, - 0x8000064a, 0x0000062d, 0x80000649, 0x0000062d, - 0x8000064a, 0x0000062c, 0x80000649, 0x0000062c, - 0x8000064a, 0x0000062e, 0x80000649, 0x0000062e, - 0x8000064a, 0x00000635, 0x80000649, 0x00000635, - 0x8000064a, 0x00000636, 0x80000649, 0x00000636, - 0x8000064a, 0x00000634, 0x8000062c, 0x00000634, - 0x8000062d, 0x00000634, 0x8000062e, 0x00000634, - 0x80000645, 0x00000634, 0x80000631, 0x00000633, - 0x80000631, 0x00000635, 0x80000631, 0x00000636, - 0x80000631, 0x00000634, 0x8000062c, 0x00000634, - 0x8000062d, 0x00000634, 0x8000062e, 0x00000634, - 0x80000645, 0x00000633, 0x80000647, 0x00000634, - 0x80000647, 0x00000637, 0x80000645, 0x00000633, - 0x8000062c, 0x00000633, 0x8000062d, 0x00000633, - 0x8000062e, 0x00000634, 0x8000062c, 0x00000634, - 0x8000062d, 0x00000634, 0x8000062e, 0x00000637, - 0x80000645, 0x00000638, 0x80000645, 0x00000627, - 0x8000064b, 0x00000627, 0x8000064b, 0x0000062a, - 0x0000062c, 0x80000645, 0x0000062a, 0x0000062d, - 0x8000062c, 0x0000062a, 0x0000062d, 0x8000062c, - 0x0000062a, 0x0000062d, 0x80000645, 0x0000062a, - 0x0000062e, 0x80000645, 0x0000062a, 0x00000645, - 0x8000062c, 0x0000062a, 0x00000645, 0x8000062d, - 0x0000062a, 0x00000645, 0x8000062e, 0x0000062c, - 0x00000645, 0x8000062d, 0x0000062c, 0x00000645, - 0x8000062d, 0x0000062d, 0x00000645, 0x8000064a, - 0x0000062d, 0x00000645, 0x80000649, 0x00000633, - 0x0000062d, 0x8000062c, 0x00000633, 0x0000062c, - 0x8000062d, 0x00000633, 0x0000062c, 0x80000649, - 0x00000633, 0x00000645, 0x8000062d, 0x00000633, - 0x00000645, 0x8000062d, 0x00000633, 0x00000645, - 0x8000062c, 0x00000633, 0x00000645, 0x80000645, - 0x00000633, 0x00000645, 0x80000645, 0x00000635, - 0x0000062d, 0x8000062d, 0x00000635, 0x0000062d, - 0x8000062d, 0x00000635, 0x00000645, 0x80000645, - 0x00000634, 0x0000062d, 0x80000645, 0x00000634, - 0x0000062d, 0x80000645, 0x00000634, 0x0000062c, - 0x8000064a, 0x00000634, 0x00000645, 0x8000062e, - 0x00000634, 0x00000645, 0x8000062e, 0x00000634, - 0x00000645, 0x80000645, 0x00000634, 0x00000645, - 0x80000645, 0x00000636, 0x0000062d, 0x80000649, - 0x00000636, 0x0000062e, 0x80000645, 0x00000636, - 0x0000062e, 0x80000645, 0x00000637, 0x00000645, - 0x8000062d, 0x00000637, 0x00000645, 0x8000062d, - 0x00000637, 0x00000645, 0x80000645, 0x00000637, - 0x00000645, 0x8000064a, 0x00000639, 0x0000062c, - 0x80000645, 0x00000639, 0x00000645, 0x80000645, - 0x00000639, 0x00000645, 0x80000645, 0x00000639, - 0x00000645, 0x80000649, 0x0000063a, 0x00000645, - 0x80000645, 0x0000063a, 0x00000645, 0x8000064a, - 0x0000063a, 0x00000645, 0x80000649, 0x00000641, - 0x0000062e, 0x80000645, 0x00000641, 0x0000062e, - 0x80000645, 0x00000642, 0x00000645, 0x8000062d, - 0x00000642, 0x00000645, 0x80000645, 0x00000644, - 0x0000062d, 0x80000645, 0x00000644, 0x0000062d, - 0x8000064a, 0x00000644, 0x0000062d, 0x80000649, - 0x00000644, 0x0000062c, 0x8000062c, 0x00000644, - 0x0000062c, 0x8000062c, 0x00000644, 0x0000062e, - 0x80000645, 0x00000644, 0x0000062e, 0x80000645, - 0x00000644, 0x00000645, 0x8000062d, 0x00000644, - 0x00000645, 0x8000062d, 0x00000645, 0x0000062d, - 0x8000062c, 0x00000645, 0x0000062d, 0x80000645, - 0x00000645, 0x0000062d, 0x8000064a, 0x00000645, - 0x0000062c, 0x8000062d, 0x00000645, 0x0000062c, - 0x80000645, 0x00000645, 0x0000062e, 0x8000062c, - 0x00000645, 0x0000062e, 0x80000645, 0x00000645, - 0x0000062c, 0x8000062e, 0x00000647, 0x00000645, - 0x8000062c, 0x00000647, 0x00000645, 0x80000645, - 0x00000646, 0x0000062d, 0x80000645, 0x00000646, - 0x0000062d, 0x80000649, 0x00000646, 0x0000062c, - 0x80000645, 0x00000646, 0x0000062c, 0x80000645, - 0x00000646, 0x0000062c, 0x80000649, 0x00000646, - 0x00000645, 0x8000064a, 0x00000646, 0x00000645, - 0x80000649, 0x0000064a, 0x00000645, 0x80000645, - 0x0000064a, 0x00000645, 0x80000645, 0x00000628, - 0x0000062e, 0x8000064a, 0x0000062a, 0x0000062c, - 0x8000064a, 0x0000062a, 0x0000062c, 0x80000649, - 0x0000062a, 0x0000062e, 0x8000064a, 0x0000062a, - 0x0000062e, 0x80000649, 0x0000062a, 0x00000645, - 0x8000064a, 0x0000062a, 0x00000645, 0x80000649, - 0x0000062c, 0x00000645, 0x8000064a, 0x0000062c, - 0x0000062d, 0x80000649, 0x0000062c, 0x00000645, - 0x80000649, 0x00000633, 0x0000062e, 0x80000649, - 0x00000635, 0x0000062d, 0x8000064a, 0x00000634, - 0x0000062d, 0x8000064a, 0x00000636, 0x0000062d, - 0x8000064a, 0x00000644, 0x0000062c, 0x8000064a, - 0x00000644, 0x00000645, 0x8000064a, 0x0000064a, - 0x0000062d, 0x8000064a, 0x0000064a, 0x0000062c, - 0x8000064a, 0x0000064a, 0x00000645, 0x8000064a, - 0x00000645, 0x00000645, 0x8000064a, 0x00000642, - 0x00000645, 0x8000064a, 0x00000646, 0x0000062d, - 0x8000064a, 0x00000642, 0x00000645, 0x8000062d, - 0x00000644, 0x0000062d, 0x80000645, 0x00000639, - 0x00000645, 0x8000064a, 0x00000643, 0x00000645, - 0x8000064a, 0x00000646, 0x0000062c, 0x8000062d, - 0x00000645, 0x0000062e, 0x8000064a, 0x00000644, - 0x0000062c, 0x80000645, 0x00000643, 0x00000645, - 0x80000645, 0x00000644, 0x0000062c, 0x80000645, - 0x00000646, 0x0000062c, 0x8000062d, 0x0000062c, - 0x0000062d, 0x8000064a, 0x0000062d, 0x0000062c, - 0x8000064a, 0x00000645, 0x0000062c, 0x8000064a, - 0x00000641, 0x00000645, 0x8000064a, 0x00000628, - 0x0000062d, 0x8000064a, 0x00000643, 0x00000645, - 0x80000645, 0x00000639, 0x0000062c, 0x80000645, - 0x00000635, 0x00000645, 0x80000645, 0x00000633, - 0x0000062e, 0x8000064a, 0x00000646, 0x0000062c, - 0x8000064a, 0x00000635, 0x00000644, 0x800006d2, - 0x00000642, 0x00000644, 0x800006d2, 0x00000627, - 0x00000644, 0x00000644, 0x80000647, 0x00000627, - 0x00000643, 0x00000628, 0x80000631, 0x00000645, - 0x0000062d, 0x00000645, 0x8000062f, 0x00000635, - 0x00000644, 0x00000639, 0x80000645, 0x00000631, - 0x00000633, 0x00000648, 0x80000644, 0x00000639, - 0x00000644, 0x0000064a, 0x80000647, 0x00000648, - 0x00000633, 0x00000644, 0x80000645, 0x00000635, - 0x00000644, 0x80000649, 0x00000635, 0x00000644, - 0x00000649, 0x00000020, 0x00000627, 0x00000644, - 0x00000644, 0x00000647, 0x00000020, 0x00000639, - 0x00000644, 0x0000064a, 0x00000647, 0x00000020, - 0x00000648, 0x00000633, 0x00000644, 0x80000645, - 0x0000062c, 0x00000644, 0x00000020, 0x0000062c, - 0x00000644, 0x00000627, 0x00000644, 0x80000647, - 0x80002025, 0x80002014, 0x80002013, 0x8000005f, - 0x8000005f, 0x80000028, 0x80000029, 0x8000007b, - 0x8000007d, 0x80003014, 0x80003015, 0x80003010, - 0x80003011, 0x8000300a, 0x8000300b, 0x80003008, - 0x80003009, 0x8000300c, 0x8000300d, 0x8000300e, - 0x8000300f, 0x8000203e, 0x8000203e, 0x8000203e, - 0x8000203e, 0x8000005f, 0x8000005f, 0x8000005f, - 0x8000002c, 0x80003001, 0x8000002e, 0x8000003b, - 0x8000003a, 0x8000003f, 0x80000021, 0x80002014, - 0x80000028, 0x80000029, 0x8000007b, 0x8000007d, - 0x80003014, 0x80003015, 0x80000023, 0x80000026, - 0x8000002a, 0x8000002b, 0x8000002d, 0x8000003c, - 0x8000003e, 0x8000003d, 0x8000005c, 0x80000024, - 0x80000025, 0x80000040, 0x00000020, 0x8000064b, - 0x00000640, 0x8000064b, 0x00000020, 0x8000064c, - 0x00000020, 0x8000064d, 0x00000020, 0x8000064e, - 0x00000640, 0x8000064e, 0x00000020, 0x8000064f, - 0x00000640, 0x8000064f, 0x00000020, 0x80000650, - 0x00000640, 0x80000650, 0x00000020, 0x80000651, - 0x00000640, 0x80000651, 0x00000020, 0x80000652, - 0x00000640, 0x80000652, 0x80000621, 0x80000622, - 0x80000622, 0x80000623, 0x80000623, 0x80000624, - 0x80000624, 0x80000625, 0x80000625, 0x80000626, - 0x80000626, 0x80000626, 0x80000626, 0x80000627, - 0x80000627, 0x80000628, 0x80000628, 0x80000628, - 0x80000628, 0x80000629, 0x80000629, 0x8000062a, - 0x8000062a, 0x8000062a, 0x8000062a, 0x8000062b, - 0x8000062b, 0x8000062b, 0x8000062b, 0x8000062c, - 0x8000062c, 0x8000062c, 0x8000062c, 0x8000062d, - 0x8000062d, 0x8000062d, 0x8000062d, 0x8000062e, - 0x8000062e, 0x8000062e, 0x8000062e, 0x8000062f, - 0x8000062f, 0x80000630, 0x80000630, 0x80000631, - 0x80000631, 0x80000632, 0x80000632, 0x80000633, - 0x80000633, 0x80000633, 0x80000633, 0x80000634, - 0x80000634, 0x80000634, 0x80000634, 0x80000635, - 0x80000635, 0x80000635, 0x80000635, 0x80000636, - 0x80000636, 0x80000636, 0x80000636, 0x80000637, - 0x80000637, 0x80000637, 0x80000637, 0x80000638, - 0x80000638, 0x80000638, 0x80000638, 0x80000639, - 0x80000639, 0x80000639, 0x80000639, 0x8000063a, - 0x8000063a, 0x8000063a, 0x8000063a, 0x80000641, - 0x80000641, 0x80000641, 0x80000641, 0x80000642, - 0x80000642, 0x80000642, 0x80000642, 0x80000643, - 0x80000643, 0x80000643, 0x80000643, 0x80000644, - 0x80000644, 0x80000644, 0x80000644, 0x80000645, - 0x80000645, 0x80000645, 0x80000645, 0x80000646, - 0x80000646, 0x80000646, 0x80000646, 0x80000647, - 0x80000647, 0x80000647, 0x80000647, 0x80000648, - 0x80000648, 0x80000649, 0x80000649, 0x8000064a, - 0x8000064a, 0x8000064a, 0x8000064a, 0x00000644, - 0x80000622, 0x00000644, 0x80000622, 0x00000644, - 0x80000623, 0x00000644, 0x80000623, 0x00000644, - 0x80000625, 0x00000644, 0x80000625, 0x00000644, - 0x80000627, 0x00000644, 0x80000627, 0x80000021, - 0x80000022, 0x80000023, 0x80000024, 0x80000025, - 0x80000026, 0x80000027, 0x80000028, 0x80000029, - 0x8000002a, 0x8000002b, 0x8000002c, 0x8000002d, - 0x8000002e, 0x8000002f, 0x80000030, 0x80000031, - 0x80000032, 0x80000033, 0x80000034, 0x80000035, - 0x80000036, 0x80000037, 0x80000038, 0x80000039, - 0x8000003a, 0x8000003b, 0x8000003c, 0x8000003d, - 0x8000003e, 0x8000003f, 0x80000040, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x8000005b, 0x8000005c, 0x8000005d, - 0x8000005e, 0x8000005f, 0x80000060, 0x80000061, - 0x80000062, 0x80000063, 0x80000064, 0x80000065, - 0x80000066, 0x80000067, 0x80000068, 0x80000069, - 0x8000006a, 0x8000006b, 0x8000006c, 0x8000006d, - 0x8000006e, 0x8000006f, 0x80000070, 0x80000071, - 0x80000072, 0x80000073, 0x80000074, 0x80000075, - 0x80000076, 0x80000077, 0x80000078, 0x80000079, - 0x8000007a, 0x8000007b, 0x8000007c, 0x8000007d, - 0x8000007e, 0x80003002, 0x8000300c, 0x8000300d, - 0x80003001, 0x800030fb, 0x800030f2, 0x800030a1, - 0x800030a3, 0x800030a5, 0x800030a7, 0x800030a9, - 0x800030e3, 0x800030e5, 0x800030e7, 0x800030c3, - 0x800030fc, 0x800030a2, 0x800030a4, 0x800030a6, - 0x800030a8, 0x800030aa, 0x800030ab, 0x800030ad, - 0x800030af, 0x800030b1, 0x800030b3, 0x800030b5, - 0x800030b7, 0x800030b9, 0x800030bb, 0x800030bd, - 0x800030bf, 0x800030c1, 0x800030c4, 0x800030c6, - 0x800030c8, 0x800030ca, 0x800030cb, 0x800030cc, - 0x800030cd, 0x800030ce, 0x800030cf, 0x800030d2, - 0x800030d5, 0x800030d8, 0x800030db, 0x800030de, - 0x800030df, 0x800030e0, 0x800030e1, 0x800030e2, - 0x800030e4, 0x800030e6, 0x800030e8, 0x800030e9, - 0x800030ea, 0x800030eb, 0x800030ec, 0x800030ed, - 0x800030ef, 0x800030f3, 0x80003099, 0x8000309a, - 0x80003164, 0x80003131, 0x80003132, 0x80003133, - 0x80003134, 0x80003135, 0x80003136, 0x80003137, - 0x80003138, 0x80003139, 0x8000313a, 0x8000313b, - 0x8000313c, 0x8000313d, 0x8000313e, 0x8000313f, - 0x80003140, 0x80003141, 0x80003142, 0x80003143, - 0x80003144, 0x80003145, 0x80003146, 0x80003147, - 0x80003148, 0x80003149, 0x8000314a, 0x8000314b, - 0x8000314c, 0x8000314d, 0x8000314e, 0x8000314f, - 0x80003150, 0x80003151, 0x80003152, 0x80003153, - 0x80003154, 0x80003155, 0x80003156, 0x80003157, - 0x80003158, 0x80003159, 0x8000315a, 0x8000315b, - 0x8000315c, 0x8000315d, 0x8000315e, 0x8000315f, - 0x80003160, 0x80003161, 0x80003162, 0x80003163, - 0x800000a2, 0x800000a3, 0x800000ac, 0x800000af, - 0x800000a6, 0x800000a5, 0x800020a9, 0x80002502, - 0x80002190, 0x80002191, 0x80002192, 0x80002193, - 0x800025a0, 0x800025cb, 0x0001d157, 0x8001d165, - 0x0001d158, 0x8001d165, 0x0001d15f, 0x8001d16e, - 0x0001d15f, 0x8001d16f, 0x0001d15f, 0x8001d170, - 0x0001d15f, 0x8001d171, 0x0001d15f, 0x8001d172, - 0x0001d1b9, 0x8001d165, 0x0001d1ba, 0x8001d165, - 0x0001d1bb, 0x8001d16e, 0x0001d1bc, 0x8001d16e, - 0x0001d1bb, 0x8001d16f, 0x0001d1bc, 0x8001d16f, - 0x80000041, 0x80000042, 0x80000043, 0x80000044, - 0x80000045, 0x80000046, 0x80000047, 0x80000048, - 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, - 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, - 0x80000051, 0x80000052, 0x80000053, 0x80000054, - 0x80000055, 0x80000056, 0x80000057, 0x80000058, - 0x80000059, 0x8000005a, 0x80000061, 0x80000062, - 0x80000063, 0x80000064, 0x80000065, 0x80000066, - 0x80000067, 0x80000068, 0x80000069, 0x8000006a, - 0x8000006b, 0x8000006c, 0x8000006d, 0x8000006e, - 0x8000006f, 0x80000070, 0x80000071, 0x80000072, - 0x80000073, 0x80000074, 0x80000075, 0x80000076, - 0x80000077, 0x80000078, 0x80000079, 0x8000007a, - 0x80000041, 0x80000042, 0x80000043, 0x80000044, - 0x80000045, 0x80000046, 0x80000047, 0x80000048, - 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, - 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, - 0x80000051, 0x80000052, 0x80000053, 0x80000054, - 0x80000055, 0x80000056, 0x80000057, 0x80000058, - 0x80000059, 0x8000005a, 0x80000061, 0x80000062, - 0x80000063, 0x80000064, 0x80000065, 0x80000066, - 0x80000067, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000043, 0x80000044, 0x80000047, 0x8000004a, - 0x8000004b, 0x8000004e, 0x8000004f, 0x80000050, - 0x80000051, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000066, 0x80000068, 0x80000069, - 0x8000006a, 0x8000006b, 0x8000006d, 0x8000006e, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000044, 0x80000045, 0x80000046, - 0x80000047, 0x8000004a, 0x8000004b, 0x8000004c, - 0x8000004d, 0x8000004e, 0x8000004f, 0x80000050, - 0x80000051, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x80000061, 0x80000062, 0x80000063, 0x80000064, - 0x80000065, 0x80000066, 0x80000067, 0x80000068, - 0x80000069, 0x8000006a, 0x8000006b, 0x8000006c, - 0x8000006d, 0x8000006e, 0x8000006f, 0x80000070, - 0x80000071, 0x80000072, 0x80000073, 0x80000074, - 0x80000075, 0x80000076, 0x80000077, 0x80000078, - 0x80000079, 0x8000007a, 0x80000041, 0x80000042, - 0x80000044, 0x80000045, 0x80000046, 0x80000047, - 0x80000049, 0x8000004a, 0x8000004b, 0x8000004c, - 0x8000004d, 0x8000004f, 0x80000053, 0x80000054, - 0x80000055, 0x80000056, 0x80000057, 0x80000058, - 0x80000059, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000041, - 0x80000042, 0x80000043, 0x80000044, 0x80000045, - 0x80000046, 0x80000047, 0x80000048, 0x80000049, - 0x8000004a, 0x8000004b, 0x8000004c, 0x8000004d, - 0x8000004e, 0x8000004f, 0x80000050, 0x80000051, - 0x80000052, 0x80000053, 0x80000054, 0x80000055, - 0x80000056, 0x80000057, 0x80000058, 0x80000059, - 0x8000005a, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x80000391, - 0x80000392, 0x80000393, 0x80000394, 0x80000395, - 0x80000396, 0x80000397, 0x80000398, 0x80000399, - 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, - 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, - 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, - 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, - 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, - 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, - 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, - 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, - 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, - 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, - 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, - 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, - 0x800003d6, 0x80000391, 0x80000392, 0x80000393, - 0x80000394, 0x80000395, 0x80000396, 0x80000397, - 0x80000398, 0x80000399, 0x8000039a, 0x8000039b, - 0x8000039c, 0x8000039d, 0x8000039e, 0x8000039f, - 0x800003a0, 0x800003a1, 0x800003f4, 0x800003a3, - 0x800003a4, 0x800003a5, 0x800003a6, 0x800003a7, - 0x800003a8, 0x800003a9, 0x80002207, 0x800003b1, - 0x800003b2, 0x800003b3, 0x800003b4, 0x800003b5, - 0x800003b6, 0x800003b7, 0x800003b8, 0x800003b9, - 0x800003ba, 0x800003bb, 0x800003bc, 0x800003bd, - 0x800003be, 0x800003bf, 0x800003c0, 0x800003c1, - 0x800003c2, 0x800003c3, 0x800003c4, 0x800003c5, - 0x800003c6, 0x800003c7, 0x800003c8, 0x800003c9, - 0x80002202, 0x800003f5, 0x800003d1, 0x800003f0, - 0x800003d5, 0x800003f1, 0x800003d6, 0x80000391, - 0x80000392, 0x80000393, 0x80000394, 0x80000395, - 0x80000396, 0x80000397, 0x80000398, 0x80000399, - 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, - 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, - 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, - 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, - 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, - 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, - 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, - 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, - 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, - 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, - 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, - 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, - 0x800003d6, 0x80000391, 0x80000392, 0x80000393, - 0x80000394, 0x80000395, 0x80000396, 0x80000397, - 0x80000398, 0x80000399, 0x8000039a, 0x8000039b, - 0x8000039c, 0x8000039d, 0x8000039e, 0x8000039f, - 0x800003a0, 0x800003a1, 0x800003f4, 0x800003a3, - 0x800003a4, 0x800003a5, 0x800003a6, 0x800003a7, - 0x800003a8, 0x800003a9, 0x80002207, 0x800003b1, - 0x800003b2, 0x800003b3, 0x800003b4, 0x800003b5, - 0x800003b6, 0x800003b7, 0x800003b8, 0x800003b9, - 0x800003ba, 0x800003bb, 0x800003bc, 0x800003bd, - 0x800003be, 0x800003bf, 0x800003c0, 0x800003c1, - 0x800003c2, 0x800003c3, 0x800003c4, 0x800003c5, - 0x800003c6, 0x800003c7, 0x800003c8, 0x800003c9, - 0x80002202, 0x800003f5, 0x800003d1, 0x800003f0, - 0x800003d5, 0x800003f1, 0x800003d6, 0x80000391, - 0x80000392, 0x80000393, 0x80000394, 0x80000395, - 0x80000396, 0x80000397, 0x80000398, 0x80000399, - 0x8000039a, 0x8000039b, 0x8000039c, 0x8000039d, - 0x8000039e, 0x8000039f, 0x800003a0, 0x800003a1, - 0x800003f4, 0x800003a3, 0x800003a4, 0x800003a5, - 0x800003a6, 0x800003a7, 0x800003a8, 0x800003a9, - 0x80002207, 0x800003b1, 0x800003b2, 0x800003b3, - 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, - 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, - 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, - 0x800003c0, 0x800003c1, 0x800003c2, 0x800003c3, - 0x800003c4, 0x800003c5, 0x800003c6, 0x800003c7, - 0x800003c8, 0x800003c9, 0x80002202, 0x800003f5, - 0x800003d1, 0x800003f0, 0x800003d5, 0x800003f1, - 0x800003d6, 0x80000030, 0x80000031, 0x80000032, - 0x80000033, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x80000030, - 0x80000031, 0x80000032, 0x80000033, 0x80000034, - 0x80000035, 0x80000036, 0x80000037, 0x80000038, - 0x80000039, 0x80000030, 0x80000031, 0x80000032, - 0x80000033, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x80000030, - 0x80000031, 0x80000032, 0x80000033, 0x80000034, - 0x80000035, 0x80000036, 0x80000037, 0x80000038, - 0x80000039, 0x80000030, 0x80000031, 0x80000032, - 0x80000033, 0x80000034, 0x80000035, 0x80000036, - 0x80000037, 0x80000038, 0x80000039, 0x80004e3d, - 0x80004e38, 0x80004e41, 0x80020122, 0x80004f60, - 0x80004fae, 0x80004fbb, 0x80005002, 0x8000507a, - 0x80005099, 0x800050e7, 0x800050cf, 0x8000349e, - 0x8002063a, 0x8000514d, 0x80005154, 0x80005164, - 0x80005177, 0x8002051c, 0x800034b9, 0x80005167, - 0x8000518d, 0x8002054b, 0x80005197, 0x800051a4, - 0x80004ecc, 0x800051ac, 0x800051b5, 0x800291df, - 0x800051f5, 0x80005203, 0x800034df, 0x8000523b, - 0x80005246, 0x80005272, 0x80005277, 0x80003515, - 0x800052c7, 0x800052c9, 0x800052e4, 0x800052fa, - 0x80005305, 0x80005306, 0x80005317, 0x80005349, - 0x80005351, 0x8000535a, 0x80005373, 0x8000537d, - 0x8000537f, 0x8000537f, 0x8000537f, 0x80020a2c, - 0x80007070, 0x800053ca, 0x800053df, 0x80020b63, - 0x800053eb, 0x800053f1, 0x80005406, 0x8000549e, - 0x80005438, 0x80005448, 0x80005468, 0x800054a2, - 0x800054f6, 0x80005510, 0x80005553, 0x80005563, - 0x80005584, 0x80005584, 0x80005599, 0x800055ab, - 0x800055b3, 0x800055c2, 0x80005716, 0x80005606, - 0x80005717, 0x80005651, 0x80005674, 0x80005207, - 0x800058ee, 0x800057ce, 0x800057f4, 0x8000580d, - 0x8000578b, 0x80005832, 0x80005831, 0x800058ac, - 0x800214e4, 0x800058f2, 0x800058f7, 0x80005906, - 0x8000591a, 0x80005922, 0x80005962, 0x800216a8, - 0x800216ea, 0x800059ec, 0x80005a1b, 0x80005a27, - 0x800059d8, 0x80005a66, 0x800036ee, 0x8002136a, - 0x80005b08, 0x80005b3e, 0x80005b3e, 0x800219c8, - 0x80005bc3, 0x80005bd8, 0x80005be7, 0x80005bf3, - 0x80021b18, 0x80005bff, 0x80005c06, 0x80005f33, - 0x80005c22, 0x80003781, 0x80005c60, 0x80005c6e, - 0x80005cc0, 0x80005c8d, 0x80021de4, 0x80005d43, - 0x80021de6, 0x80005d6e, 0x80005d6b, 0x80005d7c, - 0x80005de1, 0x80005de2, 0x8000382f, 0x80005dfd, - 0x80005e28, 0x80005e3d, 0x80005e69, 0x80003862, - 0x80022183, 0x8000387c, 0x80005eb0, 0x80005eb3, - 0x80005eb6, 0x80005eca, 0x8002a392, 0x80005efe, - 0x80022331, 0x80022331, 0x80008201, 0x80005f22, - 0x80005f22, 0x800038c7, 0x800232b8, 0x800261da, - 0x80005f62, 0x80005f6b, 0x800038e3, 0x80005f9a, - 0x80005fcd, 0x80005fd7, 0x80005ff9, 0x80006081, - 0x8000393a, 0x8000391c, 0x80006094, 0x800226d4, - 0x800060c7, 0x80006148, 0x8000614c, 0x8000614e, - 0x8000614c, 0x8000617a, 0x8000618e, 0x800061b2, - 0x800061a4, 0x800061af, 0x800061de, 0x800061f2, - 0x800061f6, 0x80006210, 0x8000621b, 0x8000625d, - 0x800062b1, 0x800062d4, 0x80006350, 0x80022b0c, - 0x8000633d, 0x800062fc, 0x80006368, 0x80006383, - 0x800063e4, 0x80022bf1, 0x80006422, 0x800063c5, - 0x800063a9, 0x80003a2e, 0x80006469, 0x8000647e, - 0x8000649d, 0x80006477, 0x80003a6c, 0x8000654f, - 0x8000656c, 0x8002300a, 0x800065e3, 0x800066f8, - 0x80006649, 0x80003b19, 0x80006691, 0x80003b08, - 0x80003ae4, 0x80005192, 0x80005195, 0x80006700, - 0x8000669c, 0x800080ad, 0x800043d9, 0x80006717, - 0x8000671b, 0x80006721, 0x8000675e, 0x80006753, - 0x800233c3, 0x80003b49, 0x800067fa, 0x80006785, - 0x80006852, 0x80006885, 0x8002346d, 0x8000688e, - 0x8000681f, 0x80006914, 0x80003b9d, 0x80006942, - 0x800069a3, 0x800069ea, 0x80006aa8, 0x800236a3, - 0x80006adb, 0x80003c18, 0x80006b21, 0x800238a7, - 0x80006b54, 0x80003c4e, 0x80006b72, 0x80006b9f, - 0x80006bba, 0x80006bbb, 0x80023a8d, 0x80021d0b, - 0x80023afa, 0x80006c4e, 0x80023cbc, 0x80006cbf, - 0x80006ccd, 0x80006c67, 0x80006d16, 0x80006d3e, - 0x80006d77, 0x80006d41, 0x80006d69, 0x80006d78, - 0x80006d85, 0x80023d1e, 0x80006d34, 0x80006e2f, - 0x80006e6e, 0x80003d33, 0x80006ecb, 0x80006ec7, - 0x80023ed1, 0x80006df9, 0x80006f6e, 0x80023f5e, - 0x80023f8e, 0x80006fc6, 0x80007039, 0x8000701e, - 0x8000701b, 0x80003d96, 0x8000704a, 0x8000707d, - 0x80007077, 0x800070ad, 0x80020525, 0x80007145, - 0x80024263, 0x8000719c, 0x800043ab, 0x80007228, - 0x80007235, 0x80007250, 0x80024608, 0x80007280, - 0x80007295, 0x80024735, 0x80024814, 0x8000737a, - 0x8000738b, 0x80003eac, 0x800073a5, 0x80003eb8, - 0x80003eb8, 0x80007447, 0x8000745c, 0x80007471, - 0x80007485, 0x800074ca, 0x80003f1b, 0x80007524, - 0x80024c36, 0x8000753e, 0x80024c92, 0x80007570, - 0x8002219f, 0x80007610, 0x80024fa1, 0x80024fb8, - 0x80025044, 0x80003ffc, 0x80004008, 0x800076f4, - 0x800250f3, 0x800250f2, 0x80025119, 0x80025133, - 0x8000771e, 0x8000771f, 0x8000771f, 0x8000774a, - 0x80004039, 0x8000778b, 0x80004046, 0x80004096, - 0x8002541d, 0x8000784e, 0x8000788c, 0x800078cc, - 0x800040e3, 0x80025626, 0x80007956, 0x8002569a, - 0x800256c5, 0x8000798f, 0x800079eb, 0x8000412f, - 0x80007a40, 0x80007a4a, 0x80007a4f, 0x8002597c, - 0x80025aa7, 0x80025aa7, 0x80007aae, 0x80004202, - 0x80025bab, 0x80007bc6, 0x80007bc9, 0x80004227, - 0x80025c80, 0x80007cd2, 0x800042a0, 0x80007ce8, - 0x80007ce3, 0x80007d00, 0x80025f86, 0x80007d63, - 0x80004301, 0x80007dc7, 0x80007e02, 0x80007e45, - 0x80004334, 0x80026228, 0x80026247, 0x80004359, - 0x800262d9, 0x80007f7a, 0x8002633e, 0x80007f95, - 0x80007ffa, 0x80008005, 0x800264da, 0x80026523, - 0x80008060, 0x800265a8, 0x80008070, 0x8002335f, - 0x800043d5, 0x800080b2, 0x80008103, 0x8000440b, - 0x8000813e, 0x80005ab5, 0x800267a7, 0x800267b5, - 0x80023393, 0x8002339c, 0x80008201, 0x80008204, - 0x80008f9e, 0x8000446b, 0x80008291, 0x8000828b, - 0x8000829d, 0x800052b3, 0x800082b1, 0x800082b3, - 0x800082bd, 0x800082e6, 0x80026b3c, 0x800082e5, - 0x8000831d, 0x80008363, 0x800083ad, 0x80008323, - 0x800083bd, 0x800083e7, 0x80008457, 0x80008353, - 0x800083ca, 0x800083cc, 0x800083dc, 0x80026c36, - 0x80026d6b, 0x80026cd5, 0x8000452b, 0x800084f1, - 0x800084f3, 0x80008516, 0x800273ca, 0x80008564, - 0x80026f2c, 0x8000455d, 0x80004561, 0x80026fb1, - 0x800270d2, 0x8000456b, 0x80008650, 0x8000865c, - 0x80008667, 0x80008669, 0x800086a9, 0x80008688, - 0x8000870e, 0x800086e2, 0x80008779, 0x80008728, - 0x8000876b, 0x80008786, 0x80004d57, 0x800087e1, - 0x80008801, 0x800045f9, 0x80008860, 0x80008863, - 0x80027667, 0x800088d7, 0x800088de, 0x80004635, - 0x800088fa, 0x800034bb, 0x800278ae, 0x80027966, - 0x800046be, 0x800046c7, 0x80008aa0, 0x80008aed, - 0x80008b8a, 0x80008c55, 0x80027ca8, 0x80008cab, - 0x80008cc1, 0x80008d1b, 0x80008d77, 0x80027f2f, - 0x80020804, 0x80008dcb, 0x80008dbc, 0x80008df0, - 0x800208de, 0x80008ed4, 0x80008f38, 0x800285d2, - 0x800285ed, 0x80009094, 0x800090f1, 0x80009111, - 0x8002872e, 0x8000911b, 0x80009238, 0x800092d7, - 0x800092d8, 0x8000927c, 0x800093f9, 0x80009415, - 0x80028bfa, 0x8000958b, 0x80004995, 0x800095b7, - 0x80028d77, 0x800049e6, 0x800096c3, 0x80005db2, - 0x80009723, 0x80029145, 0x8002921a, 0x80004a6e, - 0x80004a76, 0x800097e0, 0x8002940a, 0x80004ab2, - 0x80029496, 0x8000980b, 0x8000980b, 0x80009829, - 0x800295b6, 0x800098e2, 0x80004b33, 0x80009929, - 0x800099a7, 0x800099c2, 0x800099fe, 0x80004bce, - 0x80029b30, 0x80009b12, 0x80009c40, 0x80009cfd, - 0x80004cce, 0x80004ced, 0x80009d67, 0x8002a0ce, - 0x80004cf8, 0x8002a105, 0x8002a20e, 0x8002a291, - 0x80009ebb, 0x80004d56, 0x80009ef9, 0x80009efe, - 0x80009f05, 0x80009f0f, 0x80009f16, 0x80009f3b, - 0x8002a600, -}; - - -/* - * Lowercase <-> Uppercase mapping - */ - -/* - * Flags for special case mapping. - */ -#define CMF_FINAL 1 -#define CMF_NONFINAL 2 -#define CMF_LAST 16 -#define CMF_CTXDEP (CMF_FINAL|CMF_NONFINAL) - -#define CASEMAP_BITS_0 9 -#define CASEMAP_BITS_1 7 -#define CASEMAP_BITS_2 5 - -static const unsigned short v310_toupper_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 912, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 0, 1, 0, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 0, 0, 0, - 0, 0, 18, 0, 19, 20, 21, 22, - 0, 23, 24, 25, 26, 27, 28, 29, - 0, 0, 0, 30, 31, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 49, 50, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 51, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 52, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 54, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v310_toupper_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - }}, - {{ - 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, - 102, 0, 104, 106, 108, 110, 112, 114, 116, 118, - }}, - {{ - 0, 120, 0, 122, 0, 124, 0, 126, 0, 128, 0, - 130, 0, 132, 0, 134, 0, 136, 0, 138, 0, 140, - 0, 142, 0, 144, 0, 146, 0, 148, 0, 150, - }}, - {{ - 0, 152, 0, 154, 0, 156, 0, 158, 0, 160, 0, - 162, 0, 164, 0, 166, 0, 168, 0, 170, 0, 172, - 0, 174, 0, 0, 176, 0, 178, 0, 180, 0, - }}, - {{ - 182, 0, 184, 0, 186, 0, 188, 0, 190, 192, 0, - 195, 0, 197, 0, 199, 0, 201, 0, 203, 0, 205, - 0, 207, 0, 209, 0, 211, 0, 213, 0, 215, - }}, - {{ - 0, 217, 0, 219, 0, 221, 0, 223, 0, 225, 0, - 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, - 0, 239, 0, 0, 241, 0, 243, 0, 245, 247, - }}, - {{ - 0, 0, 0, 249, 0, 251, 0, 0, 253, 0, 0, - 0, 255, 0, 0, 0, 0, 0, 257, 0, 0, 259, - 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 263, 0, 265, 0, 267, 0, 0, 269, 0, 0, - 0, 0, 271, 0, 0, 273, 0, 0, 0, 275, 0, - 277, 0, 0, 279, 0, 0, 0, 281, 0, 283, - }}, - {{ - 0, 0, 0, 0, 0, 285, 287, 0, 289, 291, 0, - 293, 295, 0, 297, 0, 299, 0, 301, 0, 303, 0, - 305, 0, 307, 0, 309, 0, 311, 313, 0, 315, - }}, - {{ - 0, 317, 0, 319, 0, 321, 0, 323, 0, 325, 0, - 327, 0, 329, 0, 331, 333, 0, 336, 338, 0, 340, - 0, 0, 0, 342, 0, 344, 0, 346, 0, 348, - }}, - {{ - 0, 350, 0, 352, 0, 354, 0, 356, 0, 358, 0, - 360, 0, 362, 0, 364, 0, 366, 0, 368, 0, 370, - 0, 372, 0, 374, 0, 376, 0, 378, 0, 380, - }}, - {{ - 0, 0, 0, 382, 0, 384, 0, 386, 0, 388, 0, - 390, 0, 392, 0, 394, 0, 396, 0, 398, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 400, 402, 0, - 404, 406, 0, 408, 0, 410, 0, 0, 0, 0, - }}, - {{ - 412, 0, 0, 414, 0, 0, 0, 0, 416, 418, 0, - 0, 0, 0, 0, 420, 0, 0, 422, 0, 0, 424, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 426, 0, 0, 428, 0, 0, 0, 0, 430, 0, 432, - 434, 0, 0, 0, 0, 0, 0, 436, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 444, 446, 448, 450, 452, 456, 458, 460, 462, 464, - 466, 468, 470, 472, 474, 476, 478, 480, 482, 484, - }}, - {{ - 486, 488, 490, 492, 494, 496, 498, 500, 502, 504, 506, - 508, 510, 512, 514, 0, 516, 518, 0, 0, 0, 520, - 522, 0, 0, 0, 0, 524, 0, 526, 0, 528, - }}, - {{ - 0, 530, 0, 532, 0, 534, 0, 536, 0, 538, 0, - 540, 0, 542, 0, 544, 546, 548, 550, 0, 0, 552, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 554, 556, 558, 560, 562, 564, - 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, - }}, - {{ - 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, 606, - 608, 610, 612, 614, 616, 618, 620, 622, 624, 626, 628, - 630, 632, 634, 636, 638, 640, 642, 644, 646, 648, - }}, - {{ - 0, 650, 0, 652, 0, 654, 0, 656, 0, 658, 0, - 660, 0, 662, 0, 664, 0, 666, 0, 668, 0, 670, - 0, 672, 0, 674, 0, 676, 0, 678, 0, 680, - }}, - {{ - 0, 682, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 684, 0, 686, 0, 688, 0, 690, 0, 692, - 0, 694, 0, 696, 0, 698, 0, 700, 0, 702, - }}, - {{ - 0, 704, 0, 706, 0, 708, 0, 710, 0, 712, 0, - 714, 0, 716, 0, 718, 0, 720, 0, 722, 0, 724, - 0, 726, 0, 728, 0, 730, 0, 732, 0, 734, - }}, - {{ - 0, 0, 736, 0, 738, 0, 0, 0, 740, 0, 0, - 0, 742, 0, 0, 0, 0, 744, 0, 746, 0, 748, - 0, 750, 0, 752, 0, 754, 0, 756, 0, 758, - }}, - {{ - 0, 760, 0, 762, 0, 764, 0, 766, 0, 768, 0, - 770, 0, 772, 0, 774, 0, 776, 0, 778, 0, 780, - 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 784, 786, 788, 790, 792, 794, 796, 798, 800, 802, - 804, 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, - 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, - }}, - {{ - 846, 848, 850, 852, 854, 856, 858, 860, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 863, 0, 865, 0, 867, 0, 869, 0, 871, 0, - 873, 0, 875, 0, 877, 0, 879, 0, 881, 0, 883, - 0, 885, 0, 887, 0, 889, 0, 891, 0, 893, - }}, - {{ - 0, 895, 0, 897, 0, 899, 0, 901, 0, 903, 0, - 905, 0, 907, 0, 909, 0, 911, 0, 913, 0, 915, - 0, 917, 0, 919, 0, 921, 0, 923, 0, 925, - }}, - {{ - 0, 927, 0, 929, 0, 931, 0, 933, 0, 935, 0, - 937, 0, 939, 0, 941, 0, 943, 0, 945, 0, 947, - 0, 949, 0, 951, 0, 953, 0, 955, 0, 957, - }}, - {{ - 0, 959, 0, 961, 0, 963, 0, 965, 0, 967, 0, - 969, 0, 971, 0, 973, 0, 975, 0, 977, 0, 979, - 0, 981, 0, 983, 0, 985, 0, 987, 0, 989, - }}, - {{ - 0, 991, 0, 993, 0, 995, 0, 997, 0, 999, 0, - 1001, 0, 1003, 0, 1005, 0, 1007, 0, 1009, 0, 1011, - 1013, 1016, 1019, 1022, 1025, 1028, 0, 0, 0, 0, - }}, - {{ - 0, 1030, 0, 1032, 0, 1034, 0, 1036, 0, 1038, 0, - 1040, 0, 1042, 0, 1044, 0, 1046, 0, 1048, 0, 1050, - 0, 1052, 0, 1054, 0, 1056, 0, 1058, 0, 1060, - }}, - {{ - 0, 1062, 0, 1064, 0, 1066, 0, 1068, 0, 1070, 0, - 1072, 0, 1074, 0, 1076, 0, 1078, 0, 1080, 0, 1082, - 0, 1084, 0, 1086, 0, 1088, 0, 1090, 0, 1092, - }}, - {{ - 0, 1094, 0, 1096, 0, 1098, 0, 1100, 0, 1102, 0, - 1104, 0, 1106, 0, 1108, 0, 1110, 0, 1112, 0, 1114, - 0, 1116, 0, 1118, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 0, 0, 0, - 0, 0, 0, 0, 0, 1136, 1138, 1140, 1142, 1144, 1146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1162, 0, 0, 0, - 0, 0, 0, 0, 0, 1164, 1166, 1168, 1170, 1172, 1174, - 1176, 1178, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1180, 1182, 1184, 1186, 1188, 1190, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1192, 1195, 1197, 1201, 1203, 1207, - 1209, 1213, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1215, 1217, 1219, 1221, 1223, 1225, 1227, 1229, 0, 0, 0, - 0, 0, 0, 0, 0, 1231, 1233, 1235, 1237, 1239, 1241, - 1243, 1245, 1247, 1249, 1251, 1253, 1255, 1257, 0, 0, - }}, - {{ - 1259, 1264, 1269, 1274, 1279, 1284, 1289, 1294, 1299, 1302, 1305, - 1308, 1311, 1314, 1317, 1320, 1323, 1328, 1333, 1338, 1343, 1348, - 1353, 1358, 1363, 1366, 1369, 1372, 1375, 1378, 1381, 1384, - }}, - {{ - 1387, 1392, 1397, 1402, 1407, 1412, 1417, 1422, 1427, 1430, 1433, - 1436, 1439, 1442, 1445, 1448, 1451, 1453, 1455, 1458, 1463, 0, - 1466, 1469, 0, 0, 0, 0, 1473, 0, 1476, 0, - }}, - {{ - 0, 0, 1478, 1481, 1486, 0, 1489, 1492, 0, 0, 0, - 0, 1496, 0, 0, 0, 1499, 1501, 1503, 1507, 0, 0, - 1511, 1514, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1518, 1520, 1522, 1526, 1530, 1533, 1535, 1538, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1542, 1545, 1550, 0, - 1553, 1556, 0, 0, 0, 0, 1560, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1563, 1565, 1567, 1569, 1571, 1573, - 1575, 1577, 1579, 1581, 1583, 1585, 1587, 1589, 1591, 1593, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1595, 1597, 1599, 1601, 1603, 1605, - 1607, 1609, 1611, 1613, 1615, 1617, 1619, 1621, 1623, 1625, - }}, - {{ - 1627, 1629, 1631, 1633, 1635, 1637, 1639, 1641, 1643, 1645, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1647, 1650, 1653, 1656, 1660, 1664, 1667, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1670, 1673, 1676, - 1679, 1682, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699, 1701, 1703, - 1705, 1707, 1709, 1711, 1713, 1715, 1717, 1719, 1721, 1723, 1725, - 1727, 1729, 1731, 1733, 1735, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1737, 1739, 1741, - 1743, 1745, 1747, 1749, 1751, 1753, 1755, 1757, 1759, 1761, 1763, - 1765, 1767, 1769, 1771, 1773, 1775, 1777, 1779, 1781, 1783, - }}, - {{ - 1785, 1787, 1789, 1791, 1793, 1795, 1797, 1799, 1801, 1803, 1805, - 1807, 1809, 1811, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned short v310_tolower_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 912, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 1, 0, 0, 0, 2, 0, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, - 17, 18, 0, 19, 20, 21, 22, 23, - 0, 24, 25, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 42, 0, 43, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 44, 45, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 47, 48, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v310_tolower_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, - 43, 45, 47, 49, 51, 0, 0, 0, 0, 0, - }}, - {{ - 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, - 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, - 97, 0, 99, 101, 103, 105, 107, 109, 111, 0, - }}, - {{ - 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, - 0, 125, 0, 127, 0, 129, 0, 131, 0, 133, 0, - 135, 0, 137, 0, 139, 0, 141, 0, 143, 0, - }}, - {{ - 145, 0, 147, 0, 149, 0, 151, 0, 153, 0, 155, - 0, 157, 0, 159, 0, 161, 0, 163, 0, 165, 0, - 167, 0, 0, 169, 0, 171, 0, 173, 0, 175, - }}, - {{ - 0, 177, 0, 179, 0, 181, 0, 183, 0, 0, 185, - 0, 187, 0, 189, 0, 191, 0, 193, 0, 195, 0, - 197, 0, 199, 0, 201, 0, 203, 0, 205, 0, - }}, - {{ - 207, 0, 209, 0, 211, 0, 213, 0, 215, 0, 217, - 0, 219, 0, 221, 0, 223, 0, 225, 0, 227, 0, - 229, 0, 231, 233, 0, 235, 0, 237, 0, 0, - }}, - {{ - 0, 239, 241, 0, 243, 0, 245, 247, 0, 249, 251, - 253, 0, 0, 255, 257, 259, 261, 0, 263, 265, 0, - 267, 269, 271, 0, 0, 0, 273, 275, 0, 277, - }}, - {{ - 279, 0, 281, 0, 283, 0, 285, 287, 0, 289, 0, - 0, 291, 0, 293, 295, 0, 297, 299, 301, 0, 303, - 0, 305, 307, 0, 0, 0, 309, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 311, 313, 0, 315, 317, 0, 319, - 321, 0, 323, 0, 325, 0, 327, 0, 329, 0, 331, - 0, 333, 0, 335, 0, 337, 0, 0, 339, 0, - }}, - {{ - 341, 0, 343, 0, 345, 0, 347, 0, 349, 0, 351, - 0, 353, 0, 355, 0, 0, 357, 359, 0, 361, 0, - 363, 365, 367, 0, 369, 0, 371, 0, 373, 0, - }}, - {{ - 375, 0, 377, 0, 379, 0, 381, 0, 383, 0, 385, - 0, 387, 0, 389, 0, 391, 0, 393, 0, 395, 0, - 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, - }}, - {{ - 0, 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, - 0, 417, 0, 419, 0, 421, 0, 423, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 425, 0, 427, 429, 431, - 0, 433, 0, 435, 437, 0, 439, 441, 443, 445, 447, - 449, 451, 453, 455, 457, 459, 461, 463, 465, 467, - }}, - {{ - 469, 471, 0, 473, 477, 479, 481, 483, 485, 487, 489, - 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 493, 0, 495, 0, 497, 0, - }}, - {{ - 499, 0, 501, 0, 503, 0, 505, 0, 507, 0, 509, - 0, 511, 0, 513, 0, 0, 0, 0, 0, 515, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, - 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, 577, 579, - }}, - {{ - 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, 601, - 603, 605, 607, 609, 611, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 613, 0, 615, 0, 617, 0, 619, 0, 621, 0, 623, - 0, 625, 0, 627, 0, 629, 0, 631, 0, 633, 0, - 635, 0, 637, 0, 639, 0, 641, 0, 643, 0, - }}, - {{ - 645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 647, 0, 649, 0, 651, 0, 653, 0, 655, 0, - 657, 0, 659, 0, 661, 0, 663, 0, 665, 0, - }}, - {{ - 667, 0, 669, 0, 671, 0, 673, 0, 675, 0, 677, - 0, 679, 0, 681, 0, 683, 0, 685, 0, 687, 0, - 689, 0, 691, 0, 693, 0, 695, 0, 697, 0, - }}, - {{ - 0, 699, 0, 701, 0, 0, 0, 703, 0, 0, 0, - 705, 0, 0, 0, 0, 707, 0, 709, 0, 711, 0, - 713, 0, 715, 0, 717, 0, 719, 0, 721, 0, - }}, - {{ - 723, 0, 725, 0, 727, 0, 729, 0, 731, 0, 733, - 0, 735, 0, 737, 0, 739, 0, 741, 0, 743, 0, - 0, 0, 745, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 747, 749, 751, 753, 755, - 757, 759, 761, 763, 765, 767, 769, 771, 773, 775, - }}, - {{ - 777, 779, 781, 783, 785, 787, 789, 791, 793, 795, 797, - 799, 801, 803, 805, 807, 809, 811, 813, 815, 817, 819, - 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 823, 0, 825, 0, 827, 0, 829, 0, 831, 0, 833, - 0, 835, 0, 837, 0, 839, 0, 841, 0, 843, 0, - 845, 0, 847, 0, 849, 0, 851, 0, 853, 0, - }}, - {{ - 855, 0, 857, 0, 859, 0, 861, 0, 863, 0, 865, - 0, 867, 0, 869, 0, 871, 0, 873, 0, 875, 0, - 877, 0, 879, 0, 881, 0, 883, 0, 885, 0, - }}, - {{ - 887, 0, 889, 0, 891, 0, 893, 0, 895, 0, 897, - 0, 899, 0, 901, 0, 903, 0, 905, 0, 907, 0, - 909, 0, 911, 0, 913, 0, 915, 0, 917, 0, - }}, - {{ - 919, 0, 921, 0, 923, 0, 925, 0, 927, 0, 929, - 0, 931, 0, 933, 0, 935, 0, 937, 0, 939, 0, - 941, 0, 943, 0, 945, 0, 947, 0, 949, 0, - }}, - {{ - 951, 0, 953, 0, 955, 0, 957, 0, 959, 0, 961, - 0, 963, 0, 965, 0, 967, 0, 969, 0, 971, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 973, 0, 975, 0, 977, 0, 979, 0, 981, 0, 983, - 0, 985, 0, 987, 0, 989, 0, 991, 0, 993, 0, - 995, 0, 997, 0, 999, 0, 1001, 0, 1003, 0, - }}, - {{ - 1005, 0, 1007, 0, 1009, 0, 1011, 0, 1013, 0, 1015, - 0, 1017, 0, 1019, 0, 1021, 0, 1023, 0, 1025, 0, - 1027, 0, 1029, 0, 1031, 0, 1033, 0, 1035, 0, - }}, - {{ - 1037, 0, 1039, 0, 1041, 0, 1043, 0, 1045, 0, 1047, - 0, 1049, 0, 1051, 0, 1053, 0, 1055, 0, 1057, 0, - 1059, 0, 1061, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1063, 1065, 1067, - 1069, 1071, 1073, 1075, 1077, 0, 0, 0, 0, 0, 0, - 0, 0, 1079, 1081, 1083, 1085, 1087, 1089, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1091, 1093, 1095, - 1097, 1099, 1101, 1103, 1105, 0, 0, 0, 0, 0, 0, - 0, 0, 1107, 1109, 1111, 1113, 1115, 1117, 1119, 1121, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1123, 1125, 1127, - 1129, 1131, 1133, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1135, 0, 1137, 0, 1139, 0, 1141, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1143, 1145, 1147, - 1149, 1151, 1153, 1155, 1157, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1159, 1163, 1167, - 1171, 1175, 1179, 1183, 1187, 0, 0, 0, 0, 0, 0, - 0, 0, 1191, 1195, 1199, 1203, 1207, 1211, 1215, 1219, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1223, 1227, 1231, - 1235, 1239, 1243, 1247, 1251, 0, 0, 0, 0, 0, 0, - 0, 0, 1255, 1257, 1259, 1261, 1263, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1267, 1269, 1271, - 1273, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1279, 1281, 1283, 1285, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 1287, 1289, 1291, - 1293, 1295, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1297, 1299, 1301, 1303, 1305, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 1309, 0, 0, 0, 1311, - 1313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1315, 1317, 1319, 1321, 1323, 1325, 1327, 1329, 1331, 1333, 1335, - 1337, 1339, 1341, 1343, 1345, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1347, 1349, 1351, 1353, 1355, 1357, 1359, 1361, 1363, 1365, - }}, - {{ - 1367, 1369, 1371, 1373, 1375, 1377, 1379, 1381, 1383, 1385, 1387, - 1389, 1391, 1393, 1395, 1397, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1399, 1401, 1403, 1405, 1407, 1409, 1411, 1413, 1415, 1417, - 1419, 1421, 1423, 1425, 1427, 1429, 1431, 1433, 1435, 1437, 1439, - 1441, 1443, 1445, 1447, 1449, 0, 0, 0, 0, 0, - }}, - {{ - 1451, 1453, 1455, 1457, 1459, 1461, 1463, 1465, 1467, 1469, 1471, - 1473, 1475, 1477, 1479, 1481, 1483, 1485, 1487, 1489, 1491, 1493, - 1495, 1497, 1499, 1501, 1503, 1505, 1507, 1509, 1511, 1513, - }}, - {{ - 1515, 1517, 1519, 1521, 1523, 1525, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned long v310_toupper_seq[] = { - 0x00000000, 0x00000010, 0x80000041, 0x00000010, - 0x80000042, 0x00000010, 0x80000043, 0x00000010, - 0x80000044, 0x00000010, 0x80000045, 0x00000010, - 0x80000046, 0x00000010, 0x80000047, 0x00000010, - 0x80000048, 0x00000010, 0x80000049, 0x00000010, - 0x8000004a, 0x00000010, 0x8000004b, 0x00000010, - 0x8000004c, 0x00000010, 0x8000004d, 0x00000010, - 0x8000004e, 0x00000010, 0x8000004f, 0x00000010, - 0x80000050, 0x00000010, 0x80000051, 0x00000010, - 0x80000052, 0x00000010, 0x80000053, 0x00000010, - 0x80000054, 0x00000010, 0x80000055, 0x00000010, - 0x80000056, 0x00000010, 0x80000057, 0x00000010, - 0x80000058, 0x00000010, 0x80000059, 0x00000010, - 0x8000005a, 0x00000010, 0x8000039c, 0x00000010, - 0x00000053, 0x80000053, 0x00000010, 0x800000c0, - 0x00000010, 0x800000c1, 0x00000010, 0x800000c2, - 0x00000010, 0x800000c3, 0x00000010, 0x800000c4, - 0x00000010, 0x800000c5, 0x00000010, 0x800000c6, - 0x00000010, 0x800000c7, 0x00000010, 0x800000c8, - 0x00000010, 0x800000c9, 0x00000010, 0x800000ca, - 0x00000010, 0x800000cb, 0x00000010, 0x800000cc, - 0x00000010, 0x800000cd, 0x00000010, 0x800000ce, - 0x00000010, 0x800000cf, 0x00000010, 0x800000d0, - 0x00000010, 0x800000d1, 0x00000010, 0x800000d2, - 0x00000010, 0x800000d3, 0x00000010, 0x800000d4, - 0x00000010, 0x800000d5, 0x00000010, 0x800000d6, - 0x00000010, 0x800000d8, 0x00000010, 0x800000d9, - 0x00000010, 0x800000da, 0x00000010, 0x800000db, - 0x00000010, 0x800000dc, 0x00000010, 0x800000dd, - 0x00000010, 0x800000de, 0x00000010, 0x80000178, - 0x00000010, 0x80000100, 0x00000010, 0x80000102, - 0x00000010, 0x80000104, 0x00000010, 0x80000106, - 0x00000010, 0x80000108, 0x00000010, 0x8000010a, - 0x00000010, 0x8000010c, 0x00000010, 0x8000010e, - 0x00000010, 0x80000110, 0x00000010, 0x80000112, - 0x00000010, 0x80000114, 0x00000010, 0x80000116, - 0x00000010, 0x80000118, 0x00000010, 0x8000011a, - 0x00000010, 0x8000011c, 0x00000010, 0x8000011e, - 0x00000010, 0x80000120, 0x00000010, 0x80000122, - 0x00000010, 0x80000124, 0x00000010, 0x80000126, - 0x00000010, 0x80000128, 0x00000010, 0x8000012a, - 0x00000010, 0x8000012c, 0x00000010, 0x8000012e, - 0x00000010, 0x80000049, 0x00000010, 0x80000132, - 0x00000010, 0x80000134, 0x00000010, 0x80000136, - 0x00000010, 0x80000139, 0x00000010, 0x8000013b, - 0x00000010, 0x8000013d, 0x00000010, 0x8000013f, - 0x00000010, 0x80000141, 0x00000010, 0x80000143, - 0x00000010, 0x80000145, 0x00000010, 0x80000147, - 0x00000010, 0x000002bc, 0x8000004e, 0x00000010, - 0x8000014a, 0x00000010, 0x8000014c, 0x00000010, - 0x8000014e, 0x00000010, 0x80000150, 0x00000010, - 0x80000152, 0x00000010, 0x80000154, 0x00000010, - 0x80000156, 0x00000010, 0x80000158, 0x00000010, - 0x8000015a, 0x00000010, 0x8000015c, 0x00000010, - 0x8000015e, 0x00000010, 0x80000160, 0x00000010, - 0x80000162, 0x00000010, 0x80000164, 0x00000010, - 0x80000166, 0x00000010, 0x80000168, 0x00000010, - 0x8000016a, 0x00000010, 0x8000016c, 0x00000010, - 0x8000016e, 0x00000010, 0x80000170, 0x00000010, - 0x80000172, 0x00000010, 0x80000174, 0x00000010, - 0x80000176, 0x00000010, 0x80000179, 0x00000010, - 0x8000017b, 0x00000010, 0x8000017d, 0x00000010, - 0x80000053, 0x00000010, 0x80000182, 0x00000010, - 0x80000184, 0x00000010, 0x80000187, 0x00000010, - 0x8000018b, 0x00000010, 0x80000191, 0x00000010, - 0x800001f6, 0x00000010, 0x80000198, 0x00000010, - 0x800001a0, 0x00000010, 0x800001a2, 0x00000010, - 0x800001a4, 0x00000010, 0x800001a7, 0x00000010, - 0x800001ac, 0x00000010, 0x800001af, 0x00000010, - 0x800001b3, 0x00000010, 0x800001b5, 0x00000010, - 0x800001b8, 0x00000010, 0x800001bc, 0x00000010, - 0x800001f7, 0x00000010, 0x800001c4, 0x00000010, - 0x800001c4, 0x00000010, 0x800001c7, 0x00000010, - 0x800001c7, 0x00000010, 0x800001ca, 0x00000010, - 0x800001ca, 0x00000010, 0x800001cd, 0x00000010, - 0x800001cf, 0x00000010, 0x800001d1, 0x00000010, - 0x800001d3, 0x00000010, 0x800001d5, 0x00000010, - 0x800001d7, 0x00000010, 0x800001d9, 0x00000010, - 0x800001db, 0x00000010, 0x8000018e, 0x00000010, - 0x800001de, 0x00000010, 0x800001e0, 0x00000010, - 0x800001e2, 0x00000010, 0x800001e4, 0x00000010, - 0x800001e6, 0x00000010, 0x800001e8, 0x00000010, - 0x800001ea, 0x00000010, 0x800001ec, 0x00000010, - 0x800001ee, 0x00000010, 0x0000004a, 0x8000030c, - 0x00000010, 0x800001f1, 0x00000010, 0x800001f1, - 0x00000010, 0x800001f4, 0x00000010, 0x800001f8, - 0x00000010, 0x800001fa, 0x00000010, 0x800001fc, - 0x00000010, 0x800001fe, 0x00000010, 0x80000200, - 0x00000010, 0x80000202, 0x00000010, 0x80000204, - 0x00000010, 0x80000206, 0x00000010, 0x80000208, - 0x00000010, 0x8000020a, 0x00000010, 0x8000020c, - 0x00000010, 0x8000020e, 0x00000010, 0x80000210, - 0x00000010, 0x80000212, 0x00000010, 0x80000214, - 0x00000010, 0x80000216, 0x00000010, 0x80000218, - 0x00000010, 0x8000021a, 0x00000010, 0x8000021c, - 0x00000010, 0x8000021e, 0x00000010, 0x80000222, - 0x00000010, 0x80000224, 0x00000010, 0x80000226, - 0x00000010, 0x80000228, 0x00000010, 0x8000022a, - 0x00000010, 0x8000022c, 0x00000010, 0x8000022e, - 0x00000010, 0x80000230, 0x00000010, 0x80000232, - 0x00000010, 0x80000181, 0x00000010, 0x80000186, - 0x00000010, 0x80000189, 0x00000010, 0x8000018a, - 0x00000010, 0x8000018f, 0x00000010, 0x80000190, - 0x00000010, 0x80000193, 0x00000010, 0x80000194, - 0x00000010, 0x80000197, 0x00000010, 0x80000196, - 0x00000010, 0x8000019c, 0x00000010, 0x8000019d, - 0x00000010, 0x8000019f, 0x00000010, 0x800001a6, - 0x00000010, 0x800001a9, 0x00000010, 0x800001ae, - 0x00000010, 0x800001b1, 0x00000010, 0x800001b2, - 0x00000010, 0x800001b7, 0x00000010, 0x80000399, - 0x00000010, 0x00000399, 0x00000308, 0x80000301, - 0x00000010, 0x80000386, 0x00000010, 0x80000388, - 0x00000010, 0x80000389, 0x00000010, 0x8000038a, - 0x00000010, 0x000003a5, 0x00000308, 0x80000301, - 0x00000010, 0x80000391, 0x00000010, 0x80000392, - 0x00000010, 0x80000393, 0x00000010, 0x80000394, - 0x00000010, 0x80000395, 0x00000010, 0x80000396, - 0x00000010, 0x80000397, 0x00000010, 0x80000398, - 0x00000010, 0x80000399, 0x00000010, 0x8000039a, - 0x00000010, 0x8000039b, 0x00000010, 0x8000039c, - 0x00000010, 0x8000039d, 0x00000010, 0x8000039e, - 0x00000010, 0x8000039f, 0x00000010, 0x800003a0, - 0x00000010, 0x800003a1, 0x00000010, 0x800003a3, - 0x00000010, 0x800003a3, 0x00000010, 0x800003a4, - 0x00000010, 0x800003a5, 0x00000010, 0x800003a6, - 0x00000010, 0x800003a7, 0x00000010, 0x800003a8, - 0x00000010, 0x800003a9, 0x00000010, 0x800003aa, - 0x00000010, 0x800003ab, 0x00000010, 0x8000038c, - 0x00000010, 0x8000038e, 0x00000010, 0x8000038f, - 0x00000010, 0x80000392, 0x00000010, 0x80000398, - 0x00000010, 0x800003a6, 0x00000010, 0x800003a0, - 0x00000010, 0x800003da, 0x00000010, 0x800003dc, - 0x00000010, 0x800003de, 0x00000010, 0x800003e0, - 0x00000010, 0x800003e2, 0x00000010, 0x800003e4, - 0x00000010, 0x800003e6, 0x00000010, 0x800003e8, - 0x00000010, 0x800003ea, 0x00000010, 0x800003ec, - 0x00000010, 0x800003ee, 0x00000010, 0x8000039a, - 0x00000010, 0x800003a1, 0x00000010, 0x800003a3, - 0x00000010, 0x80000395, 0x00000010, 0x80000410, - 0x00000010, 0x80000411, 0x00000010, 0x80000412, - 0x00000010, 0x80000413, 0x00000010, 0x80000414, - 0x00000010, 0x80000415, 0x00000010, 0x80000416, - 0x00000010, 0x80000417, 0x00000010, 0x80000418, - 0x00000010, 0x80000419, 0x00000010, 0x8000041a, - 0x00000010, 0x8000041b, 0x00000010, 0x8000041c, - 0x00000010, 0x8000041d, 0x00000010, 0x8000041e, - 0x00000010, 0x8000041f, 0x00000010, 0x80000420, - 0x00000010, 0x80000421, 0x00000010, 0x80000422, - 0x00000010, 0x80000423, 0x00000010, 0x80000424, - 0x00000010, 0x80000425, 0x00000010, 0x80000426, - 0x00000010, 0x80000427, 0x00000010, 0x80000428, - 0x00000010, 0x80000429, 0x00000010, 0x8000042a, - 0x00000010, 0x8000042b, 0x00000010, 0x8000042c, - 0x00000010, 0x8000042d, 0x00000010, 0x8000042e, - 0x00000010, 0x8000042f, 0x00000010, 0x80000400, - 0x00000010, 0x80000401, 0x00000010, 0x80000402, - 0x00000010, 0x80000403, 0x00000010, 0x80000404, - 0x00000010, 0x80000405, 0x00000010, 0x80000406, - 0x00000010, 0x80000407, 0x00000010, 0x80000408, - 0x00000010, 0x80000409, 0x00000010, 0x8000040a, - 0x00000010, 0x8000040b, 0x00000010, 0x8000040c, - 0x00000010, 0x8000040d, 0x00000010, 0x8000040e, - 0x00000010, 0x8000040f, 0x00000010, 0x80000460, - 0x00000010, 0x80000462, 0x00000010, 0x80000464, - 0x00000010, 0x80000466, 0x00000010, 0x80000468, - 0x00000010, 0x8000046a, 0x00000010, 0x8000046c, - 0x00000010, 0x8000046e, 0x00000010, 0x80000470, - 0x00000010, 0x80000472, 0x00000010, 0x80000474, - 0x00000010, 0x80000476, 0x00000010, 0x80000478, - 0x00000010, 0x8000047a, 0x00000010, 0x8000047c, - 0x00000010, 0x8000047e, 0x00000010, 0x80000480, - 0x00000010, 0x8000048c, 0x00000010, 0x8000048e, - 0x00000010, 0x80000490, 0x00000010, 0x80000492, - 0x00000010, 0x80000494, 0x00000010, 0x80000496, - 0x00000010, 0x80000498, 0x00000010, 0x8000049a, - 0x00000010, 0x8000049c, 0x00000010, 0x8000049e, - 0x00000010, 0x800004a0, 0x00000010, 0x800004a2, - 0x00000010, 0x800004a4, 0x00000010, 0x800004a6, - 0x00000010, 0x800004a8, 0x00000010, 0x800004aa, - 0x00000010, 0x800004ac, 0x00000010, 0x800004ae, - 0x00000010, 0x800004b0, 0x00000010, 0x800004b2, - 0x00000010, 0x800004b4, 0x00000010, 0x800004b6, - 0x00000010, 0x800004b8, 0x00000010, 0x800004ba, - 0x00000010, 0x800004bc, 0x00000010, 0x800004be, - 0x00000010, 0x800004c1, 0x00000010, 0x800004c3, - 0x00000010, 0x800004c7, 0x00000010, 0x800004cb, - 0x00000010, 0x800004d0, 0x00000010, 0x800004d2, - 0x00000010, 0x800004d4, 0x00000010, 0x800004d6, - 0x00000010, 0x800004d8, 0x00000010, 0x800004da, - 0x00000010, 0x800004dc, 0x00000010, 0x800004de, - 0x00000010, 0x800004e0, 0x00000010, 0x800004e2, - 0x00000010, 0x800004e4, 0x00000010, 0x800004e6, - 0x00000010, 0x800004e8, 0x00000010, 0x800004ea, - 0x00000010, 0x800004ec, 0x00000010, 0x800004ee, - 0x00000010, 0x800004f0, 0x00000010, 0x800004f2, - 0x00000010, 0x800004f4, 0x00000010, 0x800004f8, - 0x00000010, 0x80000531, 0x00000010, 0x80000532, - 0x00000010, 0x80000533, 0x00000010, 0x80000534, - 0x00000010, 0x80000535, 0x00000010, 0x80000536, - 0x00000010, 0x80000537, 0x00000010, 0x80000538, - 0x00000010, 0x80000539, 0x00000010, 0x8000053a, - 0x00000010, 0x8000053b, 0x00000010, 0x8000053c, - 0x00000010, 0x8000053d, 0x00000010, 0x8000053e, - 0x00000010, 0x8000053f, 0x00000010, 0x80000540, - 0x00000010, 0x80000541, 0x00000010, 0x80000542, - 0x00000010, 0x80000543, 0x00000010, 0x80000544, - 0x00000010, 0x80000545, 0x00000010, 0x80000546, - 0x00000010, 0x80000547, 0x00000010, 0x80000548, - 0x00000010, 0x80000549, 0x00000010, 0x8000054a, - 0x00000010, 0x8000054b, 0x00000010, 0x8000054c, - 0x00000010, 0x8000054d, 0x00000010, 0x8000054e, - 0x00000010, 0x8000054f, 0x00000010, 0x80000550, - 0x00000010, 0x80000551, 0x00000010, 0x80000552, - 0x00000010, 0x80000553, 0x00000010, 0x80000554, - 0x00000010, 0x80000555, 0x00000010, 0x80000556, - 0x00000010, 0x00000535, 0x80000552, 0x00000010, - 0x80001e00, 0x00000010, 0x80001e02, 0x00000010, - 0x80001e04, 0x00000010, 0x80001e06, 0x00000010, - 0x80001e08, 0x00000010, 0x80001e0a, 0x00000010, - 0x80001e0c, 0x00000010, 0x80001e0e, 0x00000010, - 0x80001e10, 0x00000010, 0x80001e12, 0x00000010, - 0x80001e14, 0x00000010, 0x80001e16, 0x00000010, - 0x80001e18, 0x00000010, 0x80001e1a, 0x00000010, - 0x80001e1c, 0x00000010, 0x80001e1e, 0x00000010, - 0x80001e20, 0x00000010, 0x80001e22, 0x00000010, - 0x80001e24, 0x00000010, 0x80001e26, 0x00000010, - 0x80001e28, 0x00000010, 0x80001e2a, 0x00000010, - 0x80001e2c, 0x00000010, 0x80001e2e, 0x00000010, - 0x80001e30, 0x00000010, 0x80001e32, 0x00000010, - 0x80001e34, 0x00000010, 0x80001e36, 0x00000010, - 0x80001e38, 0x00000010, 0x80001e3a, 0x00000010, - 0x80001e3c, 0x00000010, 0x80001e3e, 0x00000010, - 0x80001e40, 0x00000010, 0x80001e42, 0x00000010, - 0x80001e44, 0x00000010, 0x80001e46, 0x00000010, - 0x80001e48, 0x00000010, 0x80001e4a, 0x00000010, - 0x80001e4c, 0x00000010, 0x80001e4e, 0x00000010, - 0x80001e50, 0x00000010, 0x80001e52, 0x00000010, - 0x80001e54, 0x00000010, 0x80001e56, 0x00000010, - 0x80001e58, 0x00000010, 0x80001e5a, 0x00000010, - 0x80001e5c, 0x00000010, 0x80001e5e, 0x00000010, - 0x80001e60, 0x00000010, 0x80001e62, 0x00000010, - 0x80001e64, 0x00000010, 0x80001e66, 0x00000010, - 0x80001e68, 0x00000010, 0x80001e6a, 0x00000010, - 0x80001e6c, 0x00000010, 0x80001e6e, 0x00000010, - 0x80001e70, 0x00000010, 0x80001e72, 0x00000010, - 0x80001e74, 0x00000010, 0x80001e76, 0x00000010, - 0x80001e78, 0x00000010, 0x80001e7a, 0x00000010, - 0x80001e7c, 0x00000010, 0x80001e7e, 0x00000010, - 0x80001e80, 0x00000010, 0x80001e82, 0x00000010, - 0x80001e84, 0x00000010, 0x80001e86, 0x00000010, - 0x80001e88, 0x00000010, 0x80001e8a, 0x00000010, - 0x80001e8c, 0x00000010, 0x80001e8e, 0x00000010, - 0x80001e90, 0x00000010, 0x80001e92, 0x00000010, - 0x80001e94, 0x00000010, 0x00000048, 0x80000331, - 0x00000010, 0x00000054, 0x80000308, 0x00000010, - 0x00000057, 0x8000030a, 0x00000010, 0x00000059, - 0x8000030a, 0x00000010, 0x00000041, 0x800002be, - 0x00000010, 0x80001e60, 0x00000010, 0x80001ea0, - 0x00000010, 0x80001ea2, 0x00000010, 0x80001ea4, - 0x00000010, 0x80001ea6, 0x00000010, 0x80001ea8, - 0x00000010, 0x80001eaa, 0x00000010, 0x80001eac, - 0x00000010, 0x80001eae, 0x00000010, 0x80001eb0, - 0x00000010, 0x80001eb2, 0x00000010, 0x80001eb4, - 0x00000010, 0x80001eb6, 0x00000010, 0x80001eb8, - 0x00000010, 0x80001eba, 0x00000010, 0x80001ebc, - 0x00000010, 0x80001ebe, 0x00000010, 0x80001ec0, - 0x00000010, 0x80001ec2, 0x00000010, 0x80001ec4, - 0x00000010, 0x80001ec6, 0x00000010, 0x80001ec8, - 0x00000010, 0x80001eca, 0x00000010, 0x80001ecc, - 0x00000010, 0x80001ece, 0x00000010, 0x80001ed0, - 0x00000010, 0x80001ed2, 0x00000010, 0x80001ed4, - 0x00000010, 0x80001ed6, 0x00000010, 0x80001ed8, - 0x00000010, 0x80001eda, 0x00000010, 0x80001edc, - 0x00000010, 0x80001ede, 0x00000010, 0x80001ee0, - 0x00000010, 0x80001ee2, 0x00000010, 0x80001ee4, - 0x00000010, 0x80001ee6, 0x00000010, 0x80001ee8, - 0x00000010, 0x80001eea, 0x00000010, 0x80001eec, - 0x00000010, 0x80001eee, 0x00000010, 0x80001ef0, - 0x00000010, 0x80001ef2, 0x00000010, 0x80001ef4, - 0x00000010, 0x80001ef6, 0x00000010, 0x80001ef8, - 0x00000010, 0x80001f08, 0x00000010, 0x80001f09, - 0x00000010, 0x80001f0a, 0x00000010, 0x80001f0b, - 0x00000010, 0x80001f0c, 0x00000010, 0x80001f0d, - 0x00000010, 0x80001f0e, 0x00000010, 0x80001f0f, - 0x00000010, 0x80001f18, 0x00000010, 0x80001f19, - 0x00000010, 0x80001f1a, 0x00000010, 0x80001f1b, - 0x00000010, 0x80001f1c, 0x00000010, 0x80001f1d, - 0x00000010, 0x80001f28, 0x00000010, 0x80001f29, - 0x00000010, 0x80001f2a, 0x00000010, 0x80001f2b, - 0x00000010, 0x80001f2c, 0x00000010, 0x80001f2d, - 0x00000010, 0x80001f2e, 0x00000010, 0x80001f2f, - 0x00000010, 0x80001f38, 0x00000010, 0x80001f39, - 0x00000010, 0x80001f3a, 0x00000010, 0x80001f3b, - 0x00000010, 0x80001f3c, 0x00000010, 0x80001f3d, - 0x00000010, 0x80001f3e, 0x00000010, 0x80001f3f, - 0x00000010, 0x80001f48, 0x00000010, 0x80001f49, - 0x00000010, 0x80001f4a, 0x00000010, 0x80001f4b, - 0x00000010, 0x80001f4c, 0x00000010, 0x80001f4d, - 0x00000010, 0x000003a5, 0x80000313, 0x00000010, - 0x80001f59, 0x00000010, 0x000003a5, 0x00000313, - 0x80000300, 0x00000010, 0x80001f5b, 0x00000010, - 0x000003a5, 0x00000313, 0x80000301, 0x00000010, - 0x80001f5d, 0x00000010, 0x000003a5, 0x00000313, - 0x80000342, 0x00000010, 0x80001f5f, 0x00000010, - 0x80001f68, 0x00000010, 0x80001f69, 0x00000010, - 0x80001f6a, 0x00000010, 0x80001f6b, 0x00000010, - 0x80001f6c, 0x00000010, 0x80001f6d, 0x00000010, - 0x80001f6e, 0x00000010, 0x80001f6f, 0x00000010, - 0x80001fba, 0x00000010, 0x80001fbb, 0x00000010, - 0x80001fc8, 0x00000010, 0x80001fc9, 0x00000010, - 0x80001fca, 0x00000010, 0x80001fcb, 0x00000010, - 0x80001fda, 0x00000010, 0x80001fdb, 0x00000010, - 0x80001ff8, 0x00000010, 0x80001ff9, 0x00000010, - 0x80001fea, 0x00000010, 0x80001feb, 0x00000010, - 0x80001ffa, 0x00000010, 0x80001ffb, 0x00000000, - 0x00001f08, 0x80000399, 0x00000010, 0x80001f88, - 0x00000000, 0x00001f09, 0x80000399, 0x00000010, - 0x80001f89, 0x00000000, 0x00001f0a, 0x80000399, - 0x00000010, 0x80001f8a, 0x00000000, 0x00001f0b, - 0x80000399, 0x00000010, 0x80001f8b, 0x00000000, - 0x00001f0c, 0x80000399, 0x00000010, 0x80001f8c, - 0x00000000, 0x00001f0d, 0x80000399, 0x00000010, - 0x80001f8d, 0x00000000, 0x00001f0e, 0x80000399, - 0x00000010, 0x80001f8e, 0x00000000, 0x00001f0f, - 0x80000399, 0x00000010, 0x80001f8f, 0x00000010, - 0x00001f08, 0x80000399, 0x00000010, 0x00001f09, - 0x80000399, 0x00000010, 0x00001f0a, 0x80000399, - 0x00000010, 0x00001f0b, 0x80000399, 0x00000010, - 0x00001f0c, 0x80000399, 0x00000010, 0x00001f0d, - 0x80000399, 0x00000010, 0x00001f0e, 0x80000399, - 0x00000010, 0x00001f0f, 0x80000399, 0x00000000, - 0x00001f28, 0x80000399, 0x00000010, 0x80001f98, - 0x00000000, 0x00001f29, 0x80000399, 0x00000010, - 0x80001f99, 0x00000000, 0x00001f2a, 0x80000399, - 0x00000010, 0x80001f9a, 0x00000000, 0x00001f2b, - 0x80000399, 0x00000010, 0x80001f9b, 0x00000000, - 0x00001f2c, 0x80000399, 0x00000010, 0x80001f9c, - 0x00000000, 0x00001f2d, 0x80000399, 0x00000010, - 0x80001f9d, 0x00000000, 0x00001f2e, 0x80000399, - 0x00000010, 0x80001f9e, 0x00000000, 0x00001f2f, - 0x80000399, 0x00000010, 0x80001f9f, 0x00000010, - 0x00001f28, 0x80000399, 0x00000010, 0x00001f29, - 0x80000399, 0x00000010, 0x00001f2a, 0x80000399, - 0x00000010, 0x00001f2b, 0x80000399, 0x00000010, - 0x00001f2c, 0x80000399, 0x00000010, 0x00001f2d, - 0x80000399, 0x00000010, 0x00001f2e, 0x80000399, - 0x00000010, 0x00001f2f, 0x80000399, 0x00000000, - 0x00001f68, 0x80000399, 0x00000010, 0x80001fa8, - 0x00000000, 0x00001f69, 0x80000399, 0x00000010, - 0x80001fa9, 0x00000000, 0x00001f6a, 0x80000399, - 0x00000010, 0x80001faa, 0x00000000, 0x00001f6b, - 0x80000399, 0x00000010, 0x80001fab, 0x00000000, - 0x00001f6c, 0x80000399, 0x00000010, 0x80001fac, - 0x00000000, 0x00001f6d, 0x80000399, 0x00000010, - 0x80001fad, 0x00000000, 0x00001f6e, 0x80000399, - 0x00000010, 0x80001fae, 0x00000000, 0x00001f6f, - 0x80000399, 0x00000010, 0x80001faf, 0x00000010, - 0x00001f68, 0x80000399, 0x00000010, 0x00001f69, - 0x80000399, 0x00000010, 0x00001f6a, 0x80000399, - 0x00000010, 0x00001f6b, 0x80000399, 0x00000010, - 0x00001f6c, 0x80000399, 0x00000010, 0x00001f6d, - 0x80000399, 0x00000010, 0x00001f6e, 0x80000399, - 0x00000010, 0x00001f6f, 0x80000399, 0x00000010, - 0x80001fb8, 0x00000010, 0x80001fb9, 0x00000010, - 0x00001fba, 0x80000399, 0x00000000, 0x00000391, - 0x80000399, 0x00000010, 0x80001fbc, 0x00000010, - 0x00000386, 0x80000399, 0x00000010, 0x00000391, - 0x80000342, 0x00000010, 0x00000391, 0x00000342, - 0x80000399, 0x00000010, 0x00000391, 0x80000399, - 0x00000010, 0x80000399, 0x00000010, 0x00001fca, - 0x80000399, 0x00000000, 0x00000397, 0x80000399, - 0x00000010, 0x80001fcc, 0x00000010, 0x00000389, - 0x80000399, 0x00000010, 0x00000397, 0x80000342, - 0x00000010, 0x00000397, 0x00000342, 0x80000399, - 0x00000010, 0x00000397, 0x80000399, 0x00000010, - 0x80001fd8, 0x00000010, 0x80001fd9, 0x00000010, - 0x00000399, 0x00000308, 0x80000300, 0x00000010, - 0x00000399, 0x00000308, 0x80000301, 0x00000010, - 0x00000399, 0x80000342, 0x00000010, 0x00000399, - 0x00000308, 0x80000342, 0x00000010, 0x80001fe8, - 0x00000010, 0x80001fe9, 0x00000010, 0x000003a5, - 0x00000308, 0x80000300, 0x00000010, 0x000003a5, - 0x00000308, 0x80000301, 0x00000010, 0x000003a1, - 0x80000313, 0x00000010, 0x80001fec, 0x00000010, - 0x000003a5, 0x80000342, 0x00000010, 0x000003a5, - 0x00000308, 0x80000342, 0x00000010, 0x00001ffa, - 0x80000399, 0x00000000, 0x000003a9, 0x80000399, - 0x00000010, 0x80001ffc, 0x00000010, 0x0000038f, - 0x80000399, 0x00000010, 0x000003a9, 0x80000342, - 0x00000010, 0x000003a9, 0x00000342, 0x80000399, - 0x00000010, 0x000003a9, 0x80000399, 0x00000010, - 0x80002160, 0x00000010, 0x80002161, 0x00000010, - 0x80002162, 0x00000010, 0x80002163, 0x00000010, - 0x80002164, 0x00000010, 0x80002165, 0x00000010, - 0x80002166, 0x00000010, 0x80002167, 0x00000010, - 0x80002168, 0x00000010, 0x80002169, 0x00000010, - 0x8000216a, 0x00000010, 0x8000216b, 0x00000010, - 0x8000216c, 0x00000010, 0x8000216d, 0x00000010, - 0x8000216e, 0x00000010, 0x8000216f, 0x00000010, - 0x800024b6, 0x00000010, 0x800024b7, 0x00000010, - 0x800024b8, 0x00000010, 0x800024b9, 0x00000010, - 0x800024ba, 0x00000010, 0x800024bb, 0x00000010, - 0x800024bc, 0x00000010, 0x800024bd, 0x00000010, - 0x800024be, 0x00000010, 0x800024bf, 0x00000010, - 0x800024c0, 0x00000010, 0x800024c1, 0x00000010, - 0x800024c2, 0x00000010, 0x800024c3, 0x00000010, - 0x800024c4, 0x00000010, 0x800024c5, 0x00000010, - 0x800024c6, 0x00000010, 0x800024c7, 0x00000010, - 0x800024c8, 0x00000010, 0x800024c9, 0x00000010, - 0x800024ca, 0x00000010, 0x800024cb, 0x00000010, - 0x800024cc, 0x00000010, 0x800024cd, 0x00000010, - 0x800024ce, 0x00000010, 0x800024cf, 0x00000010, - 0x00000046, 0x80000046, 0x00000010, 0x00000046, - 0x80000049, 0x00000010, 0x00000046, 0x8000004c, - 0x00000010, 0x00000046, 0x00000046, 0x80000049, - 0x00000010, 0x00000046, 0x00000046, 0x8000004c, - 0x00000010, 0x00000053, 0x80000054, 0x00000010, - 0x00000053, 0x80000054, 0x00000010, 0x00000544, - 0x80000546, 0x00000010, 0x00000544, 0x80000535, - 0x00000010, 0x00000544, 0x8000053b, 0x00000010, - 0x0000054e, 0x80000546, 0x00000010, 0x00000544, - 0x8000053d, 0x00000010, 0x8000ff21, 0x00000010, - 0x8000ff22, 0x00000010, 0x8000ff23, 0x00000010, - 0x8000ff24, 0x00000010, 0x8000ff25, 0x00000010, - 0x8000ff26, 0x00000010, 0x8000ff27, 0x00000010, - 0x8000ff28, 0x00000010, 0x8000ff29, 0x00000010, - 0x8000ff2a, 0x00000010, 0x8000ff2b, 0x00000010, - 0x8000ff2c, 0x00000010, 0x8000ff2d, 0x00000010, - 0x8000ff2e, 0x00000010, 0x8000ff2f, 0x00000010, - 0x8000ff30, 0x00000010, 0x8000ff31, 0x00000010, - 0x8000ff32, 0x00000010, 0x8000ff33, 0x00000010, - 0x8000ff34, 0x00000010, 0x8000ff35, 0x00000010, - 0x8000ff36, 0x00000010, 0x8000ff37, 0x00000010, - 0x8000ff38, 0x00000010, 0x8000ff39, 0x00000010, - 0x8000ff3a, 0x00000010, 0x80010400, 0x00000010, - 0x80010401, 0x00000010, 0x80010402, 0x00000010, - 0x80010403, 0x00000010, 0x80010404, 0x00000010, - 0x80010405, 0x00000010, 0x80010406, 0x00000010, - 0x80010407, 0x00000010, 0x80010408, 0x00000010, - 0x80010409, 0x00000010, 0x8001040a, 0x00000010, - 0x8001040b, 0x00000010, 0x8001040c, 0x00000010, - 0x8001040d, 0x00000010, 0x8001040e, 0x00000010, - 0x8001040f, 0x00000010, 0x80010410, 0x00000010, - 0x80010411, 0x00000010, 0x80010412, 0x00000010, - 0x80010413, 0x00000010, 0x80010414, 0x00000010, - 0x80010415, 0x00000010, 0x80010416, 0x00000010, - 0x80010417, 0x00000010, 0x80010418, 0x00000010, - 0x80010419, 0x00000010, 0x8001041a, 0x00000010, - 0x8001041b, 0x00000010, 0x8001041c, 0x00000010, - 0x8001041d, 0x00000010, 0x8001041e, 0x00000010, - 0x8001041f, 0x00000010, 0x80010420, 0x00000010, - 0x80010421, 0x00000010, 0x80010422, 0x00000010, - 0x80010423, 0x00000010, 0x80010424, 0x00000010, - 0x80010425, -}; - -static const unsigned long v310_tolower_seq[] = { - 0x00000000, 0x00000010, 0x80000061, 0x00000010, - 0x80000062, 0x00000010, 0x80000063, 0x00000010, - 0x80000064, 0x00000010, 0x80000065, 0x00000010, - 0x80000066, 0x00000010, 0x80000067, 0x00000010, - 0x80000068, 0x00000010, 0x80000069, 0x00000010, - 0x8000006a, 0x00000010, 0x8000006b, 0x00000010, - 0x8000006c, 0x00000010, 0x8000006d, 0x00000010, - 0x8000006e, 0x00000010, 0x8000006f, 0x00000010, - 0x80000070, 0x00000010, 0x80000071, 0x00000010, - 0x80000072, 0x00000010, 0x80000073, 0x00000010, - 0x80000074, 0x00000010, 0x80000075, 0x00000010, - 0x80000076, 0x00000010, 0x80000077, 0x00000010, - 0x80000078, 0x00000010, 0x80000079, 0x00000010, - 0x8000007a, 0x00000010, 0x800000e0, 0x00000010, - 0x800000e1, 0x00000010, 0x800000e2, 0x00000010, - 0x800000e3, 0x00000010, 0x800000e4, 0x00000010, - 0x800000e5, 0x00000010, 0x800000e6, 0x00000010, - 0x800000e7, 0x00000010, 0x800000e8, 0x00000010, - 0x800000e9, 0x00000010, 0x800000ea, 0x00000010, - 0x800000eb, 0x00000010, 0x800000ec, 0x00000010, - 0x800000ed, 0x00000010, 0x800000ee, 0x00000010, - 0x800000ef, 0x00000010, 0x800000f0, 0x00000010, - 0x800000f1, 0x00000010, 0x800000f2, 0x00000010, - 0x800000f3, 0x00000010, 0x800000f4, 0x00000010, - 0x800000f5, 0x00000010, 0x800000f6, 0x00000010, - 0x800000f8, 0x00000010, 0x800000f9, 0x00000010, - 0x800000fa, 0x00000010, 0x800000fb, 0x00000010, - 0x800000fc, 0x00000010, 0x800000fd, 0x00000010, - 0x800000fe, 0x00000010, 0x80000101, 0x00000010, - 0x80000103, 0x00000010, 0x80000105, 0x00000010, - 0x80000107, 0x00000010, 0x80000109, 0x00000010, - 0x8000010b, 0x00000010, 0x8000010d, 0x00000010, - 0x8000010f, 0x00000010, 0x80000111, 0x00000010, - 0x80000113, 0x00000010, 0x80000115, 0x00000010, - 0x80000117, 0x00000010, 0x80000119, 0x00000010, - 0x8000011b, 0x00000010, 0x8000011d, 0x00000010, - 0x8000011f, 0x00000010, 0x80000121, 0x00000010, - 0x80000123, 0x00000010, 0x80000125, 0x00000010, - 0x80000127, 0x00000010, 0x80000129, 0x00000010, - 0x8000012b, 0x00000010, 0x8000012d, 0x00000010, - 0x8000012f, 0x00000010, 0x80000069, 0x00000010, - 0x80000133, 0x00000010, 0x80000135, 0x00000010, - 0x80000137, 0x00000010, 0x8000013a, 0x00000010, - 0x8000013c, 0x00000010, 0x8000013e, 0x00000010, - 0x80000140, 0x00000010, 0x80000142, 0x00000010, - 0x80000144, 0x00000010, 0x80000146, 0x00000010, - 0x80000148, 0x00000010, 0x8000014b, 0x00000010, - 0x8000014d, 0x00000010, 0x8000014f, 0x00000010, - 0x80000151, 0x00000010, 0x80000153, 0x00000010, - 0x80000155, 0x00000010, 0x80000157, 0x00000010, - 0x80000159, 0x00000010, 0x8000015b, 0x00000010, - 0x8000015d, 0x00000010, 0x8000015f, 0x00000010, - 0x80000161, 0x00000010, 0x80000163, 0x00000010, - 0x80000165, 0x00000010, 0x80000167, 0x00000010, - 0x80000169, 0x00000010, 0x8000016b, 0x00000010, - 0x8000016d, 0x00000010, 0x8000016f, 0x00000010, - 0x80000171, 0x00000010, 0x80000173, 0x00000010, - 0x80000175, 0x00000010, 0x80000177, 0x00000010, - 0x800000ff, 0x00000010, 0x8000017a, 0x00000010, - 0x8000017c, 0x00000010, 0x8000017e, 0x00000010, - 0x80000253, 0x00000010, 0x80000183, 0x00000010, - 0x80000185, 0x00000010, 0x80000254, 0x00000010, - 0x80000188, 0x00000010, 0x80000256, 0x00000010, - 0x80000257, 0x00000010, 0x8000018c, 0x00000010, - 0x800001dd, 0x00000010, 0x80000259, 0x00000010, - 0x8000025b, 0x00000010, 0x80000192, 0x00000010, - 0x80000260, 0x00000010, 0x80000263, 0x00000010, - 0x80000269, 0x00000010, 0x80000268, 0x00000010, - 0x80000199, 0x00000010, 0x8000026f, 0x00000010, - 0x80000272, 0x00000010, 0x80000275, 0x00000010, - 0x800001a1, 0x00000010, 0x800001a3, 0x00000010, - 0x800001a5, 0x00000010, 0x80000280, 0x00000010, - 0x800001a8, 0x00000010, 0x80000283, 0x00000010, - 0x800001ad, 0x00000010, 0x80000288, 0x00000010, - 0x800001b0, 0x00000010, 0x8000028a, 0x00000010, - 0x8000028b, 0x00000010, 0x800001b4, 0x00000010, - 0x800001b6, 0x00000010, 0x80000292, 0x00000010, - 0x800001b9, 0x00000010, 0x800001bd, 0x00000010, - 0x800001c6, 0x00000010, 0x800001c6, 0x00000010, - 0x800001c9, 0x00000010, 0x800001c9, 0x00000010, - 0x800001cc, 0x00000010, 0x800001cc, 0x00000010, - 0x800001ce, 0x00000010, 0x800001d0, 0x00000010, - 0x800001d2, 0x00000010, 0x800001d4, 0x00000010, - 0x800001d6, 0x00000010, 0x800001d8, 0x00000010, - 0x800001da, 0x00000010, 0x800001dc, 0x00000010, - 0x800001df, 0x00000010, 0x800001e1, 0x00000010, - 0x800001e3, 0x00000010, 0x800001e5, 0x00000010, - 0x800001e7, 0x00000010, 0x800001e9, 0x00000010, - 0x800001eb, 0x00000010, 0x800001ed, 0x00000010, - 0x800001ef, 0x00000010, 0x800001f3, 0x00000010, - 0x800001f3, 0x00000010, 0x800001f5, 0x00000010, - 0x80000195, 0x00000010, 0x800001bf, 0x00000010, - 0x800001f9, 0x00000010, 0x800001fb, 0x00000010, - 0x800001fd, 0x00000010, 0x800001ff, 0x00000010, - 0x80000201, 0x00000010, 0x80000203, 0x00000010, - 0x80000205, 0x00000010, 0x80000207, 0x00000010, - 0x80000209, 0x00000010, 0x8000020b, 0x00000010, - 0x8000020d, 0x00000010, 0x8000020f, 0x00000010, - 0x80000211, 0x00000010, 0x80000213, 0x00000010, - 0x80000215, 0x00000010, 0x80000217, 0x00000010, - 0x80000219, 0x00000010, 0x8000021b, 0x00000010, - 0x8000021d, 0x00000010, 0x8000021f, 0x00000010, - 0x80000223, 0x00000010, 0x80000225, 0x00000010, - 0x80000227, 0x00000010, 0x80000229, 0x00000010, - 0x8000022b, 0x00000010, 0x8000022d, 0x00000010, - 0x8000022f, 0x00000010, 0x80000231, 0x00000010, - 0x80000233, 0x00000010, 0x800003ac, 0x00000010, - 0x800003ad, 0x00000010, 0x800003ae, 0x00000010, - 0x800003af, 0x00000010, 0x800003cc, 0x00000010, - 0x800003cd, 0x00000010, 0x800003ce, 0x00000010, - 0x800003b1, 0x00000010, 0x800003b2, 0x00000010, - 0x800003b3, 0x00000010, 0x800003b4, 0x00000010, - 0x800003b5, 0x00000010, 0x800003b6, 0x00000010, - 0x800003b7, 0x00000010, 0x800003b8, 0x00000010, - 0x800003b9, 0x00000010, 0x800003ba, 0x00000010, - 0x800003bb, 0x00000010, 0x800003bc, 0x00000010, - 0x800003bd, 0x00000010, 0x800003be, 0x00000010, - 0x800003bf, 0x00000010, 0x800003c0, 0x00000010, - 0x800003c1, 0x00000001, 0x800003c2, 0x00000010, - 0x800003c3, 0x00000010, 0x800003c4, 0x00000010, - 0x800003c5, 0x00000010, 0x800003c6, 0x00000010, - 0x800003c7, 0x00000010, 0x800003c8, 0x00000010, - 0x800003c9, 0x00000010, 0x800003ca, 0x00000010, - 0x800003cb, 0x00000010, 0x800003db, 0x00000010, - 0x800003dd, 0x00000010, 0x800003df, 0x00000010, - 0x800003e1, 0x00000010, 0x800003e3, 0x00000010, - 0x800003e5, 0x00000010, 0x800003e7, 0x00000010, - 0x800003e9, 0x00000010, 0x800003eb, 0x00000010, - 0x800003ed, 0x00000010, 0x800003ef, 0x00000010, - 0x800003b8, 0x00000010, 0x80000450, 0x00000010, - 0x80000451, 0x00000010, 0x80000452, 0x00000010, - 0x80000453, 0x00000010, 0x80000454, 0x00000010, - 0x80000455, 0x00000010, 0x80000456, 0x00000010, - 0x80000457, 0x00000010, 0x80000458, 0x00000010, - 0x80000459, 0x00000010, 0x8000045a, 0x00000010, - 0x8000045b, 0x00000010, 0x8000045c, 0x00000010, - 0x8000045d, 0x00000010, 0x8000045e, 0x00000010, - 0x8000045f, 0x00000010, 0x80000430, 0x00000010, - 0x80000431, 0x00000010, 0x80000432, 0x00000010, - 0x80000433, 0x00000010, 0x80000434, 0x00000010, - 0x80000435, 0x00000010, 0x80000436, 0x00000010, - 0x80000437, 0x00000010, 0x80000438, 0x00000010, - 0x80000439, 0x00000010, 0x8000043a, 0x00000010, - 0x8000043b, 0x00000010, 0x8000043c, 0x00000010, - 0x8000043d, 0x00000010, 0x8000043e, 0x00000010, - 0x8000043f, 0x00000010, 0x80000440, 0x00000010, - 0x80000441, 0x00000010, 0x80000442, 0x00000010, - 0x80000443, 0x00000010, 0x80000444, 0x00000010, - 0x80000445, 0x00000010, 0x80000446, 0x00000010, - 0x80000447, 0x00000010, 0x80000448, 0x00000010, - 0x80000449, 0x00000010, 0x8000044a, 0x00000010, - 0x8000044b, 0x00000010, 0x8000044c, 0x00000010, - 0x8000044d, 0x00000010, 0x8000044e, 0x00000010, - 0x8000044f, 0x00000010, 0x80000461, 0x00000010, - 0x80000463, 0x00000010, 0x80000465, 0x00000010, - 0x80000467, 0x00000010, 0x80000469, 0x00000010, - 0x8000046b, 0x00000010, 0x8000046d, 0x00000010, - 0x8000046f, 0x00000010, 0x80000471, 0x00000010, - 0x80000473, 0x00000010, 0x80000475, 0x00000010, - 0x80000477, 0x00000010, 0x80000479, 0x00000010, - 0x8000047b, 0x00000010, 0x8000047d, 0x00000010, - 0x8000047f, 0x00000010, 0x80000481, 0x00000010, - 0x8000048d, 0x00000010, 0x8000048f, 0x00000010, - 0x80000491, 0x00000010, 0x80000493, 0x00000010, - 0x80000495, 0x00000010, 0x80000497, 0x00000010, - 0x80000499, 0x00000010, 0x8000049b, 0x00000010, - 0x8000049d, 0x00000010, 0x8000049f, 0x00000010, - 0x800004a1, 0x00000010, 0x800004a3, 0x00000010, - 0x800004a5, 0x00000010, 0x800004a7, 0x00000010, - 0x800004a9, 0x00000010, 0x800004ab, 0x00000010, - 0x800004ad, 0x00000010, 0x800004af, 0x00000010, - 0x800004b1, 0x00000010, 0x800004b3, 0x00000010, - 0x800004b5, 0x00000010, 0x800004b7, 0x00000010, - 0x800004b9, 0x00000010, 0x800004bb, 0x00000010, - 0x800004bd, 0x00000010, 0x800004bf, 0x00000010, - 0x800004c2, 0x00000010, 0x800004c4, 0x00000010, - 0x800004c8, 0x00000010, 0x800004cc, 0x00000010, - 0x800004d1, 0x00000010, 0x800004d3, 0x00000010, - 0x800004d5, 0x00000010, 0x800004d7, 0x00000010, - 0x800004d9, 0x00000010, 0x800004db, 0x00000010, - 0x800004dd, 0x00000010, 0x800004df, 0x00000010, - 0x800004e1, 0x00000010, 0x800004e3, 0x00000010, - 0x800004e5, 0x00000010, 0x800004e7, 0x00000010, - 0x800004e9, 0x00000010, 0x800004eb, 0x00000010, - 0x800004ed, 0x00000010, 0x800004ef, 0x00000010, - 0x800004f1, 0x00000010, 0x800004f3, 0x00000010, - 0x800004f5, 0x00000010, 0x800004f9, 0x00000010, - 0x80000561, 0x00000010, 0x80000562, 0x00000010, - 0x80000563, 0x00000010, 0x80000564, 0x00000010, - 0x80000565, 0x00000010, 0x80000566, 0x00000010, - 0x80000567, 0x00000010, 0x80000568, 0x00000010, - 0x80000569, 0x00000010, 0x8000056a, 0x00000010, - 0x8000056b, 0x00000010, 0x8000056c, 0x00000010, - 0x8000056d, 0x00000010, 0x8000056e, 0x00000010, - 0x8000056f, 0x00000010, 0x80000570, 0x00000010, - 0x80000571, 0x00000010, 0x80000572, 0x00000010, - 0x80000573, 0x00000010, 0x80000574, 0x00000010, - 0x80000575, 0x00000010, 0x80000576, 0x00000010, - 0x80000577, 0x00000010, 0x80000578, 0x00000010, - 0x80000579, 0x00000010, 0x8000057a, 0x00000010, - 0x8000057b, 0x00000010, 0x8000057c, 0x00000010, - 0x8000057d, 0x00000010, 0x8000057e, 0x00000010, - 0x8000057f, 0x00000010, 0x80000580, 0x00000010, - 0x80000581, 0x00000010, 0x80000582, 0x00000010, - 0x80000583, 0x00000010, 0x80000584, 0x00000010, - 0x80000585, 0x00000010, 0x80000586, 0x00000010, - 0x80001e01, 0x00000010, 0x80001e03, 0x00000010, - 0x80001e05, 0x00000010, 0x80001e07, 0x00000010, - 0x80001e09, 0x00000010, 0x80001e0b, 0x00000010, - 0x80001e0d, 0x00000010, 0x80001e0f, 0x00000010, - 0x80001e11, 0x00000010, 0x80001e13, 0x00000010, - 0x80001e15, 0x00000010, 0x80001e17, 0x00000010, - 0x80001e19, 0x00000010, 0x80001e1b, 0x00000010, - 0x80001e1d, 0x00000010, 0x80001e1f, 0x00000010, - 0x80001e21, 0x00000010, 0x80001e23, 0x00000010, - 0x80001e25, 0x00000010, 0x80001e27, 0x00000010, - 0x80001e29, 0x00000010, 0x80001e2b, 0x00000010, - 0x80001e2d, 0x00000010, 0x80001e2f, 0x00000010, - 0x80001e31, 0x00000010, 0x80001e33, 0x00000010, - 0x80001e35, 0x00000010, 0x80001e37, 0x00000010, - 0x80001e39, 0x00000010, 0x80001e3b, 0x00000010, - 0x80001e3d, 0x00000010, 0x80001e3f, 0x00000010, - 0x80001e41, 0x00000010, 0x80001e43, 0x00000010, - 0x80001e45, 0x00000010, 0x80001e47, 0x00000010, - 0x80001e49, 0x00000010, 0x80001e4b, 0x00000010, - 0x80001e4d, 0x00000010, 0x80001e4f, 0x00000010, - 0x80001e51, 0x00000010, 0x80001e53, 0x00000010, - 0x80001e55, 0x00000010, 0x80001e57, 0x00000010, - 0x80001e59, 0x00000010, 0x80001e5b, 0x00000010, - 0x80001e5d, 0x00000010, 0x80001e5f, 0x00000010, - 0x80001e61, 0x00000010, 0x80001e63, 0x00000010, - 0x80001e65, 0x00000010, 0x80001e67, 0x00000010, - 0x80001e69, 0x00000010, 0x80001e6b, 0x00000010, - 0x80001e6d, 0x00000010, 0x80001e6f, 0x00000010, - 0x80001e71, 0x00000010, 0x80001e73, 0x00000010, - 0x80001e75, 0x00000010, 0x80001e77, 0x00000010, - 0x80001e79, 0x00000010, 0x80001e7b, 0x00000010, - 0x80001e7d, 0x00000010, 0x80001e7f, 0x00000010, - 0x80001e81, 0x00000010, 0x80001e83, 0x00000010, - 0x80001e85, 0x00000010, 0x80001e87, 0x00000010, - 0x80001e89, 0x00000010, 0x80001e8b, 0x00000010, - 0x80001e8d, 0x00000010, 0x80001e8f, 0x00000010, - 0x80001e91, 0x00000010, 0x80001e93, 0x00000010, - 0x80001e95, 0x00000010, 0x80001ea1, 0x00000010, - 0x80001ea3, 0x00000010, 0x80001ea5, 0x00000010, - 0x80001ea7, 0x00000010, 0x80001ea9, 0x00000010, - 0x80001eab, 0x00000010, 0x80001ead, 0x00000010, - 0x80001eaf, 0x00000010, 0x80001eb1, 0x00000010, - 0x80001eb3, 0x00000010, 0x80001eb5, 0x00000010, - 0x80001eb7, 0x00000010, 0x80001eb9, 0x00000010, - 0x80001ebb, 0x00000010, 0x80001ebd, 0x00000010, - 0x80001ebf, 0x00000010, 0x80001ec1, 0x00000010, - 0x80001ec3, 0x00000010, 0x80001ec5, 0x00000010, - 0x80001ec7, 0x00000010, 0x80001ec9, 0x00000010, - 0x80001ecb, 0x00000010, 0x80001ecd, 0x00000010, - 0x80001ecf, 0x00000010, 0x80001ed1, 0x00000010, - 0x80001ed3, 0x00000010, 0x80001ed5, 0x00000010, - 0x80001ed7, 0x00000010, 0x80001ed9, 0x00000010, - 0x80001edb, 0x00000010, 0x80001edd, 0x00000010, - 0x80001edf, 0x00000010, 0x80001ee1, 0x00000010, - 0x80001ee3, 0x00000010, 0x80001ee5, 0x00000010, - 0x80001ee7, 0x00000010, 0x80001ee9, 0x00000010, - 0x80001eeb, 0x00000010, 0x80001eed, 0x00000010, - 0x80001eef, 0x00000010, 0x80001ef1, 0x00000010, - 0x80001ef3, 0x00000010, 0x80001ef5, 0x00000010, - 0x80001ef7, 0x00000010, 0x80001ef9, 0x00000010, - 0x80001f00, 0x00000010, 0x80001f01, 0x00000010, - 0x80001f02, 0x00000010, 0x80001f03, 0x00000010, - 0x80001f04, 0x00000010, 0x80001f05, 0x00000010, - 0x80001f06, 0x00000010, 0x80001f07, 0x00000010, - 0x80001f10, 0x00000010, 0x80001f11, 0x00000010, - 0x80001f12, 0x00000010, 0x80001f13, 0x00000010, - 0x80001f14, 0x00000010, 0x80001f15, 0x00000010, - 0x80001f20, 0x00000010, 0x80001f21, 0x00000010, - 0x80001f22, 0x00000010, 0x80001f23, 0x00000010, - 0x80001f24, 0x00000010, 0x80001f25, 0x00000010, - 0x80001f26, 0x00000010, 0x80001f27, 0x00000010, - 0x80001f30, 0x00000010, 0x80001f31, 0x00000010, - 0x80001f32, 0x00000010, 0x80001f33, 0x00000010, - 0x80001f34, 0x00000010, 0x80001f35, 0x00000010, - 0x80001f36, 0x00000010, 0x80001f37, 0x00000010, - 0x80001f40, 0x00000010, 0x80001f41, 0x00000010, - 0x80001f42, 0x00000010, 0x80001f43, 0x00000010, - 0x80001f44, 0x00000010, 0x80001f45, 0x00000010, - 0x80001f51, 0x00000010, 0x80001f53, 0x00000010, - 0x80001f55, 0x00000010, 0x80001f57, 0x00000010, - 0x80001f60, 0x00000010, 0x80001f61, 0x00000010, - 0x80001f62, 0x00000010, 0x80001f63, 0x00000010, - 0x80001f64, 0x00000010, 0x80001f65, 0x00000010, - 0x80001f66, 0x00000010, 0x80001f67, 0x00000000, - 0x80001f80, 0x00000010, 0x80001f80, 0x00000000, - 0x80001f81, 0x00000010, 0x80001f81, 0x00000000, - 0x80001f82, 0x00000010, 0x80001f82, 0x00000000, - 0x80001f83, 0x00000010, 0x80001f83, 0x00000000, - 0x80001f84, 0x00000010, 0x80001f84, 0x00000000, - 0x80001f85, 0x00000010, 0x80001f85, 0x00000000, - 0x80001f86, 0x00000010, 0x80001f86, 0x00000000, - 0x80001f87, 0x00000010, 0x80001f87, 0x00000000, - 0x80001f90, 0x00000010, 0x80001f90, 0x00000000, - 0x80001f91, 0x00000010, 0x80001f91, 0x00000000, - 0x80001f92, 0x00000010, 0x80001f92, 0x00000000, - 0x80001f93, 0x00000010, 0x80001f93, 0x00000000, - 0x80001f94, 0x00000010, 0x80001f94, 0x00000000, - 0x80001f95, 0x00000010, 0x80001f95, 0x00000000, - 0x80001f96, 0x00000010, 0x80001f96, 0x00000000, - 0x80001f97, 0x00000010, 0x80001f97, 0x00000000, - 0x80001fa0, 0x00000010, 0x80001fa0, 0x00000000, - 0x80001fa1, 0x00000010, 0x80001fa1, 0x00000000, - 0x80001fa2, 0x00000010, 0x80001fa2, 0x00000000, - 0x80001fa3, 0x00000010, 0x80001fa3, 0x00000000, - 0x80001fa4, 0x00000010, 0x80001fa4, 0x00000000, - 0x80001fa5, 0x00000010, 0x80001fa5, 0x00000000, - 0x80001fa6, 0x00000010, 0x80001fa6, 0x00000000, - 0x80001fa7, 0x00000010, 0x80001fa7, 0x00000010, - 0x80001fb0, 0x00000010, 0x80001fb1, 0x00000010, - 0x80001f70, 0x00000010, 0x80001f71, 0x00000000, - 0x80001fb3, 0x00000010, 0x80001fb3, 0x00000010, - 0x80001f72, 0x00000010, 0x80001f73, 0x00000010, - 0x80001f74, 0x00000010, 0x80001f75, 0x00000000, - 0x80001fc3, 0x00000010, 0x80001fc3, 0x00000010, - 0x80001fd0, 0x00000010, 0x80001fd1, 0x00000010, - 0x80001f76, 0x00000010, 0x80001f77, 0x00000010, - 0x80001fe0, 0x00000010, 0x80001fe1, 0x00000010, - 0x80001f7a, 0x00000010, 0x80001f7b, 0x00000010, - 0x80001fe5, 0x00000010, 0x80001f78, 0x00000010, - 0x80001f79, 0x00000010, 0x80001f7c, 0x00000010, - 0x80001f7d, 0x00000000, 0x80001ff3, 0x00000010, - 0x80001ff3, 0x00000010, 0x800003c9, 0x00000010, - 0x8000006b, 0x00000010, 0x800000e5, 0x00000010, - 0x80002170, 0x00000010, 0x80002171, 0x00000010, - 0x80002172, 0x00000010, 0x80002173, 0x00000010, - 0x80002174, 0x00000010, 0x80002175, 0x00000010, - 0x80002176, 0x00000010, 0x80002177, 0x00000010, - 0x80002178, 0x00000010, 0x80002179, 0x00000010, - 0x8000217a, 0x00000010, 0x8000217b, 0x00000010, - 0x8000217c, 0x00000010, 0x8000217d, 0x00000010, - 0x8000217e, 0x00000010, 0x8000217f, 0x00000010, - 0x800024d0, 0x00000010, 0x800024d1, 0x00000010, - 0x800024d2, 0x00000010, 0x800024d3, 0x00000010, - 0x800024d4, 0x00000010, 0x800024d5, 0x00000010, - 0x800024d6, 0x00000010, 0x800024d7, 0x00000010, - 0x800024d8, 0x00000010, 0x800024d9, 0x00000010, - 0x800024da, 0x00000010, 0x800024db, 0x00000010, - 0x800024dc, 0x00000010, 0x800024dd, 0x00000010, - 0x800024de, 0x00000010, 0x800024df, 0x00000010, - 0x800024e0, 0x00000010, 0x800024e1, 0x00000010, - 0x800024e2, 0x00000010, 0x800024e3, 0x00000010, - 0x800024e4, 0x00000010, 0x800024e5, 0x00000010, - 0x800024e6, 0x00000010, 0x800024e7, 0x00000010, - 0x800024e8, 0x00000010, 0x800024e9, 0x00000010, - 0x8000ff41, 0x00000010, 0x8000ff42, 0x00000010, - 0x8000ff43, 0x00000010, 0x8000ff44, 0x00000010, - 0x8000ff45, 0x00000010, 0x8000ff46, 0x00000010, - 0x8000ff47, 0x00000010, 0x8000ff48, 0x00000010, - 0x8000ff49, 0x00000010, 0x8000ff4a, 0x00000010, - 0x8000ff4b, 0x00000010, 0x8000ff4c, 0x00000010, - 0x8000ff4d, 0x00000010, 0x8000ff4e, 0x00000010, - 0x8000ff4f, 0x00000010, 0x8000ff50, 0x00000010, - 0x8000ff51, 0x00000010, 0x8000ff52, 0x00000010, - 0x8000ff53, 0x00000010, 0x8000ff54, 0x00000010, - 0x8000ff55, 0x00000010, 0x8000ff56, 0x00000010, - 0x8000ff57, 0x00000010, 0x8000ff58, 0x00000010, - 0x8000ff59, 0x00000010, 0x8000ff5a, 0x00000010, - 0x80010428, 0x00000010, 0x80010429, 0x00000010, - 0x8001042a, 0x00000010, 0x8001042b, 0x00000010, - 0x8001042c, 0x00000010, 0x8001042d, 0x00000010, - 0x8001042e, 0x00000010, 0x8001042f, 0x00000010, - 0x80010430, 0x00000010, 0x80010431, 0x00000010, - 0x80010432, 0x00000010, 0x80010433, 0x00000010, - 0x80010434, 0x00000010, 0x80010435, 0x00000010, - 0x80010436, 0x00000010, 0x80010437, 0x00000010, - 0x80010438, 0x00000010, 0x80010439, 0x00000010, - 0x8001043a, 0x00000010, 0x8001043b, 0x00000010, - 0x8001043c, 0x00000010, 0x8001043d, 0x00000010, - 0x8001043e, 0x00000010, 0x8001043f, 0x00000010, - 0x80010440, 0x00000010, 0x80010441, 0x00000010, - 0x80010442, 0x00000010, 0x80010443, 0x00000010, - 0x80010444, 0x00000010, 0x80010445, 0x00000010, - 0x80010446, 0x00000010, 0x80010447, 0x00000010, - 0x80010448, 0x00000010, 0x80010449, 0x00000010, - 0x8001044a, 0x00000010, 0x8001044b, 0x00000010, - 0x8001044c, 0x00000010, 0x8001044d, -}; - - -/* - * Cased characters and non-spacing marks (for casemap context) - */ - -#define CASEMAP_CTX_BITS_0 9 -#define CASEMAP_CTX_BITS_1 7 -#define CASEMAP_CTX_BITS_2 5 - -#define CTX_CASED 1 -#define CTX_NSM 2 - -static const unsigned short v310_casemap_ctx_imap[] = { - 272, 400, 528, 656, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 912, - 1040, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 1168, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, - 0, 0, 1, 1, 0, 2, 3, 3, - 4, 4, 4, 4, 4, 5, 6, 4, - 4, 7, 8, 4, 4, 9, 0, 0, - 10, 10, 11, 12, 13, 14, 15, 16, - 4, 4, 4, 4, 17, 4, 18, 19, - 0, 20, 21, 22, 23, 24, 25, 0, - 0, 0, 26, 27, 0, 0, 28, 29, - 30, 31, 32, 0, 0, 33, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 34, 35, 36, 37, 38, 35, 39, 37, - 40, 35, 41, 42, 34, 35, 43, 0, - 38, 44, 45, 0, 40, 0, 46, 0, - 0, 47, 48, 0, 0, 49, 50, 0, - 0, 0, 51, 0, 0, 0, 52, 0, - 0, 53, 54, 0, 0, 55, 56, 0, - 57, 58, 0, 59, 60, 61, 62, 0, - 0, 63, 57, 0, 0, 4, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 66, 0, - 0, 0, 0, 0, 0, 67, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 4, 4, 68, 4, 4, 69, - 70, 4, 71, 72, 4, 73, 74, 75, - 0, 0, 0, 76, 0, 0, 77, 38, - 78, 79, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 80, 0, 0, 81, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 82, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 83, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 84, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 85, 86, 87, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 4, 4, 88, 4, 89, 90, 91, 4, - 92, 93, 94, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 95, 96, 5, - 88, 88, 97, 97, 98, 98, 99, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned char tbl[32]; -} v310_casemap_ctx_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, - }}, - {{ - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 2, - }}, - {{ - 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, - }}, - {{ - 2, 2, 2, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, - }}, - {{ - 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - }}, - {{ - 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, - }}, - {{ - 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, - 0, 2, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, - }}, - {{ - 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, - 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, - }}, - {{ - 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, - }}, - {{ - 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, - 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, - }}, - {{ - 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, - }}, - {{ - 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, - }}, - {{ - 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, - }}, - {{ - 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, - }}, - {{ - 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - }}, - {{ - 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; - -/* - * Case Folding - */ - -#define CASE_FOLDING_BITS_0 9 -#define CASE_FOLDING_BITS_1 7 -#define CASE_FOLDING_BITS_2 5 - -static const unsigned short v310_case_folding_imap[] = { - 272, 400, 528, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 784, - 912, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 656, 656, 656, 656, 656, 656, 656, 656, - 0, 0, 1, 0, 0, 2, 3, 0, - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 14, 0, 15, 16, 17, 18, - 19, 20, 0, 21, 22, 23, 24, 25, - 0, 26, 27, 0, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 0, 46, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 47, 48, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 49, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 50, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 51, 52, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static const struct { - unsigned short tbl[32]; -} v310_case_folding_table[] = { - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 0, 51, 52, 53, 54, 55, 56, 57, 58, - }}, - {{ - 60, 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, - 0, 66, 0, 67, 0, 68, 0, 69, 0, 70, 0, - 71, 0, 72, 0, 73, 0, 74, 0, 75, 0, - }}, - {{ - 76, 0, 77, 0, 78, 0, 79, 0, 80, 0, 81, - 0, 82, 0, 83, 0, 84, 85, 86, 0, 87, 0, - 88, 0, 0, 89, 0, 90, 0, 91, 0, 92, - }}, - {{ - 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 99, - 0, 100, 0, 101, 0, 102, 0, 103, 0, 104, 0, - 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, - }}, - {{ - 110, 0, 111, 0, 112, 0, 113, 0, 114, 0, 115, - 0, 116, 0, 117, 0, 118, 0, 119, 0, 120, 0, - 121, 0, 122, 123, 0, 124, 0, 125, 0, 126, - }}, - {{ - 0, 127, 128, 0, 129, 0, 130, 131, 0, 132, 133, - 134, 0, 0, 135, 136, 137, 138, 0, 139, 140, 0, - 141, 142, 143, 0, 0, 0, 144, 145, 0, 146, - }}, - {{ - 147, 0, 148, 0, 149, 0, 150, 151, 0, 152, 0, - 0, 153, 0, 154, 155, 0, 156, 157, 158, 0, 159, - 0, 160, 161, 0, 0, 0, 162, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 163, 164, 0, 165, 166, 0, 167, - 168, 0, 169, 0, 170, 0, 171, 0, 172, 0, 173, - 0, 174, 0, 175, 0, 176, 0, 0, 177, 0, - }}, - {{ - 178, 0, 179, 0, 180, 0, 181, 0, 182, 0, 183, - 0, 184, 0, 185, 0, 186, 188, 189, 0, 190, 0, - 191, 192, 193, 0, 194, 0, 195, 0, 196, 0, - }}, - {{ - 197, 0, 198, 0, 199, 0, 200, 0, 201, 0, 202, - 0, 203, 0, 204, 0, 205, 0, 206, 0, 207, 0, - 208, 0, 209, 0, 210, 0, 211, 0, 212, 0, - }}, - {{ - 0, 0, 213, 0, 214, 0, 215, 0, 216, 0, 217, - 0, 218, 0, 219, 0, 220, 0, 221, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 223, 0, 224, 225, 226, - 0, 227, 0, 228, 229, 230, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - }}, - {{ - 248, 249, 0, 250, 251, 252, 253, 254, 255, 256, 257, - 258, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 263, 264, 0, 0, 0, 265, - 266, 0, 0, 0, 267, 0, 268, 0, 269, 0, - }}, - {{ - 270, 0, 271, 0, 272, 0, 273, 0, 274, 0, 275, - 0, 276, 0, 277, 0, 278, 279, 280, 0, 281, 282, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - }}, - {{ - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 331, 0, 332, 0, 333, 0, 334, 0, 335, 0, 336, - 0, 337, 0, 338, 0, 339, 0, 340, 0, 341, 0, - 342, 0, 343, 0, 344, 0, 345, 0, 346, 0, - }}, - {{ - 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 348, 0, 349, 0, 350, 0, 351, 0, 352, 0, - 353, 0, 354, 0, 355, 0, 356, 0, 357, 0, - }}, - {{ - 358, 0, 359, 0, 360, 0, 361, 0, 362, 0, 363, - 0, 364, 0, 365, 0, 366, 0, 367, 0, 368, 0, - 369, 0, 370, 0, 371, 0, 372, 0, 373, 0, - }}, - {{ - 0, 374, 0, 375, 0, 0, 0, 376, 0, 0, 0, - 377, 0, 0, 0, 0, 378, 0, 379, 0, 380, 0, - 381, 0, 382, 0, 383, 0, 384, 0, 385, 0, - }}, - {{ - 386, 0, 387, 0, 388, 0, 389, 0, 390, 0, 391, - 0, 392, 0, 393, 0, 394, 0, 395, 0, 396, 0, - 0, 0, 397, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, - }}, - {{ - 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 436, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 438, 0, 439, 0, 440, 0, 441, 0, 442, 0, 443, - 0, 444, 0, 445, 0, 446, 0, 447, 0, 448, 0, - 449, 0, 450, 0, 451, 0, 452, 0, 453, 0, - }}, - {{ - 454, 0, 455, 0, 456, 0, 457, 0, 458, 0, 459, - 0, 460, 0, 461, 0, 462, 0, 463, 0, 464, 0, - 465, 0, 466, 0, 467, 0, 468, 0, 469, 0, - }}, - {{ - 470, 0, 471, 0, 472, 0, 473, 0, 474, 0, 475, - 0, 476, 0, 477, 0, 478, 0, 479, 0, 480, 0, - 481, 0, 482, 0, 483, 0, 484, 0, 485, 0, - }}, - {{ - 486, 0, 487, 0, 488, 0, 489, 0, 490, 0, 491, - 0, 492, 0, 493, 0, 494, 0, 495, 0, 496, 0, - 497, 0, 498, 0, 499, 0, 500, 0, 501, 0, - }}, - {{ - 502, 0, 503, 0, 504, 0, 505, 0, 506, 0, 507, - 0, 508, 0, 509, 0, 510, 0, 511, 0, 512, 0, - 513, 515, 517, 519, 521, 523, 0, 0, 0, 0, - }}, - {{ - 524, 0, 525, 0, 526, 0, 527, 0, 528, 0, 529, - 0, 530, 0, 531, 0, 532, 0, 533, 0, 534, 0, - 535, 0, 536, 0, 537, 0, 538, 0, 539, 0, - }}, - {{ - 540, 0, 541, 0, 542, 0, 543, 0, 544, 0, 545, - 0, 546, 0, 547, 0, 548, 0, 549, 0, 550, 0, - 551, 0, 552, 0, 553, 0, 554, 0, 555, 0, - }}, - {{ - 556, 0, 557, 0, 558, 0, 559, 0, 560, 0, 561, - 0, 562, 0, 563, 0, 564, 0, 565, 0, 566, 0, - 567, 0, 568, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 569, 570, 571, - 572, 573, 574, 575, 576, 0, 0, 0, 0, 0, 0, - 0, 0, 577, 578, 579, 580, 581, 582, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 583, 584, 585, - 586, 587, 588, 589, 590, 0, 0, 0, 0, 0, 0, - 0, 0, 591, 592, 593, 594, 595, 596, 597, 598, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 599, 600, 601, - 602, 603, 604, 0, 0, 605, 0, 607, 0, 610, 0, - 613, 0, 0, 616, 0, 617, 0, 618, 0, 619, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 620, 621, 622, - 623, 624, 625, 626, 627, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 628, 630, 632, 634, 636, 638, 640, 642, 646, 649, 652, - 655, 658, 661, 664, 667, 668, 670, 672, 674, 676, 678, - 680, 682, 686, 689, 692, 695, 698, 701, 704, 707, - }}, - {{ - 708, 710, 712, 714, 716, 718, 720, 722, 726, 729, 732, - 735, 738, 741, 744, 747, 0, 0, 748, 750, 752, 0, - 754, 756, 759, 760, 761, 762, 765, 0, 766, 0, - }}, - {{ - 0, 0, 767, 769, 771, 0, 773, 775, 778, 779, 780, - 781, 784, 0, 0, 0, 0, 0, 785, 788, 0, 0, - 791, 793, 796, 797, 798, 799, 0, 0, 0, 0, - }}, - {{ - 0, 0, 800, 803, 806, 0, 808, 810, 813, 814, 815, - 816, 817, 0, 0, 0, 0, 0, 818, 820, 822, 0, - 824, 826, 829, 830, 831, 832, 835, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 837, - 838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, - 850, 851, 852, 853, 854, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, - }}, - {{ - 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, - 876, 877, 878, 879, 880, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 881, 883, 885, 887, 890, 893, 895, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 897, 899, 901, - 903, 905, 0, 0, 0, 0, 0, 0, 0, 0, - }}, - {{ - 0, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, - 928, 929, 930, 931, 932, 0, 0, 0, 0, 0, - }}, - {{ - 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, - 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, - }}, - {{ - 965, 966, 967, 968, 969, 970, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - }}, -}; -static const unsigned long v310_case_folding_seq[] = { - 0x00000000, 0x80000061, 0x80000062, 0x80000063, - 0x80000064, 0x80000065, 0x80000066, 0x80000067, - 0x80000068, 0x80000069, 0x8000006a, 0x8000006b, - 0x8000006c, 0x8000006d, 0x8000006e, 0x8000006f, - 0x80000070, 0x80000071, 0x80000072, 0x80000073, - 0x80000074, 0x80000075, 0x80000076, 0x80000077, - 0x80000078, 0x80000079, 0x8000007a, 0x800003bc, - 0x800000e0, 0x800000e1, 0x800000e2, 0x800000e3, - 0x800000e4, 0x800000e5, 0x800000e6, 0x800000e7, - 0x800000e8, 0x800000e9, 0x800000ea, 0x800000eb, - 0x800000ec, 0x800000ed, 0x800000ee, 0x800000ef, - 0x800000f0, 0x800000f1, 0x800000f2, 0x800000f3, - 0x800000f4, 0x800000f5, 0x800000f6, 0x800000f8, - 0x800000f9, 0x800000fa, 0x800000fb, 0x800000fc, - 0x800000fd, 0x800000fe, 0x00000073, 0x80000073, - 0x80000101, 0x80000103, 0x80000105, 0x80000107, - 0x80000109, 0x8000010b, 0x8000010d, 0x8000010f, - 0x80000111, 0x80000113, 0x80000115, 0x80000117, - 0x80000119, 0x8000011b, 0x8000011d, 0x8000011f, - 0x80000121, 0x80000123, 0x80000125, 0x80000127, - 0x80000129, 0x8000012b, 0x8000012d, 0x8000012f, - 0x80000069, 0x80000069, 0x80000133, 0x80000135, - 0x80000137, 0x8000013a, 0x8000013c, 0x8000013e, - 0x80000140, 0x80000142, 0x80000144, 0x80000146, - 0x80000148, 0x000002bc, 0x8000006e, 0x8000014b, - 0x8000014d, 0x8000014f, 0x80000151, 0x80000153, - 0x80000155, 0x80000157, 0x80000159, 0x8000015b, - 0x8000015d, 0x8000015f, 0x80000161, 0x80000163, - 0x80000165, 0x80000167, 0x80000169, 0x8000016b, - 0x8000016d, 0x8000016f, 0x80000171, 0x80000173, - 0x80000175, 0x80000177, 0x800000ff, 0x8000017a, - 0x8000017c, 0x8000017e, 0x80000073, 0x80000253, - 0x80000183, 0x80000185, 0x80000254, 0x80000188, - 0x80000256, 0x80000257, 0x8000018c, 0x800001dd, - 0x80000259, 0x8000025b, 0x80000192, 0x80000260, - 0x80000263, 0x80000269, 0x80000268, 0x80000199, - 0x8000026f, 0x80000272, 0x80000275, 0x800001a1, - 0x800001a3, 0x800001a5, 0x80000280, 0x800001a8, - 0x80000283, 0x800001ad, 0x80000288, 0x800001b0, - 0x8000028a, 0x8000028b, 0x800001b4, 0x800001b6, - 0x80000292, 0x800001b9, 0x800001bd, 0x800001c6, - 0x800001c6, 0x800001c9, 0x800001c9, 0x800001cc, - 0x800001cc, 0x800001ce, 0x800001d0, 0x800001d2, - 0x800001d4, 0x800001d6, 0x800001d8, 0x800001da, - 0x800001dc, 0x800001df, 0x800001e1, 0x800001e3, - 0x800001e5, 0x800001e7, 0x800001e9, 0x800001eb, - 0x800001ed, 0x800001ef, 0x0000006a, 0x8000030c, - 0x800001f3, 0x800001f3, 0x800001f5, 0x80000195, - 0x800001bf, 0x800001f9, 0x800001fb, 0x800001fd, - 0x800001ff, 0x80000201, 0x80000203, 0x80000205, - 0x80000207, 0x80000209, 0x8000020b, 0x8000020d, - 0x8000020f, 0x80000211, 0x80000213, 0x80000215, - 0x80000217, 0x80000219, 0x8000021b, 0x8000021d, - 0x8000021f, 0x80000223, 0x80000225, 0x80000227, - 0x80000229, 0x8000022b, 0x8000022d, 0x8000022f, - 0x80000231, 0x80000233, 0x800003b9, 0x800003ac, - 0x800003ad, 0x800003ae, 0x800003af, 0x800003cc, - 0x800003cd, 0x800003ce, 0x000003b9, 0x00000308, - 0x80000301, 0x800003b1, 0x800003b2, 0x800003b3, - 0x800003b4, 0x800003b5, 0x800003b6, 0x800003b7, - 0x800003b8, 0x800003b9, 0x800003ba, 0x800003bb, - 0x800003bc, 0x800003bd, 0x800003be, 0x800003bf, - 0x800003c0, 0x800003c1, 0x800003c3, 0x800003c4, - 0x800003c5, 0x800003c6, 0x800003c7, 0x800003c8, - 0x800003c9, 0x800003ca, 0x800003cb, 0x000003c5, - 0x00000308, 0x80000301, 0x800003c3, 0x800003b2, - 0x800003b8, 0x800003c6, 0x800003c0, 0x800003db, - 0x800003dd, 0x800003df, 0x800003e1, 0x800003e3, - 0x800003e5, 0x800003e7, 0x800003e9, 0x800003eb, - 0x800003ed, 0x800003ef, 0x800003ba, 0x800003c1, - 0x800003c3, 0x800003b8, 0x800003b5, 0x80000450, - 0x80000451, 0x80000452, 0x80000453, 0x80000454, - 0x80000455, 0x80000456, 0x80000457, 0x80000458, - 0x80000459, 0x8000045a, 0x8000045b, 0x8000045c, - 0x8000045d, 0x8000045e, 0x8000045f, 0x80000430, - 0x80000431, 0x80000432, 0x80000433, 0x80000434, - 0x80000435, 0x80000436, 0x80000437, 0x80000438, - 0x80000439, 0x8000043a, 0x8000043b, 0x8000043c, - 0x8000043d, 0x8000043e, 0x8000043f, 0x80000440, - 0x80000441, 0x80000442, 0x80000443, 0x80000444, - 0x80000445, 0x80000446, 0x80000447, 0x80000448, - 0x80000449, 0x8000044a, 0x8000044b, 0x8000044c, - 0x8000044d, 0x8000044e, 0x8000044f, 0x80000461, - 0x80000463, 0x80000465, 0x80000467, 0x80000469, - 0x8000046b, 0x8000046d, 0x8000046f, 0x80000471, - 0x80000473, 0x80000475, 0x80000477, 0x80000479, - 0x8000047b, 0x8000047d, 0x8000047f, 0x80000481, - 0x8000048d, 0x8000048f, 0x80000491, 0x80000493, - 0x80000495, 0x80000497, 0x80000499, 0x8000049b, - 0x8000049d, 0x8000049f, 0x800004a1, 0x800004a3, - 0x800004a5, 0x800004a7, 0x800004a9, 0x800004ab, - 0x800004ad, 0x800004af, 0x800004b1, 0x800004b3, - 0x800004b5, 0x800004b7, 0x800004b9, 0x800004bb, - 0x800004bd, 0x800004bf, 0x800004c2, 0x800004c4, - 0x800004c8, 0x800004cc, 0x800004d1, 0x800004d3, - 0x800004d5, 0x800004d7, 0x800004d9, 0x800004db, - 0x800004dd, 0x800004df, 0x800004e1, 0x800004e3, - 0x800004e5, 0x800004e7, 0x800004e9, 0x800004eb, - 0x800004ed, 0x800004ef, 0x800004f1, 0x800004f3, - 0x800004f5, 0x800004f9, 0x80000561, 0x80000562, - 0x80000563, 0x80000564, 0x80000565, 0x80000566, - 0x80000567, 0x80000568, 0x80000569, 0x8000056a, - 0x8000056b, 0x8000056c, 0x8000056d, 0x8000056e, - 0x8000056f, 0x80000570, 0x80000571, 0x80000572, - 0x80000573, 0x80000574, 0x80000575, 0x80000576, - 0x80000577, 0x80000578, 0x80000579, 0x8000057a, - 0x8000057b, 0x8000057c, 0x8000057d, 0x8000057e, - 0x8000057f, 0x80000580, 0x80000581, 0x80000582, - 0x80000583, 0x80000584, 0x80000585, 0x80000586, - 0x00000565, 0x80000582, 0x80001e01, 0x80001e03, - 0x80001e05, 0x80001e07, 0x80001e09, 0x80001e0b, - 0x80001e0d, 0x80001e0f, 0x80001e11, 0x80001e13, - 0x80001e15, 0x80001e17, 0x80001e19, 0x80001e1b, - 0x80001e1d, 0x80001e1f, 0x80001e21, 0x80001e23, - 0x80001e25, 0x80001e27, 0x80001e29, 0x80001e2b, - 0x80001e2d, 0x80001e2f, 0x80001e31, 0x80001e33, - 0x80001e35, 0x80001e37, 0x80001e39, 0x80001e3b, - 0x80001e3d, 0x80001e3f, 0x80001e41, 0x80001e43, - 0x80001e45, 0x80001e47, 0x80001e49, 0x80001e4b, - 0x80001e4d, 0x80001e4f, 0x80001e51, 0x80001e53, - 0x80001e55, 0x80001e57, 0x80001e59, 0x80001e5b, - 0x80001e5d, 0x80001e5f, 0x80001e61, 0x80001e63, - 0x80001e65, 0x80001e67, 0x80001e69, 0x80001e6b, - 0x80001e6d, 0x80001e6f, 0x80001e71, 0x80001e73, - 0x80001e75, 0x80001e77, 0x80001e79, 0x80001e7b, - 0x80001e7d, 0x80001e7f, 0x80001e81, 0x80001e83, - 0x80001e85, 0x80001e87, 0x80001e89, 0x80001e8b, - 0x80001e8d, 0x80001e8f, 0x80001e91, 0x80001e93, - 0x80001e95, 0x00000068, 0x80000331, 0x00000074, - 0x80000308, 0x00000077, 0x8000030a, 0x00000079, - 0x8000030a, 0x00000061, 0x800002be, 0x80001e61, - 0x80001ea1, 0x80001ea3, 0x80001ea5, 0x80001ea7, - 0x80001ea9, 0x80001eab, 0x80001ead, 0x80001eaf, - 0x80001eb1, 0x80001eb3, 0x80001eb5, 0x80001eb7, - 0x80001eb9, 0x80001ebb, 0x80001ebd, 0x80001ebf, - 0x80001ec1, 0x80001ec3, 0x80001ec5, 0x80001ec7, - 0x80001ec9, 0x80001ecb, 0x80001ecd, 0x80001ecf, - 0x80001ed1, 0x80001ed3, 0x80001ed5, 0x80001ed7, - 0x80001ed9, 0x80001edb, 0x80001edd, 0x80001edf, - 0x80001ee1, 0x80001ee3, 0x80001ee5, 0x80001ee7, - 0x80001ee9, 0x80001eeb, 0x80001eed, 0x80001eef, - 0x80001ef1, 0x80001ef3, 0x80001ef5, 0x80001ef7, - 0x80001ef9, 0x80001f00, 0x80001f01, 0x80001f02, - 0x80001f03, 0x80001f04, 0x80001f05, 0x80001f06, - 0x80001f07, 0x80001f10, 0x80001f11, 0x80001f12, - 0x80001f13, 0x80001f14, 0x80001f15, 0x80001f20, - 0x80001f21, 0x80001f22, 0x80001f23, 0x80001f24, - 0x80001f25, 0x80001f26, 0x80001f27, 0x80001f30, - 0x80001f31, 0x80001f32, 0x80001f33, 0x80001f34, - 0x80001f35, 0x80001f36, 0x80001f37, 0x80001f40, - 0x80001f41, 0x80001f42, 0x80001f43, 0x80001f44, - 0x80001f45, 0x000003c5, 0x80000313, 0x000003c5, - 0x00000313, 0x80000300, 0x000003c5, 0x00000313, - 0x80000301, 0x000003c5, 0x00000313, 0x80000342, - 0x80001f51, 0x80001f53, 0x80001f55, 0x80001f57, - 0x80001f60, 0x80001f61, 0x80001f62, 0x80001f63, - 0x80001f64, 0x80001f65, 0x80001f66, 0x80001f67, - 0x00001f00, 0x800003b9, 0x00001f01, 0x800003b9, - 0x00001f02, 0x800003b9, 0x00001f03, 0x800003b9, - 0x00001f04, 0x800003b9, 0x00001f05, 0x800003b9, - 0x00001f06, 0x800003b9, 0x00001f07, 0x800003b9, - 0x00001f00, 0x800003b9, 0x80001f80, 0x00001f01, - 0x800003b9, 0x80001f81, 0x00001f02, 0x800003b9, - 0x80001f82, 0x00001f03, 0x800003b9, 0x80001f83, - 0x00001f04, 0x800003b9, 0x80001f84, 0x00001f05, - 0x800003b9, 0x80001f85, 0x00001f06, 0x800003b9, - 0x80001f86, 0x00001f07, 0x800003b9, 0x80001f87, - 0x00001f20, 0x800003b9, 0x00001f21, 0x800003b9, - 0x00001f22, 0x800003b9, 0x00001f23, 0x800003b9, - 0x00001f24, 0x800003b9, 0x00001f25, 0x800003b9, - 0x00001f26, 0x800003b9, 0x00001f27, 0x800003b9, - 0x00001f20, 0x800003b9, 0x80001f90, 0x00001f21, - 0x800003b9, 0x80001f91, 0x00001f22, 0x800003b9, - 0x80001f92, 0x00001f23, 0x800003b9, 0x80001f93, - 0x00001f24, 0x800003b9, 0x80001f94, 0x00001f25, - 0x800003b9, 0x80001f95, 0x00001f26, 0x800003b9, - 0x80001f96, 0x00001f27, 0x800003b9, 0x80001f97, - 0x00001f60, 0x800003b9, 0x00001f61, 0x800003b9, - 0x00001f62, 0x800003b9, 0x00001f63, 0x800003b9, - 0x00001f64, 0x800003b9, 0x00001f65, 0x800003b9, - 0x00001f66, 0x800003b9, 0x00001f67, 0x800003b9, - 0x00001f60, 0x800003b9, 0x80001fa0, 0x00001f61, - 0x800003b9, 0x80001fa1, 0x00001f62, 0x800003b9, - 0x80001fa2, 0x00001f63, 0x800003b9, 0x80001fa3, - 0x00001f64, 0x800003b9, 0x80001fa4, 0x00001f65, - 0x800003b9, 0x80001fa5, 0x00001f66, 0x800003b9, - 0x80001fa6, 0x00001f67, 0x800003b9, 0x80001fa7, - 0x00001f70, 0x800003b9, 0x000003b1, 0x800003b9, - 0x000003ac, 0x800003b9, 0x000003b1, 0x80000342, - 0x000003b1, 0x00000342, 0x800003b9, 0x80001fb0, - 0x80001fb1, 0x80001f70, 0x80001f71, 0x000003b1, - 0x800003b9, 0x80001fb3, 0x800003b9, 0x00001f74, - 0x800003b9, 0x000003b7, 0x800003b9, 0x000003ae, - 0x800003b9, 0x000003b7, 0x80000342, 0x000003b7, - 0x00000342, 0x800003b9, 0x80001f72, 0x80001f73, - 0x80001f74, 0x80001f75, 0x000003b7, 0x800003b9, - 0x80001fc3, 0x000003b9, 0x00000308, 0x80000300, - 0x000003b9, 0x00000308, 0x80000301, 0x000003b9, - 0x80000342, 0x000003b9, 0x00000308, 0x80000342, - 0x80001fd0, 0x80001fd1, 0x80001f76, 0x80001f77, - 0x000003c5, 0x00000308, 0x80000300, 0x000003c5, - 0x00000308, 0x80000301, 0x000003c1, 0x80000313, - 0x000003c5, 0x80000342, 0x000003c5, 0x00000308, - 0x80000342, 0x80001fe0, 0x80001fe1, 0x80001f7a, - 0x80001f7b, 0x80001fe5, 0x00001f7c, 0x800003b9, - 0x000003c9, 0x800003b9, 0x000003ce, 0x800003b9, - 0x000003c9, 0x80000342, 0x000003c9, 0x00000342, - 0x800003b9, 0x80001f78, 0x80001f79, 0x80001f7c, - 0x80001f7d, 0x000003c9, 0x800003b9, 0x80001ff3, - 0x800003c9, 0x8000006b, 0x800000e5, 0x80002170, - 0x80002171, 0x80002172, 0x80002173, 0x80002174, - 0x80002175, 0x80002176, 0x80002177, 0x80002178, - 0x80002179, 0x8000217a, 0x8000217b, 0x8000217c, - 0x8000217d, 0x8000217e, 0x8000217f, 0x800024d0, - 0x800024d1, 0x800024d2, 0x800024d3, 0x800024d4, - 0x800024d5, 0x800024d6, 0x800024d7, 0x800024d8, - 0x800024d9, 0x800024da, 0x800024db, 0x800024dc, - 0x800024dd, 0x800024de, 0x800024df, 0x800024e0, - 0x800024e1, 0x800024e2, 0x800024e3, 0x800024e4, - 0x800024e5, 0x800024e6, 0x800024e7, 0x800024e8, - 0x800024e9, 0x00000066, 0x80000066, 0x00000066, - 0x80000069, 0x00000066, 0x8000006c, 0x00000066, - 0x00000066, 0x80000069, 0x00000066, 0x00000066, - 0x8000006c, 0x00000073, 0x80000074, 0x00000073, - 0x80000074, 0x00000574, 0x80000576, 0x00000574, - 0x80000565, 0x00000574, 0x8000056b, 0x0000057e, - 0x80000576, 0x00000574, 0x8000056d, 0x8000ff41, - 0x8000ff42, 0x8000ff43, 0x8000ff44, 0x8000ff45, - 0x8000ff46, 0x8000ff47, 0x8000ff48, 0x8000ff49, - 0x8000ff4a, 0x8000ff4b, 0x8000ff4c, 0x8000ff4d, - 0x8000ff4e, 0x8000ff4f, 0x8000ff50, 0x8000ff51, - 0x8000ff52, 0x8000ff53, 0x8000ff54, 0x8000ff55, - 0x8000ff56, 0x8000ff57, 0x8000ff58, 0x8000ff59, - 0x8000ff5a, 0x80010428, 0x80010429, 0x8001042a, - 0x8001042b, 0x8001042c, 0x8001042d, 0x8001042e, - 0x8001042f, 0x80010430, 0x80010431, 0x80010432, - 0x80010433, 0x80010434, 0x80010435, 0x80010436, - 0x80010437, 0x80010438, 0x80010439, 0x8001043a, - 0x8001043b, 0x8001043c, 0x8001043d, 0x8001043e, - 0x8001043f, 0x80010440, 0x80010441, 0x80010442, - 0x80010443, 0x80010444, 0x80010445, 0x80010446, - 0x80010447, 0x80010448, 0x80010449, 0x8001044a, - 0x8001044b, 0x8001044c, 0x8001044d, -}; - diff --git a/contrib/idn/mdnkit/lib/unormalize.c b/contrib/idn/mdnkit/lib/unormalize.c deleted file mode 100644 index f6973dd62b..0000000000 --- a/contrib/idn/mdnkit/lib/unormalize.c +++ /dev/null @@ -1,471 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: unormalize.c,v 1.1 2002/01/02 02:46:50 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) -#define memmove(a,b,c) bcopy((char *)(b),(char *)(a),(int)(c)) -#endif - -#define WORKBUF_SIZE 128 -#define WORKBUF_SIZE_MAX 10000 - -typedef struct { - mdn__unicode_version_t version; /* Unicode version */ - int cur; /* pointing now processing character */ - int last; /* pointing just after the last character */ - int size; /* size of UCS and CLASS array */ - unsigned long *ucs; /* UCS-4 characters */ - int *class; /* and their canonical classes */ - unsigned long ucs_buf[WORKBUF_SIZE]; /* local buffer */ - int class_buf[WORKBUF_SIZE]; /* ditto */ -} workbuf_t; - -static mdn_result_t normalize(mdn__unicode_version_t version, - int do_composition, int compat, - const char *from, char *to, size_t tolen); -static mdn_result_t decompose(workbuf_t *wb, unsigned long c, int compat); -static void get_class(workbuf_t *wb); -static void reorder(workbuf_t *wb); -static void compose(workbuf_t *wb); -static mdn_result_t flush_before_cur(workbuf_t *wb, - char **top, size_t *tolenp); -static void workbuf_init(workbuf_t *wb); -static void workbuf_free(workbuf_t *wb); -static mdn_result_t workbuf_extend(workbuf_t *wb); -static mdn_result_t workbuf_append(workbuf_t *wb, unsigned long c); -static void workbuf_shift(workbuf_t *wb, int shift); -static void workbuf_removevoid(workbuf_t *wb); - - -mdn_result_t -mdn__unormalize_formc(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen) -{ - assert(version != NULL && from != NULL && to != NULL && tolen >= 0); - TRACE(("mdn__unormalize_formc(from=\"%s\", tolen=%d)\n", - mdn_debug_xstring(from, 20), tolen)); - return (normalize(version, 1, 0, from, to, tolen)); -} - -mdn_result_t -mdn__unormalize_formd(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen) -{ - assert(version != NULL && from != NULL && to != NULL && tolen >= 0); - TRACE(("mdn__unormalize_formd(from=\"%s\", tolen=%d)\n", - mdn_debug_xstring(from, 20), tolen)); - return (normalize(version, 0, 0, from, to, tolen)); -} - -mdn_result_t -mdn__unormalize_formkc(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen) -{ - assert(version != NULL && from != NULL && to != NULL && tolen >= 0); - TRACE(("mdn__unormalize_formkc(from=\"%s\", tolen=%d)\n", - mdn_debug_xstring(from, 20), tolen)); - return (normalize(version, 1, 1, from, to, tolen)); -} - -mdn_result_t -mdn__unormalize_formkd(mdn__unicode_version_t version, - const char *from, char *to, size_t tolen) -{ - assert(version != NULL && from != NULL && to != NULL && tolen >= 0); - TRACE(("mdn__unormalize_formkd(from=\"%s\", tolen=%d)\n", - mdn_debug_xstring(from, 20), tolen)); - return (normalize(version, 0, 1, from, to, tolen)); -} - -static mdn_result_t -normalize(mdn__unicode_version_t version, int do_composition, int compat, - const char *from, char *to, size_t tolen) -{ - workbuf_t wb; - size_t fromlen = strlen(from); - mdn_result_t r = mdn_success; - - /* - * Initialize working buffer. - */ - workbuf_init(&wb); - wb.version = version; - - while (fromlen > 0) { - unsigned long c; - int mblen; - - assert(wb.cur == wb.last); - - /* - * Get one character from 'from'. - */ - if ((mblen = mdn_utf8_getwc(from, fromlen, &c)) == 0) { - r = mdn_invalid_encoding; - break; - } - from += mblen; - fromlen -= mblen; - - /* - * Decompose it. - */ - if ((r = decompose(&wb, c, compat)) != mdn_success) - break; - - /* - * Get canonical class. - */ - get_class(&wb); - - /* - * Reorder & compose. - */ - for (; wb.cur < wb.last; wb.cur++) { - if (wb.cur == 0) { - continue; - } else if (wb.class[wb.cur] > 0) { - /* - * This is not a starter. Try reordering. - * Note that characters up to it are - * already in canonical order. - */ - reorder(&wb); - continue; - } - - /* - * This is a starter character, and there are - * some characters before it. Those characters - * have been reordered properly, and - * ready for composition. - */ - if (do_composition && wb.class[0] == 0) - compose(&wb); - - /* - * If CUR points to a starter character, - * then process of characters before CUR are - * already finished, because any further - * reordering/composition for them are blocked - * by the starter CUR points. - */ - if (wb.cur > 0 && wb.class[wb.cur] == 0) { - /* Flush everything before CUR. */ - r = flush_before_cur(&wb, &to, &tolen); - if (r != mdn_success) - break; - } - } - } - - if (r == mdn_success) { - if (do_composition && wb.cur > 0 && wb.class[0] == 0) { - /* - * There is some characters left in WB. - * They are ordered, but not composed yet. - * Now CUR points just after the last character in WB, - * and since compose() tries to compose characters - * between top and CUR inclusive, we must make CUR - * one character back during compose(). - */ - wb.cur--; - compose(&wb); - wb.cur++; - } - /* - * Call this even when WB.CUR == 0, to make TO - * NUL-terminated. - */ - r = flush_before_cur(&wb, &to, &tolen); - } - - workbuf_free(&wb); - return (r); -} - -static mdn_result_t -decompose(workbuf_t *wb, unsigned long c, int compat) { - mdn_result_t r; - int dec_len; - -again: - r = mdn__unicode_decompose(wb->version, compat, wb->ucs + wb->last, - wb->size - wb->last, c, &dec_len); - switch (r) { - case mdn_success: - wb->last += dec_len; - return (mdn_success); - case mdn_notfound: - return (workbuf_append(wb, c)); - case mdn_buffer_overflow: - if ((r = workbuf_extend(wb)) != mdn_success) - return (r); - if (wb->size > WORKBUF_SIZE_MAX) { - WARNING(("mdn__unormalize_form*: " - "working buffer too large\n")); - return (mdn_nomemory); - } - goto again; - default: - return (r); - } - /* NOTREACHED */ -} - -static void -get_class(workbuf_t *wb) { - int i; - - for (i = wb->cur; i < wb->last; i++) - wb->class[i] = mdn__unicode_canonicalclass(wb->version, - wb->ucs[i]); -} - -static void -reorder(workbuf_t *wb) { - unsigned long c; - int i; - int class; - - assert(wb != NULL); - - i = wb->cur; - c = wb->ucs[i]; - class = wb->class[i]; - - while (i > 0 && wb->class[i - 1] > class) { - wb->ucs[i] = wb->ucs[i - 1]; - wb->class[i] =wb->class[i - 1]; - i--; - wb->ucs[i] = c; - wb->class[i] = class; - } -} - -static void -compose(workbuf_t *wb) { - int cur; - unsigned long *ucs; - int *class; - int last_class; - int nvoids; - int i; - mdn__unicode_version_t ver; - - assert(wb != NULL && wb->class[0] == 0); - - cur = wb->cur; - ucs = wb->ucs; - class = wb->class; - ver = wb->version; - - /* - * If there are no decomposition sequence that begins with - * the top character, composition is impossible. - */ - if (!mdn__unicode_iscompositecandidate(ver, ucs[0])) - return; - - last_class = 0; - nvoids = 0; - for (i = 1; i <= cur; i++) { - unsigned long c; - int cl = class[i]; - - if ((last_class < cl || cl == 0) && - mdn__unicode_compose(ver, ucs[0], ucs[i], - &c) == mdn_success) { - /* - * Replace the top character with the composed one. - */ - ucs[0] = c; - class[0] = mdn__unicode_canonicalclass(ver, c); - - class[i] = -1; /* void this character */ - nvoids++; - } else { - last_class = cl; - } - } - - /* Purge void characters, if any. */ - if (nvoids > 0) - workbuf_removevoid(wb); -} - -static mdn_result_t -flush_before_cur(workbuf_t *wb, char **top, size_t *tolenp) { - int cur = wb->cur; - char *to = *top; - size_t tolen = *tolenp; - int i; - - for (i = 0; i < cur; i++) { - int len = mdn_utf8_putwc(to, tolen, wb->ucs[i]); - if (len == 0) - return (mdn_buffer_overflow); - to += len; - tolen -= len; - } - if (tolen < 1) - return (mdn_buffer_overflow); - *to = '\0'; - - *top = to; - *tolenp = tolen; - - workbuf_shift(wb, cur); - - return (mdn_success); -} - -static void -workbuf_init(workbuf_t *wb) { - wb->cur = 0; - wb->last = 0; - wb->size = WORKBUF_SIZE; - wb->ucs = wb->ucs_buf; - wb->class = wb->class_buf; -} - -static void -workbuf_free(workbuf_t *wb) { - if (wb->ucs != wb->ucs_buf) { - free(wb->ucs); - free(wb->class); - } -} - -static mdn_result_t -workbuf_extend(workbuf_t *wb) { - int newsize = wb->size * 3; - - if (wb->ucs == wb->ucs_buf) { - wb->ucs = malloc(sizeof(wb->ucs[0]) * newsize); - wb->class = malloc(sizeof(wb->class[0]) * newsize); - } else { - wb->ucs = realloc(wb->ucs, sizeof(wb->ucs[0]) * newsize); - wb->class = realloc(wb->class, sizeof(wb->class[0]) * newsize); - } - if (wb->ucs == NULL || wb->class == NULL) - return (mdn_nomemory); - else - return (mdn_success); -} - -static mdn_result_t -workbuf_append(workbuf_t *wb, unsigned long c) { - mdn_result_t r; - - if (wb->last >= wb->size && (r = workbuf_extend(wb)) != mdn_success) - return (r); - wb->ucs[wb->last++] = c; - return (mdn_success); -} - -static void -workbuf_shift(workbuf_t *wb, int shift) { - int nmove; - - assert(wb != NULL && wb->cur >= shift); - - nmove = wb->last - shift; - (void)memmove(&wb->ucs[0], &wb->ucs[shift], - nmove * sizeof(wb->ucs[0])); - (void)memmove(&wb->class[0], &wb->class[shift], - nmove * sizeof(wb->class[0])); - wb->cur -= shift; - wb->last -= shift; -} - -static void -workbuf_removevoid(workbuf_t *wb) { - int i, j; - int last = wb->last; - - for (i = j = 0; i < last; i++) { - if (wb->class[i] >= 0) { - if (j < i) { - wb->ucs[j] = wb->ucs[i]; - wb->class[j] = wb->class[i]; - } - j++; - } - } - wb->cur -= last - j; - wb->last = j; -} diff --git a/contrib/idn/mdnkit/lib/utf5.c b/contrib/idn/mdnkit/lib/utf5.c deleted file mode 100644 index 45a98a13fb..0000000000 --- a/contrib/idn/mdnkit/lib/utf5.c +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: utf5.c,v 1.1 2002/01/02 02:46:51 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -#include -#include -#include -#include - -int -mdn_utf5_getwc(const char *s, size_t len, unsigned long *vp) { - int top = 1; - size_t orglen = len; - unsigned long v = 0; - - assert(s != NULL && len >= 0 && vp != NULL); - -#if 0 - TRACE(("mdn_utf5_getwc(s=<%s>,len=%d)\n", - mdn_debug_hexstring(s, 10), len)); -#endif - - if (len == 0) - return (0); - - /* Special case for domain name handling. */ - if (*s == '.') { - *vp = '.'; - return (1); - } - - while (len > 0) { - int c = *s++; - - if (top) { - if ('G' <= c && c <= 'V') - v = c - 'G'; - else if ('g' <= c && c <= 'v') - v = c - 'g'; - else - return (0); - top = 0; - } else { - if ('0' <= c && c <= '9') - v = (v << 4) + (c - '0'); - else if ('A' <= c && c <= 'F') - v = (v << 4) + (c - 'A' + 10); - else if ('a' <= c && c <= 'f') - v = (v << 4) + (c - 'a' + 10); - else - break; - } - len--; - } - *vp = v; - return (orglen - len); -} - -int -mdn_utf5_putwc(char *s, size_t len, unsigned long v) { - int w; - int off; - - assert(s != NULL); - -#if 0 - TRACE(("mdn_utf5_putwc(v=%lx)\n", v)); -#endif - - /* Special handling for domain delimiter '.' */ - if (v == '.') { - if (len < 1) - return (0); - *s = v; - return (1); - } - - if (v < 0x10) { - w = 1; - } else if (v < 0x100) { - w = 2; - } else if (v < 0x1000) { - w = 3; - } else if (v < 0x10000) { - w = 4; - } else if (v < 0x100000) { - w = 5; - } else if (v < 0x1000000) { - w = 6; - } else if (v < 0x10000000) { - w = 7; - } else if (v < 0x80000000) { - w = 8; - } else { - return (0); - } - - if (len < w) - return (0); - - off = (w - 1) * 4; - *s++ = 'G' + ((v >> off) & 0xf); - off -= 4; - while (off >= 0) { - int x = (v >> off) & 0xf; - if (x < 10) - *s++ = '0' + x; - else - *s++ = 'A' + x - 10; - off -= 4; - } - return (w); -} diff --git a/contrib/idn/mdnkit/lib/utf6.c b/contrib/idn/mdnkit/lib/utf6.c deleted file mode 100644 index 7639cc6521..0000000000 --- a/contrib/idn/mdnkit/lib/utf6.c +++ /dev/null @@ -1,551 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: utf6.c,v 1.2 2002/02/08 05:40:48 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MDN_UTF6_PREFIX -#define MDN_UTF6_PREFIX "wq--" -#endif - -#define UTF6_SAME_BYTE_MASK 0x00ff -#define UTF6_SAME_NIBBLE_MASK 0x0fff -#define UTF6_PLAIN_MASK 0xffff - -#define UTF6_BUF_SIZE 128 /* more than enough */ - -/* - * Compression type. - */ -enum { - same_byte_mode, /* the most significant byte of all non - '-' characters is the same value */ - same_nibble_mode, /* the most significant nibble of all non - '-' characters is the same value */ - plain_mode /* not compressed */ -}; - -static mdn_result_t utf6_decode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t utf6_decode_utf16(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp); -static mdn_result_t utf6_decode_vlhex(const char *from, size_t len, - size_t *reslen, - unsigned short *value); -static mdn_result_t utf6_encode(const char *from, size_t fromlen, - char *to, size_t tolen); -static mdn_result_t utf6_encode_utf16(const unsigned short *p, - size_t len, char *to, size_t tolen, - int compress); -static mdn_result_t utf6_encode_vlhex(unsigned short value, char *to, - size_t tolen, size_t *reslen); -static int get_compress_mode(const unsigned short *p, size_t len); - -static mdn__ace_t utf6_ctx = { - mdn__ace_prefix, - MDN_UTF6_PREFIX, - utf6_encode, - utf6_decode, -}; - -/* ARGSUSED */ -mdn_result_t -mdn__utf6_open(mdn_converter_t ctx, mdn_converter_dir_t dir, void **privdata) { - return (mdn_success); -} - -/* ARGSUSED */ -mdn_result_t -mdn__utf6_close(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir) { - return (mdn_success); -} - -mdn_result_t -mdn__utf6_convert(mdn_converter_t ctx, void *privdata, mdn_converter_dir_t dir, - const char *from, char *to, size_t tolen) -{ - mdn_result_t r; - - assert(ctx != NULL && - (dir == mdn_converter_l2u || dir == mdn_converter_u2l)); - - TRACE(("mdn__utf6_convert(dir=%s,from=\"%s\")\n", - dir == mdn_converter_l2u ? "l2u" : "u2l", - mdn_debug_xstring(from, 20))); - - r = mdn__ace_convert(&utf6_ctx, dir, from, to, tolen); - if (r != mdn_success) - return (r); - - DUMP(("mdn__utf6_convert: \"%s\"\n", mdn_debug_xstring(to, 70))); - - return (r); -} - -static mdn_result_t -utf6_decode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[UTF6_BUF_SIZE]; - size_t len, reslen; - mdn_result_t r; - - /* - * Allocate sufficient buffer. - */ - if (fromlen > UTF6_BUF_SIZE) { - if ((buf = malloc(sizeof(*buf) * fromlen)) == NULL) - return (mdn_nomemory); - } else { - /* Use local buffer. */ - buf = local_buf; - } - - /* - * Decode base32 and decompress. - */ - r = utf6_decode_utf16(from, fromlen, buf, &len); - if (r != mdn_success) - goto ret; - - /* - * Now 'buf' holds the decompressed string, which must contain - * UTF-16 characters. Convert them into UTF-8. - */ - r = mdn_util_utf16toutf8(buf, len, to, tolen, &reslen); - if (r != mdn_success) - goto ret; - - /* - * Terminate with NUL. - */ - if (tolen <= reslen) { - r = mdn_buffer_overflow; - goto ret; - } - - to += reslen; - *to = '\0'; - tolen -= reslen; - - r = mdn_success; - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -utf6_decode_utf16(const char *from, size_t fromlen, - unsigned short *buf, size_t *lenp) -{ - mdn_result_t r; - unsigned short value; - unsigned short cpart; - unsigned short vmax; - size_t len; - size_t reslen; - - /* - * Decode Base32 and put the result bytes to 'buf'. - * Since decoded string will be shorter in length, and - * the caller allocated 'buf' so that its length is not - * less than 'fromlen', we don't have to worry about overflow. - */ - - if (fromlen <= 0) - return mdn_success; - - switch (*from) { - case 'y': - case 'Y': - /* - * same_byte_mode. - */ - fromlen--; - from++; - r = utf6_decode_vlhex(from, fromlen, &reslen, &value); - if (r != mdn_success) - return (mdn_invalid_encoding); - from += reslen; - fromlen -= reslen; - - cpart = value * 0x0100; - vmax = 0x00ff; - break; - - case 'z': - case 'Z': - /* - * same_nibble_mode. - */ - fromlen--; - from++; - r = utf6_decode_vlhex(from, fromlen, &reslen, &value); - if (r != mdn_success) - return (mdn_invalid_encoding); - from += reslen; - fromlen -= reslen; - - cpart = value * 0x1000; - vmax = 0x0fff; - break; - - default: - /* - * plain_mode. - */ - cpart = 0x0000; - vmax = 0xffff; - break; - } - - - for (len = 0; fromlen > 0; len++) { - if (*from == '-') { - *buf++ = '-'; - from++; - fromlen--; - } else { - r = utf6_decode_vlhex(from, fromlen, &reslen, &value); - if (r != mdn_success) - return (mdn_invalid_encoding); - if (value > vmax) - return (mdn_invalid_encoding); - *buf++ = cpart + value; - from += reslen; - fromlen -= reslen; - } - } - - *buf = '\0'; - *lenp = len; - return (mdn_success); -} - -static mdn_result_t -utf6_decode_vlhex(const char *from, size_t len, size_t *reslen, - unsigned short *value) { - unsigned short v; - int i; - - /* - * Decode the first character of a variable length HEX string. - * The character must be in set of [ghijklmnopqrstuv]. - */ - if (len <= 0) - return (mdn_invalid_encoding); - - if ('G' <= *from && *from <= 'V') - v = *from - 'G'; - else if ('g' <= *from && *from <= 'v') - v = *from - 'g'; - else - return (mdn_invalid_encoding); - from++; - len--; - i = 1; - - /* - * Decode the rest characters of a variable length HEX string. - * The every character must be in set of [0123456789abcdef]. - */ - for (;;) { - if (len <= 0) - break; - if ('0' <= *from && *from <= '9') - v = (v << 4) + (*from - '0'); - else if ('A' <= *from && *from <= 'F') - v = (v << 4) + 0x0a + (*from - 'A'); - else if ('a' <= *from && *from <= 'f') - v = (v << 4) + 0x0a + (*from - 'a'); - else - break; - from++; - len--; - i++; - } - - *value = v; - *reslen = i; - return (mdn_success); -} - -static mdn_result_t -utf6_encode(const char *from, size_t fromlen, char *to, size_t tolen) { - unsigned short *buf; - unsigned short local_buf[UTF6_BUF_SIZE]; /* UTF-16 */ - mdn_result_t r; - size_t buflen, len; - - /* - * Convert to UTF-16. - */ - buf = local_buf; - buflen = UTF6_BUF_SIZE; - for (;;) { - r = mdn_util_utf8toutf16(from, fromlen, - buf, buflen, &len); - if (r == mdn_buffer_overflow) { - buflen *= 2; - if (buf == local_buf) - buf = malloc(sizeof(*buf) * buflen); - else - buf = realloc(buf, sizeof(*buf) * buflen); - if (buf == NULL) - return (mdn_nomemory); - } else if (r == mdn_success) { - break; - } else { - goto ret; - } - } - - /* - * Compress, encode in base-32 and output. - */ - r = utf6_encode_utf16(buf, len, to, tolen, - get_compress_mode(buf, len)); - -ret: - if (buf != local_buf) - free(buf); - return (r); -} - -static mdn_result_t -utf6_encode_utf16(const unsigned short *p, size_t len, - char *to, size_t tolen, int compress_mode) -{ - mdn_result_t r; - unsigned short mask; - size_t reslen; - int i; - - if (len <= 0) - return mdn_success; - - switch (compress_mode) { - case same_byte_mode: - mask = UTF6_SAME_BYTE_MASK; - - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = 'y'; - tolen--; - r = utf6_encode_vlhex((p[0] >> 8) & 0x00ff, to, tolen, - &reslen); - if (r != mdn_success) - return (r); - to += reslen; - tolen -= reslen; - - break; - - case same_nibble_mode: - mask = UTF6_SAME_NIBBLE_MASK; - - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = 'z'; - tolen--; - r = utf6_encode_vlhex((p[0] >> 4) & 0x0fff, to, tolen, - &reslen); - if (r != mdn_success) - return (r); - to += reslen; - tolen -= reslen; - - break; - - default: - mask = UTF6_PLAIN_MASK; - break; - } - - for (i = 0; i < len; i++) { - if (p[i] == '-') { - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = '-'; - tolen--; - - } else { - r = utf6_encode_vlhex(p[i] & mask, to, tolen, &reslen); - if (r != mdn_success) - return (r); - to += reslen; - tolen -= reslen; - } - } - - if (tolen <= 0) - return (mdn_buffer_overflow); - - *to = '\0'; - return (mdn_success); -} - -static mdn_result_t -utf6_encode_vlhex(unsigned short value, char *to, size_t tolen, - size_t *reslen) { - - static const char *vlhex_string1 = "ghijklmnopqrstuv"; - static const char *vlhex_string2 = "0123456789abcdef"; - - /* - * Encode an integer in the range of 0x000 - 0xffff as variable - * length HEX string. - */ - if (value <= 0x000f) { - if (tolen < 1) - return (mdn_buffer_overflow); - *to++ = vlhex_string1[ value & 0x0f]; - *reslen = 1; - - } else if (value <= 0x00ff) { - if (tolen < 2) - return (mdn_buffer_overflow); - *to++ = vlhex_string1[(value >> 4) & 0x0f]; - *to++ = vlhex_string2[ value & 0x0f]; - *reslen = 2; - - } else if (value <= 0x0fff) { - if (tolen < 3) - return (mdn_buffer_overflow); - *to++ = vlhex_string1[(value >> 8) & 0x0f]; - *to++ = vlhex_string2[(value >> 4) & 0x0f]; - *to++ = vlhex_string2[ value & 0x0f]; - *reslen = 3; - - } else { - if (tolen < 4) - return (mdn_buffer_overflow); - *to++ = vlhex_string1[(value >> 12) & 0x0f]; - *to++ = vlhex_string2[(value >> 8) & 0x0f]; - *to++ = vlhex_string2[(value >> 4) & 0x0f]; - *to++ = vlhex_string2[ value & 0x0f]; - *reslen = 4; - } - - return (mdn_success); -} - -static int -get_compress_mode(const unsigned short *p, size_t len) { - int non_hyphens = 0; - unsigned short same_bytes = 0; - unsigned short same_nibbles = 0; - int i; - - if (len <= 0) - return plain_mode; - - for (i = 0; i < len; i++) { - if (p[i] != '-') { - non_hyphens++; - if ((p[0] & 0xff00) == (p[i] & 0xff00)) - same_bytes++; - else if ((p[0] & 0xf000) == (p[i] & 0xf000)) - same_nibbles++; - } - } - - if (non_hyphens < 2) { - /* - * The number of non '-' characters is less than 2. - */ - return plain_mode; - } else if (same_bytes == non_hyphens) { - /* - * The same most significant byte of the every non '-' - * character is the same value. - */ - return same_byte_mode; - } else if (same_nibbles == non_hyphens) { - /* - * The same most significant nibble of the every non '-' - * character is the same value. - */ - return same_nibble_mode; - } else { - /* - * Not matched above. - */ - return plain_mode; - } - - /* Not reached */ -} diff --git a/contrib/idn/mdnkit/lib/utf8.c b/contrib/idn/mdnkit/lib/utf8.c deleted file mode 100644 index 0b10b192a5..0000000000 --- a/contrib/idn/mdnkit/lib/utf8.c +++ /dev/null @@ -1,292 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: utf8.c,v 1.1 2002/01/02 02:46:51 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -#include -#include -#include -#include - -#define UTF8_WIDTH(c) \ - (((c) < 0x80) ? 1 : \ - ((c) < 0xc0) ? 0 : \ - ((c) < 0xe0) ? 2 : \ - ((c) < 0xf0) ? 3 : \ - ((c) < 0xf8) ? 4 : \ - ((c) < 0xfc) ? 5 : \ - ((c) < 0xfe) ? 6 : 0) - -#define VALID_CONT_BYTE(c) (0x80 <= (c) && (c) < 0xc0) - -int -mdn_utf8_mblen(const char *s) { - int c = *(unsigned char *)s; - - assert(s != NULL); - -#if 0 - TRACE(("mdn_utf8_mblen(s=<%s>)\n", mdn_debug_hexstring(s, 6))); -#endif - - return UTF8_WIDTH(c); -} - -int -mdn_utf8_getmb(const char *s, size_t len, char *buf) { - /* buf must be at least 7-bytes long */ - const unsigned char *p = (const unsigned char *)s; - unsigned char *q = (unsigned char *)buf; - int width = UTF8_WIDTH(*p); - int w; - - assert(s != NULL); - -#if 0 - TRACE(("mdn_utf8_getmb(s=<%s>,len=%d)\n", - mdn_debug_hexstring(s, 6), len)); -#endif - - if (width == 0 || len < width) - return (0); - - /* Copy the first byte. */ - *q++ = *p++; - - /* .. and the rest. */ - w = width; - while (--w > 0) { - if (!VALID_CONT_BYTE(*p)) - return (0); - *q++ = *p++; - } - return (width); -} - -extern int -mdn_utf8_getwc(const char *s, size_t len, unsigned long *vp) { - unsigned long v; - unsigned long min; - const unsigned char *p = (const unsigned char *)s; - int c; - int width; - int rest; - - assert(s != NULL); - -#if 0 - TRACE(("mdn_utf8_getwc(s=<%s>,len=%d)\n", - mdn_debug_hexstring(s, 10), len)); -#endif - - c = *p++; - width = UTF8_WIDTH(c); - - switch (width) { - case 0: - return (0); - case 1: - v = c; - min = 0; - break; - case 2: - v = c & 0x1f; - min = 0x80; - break; - case 3: - v = c & 0xf; - min = 0x800; - break; - case 4: - v = c & 0x7; - min = 0x10000; - break; - case 5: - v = c & 3; - min = 0x200000; - break; - case 6: - v = c & 1; - min = 0x4000000; - break; - default: - FATAL(("mdn_utf8_getint: internal error\n")); - return (0); - } - - if (len < width) - return (0); - - rest = width - 1; - while (rest-- > 0) { - if (!VALID_CONT_BYTE(*p)) - return (0); - v = (v << 6) | (*p & 0x3f); - p++; - } - - if (v < min) - return (0); - - *vp = v; - return (width); -} - -extern int -mdn_utf8_putwc(char *s, size_t len, unsigned long v) { - unsigned char *p = (unsigned char *)s; - int mask; - int off; - int l; - - assert(s != NULL); - -#if 0 - TRACE(("mdn_utf8_putwc(v=%lx)\n", v)); -#endif - - if (v < 0x80) { - mask = 0; - l = 1; - } else if (v < 0x800) { - mask = 0xc0; - l = 2; - } else if (v < 0x10000) { - mask = 0xe0; - l = 3; - } else if (v < 0x200000) { - mask = 0xf0; - l = 4; - } else if (v < 0x4000000) { - mask = 0xf8; - l = 5; - } else if (v < 0x80000000) { - mask = 0xfc; - l = 6; - } else { - return (0); - } - - if (len < l) - return (0); - - off = 6 * (l - 1); - *p++ = (v >> off) | mask; - mask = 0x80; - while (off > 0) { - off -= 6; - *p++ = ((v >> off) & 0x3f) | mask; - } - return l; -} - -int -mdn_utf8_isvalidchar(const char *s) { - unsigned long dummy; - - TRACE(("mdn_utf8_isvalidchar(s=<%s>)\n", - mdn_debug_hexstring(s, 6))); - - return (mdn_utf8_getwc(s, 6, &dummy) > 0); -} - -int -mdn_utf8_isvalidstring(const char *s) { - unsigned long dummy; - int width; - - assert(s != NULL); - - TRACE(("mdn_utf8_isvalidstring(s=<%s>)\n", - mdn_debug_hexstring(s, 20))); - - while (*s != '\0') { - width = mdn_utf8_getwc(s, 6, &dummy); - if (width == 0) - return (0); - s += width; - } - return (1); -} - -char * -mdn_utf8_findfirstbyte(const char *s, const char *known_top) { - const unsigned char *p = (const unsigned char *)s; - const unsigned char *t = (const unsigned char *)known_top; - - assert(s != NULL && known_top != NULL && known_top <= s); - - TRACE(("mdn_utf8_findfirstbyte(s=<%s>)\n", - mdn_debug_hexstring(s, 8))); - - while (p >= t) { - if (!VALID_CONT_BYTE(*p)) - break; - p--; - } - if (p < t || UTF8_WIDTH(*p) == 0) - return (NULL); - - return ((char *)p); -} diff --git a/contrib/idn/mdnkit/lib/util.c b/contrib/idn/mdnkit/lib/util.c deleted file mode 100644 index 3579cfcfc0..0000000000 --- a/contrib/idn/mdnkit/lib/util.c +++ /dev/null @@ -1,227 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: util.c,v 1.1 2002/01/02 02:46:51 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -#include -#include -#include -#include -#include - -/* - * ASCII ctype macros. - * Note that these macros evaluate the argument multiple times. Be careful. - */ -#define ASCII_ISDIGIT(c) \ - ('0' <= (c) && (c) <= '9') -#define ASCII_ISUPPER(c) \ - ('A' <= (c) && (c) <= 'Z') -#define ASCII_ISLOWER(c) \ - ('a' <= (c) && (c) <= 'z') -#define ASCII_ISALPHA(c) \ - (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) -#define ASCII_ISALNUM(c) \ - (ASCII_ISDIGIT(c) || ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) - -#define ASCII_TOUPPER(c) \ - (('a' <= (c) && (c) <= 'z') ? ((c) - 'a' + 'A') : (c)) -#define ASCII_TOLOWER(c) \ - (('A' <= (c) && (c) <= 'Z') ? ((c) - 'A' + 'a') : (c)) - -/* - * Unicode surrogate pair. - */ -#define IS_SURROGATE_HIGH(v) (0xd800 <= (v) && (v) <= 0xdbff) -#define IS_SURROGATE_LOW(v) (0xdc00 <= (v) && (v) <= 0xdfff) -#define SURROGATE_HIGH(v) (SURROGATE_H_OFF + (((v) - 0x10000) >> 10)) -#define SURROGATE_LOW(v) (SURROGATE_L_OFF + ((v) & 0x3ff)) -#define SURROGATE_BASE 0x10000 -#define SURROGATE_H_OFF 0xd800 -#define SURROGATE_L_OFF 0xdc00 -#define COMBINE_SURROGATE(h, l) \ - (SURROGATE_BASE + (((h)-SURROGATE_H_OFF)<<10) + ((l)-SURROGATE_L_OFF)) - -int -mdn_util_casematch(const char *s1, const char *s2, size_t n) { - assert(s1 != NULL && s2 != NULL); - - while (n-- > 0) { - if (*s1 != *s2 && ASCII_TOLOWER(*s1) != ASCII_TOLOWER(*s2)) - return (0); - else if (*s1 == '\0') - break; - s1++; - s2++; - } - return (1); -} - -const char * -mdn_util_domainspan(const char *s, const char *end) { - while (s < end && (ASCII_ISALNUM(*s) || *s == '-')) - s++; - return (s); -} - -int -mdn_util_validstd13(const char *s, const char *end) { - if (!ASCII_ISALNUM(*s)) - return (0); - s++; - if (end == NULL) { - while (*s != '\0') { - if (!ASCII_ISALNUM(*s) && *s != '-') - return (0); - s++; - } - } else { - while (s < end) { - if (!ASCII_ISALNUM(*s) && *s != '-') - return (0); - s++; - } - } - s--; - if (!ASCII_ISALNUM(*s)) - return (0); - return (1); -} - -mdn_result_t -mdn_util_utf8toutf16(const char *utf8, size_t fromlen, - unsigned short *utf16, size_t tolen, size_t *reslenp) -{ - int i = 0; - - while (fromlen > 0) { - unsigned long v; - int flen; - - flen = mdn_utf8_getwc(utf8, fromlen, &v); - if (flen == 0) { - WARNING(("mdn_util_utf8toutf16: " - "invalid character\n")); - return (mdn_invalid_encoding); - } - utf8 += flen; - fromlen -= flen; - - if (tolen < 1) - return (mdn_buffer_overflow); - - if (IS_SURROGATE_LOW(v) || IS_SURROGATE_HIGH(v)) { - WARNING(("mdn_util_utf8toutf16: UTF-8 string contains " - "surrogate pair\n")); - return (mdn_invalid_encoding); - } else if (v > 0xffff) { - /* Convert to surrogate pair */ - if (v >= 0x110000) - return (mdn_invalid_encoding); - if (tolen < 2) - return (mdn_buffer_overflow); - utf16[i++] = SURROGATE_HIGH(v); - utf16[i++] = SURROGATE_LOW(v); - tolen -= 2; - } else { - utf16[i++] = v; - tolen--; - } - } - *reslenp = i; - return (mdn_success); -} - -mdn_result_t -mdn_util_utf16toutf8(const unsigned short *utf16, size_t fromlen, - char *utf8, size_t tolen, size_t *reslenp) -{ - int i; - char *org = utf8; - - for (i = 0; i < fromlen; i++) { - unsigned long v; - int w; - - if (IS_SURROGATE_HIGH(utf16[i])) { - if (i + 1 >= fromlen || - !IS_SURROGATE_LOW(utf16[i + 1])) { - WARNING(("mdn_util_utf16toutf8: " - "corrupted surrogate pair\n")); - return (mdn_invalid_encoding); - } - v = COMBINE_SURROGATE(utf16[i], utf16[i + 1]); - i++; - } else { - v = utf16[i]; - } - w = mdn_utf8_putwc(utf8, tolen, v); - if (w == 0) - return (mdn_buffer_overflow); - utf8 += w; - tolen -= w; - } - *reslenp = utf8 - org; - return (mdn_success); -} diff --git a/contrib/idn/mdnkit/lib/version.c b/contrib/idn/mdnkit/lib/version.c deleted file mode 100644 index 396b2b0c47..0000000000 --- a/contrib/idn/mdnkit/lib/version.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: version.c,v 1.2 2002/02/08 05:40:52 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include - -const char * -mdn_version_getstring(void) { - return MDNKIT_VERSION; -} diff --git a/contrib/idn/mdnkit/ltconfig b/contrib/idn/mdnkit/ltconfig deleted file mode 100644 index c1cb8c0bf6..0000000000 --- a/contrib/idn/mdnkit/ltconfig +++ /dev/null @@ -1,3114 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A lot of this script is taken from autoconf-2.10. - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} -echo=echo -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec "$SHELL" "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null`} - case X$UNAME in - *-DOS) PATH_SEPARATOR=';' ;; - *) PATH_SEPARATOR=':' ;; - esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || - test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH /usr/ucb; do - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running ltconfig again with it. - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf "%s\n"' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - # Cool, printf works - : - elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && - test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.3.5 -TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -default_ofile=libtool -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -enable_static=yes -enable_fast_install=yes -enable_dlopen=unknown -enable_win32_dll=no -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -nonopt= -ofile="$default_ofile" -verify_host=yes -with_gcc=no -with_gnu_ld=no -need_locks=yes -ac_ext=c -objext=o -libext=a -exeext= -cache_file= - -old_AR="$AR" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LDFLAGS="$LDFLAGS" -old_LD="$LD" -old_LN_S="$LN_S" -old_LIBS="$LIBS" -old_NM="$NM" -old_RANLIB="$RANLIB" -old_DLLTOOL="$DLLTOOL" -old_OBJDUMP="$OBJDUMP" -old_AS="$AS" - -# Parse the command line options. -args= -prev= -for option -do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test ! -f "$ltmain"; then - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi -if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi - -if test -n "$cache_file" && test -r "$cache_file"; then - echo "loading cache $cache_file within ltconfig" - . $cache_file -fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$SHELL $ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$SHELL $ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case "$host_os" in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR cru $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -# Set a sane default for `AR'. -test -z "$AR" && AR=ar - -# Set a sane default for `OBJDUMP'. -test -z "$OBJDUMP" && OBJDUMP=objdump - -# If RANLIB is not set, then run the test. -if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then - RANLIB="ranlib" - result="ranlib" - break - fi - done - IFS="$save_ifs" - - echo "$ac_t$result" 1>&6 -fi - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" -fi - -# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$AS" && AS=as - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:581: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo $ac_n "checking for object suffix... $ac_c" 1>&6 -$rm conftest* -echo 'int i = 1;' > conftest.c -echo "$progname:603: checking for object suffix" >& 5 -if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* -echo "$ac_t$objext" 1>&6 - -echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_exeext="no" - $rm conftest* - echo 'main () { return 0; }' > conftest.c - echo "$progname:629: checking for executable suffix" >& 5 - if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err | *.$objext ) ;; - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* -fi -if test "X$ac_cv_exeext" = Xno; then - exeext="" -else - exeext="$ac_cv_exeext" -fi -echo "$ac_t$ac_cv_exeext" 1>&6 - -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -pic_flag= -special_shlib_compile_flags= -wl= -link_static_flag= -no_builtin_flag= - -if test "$with_gcc" = yes; then - wl='-Wl,' - link_static_flag='-static' - - case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - aix*) - # Below there is a dirty hack to force normal static linking with -ldl - # The problem is because libdl dynamically linked with both libc and - # libC (AIX C++ library), which obviously doesn't included in libraries - # list by gcc. This cause undefined symbols with -static flags. - # This hack allows C programs to be linked with "-static -ldl", but - # we not sure about C++ programs. - link_static_flag="$link_static_flag ${wl}-lC" - ;; - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - pic_flag='-m68020 -resident32 -malways-restore-a4' - ;; - sysv4*MP*) - if test -d /usr/nec; then - pic_flag=-Kconform_pic - fi - ;; - *) - pic_flag='-fPIC' - ;; - esac -else - # PORTME Check for PIC flags for the system compiler. - case "$host_os" in - aix3* | aix4*) - # All AIX code is PIC. - link_static_flag='-bnso -bI:/lib/syscalls.exp' - ;; - - hpux9* | hpux10* | hpux11*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - link_static_flag="${wl}-a ${wl}archive" - pic_flag='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - cygwin* | mingw* | os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4* | osf5*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - sysv4*MP*) - if test -d /usr/nec ;then - pic_flag='-Kconform_pic' - link_static_flag='-Bstatic' - fi - ;; - *) - can_build_shared=no - ;; - esac -fi - -if test -n "$pic_flag"; then - echo "$ac_t$pic_flag" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - case "$host_os" in - hpux9* | hpux10* | hpux11*) - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - ;; - *) - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - ;; - esac - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - can_build_shared=no - pic_flag= - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - echo "$ac_t"none 1>&6 -fi - -# Check to see if options -o and -c are simultaneously supported by compiler -echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 -$rm -r conftest 2>/dev/null -mkdir conftest -cd conftest -$rm conftest* -echo "int some_variable = 0;" > conftest.c -mkdir out -# According to Tom Tromey, Ian Lance Taylor reported there are C compilers -# that will create temporary files in the current directory regardless of -# the output directory. Thus, making CWD read-only will cause this test -# to fail, enabling locking or at least warning the user not to do parallel -# builds. -chmod -w . -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 -if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then - echo "$ac_t"no 1>&6 - compiler_c_o=no - else - echo "$ac_t"yes 1>&6 - compiler_c_o=yes - fi -else - # Append any errors to the config.log. - cat out/conftest.err 1>&5 - compiler_c_o=no - echo "$ac_t"no 1>&6 -fi -CFLAGS="$save_CFLAGS" -chmod u+w . -$rm conftest* out/* -rmdir out -cd .. -rmdir conftest -$rm -r conftest 2>/dev/null - -if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 -if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_o_lo=no - else - echo "$ac_t"yes 1>&6 - compiler_o_lo=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_o_lo=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - compiler_o_lo=no -fi - -# Check to see if we can do hard links to lock some files if needed -hard_links="nottested" -if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$ac_t$hard_links" 1>&6 - $rm conftest* - if test "$hard_links" = no; then - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 - need_locks=warn - fi -else - need_locks=no -fi - -if test "$with_gcc" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 - $rm conftest* - echo "int some_variable = 0;" > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - compiler_rtti_exceptions=no - else - echo "$ac_t"yes 1>&6 - compiler_rtti_exceptions=yes - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - compiler_rtti_exceptions=no - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* - - if test "$compiler_rtti_exceptions" = "yes"; then - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' - else - no_builtin_flag=' -fno-builtin' - fi - -fi - -# Check for any special shared library compilation flags. -if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 -$rm conftest* -echo 'main(){return(0);}' > conftest.c -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - echo "$ac_t$link_static_flag" 1>&6 -else - echo "$ac_t"none 1>&6 - link_static_flag= -fi -LDFLAGS="$save_LDFLAGS" -$rm conftest* - -if test -z "$LN_S"; then - # Check to see if we can use ln -s, or we need hard links. - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftest.dat - if ln -s X conftest.dat 2>/dev/null; then - $rm conftest.dat - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - fi -fi - -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:991: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:1015: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:1018: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -allow_undefined_flag= -no_undefined_flag= -need_lib_prefix=unknown -need_version=unknown -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -archive_cmds= -archive_expsym_cmds= -old_archive_from_new_cmds= -export_dynamic_flag_spec= -whole_archive_flag_spec= -thread_safe_flag_spec= -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= -always_export_symbols=no -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' -# include_expsyms should be a list of space-separated symbols to be *always* -# included in the symbol list -include_expsyms= -# exclude_expsyms can be an egrep regular expression of symbols to exclude -# it will be wrapped by ` (' and `)$', so one must not match beginning or -# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -# as well as any symbol that contains `d'. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_" -# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out -# platforms (ab)use it in PIC code, but their linkers get confused if -# the symbol is explicitly referenced. Since portable code cannot -# rely on this symbol name, it's probably fine to never include it in -# preloaded symbol tables. - -case "$host_os" in -cygwin* | mingw*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$with_gcc" != yes; then - with_gnu_ld=no - fi - ;; - -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # See if GNU ld supports shared libraries. - case "$host_os" in - aix3* | aix4*) - # On AIX, the GNU linker is very broken - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=yes - - # Extract the symbol export list from an `--export-all' def file, - # then regenerate the def file from the symbol export list, so that - # the compiled dll only exports the symbol export list. - # Be careful not to strip the DATA tag left by newer dlltools. - export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' - - # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \$# in - 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; - *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done~ - test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ - $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' - - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - else - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - case $host_os in - cygwin* | mingw*) - # dlltool doesn't understand --whole-archive et. al. - whole_archive_flag_spec= - ;; - *) - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - ;; - esac - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4*) - hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' - hardcode_libdir_separator=':' - if test "$with_gcc" = yes; then - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - shared_flag='-shared' - else - shared_flag='${wl}-bM:SRE' - hardcode_direct=yes - fi - allow_undefined_flag=' ${wl}-berok' - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' - case "$host_os" in aix4.[01]|aix4.[01].*) - # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on - always_export_symbols=yes ;; - esac - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - cygwin* | mingw*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs' - fix_srcfile_path='`cygpath -w $srcfile`' - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9* | hpux10* | hpux11*) - case "$host_os" in - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; - esac - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_minus_L=yes # Not in the search PATH, but as the default - # location of the library. - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF - fi - hardcode_libdir_flag_spec='${wl}-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3*) - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # As osf3* with the addition of the -msym flag - if test "$with_gcc" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - rhapsody*) - archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flags_spec='-L$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; - - solaris*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case "$host_os" in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' - else - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - unixware7*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac -fi -echo "$ac_t$ld_shlibs" 1>&6 -test "$ld_shlibs" = no && can_build_shared=no - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - break - else - NM=${NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' - -# Transform an extracted symbol line into a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" - -# Define system-specific variables. -case "$host_os" in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" - ;; -irix*) - symcode='[BCDEGRST]' - ;; -solaris*) - symcode='[BDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTW]' -fi - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - $rm conftest* - cat > conftest.c <&5 - if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' - - cat <> conftest.c -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$objext conftstm.$objext - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$objext" - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - global_symbol_pipe= - fi -done -if test "$pipe_works" = yes; then - echo "${ac_t}ok" 1>&6 -else - echo "${ac_t}failed" 1>&6 -fi - -if test -z "$global_symbol_pipe"; then - global_symbol_to_cdecl= -fi - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$hardcode_shlibpath_var" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$ac_t$hardcode_action" 1>&6 - - -reload_flag= -reload_cmds='$LD$reload_flag -o $output$reload_objs' -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 -# PORTME Some linkers may need a different reload flag. -reload_flag='-r' -echo "$ac_t$reload_flag" 1>&6 -test -n "$reload_flag" && reload_flag=" $reload_flag" - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -file_magic_cmd= -file_magic_test_file= -deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [regex]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given egrep regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case "$host_os" in -aix3*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so$major' - ;; - -aix4*) - version_type=linux - # AIX has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - # We preserve .a as extension for shared libraries though AIX4.2 - # and later linker supports .so - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' - shlibpath_var=LIBPATH - deplibs_check_method=pass_all - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}.so' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - deplibs_check_method=pass_all - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - -bsdi4*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - export_dynamic_flag_spec=-rdynamic - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw*) - version_type=windows - need_version=no - need_lib_prefix=no - if test "$with_gcc" = yes; then - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' - else - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' - fi - dynamic_linker='Win32 ld.exe' - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - file_magic_cmd='${OBJDUMP} -f' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case "$version_type" in - freebsd-elf*) - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - deplibs_check_method=unknown - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case "$host_os" in - freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - need_lib_prefix=no - need_version=no - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' - soname_spec='${libname}${release}.sl$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - case "$host_os" in - hpux10.20*) - # TODO: Does this work for hpux-11 too? - deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -irix5* | irix6*) - version_type=irix - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' - case "$host_os" in - irix5*) - libsuff= shlibsuff= - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" - ;; - *) - case "$LD" in # libtool.m4 will add one of these switches to LD - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib${libsuff}/libc.so*` - deplibs_check_method='pass_all' - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - deplibs_check_method=pass_all - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - -netbsd*) - version_type=sunos - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' - soname_spec='${libname}${release}.so$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - ;; - -openbsd*) - version_type=sunos - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - need_version=no - fi - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_version=no - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' - shlibpath_var=LD_LIBRARY_PATH - # this will be overridden with pass_all, but let us keep it just in case - deplibs_check_method='file_magic COFF format alpha shared library' - file_magic_cmd=/usr/bin/file - file_magic_test_file=/shlib/libc.so - deplibs_check_method='pass_all' - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rhapsody*) - version_type=sunos - library_names_spec='${libname}.so' - soname_spec='${libname}.so' - shlibpath_var=DYLD_LIBRARY_PATH - deplibs_check_method=pass_all - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so$major' - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" - file_magic_cmd=/usr/bin/file - file_magic_test_file=/lib/libc.so - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - case "$host_vendor" in - sequent) - file_magic_cmd='/bin/file' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - ncr) - deplibs_check_method='pass_all' - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - esac - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' - soname_spec='${libname}${release}.so$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' - soname_spec='$libname.so.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" 1>&6 -test "$dynamic_linker" = no && can_build_shared=no - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in -# configure.in, otherwise build static only libraries. -case "$host_os" in -cygwin* | mingw* | os2*) - if test x$can_build_shared = xyes; then - test x$enable_win32_dll = xno && can_build_shared=no - echo "checking if package supports dlls... $can_build_shared" 1>&6 - fi -;; -esac - -if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then - case "$deplibs_check_method" in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - egrep "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac -fi - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4*) - test "$enable_shared" = yes && enable_static=no - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else -if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then - lt_cv_dlopen=no lt_cv_dlopen_libs= -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2248: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2288: checking for dlopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dlopen" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2335: checking for dld_link in -ldld" >&5 -ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2375: checking for shl_load" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -shl_load(); -#endif - -; return 0; } -EOF -if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shl_load=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2423: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -fi - - -fi - - -fi - -fi - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - fi - - case "$lt_cv_dlopen" in - dlopen) -for ac_hdr in dlfcn.h; do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2488: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int fnord = 0; -EOF -ac_try="$ac_compile >/dev/null 2>conftest.out" -{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -done - - if test "x$ac_cv_header_dlfcn_h" = xyes; then - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - fi - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2526: checking whether a program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self" 1>&6 - - if test "$lt_cv_dlopen_self" = yes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - lt_cv_dlopen_self_static=cross - else - cat > conftest.c < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LTDL_GLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LTDL_GLOBAL DL_GLOBAL -# else -# define LTDL_GLOBAL 0 -# endif -#endif - -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LTDL_LAZY_OR_NOW -# ifdef RTLD_LAZY -# define LTDL_LAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LTDL_LAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LTDL_LAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LTDL_LAZY_OR_NOW DL_NOW -# else -# define LTDL_LAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -fnord() { int i=42;} -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } - -EOF -if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - lt_cv_dlopen_self_static=yes -else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - lt_cv_dlopen_self_static=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 -fi - ;; - esac - - case "$lt_cv_dlopen_self" in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case "$lt_cv_dlopen_self_static" in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" -if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ltecho="$CONFIG_SHELL \$0 --fallback-echo" -fi -LTSHELL="$SHELL" - -LTCONFIG_VERSION="$VERSION" - -# Only quote variables if we're using ltmain.sh. -case "$ltmain" in -*.sh) - # Now quote all the things that may contain metacharacters. - for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ - AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ - reload_flag reload_cmds wl \ - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ - thread_safe_flag_spec whole_archive_flag_spec libname_spec \ - library_names_spec soname_spec \ - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ - file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ - hardcode_libdir_flag_spec hardcode_libdir_separator \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case "$ltecho" in - *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - trap "$rm \"$ofile\"; exit 1" 1 2 15 - echo "creating $ofile" - $rm "$ofile" - cat < "$ofile" -#! $SHELL - -# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi - -### BEGIN LIBTOOL CONFIG -EOF - cfgfile="$ofile" - ;; - -*) - # Double-quote the variables that need it (for aesthetics). - for var in old_CC old_CFLAGS old_CPPFLAGS \ - old_LD old_LDFLAGS old_LIBS \ - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do - eval "$var=\\\"\$var\\\"" - done - - # Just create a config file. - cfgfile="$ofile.cfg" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - echo "creating $cfgfile" - $rm "$cfgfile" - cat < "$cfgfile" -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -EOF - ;; -esac - -cat <> "$cfgfile" -# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ -# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ -# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ -# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# The version of $progname that generated this script. -LTCONFIG_VERSION=$LTCONFIG_VERSION - -# Shell to use when invoking shell scripts. -SHELL=$LTSHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$ltecho - -# The archiver. -AR=$AR - -# The default C compiler. -CC=$CC - -# The linker used to build libraries. -LD=$LD - -# Whether we need hard or soft links. -LN_S=$LN_S - -# A BSD-compatible nm program. -NM=$NM - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$reload_flag -reload_cmds=$reload_cmds - -# How to pass a linker flag through the compiler. -wl=$wl - -# Object file suffix (normally "o"). -objext="$objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$pic_flag - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$compiler_c_o - -# Can we write directly to a .lo ? -compiler_o_lo=$compiler_o_lo - -# Must we lock files when doing compilation ? -need_locks=$need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$link_static_flag - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$RANLIB -old_archive_cmds=$old_archive_cmds -old_postinstall_cmds=$old_postinstall_cmds -old_postuninstall_cmds=$old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$old_archive_from_new_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$archive_cmds -archive_expsym_cmds=$archive_expsym_cmds -postinstall_cmds=$postinstall_cmds -postuninstall_cmds=$postuninstall_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$global_symbol_to_cdecl - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$hardcode_libdir_separator - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$include_expsyms - -EOF - -case "$ltmain" in -*.sh) - echo '### END LIBTOOL CONFIG' >> "$ofile" - echo >> "$ofile" - case "$host_os" in - aix3*) - cat <<\EOF >> "$ofile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # Append the ltmain.sh script. - sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - - chmod +x "$ofile" - ;; - -*) - # Compile the libtool program. - echo "FIXME: would compile $ltmain" - ;; -esac - -test -n "$cache_file" || exit 0 - -# AC_CACHE_SAVE -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/contrib/idn/mdnkit/ltmain.sh b/contrib/idn/mdnkit/ltmain.sh deleted file mode 100644 index 766732da84..0000000000 --- a/contrib/idn/mdnkit/ltmain.sh +++ /dev/null @@ -1,4024 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -# Parse our command line options once, thoroughly. -while test $# -gt 0 -do - arg="$1" - shift - - case "$arg" in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - execute_dlfiles) - eval "$prev=\"\$$prev \$arg\"" - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - exit 0 - ;; - - --config) - sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 - exit 0 - ;; - - --debug) - echo "$progname: enabling shell trace mode" - set -x - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case "$nonopt" in - *cc | *++ | gcc* | *-gcc*) - mode=link - for arg - do - case "$arg" in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case "$mode" in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - lastarg= - srcfile="$nonopt" - suppress_output= - - user_target=no - for arg - do - # Accept any command-line options. - case "$arg" in - -o) - if test "$user_target" != "no"; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit 1 - fi - user_target=next - ;; - - -static) - build_old_libs=yes - continue - ;; - esac - - case "$user_target" in - next) - # The next one is the -o target name - user_target=yes - continue - ;; - yes) - # We got the output file - user_target=set - libobj="$arg" - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly in scan - # sets, so we specify it separately. - case "$lastarg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - case "$user_target" in - set) - ;; - no) - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - *) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit 1 - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSfmso]' - case "$libobj" in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case "$libobj" in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit 1 - ;; - esac - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $libobj" - else - removelist="$libobj" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit 1" 1 2 15 - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit 1" 1 2 15 - else - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until ln "$0" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - echo $srcfile > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $srcfile $pic_flag -DPIC" - if test "$build_old_libs" = yes; then - lo_libobj="$libobj" - dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$libobj"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - - if test -d "$dir"; then - $show "$rm $libobj" - $run $rm $libobj - else - $show "$mkdir $dir" - $run $mkdir $dir - status=$? - if test $status -ne 0 && test ! -d $dir; then - exit $status - fi - fi - fi - if test "$compiler_o_lo" = yes; then - output_obj="$libobj" - command="$command -o $output_obj" - elif test "$compiler_c_o" = yes; then - output_obj="$obj" - command="$command -o $output_obj" - fi - - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed, then go on to compile the next one - if test x"$output_obj" != x"$libobj"; then - $show "$mv $output_obj $libobj" - if $run $mv $output_obj $libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # If we have no pic_flag, then copy the object into place and finish. - if test -z "$pic_flag" && test "$build_old_libs" = yes; then - # Rename the .lo from within objdir to obj - if test -f $obj; then - $show $rm $obj - $run $rm $obj - fi - - $show "$mv $libobj $obj" - if $run $mv $libobj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` - libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` - # Now arrange that obj and lo_libobj become the same file - $show "(cd $xdir && $LN_S $baseobj $libobj)" - if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then - exit 0 - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - command="$base_compile $srcfile" - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - output_obj="$obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - $run $rm "$output_obj" - $show "$command" - if $run eval "$command"; then : - else - $run $rm $removelist - exit 1 - fi - - if test "$need_locks" = warn && - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then - echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit 1 - fi - - # Just move the object if needed - if test x"$output_obj" != x"$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Create an invalid libtool object if no PIC, so that we do not - # accidentally link it into a program. - if test "$build_libtool_libs" != yes; then - $show "echo timestamp > $libobj" - $run eval "echo timestamp > \$libobj" || exit $? - else - # Move the .lo from within objdir - $show "$mv $libobj $lo_libobj" - if $run $mv $libobj $lo_libobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - fi - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $rm "$lockfile" - fi - - exit 0 - ;; - - # libtool link mode - link) - modename="$modename: link" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invokation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments -# /* impgen.c starts here */ -# /* Copyright (C) 1999 Free Software Foundation, Inc. -# -# This file is part of GNU libtool. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# */ -# -# #include /* for printf() */ -# #include /* for open(), lseek(), read() */ -# #include /* for O_RDONLY, O_BINARY */ -# #include /* for strdup() */ -# -# static unsigned int -# pe_get16 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[2]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 2); -# return b[0] + (b[1]<<8); -# } -# -# static unsigned int -# pe_get32 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[4]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 4); -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# static unsigned int -# pe_as32 (ptr) -# void *ptr; -# { -# unsigned char *b = ptr; -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# int -# main (argc, argv) -# int argc; -# char *argv[]; -# { -# int dll; -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -# unsigned long export_rva, export_size, nsections, secptr, expptr; -# unsigned long name_rvas, nexp; -# unsigned char *expdata, *erva; -# char *filename, *dll_name; -# -# filename = argv[1]; -# -# dll = open(filename, O_RDONLY|O_BINARY); -# if (!dll) -# return 1; -# -# dll_name = filename; -# -# for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; -# -# pe_header_offset = pe_get32 (dll, 0x3c); -# opthdr_ofs = pe_header_offset + 4 + 20; -# num_entries = pe_get32 (dll, opthdr_ofs + 92); -# -# if (num_entries < 1) /* no exports */ -# return 1; -# -# export_rva = pe_get32 (dll, opthdr_ofs + 96); -# export_size = pe_get32 (dll, opthdr_ofs + 100); -# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -# secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); -# -# expptr = 0; -# for (i = 0; i < nsections; i++) -# { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } -# } -# -# expdata = (unsigned char*)malloc(export_size); -# lseek (dll, expptr, SEEK_SET); -# read (dll, expdata, export_size); -# erva = expdata - export_rva; -# -# nexp = pe_as32 (expdata+24); -# name_rvas = pe_as32 (expdata+32); -# -# printf ("EXPORTS\n"); -# for (i = 0; i&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - fi - build_libtool_libs=no - build_old_libs=yes - prefer_static_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test $# -gt 0; do - arg="$1" - shift - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case "$prev" in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case "$arg" in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit 1 - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case "$arg" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi - - prevarg="$arg" - - case "$arg" in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: not more than one -exported-symbols argument allowed" - exit 1 - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" - fi - dir="$absdir" - ;; - esac - case " $deplibs " in - *" $arg "*) ;; - *) deplibs="$deplibs $arg";; - esac - case " $lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir";; - esac - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - case ":$dllsearchpath:" in - ::) dllsearchpath="$dllsearchdir";; - *":$dllsearchdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dllsearchdir";; - esac - ;; - esac - ;; - - -l*) - if test "$arg" = "-lc"; then - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # These systems don't actually have c library (as such) - continue - ;; - esac - elif test "$arg" = "-lm"; then - case "$host" in - *-*-cygwin* | *-*-beos*) - # These systems don't actually have math library (as such) - continue - ;; - esac - fi - deplibs="$deplibs $arg" - ;; - - -module) - module=yes - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -o) prev=output ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # If we have no pic_flag, then this is the same as -all-static. - if test -z "$pic_flag" && test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - - *.o | *.obj | *.a | *.lib) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A library object. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` - prev= - fi - libobjs="$libobjs $arg" - ;; - - *.la) - # A libtool-controlled library. - - dlname= - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 - exit 1 - fi - - # If the library was installed with an old release of libtool, - # it will not redefine variable installed. - installed=yes - - # Read the .la file - # If there is no directory component, then add one. - case "$arg" in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` - - if test "X$installed" = Xyes; then - dir="$libdir" - else - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - fi - - if test -n "$dependency_libs"; then - # Extract -R and -L from dependency_libs - temp_deplibs= - for deplib in $dependency_libs; do - case "$deplib" in - -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - case " $rpath $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - -L*) case "$compile_command $temp_deplibs " in - *" $deplib "*) ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` - case " $lib_search_path " in - *" $temp_dir "*) ;; - *) lib_search_path="$lib_search_path $temp_dir";; - esac - ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - done - dependency_libs="$temp_deplibs" - fi - - if test -z "$libdir"; then - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - deplibs="$deplibs$dependency_libs" - compile_command="$compile_command $dir/$old_library$dependency_libs" - finalize_command="$finalize_command $dir/$old_library$dependency_libs" - continue - fi - - # This library was specified with -dlopen. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking statically, - # we need to preload. - prev=dlprefiles - else - # We should not create a dependency on this library, but we - # may need any libraries it requires. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - prev= - continue - fi - fi - - # The library was specified with -dlpreopen. - if test "$prev" = dlprefiles; then - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - dlprefiles="$dlprefiles $dir/$old_library" - else - dlprefiles="$dlprefiles $dir/$linklib" - fi - prev= - fi - - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - link_against_libtool_libs="$link_against_libtool_libs $arg" - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - - # We need an absolute path. - case "$dir" in - [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" - fi - ;; - esac - - # This is the magic to use -rpath. - # Skip directories that are in the system default run-time - # search path, unless they have been requested with -R. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - - lib_linked=yes - case "$hardcode_action" in - immediate | unsupported) - if test "$hardcode_direct" = no; then - compile_command="$compile_command $dir/$linklib" - deplibs="$deplibs $dir/$linklib" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - if test -n "$dllsearchpath"; then - dllsearchpath="$dllsearchpath:$dllsearchdir" - else - dllsearchpath="$dllsearchdir" - fi - ;; - esac - elif test "$hardcode_minus_L" = no; then - case "$host" in - *-*-sunos*) - compile_shlibpath="$compile_shlibpath$dir:" - ;; - esac - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = no; then - case ":$compile_shlibpath:" in - *":$dir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$dir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - relink) - if test "$hardcode_direct" = yes; then - compile_command="$compile_command $absdir/$linklib" - deplibs="$deplibs $absdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$compile_command " in - *" -L$absdir "*) ;; - *) compile_command="$compile_command -L$absdir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$absdir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$compile_shlibpath:" in - *":$absdir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$absdir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - *) - lib_linked=no - ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 - fi - - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - finalize_command="$finalize_command $libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$finalize_command " in - *" -L$libdir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$finalize_shlibpath:" in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:";; - esac - finalize_command="$finalize_command -l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - fi - else - # Transform directly to old archives if we don't build new libraries. - if test -n "$pic_flag" && test -z "$old_library"; then - $echo "$modename: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - else - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$dir";; - esac - finalize_command="$finalize_command -l$name" - fi - fi - - # Add in any libraries that this one depends upon. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - esac - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - case "$output" in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *.a | *.lib) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - ;; - - *.la) - # Make sure we only generate libraries of the form `libNAME.la'. - case "$outputname" in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - if test -n "$objs"; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 - exit 1 - fi - - # How the heck are we supposed to write a wrapper for a shared library? - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 - exit 1 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test $# -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - libext=al - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - dependency_libs="$deplibs" - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - current="$2" - revision="$3" - age="$4" - - # Check that each of the things are valid numbers. - case "$current" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case "$version_type" in - none) ;; - - irix) - major=`expr $current - $age + 1` - versuffix="$major.$revision" - verstring="sgi$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test $loop != 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="sgi$major.$iface:$verstring" - done - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test $loop != 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - windows) - # Like Linux, but with '-' rather than '.', since we only - # want one extension on Windows 95. - major=`expr $current - $age` - versuffix="-$major-$age-$revision" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - verstring="0.0" - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - dependency_libs="$deplibs" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody*) - # rhapsody is a little odd... - deplibs="$deplibs -framework System" - ;; - *) - # Add libc to deplibs on all other systems. - deplibs="$deplibs -lc" - ;; - esac - fi - - # Create the output directory, or remove our outputs if we need to. - if test -d $output_objdir; then - $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" - $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* - else - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - if test "$build_libtool_libs" = yes; then - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case "$deplibs_check_method" in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behaviour. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | sed 's/.* -> //'` - case "$potliblink" in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | sed 10q \ - | egrep "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - echo "*** Warning: This library needs some functionality provided by $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | - grep . >/dev/null; then - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - echo "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - lib="$output_objdir/$realname" - for link - do - linknames="$linknames $link" - done - - # Ensure that we have .o objects for linkers which dislike .lo - # (e.g. aix) in case we are running --disable-static - for obj in $libobjs; do - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` - if test ! -f $xdir/$oldobj; then - $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" - $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? - fi - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linkopts="$linkopts $flag" - fi - - # Do each of the archive commands. - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval cmds=\"$archive_expsym_cmds\" - else - eval cmds=\"$archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - *.lo | *.o | *.obj) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case "$output" in - *.lo) - if test -n "$objs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - for xlib in $convenience; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` - done - fi - fi - - # Create the old-style object. - reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" - - output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - $show "echo timestamp > $libobj" - $run eval "echo timestamp > $libobj" || exit $? - exit 0 - fi - - if test -n "$pic_flag"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - else - # Just create a symlink. - $show $rm $libobj - $run $rm $libobj - xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$libobj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` - $show "(cd $xdir && $LN_S $oldobj $baseobj)" - $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit 0 - ;; - - # Anything else should be a program. - *) - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$compile_rpath " in - *" $libdir "*) ;; - *) compile_rpath="$compile_rpath $libdir" ;; - esac - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - # Create the binary in the object directory, then wrap it. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case "$dlsyms" in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" - $run $rm $export_symbols - $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - else - $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`echo "$arg" | sed -e 's%^.*/%%'` - $run eval 'echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{\ -" - - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case "$host" in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DPIC";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case "$dir" in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case "$0" in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`echo $output|sed 's,.exe$,,'` ;; - esac - $rm $output - trap "$rm $output; exit 1" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - link_against_libtool_libs='$link_against_libtool_libs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - echo >> $output "\ - program=lt-'$outputname' - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if (cd \"\$thisdir\" && eval \$relink_command); then : - else - $rm \"\$progdir/\$file\" - exit 1 - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # win32 systems need to use the prog path for dll - # lookup to work - *-*-cygwin*) - $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} -" - ;; - - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "mkdir $gentop" - $run mkdir "$gentop" - status=$? - if test $status -ne 0 && test ! -d "$gentop"; then - exit $status - fi - generated="$generated $gentop" - - # Add in members from convenience archives. - for xlib in $addlibs; do - # Extract the objects. - case "$xlib" in - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; - *) xabs=`pwd`"/$xlib" ;; - esac - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` - xdir="$gentop/$xlib" - - $show "${rm}r $xdir" - $run ${rm}r "$xdir" - $show "mkdir $xdir" - $run mkdir "$xdir" - status=$? - if test $status -ne 0 && test ! -d "$xdir"; then - exit $status - fi - $show "(cd $xdir && $AR x $xabs)" - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? - - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` - done - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else - # Ensure that we have .o objects in place in case we decided - # not to build a shared library, and have fallen back to building - # static libs even though --disable-static was passed! - for oldobj in $oldobjs; do - if test ! -f $oldobj; then - xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$oldobj"; then - xdir="." - else - xdir="$xdir" - fi - baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` - obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` - $show "(cd $xdir && ${LN_S} $obj $baseobj)" - $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? - fi - done - - eval cmds=\"$old_archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case "$output" in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - if test -n "$xrpath"; then - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - done - dependency_libs="$temp_xrpath $dependency_libs" - fi - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - fi - $rm $output - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$dlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Directory that this library needs to be installed in: -libdir='$install_libdir'\ -" - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? - ;; - esac - exit 0 - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg="$nonopt" - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest="$arg" - continue - fi - - case "$arg" in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -s) - stripme=" -s" - continue - ;; - -*) ;; - - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest="$arg" - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - fi - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case "$file" in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case "$file" in - *.a | *.lib) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - library_names= - old_library= - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$realname $destdir/$realname" - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? - - if test $# -gt 0; then - # Delete the old symlinks, and create new ones. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case "$destfile" in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.o | *.obj) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit 0 - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - link_against_libtool_libs= - relink_command= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$link_against_libtool_libs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - fi - - finalize=yes - for lib in $link_against_libtool_libs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case "$lib" in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 - continue - fi - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit 0 - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - echo " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "----------------------------------------------------------------------" - exit 0 - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit 1 - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - dir= - case "$file" in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case "$file" in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit 0 - fi - ;; - - # libtool uninstall mode - uninstall) - modename="$modename: uninstall" - rm="$nonopt" - files= - - for arg - do - case "$arg" in - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - rmfiles="$file" - - case "$name" in - *.la) - # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $dir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" - - $show "$rm $rmfiles" - $run $rm $rmfiles - - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - # FIXME: should reinstall the best remaining shared library. - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` - rmfiles="$rmfiles $dir/$oldobj" - fi - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - - *) - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - esac - done - exit 0 - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 -fi # test -z "$show_help" - -# We need to display help for each of the modes. -case "$mode" in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --version print version information - -MODE must be one of the following: - - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/contrib/idn/mdnkit/make.wnt b/contrib/idn/mdnkit/make.wnt deleted file mode 100644 index 02af080160..0000000000 --- a/contrib/idn/mdnkit/make.wnt +++ /dev/null @@ -1,92 +0,0 @@ -# $Id: make.wnt,v 1.2 2002/02/08 05:38:45 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -all : force - copy include\config.h.win include\config.h - cd lib - $(MAKE) -f make.wnt - cd .. - cd mdnsproxy - $(MAKE) -f make.wnt - cd .. - cd wsock - $(MAKE) -f make.wnt - cd .. - -install : all - cd lib - $(MAKE) -f make.wnt install - cd .. - cd mdnsproxy - $(MAKE) -f make.wnt install - cd .. - cd wsock - $(MAKE) -f make.wnt install - cd .. - -clean : force - cd lib - $(MAKE) -f make.wnt clean - cd .. - cd mdnsproxy - $(MAKE) -f make.wnt clean - cd .. - cd wsock - $(MAKE) -f make.wnt clean - cd .. - -force: diff --git a/contrib/idn/mdnkit/man/Makefile.in b/contrib/idn/mdnkit/man/Makefile.in deleted file mode 100644 index e62e2613d7..0000000000 --- a/contrib/idn/mdnkit/man/Makefile.in +++ /dev/null @@ -1,96 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:46:52 marka Exp $ -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -top_builddir = .. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -sysconfdir = @sysconfdir@ -mandir = @mandir@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ - -GEN_FILES = mdn.conf.5 libmdn.3 -MAN3 = libmdn.3 -MAN5 = mdn.conf.5 - -all: $(GEN_FILES) - -install: install-man - -install-man: $(MAN3) $(MAN5) - $(MKINSTALLDIRS) $(mandir)/man3 - $(MKINSTALLDIRS) $(mandir)/man5 - $(INSTALL_DATA) $(MAN3) $(mandir)/man3 - $(INSTALL_DATA) $(MAN5) $(mandir)/man5 - -mdn.conf.5: mdn.conf.5.in - sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/mdn.conf.5.in > $@ -libmdn.3: libmdn.3.in - sed 's%[@]sysconfdir[@]%$(sysconfdir)%' < $(srcdir)/libmdn.3.in > $@ - -clean: - rm -f *~ $(GEN_FILES) diff --git a/contrib/idn/mdnkit/man/libmdn.3.in b/contrib/idn/mdnkit/man/libmdn.3.in deleted file mode 100644 index 06efb0e3a1..0000000000 --- a/contrib/idn/mdnkit/man/libmdn.3.in +++ /dev/null @@ -1,417 +0,0 @@ -.\" $Id: libmdn.3.in,v 1.2 2002/02/08 05:40:55 marka Exp $ -.\" -.\" Copyright (c) 2001 Japan Network Information Center. All rights reserved. -.\" -.\" By using this file, you agree to the terms and conditions set forth bellow. -.\" -.\" LICENSE TERMS AND CONDITIONS -.\" -.\" The following License Terms and Conditions apply, unless a different -.\" license is obtained from Japan Network Information Center ("JPNIC"), -.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -.\" Chiyoda-ku, Tokyo 101-0047, Japan. -.\" -.\" 1. Use, Modification and Redistribution (including distribution of any -.\" modified or derived work) in source and/or binary forms is permitted -.\" under this License Terms and Conditions. -.\" -.\" 2. Redistribution of source code must retain the copyright notices as they -.\" appear in each source code file, this License Terms and Conditions. -.\" -.\" 3. Redistribution in binary form must reproduce the Copyright Notice, -.\" this License Terms and Conditions, in the documentation and/or other -.\" materials provided with the distribution. For the purposes of binary -.\" distribution the "Copyright Notice" refers to the following language: -.\" "Copyright (c) Japan Network Information Center. All rights reserved." -.\" -.\" 4. Neither the name of JPNIC may be used to endorse or promote products -.\" derived from this Software without specific prior written approval of -.\" JPNIC. -.\" -.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -.\" -.\" 6. Indemnification by Licensee -.\" Any person or entities using and/or redistributing this Software under -.\" this License Terms and Conditions shall defend indemnify and hold -.\" harmless JPNIC from and against any and all judgements damages, -.\" expenses, settlement liabilities, cost and other liabilities of any -.\" kind as a result of use and redistribution of this Software or any -.\" claim, suite, action, litigation or proceeding by any third party -.\" arising out of or relates to this License Terms and Conditions. -.\" -.\" 7. Governing Law, Jurisdiction and Venue -.\" This License Terms and Conditions shall be governed by and and -.\" construed in accordance with the law of Japan. Any person or entities -.\" using and/or redistributing this Software under this License Terms and -.\" Conditions hereby agrees and consent to the personal and exclusive -.\" jurisdiction and venue of Tokyo District Court of Japan. -.\" -.TH libmdn 3 "Apr 23, 2001" -.\" -.SH NAME -libmdn \- Mulitilingual Domain Name Handling Library -.\" -.SH SYNOPSIS -.nf -#include - -mdn_result_t -\fBmdn_nameinit\fP(void) - -mdn_result_t -\fBmdn_encodename\fP(int\ actions,\ const\ char\ *from,\ char\ *to,\ size_t\ tolen) - -mdn_result_t -\fBmdn_decodename\fP(int\ actions,\ const\ char\ *from,\ char\ *to,\ size_t\ tolen) - -char * -\fBmdn_result_tostring\fP(mdn_result_t\ result) - -.\" -.SH OVERVIEW -The -.B libmdn -library supports various manipulations of multilingual domain names, -including: -.RS 2 -.IP \- 2 -encoding convesion -.IP \- 2 -normalization -.RE -.PP -.B Libmdn -is designed according to IDNA framework where each application must do -necessary preparations for the multilingual domain names before passing them -to the resolver. -.PP -To help applications do the preparation, libmdn provides easy-to-use, -high-level interface for the work. -.PP -This manual describes only a small subset of the API that libmdn provides, -most important functions for application programmers. For other API, -please refer to the mDNkit's specification document (which is not yet -available) or the libmdn's header files typically found under -`/usr/local/include/mdn/' on your system. -.\" -.SH DESCRIPTION -.PP -The -.B mdn_nameinit -function initializes the whole library, and reads the default -configuration file -.BR mdn.conf , -which includes configuration parameters for multilingual domain name -preparation. -If -.B mdn_nameinit -is called more than once, the library initialization will take place -only at the first call while the configuration file will be (re)read -at every call. -.PP -If there are no errors, -.B mdn_nameinit -returns -.BR mdn_success . -Otherwise, the returned value indicates the cause of the error. -See the section ``RETURN VALUES'' below for the error codes. -.PP -Usually you don't have to call this function explicitly because -it is implicitly called when -.B mdn_encodename -or -.B mdn_decodename -is first called without prior calling of -.BR mdn_nameinit . -.\" -.PP -.B mdn_encodename -function performs normalization and encoding conversion on the -multilingual domain name specified by -.IR from , -and stores the result to -.IR to , -whose length is specified by -.IR tolen . -.I actions -is a bitwise-OR of the following flags, specifying which subprocesses in -the encoding process are to be employed. -.RS 2 -.nf -.ft CW -#define MDN_LOCALCONV 0x0001 /* Local encoding <-> UTF-8 conversion */ -#define MDN_IDNCONV 0x0002 /* UTF-8 <-> ACE conversion */ -#define MDN_NAMEPREP 0x0004 /* NAMEPREP */ -#define MDN_UNASCHECK 0x0008 /* Unassigned code point check */ -#define MDN_DELIMMAP 0x0100 /* Delimiter mapping */ -#define MDN_LOCALMAP 0x0200 /* Local mapping */ -.ft R -.fi -.RE -.PP -Details of this encoding process can be found in the section ``NAME ENCODING''. -.PP -For ordinary application, the following macro is provided for the convenience. -.RS 2 -.nf -.ft CW -#define MDN_ENCODE_APP \e - (MDN_LOCALCONV|MDN_DELIMMAP|MDN_LOCALMAP|MDN_NAMEPREP|MDN_IDNCONV) -.ft R -.fi -.RE -.PP -.B mdn_decodename -function performs the reverse of -.BR mdn_encodename . -It converts the multilingual domain name given by -.IR from , -which is represented in a special encoding called ACE, -to the application's local codeset and stores into -.IR to , -whose length is specified by -.IR tolen . -.I actions -specifies which subprocesses in decoding process take place, as in -.BR mdn_encodename , -except that only \f(CWMDN_IDNCONV\fP, \f(CWMDN_NAMEPREP\fP and -\f(CWMDN_LOCALCONV\fP are allowed. -Details of this decoding process can be found in the section ``NAME DECODING''. -.PP -For ordinary application, the following macro is provided for the convenience. -.RS 2 -.nf -.ft CW -#define MDN_DECODE_APP (MDN_IDNCONV|MDN_NAMEPREP|MDN_LOCALCONV) -.ft R -.fi -.RE -.PP -All of the functions above return error code of type -.BR mdn_result_t . -All codes other than -.B mdn_success -indicates some kind of failure. -.B mdn_result_tostring -function takes an error code -.I result -and returns a pointer to the corresponding message string. -.\" -.SH "NAME ENCODING" -Name encoding is a process that transforms the specified -multilingual domain name to a certain string suitable for name -resolution. -.BR libmdn 's -name encoding process consists of the following steps. -.IP "(1) Encoding conversion (local codeset to UCS)" -Convert the encoding of the given domain name to -Unicode/ISO10646 UTF-8 format string. -The source encoding must be one of the two encodings below: -.RS 2 -.IP \- 2 -The application's local encoding (codeset). -.IP \- 2 -ACE specified by the configuration file. -.RE -The latter is suppored because name decoding process may produce -ACE strings when its attempt to convert to the local encoding fails. -See the section ``NAME DECODING'' for details. -.IP "(2) Local mapping" -Apply any locale/language-specific mapping. This process is -further divided into two subprocesses: -.RS 2 -.IP "(2-1) Delimiter mapping" -Map certain characters to the domain name delimiter (U+002E). -.IP "(2-2) Local mapping based on TLD" -Apply character mapping whose rule is determined by the TLD of the name. -.RE -.IP "(3) NAMEPREP" -Perform name preparation (NAMEPREP), which is a standard process for -normalizing multilingual domain names. This process includes checking -of characters which are not allowed in multilingual domain names. -.IP "(4) Encoding conversion (UCS to ACE)" -Convert the NAMEPREPed name to a special encoding designed for representing -multilingual domain names -.br -The encoding is also known as ACE (ASCII Compatible Encoding) since -a string in the encoding is just like a traditional ASCII domain name -consisting of only letters, numbers and hyphens. -.PP -There are many configuration parameters for this process, such as the -ACE or the local mapping rules. These parameters are read from the -default mDNkit's configuration file, -.BR mdn.conf . -See mdn.conf(5) for details. -.PP -The libmdn API allows to skip some of these subprocesses. -For example step (1) can be skipped if you have names already in -UTF-8 format. -.\" -.SH "NAME DECODING" -Name decoding is a reverse process of the name encoding. -It transforms the specified -multilingual domain name in a special encoding suitable for name -resolution to the normal name string in the application's current codeset. -However, name encoding and name decoding are not symmetric. -Name decoding doesn't perform local mapping. -Both name encoding and decoding do NAMEPREP, but decoding does -it to verfiy a name, while encoding does it to normalize a name. -.PP -.BR libmdn 's -name decoding process consists of the following steps. -.IP "(1) Encoding conversion (ACE to UCS)" -Convert the encoding of the given domain name -from a special one designed for representing -multilingual domain names (ACE) to Unicode/ISO10646 UTF-8. -.IP "(2) NAMEPREP check" -Perform name preparation (NAMEPREP) as also done in name encoding, -and compare the result of NAMEPREP and the given UCS name. -If the NAMEPREP is failed or the names are different, the given -name is considered as invalid domain name. -It contains a character which is never seen in a NAMEPREPed domain -name. -.IP "(3) Encoding conversion (UCS to local codeset)" -Convert the encoding of the name from UTF-8 to -the application's local codeset. -The local codeset is determined by the application's locale. -.br -However, it is possible that the conversion to the application's -local codeset fails because the name includes some characters -which don't have mappings to the local codeset. -In this case, libmdn tries instead to convert to ACE specified by -the configuration file. -.PP -The configuration parameters for this process, -are also read from the configuration file -.BR mdn.conf . -.PP -The libmdn API allows to skip some of these subprocesses. -For example step (2) can be skipped if you want a name in -UTF-8 format. -.\" -.SH "RETURN VALUES" -Most of the -.B libmdn -API functions return values of type -.B mdn_result_t -in order to indicate the status of the call. - -The following is a complete list of the status codes. Note that some -of them are never returned by the functions described in this manual. -.TP 15 -.SB mdn_success -Not an error. The call succeeded. -.TP -.SB mdn_notfound -Specified information does not exist. -.TP -.SB mdn_invalid_encoding -The encoding of the specified string is invalid. -.TP -.SB mdn_invalid_syntax -There is a syntax error in the configuration file. -.TP -.SB mdn_invalid_name -The specified name is not valid. -.TP -.SB mdn_invalid_message -The specified DNS message is not valid. -.TP -.SB mdn_invalid_action -The specified action contains invalid flags. -.TP -.SB mdn_invalid_codepoint -The specified Unicode code point value is not valid. -.TP -.SB mdn_buffer_overflow -The specified buffer is too small to hold the result. -.TP -.SB mdn_noentry -The specified key does not exist in the hash table. -.TP -.SB mdn_nomemory -Memory allocation using malloc failed. -.TP -.SB mdn_nofile -The specified file could not be opened. -.TP -.SB mdn_nomapping -Some characters do not have the mapping to the target character set. -.TP -.SB mdn_context_required -Context information is required. -.TP -.SB mdn_prohibited -The specified string contains some prohibited characters. -.TP -.SB mdn_failure -Generic error which is not covered by the above codes. -.\" -.SH EXAMPLES -To get the address of a multilingual domain name in the application's -local codeset, use -.B mdn_encodename -to convert the name to the format suitable for passing to resolver functions. -.RS 4 -.nf -.ft CW -mdn_result_t r; -char ace_name[256]; -struct hostent *hp; - -\&... -r = mdn_encodename(MDN_ENCODE_APP, name, ace_name, - sizeof(ace_name)); -if (r != mdn_success) { - fprintf(stderr, "mdn_encodename failed: %s\en", - mdn_result_tostring(r)); - exit(1); -} - -hp = gethostbyname(ace_name); -\&... -.ft R -.fi -.RE -.PP -To decode the multilingual domain name returned from a resolver function, -use -.BR mdn_decodename . -.RS 4 -.nf -.ft CW -mdn_result_t r; -char local_name[256]; -struct hostent *hp; - -\&... -hp = gethostbyname(name); -r = mdn_decodename(MDN_DECODE_APP, hp->h_name, local_name, - sizeof(local_name)); -if (r != mdn_success) { - fprintf(stderr, "mdn_decodename failed: %s\en", - mdn_result_tostring(r)); - exit(1); -} -printf("name: %s\en", local_name); -\&... -.ft R -.fi -.RE -.\" -.SH FILES -.I @sysconfdir@/mdn.conf -.\" -.SH "SEE ALSO" -mdn.conf(5) - diff --git a/contrib/idn/mdnkit/man/mdn.conf.5.in b/contrib/idn/mdnkit/man/mdn.conf.5.in deleted file mode 100644 index c9c1722003..0000000000 --- a/contrib/idn/mdnkit/man/mdn.conf.5.in +++ /dev/null @@ -1,562 +0,0 @@ -.\" $Id: mdn.conf.5.in,v 1.2 2002/02/08 05:40:57 marka Exp $" -.\" -.\" Copyright (c) 2000,2001 Japan Network Information Center. -.\" All rights reserved. -.\" -.\" By using this file, you agree to the terms and conditions set forth bellow. -.\" -.\" LICENSE TERMS AND CONDITIONS -.\" -.\" The following License Terms and Conditions apply, unless a different -.\" license is obtained from Japan Network Information Center ("JPNIC"), -.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -.\" Chiyoda-ku, Tokyo 101-0047, Japan. -.\" -.\" 1. Use, Modification and Redistribution (including distribution of any -.\" modified or derived work) in source and/or binary forms is permitted -.\" under this License Terms and Conditions. -.\" -.\" 2. Redistribution of source code must retain the copyright notices as they -.\" appear in each source code file, this License Terms and Conditions. -.\" -.\" 3. Redistribution in binary form must reproduce the Copyright Notice, -.\" this License Terms and Conditions, in the documentation and/or other -.\" materials provided with the distribution. For the purposes of binary -.\" distribution the "Copyright Notice" refers to the following language: -.\" "Copyright (c) Japan Network Information Center. All rights reserved." -.\" -.\" 4. Neither the name of JPNIC may be used to endorse or promote products -.\" derived from this Software without specific prior written approval of -.\" JPNIC. -.\" -.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -.\" -.\" 6. Indemnification by Licensee -.\" Any person or entities using and/or redistributing this Software under -.\" this License Terms and Conditions shall defend indemnify and hold -.\" harmless JPNIC from and against any and all judgements damages, -.\" expenses, settlement liabilities, cost and other liabilities of any -.\" kind as a result of use and redistribution of this Software or any -.\" claim, suite, action, litigation or proceeding by any third party -.\" arising out of or relates to this License Terms and Conditions. -.\" -.\" 7. Governing Law, Jurisdiction and Venue -.\" This License Terms and Conditions shall be governed by and and -.\" construed in accordance with the law of Japan. Any person or entities -.\" using and/or redistributing this Software under this License Terms and -.\" Conditions hereby agrees and consent to the personal and exclusive -.\" jurisdiction and venue of Tokyo District Court of Japan. -.\" -.TH mdn.conf 5 "Mar 1, 2001" -.\" -.SH NAME -mdn.conf \- configuration file for internationalized domain name handling -.\" -.SH SYNOPSIS -@sysconfdir@/mdn.conf -.\" -.SH DESCRIPTION -.B mdn.conf -is a configuration file for mDNkit, -which is a toolkit for handling internationalized/multilingualized -domain names. -.PP -To use internationalized domain names in DNS or other protocols, they -must be converted to an appropriate format before further processing. -In mDNkit, this conversion process is comprised of the following tasks. -.IP 1. 3 -Convert the given domain name in application's local codeset to Unicode, -and vice versa. -.IP 2. 3 -Map certain characters in the name to period character so that they are -treated as the domain name -delimiter (\fIdelimiter mapping\fR). -.IP 3. 3 -Map certain characters in the name to other characters or chracter sequences, -according to a mapping rule determined by its top level domain (TLD). -.IP 4. 3 -Perform NAMEPREP, which is a starndard name preparation process for -internationalized domain names. This process is composed of -the tree steps called mapping, normalization and prohibited character -checking. -.IP 5. 3 -Convert the nameprepped name to IDN encoding, which is the standard encoding -for internationalized domain names (also known as ASCII-compatible encoding, -ACE), and vice versa. -.PP -.B mdn.conf -specifies the parameters for these tasks, such as: -.RS 2 -.IP \- 2 -the encoding of internationalized domain names (IDN encoding). -.IP \- 2 -NAMEPREP schemes. -.RE -.\" -.SH SYNTAX -.B mdn.conf -is a simple text file, and each line in the file -(other than comment lines, which begin with ``#'', and empty lines) -forms an entry of the following format: -.PP -.RS 4 -.nf -\fIkeyword\fP\ \fIvalue..\fP -.fi -.RE -\." -.SH "IDN-ENCODING ENTRY" -IDN encoding entry specifies the encoding name (codeset name) which -is used as the encoding of multilingualized domain names by resolvers and DNS -servers. -.PP -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWidn-encoding \fP\fIencoding\fP -.fi -.RE -.PP -\fIencoding\fP is the encoding name to be used, and any of the following -names can be specified. -.RS 2 -.IP "\(bu" 2 -``AMC-ACE-Z'' -.IP "\(bu" 2 -``RACE'' -.IP "\(bu" 2 -``DUDE'' -.IP "\(bu" 2 -``UTF-8'' -.IP "\(bu" 2 -Codeset names which iconv_open() library function accepts. Please -consult iconv() documentation for the available codesets. -.IP "\(bu" 2 -Any alias names for the above, defined by the alias file. -(See section ``ENCODING-ALIAS-FILE ENTRY'') -.RE -.PP -The standard encoding is being discussed by IETF IDN working group. -.\" -.SH "NAMEPREP ENTRY" -Nameprep entry specifies the version of NAMEPREP, which is a specification -of ``canonicalization'' process of multilingual domain name before -it is converted to the IDN encoding. -It is also being discussed by IETF IDN working group. -.PP -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWnameprep \fP\fIversion\fP -.fi -.RE -.PP -.I version -is the version name of NAMEPREP specification, and currently -the following -.IR version s -can be specified. -.RS 2 -.IP "\(bu" 2 -``nameprep-03'' -.br -This version refers to Internet Draft ``draft-ietf-idn-nameprep-03.txt''. -.IP "\(bu" 2 -``nameprep-05'' -.br -This version refers to Internet Draft ``draft-ietf-idn-nameprep-05.txt''. -.IP "\(bu" 2 -``nameprep-06'' -.br -This version refers to Internet Draft ``draft-ietf-idn-nameprep-06.txt''. -.RE -.PP -The NAMEPREP process consists of the following 3 subprocesses. -.IP 1. 3 -mapping, which maps certain characters in a name to other characters, -possibly none. -.IP 2. 3 -normalization, which replaces character variants in a name to -a unique one. -.IP 3. 3 -prohibited/unassigned character checking, which detects invalid -characters in a name. -.PP -This entry is a shorthand for specifying all of them at once. -Actually, -.PP -.RS 4 -\f(CWnameprep \fP\fIversion\fP -.RE -.PP -has the same effect of specifying following 4 entries. -.PP -.RS 4 -.nf -\f(CWnameprep-map \fP\fIversion\fP -\f(CWnameprep-normalize \fP\fIversion\fP -\f(CWnameprep-prohibit \fP\fIversion\fP -\f(CWnameprep-unassigned \fP\fIversion\fP -.fi -.RE -.PP -If both this entry and more-specific entries above are specified, -more-specific ones take precedence. -.\" -.SH "NAMEPREP-MAP ENTRY" -Mapping entry specifies the mapping scheme of NAMEPREP process. -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWnameprep-map \fP\fIscheme\fP [\fIscheme\fP..] -.fi -.RE -.PP -.I scheme -specifies the mapping scheme, and currently available schemes are: -.RS 2 -.TP 4 -\f(CWnameprep-03\fP -Specify mapping defined by NAMEPREP-03 draft. -.TP 4 -\f(CWnameprep-05\fP -Specify mapping defined by NAMEPREP-05 draft. -.TP 4 -\f(CWnameprep-06\fP -Specify mapping defined by NAMEPREP-06 draft. -.TP 4 -\f(CWfilemap:\fP\fIpathname\fP -Specify mapping defined by the file \fIpathname\fP. -See ``MAPFILE FORMAT'' for the format of this file. -.RE -.PP -More than one \fIscheme\fP can be specified. -If multiple schemes are specified, they are applied in turn. -.\" -.SH "NAMEPREP-NORMALIZE ENTRY" -Normalization entry specifies the normalization schemes which should be -applied to the domain names before sending them to name servers. -.\" -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWnameprep-normalize \fP\fIscheme\fP [\fIscheme\fP..] -.fi -.RE -.PP -.I scheme -is the normalization scheme, and following shows the currently available -schemes: -.RS 2 -.TP 4 -\f(CWnameprep-03\fP -Synonim for \f(CWunicode-form-kc/3.0.1\fR. -.TP 4 -\f(CWnameprep-05\fP -Synonim for \f(CWunicode-form-kc/3.1.0\fR. -.TP 4 -\f(CWnameprep-06\fP -Synonim for \f(CWunicode-form-kc/3.1.0\fR. -.TP 4 -\f(CWunicode-form-kc\fP -Perform Unicode normalization called ``Unicode Normalization Form KC'', -defined by the latest standard. -.TP 4 -\f(CWunicode-form-kc/3.0.1\fP -Perform Unicode Normalization Form KC defined by Unicode 3.0.1. -.TP 4 -\f(CWunicode-form-kc/3.1.0\fP -Perform Unicode Normalization Form KC defined by Unicode 3.1.0. -.RE -.PP -More than one -.IR scheme s -can be specified. -If multiple schemes are specified, they are applied in turn. -.\" -.SH "NAMEPREP-PROHIBIT ENTRY" -Prohibit entry specifies the prohibited characters in the NAMEPREP -process. The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWnameprep-prohibit \fP\fIset\fP [\fIset\fP..] -.fi -.RE -.PP -.I set -specifies the set of prohibited characters. Currently following sets -can be specified. -.RS 2 -.TP 4 -\f(CWnameprep-03\fP -Specify set of prohibited characters defined by NAMEPREP-03 draft. -.TP 4 -\f(CWnameprep-05\fP -Specify set of prohibited characters defined by NAMEPREP-05 draft. -.TP 4 -\f(CWnameprep-06\fP -Specify set of prohibited characters defined by NAMEPREP-06 draft. -.TP 4 -\f(CWfileset:\fP\fIpathname\fP -Specify set of prohibited characters defined by the file \fIpathname\fP. -See ``SETFILE FORMAT '' for the format of this file. -.RE -.PP -When more than one -.IR set s -are specified, a character is considered prohibited if it belongs to -any of those sets. -.\" -.SH "NAMEPREP-UNASSIGNED ENTRY" -Unassigned entry specifies the unassigned codepoints in the NAMEPREP -process. The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWnameprep-unassigned \fP\fIset\fP [\fIset\fP..] -.fi -.RE -.PP -.I set -specifies the set of unassigned characters. Currently following sets -can be specified. -.RS 2 -.TP 4 -\f(CWnameprep-03\fP -Specify set of unassigned characters defined by NAMEPREP-03 draft. -.TP 4 -\f(CWnameprep-05\fP -Specify set of unassigned characters defined by NAMEPREP-05 draft. -.TP 4 -\f(CWnameprep-06\fP -Specify set of unassigned characters defined by NAMEPREP-06 draft. -.TP 4 -\f(CWfileset:\fP\fIpathname\fP -Specify set of unassigned characters defined by the file \fIpathname\fP. -See ``SETFILE FORMAT '' for the format of this file. -.RE -.PP -When more than one -.IR set s -are specified, a character is considered unassigned if it belongs to -any one of those sets. -.\" -.SH "ENCODING-ALIAS-FILE ENTRY" -Encoding alias entry specifies the file containing codeset name aliases. -The aliases can be used just as the real names. -.PP -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWencoding-alias-file \fP\fIpathname\fP -.fi -.RE -.PP -.I pathname -specifies the path name of the alias file. -The alias file is a simple text file, consisting of lines of the form: -.PP -.RS 4 -.nf -\fIalias-name\fP\ \fIname\fP -.fi -.RE -.PP -.I alias-name -is the alias name to be defined, and -.I name -is the real name or another alias name. -.\" -.SH "LOCAL-MAP ENTRY" -This entry specifies localized mapping phase before NAMEPREP takes place. -Different mapping rules can be specified for each TLD (top-level domain). -For example, you can have one mapping for ``.tw'' domain, and another for -``.jp'' domain. -.PP -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWlocal-map \fItld\f(CW \fIscheme\fR [\fIscheme\fR..] -.fi -.RE -.PP -.I tld -specifies the TLD to which the mapping rule is to be applied, and -.I scheme -specifies the mapping scheme. Available schemes are same as -\f(CWnameprep-map\fR entry. See ``NAMEPREP-MAP ENTRY'' for details. -.PP -There are two special -.IR tld s -for specifying the mapping rule for local domain names (domain names -without any dots in them), and the default mapping rule. -If -.I tld -is ``-'', it matches domain names which do not contain any dots. -If -.I tld -is ``.'', it matches any domain names which don't match to any other -mapping rules specified by ``local-map'' entries. -.\" -.SH "DELIMITER-MAP ENTRY" -This entry specifies characters to be regarded as the domain name delimiter, -which is period (``.''). -.PP -The syntax of this entry is: -.PP -.RS 4 -.nf -\f(CWdelimiter-map \fIcodepoint\fR [\fIcodepoint\fR..] -.fi -.RE -.PP -.I codepoint -specifies the Unicode codepoint value (in hexadecimal format) for the -character to be regarded as a delimiter. -.\" -.SH "MAPFILE FORMAT" -A mapfile defines a set of character mapping rules. It can define -unconditional one-character to N-character-sequence (N can be 0, 1 or more) -mappings. -.PP -A mapfile is a simple text file, and each line specifies a single mapping. -Each line is of the form: -.PP -.RS 4 -.nf -\fIsrc-codepoint\fR\f(CW; \fImapped-codepoint-seq\fR\f(CW;\fR -.fi -.RE -.PP -.I src-codepoint -indicates source character of the mapping, and must be a Unicode codepoint -value in hexadecimal string. -.I mapped-codepoint-seq -is a sequence of characters which is the outcome of the mapping, and must -be a (possibly empty) list of Unicode codepoint values in hexadecimal string, -separated by spaces. -.PP -Lines which begin with ``#'' are treated as comments and ignored. -.PP -A sample mapfile is shown below. -.PP -.RS 4 -.nf -.ft CW -# map "A" to "a" -0041; 0061; -# map "#" to nothing -0023; ; -# map "@" to "at" -0040; 0061 0074; -.ft R -.fi -.RE -.\" -.SH "SETFILE FORMAT" -A setfile defines a set of characters, and is used for specifying -prohibited/unasssigned characters. The set is specified by -enumerating either individual character codepoints or ranges of -character codepoints. -.PP -A setfile is also a simple text file, and each line specifies a single -character codepoint, or a range of codepoints as follows: -.PP -.RS 4 -.nf -\fIcodepoint\fP -\fIcodepoint-start\fR\f(CW-\fR\fIcodepoint-end\fR -.fi -.RE -.PP -.IR codepoint , -.I codepoint-start -and -.I codepoint-end -are Unicode codepoint values in hexadecimal format. -.PP -Lines which begin with ``#'' are treated as comments and ignored. -.PP -A sample setfile is shown below. -.PP -.RS 4 -.nf -.ft CW -# Prohibit tilde -007E -# Prohibit control characters -0000-001F -007F-000F -# Prohibit all the Unicode characters beyond BMP -10000-10FFFF -.ft R -.fi -.RE -.\" -.SH "LOCAL CODESET" -.B mdn.conf -does not have an entry to specify the local codeset, since -it is determined from the application's current locale information. -So each application can use different local codeset. -.PP -Although mDNkit tries hard to find out the local codeset, sometimes it -fails. For example, there are applications which use non-ASCII codeset -but work in C locale. In this case, you can specify the application's -local codeset by an environment variable ``\fBMDN_LOCAL_CODESET\fR''. -Just set the codeset name (or its alias name) to the variable, and -mDNkit will use the codeset as the local one, regardless of the locale -setting. -.\" -.SH "SAMPLE CONFIGURATION" -The following shows a sample configuration file. -.PP -.RS 4 -.ft CW -.nf -# -# a sample configuration. -# - -# Use RACE as the IDN encoding. -idn-encoding RACE - -# Use draft-ietf-idn-nameprep-06.txt as NAMEPREP. -nameprep nameprep-06 - -# Regard U+3002 (IDEOGRAPHIC FULL STOP) and U+FF0E -# (FULLWIDTH FULL STOP) as the domain component delimiter -# as well as ``.''. -delimiter-map U+3002 U+FF0E - -# Perform Japanese-specific mapping for .jp domain. -# assuming /usr/local/lib/mdnkit/jp-map contains the mapping. -local-map .jp filemap:/usr/local/lib/mdnkit/jp-map -.fi -.ft R -.RE -.\" -.SH FILES -.I @sysconfdir@/mdn.conf -.br -.I @sysconfdir@/mdn.conf.sample -\- sample configuration with comments -.\" -.SH "SEE ALSO" -iconv(3), mdnsproxy(8) diff --git a/contrib/idn/mdnkit/map/Makefile.in b/contrib/idn/mdnkit/map/Makefile.in deleted file mode 100644 index d2d79452c7..0000000000 --- a/contrib/idn/mdnkit/map/Makefile.in +++ /dev/null @@ -1,87 +0,0 @@ -# $Id: Makefile.in,v 1.2 2002/02/08 05:40:59 marka Exp $ -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -top_builddir = .. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -datadir = @datadir@ -mapdir = $(datadir)/mdnkit - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ - -MAPS = jp.map - -all: - -install: install-data - -install-data: $(MAPS) - $(MKINSTALLDIRS) $(mapdir) - for map in $(MAPS); do \ - $(INSTALL_DATA) $(srcdir)/$$map $(mapdir); done - -clean: - rm -f *~ diff --git a/contrib/idn/mdnkit/map/jp.map b/contrib/idn/mdnkit/map/jp.map deleted file mode 100644 index bebe711bde..0000000000 --- a/contrib/idn/mdnkit/map/jp.map +++ /dev/null @@ -1,66 +0,0 @@ -# $Id: jp.map,v 1.2 2002/02/08 05:41:00 marka Exp $ -# Copyright (c) 2001 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -# -# Local map table for JP domain. -# - -# version=1.0 - -2212; FF0D -309B; 3099 -309C; 309A diff --git a/contrib/idn/mdnkit/mdnsproxy/Makefile.in b/contrib/idn/mdnkit/mdnsproxy/Makefile.in deleted file mode 100644 index fdad8ada40..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/Makefile.in +++ /dev/null @@ -1,154 +0,0 @@ -# $Id: Makefile.in,v 1.2 2002/02/08 05:41:01 marka Exp $ -# Makefile for mDNS Proxy Server -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -top_builddir = .. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -sbindir = @sbindir@ -sysconfdir = @sysconfdir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ - -CC = @CC@ -PURIFY = purify -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ -LIBTOOL = @LIBTOOL@ - -ICONVINC = @ICONVINC@ -ICONVLIB = @ICONVLIB@ -MDNLIB = ../lib/libmdn.la - -OPTS = -INCS = -I$(srcdir)/../include -I../include $(ICONVINC) -DEFS = -DUNIX -DCONFIG_PATH="\"$(sysconfdir)\"" -DLOGDIR="\"$(logdir)\"" -CFLAGS = $(OPTS) $(INCS) $(DEFS) @CFLAGS@ -LDFLAGS = $(OPTS) @LDFLAGS@ -LIBS = @LIBS@ - -# -# Files to build mDNS Proxy -# - -SRCS = unxmain.c server.c message.c logging.c proxycnf.c translate.c acl.c -OBJS = unxmain.o server.o message.o logging.o proxycnf.o translate.o acl.o - -# -# Target to build -# - -TARGETS = mdnsproxy mdnsproxy.8 - -all : $(TARGETS) - -mdnsproxy : $(OBJS) $(MDNLIB) - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ - $(OBJS) $(MDNLIB) $(ICONVLIB) $(LIBS) - -mdnsproxy.purify : $(OBJS) $(MDNLIB) - $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ \ - $(OBJS) $(MDNLIB) $(ICONVLIB) $(LIBS) - -# -# Installation -# - -install: install-program install-config install-man - -install-program: mdnsproxy - $(MKINSTALLDIRS) $(sbindir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mdnsproxy $(sbindir) - -# Do not overwrite existing configuration file. -install-config: - $(MKINSTALLDIRS) $(sysconfdir) - echo installing sample configuration file. - $(INSTALL_DATA) $(srcdir)/mdnsproxy.conf.sample $(sysconfdir)/ - -install-man: mdnsproxy.8 - $(MKINSTALLDIRS) $(mandir)/man8 - $(INSTALL_DATA) mdnsproxy.8 $(mandir)/man8 - -mdnsproxy.8: mdnsproxy.8.in - sed -e 's%[@]sysconfdir[@]%$(sysconfdir)%' \ - -e 's%[@]logdir[@]%$(logdir)%' $(srcdir)/mdnsproxy.8.in > $@ - -clean: - rm -f $(TARGETS) *.o core *.core *~ - rm -fr .libs/ - -# -# Dependecnies -# - -unxmain.o : unxmain.c mdnsproxy.h -server.o : server.c mdnsproxy.h -message.o : message.c mdnsproxy.h -logging.o : logging.c mdnsproxy.h -proxycnf.o : proxycnf.c mdnsproxy.h proxycnf.h -acl.o : acl.c mdnsproxy.h diff --git a/contrib/idn/mdnkit/mdnsproxy/acl.c b/contrib/idn/mdnkit/mdnsproxy/acl.c deleted file mode 100644 index 2e139dd913..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/acl.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - * acl.c - managing access control list. - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: acl.c,v 1.2 2002/02/08 05:41:03 marka Exp $"; -#endif - -#include - -#include -#include - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#endif - -#include "mdnsproxy.h" - -#ifdef TEST -#undef WARN -#define WARN printf -#endif - -/* - * Entry in an access control list. - */ -typedef struct _acl acl_t; -struct _acl { - struct in_addr address; /* IP address */ - struct in_addr netmask; /* net mask */ - acl_t *next; /* pointer to a next entry */ -}; - -/* - * Access control list. - */ -static acl_t *acl = NULL; - - -/* - * Internal functions. - */ -static BOOL -acl_parse_address(const char *pattern, struct in_addr *address, - struct in_addr *netmask, int lineNo); - -/* - * Initialize the access control list `acl'. - */ -int -acl_initialize(void) -{ - struct in_addr address; - struct in_addr netmask; - config_ctx_t config_ctx; - acl_t *new_entry; - acl_t *last_entry; - int value_count; - char **values; - int lineNo; - int i; - - TRACE("acl_initialize()\n"); - - acl = NULL; - last_entry = NULL; - - config_ctx = config_query_open(KW_ALLOW_ACCESS, &value_count, &values, - &lineNo); - - while (config_ctx != NULL) { - if (value_count < 2) { - WARN("acl_initialize - wrong # of args for \"%s\", line %d\n", - KW_ALLOW_ACCESS, lineNo); - return FALSE; - } - - for (i = 1; i < value_count; i++) { - if (!acl_parse_address(values[i], &address, &netmask, lineNo)) - return FALSE; - - new_entry = (acl_t *)malloc(sizeof(acl_t)); - if (new_entry == NULL) { - WARN("acl_initialize - cannot allocate memory\n"); - return FALSE; - } - new_entry->address.s_addr = address.s_addr; - new_entry->netmask.s_addr = netmask.s_addr; - new_entry->next = NULL; - - if (last_entry == NULL) - acl = new_entry; - else - last_entry->next = new_entry; - last_entry = new_entry; - } - config_ctx = config_query_more(config_ctx, &value_count, &values, - &lineNo); - } - - return TRUE; -} - -/* - * netmask length to netmask conversion table. - */ -static const unsigned long netmasks_by_mask_length[] = { - 0x00000000UL, 0x80000000UL, 0xc0000000UL, 0xe0000000UL, /* 0.. 3 */ - 0xf0000000UL, 0xf8000000UL, 0xfc000000UL, 0xfe000000UL, /* 4.. 7 */ - 0xff000000UL, 0xff800000UL, 0xffc00000UL, 0xffe00000UL, /* 8..12 */ - 0xfff00000UL, 0xfff80000UL, 0xfffc0000UL, 0xfffe0000UL, /* 13..15 */ - 0xffff0000UL, 0xffff8000UL, 0xffffc000UL, 0xffffe000UL, /* 16..19 */ - 0xfffff000UL, 0xfffff800UL, 0xfffffc00UL, 0xfffffe00UL, /* 20..23 */ - 0xffffff00UL, 0xffffff80UL, 0xffffffc0UL, 0xffffffe0UL, /* 24..27 */ - 0xfffffff0UL, 0xfffffff8UL, 0xfffffffcUL, 0xfffffffeUL, /* 28..31 */ - 0xffffffffUL, /* 32 */ -}; - -/* - * Parse an ACL address pattern (e.g. 192.168.100/24), and put the result - * into `address' and `netmask'. It returns TRUE upon success. - * - * We accepts the following address patterns: - * - * octet.octet.octet.octet - * octet.octet.octet.octet/netmask - * octet.octet.octet/netmask - * octet.octet/netmask - * octet/netmask - * - * Ommited octets are regarded as `0'. - */ -static BOOL -acl_parse_address(const char *pattern, struct in_addr *address, - struct in_addr *netmask, int lineNo) -{ - unsigned int octets[4]; - int netmask_length; - int digit_count; - int octet_count; - const char *p = pattern; - - octets[1] = 0; - octets[2] = 0; - octets[3] = 0; - netmask_length = 32; - - /* - * Parse an dot noted IP address. - */ - octet_count = 0; - while (octet_count < 4) { - octets[octet_count] = 0; - if (*p == '0' && '0' <= *(p + 1) && *(p + 1) <= '9') { - WARN("acl_parse_address - invalid address \"%.100s\", line %d\n", - pattern, lineNo); - return FALSE; - } - for (digit_count = 0; '0' <= *p && *p <= '9'; p++, digit_count++) - octets[octet_count] = octets[octet_count] * 10 + (*p - '0'); - if (digit_count == 0 || digit_count > 3 || octets[octet_count] > 255) { - WARN("acl_parse_address - invalid address \"%.100s\", line %d\n", - pattern, lineNo); - return FALSE; - } - - octet_count++; - if (*p != '.') - break; - p++; - } - - if (*p == '\0' && octet_count != 4) { - WARN("acl_parse_address - malformed address \"%.100s\", line %d\n", - pattern, lineNo); - return FALSE; - } - - /* - * Parse an optional netmask length preceded by `/'. - */ - if (*p == '/') { - netmask_length = 0; - p++; - if (*p == '0' && '0' <= *(p + 1) && *(p + 1) <= '9') { - WARN("acl_parse_address - invalid netmask length \"%.100s\", " - "line %d\n", pattern, lineNo); - return FALSE; - } - for (digit_count = 0; '0' <= *p && *p <= '9'; p++, digit_count++) - netmask_length = netmask_length * 10 + (*p - '0'); - if (digit_count == 0 || digit_count > 2 || netmask_length > 32) { - WARN("acl_parse_address - invalid netmask length \"%.100s\", " - "line %d\n", pattern, lineNo); - return FALSE; - } - } - - if (*p != '\0') { - WARN("acl_parse_address - invalid address \"%.100s\", line %d\n", - pattern, lineNo); - return FALSE; - } - - /* - * Put the result into `address' and `netmask'. - */ - address->s_addr = htonl((octets[0] << 24) + (octets[1] << 16) - + (octets[2] << 8) + octets[3]); - netmask->s_addr = htonl(netmasks_by_mask_length[netmask_length]); - - /* - * Check address/netmask mismatch. (e.g. 192.168.10.8/16) - */ - if ((address->s_addr & netmask->s_addr) != address->s_addr) { - WARN("acl_parse_address - address/netmask mismatch \"%.100s\", " - "line %d\n", pattern, lineNo); - return FALSE; - } - - return TRUE; -} - -/* - * Return TRUE if access from `address' is permitted or not. - * Note that we returns TRUE if no access control pattern is registered. - */ -BOOL -acl_test(struct sockaddr *address) -{ - acl_t *acl_entry; - struct in_addr inet_address; - - if (acl == NULL) - return TRUE; - - inet_address.s_addr = ((struct sockaddr_in *)address)->sin_addr.s_addr; - - for (acl_entry = acl; acl_entry != NULL; acl_entry = acl_entry->next) { - if ((inet_address.s_addr & acl_entry->netmask.s_addr) - == acl_entry->address.s_addr) { - return TRUE; - } - } - - return FALSE; -} - -/* - * Finalize the access control list `acl'. - */ -void -acl_finalize(void) -{ - acl_t *acl_entry; - acl_t *saved_next; - - acl_entry = acl; - while (acl_entry != NULL) { - saved_next = acl_entry->next; - free(acl_entry); - acl_entry = saved_next; - } - - acl = NULL; -} - - -/* - * main for test. - * `proxycnf.o' and `logging.o' are reuqired to build this test program. - */ -#ifdef TEST - -#include - -int -main(int argc, char *argv[]) -{ - char line[512]; - char *newline; - struct sockaddr_in address; - - printf("ACL allow/deny test program\n"); - fflush(stdout); - - if (config_load(argc, argv) != TRUE) { - printf("failed to load configurations\n"); - return 1 ; - } - printf("loaded configuration.\n"); - - if (!acl_initialize()) { - printf("failed to initialize ACL\n"); - return 1; - } - - for (;;) { - printf("input address> "); - fflush(stdout); - if (fgets(line, 512, stdin) == NULL) - break; - - newline = strpbrk(line, "\r\n"); - if (newline != NULL) - *newline = '\0'; - - if (!inet_aton(line, &address.sin_addr)) { - printf("invalid address\n"); - continue; - } - - if (acl_test((struct sockaddr *)&address)) - printf("access from %s is allowed.\n", line); - else - printf("access from %s is denied.\n", line); - } - - acl_finalize(); - - return 0; -} - -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/mdnsproxy/logging.c b/contrib/idn/mdnkit/mdnsproxy/logging.c deleted file mode 100644 index 680ac5749d..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/logging.c +++ /dev/null @@ -1,584 +0,0 @@ -/* - * logging.c - logging support - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: logging.c,v 1.2 2002/02/08 05:41:04 marka Exp $"; -#endif - -#include - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYSLOG -#include -#endif - -#include -#include - -#include "mdnsproxy.h" - -#define DEFAULT_LOGFILE "mdnsproxy.log" - -#ifdef DEBUG -#define DEFAULT_LOG_LEVEL LOGLEVEL_TRACE -#else -#define DEFAULT_LOG_LEVEL LOGLEVEL_WARN -#endif - -#ifndef LOGDIR -#define LOGDIR "/var/mdnsproxy" -#endif - -/* - * Logging Control Variables - */ - -static char logFname[256] = { 0 } ; -static FILE *logFptr = NULL ; -static int logMode = LOGMODE_FILE; -static int logFacility; -static int logLevel = DEFAULT_LOG_LEVEL ; -static int timeToTurnOver = 0 ; - -/* - * log_default_path -- get default log file pathname - */ - -static void log_default_path(void) -{ -#ifdef UNIX - sprintf(logFname, "%s/%s", LOGDIR, DEFAULT_LOGFILE) ; -#endif -#if defined(WIN32) || defined(OS2) - { - char *env; - if ((env = getenv("TEMP")) == NULL) - env = getenv("TMP"); - if (env != NULL && - strlen(env) + strlen(DEFAULT_LOGFILE) + 1 < sizeof(logFname)) { - (void)strcpy(logFname, env); - (void)strcat(logFname, "\\"); - (void)strcat(logFname, DEFAULT_LOGFILE); - } - } -#endif -} const char *name; - - -/* - * log_setlevel - set log level - */ -void log_setlevel(int level) -{ - logLevel = level; -} - -/* - * log_strtolevel - string to log level - */ -int log_strtolevel(char *s) -{ - if ('0' <= s[0] && s[0] <= '9') { - return atoi(s) ; - } else if (!strcmp(s, "none")) { - return LOGLEVEL_NONE; - } else if (!strcmp(s, "fatal")) { - return LOGLEVEL_FATAL; - } else if (!strcmp(s, "warn") || !strcmp(s, "warning")) { - return LOGLEVEL_WARN; - } else if (!strcmp(s, "trace")) { - return LOGLEVEL_TRACE; - } else { - return -1; - } -} - -typedef struct { - const char *name; - int value; -} syslog_facility_t; - -static const syslog_facility_t facility_table[] = { -#ifdef LOG_AUTH - {"auth", LOG_AUTH}, -#endif -#ifdef LOG_AUTHPRIV - {"authpriv", LOG_AUTHPRIV}, -#endif -#ifdef LOG_CRON - {"cron", LOG_CRON}, -#endif -#ifdef LOG_DAEMON - {"daemon", LOG_DAEMON}, -#endif -#ifdef LOG_FTP - {"ftp", LOG_FTP}, -#endif -#ifdef LOG_KERN - {"kern", LOG_KERN}, -#endif -#ifdef LOG_LOCAL0 - {"local0", LOG_LOCAL0}, -#endif -#ifdef LOG_LOCAL1 - {"local1", LOG_LOCAL1}, -#endif -#ifdef LOG_LOCAL2 - {"local2", LOG_LOCAL2}, -#endif -#ifdef LOG_LOCAL3 - {"local3", LOG_LOCAL3}, -#endif -#ifdef LOG_LOCAL4 - {"local4", LOG_LOCAL4}, -#endif -#ifdef LOG_LOCAL5 - {"local5", LOG_LOCAL5}, -#endif -#ifdef LOG_LOCAL6 - {"local6", LOG_LOCAL6}, -#endif -#ifdef LOG_LOCAL7 - {"local7", LOG_LOCAL7}, -#endif -#ifdef LOG_LPR - {"lpr", LOG_LPR}, -#endif -#ifdef LOG_MAIL - {"mail", LOG_MAIL}, -#endif -#ifdef LOG_NEWS - {"news", LOG_NEWS}, -#endif -#ifdef LOG_SYSLOG - {"syslog", LOG_SYSLOG}, -#endif -#ifdef LOG_USER - {"user", LOG_USER}, -#endif -#ifdef LOG_UUCP - {"uucp", LOG_UUCP}, -#endif - {NULL, 0} -}; - -/* - * log_strtofacility - string to log facility - */ -static int log_strtofacility(char *name, int *value) -{ - const syslog_facility_t *p; - - for (p = facility_table; p->name != NULL; p++) { - if (strcmp(name, p->name) == 0) { - *value = p->value; - return 1; - } - } - - return 0; -} - -/* - * log_terminate - terminate logging - */ - -void log_terminate(void) -{ - if (logMode == LOGMODE_FILE && logFptr != NULL) { - fclose(logFptr) ; - logFptr = NULL ; - } -} - -/* - * log_turnover_request - request turning over log - * this function is intended for calling from singnal handler. - */ - -void log_turnover_request(void) -{ - timeToTurnOver = 1; -} - -/* - * log_turnover - turn over log if requested - */ - -void log_turnover(void) -{ - if (timeToTurnOver && logMode == LOGMODE_FILE) { - timeToTurnOver = 0; - log_trace_printf("--- log file turned over\n"); - log_terminate() ; - logFptr = fopen(logFname, "a") ; - } -} - -/* - * libmdn_logproc - log hander for libmdn - * output message to a regular log file. - */ -static void -libmdn_logproc(int level, const char *message) -{ - char buff[512] ; - char *newline; - time_t t; - - if (logMode == LOGMODE_SYSLOG) { -#ifdef HAVE_SYSLOG - switch (level) { - case mdn_log_level_fatal: - syslog(LOG_ERR, "[FATAL] %s", message); - break; - case mdn_log_level_error: - syslog(LOG_ERR, "[ERROR] %s", message); - break; - case mdn_log_level_warning: - syslog(LOG_WARNING, "[WARNING] %s", message); - break; - case mdn_log_level_info: - syslog(LOG_INFO, "[INFO] %s", message); - break; - case mdn_log_level_trace: - syslog(LOG_DEBUG, "[TRACE] %s", message); - break; - case mdn_log_level_dump: - syslog(LOG_DEBUG, "[DUMP] %s", message); - break; - default: - syslog(LOG_NOTICE, "[LEVEL%d] %s", level, message); - break; - } -#endif /* HAVE_SYSLOG */ - - } else if (logMode == LOGMODE_STDERR) { - fputs(message, logFptr) ; - fflush(logFptr) ; - - } else if (logFptr != NULL) { - t = time(NULL); - strcpy(buff, ctime(&t)); - newline = strchr(buff, '\n'); - if (newline != NULL) - *newline = '\0'; - - fputs(buff, logFptr); - fprintf(logFptr, " [%d]: ", (int)getpid()); - fputs(message, logFptr) ; - fflush(logFptr) ; - } -} - -/* - * libmdn_string_to_loglevel - convert log level name to value. - */ - -static int -libmdn_string_to_loglevel(char *s) -{ - if ('0' <= s[0] && s[0] <= '9') - return atoi(s); - else if (!strcmp(s, "fatal")) - return mdn_log_level_fatal; - else if (!strcmp(s, "error")) - return mdn_log_level_error; - else if (!strcmp(s, "warning")) - return mdn_log_level_warning; - else if (!strcmp(s, "info")) - return mdn_log_level_info; - else if (!strcmp(s, "trace")) - return mdn_log_level_trace; - else if (!strcmp(s, "dump")) - return mdn_log_level_dump; - else - return -1; -} - -/* - * log_vprintf - as name describes - */ - -static void log_vprintf(int level, char *fmt, va_list arg_ptr) -{ - char buff[512] ; - char *newline; - time_t t; - - if (logLevel < level) { - return; - } - - /* - * format message - */ - - if (logMode == LOGMODE_SYSLOG) { - vsprintf(buff, fmt, arg_ptr) ; - -#ifdef HAVE_SYSLOG - switch (level) { - case LOGLEVEL_FATAL: - syslog(LOG_ERR, buff); - break; - case LOGLEVEL_WARN: - syslog(LOG_WARNING, buff); - break; - case LOGLEVEL_TRACE: - syslog(LOG_DEBUG, buff); - break; - } -#endif /* HAVE_SYSLOG */ - - } else if (logMode == LOGMODE_STDERR) { - vfprintf(logFptr, fmt, arg_ptr) ; - fflush(logFptr) ; - - } else if (logFptr != NULL) { - t = time(NULL); - strcpy(buff, ctime(&t)); - newline = strchr(buff, '\n'); - if (newline != NULL) - *newline = '\0'; - - fputs(buff, logFptr); - fprintf(logFptr, " [%d]: ", (int)getpid()); - vfprintf(logFptr, fmt, arg_ptr); - fflush(logFptr) ; - } - -#ifdef WIN32 /* For NT, having trouble with */ - fclose(logFptr) ; /* reading open'd logging file */ - logFptr = NULL ; /* so, close and re-open it */ -#endif -} - -/* - * log_fatal_printf, log_warn_printf, log_trace_printf - write out - * fatal/warning/trace log to the log file - */ - -void log_fatal_printf(char *fmt, ...) -{ - va_list arg_ptr ; - - va_start(arg_ptr, fmt) ; - log_vprintf(LOGLEVEL_FATAL, fmt, arg_ptr) ; - va_end(arg_ptr) ; -} - -void log_warn_printf(char *fmt, ...) -{ - va_list arg_ptr ; - - va_start(arg_ptr, fmt) ; - log_vprintf(LOGLEVEL_WARN, fmt, arg_ptr) ; - va_end(arg_ptr) ; -} - -void log_trace_printf(char *fmt, ...) -{ - va_list arg_ptr ; - - va_start(arg_ptr, fmt) ; - log_vprintf(LOGLEVEL_TRACE, fmt, arg_ptr) ; - va_end(arg_ptr) ; -} - -/* - * log_configure - configure logging (must be called after 'config_load') - */ - -BOOL log_configure(int ac, char *av[]) -{ - int i, nArgs ; - char **aArgs ; - char *fn = NULL ; - int lineNo; - - log_default_path(); - -#ifdef HAVE_SYSLOG - logFacility = LOG_DAEMON; -#endif - - for (i = 1 ; i < ac ; i++) { - if (strcmp(av[i], CMDOPT_LOGFILE) == 0) { - fn = av[i+=1] ; - } - } - if (fn != NULL) { - if (strlen(fn) + 1 > sizeof(logFname)) { - fprintf(stderr, - "log_configure - too long log file name \"%.100s...\"\n", - fn); - return FALSE; - } - strcpy(logFname, fn) ; - - } else if (config_query_value(KW_LOG_FILE, &nArgs, &aArgs, &lineNo)) { - if (nArgs != 2) { - fprintf(stderr, - "log_configure - wrong # of args for \"%s\", line %d\n", - KW_LOG_FILE, lineNo); - return FALSE; - } - strcpy(logFname, aArgs[1]) ; - } - - if (config_query_value(KW_LOG_LEVEL, &nArgs, &aArgs, &lineNo) == TRUE) { - int level ; - - if (nArgs != 2) { - fprintf(stderr, - "log_configure - wrong # of args for \"%s\", line %d\n", - KW_LOG_LEVEL, lineNo); - return FALSE; - } - if ((level = log_strtolevel(aArgs[1])) < 0) { - fprintf(stderr, - "log_configure - invalid log level \"%.100s\", line %d\n", - aArgs[1], lineNo); - return FALSE; - } - log_setlevel(level); - } - - if (config_query_value(KW_MDN_LOG_LEVEL, &nArgs, &aArgs, &lineNo)) { - int level; - - if (nArgs != 2) { - fprintf(stderr, - "wrong # of args for \"%s\", line %d\n", KW_MDN_LOG_LEVEL, - lineNo); - return FALSE; - } - if ((level = libmdn_string_to_loglevel(aArgs[1])) < 0) { - fprintf(stderr, - "unknown mdn log level \"%.100s\", line %d\n", aArgs[1], - lineNo); - return FALSE; - } - mdn_log_setlevel(level); - } - -#ifdef HAVE_SYSLOG - if (config_query_value(KW_SYSLOG_FACILITY, &nArgs, &aArgs, &lineNo) - == TRUE) { - if (nArgs != 2) { - fprintf(stderr, - "log_configure - wrong # of args for \"%s\", line %d\n", - KW_LOG_LEVEL, lineNo); - return FALSE; - } else if (!log_strtofacility(aArgs[1], &logFacility)) { - fprintf(stderr, - "log_configure - unknown syslog facility \"%.100s\", " - "line %d\n", aArgs[1], lineNo); - return FALSE; - } - } -#endif /* HAVE_SYSLOG */ - - if (*logFname == '\0') { - fprintf(stderr, "log_configure - no logging file specified\n"); - return FALSE; - } - - if (strcmp(logFname, "syslog") == 0) { -#ifdef HAVE_SYSLOG - logMode = LOGMODE_SYSLOG; - logFptr = NULL; - openlog("mdnsproxy", LOG_NDELAY | LOG_PID, logFacility); - syslog(LOG_NOTICE, "** mdnsproxy version %s", mdn_version_getstring()); -#else /* not HAVE_SYSLOG */ - fprintf(stderr, "log_configure - syslog is unavailable\n"); - return FALSE; -#endif /* not HAVE_SYSLOG */ - } else if (strcmp(logFname, "stderr") == 0) { - logMode = LOGMODE_STDERR; - logFptr = stderr; - } else { - logMode = LOGMODE_FILE; - logFptr = fopen(logFname, "a") ; - if (logFptr == NULL) { - fprintf(stderr, - "log_configure - cannot open, the log file\"%.100s\"\n", - logFname); - return FALSE; - } - fprintf(stderr, "** mdnsproxy version %s\n", mdn_version_getstring()); - } - - mdn_log_setproc(libmdn_logproc); - - return TRUE; -} diff --git a/contrib/idn/mdnkit/mdnsproxy/make.wnt b/contrib/idn/mdnkit/mdnsproxy/make.wnt deleted file mode 100644 index 63922e9d8c..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/make.wnt +++ /dev/null @@ -1,128 +0,0 @@ -# -# Makefile for mDNS Proxy Server, WINNT version -# -# $Id: make.wnt,v 1.2 2002/02/08 05:41:05 marka Exp $ -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -# - -!include - -ICONVDIR = ..\win -MDNDIR = ..\lib -BINDIR = ..\..\bin\win - -INCDIR = ..\include -LIBS = $(MDNDIR)\libmdn.lib $(ICONVDIR)\iconv.lib -SYSLIBS = $(conlibsdll) - -# -# Files to build mDNS Proxy -# - -HDRS = mdnsproxy.h winserv.h - -SRCS = winmain.c winserv.c server.c message.c translate.c \ - logging.c proxycnf.c acl.c -OBJS = winmain.obj winserv.obj server.obj message.obj translate.obj \ - logging.obj proxycnf.obj acl.obj - -# -# Target to build -# - -TARGETS = mdnsproxy.exe $(ICONVDIR)\iconv.dll - -all : $(TARGETS) - -install : $(TARGETS) - copy mdnsproxy.exe $(BINDIR) - copy $(ICONVDIR)\iconv.dll $(BINDIR) - -mdnsproxy.exe : $(OBJS) $(LIBS) - $(link) $(conflags) -out:mdnsproxy.exe $(OBJS) $(LIBS) $(SYSLIBS) - -clean: - del *.exe *.obj *.lib core *.core *~ - -# -# Dependecnies -# - -winmain.obj : winmain.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -winserv.obj : winserv.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -server.obj : server.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -message.obj : message.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -translate.obj : translate.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -logging.obj : logging.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -proxycnf.obj : proxycnf.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c - -acl.obj : acl.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -I$(INCDIR) -DDEBUG $*.c diff --git a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.8.in b/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.8.in deleted file mode 100644 index 7e05ec07bd..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.8.in +++ /dev/null @@ -1,314 +0,0 @@ -.\" $Id: mdnsproxy.8.in,v 1.2 2002/02/08 05:41:07 marka Exp $ -.\" -.\" Copyright (c) 2000 Japan Network Information Center. All rights reserved. -.\" -.\" By using this file, you agree to the terms and conditions set forth bellow. -.\" -.\" LICENSE TERMS AND CONDITIONS -.\" -.\" The following License Terms and Conditions apply, unless a different -.\" license is obtained from Japan Network Information Center ("JPNIC"), -.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -.\" Chiyoda-ku, Tokyo 101-0047, Japan. -.\" -.\" 1. Use, Modification and Redistribution (including distribution of any -.\" modified or derived work) in source and/or binary forms is permitted -.\" under this License Terms and Conditions. -.\" -.\" 2. Redistribution of source code must retain the copyright notices as they -.\" appear in each source code file, this License Terms and Conditions. -.\" -.\" 3. Redistribution in binary form must reproduce the Copyright Notice, -.\" this License Terms and Conditions, in the documentation and/or other -.\" materials provided with the distribution. For the purposes of binary -.\" distribution the "Copyright Notice" refers to the following language: -.\" "Copyright (c) Japan Network Information Center. All rights reserved." -.\" -.\" 4. Neither the name of JPNIC may be used to endorse or promote products -.\" derived from this Software without specific prior written approval of -.\" JPNIC. -.\" -.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -.\" -.\" 6. Indemnification by Licensee -.\" Any person or entities using and/or redistributing this Software under -.\" this License Terms and Conditions shall defend indemnify and hold -.\" harmless JPNIC from and against any and all judgements damages, -.\" expenses, settlement liabilities, cost and other liabilities of any -.\" kind as a result of use and redistribution of this Software or any -.\" claim, suite, action, litigation or proceeding by any third party -.\" arising out of or relates to this License Terms and Conditions. -.\" -.\" 7. Governing Law, Jurisdiction and Venue -.\" This License Terms and Conditions shall be governed by and and -.\" construed in accordance with the law of Japan. Any person or entities -.\" using and/or redistributing this Software under this License Terms and -.\" Conditions hereby agrees and consent to the personal and exclusive -.\" jurisdiction and venue of Tokyo District Court of Japan. -.TH DNSPROXY 8 -.SH NAME -mdnsproxy \- DNS proxy server for multi-lingual DNS - -.SH SYNOPSIS -.B mdnsproxy -[ \-daemon ] [ \-config ] [ \-logfile ] -.br -.B mdnsproxy -\-version - -.SH DESCRIPTION -.B mdnsproxy -resides between application (resolver) and DNS server. -.PP -It accepts DNS requests from application (resolver) and converting -domain names in those requests into DNS server's acceptable encoding, -and forward those converted requests. It also accepts responses from -DNS server and converting domain names in those resopnses into -application's acceptable encoding and forward those responses to -applications. - -.SH OPTIONS -.TP -.B \-daemon -Run mdnsproxy as daemon. Otherwise, mdnsproxy will run as normal -console program. -.TP -.B \-config -Specifies configuration file (see later). If not specified, -mdnsproxy uses default configuration file. -See -.B FILES -section for default configuration file. -.TP -.B \-logfile -Specifies logging file. If not specified. -mdnsproxy uses default logging file. -See -.B FILES -section for default configuration file. -.TP -.B \-version -Prints version information to standard error and quits. - -.SH CONFIGURATION -Configuration file is simple text file which defines several -configuration data. -.IP "listen
      " -.RS -Defines listening port (both TCP and UDP).
      is one of -.RS -.PP -: -.br -: -.br - -.PP -.RE -If omitted, mdnsproxy uses default value shown below. -.RS -.PP -IP Address INADDR_ANY (0.0.0.0) -.br -port number 53 -.PP -.RE -.RE -.IP "forward
      [ bind4compat ]" -.RS -Defines forwarding server's address. Format is same as 'listen'. -.PP -example: -.RS -forward 10.1.2.3 -.RE -.PP -If "bind4compat" was given, mdnsproxy uses above listen port -as forwading UDP's source address. If not given, mdnsproxy uses -port > 1024 as forwading UDP's source. -.RE -.IP "client-encoding " -.RS -Defines client side character encoding scheme. -.PP -example: -.RS -.nf -client-encoding\ \ EUC-JP -.fi -.RE -.RE -.IP "mdn-conf-file " -.RS -Specifies configuration file for libmdn, the library responsible for most -of the MDN processing for mdnsproxy. -If the entry is ommitted, mdnsproxy reads "@sysconfdir@/mdn.conf". -.RE -.IP "log-file " -.RS -Defines log file name. It may be overridden with command line -option '-logfile '. If no log file given, mdnsproxy writes -log data into "@logdir@/mdnsproxy.log". -Sending SIGHUP causes mdnsproxy to close the log file and then reopen it. -.PP -If is set to ``syslog'', mdnsproxy outputs log messages with -syslog. -If is set to ``stderr'', mdnsproxy outputs messages to standard -error. -.RE -.IP "log-level " -.RS -Sets the log level. Available levels are ``none'' (no logging at all), -``fatal'' (only logs fatal errors), ``warn'' (also logs warning messages) -and ``trace'' (also includes trace level messages). The default level is -``warn''. Please note that if you set the level to ``trace'', the size of -the log file grows quickly. -.PP -If mdnsproxy is configured to output log messages with syslog (see the -description of the ``log-file'' entry), ``fatal'' messages are output -with ``err'' priority, ``warning'' messages with ``warning'' and ``trace'' -messages with ``debug''. -.RE -.IP "mdn-log-level " -.RS -Specifies the logging level for libmdn. -Unless you are debugging mDNkit, you should keep this entry unspecified. -.RE -.IP "syslog-facility " -.RS -Specifies the syslog facility to be assigned to log messages output by -mdnsproxy. The entry is ignored unless the `log-file' entry is set to -``syslog''. If the entry is not specified, ``daemon'' will be used. - -.RE -.IP "user-id " -.RS -Defines a user ID in which mdnsproxy operates. -Dnsproxy tries to change the user ID of its process to the specified one, -soon after initialization. -.PP -example: -.RS -.nf -user-id\ \ nobody -user-id\ \ 9999 -.fi -.RE -.PP -It is strongly recommended to use this option for security reasons. -.RE -.IP "group-id " -.RS -Defines a group ID in which mdnsproxy operates. -Dnsproxy tries to change the group ID of its process to the specified one, -soon after initialization. -.PP -example: -.RS -.nf -group-id\ \ nobody -group-id\ \ 9999 -.fi -.RE -.RE -.IP "root-directory " -.RS -Defines the pathname of the root directory for the mdnsproxy process. -Dnsproxy performs chroot() to set the specified directory as the -root directory for the process after initialization. -.PP -example: -.RS -.nf -root-directory /var/mdnsproxy -.fi -.RE -.RE -.IP "allow-access
      ..." -.RS -Specifies which hosts are allowed to access to the server. -
      is an IP address (in dotted numeric form) or IP prefix -(IP address followed by a slash and netmask). -.PP -example: -.RS -.nf -allow-access 192.168.100.1 -allow-access 192.168.10.0/24 -.fi -.RE -.PP -You can specify one or more
      . The server rejects accesses -from clients not matched to any
      . -You can also define allow-access several times. -.PP -.RS -.nf -allow-access 192.168.100.1 -allow-access 192.168.100.2 -.fi -.RE -.PP -This is equivarent to: -.PP -.RS -.nf -allow-access 192.168.100.1 192.168.100.2 -.fi -.RE -.PP -If no entry is specified, the server allows to access from all hosts. -.RE -.IP "log-on-denied " -.RS -is used to tell mdnsproxy whether or not to log denied access. - is either "yes" or "no". -If "yes" is specified, the server records denied access. -The default value is "no". -.RE -.RE - -.SH NOTES -Some applications locally mangles domain names. In those cases, -mdnsproxy cannot works correctly. -.PP -For 'nslookup', it generally reject non-ascii domain names. -You need 8bit through patched version of nslookup. -.PP -For UNIX resolver generally rejects domain names using non-ascii characters. -You need 8bit through patched version of resolver. -.PP -For Windows, NS works well with mdnsproxy. For IE, turn off "use UTF-8" -setting, and generally works. But for IE, embedded URL's in page will -converted by IE (to page's original encoding), -and they conflict with mdnsproxy. - -.SH FILES -.PD 0 -.TP -.B @sysconfdir@/mdnsproxy.conf -Default configuration file for mdnsproxy. -.TP -.B @sysconfdir@/mdn.conf -Default configuration file for libmdn. -.TP -.B @logdir@/mdnsproxy.log -Default logging file. -.PD - -.SH SLL ALSO -.BR named(8), -.BR syslogd(8), -.BR syslog.conf(5), -.BR libmdn(3), -.BR iconv(3) diff --git a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.conf.sample b/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.conf.sample deleted file mode 100644 index 7b5b0607b1..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.conf.sample +++ /dev/null @@ -1,149 +0,0 @@ -# $Id: mdnsproxy.conf.sample,v 1.2 2002/02/08 05:41:08 marka Exp $ -# -# Sample mdnsproxy configuration file 'mdnsproxy.conf'. -# - -# -# 'listen' entry specifies the mdnsproxy's listening port. -# The default is to use address 0.0.0.0 (INADDR_ANY) and port 53. -# -# syntax) -# listen [][:] -# -# ex) listen 127.0.0.1 -- only accept loopback connections -# listen :1053 -- port number can be specified -# listen 127.0.0.1:1053 -- combination of above -# -#listen 127.0.0.1 - -# -# 'forward' entry specifies the name server's port to which mdnsproxy -# forwards requests. This entry MUST be specified. -# -# Normally mdnsproxy uses unspecified local port number for sending -# queries to the server, but if 'bind4compat' option is specified, -# mdnsproxy uses the same port number as the listening port specified -# by the 'listen' entry. -# -# syntax) -# forward [:] [bind4compat] -# -# ex) forward 10.0.0.2 -- forward 10.0.0.2 port 53 -# forward 10.0.0.2:1053 -- port number can be specified -# forward 10.0.0.2 bind4compat -- use fixed port number. -forward xxx.xxx.xxx.xxx - -# -# 'client-encoding' entry specifies the codeset (encoding) of domain -# names in the messages sent by the clients. -# -# syntax) -# client-encoding -# -#client-encoding EUC-JP -client-encoding Shift_JIS - -# -# 'mdn-conf-file' entry specifies the pathname of configuration file for -# libmdn, the library responsible for most of the MDN processing for -# mdnsproxy. If it is not specified, mdnsproxy reads default configuration -# file. -# -# syntax) -# mdn-conf-file -# -#mdn-conf-file /usr/local/etc/mdn.conf - -# -# 'log-file' entry specifies the pathname of the log file. If the string -# `syslog' is given, mdnsproxy will record its events with syslog. If -# `stderr' is given, mdnsproxy will record events to standard error. -# If the entry is not specified, default log file will be used. -# -# syntax) -# log-file ( | syslog | stderr) -# -#log-file /var/log/mdnsproxy.log - -# -# 'log-level' entry specifies the logging level for mdnsproxy. -# Valid levels are 'none' (no logging at all, not recommended), -# 'fatal' (only logs fatal errors), 'warn' (also logs warning messages) -# and 'trace' (also includes trace messages). The default level is 'warn'. -# 'trace' level is useful for debugging mdnsproxy itself, but it makes -# the log file grow rather quickly. -# -# syntax) -# log-level -# -log-level warn - -# -# 'mdn-log-level' entry specifies the logging level for libmdn. -# Unless you are debugging mDNkit, you should keep this entry unspecified. -# -# syntax) -# mdn-log-level -# -#mdn-log-level 1 - -# -# 'syslog-facility' entry specifies the syslog facility to be assigned to -# log messages output by mdnsproxy. The entry is ignored unless the -# `log-file' entry is set to `syslog'. If the entry is not specified, -# `daemon' will be used. -# -# syntax) -# syslog-facility -# -#syslog-facility daemon - -# -# 'user-id' entry and 'group-id' entry specify the user/group ID -# in which privilege mdnsproxy operates. mdnsproxy tries to switch -# to the specified user/group after initialization process is finished. -# -# syntax) -# user-id -# group-id -# -# ex) user-id nobody -- specify by name, -# group-id 1000 -- or by number -# -user-id nobody -#group-id nobody - -# -# 'root-directory' entry specifies the root directory of mdnsproxy -# process. mdnsproxy performs chroot() to this directory after -# initialization. Note that chroot() is allowed only for super-users. -# -# syntax) -# root-directory -# -root-directory /var/mdnsproxy - -# -# `allow-access' entry specifies which hosts are allowed to access to the -# server. Defining multiple entries are also permitted. If it is not -# specified, the server allows to acceess from all hosts. -# -# syntax) -# allow-access | -# -# ex) allow-access 127.0.0.1 -# -- allow access from the host 127.0.0.1 -# allow-access 192.168.100.0/24 -# -- allow access from hosts on the network 192.168.100.0/24. -# -#allow-access xxx.xxx.xxx.xxx - -# -# `log-on-denied' entry specifies whether or not to log denied access. -# If it is not specified, the server doesn't record denied access. -# -# syntax) -# log-on-denied -# log-on-denied -# -#log-on-denied no diff --git a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.def b/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.def deleted file mode 100644 index abdcb93e38..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.def +++ /dev/null @@ -1,3 +0,0 @@ -NAME dnsproxy WINDOWCOMPAT NEWFILES -EXETYPE OS2 -STACKSIZE 32768 diff --git a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.h b/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.h deleted file mode 100644 index 6231910f7d..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/mdnsproxy.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * dnsproxy.h - mDNS Proxy, Common Definitions - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* $Id: mdnsproxy.h,v 1.2 2002/02/08 05:41:09 marka Exp $ */ - -#ifndef DNSPROXY_H -#define DNSPROXY_H 1 - -#include - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#include -#endif - -#include "proxycnf.h" - -/* - * Redefine TRUE and FALSE. - */ -#undef TRUE -#undef FALSE -#define TRUE 1 -#define FALSE 0 - -/* - * Macro for Error Logging - */ - -enum { - LOGMODE_FILE = 0, - LOGMODE_SYSLOG = 1, - LOGMODE_STDERR = 2 -}; - -enum { - LOGLEVEL_NONE = 0, - LOGLEVEL_FATAL = 1, - LOGLEVEL_WARN = 2, - LOGLEVEL_TRACE = 3 -}; - -BOOL log_configure(int ac, char *av[]) ; -void log_terminate(void) ; -void log_turnover_request(void) ; -void log_turnover(void) ; -void log_setlevel(int level) ; -int log_strtolevel(char *s) ; -void log_fatal_printf(char *fmt, ...) ; -void log_warn_printf(char *fmt, ...) ; -void log_trace_printf(char *fmt, ...) ; - -#define TRACE log_trace_printf -#define WARN log_warn_printf -#define FATAL log_fatal_printf - -/* - * Server's Control Entries - */ - -BOOL server_init(int ac, char *av[]) ; -void server_stop(void) ; -void server_loop(void) ; -void server_done(void) ; - -/* - * Server calls following callback when received message - */ - -void notify_message(struct sockaddr *from, int proto, - u_char *msg, int len) ; - -void notify_timer(void) ; - -/* - * To send messages, call following entires in server module - */ - -void server_forward(struct sockaddr *to, int proto, - u_char *msg, int len) ; -void server_response(struct sockaddr *to, int proto, - u_char *msg, int len) ; - -/* - * load/dump/dispose configuration data - */ - -BOOL config_load(int ac, char *av[]) ; -void config_free(void) ; -void config_dump(FILE *ofp) ; - -/* - * query configuration data - */ - -BOOL config_query_value(char *key, int *count, char ***array, int *lineNo) ; -BOOL config_query_listen(struct sockaddr *addr) ; -BOOL config_query_forward(struct sockaddr *addr) ; -BOOL config_query_restrict(BOOL *src_restrict) ; -BOOL config_query_log_on_denied(BOOL *flag) ; - -/* - * Message (domain name) translation - */ - -typedef struct translation_context { - struct sockaddr *client; /* address family/IP address/port */ - int protocol; /* IPPROTO_TCP or IPPROTO_UDP */ - unsigned int old_id; /* original message ID */ - unsigned int new_id; /* new message ID */ -} translation_context_t; - -BOOL translate_initialize(void) ; -void translate_finish(void) ; -int translate_request(translation_context_t *ctx, - const char *msg, size_t msglen, - char *translated, size_t bufsize, size_t *translatedlenp) ; -int translate_reply(translation_context_t *ctx, - const char *msg, size_t msglen, - char *translated, size_t bufsize, size_t *translatedlenp) ; - -/* - * query configuration having multiple entries (with same key) - * - * ctx = config_query_open(key, ...) ; - * while (ctx != NULL) { - * ctx = config_query_more(ctx, ...) ; - * } - * config_query_close(ctx) ; - */ - -typedef void *config_ctx_t ; /* opaque pointer to lookup context */ - -config_ctx_t config_query_open(char *key, int *count, char ***array, - int *lineNo) ; -config_ctx_t config_query_more(config_ctx_t ctx, int *count, char ***array, - int *lineNo) ; -void config_query_close(config_ctx_t ctx) ; - -/* - * managing access control list. - */ -int acl_initialize(void); -BOOL acl_test(struct sockaddr *address); -void acl_finalize(void); - -#endif /* DNSPROXY_H */ diff --git a/contrib/idn/mdnkit/mdnsproxy/message.c b/contrib/idn/mdnkit/mdnsproxy/message.c deleted file mode 100644 index 27557b22d9..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/message.c +++ /dev/null @@ -1,627 +0,0 @@ -/* - * message.c - mDNS Proxy, message handling - * - * message will passed with callback 'notify_message'. - * this module parse received message and forward request, - * or reply to originator - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: message.c,v 1.2 2002/02/08 05:41:11 marka Exp $"; -#endif - -#include - -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#include -#endif - -#include "mdnsproxy.h" - -/* - * address handling utilities - * - * addrEq check same addresses - * addrFmt format address, port & protocol - * - * these functions are same with those in 'server.c'. - * may be put in another 'utility' module. - */ - -static BOOL addrEq(struct sockaddr *a1, struct sockaddr *a2) -{ - struct sockaddr_in *ip1 = (struct sockaddr_in *) a1 ; - struct sockaddr_in *ip2 = (struct sockaddr_in *) a2 ; - - if (ip1->sin_addr.s_addr != ip2->sin_addr.s_addr) { - return FALSE ; - } - if (ip1->sin_port != ip2->sin_port) { - return FALSE ; - } - return TRUE ; -} - -static u_char fmtbuff[64] ; - -static u_char *addrFmt(struct sockaddr *addr, int proto) -{ - struct sockaddr_in *iaddr = (struct sockaddr_in *) addr ; - u_char *ap ; - u_char *pp ; - - ap = (u_char *) &iaddr->sin_addr ; - pp = (u_char *) &iaddr->sin_port ; - - sprintf(fmtbuff, "%s:%d.%d.%d.%d:%d", - (proto == SOCK_STREAM ? "TCP" : "UDP"), - (ap[0] & 0xff), (ap[1] & 0xff), (ap[2] & 0xff), (ap[3] & 0xff), - ((pp[0] & 0xff) * 256 + (pp[1] & 0xff)) ) ; - - return fmtbuff ; -} - -/* - * Managing Message ID - */ - -static u_short msgidLast = 0xffff ; -static u_short msgidMap[4096] = { 0 } ; - -#define ID_INDEX(x) (((x) & 0xfff0) >> 4) -#define ID_MASK(x) (1 << ((x) & 0x000f)) - -#define ID_CHECK(x) (msgidMap[ID_INDEX((x))] & ID_MASK((x))) -#define ID_USEIT(x) (msgidMap[ID_INDEX((x))] |= ID_MASK((x))) -#define ID_CLEAR(x) (msgidMap[ID_INDEX((x))] &= ~ID_MASK((x))) - -static BOOL idAlloc(u_short *id) -{ - u_short newid ; - - for (newid = (msgidLast + 1) & 0xffff ; - newid != msgidLast ; - newid = (newid + 1) & 0xffff) { - if (ID_CHECK(newid) == 0) { - ID_USEIT(newid) ; - msgidLast = newid ; - *id = newid ; - return TRUE ; - } - } - WARN("idAlloc - no more ID\n") ; - return FALSE ; -} - -static void idFree(u_short id) -{ - if (ID_CHECK(id) == 0) { - WARN("idAlloc - %04x is not in use\n", id) ; - return ; - } - ID_CLEAR(id) ; -} - -/* - * Message Managements - * - * Request from client is identified with its ID word. It is unique - * on one client, but proxy accepts requests from multiple clients, - * proxy cannot distinguish request with ID only, and cannot forward - * request with such ID word. - * - * So, proxy will identify requests with combination of address, port, - * (which identified client) and ID word. Then forwarding request, - * proxy allocate unique ID, and change request's ID with new one. - * - * Response from DNS server will identified with newly allocated ID. - * For responding such response to originator, replace response's - * ID with original one, and send response to marked address/port. - */ - -typedef struct _MSG *MSGPTR ; - -typedef struct _MSG { - MSGPTR prev ; - MSGPTR next ; - time_t last ; - struct sockaddr from ; - int proto ; - u_short orgId ; - u_short newId ; - translation_context_t trctx ; -} MSGREC ; - -static MSGREC listMsg = { 0 } ; - -/* - * searchReq - search request in message list, search on original ID - */ - -static MSGPTR searchReq(u_short id, int proto, struct sockaddr *addr) -{ - MSGPTR p ; - - if (listMsg.prev == NULL || listMsg.next == NULL) { - listMsg.prev = &listMsg ; - listMsg.next = &listMsg ; - } - for (p = listMsg.next ; p != &listMsg ; p = p->next) { - if (p->orgId != id || p->proto != proto) { - continue ; - } - if (addrEq(&p->from, addr) != TRUE) { - continue ; - } - p->last = time(NULL) ; - return p ; - } - return NULL ; -} - -/* - * searchOrg - search original request matching to new ID - */ - -static MSGPTR searchOrg(u_short id, int proto) -{ - MSGPTR p ; - - if (listMsg.prev == NULL || listMsg.next == NULL) { - listMsg.prev = &listMsg ; - listMsg.next = &listMsg ; - } - for (p = listMsg.next ; p != &listMsg ; p = p->next) { - if (p->newId != id || p->proto != proto) { - continue ; - } - p->last = time(NULL) ; - return p ; - } - return NULL ; -} - -/* - * createReq - create new message record for new request - * - * it also allocate new ID for this request, used for - * forwarding this request - */ - -static MSGPTR createReq(u_short id, int proto, struct sockaddr *addr) -{ - u_short newid ; - MSGPTR pMsg, prev, next ; - - if (listMsg.prev == NULL || listMsg.next == NULL) { - listMsg.prev = &listMsg ; - listMsg.next = &listMsg ; - } - - if (idAlloc(&newid) != TRUE) { - WARN("createReq - no more ID\n") ; - return NULL ; - } - if ((pMsg = (MSGPTR) malloc(sizeof(MSGREC))) == NULL) { - WARN("createReq - cannot allocate message record\n") ; - idFree(newid) ; - return NULL ; - } - - memset(pMsg, 0, sizeof(MSGREC)) ; - - memcpy(&pMsg->from, addr, sizeof(struct sockaddr)) ; - pMsg->proto = proto ; - pMsg->orgId = id ; - pMsg->newId = newid ; - pMsg->last = time(NULL) ; - - pMsg->trctx.client = &pMsg->from ; - pMsg->trctx.protocol = pMsg->proto ; - pMsg->trctx.old_id = pMsg->orgId ; - pMsg->trctx.new_id = pMsg->newId ; - - prev = listMsg.prev ; - next = prev->next ; - - prev->next = pMsg ; - next->prev = pMsg ; - pMsg->prev = prev ; - pMsg->next = next ; - - return pMsg ; -} - -/* - * disposeReq - dispose message record - */ - -static void disposeReq(MSGPTR pMsg) -{ - MSGPTR p ; - - if (listMsg.prev == NULL || listMsg.next == NULL) { - listMsg.prev = &listMsg ; - listMsg.next = &listMsg ; - } - - for (p = listMsg.next ; p != &listMsg ; p = p->next) { - if (p == pMsg) { - break ; - } - } - if (p == pMsg) { /* safe to unlink it */ - pMsg->prev->next = pMsg->next ; - pMsg->next->prev = pMsg->prev ; - } - idFree(pMsg->newId) ; - free(pMsg) ; -} - -/* - * messageForward - forward the request - */ - -static void errorOnRequest(MSGPTR pMsg, u_char *msg, int len, size_t err) -{ - u_short errmsg[6] ; - u_short flags ; - u_short *ps ; - - TRACE("errorOnRequest %d\n", err) ; - - ps = (u_short *) msg ; - flags = ntohs(ps[1]) ; - flags = ((flags & 0x7fff) | 0x8000) ; /* QR to response */ - flags = ((flags & 0xfff8) | (err & 0x0007)) ; /* set RCODE */ - - memset(errmsg, 0, sizeof(errmsg)) ; - errmsg[0] = htons(pMsg->orgId) ; - errmsg[1] = htons(flags) ; - - server_response(&pMsg->from, pMsg->proto, (u_char *) errmsg, sizeof(errmsg)) ; -} - -static void messageForward(MSGPTR pMsg, u_char *msg, int len) -{ - u_short *p ; - u_char buff[1024] ; - u_char *bbase ; - size_t bleng ; - size_t cleng = 0 ; /* avoid un-expected length on xlate error */ - size_t cstat = 0 ; /* avoid un-expected status on xlate error */ - - TRACE("messageForward - %04x -> %04x\n", pMsg->orgId, pMsg->newId) ; - - /* - * prepare conversion buffer - */ - - if (len < sizeof(buff) / 2) { - bbase = buff ; - bleng = sizeof(buff) ; - } else { - bbase = malloc(len * 2) ; - bleng = len * 2 ; - } - if (bbase == NULL) { - WARN("messageForward - cannot prepare conversion buffer\n") ; - return ; - } - - /* - * translate message (domain names) - */ - - TRACE("messageForward - translate request\n") ; - - cstat = translate_request(&pMsg->trctx, msg, len, bbase, bleng, &cleng) ; - - TRACE("messageForward - translated status %d length %d\n", cstat, cleng) ; - - if (cstat != 0) { /* error on conversion */ - WARN("messageForward - translation error %d\n", cstat) ; - errorOnRequest(pMsg, msg, len, cstat) ; - return ; - } - if (pMsg->proto == SOCK_DGRAM && cleng > 512) { - WARN("messageForward - translation overflow %d\n", cleng) ; - errorOnRequest(pMsg, msg, len, 2) ; - return ; - } - - /* - * forward the request - */ - - p = (u_short *) bbase ; - p[0] = htons(pMsg->newId) ; - - server_forward(NULL, pMsg->proto, bbase, cleng) ; - - /* - * cleanup buffer - */ - - if (bbase != buff) { - free(bbase) ; - } -} - -/* - * messageResponse - response to originating client - */ - -static void errorOnResponse(MSGPTR pMsg, u_char *msg, int len, size_t err) -{ - u_short errmsg[6] ; - u_short flags ; - u_short *ps ; - - TRACE("errorOnResponse %d\n", err) ; - - ps = (u_short *) msg ; - flags = ntohs(ps[1]) ; - flags = ((flags & 0x7fff) | 0x8000) ; /* QR to response */ - flags = ((flags & 0xfff8) | (err & 0x0007)) ; /* set RCODE */ - - memset(errmsg, 0, sizeof(errmsg)) ; - errmsg[0] = htons(pMsg->orgId) ; - errmsg[1] = htons(flags) ; - - server_response(&pMsg->from, pMsg->proto, (u_char *) errmsg, sizeof(errmsg)) ; -} - -static void messageResponse(MSGPTR pMsg, u_char *msg, int len) -{ - u_short *p ; - u_char buff[1024] ; - u_char *bbase ; - size_t bleng ; - size_t cleng ; - size_t cstat ; - - TRACE("messageResponse - %04x <- %04x\n", pMsg->orgId, pMsg->newId) ; - - /* - * prepare conversion buffer - */ - - if (len < sizeof(buff) / 2) { - bbase = buff ; - bleng = sizeof(buff) ; - } else { - bbase = malloc(len * 2) ; - bleng = len * 2 ; - } - if (bbase == NULL) { - WARN("messageResponse - cannot prepare conversion buffer\n") ; - return ; - } - - /* - * translate message (domain names) - */ - - TRACE("messageResponse - translate response\n") ; - - cstat = translate_reply(&pMsg->trctx, msg, len, bbase, bleng, &cleng) ; - - TRACE("messageResponse - translated status %d length %d\n", cstat, cleng) ; - - if (cstat != 0) { /* error on conversion */ - WARN("messageResponse - translation error %d\n", cstat) ; - errorOnResponse(pMsg, msg, len, cstat) ; - return ; - } - if (pMsg->proto == SOCK_DGRAM && cleng > 512) { - WARN("messageResponse - translation overflow %d\n", cleng) ; - errorOnResponse(pMsg, msg, len, 2) ; - return ; - } - - /* - * reply back to requester - */ - - p = (u_short *) bbase ; - p[0] = htons(pMsg->orgId) ; - - server_response(&pMsg->from, pMsg->proto, bbase, cleng) ; - - /* - * cleanup buffer - */ - - if (bbase != buff) { - free(bbase) ; - } -} - -/* - * notify_message - callback from server loop - */ - -void notify_message(struct sockaddr *from, int proto, u_char *msg, int len) -{ - u_short *p = (u_short *) msg ; - u_short msgid, flags ; - MSGPTR pMsg ; -#ifdef DEBUG - char logbuf[256] ; -#endif - - msgid = ntohs(p[0]) ; - flags = ntohs(p[1]) ; - -#ifdef DEBUG - if ((flags & 0x8000) == 0) { - sprintf(logbuf, "Request %04x (%04x) from %s, %d bytes", - msgid, flags, addrFmt(from, proto), len) ; - } else { - sprintf(logbuf, "Response %04x (%04x) from %s %d bytes", - msgid, flags, addrFmt(from, proto), len) ; - } - TRACE("%s\n", logbuf) ; - - strcpy(logbuf, " ") ; - - switch ((flags & 0x7800) >> 11) { - case 0 : strcat(logbuf, "QUERY ") ; break ; - case 1 : strcat(logbuf, "IQUERY ") ; break ; - case 2 : strcat(logbuf, "STATUS ") ; break ; - default : strcat(logbuf, "UNKNOWN") ; break ; - } - if ((flags & 0x0400) != 0) { - strcat(logbuf, ",AA") ; - } - if ((flags & 0x0200) != 0) { - strcat(logbuf, ",TC") ; - } - if ((flags & 0x0100) != 0) { - strcat(logbuf, ",RD") ; - } - if ((flags & 0x0080) != 0) { - strcat(logbuf, ",RA") ; - } - switch (flags & 0x00f) { - case 0 : strcat(logbuf, ",No Error ") ; break ; - case 1 : strcat(logbuf, ",Format Error ") ; break ; - case 2 : strcat(logbuf, ",Server Failure ") ; break ; - case 3 : strcat(logbuf, ",Name Error ") ; break ; - case 4 : strcat(logbuf, ",Not Implemented") ; break ; - case 5 : strcat(logbuf, ",Refused ") ; break ; - default : strcat(logbuf, ",Unknown Error ") ; break ; - } - TRACE("%s\n", logbuf) ; -#endif - - if ((flags & 0x8000) == 0) { /* request from client */ - - if ((pMsg = searchReq(msgid, proto, from)) == NULL) { - pMsg = createReq(msgid, proto, from) ; - } - if (pMsg == NULL) { - WARN("notify_message - cannot create message record\n") ; - return ; - } - messageForward(pMsg, msg, len) ; - - } else { /* response from server */ - - if ((pMsg = searchOrg(msgid, proto)) == NULL) { - WARN("notify_message - no corresponding request\n") ; - return ; - } - messageResponse(pMsg, msg, len) ; - disposeReq(pMsg); - } -} - -/* - * notify_timer - timer callback - */ - -static time_t timeLastCheck = 0 ; -static time_t timeInterval = 60 ; -static time_t timeTimeout = (60 * 10) ; - -void notify_timer(void) -{ - time_t t = time(NULL) ; - MSGPTR p, np ; -#ifdef DEBUG - int ndiscarded = 0; -#endif - - if (listMsg.prev == NULL || listMsg.next == NULL) { - listMsg.prev = &listMsg ; - listMsg.next = &listMsg ; - } - - if ((t - timeLastCheck) < timeInterval) { - return ; - } - for (p = listMsg.next ; p != &listMsg ; p = np) { - np = p->next ; - if ((t - p->last) > timeTimeout) { - disposeReq(p) ; -#ifdef DEBUG - ndiscarded++; -#endif - } - } -#ifdef DEBUG - TRACE("notify_timer: %d discarded\n", ndiscarded); -#endif - timeLastCheck = t; -} diff --git a/contrib/idn/mdnkit/mdnsproxy/os2main.c b/contrib/idn/mdnkit/mdnsproxy/os2main.c deleted file mode 100644 index 82d07fe534..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/os2main.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * os2main.c - mDNS Proxy, entry for OS2 - * - * For OS/2, there are no daemon, nor service. Simply - * start server program with - * - * RUN in config.sys - * START in startup.cmd - * put server program (object) into startup folder - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: os2main.c,v 1.2 2002/02/08 05:41:12 marka Exp $"; -#endif - -#ifdef OS2 - -#include -#include -#include -#include - -#include "mdnsproxy.h" /* Common definitions for mDNS proxy */ - -/* - * signal handler to catch signal to terminate server - */ - -static void handler(int signo) -{ - server_stop() ; - signal(signo, SIG_DFL) ; -} - -/* - * main - entry of os2 version - */ - -int main(int ac, char *av[]) -{ - int i, pid ; - - for (i = 1 ; i < ac ; i++) { - if (strcmp(av[i], "-daemon") == 0) { - as_daemon = TRUE ; - } else if (strcmp(av[i], "-conf") == 0) { - if (i + 1 == ac) { - fprintf(stderr, "missing argument to \"%s\"\n", av[i]) ; - return 1 ; - } - } else if (strcmp(av[i], "-logfile") == 0) { - if (i + 1 == ac) { - fprintf(stderr, "missing argument to \"%s\"\n", av[i]) ; - return 1 ; - } - } else if (av[i][0] == '-' && av[i][1] != '\0') { - fprintf(stderr, "unknown option \"%s\"\n", av[i]) ; - return 1 ; - } else { - fprintf(stderr, "too many arguments\n"); - return 1 ; - } - } - - if (config_load(ac, av) != TRUE) { - printf("cannot load configurations\n") ; - return 1 ; - } - - if (log_configure(ac, av) != TRUE) { - printf("cannot logging\n") ; - return 1 ; - } - - if (server_init(ac, av) != TRUE) { - printf("cannot initialize server\n") ; - log_terminate() ; - return 1 ; - } - - signal(SIGINT, handler) ; - signal(SIGKILL, handler) ; - signal(SIGTERM, handler) ; - signal(SIGBREAK, handler) ; - -#ifdef DEBUG - printf("Service Started\n") ; -#endif - - server_loop() ; - -#ifdef DEBUG - printf("Service Termiating...\n") ; -#endif - - server_done() ; - - log_terminate() ; - -#ifdef DEBUG - printf("Service Terminated\n") ; -#endif - - return 0 ; -} - -#endif /* OS2 */ - diff --git a/contrib/idn/mdnkit/mdnsproxy/proxycnf.c b/contrib/idn/mdnkit/mdnsproxy/proxycnf.c deleted file mode 100644 index e4b53a3e17..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/proxycnf.c +++ /dev/null @@ -1,944 +0,0 @@ -/* - * proxycnf.c - mDNS Proxy, configuration - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: proxycnf.c,v 1.2 2002/02/08 05:41:14 marka Exp $"; -#endif - -#include - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#include -#endif - -#include "mdnsproxy.h" /* Common definitions for mDNS proxy */ - -/* - * Note that logging macros (FATAL, WARN and TRACE) cannot be used - * until logging file is configured, i.e. log_configure() is called. - * Be careful. - */ - -/* - * default config file (path & basename), depend on MACHINE - */ - -#ifndef CONFIG_PATH -#warning "no \"CONFIG_PATH\", use "\"./\" as default" -#define CONFIG_PATH "./" -#endif -#ifndef CONFIG_FILE -#warning "no \"CONFIG_FILE\", use "mdnsproxy.ini" as default" -#define CONFIG_FILE "mdnsproxy.ini" -#endif -#ifndef CONFIG_HOME -#warning "no \"CONFIG_HOME\", use "\"./\" as default" -#define CONFIG_HOME "./" -#endif - -static u_char *confFile = CONFIG_FILE ; - -static u_char *confPath[] = { -#if defined(DEBUG) && !defined(UNIX) - "./", - CONFIG_HOME, -#endif - CONFIG_PATH, - NULL -} ; - -static u_char *confCommands[] = { - KW_LISTEN, - KW_FORWARD, - KW_CLIENT_ENCODING, - KW_MDN_CONF_FILE, - KW_LOG_FILE, - KW_LOG_LEVEL, - KW_MDN_LOG_LEVEL, - KW_SYSLOG_FACILITY, - KW_USER_ID, - KW_GROUP_ID, - KW_ROOT_DIRECTORY, - KW_ALLOW_ACCESS, - KW_LOG_ON_DENIED, - NULL -}; - -static u_char *confObsoleteCommands[] = { - KW_CLIENT_TRANSLATION, - KW_ALTERNATE_ENCODING, - KW_NORMALIZE, - KW_SERVER_TRANSLATION, - KW_ENCODING_ALIAS_FILE, - NULL -}; - -static u_char *expandName(u_char *name, u_char *buff) -{ -#ifndef UNIX - int inEnv = FALSE ; - u_char *bp, *ep ; - u_char env[512] ; - - for (bp = buff, ep = env ; *name != '\0' ; name++) { - if (inEnv == FALSE) { - if (*name == '$') { - inEnv = TRUE ; - ep = env ; - } else { - *bp++ = *name ; - *bp = '\0' ; - } - } else { - if (*name == '(') { - /* skip this */ - } else if (*name != ')') { - *ep++ = *name ; - *ep = '\0' ; - } else if ((ep = getenv(env)) == NULL) { - return NULL ; - } else { - while (*ep != '\0') { - *bp++ = *ep++ ; - } - *bp = '\0' ; - inEnv = FALSE ; - } - } - } -#else /* UNIX */ - strcpy(buff, name); -#endif /* UNIX */ - - return buff ; -} - -static FILE *openConfig(u_char *fname) -{ - int i ; - FILE *fp = NULL ; - u_char path[512] ; - u_char name[512] ; - - /* - * if coinfiguration file specified, open it - */ - - if (fname != NULL) { - if (expandName(fname, name) == NULL) { - return NULL ; - } - if ((fp = fopen(name, "r")) == NULL) { - return NULL ; - } - return fp ; - } - - /* - * otherwise, look for configuration file in search path - */ - - for (i = 0 ; confPath[i] != NULL ; i++) { - - if (expandName(confPath[i], path) == NULL) { - continue ; - } - - sprintf(name, "%s%s", path, confFile) ; - - if ((fp = fopen(name, "r")) != NULL) { - return fp ; - } - } - return NULL ; -} - -/* - * configuration data in file consists of - * - * key value ... - * - * lines. This module hold them as following list. - */ - -typedef struct _CONF *CNFPTR ; - -typedef struct _CONF { - int lineNo ; - CNFPTR prev ; - CNFPTR next ; - u_char *key ; /* really, buffer for key & val */ - int nVal ; - u_char *aVal[1] ; /* really, follows 'nVal' entries */ -} CNFREC ; - -static CNFREC confList = { 0 } ; - -static void disposeData(void) -{ - CNFPTR p ; - - if (confList.prev == NULL || confList.next == NULL) { - return ; - } - while ((p = confList.next) != &confList) { - confList.next = p->next ; - free(p->key) ; - free(p) ; - } -} - -static u_char *getString(u_char *p, CNFPTR pCnf) -{ - /* - * mark start of value string - */ - - pCnf->aVal[pCnf->nVal++] = p ; - - /* - * look for end of string, any space - */ - - for ( ; *p != '\0' ; p++) { - if (isspace(*p)) { - break ; - } - } - if (*p != '\0') { - *p++ = '\0' ; - } - return p ; -} - -static u_char *getQuoted(u_char *p, CNFPTR pCnf) -{ - if (*p != '"') { /* Oh, something wrong !! */ - return p ; - } - p++ ; /* skip leading '"' */ - - /* - * mark start of value string - */ - - pCnf->aVal[pCnf->nVal++] = p ; - - /* - * look for terminating '"', may be escaped with '\' - */ - - while (*p != '\0' && *p != '\n' && *p != '\r') { - if (*p == '"') { - break ; - } else if (*p == '\\') { /* quoted pair */ - p += 2 ; - } else { - p += 1 ; - } - } - if (*p != '\0') { - *p++ = '\0' ; - } - return p ; -} - -static BOOL findCommand(u_char *name) -{ - u_char **cmd; - - for (cmd = (u_char **)confCommands; *cmd != NULL; cmd++) { - if (strcmp(*cmd, name) == 0) - return TRUE; - } - - return FALSE; -} - -static BOOL findObsoleteCommand(u_char *name) -{ - u_char **cmd; - - for (cmd = (u_char **)confObsoleteCommands; *cmd != NULL; cmd++) { - if (strcmp(*cmd, name) == 0) - return TRUE; - } - - return FALSE; -} - -static BOOL appendData(u_char *line, int lineNo) -{ - int len ; - u_char *pStr, *p ; - CNFPTR pCnf, pNew ; - CNFPTR prev, next ; - - /* - * list is not initialized, initialize it - */ - - if (confList.prev == NULL || confList.next == NULL) { - confList.prev = &confList ; - confList.next = &confList ; - } - - /* - * prepare buffers - */ - - len = strlen(line) ; - - pCnf = (CNFPTR) malloc(sizeof(CNFREC) + sizeof(u_char *) * len) ; - pStr = malloc(len + 2) ; - - if (pStr == NULL || pCnf == NULL) { - fprintf(stderr, "appendData - cannot allocate memory\n") ; - if (pStr != NULL) free(pStr) ; - if (pCnf != NULL) free(pCnf) ; - return FALSE ; - } - - memset(pCnf, 0, sizeof(CNFREC)) ; - - for (p = pStr ; *line != '\0' ; ) { - if (*line == '\n' || *line == '\r') { - break ; - } - *p++ = *line++ ; - } - *p = '\0' ; - - /* - * parse line (save results into pCnf) - * - * term may be string or quoted-string - */ - - for (p = pStr ; *p != '\0' ; ) { - if (isspace(*p)) { - p += 1 ; - } else if (*p == '#') { - break ; - } else if (*p == '"') { - p = getQuoted(p, pCnf) ; - } else { - p = getString(p, pCnf) ; - } - } - - /* - * if no term found, skip the line - */ - - if (pCnf->nVal == 0) { - free(pStr) ; - free(pCnf) ; - return TRUE ; - } - - if (findObsoleteCommand(pStr)) { - fprintf(stderr, "appendData - obsolete command \"%.100s\", line %d\n", - pStr, lineNo) ; - return FALSE; - } - if (!findCommand(pStr)) { - fprintf(stderr, "appendData - unknown command \"%.100s\", line %d\n", - pStr, lineNo) ; - return FALSE; - } - - /* - * create resulting CNF record - */ - - pNew = (CNFPTR) malloc(sizeof(CNFREC) + sizeof(u_char *) * pCnf->nVal) ; - - if (pNew == NULL) { - fprintf(stderr, "appendData - cannot allocate memory\n") ; - free(pStr) ; - free(pCnf) ; - return FALSE ; - } - - memset(pNew, 0, sizeof(CNFREC)) ; - - pNew->lineNo = lineNo; - pNew->key = pStr ; - pNew->nVal = pCnf->nVal ; - memcpy(pNew->aVal, pCnf->aVal, sizeof(u_char *) * pCnf->nVal) ; - - free(pCnf) ; - - /* - * link to list - */ - - prev = confList.prev ; - next = prev->next ; - pNew->prev = confList.prev ; - pNew->next = &confList ; - prev->next = pNew ; - next->prev = pNew ; - - return TRUE ; -} - -/* - * config_load - load mDNS Proxy configuration data - */ - -BOOL config_load(int ac, char *av[]) -{ - int i ; - u_char *conf ; - FILE *fp ; - u_char line[512] ; - int lineNo ; - - /* - * check if alternate config file specified - */ - - for (i = 1, conf = CONFIG_PATH "/" CONFIG_FILE ; i < ac ; i++) { - if (strcmp(av[i], "-config") == 0) { - if ((i + 1) < ac) { - conf = av[i+=1] ; - } - } - } - - /* - * open configuration file - */ - - if ((fp = openConfig(conf)) == NULL) { - fprintf(stderr, "config_load - cannot open the configuration file, " - "%s, \"%.100s\"\n", strerror(errno), conf) ; - return FALSE ; - } - - /* - * read and parse configuration data (per line) - */ - lineNo = 0; - while (fgets(line, 512, fp) != NULL) { - lineNo++; - if (appendData(line, lineNo) != TRUE) { - fprintf(stderr, "config_load - error in \"%s\"\n", conf) ; - fclose(fp) ; - return FALSE ; - } - } - - fclose(fp) ; - return TRUE ; -} - -/* - * config_dump - dump contents of mDNS Proxy configuration data - */ - -static BOOL haveSpace(u_char *str) -{ - for ( ; *str != '\0' ; str++) { - if (isspace(*str)) { - return TRUE ; - } - } - return FALSE ; -} - -void config_dump(FILE *ofp) -{ - CNFPTR p ; - int i ; - - if (confList.next == NULL || confList.prev == NULL) { - return ; - } - for (p = confList.next ; p != &confList ; p = p->next) { - if (haveSpace(p->key)) { - fprintf(ofp, "<%s>", p->key) ; - } else { - fprintf(ofp, "<%s>", p->key) ; - } - for (i = 0 ; i < p->nVal ; i++) { - if (haveSpace(p->aVal[i])) { - fprintf(ofp, " \"%s\"", p->aVal[i]) ; - } else { - fprintf(ofp, " %s", p->aVal[i]) ; - } - } - fprintf(ofp, "\n") ; - } -} - -/* - * config_free - dispose mDNS configuration data - */ - -void config_free(void) -{ - disposeData() ; -} - -/* - * config_query_value - query configuration data - * - * this is generic interface to access configuration data - * but note, this function cannot work with multiple - * configuration data, such as client-translation - */ - -BOOL config_query_value(char *key, int *count, char ***array, int *lineNo) -{ - CNFPTR p ; - - for (p = confList.next ; p != &confList ; p = p->next) { - if (strcmp(p->key, key) != 0) { - continue ; - } - *count = p->nVal ; - *array = (char **) p->aVal ; - *lineNo = p->lineNo; - return TRUE ; - } - return FALSE ; -} - -/* - * config_query_listen, config_query_forward - * - * queries sockaddr (really sockaddr_in) of proxy to listen, - * and DNS server to which proxy forwards the requests. - * These function set - * - * addr->sin_family <- AF_INET - * addr->sin_addr <- specified/default - * addr->sin_port <- specified/default - * - * for 'listen' address, both sin_addr/sin_port have default values, - * but for 'forward' address, there is no default for 'sin_addr', - * and result error on such case. - * - * NOTE: for DNS proxy, both listen/forward address should be - * specified with xx.xx.xx.xx notation, never be host name - */ - -#define DEFAULT_ADDR INADDR_ANY -#define DEFAULT_PORT 53 - -static CNFPTR queryData(u_char *key) -{ - CNFPTR p ; - - for (p = confList.next ; p != &confList ; p = p->next) { - if (strcmp(p->key, key) == 0) { - return p ; - } - } - return NULL ; -} - -/* - * Parse `host:port'. Either `host' or `port' can be omitted. - */ -static BOOL getHostPort(u_char *arg, struct sockaddr_in *iaddr, int lineNo) -{ - unsigned int octets[4]; - unsigned short port; - int digit_count; - int octet_count; - const char *p = arg; - - octets[0] = (DEFAULT_ADDR >> 24) & 0xff; - octets[1] = (DEFAULT_ADDR >> 16) & 0xff; - octets[2] = (DEFAULT_ADDR >> 8) & 0xff; - octets[3] = (DEFAULT_ADDR) & 0xff; - port = DEFAULT_PORT; - - /* - * Parse an dot noted IP address. - */ - if ('0' <= *p && *p <= '9') { - octet_count = 0; - while (octet_count < 4) { - octets[octet_count] = 0; - if (*p == '0' && '0' <= *(p + 1) && *(p + 1) <= '9') { - WARN("getHostPort - invalid address \"%.100s\", line %d\n", - arg, lineNo); - return FALSE; - } - for (digit_count = 0; '0' <= *p && *p <= '9'; p++, digit_count++) - octets[octet_count] = octets[octet_count] * 10 + (*p - '0'); - if (digit_count == 0 || digit_count > 3 || - octets[octet_count] > 255) { - WARN("getHostPort - invalid address \"%.100s\" line %d\n", - arg, lineNo); - return FALSE; - } - octet_count++; - - if (octet_count != 4) { - if (*p != '.') { - WARN("getHostPort - malformed address \"%.100s\", " - "line %d\n", arg, lineNo); - return FALSE; - } - p++; - } - } - } - - /* - * Parse an optional port number preceded by `:'. - */ - if (*p == ':') { - port = 0; - p++; - if (*p == '0' && '0' <= *(p + 1) && *(p + 1) <= '9') { - WARN("getHostPort - invalid port number \"%.100s\", line %d\n", - arg, lineNo); - return FALSE; - } - for (digit_count = 0; '0' <= *p && *p <= '9'; p++, digit_count++) - port = port * 10 + (*p - '0'); - if (digit_count == 0 && *p == '\0') { - port = DEFAULT_PORT; - } else if (digit_count == 0 || digit_count > 5 || port == 0 || - port > 65535) { - WARN("getHostPort - invalid port number \"%.100s\", line %d\n", - arg, lineNo); - return FALSE; - } - } - - if (*p != '\0') { - WARN("getHostPort - invalid address \"%.100s\", line %d\n", - arg, lineNo); - return FALSE; - } - - /* - * Put the result into `address' and `port'. - */ - iaddr->sin_addr.s_addr = htonl((octets[0] << 24) + (octets[1] << 16) - + (octets[2] << 8) + octets[3]); - iaddr->sin_port = htons(port); - - return TRUE; -} - -/* - * Parse `host:port'. `port' can be omitted. - */ -static BOOL getHostPort2(u_char *arg, struct sockaddr_in *iaddr, - int lineNo) -{ - if (*arg == ':') { - WARN("getHostPort2 - missing host name \"%.100s\", line %d\n", - arg, lineNo); - return FALSE; - } - - return getHostPort(arg, iaddr, lineNo); -} - -BOOL config_query_listen(struct sockaddr *addr) -{ - CNFPTR pListen ; - struct sockaddr_in *iaddr ; - - memset(addr, 0, sizeof(struct sockaddr)) ; - iaddr = (struct sockaddr_in *) addr ; - - if ((pListen = queryData(KW_LISTEN)) == NULL) { - iaddr->sin_addr.s_addr = htonl(DEFAULT_ADDR) ; - iaddr->sin_port = htons(DEFAULT_PORT) ; - return TRUE ; - } - if (pListen->nVal != 2) { - WARN("config_query_listen - wrong # of args for \"%s\", line %d\n", - KW_LISTEN, pListen->lineNo) ; - return FALSE ; - } - - if (!getHostPort(pListen->aVal[1], iaddr, pListen->lineNo)) { - return FALSE; - } - - iaddr->sin_family = AF_INET ; - - return TRUE ; -} - -BOOL config_query_forward(struct sockaddr *addr) -{ - CNFPTR pForward ; - struct sockaddr_in *iaddr ; - - memset(addr, 0, sizeof(struct sockaddr)) ; - iaddr = (struct sockaddr_in *) addr ; - iaddr->sin_family = AF_INET ; - - if ((pForward = queryData(KW_FORWARD)) == NULL) { - WARN("config_query_forward - \"%s\" not found in the configuration " - "file\n", KW_FORWARD) ; - return FALSE ; - } - if (pForward->nVal != 2 && pForward->nVal != 3) { - WARN("config_query_forward - wrong # of args for \"%s\", line %d\n", - KW_FORWARD, pForward->lineNo) ; - return FALSE ; - } - - if (!getHostPort2(pForward->aVal[1], iaddr, pForward->lineNo)) { - return FALSE ; - } - - iaddr->sin_family = AF_INET ; - - return TRUE ; -} - -/* - * config_query_restrict - query 'source-restrict' flag - */ - -BOOL config_query_restrict(BOOL *src_restrict) -{ - CNFPTR pForward ; - - if ((pForward = queryData(KW_FORWARD)) == NULL) { - *src_restrict = FALSE ; - } else if (pForward->nVal < 3) { - *src_restrict = FALSE ; - } else if (strcmp(pForward->aVal[2], "bind4compat") != 0) { - *src_restrict = FALSE ; - } else { - *src_restrict = TRUE ; - } - return TRUE ; -} - -/* - * config_query_log_on_denied - query 'log-on-denied' flag - */ - -BOOL config_query_log_on_denied(BOOL *flag) -{ - CNFPTR pForward ; - - if ((pForward = queryData("log-on-denied")) == NULL) { - *flag = FALSE ; - return TRUE ; - } - if (pForward->nVal != 2) - return FALSE ; - - if (strcmp(pForward->aVal[1], "yes") == 0) - *flag = TRUE ; - else if (strcmp(pForward->aVal[1], "no") == 0) - *flag = FALSE ; - else - return FALSE ; - - return TRUE; -} - -/* - * config_query_open, config_query_more, config_query_close - * - * this is generic interface to access configuration data - * for multiple entires for same key value. - */ - -config_ctx_t config_query_open(char *key, int *count, char ***array, - int *lineNo) -{ - CNFPTR p ; - - for (p = confList.next ; p != &confList ; p = p->next) { - if (strcmp(p->key, key) != 0) { - continue ; - } - *count = p->nVal ; - *array = (char **) p->aVal ; - *lineNo = p->lineNo; - return (config_ctx_t) p ; - } - return NULL ; -} - -config_ctx_t config_query_more(config_ctx_t ctx, int *count, char ***array, - int *lineNo) -{ - CNFPTR p = (CNFPTR) ctx ; - CNFPTR np ; - - for (np = p->next ; np != &confList ; np = np->next) { - if (strcmp(np->key, p->key) != 0) { - continue ; - } - *count = np->nVal ; - *array = (char **) np->aVal ; - *lineNo = np->lineNo; - return (config_ctx_t) np ; - } - return NULL ; -} - -void config_query_close(config_ctx_t ctx) -{ - /* nothing to do */ -} - -#ifdef TEST -/* - * test driver for 'config' module - */ - -static void dumpaddr(u_char *str, struct sockaddr *addr) -{ - u_char *p ; - struct sockaddr_in *iaddr = (struct sockaddr_in *) addr ; - - printf("%s ", str) ; - - p = (u_char *) &iaddr->sin_addr ; - printf("address %d.%d.%d.%d", - (p[0] & 0xff), (p[1] & 0xff), (p[2] & 0xff), (p[3] & 0xff)) ; - - p = (u_char *) &iaddr->sin_port ; - printf(" port %d", ((p[0] & 0xff) * 256 + (p[1] & 0xff))) ; - - printf("\n") ; -} - -static void dumpvalue(char *key, int count, char **array) -{ - int i ; - - for (i = 0 ; i < count ; i++) { - printf("%s ", array[i]) ; - } - printf("\n") ; fflush(stdout) ; -} - -int main(int ac, char *av[]) -{ - int stat ; - struct sockaddr addr ; - int count ; - char **array ; - config_ctx_t ctx ; - int lineNo; - - if ((stat = config_load(ac, av)) != TRUE) { - printf("config_load failed %d\n", stat) ; - return 1 ; - } - config_dump(stdout) ; - - if (config_query_value(KW_LISTEN, &count, &array, &lineNo) == TRUE) { - dumpvalue("listen", count, array) ; - } - if (config_query_value(KW_FORWARD, &count, &array, &lineNo) == TRUE) { - dumpvalue("forward", count, array) ; - } - - ctx = config_query_open("client-translation", &count, &array, &lineNo) ; - while (ctx != NULL) { - dumpvalue("client-translation", count, array) ; - ctx = config_query_more(ctx, &count, &array, &lineNo) ; - } - config_query_close(ctx) ; - - if (config_query_listen(&addr) != TRUE) { - printf("no \"listen\" data\n") ; - } else { - dumpaddr("listen", &addr) ; - } - - if (config_query_forward(&addr) != TRUE) { - printf("no \"forward\" data\n") ; - } else { - dumpaddr("forward", &addr) ; - } - - config_free() ; - return 0 ; -} -#endif /* TEST */ diff --git a/contrib/idn/mdnkit/mdnsproxy/proxycnf.h b/contrib/idn/mdnkit/mdnsproxy/proxycnf.h deleted file mode 100644 index fbdea293cf..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/proxycnf.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * proxycnf.h - mDNS Proxy, Configure Proxy Server - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* $Id: proxycnf.h,v 1.2 2002/02/08 05:41:15 marka Exp $ */ - -#ifndef PROXYCNF_H -#define PROXYCNF_H 1 - -/* - * CONFIG_PATH - * where configuration file placed - */ - -#ifndef CONFIG_PATH -#ifdef UNIX -#define CONFIG_PATH "/usr/local/etc/" -#endif -#ifdef WIN32 -#define CONFIG_PATH "$(SystemRoot)/" -#endif -#ifdef OS2 -#define CONFIG_PATH "$(ETC)/" -#endif -#endif /* CONFIG_PATH */ - -/* - * CONFIG_FILE - * name of configuration file - */ - -#ifndef CONFIG_FILE -#ifdef UNIX -#define CONFIG_FILE "mdnsproxy.conf" -#endif -#ifdef WIN32 -#define CONFIG_FILE "mdnsproxy.cnf" -#endif -#ifdef OS2 -#define CONFIG_FILE "mdnsproxy.cnf" -#endif -#endif /* CONFIG_FILE */ - -/* - * CONFIG_HOME - * debugging support, $HOME environment name - */ - -#ifndef CONFIG_HOME -#ifdef UNIX -#define CONFIG_HOME "$(HOME)/" -#endif -#ifdef WIN32 -#define CONFIG_HOME "$(HOMEPATH)/" -#endif -#ifdef OS2 -#define CONFIG_HOME "$(HOME)/" -#endif -#endif /* CONFIG_HOME */ - -/* - * Commands used in configuration file - */ -#define KW_LISTEN "listen" -#define KW_FORWARD "forward" -#define KW_CLIENT_ENCODING "client-encoding" -#define KW_MDN_CONF_FILE "mdn-conf-file" -#define KW_LOG_FILE "log-file" -#define KW_LOG_LEVEL "log-level" -#define KW_MDN_LOG_LEVEL "mdn-log-level" -#define KW_USER_ID "user-id" -#define KW_GROUP_ID "group-id" -#define KW_ROOT_DIRECTORY "root-directory" -#define KW_ALLOW_ACCESS "allow-access" -#define KW_LOG_ON_DENIED "log-on-denied" -#define KW_SYSLOG_FACILITY "syslog-facility" - -/* The following commands are obsoleted. */ -#define KW_CLIENT_TRANSLATION "client-translation" -#define KW_ALTERNATE_ENCODING "alternate-encoding" -#define KW_NORMALIZE "normalize" -#define KW_SERVER_TRANSLATION "server-translation" -#define KW_ENCODING_ALIAS_FILE "encoding-alias-file" - -/* - * Command line options. - */ -#define CMDOPT_LOGFILE "-logfile" -#define CMDOPT_DAEMON "-daemon" -#define CMDOPT_CONFIG "-config" -#define CMDOPT_VERSION "-version" - -#endif /* PROXYCNF_H */ diff --git a/contrib/idn/mdnkit/mdnsproxy/server.c b/contrib/idn/mdnkit/mdnsproxy/server.c deleted file mode 100644 index 36b8b6c70f..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/server.c +++ /dev/null @@ -1,1457 +0,0 @@ -/* - * server.c - mDNS Proxy, proxy server core - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: server.c,v 1.2 2002/02/08 05:41:16 marka Exp $"; -#endif - -#include - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#include -#include -#endif - -#include "mdnsproxy.h" - -#ifdef WIN32 -#define close(s) closesocket(s) -#define EWOULDBLOCK WSAEWOULDBLOCK -#endif - -#ifndef max -#define max(x, y) ((x) > (y) ? (x) : (y)) -#endif - -/* - * Status of receiving data or accept a TCP connection. - */ -#define SUCCESS 0 /* succeeded */ -#define FAILURE 1 /* failed */ -#define DENIED 2 /* denied */ - -/* - * send buffer for TCP - * hold sending data when sending socket blocked - */ - -typedef struct _SNDBUF { - struct _SNDBUF *prev ; - struct _SNDBUF *next ; - int leng ; /* data length in the buffer */ - int sent ; /* data have been sent */ - int size ; /* size of this bufefr */ - u_char buff[1] ; /* 'size' array follows */ -} SNDREC, *SNDPTR ; - -/* - * recv buffer for TCP - * hold incomplete message - */ - -typedef struct _RCVBUF { - int stat ; /* what data receiving now */ - int leng ; /* length of the message */ - int recv ; /* message have been received */ - int size ; /* size of this buffer */ - u_char *buff ; /* points 'size' array of char */ -} RCVREC, *RCVPTR ; - -#define RCV_STAT_LEN1 0 /* waiting 1st byte of length */ -#define RCV_STAT_LEN2 1 /* waiting 2nd byte of length */ -#define RCV_STAT_DATA 2 /* waiting message data */ - -/* - * transport control block - * is used to handle pending recv/send data of the socket - */ - -typedef struct _NETREC { - struct _NETREC *prev ; - struct _NETREC *next ; - int sock ; /* socket to do network I/O */ - int proto ; /* TCP or UDP */ - int type ; /* see below */ - struct sockaddr peer ; /* peer of this transoport */ - SNDREC send ; /* pending send data (TPC) */ - RCVREC recv ; /* pending recv message */ -} NETREC, *NETPTR ; - -#define NET_LISTEN 1 /* is proxy's listening socket */ -#define NET_CLIENT 2 /* is connection from client */ -#define NET_SERVER 3 /* is transport to server */ - -static NETREC listNet = { 0 } ; /* list of transports */ - -/* - * allocate/dispose buffer for SND/RCV buffer managements - * simply mapped to malloc/free, but may be - * re-maped to spceific function if speed required - */ - -#define xalloc(x) malloc((x)) -#define xfree(p) free((p)) - -/* - * Whether to log denied access from client. - */ -static int logOnDenied = 0; - -/* - * transientError - utility for handling "soft" errors - */ - -static BOOL transientError(int eno) -{ - if ( -#ifdef EAGAIN - eno == EAGAIN || -#endif -#ifdef EWOULDBLOCK - eno == EWOULDBLOCK || -#endif -#ifdef EINTR - eno == EINTR || -#endif - eno == 0) - return TRUE ; - else - return FALSE ; -} - -/* - * addrEq, addrFmt - utilities for handling address - */ - -static BOOL addrEq(struct sockaddr *a1, struct sockaddr *a2) -{ - struct sockaddr_in *ip1 = (struct sockaddr_in *) a1 ; - struct sockaddr_in *ip2 = (struct sockaddr_in *) a2 ; - - if (ip1->sin_addr.s_addr != ip2->sin_addr.s_addr) { - return FALSE ; - } - if (ip1->sin_port != ip2->sin_port) { - return FALSE ; - } - return TRUE ; -} - -static u_char fmtbuff[64] ; - -static u_char *addrFmt(struct sockaddr *addr, int proto) -{ - struct sockaddr_in *iaddr = (struct sockaddr_in *) addr ; - u_char *ap ; - u_char *pp ; - - ap = (u_char *) &iaddr->sin_addr ; - pp = (u_char *) &iaddr->sin_port ; - - sprintf(fmtbuff, "%s:%d.%d.%d.%d:%d", - (proto == SOCK_STREAM ? "TCP" : "UDP"), - (ap[0] & 0xff), (ap[1] & 0xff), (ap[2] & 0xff), (ap[3] & 0xff), - ((pp[0] & 0xff) * 256 + (pp[1] & 0xff)) ) ; - - return fmtbuff ; -} - -/* - * netCreate, netDispose - create/dispose transport control block - */ - -#define SZRCVBUF 1024 - -static NETPTR netCreate(int sock, struct sockaddr *peer, int proto, int type) -{ - NETPTR pNet, prev, next ; - u_char *pBuf ; - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("netCreate - transport list is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - - pNet = (NETPTR) xalloc(sizeof(NETREC)) ; - pBuf = (u_char *) xalloc(SZRCVBUF) ; - - if (pNet == NULL || pBuf == NULL) { - WARN("netCreate - cannot allocate buffer\n") ; - if (pNet != NULL) xfree(pNet) ; - if (pBuf != NULL) xfree(pBuf) ; - return NULL ; - } - memset(pNet, 0, sizeof(NETREC)) ; - - pNet->sock = sock ; - pNet->proto = proto ; - pNet->type = type ; - - if (peer != NULL) { - memcpy(&pNet->peer, peer, sizeof(struct sockaddr)) ; - } - - pNet->send.prev = &pNet->send ; - pNet->send.next = &pNet->send ; - pNet->recv.stat = RCV_STAT_LEN1 ; - pNet->recv.leng = 0 ; - pNet->recv.recv = 0 ; - pNet->recv.size = SZRCVBUF ; - pNet->recv.buff = pBuf ; - - prev = listNet.prev ; - next = prev->next ; - - prev->next = pNet ; - next->prev = pNet ; - pNet->prev = prev ; - pNet->next = next ; - - return pNet ; -} - -static void netDispose(NETPTR pNet) -{ - NETPTR p ; - SNDPTR pSnd ; - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("netDispose - transport list is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - - /* - * unlink from transport list - */ - - for (p = listNet.next ; p != &listNet ; p = p->next) { - if (p == pNet) { - break ; - } - } - if (p == pNet) { /* safe to unlink it */ - pNet->prev->next = pNet->next ; - pNet->next->prev = pNet->prev ; - } - - /* - * dispose control block resources - */ - - if (pNet->send.prev == NULL || pNet->send.next == NULL) { - WARN("netDispose - un-initialized SNDREC\n") ; - pNet->send.prev = &pNet->send ; - pNet->send.next = &pNet->send ; - } - while ((pSnd = pNet->send.next) != &pNet->send) { - pSnd->prev->next = pSnd->next ; - pSnd->next->prev = pSnd->prev ; - xfree(pSnd) ; - } - if (pNet->recv.buff != NULL) { - xfree(pNet->recv.buff) ; - } - close(pNet->sock) ; - xfree(pNet) ; -} - -/* - * netExpand - expand receive buffer - */ - -static BOOL netExpand(NETPTR p) -{ - int len ; - u_char *np ; - - if (p->recv.size > p->recv.leng) { - return TRUE ; - } - - len = 1024 * ((p->recv.leng + 1023) / 1024) ; - - TRACE("netExpand %d -> %d\n", p->recv.size, len) ; - - if ((np = xalloc(len)) == NULL) { - WARN("netExpand - cannot allocate memory\n") ; - return FALSE ; - } - if (p->recv.recv > 0) { - memcpy(np, p->recv.buff, p->recv.recv) ; - } - xfree(p->recv.buff) ; - p->recv.buff = np ; - p->recv.size = len ; - - return TRUE ; -} - -/* - * tcpSend, tcpQueue, tcpFlush - send message over stream socket - * - * tcpSend - send message over TCP socket - * tcpQueue - en-queue message if stream blocked - * tcpFlush - flush pending messages - */ - -static int tcpSend(int sock, u_char *msg, int len) -{ - int n, cnt = 0 ; - - while (len > 0) { - if ((n = send(sock, msg, len, 0)) > 0) { - msg += n ; - len -= n ; - cnt += n ; - continue ; - } - if (!transientError(errno)) { - WARN("tcpSend - send error %d\n", errno) ; - return -1 ; - } - break ; - } - return cnt ; -} - -static BOOL tcpQueue(NETPTR p, u_char *msg, int len) -{ - SNDPTR sp, prev, next ; - - if ((sp = (SNDPTR) xalloc(sizeof(SNDREC) + len)) == NULL) { - WARN("tcpQueue - cannot allocate buffer\n") ; - return FALSE ; - } - - sp->sent = 0 ; - sp->leng = len ; - sp->size = len ; - memcpy(sp->buff, msg, len) ; - - prev = p->send.prev ; - next = prev->next ; - prev->next = sp ; - next->prev = sp ; - sp->next = next ; - sp->prev = prev ; - - return TRUE ; -} - -static BOOL tcpFlush(NETPTR p) -{ - SNDPTR sp ; - int n, len ; - - if (p->proto != SOCK_STREAM) { - WARN("tcpFlush - flushing on non-stream socket\n") ; - return FALSE ; - } - if (p->send.prev == NULL || p->send.prev == NULL) { - WARN("tcpFlush - send buffer is not initialized\n") ; - p->send.prev = &p->send ; - p->send.next = &p->send ; - } - - while ((sp = p->send.next) != &p->send) { - - /* - * try to send data - */ - - if ((len = sp->leng - sp->sent) > 0) { - if ((n = tcpSend(p->sock, &sp->buff[sp->sent], len)) < 0) { - WARN("tcpFlush - send error %d\n", errno) ; - return FALSE ; - } - if (n == 0) { - TRACE("tcpFlush - blocked\n") ; - return TRUE ; - } - sp->sent += n ; - } - - /* - * if no more data in send buffer, unlink and free - */ - - if ((len = sp->leng - sp->sent) <= 0) { - sp->prev->next = sp->next ; - sp->next->prev = sp->prev ; - xfree(sp) ; - } - } - return TRUE ; -} - -/* - * Server Control Variables - */ - -static BOOL servActive = FALSE ; - -static NETPTR listenTcp = NULL ; /* proxy's listening socket */ -static NETPTR listenUdp = NULL ; /* proxy's listening socket */ - -static struct sockaddr serverDefaultAddr = { 0 } ; -static BOOL serverRestrictPort = FALSE ; - -/* - * server_done - finalize server - * - * is also used when 'server_init' failed in initialization sequence - * - * using module level utilities - * - * netDispose dispose transport control block - */ - -void server_done(void) -{ - NETPTR p ; - - if (listNet.prev == NULL || listNet.next == NULL) { - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - while ((p = listNet.next) != &listNet) { - netDispose(p) ; - } -} - -/* - * server_init - initialize server - * - * using sub-functions - * - * initTcp create socket to listening TCP connection - * initUdp create socket to listening UDP message - * - * and also using module level utilities - * - * netCreate create transport control block - * - * also use 'server_done' to cleanup resources - */ - -static NETPTR initTcp(void) -{ - NETPTR p ; - int sock ; - int one = 1 ; - struct sockaddr addr ; - - if (config_query_listen(&addr) != TRUE) { - WARN("initTcp - no listen address\n") ; - return NULL ; - } - - if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - WARN("initTcp - cannot create TCP socket\n") ; - return NULL ; - } - - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) ; - - if (bind(sock, &addr, sizeof(addr)) < 0) { - WARN("initTcp - cannot bind TCP socket\n") ; - close(sock) ; - return NULL ; - } - if (listen(sock, 5) < 0) { - WARN("initTcp - cannot listen on TCP socket\n") ; - close(sock) ; - return NULL ; - } - if ((p = netCreate(sock, &addr, SOCK_STREAM, NET_LISTEN)) == NULL) { - WARN("initTcp - cannot create control block\n") ; - close(sock) ; - return NULL ; - } - return p ; -} - -static NETPTR initUdp(void) -{ - NETPTR p ; - int sock ; - int one = 1 ; - struct sockaddr addr ; - - if (config_query_listen(&addr) != TRUE) { - WARN("initUdp - no listen address\n") ; - return NULL ; - } - - if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - WARN("initUdp - cannot create UDP socket\n") ; - return NULL ; - } - - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) ; - - if (bind(sock, &addr, sizeof(addr)) < 0) { - WARN("initUdp - cannot bind UDP socket\n") ; - close(sock) ; - return NULL ; - } - if ((p = netCreate(sock, &addr, SOCK_DGRAM, NET_LISTEN)) == NULL) { - WARN("initUdp - cannot create control block\n") ; - close(sock) ; - return NULL ; - } - return p ; -} - -/* - * server_init - initialize proxy server - */ - -BOOL server_init(int ac, char *av[]) -{ - /* - * initialize transport list - */ - - listNet.prev = &listNet ; - listNet.next = &listNet ; - - /* - * setup transports - */ - - listenTcp = initTcp() ; - listenUdp = initUdp() ; - - if (listenTcp == NULL || listenUdp == NULL) { - WARN("server_init - cannot create proxy's listening port\n") ; - server_done() ; - return FALSE ; - } - - if (config_query_forward(&serverDefaultAddr) != TRUE) { - WARN("server_init - no DNS server address\n") ; - server_done() ; - return FALSE ; - } - if (config_query_restrict(&serverRestrictPort) != TRUE) { - WARN("server_init - cannot query 'serverRestrictPort' flag\n") ; - server_done() ; - return FALSE ; - } - if (config_query_log_on_denied(&logOnDenied) != TRUE) { - WARN("syntax error at log-on-denied line\n") ; - server_done() ; - return FALSE ; - } - - /* - * initialize translator - */ - - if (translate_initialize() != TRUE) { - WARN("server_init - translation configuration failed\n") ; - server_done() ; - return FALSE ; - } - - /* - * initialize ACL. - */ - - if (acl_initialize() != TRUE) { - WARN("server_init - access list configuration failed\n") ; - server_done() ; - return FALSE ; - } - - /* - * now server is ready, turn on active flags now - */ - - servActive = TRUE ; - - return TRUE ; -} - -/* - * server_stop - request to stop server - * - * simply turn off 'servActive' control flag. - * then 'server_loop' terminate - */ - -void server_stop(void) -{ - servActive = FALSE ; -} - -/* - * server_loop - proxy server's message loop - * - * using sub-funcstions - * - * setRdFds listup sockets to check read ready - * setWtFds listup sockets to check write ready - * sockAccept accept connection from client - * sockRecvTcp receive message over TCP - * sockRecvUdp receive message over UDP - * sockDispatch dispatch on ready sockets - * sockValidate validate sockets - * timerDispatch entry of timer processing - * - * and also using module level utilities - * - * netCreate create transport control block - * netDispose dispose transport control block - * tcpFlush send pending message - * addrFmt formatting address (& proto) - */ - -/* - * setRdFds, setWtFds - listup socket to check if ready - */ - -static int setRdFds(fd_set *rfds) -{ - int maxfd = 0 ; - NETPTR p ; - - /* - * listup sockets to check read ready - */ - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("setRdFds - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - for (p = listNet.next ; p != &listNet ; p = p->next) { - FD_SET(p->sock, rfds) ; - maxfd = max(maxfd, p->sock) ; - } - return maxfd ; -} - -static int setWtFds(fd_set *wfds) -{ - int maxfd = 0 ; - NETPTR p ; - - /* - * listup sockets to check read ready - */ - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("setRdFds - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - for (p = listNet.next ; p != &listNet ; p = p->next) { - if (p->send.prev == NULL || p->send.next == NULL) { - WARN("setWtFds - send buffer is not initialized\n") ; - p->send.prev = &p->send ; - p->send.next = &p->send ; - } - if (p->send.next != &p->send) { - FD_SET(p->sock, wfds) ; - maxfd = max(maxfd, p->sock) ; - } - } - return maxfd ; -} - -/* - * sockAccept - accept connection from client - */ - -static int sockAccept(NETPTR p) -{ - NETPTR np ; - int ns, addrlen ; - struct sockaddr addr ; - struct sockaddr peer ; - - memset(&addr, 0, sizeof(addr)) ; - memset(&peer, 0, sizeof(peer)) ; - - addrlen = sizeof(addr) ; - - if ((ns = accept(p->sock, &addr, &addrlen)) < 0) { - WARN("sockAccept - cannot accept connection %d\n", errno) ; - return FAILURE ; - } - - addrlen = sizeof(peer) ; - getpeername(ns, &peer, &addrlen) ; - - if (!acl_test(&peer)) { - if (logOnDenied) { - WARN("sockAccept - deny access from %s\n", - addrFmt(&peer, SOCK_STREAM)); - } - shutdown(ns, 2) ; - close(ns) ; - return DENIED ; - } - - if ((np = netCreate(ns, &peer, SOCK_STREAM, NET_CLIENT)) == NULL) { - WARN("sockAccept - cannot create control block\n") ; - close(ns) ; - return FAILURE ; - } - - TRACE("sockAccept - accept connection from %s on socket %d\n", addrFmt(&peer, SOCK_STREAM), ns) ; - - return SUCCESS ; -} - -/* - * sockRecvTcp, sockRecvUdp - receive message - * - * when message complete, call 'notify_message' to - * notify message arrival. - */ - -static int sockRecvTcp(NETPTR p) -{ - int n, len ; - u_char buff[2] ; - u_char *bp ; - - /* - * validate transport - */ - - if (p == NULL || p->proto != SOCK_STREAM) { - WARN("sockRecvTcp - bad parameter\n") ; - return FAILURE ; - } - if (p->recv.buff == NULL || p->recv.size == 0) { - WARN("sockRecvTcp - no receiver buffer\n") ; - return FAILURE ; - } - - /* - * when receiving message over TCP, constuct state machine with - * RCVBUF's status. - */ - - if (p->recv.stat == RCV_STAT_LEN1) { - if ((n = recv(p->sock, buff, 2, 0)) <= 0) { - if (errno == EWOULDBLOCK) { - return SUCCESS ; - } - WARN("sockRecvTcp - recv error %d on socket %d, STAT_LEN1\n", errno, p->sock) ; - return FAILURE ; - } - if (n == 1) { - p->recv.leng = ((int) (buff[0] & 0xff)) * 256 ; - p->recv.stat = RCV_STAT_LEN2 ; - return SUCCESS ; /* blocked, try later */ - } - p->recv.leng = ((int) (buff[0] & 0xff)) * 256 + ((int) (buff[1] & 0xff)) ; - p->recv.stat = RCV_STAT_DATA ; - /* then fall through */ - } - - if (p->recv.stat == RCV_STAT_LEN2) { - if ((n = recv(p->sock, buff, 1, 0)) <= 0) { - if (errno == EWOULDBLOCK) { - return SUCCESS ; - } - WARN("sockRecvTcp - recv error %d on socket %d, STAT_LEN2\n", errno, p->sock) ; - return FAILURE ; - } - p->recv.leng += ((int) (buff[0] & 0xff)) ; - p->recv.stat = RCV_STAT_DATA ; - /* then fall through */ - } - - if (p->recv.stat == RCV_STAT_DATA) { - if (p->recv.size < p->recv.leng) { - if (netExpand(p) != TRUE) { - WARN("sockRecvTcp - cannot expand recv buffer\n") ; - return FAILURE ; - } - } - - bp = &p->recv.buff[p->recv.recv] ; - len = p->recv.leng - p->recv.recv ; - - if ((n = recv(p->sock, bp, len, 0)) <= 0) { - if (errno == EWOULDBLOCK) { - return SUCCESS ; - } - WARN("sockRecvTcp - recv error %d on socket %d, " - "STAT_DATA %d (%d/%d)\n", - errno, p->sock, len, p->recv.recv, p->recv.leng) ; - return FAILURE ; - } - if ((p->recv.recv += n) < p->recv.leng) { - return SUCCESS ; /* still in-complete */ - } - - /* - * message complete, notify it - */ - - notify_message(&p->peer, SOCK_STREAM, p->recv.buff, p->recv.leng) ; - - /* - * reset recv buffer - */ - - p->recv.stat = RCV_STAT_LEN1 ; - p->recv.leng = 0 ; - p->recv.recv = 0 ; - - return SUCCESS ; - } - WARN("sockRecvTcp - something wrong\n") ; - return FAILURE ; -} - -static int sockRecvUdp(NETPTR p) -{ - int n, fromlen ; - struct sockaddr fromaddr ; - - /* - * validate transport - */ - - if (p == NULL || p->proto != SOCK_DGRAM) { - WARN("sockRecvUdp - bad parameter\n") ; - return FAILURE ; - } - if (p->recv.buff == NULL || p->recv.size == 0) { - WARN("sockRecvUdp - no receiver buffer\n") ; - return FAILURE ; - } - - /* - * receive over UDP - */ - - fromlen = sizeof(fromaddr) ; - - n = recvfrom(p->sock, p->recv.buff, p->recv.size, 0, &fromaddr, &fromlen) ; - - if (n == 0) { - WARN("sockRecvUdp - no data\n") ; - return SUCCESS ; - } else if (n < 0) { - if (transientError(errno)) - return SUCCESS ; - switch (errno) { -#ifdef ECONNREFUSED - case ECONNREFUSED: -#endif -#ifdef ENETUNREACH - case ENETUNREACH: -#endif -#ifdef EHOSTUNREACH - case EHOSTUNREACH: -#endif - WARN("sockRecvUdp - recv error %d (ignored)\n", errno) ; - return SUCCESS ; - default: - WARN("sockRecvUdp - recv error %d\n", errno) ; - return FAILURE ; - } - } - - if (!addrEq(&fromaddr, &serverDefaultAddr) && !acl_test(&fromaddr)) { - if (logOnDenied) { - WARN("sockRecvUdp - deny access from %s\n", - addrFmt(&fromaddr, SOCK_DGRAM)); - } - return DENIED ; - } - - /* - * notify message arrival - */ - - notify_message(&fromaddr, SOCK_DGRAM, p->recv.buff, n) ; - - return SUCCESS ; -} - -/* - * sockDispatch - process on ready sockets - */ - -static void sockDispatch(int nfds, fd_set *rfds, fd_set *wfds) -{ - NETPTR p, np ; - int stat ; - - /* - * process on ready sockets - */ - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("sockDispatch - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - for (p = listNet.next ; p != &listNet ; p = np) { - - np = p->next ; - stat = SUCCESS ; /* assume no problem */ - - /* - * if receiving socket ready, then - * - * LISTEN TCP accept connection - * LISTEN UDP receive message - * CLIENT receive message - * SERVER receive message - */ - - if (FD_ISSET(p->sock, rfds)) { - if (p->type != NET_LISTEN) { - if (p->proto == SOCK_STREAM) { - stat = sockRecvTcp(p) ; - } else { - stat = sockRecvUdp(p) ; - } - } else if (p->proto == SOCK_DGRAM) { - stat = sockRecvUdp(p) ; - } else { /* connect request on listening TCP socket */ - stat = sockAccept(p) ; - } - } - - /* - * if send socket ready, then send pending message - * - * don't check transport type, protocol, but - * this happens only for TCP socket to CLIENT/SERVER - */ - - if (stat == SUCCESS && FD_ISSET(p->sock, wfds)) { - tcpFlush(p) ; - } - - /* - * if something wrong on socket, dispose it - */ - - if (stat == FAILURE) { - if (p->type == NET_LISTEN || p->proto == SOCK_DGRAM) { - WARN("sockDispatch - error on listening socket\n") ; - server_stop() ; - } else { - WARN("sockDispatch - error on socket %d\n", p->sock) ; - } - netDispose(p) ; - } - } -} - -/* - * sockValidate - validate socket when select error - */ - -static void sockValidate(int nfds, fd_set *rfds, fd_set *wfds) -{ - NETPTR p, np ; - fd_set fds ; - struct timeval tm ; - - TRACE("sockValidate\n") ; - - FD_ZERO(&fds) ; - tm.tv_sec = 0 ; - tm.tv_usec = 0 ; - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("sockValidate - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - - for (p = listNet.next ; p != &listNet ; p = np) { - - np = p->next ; - - /* - * check if socket is still available - */ - - FD_SET(p->sock, &fds) ; - - if (!FD_ISSET(p->sock, rfds) && !FD_ISSET(p->sock, wfds)) { - FD_CLR(p->sock, &fds) ; - continue ; - } - if (select(p->sock + 1, &fds, NULL, NULL, &tm) >= 0) { - FD_CLR(p->sock, &fds) ; - continue ; - } - FD_CLR(p->sock, &fds) ; - - /* - * something wrong on socket - */ - - if (p->type == NET_LISTEN) { - WARN("sockValidate - closed listening socket\n") ; - server_stop() ; - } else { - WARN("sockValidate - closed socket %d\n", p->sock) ; - } - netDispose(p) ; - } -} - -/* - * timerDispatch - entry of timer processing - */ - -static time_t timeLast = 0 ; /* last time of timer process */ -static time_t timeWait = 10 ; /* wait till next timer process */ - -static void timerDispatch(void) -{ - time_t t = time(NULL) ; - - /* - * do timer process every 'timeWait' interval - */ - - if ((t - timeLast) < timeWait) { - return ; - } - - /* - * call timer processes here - */ - - notify_timer() ; - - /* - * update timer - */ - - timeLast = t ; -} - -/* - * server_loop - proxy's main, select loop - */ - -void server_loop(void) -{ - struct timeval tm ; - fd_set rfds, wfds ; - int maxrfd, maxwfd ; - int n, nfds ; - - while (servActive) { - - FD_ZERO(&rfds) ; - FD_ZERO(&wfds) ; - - maxrfd = setRdFds(&rfds) ; - maxwfd = setWtFds(&wfds) ; - nfds = max(maxrfd, maxwfd) + 1 ; - - tm.tv_sec = 10 ; - tm.tv_usec = 0 ; - - if (maxwfd == 0) { - n = select(nfds, &rfds, NULL, NULL, &tm) ; - } else { - n = select(nfds, &rfds, &wfds, NULL, &tm) ; - } - - if (n > 0) { - sockDispatch(nfds, &rfds, &wfds) ; - } else if (n < 0) { - if (!transientError(errno)) { - sockValidate(nfds, &rfds, &wfds) ; - } - } - timerDispatch() ; -#ifdef DEBUG - fflush(stdout) ; - fflush(stderr) ; -#endif - log_turnover(); - } -} - -/* - * Server's entries for send message (forward or response) - * - * server_forward forward request to DNS server - * server_response send back response to client - * - * using sub-functions, - * - * openTcp open TCP connection to the upstream server - * openUdp open UDP transport to the upstream server - * getServer get transport to the upstream server - * getClient get transport to responding client - * sendTcp send message via TCP - * sendUdp send message via UDP - * - * and also using module level utilities, - * - * netCreate create transport control block - * tcpSend send message over TCP socket - * tcpQueue enqueue if TCP blocked - * addrEq check if addresses are same - * addrFmt formatting address (& proto) - */ - -/* - * openTcp, openUdp - create TCP/UDP transport to DNS server - */ - -static NETPTR openTcp(struct sockaddr *to) -{ - int sock ; - NETPTR p ; - - TRACE("openTcp - creating transport to %s\n", addrFmt(to, SOCK_STREAM)) ; - - if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - WARN("openTcp - cannote create socket %d\n", errno) ; - return NULL ; - } - if (connect(sock, to, sizeof(struct sockaddr)) < 0) { - WARN("openTcp - cannot connect to server %d\n", errno) ; - close(sock) ; - return NULL ; - } - if ((p = netCreate(sock, to, SOCK_STREAM, NET_SERVER)) == NULL) { - WARN("openTcp - cannot create control block\n") ; - close(sock) ; - return NULL ; - } - return p ; -} - -static NETPTR openUdp(struct sockaddr *to) -{ - int sock ; - NETPTR p ; - struct sockaddr_in saddr ; /* source port */ - - TRACE("openUdp - creating transport to %s\n", addrFmt(to, SOCK_DGRAM)) ; - - memset(&saddr, 0, sizeof(saddr)) ; - saddr.sin_family = AF_INET ; - saddr.sin_addr.s_addr = htonl(INADDR_ANY) ; - saddr.sin_port = htons(0) ; - - if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - WARN("openUdp - cannote create socket %d\n", errno) ; - return NULL ; - } - if (bind(sock, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { - WARN("openUdp - cannot bind source port\n") ; - close(sock) ; - return NULL ; - } - if (connect(sock, to, sizeof(struct sockaddr)) < 0) { - WARN("openUdp - cannot connect to server\n") ; - close(sock) ; - return NULL ; - } - if ((p = netCreate(sock, to, SOCK_DGRAM, NET_SERVER)) == NULL) { - WARN("openUdp - cannot create control block\n") ; - close(sock) ; - return NULL ; - } - return p ; -} - -/* - * getServer - search/create transport to the DNS server - */ - -static NETPTR getServer(struct sockaddr *to, int proto) -{ - NETPTR p ; - - /* - * if proxy should use DNS port to communicate DNS server, - * use proxy's listen port to forward request to the server - */ - - if (proto == SOCK_DGRAM && serverRestrictPort) { - return listenUdp ; - } - - /* - * search transport to specified DNS server - */ - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("getServer - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - for (p = listNet.next ; p != &listNet ; p = p->next) { - if (p->proto != proto || p->type != NET_SERVER) { - continue ; - } - if (addrEq(&p->peer, to)) { - return p ; - } - } - - /* - * if not exist, create new one - */ - - if (proto == SOCK_STREAM) { - p = openTcp(to) ; - } else { - p = openUdp(to) ; - } - return p ; -} - -/* - * getClient - search transport to the client - */ - -static NETPTR getClient(struct sockaddr *to, int proto) -{ - NETPTR p ; - - /* - * for response using UDP, use proxy's UDP socket - */ - - if (proto == SOCK_DGRAM) { - return listenUdp ; - } - - /* - * otherwise (TCP), use existing transport to the client - */ - - if (listNet.prev == NULL || listNet.next == NULL) { - WARN("getClient - listNet is not initialized\n") ; - listNet.prev = &listNet ; - listNet.next = &listNet ; - } - for (p = listNet.next ; p != &listNet ; p = p->next) { - if (p->proto != proto || p->type != NET_CLIENT) { - continue ; - } - if (addrEq(&p->peer, to)) { - return p ; - } - } - return NULL ; -} - -/* - * sendTcp, sendUdp - send message over TCP/UDP - */ - -static void sendTcp(NETPTR p, u_char *msg, int len) -{ - int n ; - u_char buff[1024] ; - u_char *bp ; - - /* - * insert 2 bytes message length field before the message - */ - - if (len < (1024 - 2)) { - bp = buff ; - } else { - bp = malloc(len + 2) ; - } - if (bp == NULL) { - WARN("sendTcp - cannot alocate send buffer\n") ; - return ; - } - bp[0] = len / 256 ; - bp[1] = len % 256 ; - memcpy(&bp[2], msg, len) ; - len += 2 ; - - /* - * if there is pending data, enqueue sending message - */ - - if (p->send.prev == NULL || p->send.next == NULL) { - WARN("sendTcp - send buffer is not initialized\n") ; - p->send.prev = &p->send ; - p->send.next = &p->send ; - } - if (p->send.next != &p->send) { - tcpQueue(p, bp, len) ; - if (bp != buff) free(bp) ; - return ; - } - - /* - * then, try to send message - */ - - if ((n = tcpSend(p->sock, bp, len)) < 0) { - WARN("sendTcp - cannot send message\n") ; - if (bp != buff) free(bp) ; - return ; - } - if (n != len) { - tcpQueue(p, (bp + n), (len - n)) ; - } - if (bp != buff) free(bp) ; -} - -static void sendUdp(NETPTR p, u_char *msg, int len, struct sockaddr *to) -{ - int n ; - - if (p->type == NET_SERVER) { /* target is binded */ - n = send(p->sock, msg, len, 0) ; - } else { /* need to specify target */ - n = sendto(p->sock, msg, len, 0, to, sizeof(struct sockaddr)) ; - } - if (n < 0) { - if (!transientError(errno)) { - WARN("sendUdp - cannot send message %d\n", errno) ; - } - return ; - } - if (n != len) { - WARN("sendUdp - cannot send entire message %d/%d\n", n, len) ; - return ; - } -} - -/* - * server_forward - forward request to the DNS server - */ - -void server_forward(struct sockaddr *to, int proto, u_char *msg, int len) -{ - NETPTR p ; - - if (to == NULL) { - to = &serverDefaultAddr ; - } - if ((p = getServer(to, proto)) == NULL) { - WARN("server_forward - no transport to server %s\n", - addrFmt(to, proto)) ; - return ; - } - if (proto == SOCK_STREAM) { - sendTcp(p, msg, len) ; - } else { - sendUdp(p, msg, len, to) ; - } -} - -/* - * server_response - response to client - */ - -void server_response(struct sockaddr *to, int proto, u_char *msg, int len) -{ - NETPTR p ; - - if ((p = getClient(to, proto)) == NULL) { - WARN("server_response - no transport to client %s\n", - addrFmt(to, proto)) ; - return ; - } - if (proto == SOCK_STREAM) { - sendTcp(p, msg, len) ; - } else { - sendUdp(p, msg, len, to) ; - } -} diff --git a/contrib/idn/mdnkit/mdnsproxy/translate.c b/contrib/idn/mdnkit/mdnsproxy/translate.c deleted file mode 100644 index b3e0291f03..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/translate.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: translate.c,v 1.2 2002/02/08 05:41:18 marka Exp $"; -#endif - -#include - -#include -#include -#include - -#ifdef WIN32 -#include -#include -#else /* for normal systems */ -#include -#include -#include -#include -#endif - -#include -#include -#include -#include -#include - -#include "mdnsproxy.h" - -/* - * DNS message rcode. - */ -enum { - RCODE_NO_ERROR = 0, - RCODE_FORMAT_ERROR = 1, - RCODE_SERVER_FAILURE = 2, - RCODE_NAME_ERROR = 3, - RCODE_NOT_IMPLEMENTED = 4, - RCODE_REFUSED = 5 -}; - -mdn_converter_t client_converter; -mdn_resconf_t resconf; - -static int result_to_rcode(mdn_result_t r); -static char *address_to_string(struct sockaddr *sa); -static void mdnerror(int code, char *fmt, ...); - - -BOOL -translate_initialize(void) -{ - mdn_result_t r; - char *mdn_conf_file; - int ac; - char **av; - int lineNo; - - TRACE("translate_initialize()\n"); - - /* - * Initialize the resconf module. - */ - mdn_resconf_initialize(); - mdn_converter_initialize(); - - /* - * Create a resconf module. - */ - if (!config_query_value(KW_MDN_CONF_FILE, &ac, &av, &lineNo)) { - mdn_conf_file = mdn_resconf_defaultfile(); - } else { - if (ac != 2) { - WARN("wrong # of args for \"%s\", line %d\n", KW_MDN_CONF_FILE, - lineNo); - return FALSE; - } - mdn_conf_file = av[1]; - } - - if ((r = mdn_resconf_create(&resconf)) != mdn_success) { - mdnerror(r, "mdn conf file"); - return FALSE; - } - if ((r = mdn_resconf_loadfile(resconf, mdn_conf_file)) != mdn_success) { - mdnerror(r, "mdn conf file %s", mdn_conf_file); - return FALSE; - } - - /* - * Create a converter for local encoding. - */ - if (!config_query_value(KW_CLIENT_ENCODING, &ac, &av, &lineNo)) { - WARN("\"%s\" not found in the configuration file\n", - KW_CLIENT_ENCODING); - return FALSE; - } - if (ac != 2) { - WARN("wrong # of args for \"%s\", line %d\n", KW_CLIENT_ENCODING, - lineNo); - return FALSE; - } - if ((r = mdn_converter_create(av[1], &client_converter, 0)) - != mdn_success) { - mdnerror(r, "client encoding %s", av[1]); - return FALSE; - } - - mdn_resconf_setlocalconverter(resconf, client_converter); - - return TRUE; -} - -void -translate_finish(void) -{ - mdn_converter_destroy(client_converter); - mdn_resconf_destroy(resconf); -} - -int -translate_request(translation_context_t *ctx, - const char *msg, size_t msglen, - char *translated, size_t bufsize, size_t *translatedlenp) -{ - mdn_result_t r; - - TRACE("translate_request()\n"); - - r = mdn_msgtrans_translate(resconf, msg, msglen, - translated, bufsize, translatedlenp); - - if (r != mdn_success) { - mdnerror(r, "translating request message from %s(%s)", - address_to_string(ctx->client), - ctx->protocol == SOCK_STREAM ? "tcp" : "udp"); - } - - return result_to_rcode(r); -} - -int -translate_reply(translation_context_t *ctx, - const char *msg, size_t msglen, - char *translated, size_t bufsize, size_t *translatedlenp) -{ - mdn_result_t r; - - TRACE("translate_reply()\n"); - - r = mdn_msgtrans_translate(resconf, msg, msglen, - translated, bufsize, translatedlenp); - - if (r != mdn_success) { - mdnerror(r, "translating reply message from %s", - address_to_string(ctx->client)); - } - - return result_to_rcode(r); -} - -static int -result_to_rcode(mdn_result_t r) -{ - int rcode; - - switch (r) { - case mdn_success: - rcode = RCODE_NO_ERROR; - break; - case mdn_buffer_overflow: - case mdn_nomemory: - rcode = RCODE_SERVER_FAILURE; - break; - case mdn_invalid_message: - case mdn_invalid_encoding: - rcode = RCODE_FORMAT_ERROR; - break; - default: - rcode = RCODE_SERVER_FAILURE; - break; - } - return rcode; -} - -static char * -address_to_string(struct sockaddr *sa) -{ - static char tmp[200]; - - switch (sa->sa_family) { - case AF_INET: - { - struct sockaddr_in *sin = (struct sockaddr_in *)sa; - - sprintf(tmp, "%s/%d", inet_ntoa(sin->sin_addr), - ntohs(sin->sin_port)); - break; - } -#if 0 -#ifdef AF_INET6 - case AF_INET6: - { - char buf[INET6_ADDRSTRLEN]; - - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa; - - sprintf(tmp, "%s/%d", - inet_ntop(AF_INET6, &sin6->sin6_addr, buf, sizeof(buf)), - ntohs(sin6->sin6_port)); - break; - } -#endif -#endif - default: - sprintf(tmp, "unknown address family %d", sa->sa_family); - break; - } - return tmp; -} - -static void -mdnerror(int code, char *fmt, ...) -{ - char buf[1024]; - va_list args; - - va_start(args, fmt); - vsprintf(buf, fmt, args); - va_end(args); - - sprintf(buf + strlen(buf), ": %s", mdn_result_tostring(code)); - WARN("%s\n", buf); -} diff --git a/contrib/idn/mdnkit/mdnsproxy/unxmain.c b/contrib/idn/mdnkit/mdnsproxy/unxmain.c deleted file mode 100644 index 7431536d62..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/unxmain.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * unxmain.c - mDNS Proxy, entry for UNIX - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: unxmain.c,v 1.2 2002/02/08 05:41:19 marka Exp $"; -#endif - -#ifdef UNIX - -#include - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#include "mdnsproxy.h" /* Common definitions for mDNS proxy */ -#include - -static uid_t uid; -static gid_t gid; -static char *root_dir; -static BOOL uid_specified = FALSE; -static BOOL gid_specified = FALSE; - -/* - * signal handler to catch signal to terminate server - */ - -static void handler(int signo) -{ - server_stop() ; - signal(signo, SIG_DFL) ; -} - -/* - * signal handler to turn over the log file - */ - -static void hup_handler(int signo) -{ - log_turnover_request(); - signal(signo, hup_handler) ; -} - -/* - * Set root directory. - */ - -static void change_root(void) -{ - int err; - - if (root_dir != NULL && chroot(root_dir) < 0) { - err = errno; - FATAL("cannot change root directory: %s\n", strerror(err)); - exit(1); - } -} - -/* - * Set user/group ID. - */ - -static void set_id(void) -{ - int err; - - if (gid_specified && setgid(gid) < 0) { - err = errno; - FATAL("cannot set group ID: %s\n", strerror(err)); - exit(1); - } - - if (uid_specified && setuid(uid) < 0) { - err = errno; - FATAL("cannot set user ID: %s\n", strerror(err)); - exit(1); - } -} - -/* - * Load configuration parameter related to security. - */ - -static void get_security_conf(void) -{ - int ac; - char **av; - int lineNo; - - if (config_query_value(KW_ROOT_DIRECTORY, &ac, &av, &lineNo)) { - if (ac != 2) { - WARN("wrong # of args for \"%s\", line %d\n", KW_ROOT_DIRECTORY, - lineNo); - exit(1); - } - root_dir = malloc(strlen(av[1]) + 1); - if (root_dir == NULL) { - FATAL("malloc failed\n"); - exit(1); - } - (void)strcpy(root_dir, av[1]); - } - - if (config_query_value(KW_USER_ID, &ac, &av, &lineNo)) { - struct passwd *pwd; - - if (ac != 2) { - WARN("wrong # of args for \"%s\", line %d\n", KW_USER_ID, lineNo); - exit(1); - } else if ((pwd = getpwnam(av[1])) != NULL) { - uid = pwd->pw_uid; - uid_specified = TRUE; - } else if (isdigit((unsigned char)(av[1][0]))) { - uid = atoi(av[1]); - uid_specified = TRUE; - } else { - FATAL("unknown user \"%.100s\", line %d\n", av[1], lineNo); - exit(1); - } - } - - if (config_query_value(KW_GROUP_ID, &ac, &av, &lineNo)) { - struct group *gr; - - if (ac != 2) { - WARN("wrong # of args for \"%s\", line %d\n", KW_GROUP_ID, lineNo); - exit(1); - } else if ((gr = getgrnam(av[1])) != NULL) { - gid = gr->gr_gid; - gid_specified = TRUE; - } else if (isdigit((unsigned char)(av[1][0]))) { - gid = atoi(av[1]); - gid_specified = TRUE; - } else { - FATAL("unknown group \"%.100s\", line %d\n", av[1], lineNo); - exit(1); - } - } -} - -/* - * print_version - print version information to stderr. - */ - -static void print_version(void) -{ - fprintf(stderr, "mdnsproxy (mDNkit) version: %s\n" - "library version: %s\n", - MDNKIT_VERSION, - mdn_version_getstring()); -} - -/* - * main - entry of UNIX version - */ - -int main(int ac, char *av[]) -{ - int i, pid ; - BOOL as_daemon = FALSE ; - - i = 1; - while (i < ac) { - if (strcmp(av[i], CMDOPT_DAEMON) == 0) { - as_daemon = TRUE ; - i++; - } else if (strcmp(av[i], CMDOPT_CONFIG) == 0) { - if (i + 1 == ac) { - fprintf(stderr, "missing argument to \"%s\"\n", av[i]) ; - return 1 ; - } - i += 2; - } else if (strcmp(av[i], CMDOPT_LOGFILE) == 0) { - if (i + 1 == ac) { - fprintf(stderr, "missing argument to \"%s\"\n", av[i]) ; - return 1 ; - } - i += 2; - } else if (strcmp(av[i], CMDOPT_VERSION) == 0) { - print_version(); - return 0; - } else if (av[i][0] == '-' && av[i][1] != '\0') { - fprintf(stderr, "unknown option \"%s\"\n", av[i]) ; - return 1 ; - } else { - fprintf(stderr, "too many arguments\n"); - return 1 ; - } - } - - if (config_load(ac, av) != TRUE) { - fprintf(stderr, "cannot load configuration\n") ; - return 1 ; - } - if (log_configure(ac, av) != TRUE) { - fprintf(stderr, "cannot logging\n") ; - return 1 ; - } - - get_security_conf(); - - if (server_init(ac, av) != TRUE) { - fprintf(stderr, "cannot initialize server\n") ; - log_terminate() ; - return 1 ; - } - - if (as_daemon) { - switch (pid = fork()) { - case -1 : - fprintf(stderr, "cannot start daemon, %s\n", strerror(errno)) ; - server_done() ; - log_terminate() ; - return 2 ; - case 0 : /* children, as daemon */ - setsid() ; - close(0) ; - close(1) ; - break ; - default : - fprintf(stderr, "start daemon PID %d\n", pid) ; - return 0 ; - } - } - - /* - * Change root directory/user ID/group ID if specified. - */ - change_root(); - set_id(); - - signal(SIGHUP, hup_handler) ; - signal(SIGINT, handler) ; - signal(SIGKILL, handler) ; - signal(SIGTERM, handler) ; - -#ifdef DEBUG - fprintf(stderr, "Service Started\n") ; -#endif - - server_loop() ; - -#ifdef DEBUG - fprintf(stderr, "Service Terminating...\n") ; -#endif - - server_done() ; - - log_terminate() ; - -#ifdef DEBUG - fprintf(stderr, "Service Terminated\n") ; -#endif - - return 0 ; -} -#endif /* UNIX */ diff --git a/contrib/idn/mdnkit/mdnsproxy/winmain.c b/contrib/idn/mdnkit/mdnsproxy/winmain.c deleted file mode 100644 index 303ee61e3b..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/winmain.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - * winmain.c - mDNS Proxy, entry for WIN32 - * - * Windows version works as - * - * Service Program, as mDNS Proxy Server - * Service Configuration Program, Install/Remove mDNS Proxy - * - * or simply as - * - * Application Program, for debugging - * - * with single executable, switched with first option - * - * -service as Service Program - * -install as Configuration, install serivce - * -remove as Configuration, remove service - * - * Otherwise, it runs as simple console apllication. - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: winmain.c,v 1.2 2002/02/08 05:41:20 marka Exp $"; -#endif - -#ifdef WIN32 - -#include -#include -#include -#include -#include - -#include "mdnsproxy.h" /* Common definitions for mDNS proxy */ -#include "winserv.h" /* WIN32 Service Related Functions */ - -/* - * signal handler to catch signal to terminate server - */ - -static void handler(int signo) -{ - server_stop() ; - signal(signo, SIG_DFL) ; -} - -/* - * main - entry of windows version - */ - -int main(int ac, char *av[]) -{ - WORD version = MAKEWORD(2, 0) ; - WSADATA wsaData ; - - /* - * check 1st option - */ - - if (ac >= 2) { - if (strcmp(av[1], "-service") == 0) { - serviceRun(ac, av) ; - return 0 ; - } - if (strcmp(av[1], "-install") == 0) { - serviceInstall(ac, av) ; - return 0 ; - } - if (strcmp(av[1], "-remove") == 0) { - serviceRemove(ac, av) ; - return 0 ; - } - } - - /* - * otherwise run as normal application - */ - - if (config_load(ac, av) != TRUE) { - printf("cannot load configration\n") ; - return 1 ; - } - - if (log_configure(ac, av) != TRUE) { - printf("cannot logging\n") ; - return 1 ; - } - - if (WSAStartup(version, &wsaData) != 0) { - printf("cannot startup WinSock\n") ; - return FALSE ; - } - if (server_init(ac, av) != TRUE) { - printf("cannot initialize server\n") ; - WSACleanup() ; - return 1 ; - } - - signal(SIGINT, handler) ; - signal(SIGTERM, handler) ; - signal(SIGBREAK, handler) ; - - printf("Service Started\n") ; - - server_loop() ; - - printf("Service Termiating...\n") ; - - server_done() ; - - printf("Service Terminated\n") ; - - WSACleanup() ; - - log_terminate() ; - - return 0 ; -} - -#endif /* WIN32 */ diff --git a/contrib/idn/mdnkit/mdnsproxy/winserv.c b/contrib/idn/mdnkit/mdnsproxy/winserv.c deleted file mode 100644 index 65a5b355f6..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/winserv.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - * winserv.c - mDNS Proxy, WIN32 Service Specific Functions - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef lint -static char *rcsid = "$Id: winserv.c,v 1.2 2002/02/08 05:41:22 marka Exp $"; -#endif - -#ifdef WIN32 - -#include -#include -#include -#include -#include - -#include "mdnsproxy.h" /* Common definitions for mDNS proxy */ -#include "winserv.h" /* Windows's Service Specific */ - -/* - * Parameters for WIN32 Service - */ - -#define SERVICENAME "mdnsproxy" -#define DISPLAYNAME "mDNS Proxy" - -static UCHAR pathService[1024] ; - -/* - * getFileName - get fullpath and split it - */ - -static UCHAR p_ful[256] ; -static UCHAR p_drv[256] ; -static UCHAR p_dir[256] ; -static UCHAR p_nam[256] ; -static UCHAR p_ext[256] ; - -static void getFileName(void) -{ - GetModuleFileName(NULL, p_ful, 256) ; - _splitpath(p_ful, p_drv, p_dir, p_nam, p_ext) ; -} - -/* - * Service management Varibales - */ - -SERVICE_STATUS_HANDLE ServiceStatusHandle = 0 ; -SERVICE_STATUS ServiceStatusRecord = { 0 } ; -int ServiceErrorCode = 0 ; - -void serviceLogTrace(PUCHAR msg) -{ - char msgbuff[256] ; - HANDLE hEventSrc ; - char *strings[2] ; - - ServiceErrorCode = GetLastError() ; - - sprintf(msgbuff, "%s trace: %d", SERVICENAME, ServiceErrorCode) ; - strings[0] = msgbuff ; - strings[1] = msg ; - - hEventSrc = RegisterEventSource(NULL, TEXT(SERVICENAME)) ; - - if (hEventSrc != NULL) { - ReportEvent( - hEventSrc, - EVENTLOG_INFORMATION_TYPE, - 0, - 0, - NULL, - 2, - 0, - (const char **) strings, - NULL) ; - DeregisterEventSource(hEventSrc) ; - } - /* TRACE("%s %s\n", msgbuff, msg) ; */ -} - -void serviceLogError(PUCHAR msg) -{ - char msgbuff[256] ; - HANDLE hEventSrc ; - char *strings[2] ; - - ServiceErrorCode = GetLastError() ; - - sprintf(msgbuff, "%s error: %d", SERVICENAME, ServiceErrorCode) ; - strings[0] = msgbuff ; - strings[1] = msg ; - - hEventSrc = RegisterEventSource(NULL, TEXT(SERVICENAME)) ; - - if (hEventSrc != NULL) { - ReportEvent( - hEventSrc, - EVENTLOG_ERROR_TYPE, - 0, - 0, - NULL, - 2, - 0, - (const char **) strings, - NULL) ; - DeregisterEventSource(hEventSrc) ; - } - /* FATAL("%s %s\n", msgbuff, msg) ; */ -} - -/* - * serviceReport - report service status - */ - -VOID serviceReport(DWORD state, DWORD exitcode, DWORD waithint) -{ - static DWORD checkpoint = 1 ; - - if (state == SERVICE_START_PENDING) { - ServiceStatusRecord.dwControlsAccepted = 0 ; - } else { - ServiceStatusRecord.dwControlsAccepted = SERVICE_ACCEPT_STOP ; - } - ServiceStatusRecord.dwCurrentState = state ; - ServiceStatusRecord.dwWin32ExitCode = exitcode ; - ServiceStatusRecord.dwWaitHint = waithint ; - - if (state == SERVICE_RUNNING || state == SERVICE_STOPPED) { - ServiceStatusRecord.dwCheckPoint = 0 ; - } else { - ServiceStatusRecord.dwCheckPoint = checkpoint++ ; - } - - SetServiceStatus(ServiceStatusHandle, &ServiceStatusRecord) ; -} - -/* - * ServiceCtrl - service control handler - */ - -VOID ServiceCtrl(DWORD opcode) -{ - switch (opcode) { - - case SERVICE_CONTROL_STOP : - serviceLogTrace("ServiceCtrl STOP") ; - ServiceStatusRecord.dwCurrentState = SERVICE_STOP_PENDING ; - /* nofity later, so set status only */ - server_stop() ; /* stop server loop */ - break ; - - case SERVICE_CONTROL_INTERROGATE : - /* query, report later */ - serviceLogTrace("ServiceCtrl INTERROGATE") ; - break ; - - default : - break ; - } - serviceReport(ServiceStatusRecord.dwCurrentState, NO_ERROR, 0) ; -} - -/* - * ServiceMain - as name describes - */ - -static UCHAR cmdline[1024] ; - -VOID ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv) -{ - WORD version = MAKEWORD(2, 0) ; - WSADATA wsaData ; - - /* - * initialize service status - */ - - ServiceStatusRecord.dwServiceType = SERVICE_WIN32 | SERVICE_INTERACTIVE_PROCESS ; - ServiceStatusRecord.dwServiceSpecificExitCode = 0 ; - - /* - * register Service Control Handler - */ - - ServiceStatusHandle = RegisterServiceCtrlHandler( - TEXT(SERVICENAME), - (LPHANDLER_FUNCTION) ServiceCtrl) ; - if (ServiceStatusHandle == (SERVICE_STATUS_HANDLE) 0) { - serviceLogError("RegisterServiceCtrlHandler failed") ; - return ; - } - - serviceReport(SERVICE_START_PENDING, NO_ERROR, (30 * 1000)) ; - - /* - * Initialize & Run service - */ - - serviceLogTrace("start initializing") ; - - if (config_load((int) dwArgc, (char **) lpszArgv) != TRUE) { - serviceLogError("cannot initialize server") ; - serviceReport(SERVICE_STOPPED, 0, 0) ; - return ; - } - - if (log_configure((int) dwArgc, (char **) lpszArgv) != TRUE) { - serviceLogError("cannot logging") ; - serviceReport(SERVICE_STOPPED, 0, 0) ; - return ; - } - - if (WSAStartup(version, &wsaData) != 0) { - serviceLogError("cannot initialize WinSock") ; - serviceReport(SERVICE_STOPPED, 0, 0) ; - return ; - } - if (server_init((int) dwArgc, (char **) lpszArgv) != TRUE) { - serviceLogError("cannot initialize server") ; - serviceReport(SERVICE_STOPPED, 0, 0) ; - WSACleanup() ; - return ; - } - - serviceReport(SERVICE_RUNNING, NO_ERROR, 0) ; - - serviceLogTrace("initialization done, running now") ; - - server_loop() ; /* do service here */ - - serviceLogTrace("service loop finished, closing") ; - - serviceReport(SERVICE_STOP_PENDING, NO_ERROR, (10 * 1000)) ; - - server_done() ; /* cleaup */ - WSACleanup() ; - - serviceLogTrace("service finised") ; - - serviceReport(SERVICE_STOPPED, NO_ERROR, 0) ; - - log_terminate() ; -} - -/* - * serviceRun - run Service - */ - -static SERVICE_TABLE_ENTRY ServiceTable[] = { - { TEXT(SERVICENAME), (LPSERVICE_MAIN_FUNCTION) ServiceMain } , - { NULL, NULL } -} ; - -void serviceRun(int ac, char *av[]) -{ - serviceLogTrace("serviceRun - start") ; - - if (StartServiceCtrlDispatcher(ServiceTable) == 0) { - serviceLogError("StartServiceCtrlDispatcher failed") ; - } -} - -/* - * serviceInstall - install service - */ - -void serviceInstall(int ac, char *av[]) -{ - SC_HANDLE hSCManager = NULL ; - SC_HANDLE hService = NULL ; - - getFileName() ; - -#ifdef DEBUG - printf("Install Service %s \"%s\"\n", SERVICENAME, p_ful) ; -#endif - - /* - * open Service Manager - */ - - hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS) ; - - if (hSCManager == NULL) { - printf("cannot open SCManager %d\n", GetLastError()) ; - return ; - } - -#ifdef DEBUG - printf("open SCManager\n") ; fflush(stdout) ; -#endif - - /* - * prepare service path (exe path with arguments) - */ - - sprintf(pathService, "\"%s\" -service", p_ful) ; - -#ifdef DEBUG - printf("Installing %s\n", pathService) ; -#endif - - /* - * create service entry - */ - - hService = CreateService( - hSCManager, /* SCManager database */ - TEXT(SERVICENAME), /* name of service */ - TEXT(DISPLAYNAME), /* its display name */ - SERVICE_ALL_ACCESS, /* desired access */ - SERVICE_WIN32_OWN_PROCESS, /* service type */ - SERVICE_DEMAND_START, /* start type */ - SERVICE_ERROR_IGNORE, /* error control type */ - TEXT(pathService), /* service image */ - NULL, /* no load order */ - NULL, /* no tag identifier */ - NULL, /* no dependencies */ - NULL, /* LocalSystem account */ - NULL) ; /* no password */ - - CloseServiceHandle(hSCManager) ; - - if (hService == NULL) { - printf("cannot create service %d\n", GetLastError()) ; - return ; - } - - CloseServiceHandle(hSCManager) ; - - printf("Installed Service %s\n", pathService) ; -} - -/* - * serviceRemove - remove service - */ - -void serviceRemove(int ac, char *av[]) -{ - SC_HANDLE hSCManager = NULL ; - SC_HANDLE hService = NULL ; - - getFileName() ; - -#ifdef DEBUG - printf("Removing Service %s\n", SERVICENAME) ; -#endif - - /* - * open Service Manager - */ - - hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS) ; - - if (hSCManager == NULL) { - printf("cannot open SCManager %d\n", GetLastError()) ; - return ; - } - -#ifdef DEBUG - printf("open SCManager\n") ; fflush(stdout) ; -#endif - - /* - * delete service - */ - - hService = OpenService( - hSCManager, /* SCManager database */ - TEXT(SERVICENAME), /* name of service */ - DELETE) ; /* type of access */ - - if (hService == NULL) { - printf("cannot open service %s %d\n", SERVICENAME, GetLastError()) ; - CloseServiceHandle(hSCManager) ; - return ; - } - if (DeleteService(hService) == 0) { - printf("cannot remove service %s %d\n", SERVICENAME, GetLastError()) ; - CloseServiceHandle(hService) ; - CloseServiceHandle(hSCManager) ; - return ; - } - - CloseServiceHandle(hService) ; - CloseServiceHandle(hSCManager) ; - - printf("Removed Service %s\n", SERVICENAME) ; -} - -#endif /* WIN32 */ diff --git a/contrib/idn/mdnkit/mdnsproxy/winserv.h b/contrib/idn/mdnkit/mdnsproxy/winserv.h deleted file mode 100644 index 021d5b2f89..0000000000 --- a/contrib/idn/mdnkit/mdnsproxy/winserv.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * winserv.h - mDNS Proxy, WIN32 Service Specific Functions - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* $Id: winserv.h,v 1.2 2002/02/08 05:41:23 marka Exp $ */ - -#ifndef WINSERV_H -#define WINSERV_H 1 - -void serviceRun(int ac, char *av[]) ; -void serviceInstall(int ac, char *av[]) ; -void serviceRemove(int ac, char *av[]) ; - -#endif /* WINSERV_H */ diff --git a/contrib/idn/mdnkit/mkinstalldirs b/contrib/idn/mdnkit/mkinstalldirs deleted file mode 100644 index 004629612d..0000000000 --- a/contrib/idn/mdnkit/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.2 2002/02/08 05:38:46 marka Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/contrib/idn/mdnkit/patch/bind8/bind-8.2.3-patch b/contrib/idn/mdnkit/patch/bind8/bind-8.2.3-patch deleted file mode 100644 index b35432fbb4..0000000000 --- a/contrib/idn/mdnkit/patch/bind8/bind-8.2.3-patch +++ /dev/null @@ -1,2429 +0,0 @@ -8bit-through patch for bind-8.2.3 -================================= - -This is a patch file for ISC BIND 8.2.3 to make it work with -internationalized domain names. With this patch you'll get: - + 8bit-clean named - + 8bit-clean resolver (libbind) - + (almost) 8bit-clean nslookup - -This patch also contains fixes for incorrect usage of ctype -macros/functions in the original source code. - -To apply this patch, you should go to the top directory of the distribution -(where you see `src' subdirectory), then invoke `patch' command like this: - - % patch -p0 < this-file - -Then follow the instructions described in `src/INSTALL' to compile -and install. - - -Known bugs ----------- - -* The `+domain=...' option of dig doesn't work correctly, whether the - given argument is multilingual domain name or not. - dig in ISC BIND 8.2.3 without the MDN patch has the same bug. - - -Index: src/bin/addr/addr.c -diff -c mdn/othersrc/bind8/src/bin/addr/addr.c:1.1.1.1 mdn/othersrc/bind8/src/bin/addr/addr.c:1.2 -*** src/bin/addr/addr.c Wed May 24 15:35:10 2000 ---- src/bin/addr/addr.c Mon Jul 3 13:08:49 2000 -*************** -*** 65,71 **** - src++; - continue; - } -! if (isascii(ch) && (isspace(ch) || ispunct(ch))) { - if (digits > 0) { - if (ptr == end) - return (0); ---- 65,71 ---- - src++; - continue; - } -! if (isascii((unsigned char)ch) && (isspace((unsigned char)ch) || ispunct((unsigned char)ch))) { - if (digits > 0) { - if (ptr == end) - return (0); -*************** -*** 76,85 **** - digits = 0; - continue; - } -! if (!isascii(ch) || !isxdigit(ch)) - return (0); -! if (isupper(ch)) -! ch = tolower(ch); - /* Clock it in using little endian arithmetic. */ - val <<= 4; - val |= (strchr(xdigits, ch) - xdigits); ---- 76,85 ---- - digits = 0; - continue; - } -! if (!isascii((unsigned char)ch) || !isxdigit((unsigned char)ch)) - return (0); -! if (isupper((unsigned char)ch)) -! ch = tolower((unsigned char)ch); - /* Clock it in using little endian arithmetic. */ - val <<= 4; - val |= (strchr(xdigits, ch) - xdigits); -Index: src/bin/dig/dig.c -diff -c mdn/othersrc/bind8/src/bin/dig/dig.c:1.1.1.4 mdn/othersrc/bind8/src/bin/dig/dig.c:1.5 -*** src/bin/dig/dig.c Mon Jan 29 17:22:41 2001 ---- src/bin/dig/dig.c Mon Jan 29 17:32:27 2001 -*************** -*** 1154,1168 **** - b = 8; p++; - continue; - } -! if (isupper(*p)) -! *p = tolower(*p); - if (*p == 'x') { - b = 16; p++; - continue; - } -! if (isdigit(*p)) { - i = *p - '0'; -! } else if (isxdigit(*p)) { - i = *p - 'a' + 10; - } else { - fprintf(stderr, ---- 1154,1168 ---- - b = 8; p++; - continue; - } -! if (isupper((unsigned char)*p)) -! *p = tolower((unsigned char)*p); - if (*p == 'x') { - b = 16; p++; - continue; - } -! if (isdigit((unsigned char)*p)) { - i = *p - '0'; -! } else if (isxdigit((unsigned char)*p)) { - i = *p - 'a' + 10; - } else { - fprintf(stderr, -*************** -*** 1659,1665 **** - break; - default: - *y++ = l; -! while (!isspace(*l)) - l++; - if (*l == '\n') - done++; ---- 1659,1665 ---- - break; - default: - *y++ = l; -! while (!isspace((unsigned char)*l)) - l++; - if (*l == '\n') - done++; -Index: src/bin/dnskeygen/dnskeygen.c -diff -c mdn/othersrc/bind8/src/bin/dnskeygen/dnskeygen.c:1.1.1.3 mdn/othersrc/bind8/src/bin/dnskeygen/dnskeygen.c:1.4 -*** src/bin/dnskeygen/dnskeygen.c Mon Jan 29 17:22:42 2001 ---- src/bin/dnskeygen/dnskeygen.c Mon Jan 29 17:32:27 2001 -*************** -*** 87,100 **** - } - break; - case 'p': -! if (optarg && isdigit(optarg[0])) - protocol = atoi(optarg); - else - usage("-p flag not followed by a number", 0); - break; - case 's': - /* Default: not signatory key */ -! if (optarg && isdigit(optarg[0])) - sign_val = (int) atoi(optarg); - else - usage("-s flag requires a value",0); ---- 87,100 ---- - } - break; - case 'p': -! if (optarg && isdigit((unsigned char)optarg[0])) - protocol = atoi(optarg); - else - usage("-p flag not followed by a number", 0); - break; - case 's': - /* Default: not signatory key */ -! if (optarg && isdigit((unsigned char)optarg[0])) - sign_val = (int) atoi(optarg); - else - usage("-s flag requires a value",0); -*************** -*** 112,118 **** - key_type++; - break; - case 'H': -! if (optarg && isdigit(optarg[0])) - size = (int) atoi(optarg); - else - usage("-H flag requires a size",0); ---- 112,118 ---- - key_type++; - break; - case 'H': -! if (optarg && isdigit((unsigned char)optarg[0])) - size = (int) atoi(optarg); - else - usage("-H flag requires a size",0); -*************** -*** 124,130 **** - PRINT_SUPPORTED); - break; - case 'R': -! if (optarg && isdigit(optarg[0])) - size = (int) atoi(optarg); - else - usage("-R flag requires a size",0); ---- 124,130 ---- - PRINT_SUPPORTED); - break; - case 'R': -! if (optarg && isdigit((unsigned char)optarg[0])) - size = (int) atoi(optarg); - else - usage("-R flag requires a size",0); -*************** -*** 136,142 **** - PRINT_SUPPORTED); - break; - case 'D': -! if (optarg && isdigit(optarg[0])) - size = (int) atoi(optarg); - else - usage("-D flag requires a size", 0); ---- 136,142 ---- - PRINT_SUPPORTED); - break; - case 'D': -! if (optarg && isdigit((unsigned char)optarg[0])) - size = (int) atoi(optarg); - else - usage("-D flag requires a size", 0); -Index: src/bin/irpd/irpd.c -diff -c mdn/othersrc/bind8/src/bin/irpd/irpd.c:1.1.1.4 mdn/othersrc/bind8/src/bin/irpd/irpd.c:1.5 -*** src/bin/irpd/irpd.c Mon Jan 29 17:22:42 2001 ---- src/bin/irpd/irpd.c Mon Jan 29 17:32:27 2001 -*************** -*** 2049,2058 **** - - /* count + 1 of the number of runs of non-whitespace. */ - for (iswh = 1, i = 1, p = string ; p != NULL && *p ; p++) { -! if (iswh && !isspace(*p)) { - iswh = 0; - i++; -! } else if (!iswh && isspace(*p)) { - iswh = 1; - } - } ---- 2049,2058 ---- - - /* count + 1 of the number of runs of non-whitespace. */ - for (iswh = 1, i = 1, p = string ; p != NULL && *p ; p++) { -! if (iswh && !isspace((unsigned char)*p)) { - iswh = 0; - i++; -! } else if (!iswh && isspace((unsigned char)*p)) { - iswh = 1; - } - } -*************** -*** 2073,2079 **** - a->iovlen = i; - - for (c = 0, p = string ; p != NULL && *p ; c++) { -! while (isspace(*p)) { - p++; - } - ---- 2073,2079 ---- - a->iovlen = i; - - for (c = 0, p = string ; p != NULL && *p ; c++) { -! while (isspace((unsigned char)*p)) { - p++; - } - -*************** -*** 2082,2088 **** - - iovs[c].iov_base = (void *)p; - -! while (*p && !isspace(*p)) { - p++; - } - iovs[c].iov_len = p - (char *)iovs[c].iov_base; ---- 2082,2088 ---- - - iovs[c].iov_base = (void *)p; - -! while (*p && !isspace((unsigned char)*p)) { - p++; - } - iovs[c].iov_len = p - (char *)iovs[c].iov_base; -Index: src/bin/named/db_defs.h -diff -c mdn/othersrc/bind8/src/bin/named/db_defs.h:1.1.1.3 mdn/othersrc/bind8/src/bin/named/db_defs.h:1.4 -*** src/bin/named/db_defs.h Mon Dec 25 13:48:48 2000 ---- src/bin/named/db_defs.h Tue Dec 26 14:07:22 2000 -*************** -*** 201,207 **** - #define HASHMASK 0x1f - #define HASHROTATE(v) \ - (((v) << HASHSHIFT) | ((v) >> ((sizeof(v) * 8) - HASHSHIFT))) -! #define HASHLOWER(c) ((isascii(c) && isupper(c)) ? tolower(c) : (c)) - #define HASHIMILATE(v,c) ((v) = (HASHROTATE(v)) + (HASHLOWER(c) & HASHMASK)) - - #define TSIG_BUF_SIZE 640 ---- 201,207 ---- - #define HASHMASK 0x1f - #define HASHROTATE(v) \ - (((v) << HASHSHIFT) | ((v) >> ((sizeof(v) * 8) - HASHSHIFT))) -! #define HASHLOWER(c) ((isascii((unsigned char)c) && isupper((unsigned char)c)) ? tolower((unsigned char)c) : (c)) - #define HASHIMILATE(v,c) ((v) = (HASHROTATE(v)) + (HASHLOWER(c) & HASHMASK)) - - #define TSIG_BUF_SIZE 640 -Index: src/bin/named/db_glue.c -diff -c mdn/othersrc/bind8/src/bin/named/db_glue.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/db_glue.c:1.5 -*** src/bin/named/db_glue.c Mon Jan 29 17:22:43 2001 ---- src/bin/named/db_glue.c Mon Jan 29 17:32:28 2001 -*************** -*** 315,321 **** - get_class(const char *class) { - const struct map *mp; - -! if (isdigit(*class)) - return (atoi(class)); - for (mp = map_class; mp->token != NULL; mp++) - if (strcasecmp(class, mp->token) == 0) ---- 315,321 ---- - get_class(const char *class) { - const struct map *mp; - -! if (isdigit((unsigned char)*class)) - return (atoi(class)); - for (mp = map_class; mp->token != NULL; mp++) - if (strcasecmp(class, mp->token) == 0) -Index: src/bin/named/db_ixfr.c -diff -c mdn/othersrc/bind8/src/bin/named/db_ixfr.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/db_ixfr.c:1.5 -*** src/bin/named/db_ixfr.c Mon Jan 29 17:22:43 2001 ---- src/bin/named/db_ixfr.c Mon Jan 29 17:32:28 2001 -*************** -*** 543,549 **** - n = 0; - data[0] = '\0'; - (void) getword(buf, sizeof buf, fp, 1); -! if (isdigit(buf[0])) { /* ttl */ - if (ns_parse_ttl(buf, &l) < 0) { - err++; - break; ---- 543,549 ---- - n = 0; - data[0] = '\0'; - (void) getword(buf, sizeof buf, fp, 1); -! if (isdigit((unsigned char)buf[0])) { /* ttl */ - if (ns_parse_ttl(buf, &l) < 0) { - err++; - break; -*************** -*** 705,711 **** - case T_RT: - n = 0; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - cp = data; ---- 705,711 ---- - case T_RT: - n = 0; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - cp = data; -*************** -*** 730,736 **** - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - cp = data; - PUTSHORT((u_int16_t) n, cp); ---- 730,736 ---- - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - cp = data; - PUTSHORT((u_int16_t) n, cp); -Index: src/bin/named/db_load.c -diff -c mdn/othersrc/bind8/src/bin/named/db_load.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/db_load.c:1.5 -*** src/bin/named/db_load.c Mon Jan 29 17:22:44 2001 ---- src/bin/named/db_load.c Mon Jan 29 17:32:28 2001 -*************** -*** 821,827 **** - n = 0; - cp = buf; - /* Order */ -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if (cp == buf || n > 65535) ---- 821,827 ---- - n = 0; - cp = buf; - /* Order */ -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if (cp == buf || n > 65535) -*************** -*** 889,895 **** - case ns_t_srv: - n = 0; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if ((cp == buf) || (n > 65535)) ---- 889,895 ---- - case ns_t_srv: - n = 0; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if ((cp == buf) || (n > 65535)) -*************** -*** 928,934 **** - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if ((cp == buf) || (n > 65535)) ---- 928,934 ---- - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - if ((cp == buf) || (n > 65535)) -*************** -*** 1893,1899 **** - wordtouint32_error = 1; - else - while ('\0' != *bufend) { -! if (isspace(*bufend)) - bufend++; - else { - wordtouint32_error = 1; ---- 1893,1899 ---- - wordtouint32_error = 1; - else - while ('\0' != *bufend) { -! if (isspace((unsigned char)*bufend)) - bufend++; - else { - wordtouint32_error = 1; -Index: src/bin/named/ns_config.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_config.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/ns_config.c:1.5 -*** src/bin/named/ns_config.c Mon Jan 29 17:22:45 2001 ---- src/bin/named/ns_config.c Mon Jan 29 17:32:28 2001 -*************** -*** 430,436 **** ---- 430,440 ---- - memset(zp, 0, sizeof (struct zoneinfo)); - zp->z_origin = name; - zp->z_class = class; -+ #ifdef NO_8BIT_THRU - zp->z_checknames = not_set; -+ #else -+ zp->z_checknames = ignore; -+ #endif - if (server_options->flags & OPTION_MAINTAIN_IXFR_BASE) - zp->z_maintain_ixfr_base = 1; - else -Index: src/bin/named/ns_init.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_init.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/ns_init.c:1.5 -*** src/bin/named/ns_init.c Mon Jan 29 17:22:46 2001 ---- src/bin/named/ns_init.c Mon Jan 29 17:32:28 2001 -*************** -*** 433,439 **** ---- 433,443 ---- - const char *owner, - struct in_addr source) - { -+ #ifdef NO_8BIT_THRU - enum severity severity = not_set; -+ #else -+ enum severity severity = ignore; -+ #endif - int ok = 1; - - if (zp != NULL) -Index: src/bin/named/ns_lexer.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_lexer.c:1.1.1.3 mdn/othersrc/bind8/src/bin/named/ns_lexer.c:1.4 -*** src/bin/named/ns_lexer.c Mon Dec 25 13:48:50 2000 ---- src/bin/named/ns_lexer.c Tue Dec 26 14:07:22 2000 -*************** -*** 65,71 **** - int warnings; - int errors; - u_int pushback_count; -! char pushback[LEXER_MAX_PUSHBACK]; - struct lexer_file_context * - next; - } *LexerFileContext; ---- 65,71 ---- - int warnings; - int errors; - u_int pushback_count; -! int pushback[LEXER_MAX_PUSHBACK]; - struct lexer_file_context * - next; - } *LexerFileContext; -Index: src/bin/named/ns_main.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_main.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/ns_main.c:1.5 -*** src/bin/named/ns_main.c Mon Jan 29 17:22:47 2001 ---- src/bin/named/ns_main.c Mon Jan 29 17:32:28 2001 -*************** -*** 2839,2845 **** - if (*s == '\0') - return (0); - while (*s != '\0') { -! if (!isdigit(*s)) - return (0); - s++; - } ---- 2839,2845 ---- - if (*s == '\0') - return (0); - while (*s != '\0') { -! if (!isdigit((unsigned char)*s)) - return (0); - s++; - } -Index: src/bin/named/ns_parseutil.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_parseutil.c:1.1.1.2 mdn/othersrc/bind8/src/bin/named/ns_parseutil.c:1.3 -*** src/bin/named/ns_parseutil.c Fri Sep 8 13:25:17 2000 ---- src/bin/named/ns_parseutil.c Fri Sep 8 14:21:52 2000 -*************** -*** 116,123 **** - - for (s = key; *s != '\0'; s++) { - c = *s; -! if (isascii(c) && isupper(c)) -! c = tolower(c); - h = ( h << 4 ) + c; - if ((g = ( h & 0xf0000000 )) != 0) { - h = h ^ (g >> 24); ---- 116,123 ---- - - for (s = key; *s != '\0'; s++) { - c = *s; -! if (isascii((unsigned char)c) && isupper((unsigned char)c)) -! c = tolower((unsigned char)c); - h = ( h << 4 ) + c; - if ((g = ( h & 0xf0000000 )) != 0) { - h = h ^ (g >> 24); -*************** -*** 213,219 **** - for (; (c = *in) != '\0'; in++) { - if (units_done) - return (0); -! if (isdigit(c)) { - result *= 10; - result += (c - '0'); - } else { ---- 213,219 ---- - for (; (c = *in) != '\0'; in++) { - if (units_done) - return (0); -! if (isdigit((unsigned char)c)) { - result *= 10; - result += (c - '0'); - } else { -Index: src/bin/named/ns_update.c -diff -c mdn/othersrc/bind8/src/bin/named/ns_update.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named/ns_update.c:1.5 -*** src/bin/named/ns_update.c Mon Jan 29 17:22:50 2001 ---- src/bin/named/ns_update.c Mon Jan 29 17:32:28 2001 -*************** -*** 2354,2360 **** - n = 0; - data[0] = '\0'; - (void) getword(buf, sizeof buf, fp, 1); -! if (isdigit(buf[0])) { /* ttl */ - if (ns_parse_ttl(buf, &l) < 0) { - err++; - break; ---- 2354,2360 ---- - n = 0; - data[0] = '\0'; - (void) getword(buf, sizeof buf, fp, 1); -! if (isdigit((unsigned char)buf[0])) { /* ttl */ - if (ns_parse_ttl(buf, &l) < 0) { - err++; - break; -*************** -*** 2523,2529 **** - case T_RT: - n = 0; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - cp = data; ---- 2523,2529 ---- - case T_RT: - n = 0; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - /* catch bad values */ - cp = data; -*************** -*** 2549,2555 **** - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit(*cp)) - n = n * 10 + (*cp++ - '0'); - cp = data; - PUTSHORT((u_int16_t)n, cp); ---- 2549,2555 ---- - n = 0; - data[0] = '\0'; - cp = buf; -! while (isdigit((unsigned char)*cp)) - n = n * 10 + (*cp++ - '0'); - cp = data; - PUTSHORT((u_int16_t)n, cp); -Index: src/bin/named-xfer/named-xfer.c -diff -c mdn/othersrc/bind8/src/bin/named-xfer/named-xfer.c:1.1.1.4 mdn/othersrc/bind8/src/bin/named-xfer/named-xfer.c:1.5 -*** src/bin/named-xfer/named-xfer.c Mon Jan 29 17:22:51 2001 ---- src/bin/named-xfer/named-xfer.c Mon Jan 29 17:32:28 2001 -*************** -*** 817,823 **** - fgets(buf, sizeof(buf), fp); - buf[strlen(buf)-1] = 0; - cp = buf; -! while (isspace(*cp)) - cp++; - - secret_len = b64_pton(cp, secret, sizeof(secret)); ---- 817,823 ---- - fgets(buf, sizeof(buf), fp); - buf[strlen(buf)-1] = 0; - cp = buf; -! while (isspace((unsigned char)*cp)) - cp++; - - secret_len = b64_pton(cp, secret, sizeof(secret)); -Index: src/bin/ndc/ndc.c -diff -c mdn/othersrc/bind8/src/bin/ndc/ndc.c:1.1.1.4 mdn/othersrc/bind8/src/bin/ndc/ndc.c:1.5 -*** src/bin/ndc/ndc.c Mon Jan 29 17:22:52 2001 ---- src/bin/ndc/ndc.c Mon Jan 29 17:32:29 2001 -*************** -*** 369,375 **** - long l = 0; - char ch; - -! while ((ch = *++cp) != '\0' && ch != '>' && isdigit(ch)) - l *= 10, l += (ch - '0'); - if (ch == '>') { - *pidp = (pid_t)l; ---- 369,375 ---- - long l = 0; - char ch; - -! while ((ch = *++cp) != '\0' && ch != '>' && isdigit((unsigned char)ch)) - l *= 10, l += (ch - '0'); - if (ch == '>') { - *pidp = (pid_t)l; -Index: src/bin/nslookup/commands.l -diff -c mdn/othersrc/bind8/src/bin/nslookup/commands.l:1.1.1.3 mdn/othersrc/bind8/src/bin/nslookup/commands.l:1.6 -*** src/bin/nslookup/commands.l Mon Jan 29 17:22:52 2001 ---- src/bin/nslookup/commands.l Mon Jan 29 17:32:29 2001 -*************** -*** 103,113 **** - extern void PrintHelp(); - extern void ViewList(char *); - -! %} -! WS [ \t] - FLET [A-Za-z0-9.*\\_] - LET [A-Za-z0-9.*_] - NAME [A-Za-z0-9.*=_/-] - %% - ^{WS}*server{WS}+{LET}{NAME}*{WS}*$ { - /* ---- 103,125 ---- - extern void PrintHelp(); - extern void ViewList(char *); - -! #ifdef NO_8BIT_THRU -! #error "Please change following lexical definitions by hand, and delete me." -! /* -! * Please change following lexical definitions to - FLET [A-Za-z0-9.*\\_] - LET [A-Za-z0-9.*_] - NAME [A-Za-z0-9.*=_/-] -+ by hand. Sorry for your inconvinience. -+ */ -+ #endif -+ -+ %} -+ %p 5000 -+ WS [ \t] -+ FLET [^ \t\n] -+ LET [^ \t\n] -+ NAME [^ \t\n] - %% - ^{WS}*server{WS}+{LET}{NAME}*{WS}*$ { - /* -Index: src/bin/nslookup/main.c -diff -c mdn/othersrc/bind8/src/bin/nslookup/main.c:1.1.1.4 mdn/othersrc/bind8/src/bin/nslookup/main.c:1.5 -*** src/bin/nslookup/main.c Mon Jan 29 17:22:52 2001 ---- src/bin/nslookup/main.c Mon Jan 29 17:32:29 2001 -*************** -*** 441,450 **** - { - register char *cp; - -! if (isdigit(host[0])) { - /* Make sure it has only digits and dots. */ - for (cp = host; *cp; ++cp) { -! if (!isdigit(*cp) && *cp != '.') - return FALSE; - } - /* If it has a trailing dot, don't treat it as an address. */ ---- 441,450 ---- - { - register char *cp; - -! if (isdigit((unsigned char)host[0])) { - /* Make sure it has only digits and dots. */ - for (cp = host; *cp; ++cp) { -! if (!isdigit((unsigned char)*cp) && *cp != '.') - return FALSE; - } - /* If it has a trailing dot, don't treat it as an address. */ -*************** -*** 888,898 **** - int tmp; - int i; - -! while (isspace(*option)) - ++option; - if (strncmp (option, "set ", 4) == 0) - option += 4; -! while (isspace(*option)) - ++option; - - if (*option == 0) { ---- 888,898 ---- - int tmp; - int i; - -! while (isspace((unsigned char)*option)) - ++option; - if (strncmp (option, "set ", 4) == 0) - option += 4; -! while (isspace((unsigned char)*option)) - ++option; - - if (*option == 0) { -Index: src/bin/nslookup/subr.c -diff -c mdn/othersrc/bind8/src/bin/nslookup/subr.c:1.1.1.2 mdn/othersrc/bind8/src/bin/nslookup/subr.c:1.3 -*** src/bin/nslookup/subr.c Mon Jan 29 17:22:53 2001 ---- src/bin/nslookup/subr.c Mon Jan 29 17:32:29 2001 -*************** -*** 513,522 **** - if (dest_size == 0 || dest == NULL || src == NULL) - return 0; - -! for (start = src ; isspace(*start) ; start++) - /* nada */ ; - -! for (end = start ; *end != '\0' && !isspace(*end) ; end++) - /* nada */ ; - - sublen = end - start ; ---- 513,522 ---- - if (dest_size == 0 || dest == NULL || src == NULL) - return 0; - -! for (start = src ; isspace((unsigned char)*start) ; start++) - /* nada */ ; - -! for (end = start ; *end != '\0' && !isspace((unsigned char)*end) ; end++) - /* nada */ ; - - sublen = end - start ; -*************** -*** 560,582 **** - if (f == NULL || s == NULL) - goto notfound; - -! if (isspace(*f)) { -! while (isspace(*f)) - f++ ; -! while (isspace(*s)) - s++ ; - } - - while (1) { -! if (isspace(*f)) { -! if (!isspace(*s)) - goto notfound; -! while(isspace(*s)) - s++; - /* any amount of whitespace in the format string - will match any amount of space in the source - string. */ -! while (isspace(*f)) - f++; - } else if (*f == '\0') { - return (s - src); ---- 560,582 ---- - if (f == NULL || s == NULL) - goto notfound; - -! if (isspace((unsigned char)*f)) { -! while (isspace((unsigned char)*f)) - f++ ; -! while (isspace((unsigned char)*s)) - s++ ; - } - - while (1) { -! if (isspace((unsigned char)*f)) { -! if (!isspace((unsigned char)*s)) - goto notfound; -! while(isspace((unsigned char)*s)) - s++; - /* any amount of whitespace in the format string - will match any amount of space in the source - string. */ -! while (isspace((unsigned char)*f)) - f++; - } else if (*f == '\0') { - return (s - src); -Index: src/bin/nsupdate/nsupdate.c -diff -c mdn/othersrc/bind8/src/bin/nsupdate/nsupdate.c:1.1.1.4 mdn/othersrc/bind8/src/bin/nsupdate/nsupdate.c:1.5 -*** src/bin/nsupdate/nsupdate.c Mon Jan 29 17:22:53 2001 ---- src/bin/nsupdate/nsupdate.c Mon Jan 29 17:32:29 2001 -*************** -*** 397,403 **** - - (void) getword_str(buf2, sizeof buf2, &startp, endp); - -! if (isdigit(buf2[0])) { /* ttl */ - r_ttl = strtoul(buf2, 0, 10); - if (errno == ERANGE && r_ttl == ULONG_MAX) { - fprintf(stderr, "oversized ttl: %s\n", buf2); ---- 397,403 ---- - - (void) getword_str(buf2, sizeof buf2, &startp, endp); - -! if (isdigit((unsigned char)buf2[0])) { /* ttl */ - r_ttl = strtoul(buf2, 0, 10); - if (errno == ERANGE && r_ttl == ULONG_MAX) { - fprintf(stderr, "oversized ttl: %s\n", buf2); -*************** -*** 458,464 **** - * depending on type - */ - cp = startp; -! while (cp <= endp && isspace(*cp)) - cp++; - r_size = endp - cp + 1; - break; ---- 458,464 ---- - * depending on type - */ - cp = startp; -! while (cp <= endp && isspace((unsigned char)*cp)) - cp++; - r_size = endp - cp + 1; - break; -*************** -*** 488,494 **** - } - /* read rdata portion, if specified */ - cp = startp; -! while (cp <= endp && isspace(*cp)) - cp++; - r_size = endp - cp + 1; - break; ---- 488,494 ---- - } - /* read rdata portion, if specified */ - cp = startp; -! while (cp <= endp && isspace((unsigned char)*cp)) - cp++; - r_size = endp - cp + 1; - break; -*************** -*** 512,518 **** - } - /* read rdata portion */ - cp = startp; -! while (cp < endp && isspace(*cp)) - cp++; - r_size = endp - cp + 1; - if (r_size <= 0) { ---- 512,518 ---- - } - /* read rdata portion */ - cp = startp; -! while (cp < endp && isspace((unsigned char)*cp)) - cp++; - r_size = endp - cp + 1; - if (r_size <= 0) { -*************** -*** 616,622 **** - - for (cp = buf; *startpp <= endp; ) { - c = **startpp; -! if (isspace(c) || c == '\0') { - if (cp != buf) /* trailing whitespace */ - break; - else { /* leading whitespace */ ---- 616,622 ---- - - for (cp = buf; *startpp <= endp; ) { - c = **startpp; -! if (isspace((unsigned char)c) || c == '\0') { - if (cp != buf) /* trailing whitespace */ - break; - else { /* leading whitespace */ -*************** -*** 649,655 **** - while(buf[i] && buf[i] != '"') - i++; - } else { -! while(isspace(*buf)) - i++; - } - if (i > MAXCHARSTRING) { ---- 649,655 ---- - while(buf[i] && buf[i] != '"') - i++; - } else { -! while(isspace((unsigned char)*buf)) - i++; - } - if (i > MAXCHARSTRING) { -*************** -*** 667,673 **** - memmove(data + 1 + n, buf, i); - buf += i + 1; - n += i + 1; -! while(*buf && isspace(*buf)) - buf++; - } while (nfield < maxfields && *buf); - ---- 667,673 ---- - memmove(data + 1 + n, buf, i); - buf += i + 1; - n += i + 1; -! while(*buf && isspace((unsigned char)*buf)) - buf++; - } while (nfield < maxfields && *buf); - -Index: src/lib/bsd/mktemp.c -diff -c mdn/othersrc/bind8/src/lib/bsd/mktemp.c:1.1.1.1 mdn/othersrc/bind8/src/lib/bsd/mktemp.c:1.2 -*** src/lib/bsd/mktemp.c Wed May 24 15:35:15 2000 ---- src/lib/bsd/mktemp.c Mon Jul 3 13:09:02 2000 -*************** -*** 140,146 **** - if (*trv == 'z') - *trv++ = 'a'; - else { -! if (isdigit(*trv)) - *trv = 'a'; - else - ++*trv; ---- 140,146 ---- - if (*trv == 'z') - *trv++ = 'a'; - else { -! if (isdigit((unsigned char)*trv)) - *trv = 'a'; - else - ++*trv; -Index: src/lib/bsd/strtoul.c -diff -c mdn/othersrc/bind8/src/lib/bsd/strtoul.c:1.1.1.1 mdn/othersrc/bind8/src/lib/bsd/strtoul.c:1.2 -*** src/lib/bsd/strtoul.c Wed May 24 15:35:15 2000 ---- src/lib/bsd/strtoul.c Mon Jul 3 13:09:02 2000 -*************** -*** 71,77 **** - */ - do { - c = *s++; -! } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; ---- 71,77 ---- - */ - do { - c = *s++; -! } while (isspace((unsigned char)c)); - if (c == '-') { - neg = 1; - c = *s++; -*************** -*** 88,97 **** - cutoff = (u_long)ULONG_MAX / (u_long)base; - cutlim = (u_long)ULONG_MAX % (u_long)base; - for (acc = 0, any = 0;; c = *s++) { -! if (isdigit(c)) - c -= '0'; -! else if (isalpha(c)) -! c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) ---- 88,97 ---- - cutoff = (u_long)ULONG_MAX / (u_long)base; - cutlim = (u_long)ULONG_MAX % (u_long)base; - for (acc = 0, any = 0;; c = *s++) { -! if (isdigit((unsigned char)c)) - c -= '0'; -! else if (isalpha((unsigned char)c)) -! c -= isupper((unsigned char)c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) -Index: src/lib/dst/dst_api.c -diff -c mdn/othersrc/bind8/src/lib/dst/dst_api.c:1.1.1.4 mdn/othersrc/bind8/src/lib/dst/dst_api.c:1.5 -*** src/lib/dst/dst_api.c Mon Jan 29 17:23:02 2001 ---- src/lib/dst/dst_api.c Mon Jan 29 17:32:29 2001 -*************** -*** 555,561 **** - enckey[--len] = '\0'; - - /* remove leading spaces */ -! for (notspace = (char *) enckey; isspace(*notspace); len--) - notspace++; - - dlen = b64_pton(notspace, deckey, sizeof(deckey)); ---- 555,561 ---- - enckey[--len] = '\0'; - - /* remove leading spaces */ -! for (notspace = (char *) enckey; isspace((unsigned char)*notspace); len--) - notspace++; - - dlen = b64_pton(notspace, deckey, sizeof(deckey)); -Index: src/lib/inet/inet_addr.c -diff -c mdn/othersrc/bind8/src/lib/inet/inet_addr.c:1.1.1.1 mdn/othersrc/bind8/src/lib/inet/inet_addr.c:1.2 -*** src/lib/inet/inet_addr.c Wed May 24 15:35:18 2000 ---- src/lib/inet/inet_addr.c Mon Jul 3 13:09:05 2000 -*************** -*** 121,127 **** - * Values are specified as for C: - * 0x=hex, 0=octal, isdigit=decimal. - */ -! if (!isdigit(c)) - return (0); - val = 0; base = 10; digit = 0; - if (c == '0') { ---- 121,127 ---- - * Values are specified as for C: - * 0x=hex, 0=octal, isdigit=decimal. - */ -! if (!isdigit((unsigned char)c)) - return (0); - val = 0; base = 10; digit = 0; - if (c == '0') { -*************** -*** 134,148 **** - } - } - for (;;) { -! if (isascii(c) && isdigit(c)) { - if (base == 8 && (c == '8' || c == '9')) - return (0); - val = (val * base) + (c - '0'); - c = *++cp; - digit = 1; -! } else if (base == 16 && isascii(c) && isxdigit(c)) { - val = (val << 4) | -! (c + 10 - (islower(c) ? 'a' : 'A')); - c = *++cp; - digit = 1; - } else ---- 134,148 ---- - } - } - for (;;) { -! if (isascii((unsigned char)c) && isdigit((unsigned char)c)) { - if (base == 8 && (c == '8' || c == '9')) - return (0); - val = (val * base) + (c - '0'); - c = *++cp; - digit = 1; -! } else if (base == 16 && isascii((unsigned char)c) && isxdigit((unsigned char)c)) { - val = (val << 4) | -! (c + 10 - (islower((unsigned char)c) ? 'a' : 'A')); - c = *++cp; - digit = 1; - } else -*************** -*** 165,171 **** - /* - * Check for trailing characters. - */ -! if (c != '\0' && (!isascii(c) || !isspace(c))) - return (0); - /* - * Did we get a valid digit? ---- 165,171 ---- - /* - * Check for trailing characters. - */ -! if (c != '\0' && (!isascii((unsigned char)c) || !isspace((unsigned char)c))) - return (0); - /* - * Did we get a valid digit? -Index: src/lib/inet/inet_cidr_pton.c -diff -c mdn/othersrc/bind8/src/lib/inet/inet_cidr_pton.c:1.1.1.2 mdn/othersrc/bind8/src/lib/inet/inet_cidr_pton.c:1.3 -*** src/lib/inet/inet_cidr_pton.c Mon Jan 29 17:23:03 2001 ---- src/lib/inet/inet_cidr_pton.c Mon Jan 29 17:32:30 2001 -*************** -*** 80,86 **** - size_t size = 4; - - /* Get the mantissa. */ -! while (ch = *src++, (isascii(ch) && isdigit(ch))) { - tmp = 0; - do { - n = strchr(digits, ch) - digits; ---- 80,86 ---- - size_t size = 4; - - /* Get the mantissa. */ -! while (ch = *src++, (isascii((unsigned char)ch) && isdigit((unsigned char)ch))) { - tmp = 0; - do { - n = strchr(digits, ch) - digits; -*************** -*** 89,95 **** - tmp += n; - if (tmp > 255) - goto enoent; -! } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); - if (size-- == 0) - goto emsgsize; - *dst++ = (u_char) tmp; ---- 89,95 ---- - tmp += n; - if (tmp > 255) - goto enoent; -! } while ((ch = *src++) != '\0' && isascii((unsigned char)ch) && isdigit((unsigned char)ch)); - if (size-- == 0) - goto emsgsize; - *dst++ = (u_char) tmp; -*************** -*** 101,107 **** - - /* Get the prefix length if any. */ - bits = -1; -! if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) { - /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /* Skip over the /. */ - bits = 0; ---- 101,107 ---- - - /* Get the prefix length if any. */ - bits = -1; -! if (ch == '/' && isascii((unsigned char)src[0]) && isdigit((unsigned char)src[0]) && dst > odst) { - /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /* Skip over the /. */ - bits = 0; -*************** -*** 110,116 **** - INSIST(n >= 0 && n <= 9); - bits *= 10; - bits += n; -! } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); - if (ch != '\0') - goto enoent; - if (bits > 32) ---- 110,116 ---- - INSIST(n >= 0 && n <= 9); - bits *= 10; - bits += n; -! } while ((ch = *src++) != '\0' && isascii((unsigned char)ch) && isdigit((unsigned char)ch)); - if (ch != '\0') - goto enoent; - if (bits > 32) -Index: src/lib/inet/inet_net_pton.c -diff -c mdn/othersrc/bind8/src/lib/inet/inet_net_pton.c:1.1.1.1 mdn/othersrc/bind8/src/lib/inet/inet_net_pton.c:1.2 -*** src/lib/inet/inet_net_pton.c Wed May 24 15:35:18 2000 ---- src/lib/inet/inet_net_pton.c Mon Jul 3 13:09:06 2000 -*************** -*** 103,117 **** - - ch = *src++; - if (ch == '0' && (src[0] == 'x' || src[0] == 'X') -! && isascii(src[1]) && isxdigit(src[1])) { - /* Hexadecimal: Eat nybble string. */ - if (size <= 0) - goto emsgsize; - dirty = 0; - src++; /* skip x or X. */ -! while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) { -! if (isupper(ch)) -! ch = tolower(ch); - n = strchr(xdigits, ch) - xdigits; - INSIST(n >= 0 && n <= 15); - if (dirty == 0) ---- 103,117 ---- - - ch = *src++; - if (ch == '0' && (src[0] == 'x' || src[0] == 'X') -! && isascii((unsigned char)src[1]) && isxdigit((unsigned char)src[1])) { - /* Hexadecimal: Eat nybble string. */ - if (size <= 0) - goto emsgsize; - dirty = 0; - src++; /* skip x or X. */ -! while ((ch = *src++) != '\0' && isascii((unsigned char)ch) && isxdigit((unsigned char)ch)) { -! if (isupper((unsigned char)ch)) -! ch = tolower((unsigned char)ch); - n = strchr(xdigits, ch) - xdigits; - INSIST(n >= 0 && n <= 15); - if (dirty == 0) -*************** -*** 130,136 **** - goto emsgsize; - *dst++ = (u_char) (tmp << 4); - } -! } else if (isascii(ch) && isdigit(ch)) { - /* Decimal: eat dotted digit string. */ - for (;;) { - tmp = 0; ---- 130,136 ---- - goto emsgsize; - *dst++ = (u_char) (tmp << 4); - } -! } else if (isascii((unsigned char)ch) && isdigit((unsigned char)ch)) { - /* Decimal: eat dotted digit string. */ - for (;;) { - tmp = 0; -*************** -*** 142,148 **** - if (tmp > 255) - goto enoent; - } while ((ch = *src++) != '\0' && -! isascii(ch) && isdigit(ch)); - if (size-- <= 0) - goto emsgsize; - *dst++ = (u_char) tmp; ---- 142,148 ---- - if (tmp > 255) - goto enoent; - } while ((ch = *src++) != '\0' && -! isascii((unsigned char)ch) && isdigit((unsigned char)ch)); - if (size-- <= 0) - goto emsgsize; - *dst++ = (u_char) tmp; -*************** -*** 151,164 **** - if (ch != '.') - goto enoent; - ch = *src++; -! if (!isascii(ch) || !isdigit(ch)) - goto enoent; - } - } else - goto enoent; - - bits = -1; -! if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) { - /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /* Skip over the /. */ - bits = 0; ---- 151,164 ---- - if (ch != '.') - goto enoent; - ch = *src++; -! if (!isascii((unsigned char)ch) || !isdigit((unsigned char)ch)) - goto enoent; - } - } else - goto enoent; - - bits = -1; -! if (ch == '/' && isascii((unsigned char)src[0]) && isdigit((unsigned char)src[0]) && dst > odst) { - /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /* Skip over the /. */ - bits = 0; -*************** -*** 167,173 **** - INSIST(n >= 0 && n <= 9); - bits *= 10; - bits += n; -! } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch)); - if (ch != '\0') - goto enoent; - if (bits > 32) ---- 167,173 ---- - INSIST(n >= 0 && n <= 9); - bits *= 10; - bits += n; -! } while ((ch = *src++) != '\0' && isascii((unsigned char)ch) && isdigit((unsigned char)ch)); - if (ch != '\0') - goto enoent; - if (bits > 32) -Index: src/lib/inet/inet_network.c -diff -c mdn/othersrc/bind8/src/lib/inet/inet_network.c:1.1.1.1 mdn/othersrc/bind8/src/lib/inet/inet_network.c:1.2 -*** src/lib/inet/inet_network.c Wed May 24 15:35:18 2000 ---- src/lib/inet/inet_network.c Mon Jul 3 13:09:06 2000 -*************** -*** 65,71 **** - if (*cp == 'x' || *cp == 'X') - base = 16, cp++; - while ((c = *cp) != 0) { -! if (isdigit(c)) { - if (base == 8 && (c == '8' || c == '9')) - return (INADDR_NONE); - val = (val * base) + (c - '0'); ---- 65,71 ---- - if (*cp == 'x' || *cp == 'X') - base = 16, cp++; - while ((c = *cp) != 0) { -! if (isdigit((unsigned char)c)) { - if (base == 8 && (c == '8' || c == '9')) - return (INADDR_NONE); - val = (val * base) + (c - '0'); -*************** -*** 73,80 **** - digit = 1; - continue; - } -! if (base == 16 && isxdigit(c)) { -! val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A')); - cp++; - digit = 1; - continue; ---- 73,80 ---- - digit = 1; - continue; - } -! if (base == 16 && isxdigit((unsigned char)c)) { -! val = (val << 4) + (c + 10 - (islower((unsigned char)c) ? 'a' : 'A')); - cp++; - digit = 1; - continue; -*************** -*** 89,95 **** - *pp++ = val, cp++; - goto again; - } -! if (*cp && !isspace(*cp)) - return (INADDR_NONE); - *pp++ = val; - n = pp - parts; ---- 89,95 ---- - *pp++ = val, cp++; - goto again; - } -! if (*cp && !isspace((unsigned char)*cp)) - return (INADDR_NONE); - *pp++ = val; - n = pp - parts; -Index: src/lib/inet/nsap_addr.c -diff -c mdn/othersrc/bind8/src/lib/inet/nsap_addr.c:1.1.1.1 mdn/othersrc/bind8/src/lib/inet/nsap_addr.c:1.2 -*** src/lib/inet/nsap_addr.c Wed May 24 15:35:18 2000 ---- src/lib/inet/nsap_addr.c Mon Jul 3 13:09:06 2000 -*************** -*** 47,62 **** - while ((c = *ascii++) != '\0' && len < (u_int)maxlen) { - if (c == '.' || c == '+' || c == '/') - continue; -! if (!isascii(c)) - return (0); -! if (islower(c)) -! c = toupper(c); -! if (isxdigit(c)) { - nib = xtob(c); - c = *ascii++; - if (c != '\0') { -! c = toupper(c); -! if (isxdigit(c)) { - *binary++ = (nib << 4) | xtob(c); - len++; - } else ---- 47,62 ---- - while ((c = *ascii++) != '\0' && len < (u_int)maxlen) { - if (c == '.' || c == '+' || c == '/') - continue; -! if (!isascii((unsigned char)c)) - return (0); -! if (islower((unsigned char)c)) -! c = toupper((unsigned char)c); -! if (isxdigit((unsigned char)c)) { - nib = xtob(c); - c = *ascii++; - if (c != '\0') { -! c = toupper((unsigned char)c); -! if (isxdigit((unsigned char)c)) { - *binary++ = (nib << 4) | xtob(c); - len++; - } else -Index: src/lib/irs/dns_nw.c -diff -c mdn/othersrc/bind8/src/lib/irs/dns_nw.c:1.1.1.1 mdn/othersrc/bind8/src/lib/irs/dns_nw.c:1.2 -*** src/lib/irs/dns_nw.c Wed May 24 15:35:18 2000 ---- src/lib/irs/dns_nw.c Mon Jul 3 13:09:07 2000 -*************** -*** 539,546 **** - - /* Make lower case. */ - for (t = name; *t; t++) -! if (isascii(*t) && isupper(*t)) -! *t = tolower(*t); - - /* Remove trailing dots. */ - while (t > name && t[-1] == '.') ---- 539,546 ---- - - /* Make lower case. */ - for (t = name; *t; t++) -! if (isascii((unsigned char)*t) && isupper((unsigned char)*t)) -! *t = tolower((unsigned char)*t); - - /* Remove trailing dots. */ - while (t > name && t[-1] == '.') -Index: src/lib/irs/dns_pr.c -diff -c mdn/othersrc/bind8/src/lib/irs/dns_pr.c:1.1.1.1 mdn/othersrc/bind8/src/lib/irs/dns_pr.c:1.2 -*** src/lib/irs/dns_pr.c Wed May 24 15:35:18 2000 ---- src/lib/irs/dns_pr.c Mon Jul 3 13:09:07 2000 -*************** -*** 201,207 **** - - /* Skip blank lines. */ - p = cp; -! while (*p && !isspace(*p)) - p++; - if (!*p) - continue; ---- 201,207 ---- - - /* Skip blank lines. */ - p = cp; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - continue; -*************** -*** 213,226 **** - - p = pvt->prbuf; - pvt->proto.p_name = p; -! while (*p && !isspace(*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->proto.p_proto = atoi(p); -! while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; ---- 213,226 ---- - - p = pvt->prbuf; - pvt->proto.p_name = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->proto.p_proto = atoi(p); -! while (*p && !isspace((unsigned char)*p)) - p++; - if (*p) - *p++ = '\0'; -*************** -*** 237,243 **** - pvt->proto.p_aliases = new; - } - pvt->proto.p_aliases[num++] = p; -! while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; ---- 237,243 ---- - pvt->proto.p_aliases = new; - } - pvt->proto.p_aliases[num++] = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (*p) - *p++ = '\0'; -Index: src/lib/irs/dns_sv.c -diff -c mdn/othersrc/bind8/src/lib/irs/dns_sv.c:1.1.1.2 mdn/othersrc/bind8/src/lib/irs/dns_sv.c:1.3 -*** src/lib/irs/dns_sv.c Fri Sep 8 13:25:25 2000 ---- src/lib/irs/dns_sv.c Fri Sep 8 14:21:55 2000 -*************** -*** 189,195 **** - - /* Check to make sure the protocol matches. */ - p = cp; -! while (*p && !isspace(*p)) - p++; - if (!*p) - continue; ---- 189,195 ---- - - /* Check to make sure the protocol matches. */ - p = cp; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - continue; -*************** -*** 197,204 **** - proto_len = strlen(proto); - if (strncasecmp(++p, proto, proto_len) != 0) - continue; -! if (p[proto_len] && !isspace(p[proto_len])) -! continue; - } - /* OK, we've got a live one. Let's parse it for real. */ - if (pvt->svbuf) ---- 197,204 ---- - proto_len = strlen(proto); - if (strncasecmp(++p, proto, proto_len) != 0) - continue; -! if (p[proto_len] && !isspace((unsigned char)p[proto_len])) -! continue; - } - /* OK, we've got a live one. Let's parse it for real. */ - if (pvt->svbuf) -*************** -*** 207,227 **** - - p = pvt->svbuf; - pvt->serv.s_name = p; -! while (*p && !isspace(*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->serv.s_proto = p; -! while (*p && !isspace(*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->serv.s_port = htons((u_short) atoi(p)); -! while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; ---- 207,227 ---- - - p = pvt->svbuf; - pvt->serv.s_name = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->serv.s_proto = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - continue; - *p++ = '\0'; - - pvt->serv.s_port = htons((u_short) atoi(p)); -! while (*p && !isspace((unsigned char)*p)) - p++; - if (*p) - *p++ = '\0'; -*************** -*** 238,244 **** - pvt->serv.s_aliases = new; - } - pvt->serv.s_aliases[num++] = p; -! while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; ---- 238,244 ---- - pvt->serv.s_aliases = new; - } - pvt->serv.s_aliases[num++] = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (*p) - *p++ = '\0'; -Index: src/lib/irs/gen.c -diff -c mdn/othersrc/bind8/src/lib/irs/gen.c:1.1.1.1 mdn/othersrc/bind8/src/lib/irs/gen.c:1.2 -*** src/lib/irs/gen.c Wed May 24 15:35:18 2000 ---- src/lib/irs/gen.c Mon Jul 3 13:09:07 2000 -*************** -*** 399,405 **** - char *tmp; - int n; - -! for (tmp = line; isascii(*tmp) && isspace(*tmp); tmp++) - (void)NULL; - if (*tmp == '#' || *tmp == '\n' || *tmp == '\0') - continue; ---- 399,405 ---- - char *tmp; - int n; - -! for (tmp = line; isascii((unsigned char)*tmp) && isspace((unsigned char)*tmp); tmp++) - (void)NULL; - if (*tmp == '#' || *tmp == '\n' || *tmp == '\0') - continue; -Index: src/lib/irs/getnetent.c -diff -c mdn/othersrc/bind8/src/lib/irs/getnetent.c:1.1.1.2 mdn/othersrc/bind8/src/lib/irs/getnetent.c:1.3 -*** src/lib/irs/getnetent.c Mon Jan 29 17:23:04 2001 ---- src/lib/irs/getnetent.c Mon Jan 29 17:32:30 2001 -*************** -*** 259,268 **** - RES_SET_H_ERRNO(net_data->res, NETDB_INTERNAL); - return (NULL); - } -! if (!isascii(name[0]) || !isdigit(name[0])) - return (NULL); - for (cp = name; *cp; ++cp) -! if (!isascii(*cp) || (!isdigit(*cp) && *cp != '.')) - return (NULL); - if (*--cp == '.') - return (NULL); ---- 259,268 ---- - RES_SET_H_ERRNO(net_data->res, NETDB_INTERNAL); - return (NULL); - } -! if (!isascii((unsigned char)name[0]) || !isdigit((unsigned char)name[0])) - return (NULL); - for (cp = name; *cp; ++cp) -! if (!isascii((unsigned char)*cp) || (!isdigit((unsigned char)*cp) && *cp != '.')) - return (NULL); - if (*--cp == '.') - return (NULL); -Index: src/lib/irs/irp.c -diff -c mdn/othersrc/bind8/src/lib/irs/irp.c:1.1.1.2 mdn/othersrc/bind8/src/lib/irs/irp.c:1.3 -*** src/lib/irs/irp.c Fri Sep 8 13:25:25 2000 ---- src/lib/irs/irp.c Fri Sep 8 14:21:55 2000 -*************** -*** 387,395 **** - code = 0; - } else if (text != NULL && textlen > 0) { - p = line; -! while (isspace(*p)) p++; -! while (isdigit(*p)) p++; -! while (isspace(*p)) p++; - strncpy(text, p, textlen - 1); - p[textlen - 1] = '\0'; - } ---- 387,395 ---- - code = 0; - } else if (text != NULL && textlen > 0) { - p = line; -! while (isspace((unsigned char)*p)) p++; -! while (isdigit((unsigned char)*p)) p++; -! while (isspace((unsigned char)*p)) p++; - strncpy(text, p, textlen - 1); - p[textlen - 1] = '\0'; - } -Index: src/lib/irs/irpmarshall.c -diff -c mdn/othersrc/bind8/src/lib/irs/irpmarshall.c:1.1.1.2 mdn/othersrc/bind8/src/lib/irs/irpmarshall.c:1.3 -*** src/lib/irs/irpmarshall.c Mon Dec 25 13:49:06 2000 ---- src/lib/irs/irpmarshall.c Tue Dec 26 14:07:24 2000 -*************** -*** 1256,1262 **** - *host = *user = *domain = NULL; - - p = buffer; -! while (isspace(*p)) { - p++; - } - if (*p != '(') { ---- 1256,1262 ---- - *host = *user = *domain = NULL; - - p = buffer; -! while (isspace((unsigned char)*p)) { - p++; - } - if (*p != '(') { -*************** -*** 1908,1920 **** - static int - strcmp_nws(const char *a, const char *b) { - while (*a && *b) { -! if (isspace(*a) && isspace(*b)) { - do { - a++; -! } while (isspace(*a)); - do { - b++; -! } while (isspace(*b)); - } - if (*a < *b) - return (-1); ---- 1908,1920 ---- - static int - strcmp_nws(const char *a, const char *b) { - while (*a && *b) { -! if (isspace((unsigned char)*a) && isspace((unsigned char)*b)) { - do { - a++; -! } while (isspace((unsigned char)*a)); - do { - b++; -! } while (isspace((unsigned char)*b)); - } - if (*a < *b) - return (-1); -Index: src/lib/irs/nis_pr.c -diff -c mdn/othersrc/bind8/src/lib/irs/nis_pr.c:1.1.1.1 mdn/othersrc/bind8/src/lib/irs/nis_pr.c:1.2 -*** src/lib/irs/nis_pr.c Wed May 24 15:35:20 2000 ---- src/lib/irs/nis_pr.c Mon Jul 3 13:09:08 2000 -*************** -*** 222,228 **** - - for (p = pvt->prbuf; *p && *p != '#'; p++) - NULL; -! while (p > pvt->prbuf && isspace(p[-1])) - p--; - *p = '\0'; - ---- 222,228 ---- - - for (p = pvt->prbuf; *p && *p != '#'; p++) - NULL; -! while (p > pvt->prbuf && isspace((unsigned char)p[-1])) - p--; - *p = '\0'; - -*************** -*** 230,245 **** - n = m = 0; - - pvt->proto.p_name = p; -! while (*p && !isspace(*p)) - p++; - if (!*p) - return (NULL); - *p++ = '\0'; - -! while (*p && isspace(*p)) - p++; - pvt->proto.p_proto = atoi(p); -! while (*p && !isspace(*p)) - p++; - *p++ = '\0'; - ---- 230,245 ---- - n = m = 0; - - pvt->proto.p_name = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (!*p) - return (NULL); - *p++ = '\0'; - -! while (*p && isspace((unsigned char)*p)) - p++; - pvt->proto.p_proto = atoi(p); -! while (*p && !isspace((unsigned char)*p)) - p++; - *p++ = '\0'; - -*************** -*** 255,261 **** - pvt->proto.p_aliases = t; - } - pvt->proto.p_aliases[n++] = p; -! while (*p && !isspace(*p)) - p++; - if (*p) - *p++ = '\0'; ---- 255,261 ---- - pvt->proto.p_aliases = t; - } - pvt->proto.p_aliases[n++] = p; -! while (*p && !isspace((unsigned char)*p)) - p++; - if (*p) - *p++ = '\0'; -Index: src/lib/irs/nis_sv.c -diff -c mdn/othersrc/bind8/src/lib/irs/nis_sv.c:1.1.1.1 mdn/othersrc/bind8/src/lib/irs/nis_sv.c:1.2 -*** src/lib/irs/nis_sv.c Wed May 24 15:35:20 2000 ---- src/lib/irs/nis_sv.c Mon Jul 3 13:09:08 2000 -*************** -*** 242,248 **** - pvt->serv.s_port = htons((u_short) atoi(p)); - pvt->serv.s_proto = NULL; - -! while (*p && !isspace(*p)) - if (*p++ == '/') - pvt->serv.s_proto = p; - if (!pvt->serv.s_proto) ---- 242,248 ---- - pvt->serv.s_port = htons((u_short) atoi(p)); - pvt->serv.s_proto = NULL; - -! while (*p && !isspace((unsigned char)*p)) - if (*p++ == '/') - pvt->serv.s_proto = p; - if (!pvt->serv.s_proto) -Index: src/lib/isc/base64.c -diff -c mdn/othersrc/bind8/src/lib/isc/base64.c:1.1.1.1 mdn/othersrc/bind8/src/lib/isc/base64.c:1.2 -*** src/lib/isc/base64.c Wed May 24 15:35:20 2000 ---- src/lib/isc/base64.c Mon Jul 3 13:09:09 2000 -*************** -*** 210,216 **** - tarindex = 0; - - while ((ch = *src++) != '\0') { -! if (isspace(ch)) /* Skip whitespace anywhere. */ - continue; - - if (ch == Pad64) ---- 210,216 ---- - tarindex = 0; - - while ((ch = *src++) != '\0') { -! if (isspace((unsigned char)ch)) /* Skip whitespace anywhere. */ - continue; - - if (ch == Pad64) -*************** -*** 280,286 **** - case 2: /* Valid, means one byte of info */ - /* Skip any number of spaces. */ - for ((void)NULL; ch != '\0'; ch = *src++) -! if (!isspace(ch)) - break; - /* Make sure there is another trailing = sign. */ - if (ch != Pad64) ---- 280,286 ---- - case 2: /* Valid, means one byte of info */ - /* Skip any number of spaces. */ - for ((void)NULL; ch != '\0'; ch = *src++) -! if (!isspace((unsigned char)ch)) - break; - /* Make sure there is another trailing = sign. */ - if (ch != Pad64) -*************** -*** 295,301 **** - * whitespace after it? - */ - for ((void)NULL; ch != '\0'; ch = *src++) -! if (!isspace(ch)) - return (-1); - - /* ---- 295,301 ---- - * whitespace after it? - */ - for ((void)NULL; ch != '\0'; ch = *src++) -! if (!isspace((unsigned char)ch)) - return (-1); - - /* -Index: src/lib/isc/ctl_clnt.c -diff -c mdn/othersrc/bind8/src/lib/isc/ctl_clnt.c:1.1.1.2 mdn/othersrc/bind8/src/lib/isc/ctl_clnt.c:1.3 -*** src/lib/isc/ctl_clnt.c Mon Dec 25 13:49:07 2000 ---- src/lib/isc/ctl_clnt.c Tue Dec 26 14:07:24 2000 -*************** -*** 55,62 **** - /* Macros. */ - - #define donefunc_p(ctx) ((ctx).donefunc != NULL) -! #define arpacode_p(line) (isdigit(line[0]) && isdigit(line[1]) && \ -! isdigit(line[2])) - #define arpacont_p(line) (line[3] == '-') - #define arpadone_p(line) (line[3] == ' ' || line[3] == '\t' || \ - line[3] == '\r' || line[3] == '\0') ---- 55,62 ---- - /* Macros. */ - - #define donefunc_p(ctx) ((ctx).donefunc != NULL) -! #define arpacode_p(line) (isdigit((unsigned char)line[0]) && isdigit((unsigned char)line[1]) && \ -! isdigit((unsigned char)line[2])) - #define arpacont_p(line) (line[3] == '-') - #define arpadone_p(line) (line[3] == ' ' || line[3] == '\t' || \ - line[3] == '\r' || line[3] == '\0') -*************** -*** 243,249 **** - memcpy(tran->outbuf.text, cmd, len); - tran->outbuf.used = len; - for (pc = tran->outbuf.text, n = 0; n < tran->outbuf.used; pc++, n++) -! if (!isascii(*pc) || !isprint(*pc)) - *pc = '\040'; - start_write(ctx); - return (0); ---- 243,249 ---- - memcpy(tran->outbuf.text, cmd, len); - tran->outbuf.used = len; - for (pc = tran->outbuf.text, n = 0; n < tran->outbuf.used; pc++, n++) -! if (!isascii((unsigned char)*pc) || !isprint((unsigned char)*pc)) - *pc = '\040'; - start_write(ctx); - return (0); -Index: src/lib/isc/ctl_srvr.c -diff -c mdn/othersrc/bind8/src/lib/isc/ctl_srvr.c:1.1.1.3 mdn/othersrc/bind8/src/lib/isc/ctl_srvr.c:1.4 -*** src/lib/isc/ctl_srvr.c Mon Dec 25 13:49:07 2000 ---- src/lib/isc/ctl_srvr.c Tue Dec 26 14:07:24 2000 -*************** -*** 328,334 **** - code, (flags & CTL_MORE) != 0 ? '-' : ' ', - text)); - for (pc = sess->outbuf.text, n = 0; n < sess->outbuf.used-2; pc++, n++) -! if (!isascii(*pc) || !isprint(*pc)) - *pc = '\040'; - *iovp++ = evConsIovec(sess->outbuf.text, sess->outbuf.used); - if (body != NULL) { ---- 328,334 ---- - code, (flags & CTL_MORE) != 0 ? '-' : ' ', - text)); - for (pc = sess->outbuf.text, n = 0; n < sess->outbuf.used-2; pc++, n++) -! if (!isascii((unsigned char)*pc) || !isprint((unsigned char)*pc)) - *pc = '\040'; - *iovp++ = evConsIovec(sess->outbuf.text, sess->outbuf.used); - if (body != NULL) { -Index: src/lib/nameser/ns_date.c -diff -c mdn/othersrc/bind8/src/lib/nameser/ns_date.c:1.1.1.1 mdn/othersrc/bind8/src/lib/nameser/ns_date.c:1.2 -*** src/lib/nameser/ns_date.c Wed May 24 15:35:21 2000 ---- src/lib/nameser/ns_date.c Mon Jul 3 13:09:11 2000 -*************** -*** 116,122 **** - int i; - - for (i = 0; i < size; i++) { -! if (!isdigit(buf[i])) - *errp = 1; - result = (result * 10) + buf[i] - '0'; - } ---- 116,122 ---- - int i; - - for (i = 0; i < size; i++) { -! if (!isdigit((unsigned char)buf[i])) - *errp = 1; - result = (result * 10) + buf[i] - '0'; - } -Index: src/lib/nameser/ns_name.c -diff -c mdn/othersrc/bind8/src/lib/nameser/ns_name.c:1.1.1.2 mdn/othersrc/bind8/src/lib/nameser/ns_name.c:1.4 -*** src/lib/nameser/ns_name.c Fri Sep 8 13:25:28 2000 ---- src/lib/nameser/ns_name.c Fri Dec 22 15:33:28 2000 -*************** -*** 171,179 **** ---- 171,181 ---- - c = n; - } - escaped = 0; -+ #ifdef NO_8BIT_THRU - } else if (c == '\\') { - escaped = 1; - continue; -+ #endif - } else if (c == '.') { - c = (bp - label - 1); - if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */ -*************** -*** 270,276 **** ---- 272,282 ---- - } - for ((void)NULL; n > 0; n--) { - c = *cp++; -+ #ifdef NO_8BIT_THRU - if (isupper(c)) -+ #else -+ if (c < 128 && isupper(c)) -+ #endif - *dn++ = tolower(c); - else - *dn++ = c; -*************** -*** 566,571 **** ---- 572,578 ---- - */ - static int - special(int ch) { -+ #ifdef NO_8BIT_THRU - switch (ch) { - case 0x22: /* '"' */ - case 0x2E: /* '.' */ -*************** -*** 578,583 **** ---- 585,593 ---- - default: - return (0); - } -+ #else -+ return (0); -+ #endif - } - - /* -*************** -*** 589,595 **** ---- 599,609 ---- - */ - static int - printable(int ch) { -+ #ifdef NO_8BIT_THRU - return (ch > 0x20 && ch < 0x7f); -+ #else -+ return (1); -+ #endif - } - - /* -Index: src/lib/nameser/ns_ttl.c -diff -c mdn/othersrc/bind8/src/lib/nameser/ns_ttl.c:1.1.1.1 mdn/othersrc/bind8/src/lib/nameser/ns_ttl.c:1.2 -*** src/lib/nameser/ns_ttl.c Wed May 24 15:35:21 2000 ---- src/lib/nameser/ns_ttl.c Mon Jul 3 13:09:11 2000 -*************** -*** 86,93 **** - int ch; - - for (p = odst; (ch = *p) != '\0'; p++) -! if (isascii(ch) && isupper(ch)) -! *p = tolower(ch); - } - - return (dst - odst); ---- 86,93 ---- - int ch; - - for (p = odst; (ch = *p) != '\0'; p++) -! if (isascii((unsigned char)ch) && isupper((unsigned char)ch)) -! *p = tolower((unsigned char)ch); - } - - return (dst - odst); -*************** -*** 103,111 **** - digits = 0; - dirty = 0; - while ((ch = *src++) != '\0') { -! if (!isascii(ch) || !isprint(ch)) - goto einval; -! if (isdigit(ch)) { - tmp *= 10; - tmp += (ch - '0'); - digits++; ---- 103,111 ---- - digits = 0; - dirty = 0; - while ((ch = *src++) != '\0') { -! if (!isascii((unsigned char)ch) || !isprint((unsigned char)ch)) - goto einval; -! if (isdigit((unsigned char)ch)) { - tmp *= 10; - tmp += (ch - '0'); - digits++; -*************** -*** 113,120 **** - } - if (digits == 0) - goto einval; -! if (islower(ch)) -! ch = toupper(ch); - switch (ch) { - case 'W': tmp *= 7; - case 'D': tmp *= 24; ---- 113,120 ---- - } - if (digits == 0) - goto einval; -! if (islower((unsigned char)ch)) -! ch = toupper((unsigned char)ch); - switch (ch) { - case 'W': tmp *= 7; - case 'D': tmp *= 24; -Index: src/lib/resolv/res_comp.c -diff -c mdn/othersrc/bind8/src/lib/resolv/res_comp.c:1.1.1.1 mdn/othersrc/bind8/src/lib/resolv/res_comp.c:1.2 -*** src/lib/resolv/res_comp.c Wed May 24 15:35:21 2000 ---- src/lib/resolv/res_comp.c Wed May 24 17:16:22 2000 -*************** -*** 144,156 **** ---- 144,164 ---- - #define bslashchar(c) ((c) == 0x5c) - #define periodchar(c) ((c) == PERIOD) - #define asterchar(c) ((c) == 0x2a) -+ #ifdef NO_8BIT_THRU - #define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \ - || ((c) >= 0x61 && (c) <= 0x7a)) -+ #else -+ #define alphachar(c) (1) -+ #endif - #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) - - #define borderchar(c) (alphachar(c) || digitchar(c)) - #define middlechar(c) (borderchar(c) || hyphenchar(c)) -+ #ifdef NO_8BIT_THRU - #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) -+ #else -+ #define domainchar(c) (1) -+ #endif - - int - res_hnok(const char *dn) { -Index: src/lib/resolv/res_debug.c -diff -c mdn/othersrc/bind8/src/lib/resolv/res_debug.c:1.1.1.3 mdn/othersrc/bind8/src/lib/resolv/res_debug.c:1.4 -*** src/lib/resolv/res_debug.c Mon Dec 25 13:49:09 2000 ---- src/lib/resolv/res_debug.c Tue Dec 26 14:07:25 2000 -*************** -*** 647,660 **** - - cp = *strptr; - -! while (isdigit(*cp)) - mval = mval * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* centimeters */ - cp++; -! if (isdigit(*cp)) { - cmval = (*cp++ - '0') * 10; -! if (isdigit(*cp)) { - cmval += (*cp++ - '0'); - } - } ---- 647,660 ---- - - cp = *strptr; - -! while (isdigit((unsigned char)*cp)) - mval = mval * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* centimeters */ - cp++; -! if (isdigit((unsigned char)*cp)) { - cmval = (*cp++ - '0') * 10; -! if (isdigit((unsigned char)*cp)) { - cmval += (*cp++ - '0'); - } - } -*************** -*** 688,731 **** - - cp = *latlonstrptr; - -! while (isdigit(*cp)) - deg = deg * 10 + (*cp++ - '0'); - -! while (isspace(*cp)) - cp++; - -! if (!(isdigit(*cp))) - goto fndhemi; - -! while (isdigit(*cp)) - min = min * 10 + (*cp++ - '0'); - -! while (isspace(*cp)) - cp++; - -! if (!(isdigit(*cp))) - goto fndhemi; - -! while (isdigit(*cp)) - secs = secs * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* decimal seconds */ - cp++; -! if (isdigit(*cp)) { - secsfrac = (*cp++ - '0') * 100; -! if (isdigit(*cp)) { - secsfrac += (*cp++ - '0') * 10; -! if (isdigit(*cp)) { - secsfrac += (*cp++ - '0'); - } - } - } - } - -! while (!isspace(*cp)) /* if any trailing garbage */ - cp++; - -! while (isspace(*cp)) - cp++; - - fndhemi: ---- 688,731 ---- - - cp = *latlonstrptr; - -! while (isdigit((unsigned char)*cp)) - deg = deg * 10 + (*cp++ - '0'); - -! while (isspace((unsigned char)*cp)) - cp++; - -! if (!(isdigit((unsigned char)*cp))) - goto fndhemi; - -! while (isdigit((unsigned char)*cp)) - min = min * 10 + (*cp++ - '0'); - -! while (isspace((unsigned char)*cp)) - cp++; - -! if (!(isdigit((unsigned char)*cp))) - goto fndhemi; - -! while (isdigit((unsigned char)*cp)) - secs = secs * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* decimal seconds */ - cp++; -! if (isdigit((unsigned char)*cp)) { - secsfrac = (*cp++ - '0') * 100; -! if (isdigit((unsigned char)*cp)) { - secsfrac += (*cp++ - '0') * 10; -! if (isdigit((unsigned char)*cp)) { - secsfrac += (*cp++ - '0'); - } - } - } - } - -! while (!isspace((unsigned char)*cp)) /* if any trailing garbage */ - cp++; - -! while (isspace((unsigned char)*cp)) - cp++; - - fndhemi: -*************** -*** 763,772 **** - - cp++; /* skip the hemisphere */ - -! while (!isspace(*cp)) /* if any trailing garbage */ - cp++; - -! while (isspace(*cp)) /* move to next field */ - cp++; - - *latlonstrptr = cp; ---- 763,772 ---- - - cp++; /* skip the hemisphere */ - -! while (!isspace((unsigned char)*cp)) /* if any trailing garbage */ - cp++; - -! while (isspace((unsigned char)*cp)) /* move to next field */ - cp++; - - *latlonstrptr = cp; -*************** -*** 824,837 **** - if (*cp == '+') - cp++; - -! while (isdigit(*cp)) - altmeters = altmeters * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* decimal meters */ - cp++; -! if (isdigit(*cp)) { - altfrac = (*cp++ - '0') * 10; -! if (isdigit(*cp)) { - altfrac += (*cp++ - '0'); - } - } ---- 824,837 ---- - if (*cp == '+') - cp++; - -! while (isdigit((unsigned char)*cp)) - altmeters = altmeters * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* decimal meters */ - cp++; -! if (isdigit((unsigned char)*cp)) { - altfrac = (*cp++ - '0') * 10; -! if (isdigit((unsigned char)*cp)) { - altfrac += (*cp++ - '0'); - } - } -*************** -*** 839,848 **** - - alt = (10000000 + (altsign * (altmeters * 100 + altfrac))); - -! while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace(*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) ---- 839,848 ---- - - alt = (10000000 + (altsign * (altmeters * 100 + altfrac))); - -! while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace((unsigned char)*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) -*************** -*** 850,859 **** - - siz = precsize_aton(&cp); - -! while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace(*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) ---- 850,859 ---- - - siz = precsize_aton(&cp); - -! while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace((unsigned char)*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) -*************** -*** 861,870 **** - - hp = precsize_aton(&cp); - -! while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace(*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) ---- 861,870 ---- - - hp = precsize_aton(&cp); - -! while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ - cp++; - -! while (isspace((unsigned char)*cp) && (cp < maxcp)) - cp++; - - if (cp >= maxcp) -Index: src/lib/resolv/res_init.c -diff -c mdn/othersrc/bind8/src/lib/resolv/res_init.c:1.1.1.3 mdn/othersrc/bind8/src/lib/resolv/res_init.c:1.4 -*** src/lib/resolv/res_init.c Mon Dec 25 13:49:09 2000 ---- src/lib/resolv/res_init.c Tue Dec 26 14:07:25 2000 -*************** -*** 307,313 **** - break; - net = cp; - while (*cp && !ISSORTMASK(*cp) && *cp != ';' && -! isascii(*cp) && !isspace(*cp)) - cp++; - n = *cp; - *cp = 0; ---- 307,313 ---- - break; - net = cp; - while (*cp && !ISSORTMASK(*cp) && *cp != ';' && -! isascii((unsigned char)*cp) && !isspace((unsigned char)*cp)) - cp++; - n = *cp; - *cp = 0; -*************** -*** 317,323 **** - *cp++ = n; - net = cp; - while (*cp && *cp != ';' && -! isascii(*cp) && !isspace(*cp)) - cp++; - n = *cp; - *cp = 0; ---- 317,323 ---- - *cp++ = n; - net = cp; - while (*cp && *cp != ';' && -! isascii((unsigned char)*cp) && !isspace((unsigned char)*cp)) - cp++; - n = *cp; - *cp = 0; -Index: src/lib/resolv/res_query.c -diff -c mdn/othersrc/bind8/src/lib/resolv/res_query.c:1.1.1.2 mdn/othersrc/bind8/src/lib/resolv/res_query.c:1.3 -*** src/lib/resolv/res_query.c Fri Sep 8 13:25:29 2000 ---- src/lib/resolv/res_query.c Fri Sep 8 14:21:56 2000 -*************** -*** 383,399 **** - setbuf(fp, NULL); - buf[sizeof(buf) - 1] = '\0'; - while (fgets(buf, sizeof(buf), fp)) { -! for (cp1 = buf; *cp1 && !isspace(*cp1); ++cp1) - ; - if (!*cp1) - break; - *cp1 = '\0'; - if (ns_samename(buf, name) == 1) { -! while (isspace(*++cp1)) - ; - if (!*cp1) - break; -! for (cp2 = cp1 + 1; *cp2 && !isspace(*cp2); ++cp2) - ; - *cp2 = '\0'; - strncpy(dst, cp1, siz - 1); ---- 383,399 ---- - setbuf(fp, NULL); - buf[sizeof(buf) - 1] = '\0'; - while (fgets(buf, sizeof(buf), fp)) { -! for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1) - ; - if (!*cp1) - break; - *cp1 = '\0'; - if (ns_samename(buf, name) == 1) { -! while (isspace((unsigned char)*++cp1)) - ; - if (!*cp1) - break; -! for (cp2 = cp1 + 1; *cp2 && !isspace((unsigned char)*cp2); ++cp2) - ; - *cp2 = '\0'; - strncpy(dst, cp1, siz - 1); diff --git a/contrib/idn/mdnkit/patch/bind9/bind-9.1.3-patch b/contrib/idn/mdnkit/patch/bind9/bind-9.1.3-patch deleted file mode 100644 index e1e8a4c9cb..0000000000 --- a/contrib/idn/mdnkit/patch/bind9/bind-9.1.3-patch +++ /dev/null @@ -1,4442 +0,0 @@ -MDN patch for bind-9.1.3 -======================== - -This is a patch file for ISC BIND 9.1.3 to make it work with -internationalized/multilingual domain names. With this patch you'll -get MDN-aware dig/host/nslookup. - -To apply this patch, you should go to the top directory of the BIND -distribution (where you see `README' file), then invoke `patch' -command like this: - - % patch -p0 < this-file - -Then follow the instructions described in `README.mdnkit' to compile -and install. - - -Index: README.mdnkit -diff -c /dev/null mdn/othersrc/bind9/README.mdnkit:1.9 -*** README.mdnkit Mon Aug 27 19:18:29 2001 ---- README.mdnkit Wed Aug 22 15:19:31 2001 -*************** -*** 0 **** ---- 1,124 ---- -+ -+ BIND-9 MDN patch -+ -+ Japan Network Information Center (JPNIC) -+ -+ -+ * What is this patch for? -+ -+ This patch adds multilingual domain name (MDN) support to BIND-9. -+ You'll get multilingualized version of dig/host/nslookup commands. -+ -+ + mulltilingualized dig/host/nslookup -+ dig/host/nslookup accepts non-ASCII domain names in the local -+ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by -+ the locale information. The domain names are normalized and -+ converted to the encoding on the DNS protocol, and sent to DNS -+ servers. The replies are converted back to the local codeset -+ and displayed. -+ -+ -+ * Compilation & installation -+ -+ 0. Prerequisite -+ -+ You have to build and install mDNkit before building this patched version -+ of bind-9. -+ -+ 1. Running configure script -+ -+ Run `configure' in the top directory. See `README' for the -+ configuration options. -+ -+ This patch adds the following 4 options to `configure'. You should -+ at least specify `--with-mdn' option to enable MDN support. -+ -+ --with-mdn[=MDN_PREFIX] -+ To enable MDN support, you have to specify `--with-mdn' option. -+ The argument MDN_PREFIX is the install prefix of mDNkit. If -+ MDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') -+ is assumed. -+ -+ --with-libiconv[=LIBICONV_PREFIX] -+ Specify this option if mDNkit you have installed links GNU -+ libiconv. The argument LIBICONV_PREFIX is install prefix of -+ GNU libiconv. If the argument is omitted, PREFIX (derived -+ from `--prefix=PREFIX') is assumed. -+ -+ `--with-libiconv' is shorthand option for GNU libiconv. -+ -+ --with-libiconv=/usr/local -+ -+ This is equivalent to: -+ -+ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' -+ -+ `--with-libiconv' assumes that your C compiler has `-R' -+ option, and that the option adds the specified run-time path -+ to an exacutable binary. If `-R' option of your compiler has -+ different meaning, or your compiler lacks the option, you -+ should use `--with-iconv' option instead. Binary command -+ without run-time path information might be unexecutable. -+ In that case, you would see an error message like: -+ -+ error in loading shared libraries: libiconv.so.2: cannot -+ open shared object file -+ -+ If both `--with-libiconv' and `--with-iconv' options are -+ specified, `--with-iconv' is prior to `--with-libiconv'. -+ -+ --with-iconv=ICONV_LIBSPEC -+ If your libc doens't provide iconv(), you need to specify the -+ library containing iconv() with this option. `ICONV_LIBSPEC' -+ is the argument(s) to `cc' or `ld' to link the library, for -+ example, `--with-iconv="-L/usr/local/lib -liconv"'. -+ You don't need to specify the header file directory for "iconv.h" -+ to the compiler, as it isn't included directly by bind-9 with -+ this patch. -+ -+ --with-mdnlib=MDN_LIBSPEC -+ With this option, you can explicitly specify the argument(s) -+ to `cc' or `ld' to link the mDNkit's library, `libmdn'. If -+ this option is not specified, `-L${PREFIX}/lib -lmdn' is -+ assumed, where ${PREFIX} is the installation prefix specified -+ with `--with-mdn' option above. You may need to use this -+ option to specify extra argments, for example, -+ `--with-mdnlib="-L/usr/local/lib -R/usr/local/lib -lmdn"'. -+ -+ Please consult `README' for other configuration options. -+ -+ Note that if you want to specify some extra header file directories, -+ you should use the environment variable STD_CINCLUDES instead of -+ CFLAGS, as described in README. -+ -+ 2. Compilation and installation -+ -+ After running "configure", just do -+ -+ make -+ make install -+ -+ for compiling and installing. -+ -+ 3. Resolver configuration -+ -+ To handle multilingual domain names, you have to specify the -+ properties like: -+ + name encoding used in DNS protocol data -+ + normalization (NAMEPREP) schemes -+ These properties are specified by the mDNkit's configuration file, -+ "mdn.conf". You have to create and set up the file properly. The -+ pathname of the file and contents are described in the manual -+ "mdn.conf". -+ -+ -+ * Contact information -+ -+ Please see http//www.nic.ad.jp/jp/research/idn/ for the latest news -+ about mDNkit and this patch. -+ -+ Bug reports and comments on this kit should be sent to -+ mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -+ -+ -+ ; $Id: bind-9.1.3-patch,v 1.1 2002/02/08 05:41:25 marka Exp $ -Index: config.h.in -diff -c mdn/othersrc/bind9/config.h.in:1.1.1.5 mdn/othersrc/bind9/config.h.in:1.9 -*** config.h.in Tue Apr 17 14:17:01 2001 ---- config.h.in Thu Jul 26 16:44:20 2001 -*************** -*** 16,22 **** - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -! /* $Id: bind-9.1.3-patch,v 1.1 2002/02/08 05:41:25 marka Exp $ */ - - /*** - *** This file is not to be included by any public header files, because ---- 16,22 ---- - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -! /* $Id: bind-9.1.3-patch,v 1.1 2002/02/08 05:41:25 marka Exp $ */ - - /*** - *** This file is not to be included by any public header files, because -*************** -*** 132,137 **** ---- 132,140 ---- - /* define if pthread_attr_getstacksize() is available */ - #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE - -+ /* Define if you have the setlocale function. */ -+ #undef HAVE_SETLOCALE -+ - /* Define if you have the header file. */ - #undef HAVE_FCNTL_H - -*************** -*** 141,146 **** ---- 144,155 ---- - /* Define if you have the header file. */ - #undef HAVE_LINUX_PRCTL_H - -+ /* Define if you have the header file. */ -+ #undef HAVE_LOCALE_H -+ -+ /* Define if you have the header file. */ -+ #undef HAVE_SYS_SELECT_H -+ - /* Define if you have the header file. */ - #undef HAVE_SYS_SOCKIO_H - -*************** -*** 158,160 **** ---- 167,173 ---- - - /* Define if you have the socket library (-lsocket). */ - #undef HAVE_LIBSOCKET -+ -+ /* define if mDNkit support is to be included. */ -+ #undef WITH_MDN -+ -Index: configure -diff -c mdn/othersrc/bind9/configure:1.1.1.7 mdn/othersrc/bind9/configure:1.10 -*** configure Thu Jul 26 15:43:19 2001 ---- configure Thu Jul 26 16:44:20 2001 -*************** -*** 15,21 **** - # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -! # From configure.in Revision: 1.205.2.8 - - ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- - ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. ---- 15,21 ---- - # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -! # From configure.in Revision: 1.205.2.9 - - ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- - ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. -*************** -*** 153,158 **** ---- 153,166 ---- - --enable-ipv6 use IPv6 [default=autodetect]" - ac_help="$ac_help - --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]" -+ ac_help="$ac_help -+ --with-mdn[=MPREFIX] enable MDN support using mDNkit [default PREFIX]" -+ ac_help="$ac_help -+ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]" -+ ac_help="$ac_help -+ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]" -+ ac_help="$ac_help -+ --with-mdnlib=ARG specify libmdn" - - # Initialize some variables set by options. - # The variables have the same names as the options, with -*************** -*** 693,699 **** - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 -! echo "configure:697: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in ---- 701,707 ---- - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 -! echo "configure:705: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in -*************** -*** 715,721 **** - - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -! echo "configure:719: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 723,729 ---- - - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -! echo "configure:727: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 744,750 **** - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:748: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 752,758 ---- - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:756: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 783,789 **** - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -! echo "configure:787: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 791,797 ---- - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -! echo "configure:795: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 844,850 **** - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:848: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 852,858 ---- - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:856: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 900,906 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:904: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 908,914 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:912: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 945,951 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:949: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 953,959 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:957: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1093,1099 **** - # was --with-openssl specified? - # - echo $ac_n "checking for compatible OpenSSL library""... $ac_c" 1>&6 -! echo "configure:1097: checking for compatible OpenSSL library" >&5 - # Check whether --with-openssl or --without-openssl was given. - if test "${with_openssl+set}" = set; then - withval="$with_openssl" ---- 1101,1107 ---- - # was --with-openssl specified? - # - echo $ac_n "checking for compatible OpenSSL library""... $ac_c" 1>&6 -! echo "configure:1105: checking for compatible OpenSSL library" >&5 - # Check whether --with-openssl or --without-openssl was given. - if test "${with_openssl+set}" = set; then - withval="$with_openssl" -*************** -*** 1184,1190 **** - # was --with-randomdev specified? - # - echo $ac_n "checking for random device""... $ac_c" 1>&6 -! echo "configure:1188: checking for random device" >&5 - # Check whether --with-randomdev or --without-randomdev was given. - if test "${with_randomdev+set}" = set; then - withval="$with_randomdev" ---- 1192,1198 ---- - # was --with-randomdev specified? - # - echo $ac_n "checking for random device""... $ac_c" 1>&6 -! echo "configure:1196: checking for random device" >&5 - # Check whether --with-randomdev or --without-randomdev was given. - if test "${with_randomdev+set}" = set; then - withval="$with_randomdev" -*************** -*** 1231,1237 **** - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1235: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1239,1245 ---- - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1243: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1261,1267 **** - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1265: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1269,1275 ---- - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1273: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1312,1318 **** - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1316: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1320,1326 ---- - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1324: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1344,1350 **** - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -! echo "configure:1348: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ---- 1352,1358 ---- - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -! echo "configure:1356: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -*************** -*** 1355,1366 **** - - cat > conftest.$ac_ext << EOF - -! #line 1359 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF -! if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then ---- 1363,1374 ---- - - cat > conftest.$ac_ext << EOF - -! #line 1367 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF -! if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -*************** -*** 1386,1397 **** - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -! echo "configure:1390: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -! echo "configure:1395: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1394,1405 ---- - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -! echo "configure:1398: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -! echo "configure:1403: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1400,1406 **** - yes; - #endif - EOF -! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no ---- 1408,1414 ---- - yes; - #endif - EOF -! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no -*************** -*** 1419,1425 **** - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -! echo "configure:1423: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1427,1433 ---- - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -! echo "configure:1431: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1455,1461 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1459: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1463,1469 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1467: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1490,1503 **** - # Find the machine's endian flavor. - # - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -! echo "configure:1494: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include ---- 1498,1511 ---- - # Find the machine's endian flavor. - # - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -! echo "configure:1502: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include -*************** -*** 1508,1518 **** - #endif - ; return 0; } - EOF -! if { (eval echo configure:1512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include ---- 1516,1526 ---- - #endif - ; return 0; } - EOF -! if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include -*************** -*** 1523,1529 **** - #endif - ; return 0; } - EOF -! if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else ---- 1531,1537 ---- - #endif - ; return 0; } - EOF -! if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else -*************** -*** 1543,1549 **** - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian=no - else ---- 1564,1570 ---- - exit (u.c[sizeof (long) - 1] == 1); - } - EOF -! if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian=no - else -*************** -*** 1581,1587 **** - - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -! echo "configure:1585: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= ---- 1589,1595 ---- - - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -! echo "configure:1593: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= -*************** -*** 1596,1608 **** - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1604,1616 ---- - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1613,1625 **** - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1621,1633 ---- - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1630,1642 **** - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1638,1650 ---- - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1661,1672 **** - echo "$ac_t""$CPP" 1>&6 - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -! echo "configure:1665: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include ---- 1669,1680 ---- - echo "$ac_t""$CPP" 1>&6 - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -! echo "configure:1673: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -*************** -*** 1674,1680 **** - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 1682,1688 ---- - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 1691,1697 **** - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF ---- 1699,1705 ---- - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -*************** -*** 1709,1715 **** - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF ---- 1717,1723 ---- - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -*************** -*** 1730,1736 **** - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ---- 1738,1744 ---- - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -*************** -*** 1741,1747 **** - exit (0); } - - EOF -! if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else ---- 1749,1755 ---- - exit (0); } - - EOF -! if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -*************** -*** 1769,1785 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:1773: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 1777,1793 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:1781: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 1807,1818 **** - - - echo $ac_n "checking for working const""... $ac_c" 1>&6 -! echo "configure:1811: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:1819: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else ---- 1869,1875 ---- - - ; return 0; } - EOF -! if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -*************** -*** 1882,1902 **** - fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 -! echo "configure:1886: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else ---- 1890,1910 ---- - fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 -! echo "configure:1894: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else -*************** -*** 1922,1933 **** - esac - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 -! echo "configure:1926: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS ---- 1930,1941 ---- - esac - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 -! echo "configure:1934: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -*************** -*** 1955,1966 **** - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -! echo "configure:1959: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include ---- 1963,1974 ---- - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -! echo "configure:1967: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -*************** -*** 1969,1975 **** - struct tm *tp; - ; return 0; } - EOF -! if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else ---- 1977,1983 ---- - struct tm *tp; - ; return 0; } - EOF -! if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -*************** -*** 1996,2004 **** - case $ac_cv_header_unistd_h in - yes) - echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 -! echo "configure:2000: checking if unistd.h defines fd_set" >&5 - cat > conftest.$ac_ext < ---- 2004,2012 ---- - case $ac_cv_header_unistd_h in - yes) - echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 -! echo "configure:2008: checking if unistd.h defines fd_set" >&5 - cat > conftest.$ac_ext < -*************** -*** 2006,2012 **** - fd_set read_set; return (0); - ; return 0; } - EOF -! if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" ---- 2014,2020 ---- - fd_set read_set; return (0); - ; return 0; } - EOF -! if { (eval echo configure:2018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" -*************** -*** 2049,2055 **** - # First, decide whether to use multithreading or not. - # - echo $ac_n "checking whether to look for thread support""... $ac_c" 1>&6 -! echo "configure:2053: checking whether to look for thread support" >&5 - # Check whether --enable-threads or --disable-threads was given. - if test "${enable_threads+set}" = set; then - enableval="$enable_threads" ---- 2057,2063 ---- - # First, decide whether to use multithreading or not. - # - echo $ac_n "checking whether to look for thread support""... $ac_c" 1>&6 -! echo "configure:2061: checking whether to look for thread support" >&5 - # Check whether --enable-threads or --disable-threads was given. - if test "${enable_threads+set}" = set; then - enableval="$enable_threads" -*************** -*** 2086,2092 **** - # experiment with it. - CC="gcc" - echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -! echo "configure:2090: checking which NetBSD thread library to use" >&5 - - # Check whether --with-ptl2 or --without-ptl2 was given. - if test "${with_ptl2+set}" = set; then ---- 2094,2100 ---- - # experiment with it. - CC="gcc" - echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -! echo "configure:2098: checking which NetBSD thread library to use" >&5 - - # Check whether --with-ptl2 or --without-ptl2 was given. - if test "${with_ptl2+set}" = set; then -*************** -*** 2125,2131 **** - ;; - *) - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2129: checking for pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2133,2139 ---- - ;; - *) - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2137: checking for pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2133,2139 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2152,2158 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2170,2176 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2174: checking for __pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2178,2184 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2182: checking for __pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2178,2184 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2197,2203 ---- - __pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2215,2221 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -! echo "configure:2219: checking for __pthread_create_system in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2223,2229 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -! echo "configure:2227: checking for __pthread_create_system in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2223,2229 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2242,2248 ---- - __pthread_create_system() - ; return 0; } - EOF -! if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2260,2266 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -! echo "configure:2264: checking for pthread_create in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2268,2274 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -! echo "configure:2272: checking for pthread_create in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2268,2274 **** - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2287,2293 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2305,2311 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -! echo "configure:2309: checking for pthread_create in -lc" >&5 - ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2313,2319 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -! echo "configure:2317: checking for pthread_create in -lc" >&5 - ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2313,2319 **** - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2332,2338 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2370,2376 **** - # We'd like to use sigwait() too - # - echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -! echo "configure:2374: checking for sigwait in -lc" >&5 - ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2378,2384 ---- - # We'd like to use sigwait() too - # - echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -! echo "configure:2382: checking for sigwait in -lc" >&5 - ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2378,2384 **** - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2397,2403 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2411,2417 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2415: checking for sigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2419,2425 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2423: checking for sigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2419,2425 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2438,2444 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2452,2458 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2456: checking for _Psigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2460,2466 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2464: checking for _Psigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2460,2466 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2479,2485 ---- - _Psigwait() - ; return 0; } - EOF -! if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2501,2512 **** - - - echo $ac_n "checking for pthread_attr_getstacksize""... $ac_c" 1>&6 -! echo "configure:2505: checking for pthread_attr_getstacksize" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2513: checking for pthread_attr_getstacksize" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_attr_getstacksize=yes" - else ---- 2537,2543 ---- - - ; return 0; } - EOF -! if { (eval echo configure:2541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_attr_getstacksize=yes" - else -*************** -*** 2561,2567 **** - # - *-freebsd*) - echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -! echo "configure:2565: checking for sigwait in -lc_r" >&5 - ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2569,2575 ---- - # - *-freebsd*) - echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -! echo "configure:2573: checking for sigwait in -lc_r" >&5 - ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2569,2575 **** - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2588,2594 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2635,2646 **** - EOF - - echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 -! echo "configure:2639: checking for pthread_setconcurrency" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2647: checking for pthread_setconcurrency" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_setconcurrency=yes" - else ---- 2671,2677 ---- - - ; return 0; } - EOF -! if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_setconcurrency=yes" - else -*************** -*** 2701,2712 **** - # Look for sysconf to allow detection of the number of processors. - # - echo $ac_n "checking for sysconf""... $ac_c" 1>&6 -! echo "configure:2705: checking for sysconf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2713: checking for sysconf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysconf=yes" - else ---- 2737,2743 ---- - - ; return 0; } - EOF -! if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysconf=yes" - else -*************** -*** 2806,2817 **** - # even if compiled with --disable-threads. - # - echo $ac_n "checking for flockfile""... $ac_c" 1>&6 -! echo "configure:2810: checking for flockfile" >&5 - if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2818: checking for flockfile" >&5 - if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_flockfile=yes" - else ---- 2842,2848 ---- - - ; return 0; } - EOF -! if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_flockfile=yes" - else -*************** -*** 2861,2867 **** - # Indicate what the final decision was regarding threads. - # - echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 -! echo "configure:2865: checking whether to build with threads" >&5 - if $use_threads; then - echo "$ac_t""yes" 1>&6 - else ---- 2869,2875 ---- - # Indicate what the final decision was regarding threads. - # - echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 -! echo "configure:2873: checking whether to build with threads" >&5 - if $use_threads; then - echo "$ac_t""yes" 1>&6 - else -*************** -*** 2937,2948 **** - # NLS - # - echo $ac_n "checking for catgets""... $ac_c" 1>&6 -! echo "configure:2941: checking for catgets" >&5 - if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2949: checking for catgets" >&5 - if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_catgets=yes" - else ---- 2973,2979 ---- - - ; return 0; } - EOF -! if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_catgets=yes" - else -*************** -*** 3003,3009 **** - ;; - *) - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -! echo "configure:3007: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3011,3017 ---- - ;; - *) - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -! echo "configure:3015: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3011,3017 **** - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 3030,3036 ---- - socket() - ; return 0; } - EOF -! if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 3050,3056 **** - fi - - echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -! echo "configure:3054: checking for inet_ntoa in -lnsl" >&5 - ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3058,3064 ---- - fi - - echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -! echo "configure:3062: checking for inet_ntoa in -lnsl" >&5 - ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3058,3064 **** - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 3077,3083 ---- - inet_ntoa() - ; return 0; } - EOF -! if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 3184,3190 **** - fi - - echo $ac_n "checking build system type""... $ac_c" 1>&6 -! echo "configure:3188: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in ---- 3192,3198 ---- - fi - - echo $ac_n "checking build system type""... $ac_c" 1>&6 -! echo "configure:3196: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in -*************** -*** 3213,3219 **** - if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -! echo "configure:3217: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. ---- 3221,3227 ---- - if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -! echo "configure:3225: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -*************** -*** 3237,3246 **** - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -! echo "configure:3241: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -! echo "configure:3244: checking for non-GNU ld" >&5 - fi - if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3245,3254 ---- - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -! echo "configure:3249: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -! echo "configure:3252: checking for non-GNU ld" >&5 - fi - if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3275,3281 **** - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -! echo "configure:3279: checking if the linker ($LD) is GNU ld" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3283,3289 ---- - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -! echo "configure:3287: checking if the linker ($LD) is GNU ld" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3291,3297 **** - - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -! echo "configure:3295: checking for BSD-compatible nm" >&5 - if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3299,3305 ---- - - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -! echo "configure:3303: checking for BSD-compatible nm" >&5 - if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3327,3333 **** - echo "$ac_t""$NM" 1>&6 - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -! echo "configure:3331: checking whether ln -s works" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3335,3341 ---- - echo "$ac_t""$NM" 1>&6 - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -! echo "configure:3339: checking whether ln -s works" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3376,3383 **** - case "$lt_target" in - *-*-irix6*) - # Find out which ABI we are using. -! echo '#line 3380 "configure"' > conftest.$ac_ext -! if { (eval echo configure:3381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" ---- 3384,3391 ---- - case "$lt_target" in - *-*-irix6*) - # Find out which ABI we are using. -! echo '#line 3388 "configure"' > conftest.$ac_ext -! if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" -*************** -*** 3398,3416 **** - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -! echo "configure:3402: checking whether the C compiler needs -belf" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes - else ---- 3406,3424 ---- - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -! echo "configure:3410: checking whether the C compiler needs -belf" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes - else -*************** -*** 3561,3569 **** - # the right suffix on the files. - # - echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -! echo "configure:3565: checking for IPv6 structures" >&5 - cat > conftest.$ac_ext < ---- 3569,3577 ---- - # the right suffix on the files. - # - echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -! echo "configure:3573: checking for IPv6 structures" >&5 - cat > conftest.$ac_ext < -*************** -*** 3573,3579 **** - struct sockaddr_in6 sin6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - found_ipv6=yes ---- 3581,3587 ---- - struct sockaddr_in6 sin6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - found_ipv6=yes -*************** -*** 3591,3597 **** - # This is done before other IPv6 linking tests to LIBS is properly set. - # - echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 -! echo "configure:3595: checking for Kame IPv6 support" >&5 - # Check whether --with-kame or --without-kame was given. - if test "${with_kame+set}" = set; then - withval="$with_kame" ---- 3599,3605 ---- - # This is done before other IPv6 linking tests to LIBS is properly set. - # - echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 -! echo "configure:3603: checking for Kame IPv6 support" >&5 - # Check whether --with-kame or --without-kame was given. - if test "${with_kame+set}" = set; then - withval="$with_kame" -*************** -*** 3681,3689 **** - LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" - - echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 -! echo "configure:3685: checking for in6_addr" >&5 - cat > conftest.$ac_ext < ---- 3689,3697 ---- - LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" - - echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 -! echo "configure:3693: checking for in6_addr" >&5 - cat > conftest.$ac_ext < -*************** -*** 3696,3702 **** - struct in6_addr in6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" ---- 3704,3710 ---- - struct in6_addr in6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" -*************** -*** 3714,3722 **** - rm -f conftest* - - echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 -! echo "configure:3718: checking for in6addr_any" >&5 - cat > conftest.$ac_ext < ---- 3722,3730 ---- - rm -f conftest* - - echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 -! echo "configure:3726: checking for in6addr_any" >&5 - cat > conftest.$ac_ext < -*************** -*** 3730,3736 **** - struct in6_addr in6; in6 = in6addr_any; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" ---- 3738,3744 ---- - struct in6_addr in6; in6 = in6addr_any; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" -*************** -*** 3746,3754 **** - rm -f conftest* - - echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -! echo "configure:3750: checking for sin6_scope_id in struct sockaddr_in6" >&5 - cat > conftest.$ac_ext < ---- 3754,3762 ---- - rm -f conftest* - - echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -! echo "configure:3758: checking for sin6_scope_id in struct sockaddr_in6" >&5 - cat > conftest.$ac_ext < -*************** -*** 3761,3767 **** - struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" ---- 3769,3775 ---- - struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" -*************** -*** 3776,3784 **** - LWRES_HAVE_SIN6_SCOPE_ID="$result" - - echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -! echo "configure:3780: checking for in6_pktinfo" >&5 - cat > conftest.$ac_ext < ---- 3784,3792 ---- - LWRES_HAVE_SIN6_SCOPE_ID="$result" - - echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -! echo "configure:3788: checking for in6_pktinfo" >&5 - cat > conftest.$ac_ext < -*************** -*** 3791,3797 **** - struct in6_pktinfo xyzzy; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" ---- 3799,3805 ---- - struct in6_pktinfo xyzzy; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" -*************** -*** 3843,3851 **** - # which provides some (all?) of the desired functions. - # - echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -! echo "configure:3847: checking for inet_ntop" >&5 - cat > conftest.$ac_ext < ---- 3851,3859 ---- - # which provides some (all?) of the desired functions. - # - echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -! echo "configure:3855: checking for inet_ntop" >&5 - cat > conftest.$ac_ext < -*************** -*** 3855,3861 **** - inet_ntop(0, 0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" ---- 3863,3869 ---- - inet_ntop(0, 0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" -*************** -*** 3870,3878 **** - fi - rm -f conftest* - echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -! echo "configure:3874: checking for inet_pton" >&5 - cat > conftest.$ac_ext < ---- 3878,3886 ---- - fi - rm -f conftest* - echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -! echo "configure:3882: checking for inet_pton" >&5 - cat > conftest.$ac_ext < -*************** -*** 3882,3888 **** - inet_pton(0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" ---- 3890,3896 ---- - inet_pton(0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" -*************** -*** 3897,3905 **** - fi - rm -f conftest* - echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -! echo "configure:3901: checking for inet_aton" >&5 - cat > conftest.$ac_ext < ---- 3905,3913 ---- - fi - rm -f conftest* - echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -! echo "configure:3909: checking for inet_aton" >&5 - cat > conftest.$ac_ext < -*************** -*** 3909,3915 **** - struct in_addr in; inet_aton(0, &in); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" ---- 3917,3923 ---- - struct in_addr in; inet_aton(0, &in); return (0); - ; return 0; } - EOF -! if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" -*************** -*** 3942,3950 **** - esac - - echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -! echo "configure:3946: checking for sa_len in struct sockaddr" >&5 - cat > conftest.$ac_ext < ---- 3950,3958 ---- - esac - - echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -! echo "configure:3954: checking for sa_len in struct sockaddr" >&5 - cat > conftest.$ac_ext < -*************** -*** 3953,3959 **** - struct sockaddr sa; sa.sa_len = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" ---- 3961,3967 ---- - struct sockaddr sa; sa.sa_len = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" -*************** -*** 3974,3982 **** - # Look for a 4.4BSD or 4.3BSD struct msghdr - # - echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 -! echo "configure:3978: checking for struct msghdr flavor" >&5 - cat > conftest.$ac_ext < ---- 3982,3990 ---- - # Look for a 4.4BSD or 4.3BSD struct msghdr - # - echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 -! echo "configure:3986: checking for struct msghdr flavor" >&5 - cat > conftest.$ac_ext < -*************** -*** 3985,3991 **** - struct msghdr msg; msg.msg_flags = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""4.4BSD" 1>&6 - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" ---- 3993,3999 ---- - struct msghdr msg; msg.msg_flags = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:3997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""4.4BSD" 1>&6 - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" -*************** -*** 4003,4011 **** - # Look for in_port_t. - # - echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -! echo "configure:4007: checking for type in_port_t" >&5 - cat > conftest.$ac_ext < ---- 4011,4019 ---- - # Look for in_port_t. - # - echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -! echo "configure:4015: checking for type in_port_t" >&5 - cat > conftest.$ac_ext < -*************** -*** 4014,4020 **** - in_port_t port = 25; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" ---- 4022,4028 ---- - in_port_t port = 25; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" -*************** -*** 4032,4040 **** - # Check for addrinfo - # - echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -! echo "configure:4036: checking for struct addrinfo" >&5 - cat > conftest.$ac_ext < ---- 4040,4048 ---- - # Check for addrinfo - # - echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -! echo "configure:4044: checking for struct addrinfo" >&5 - cat > conftest.$ac_ext < -*************** -*** 4042,4048 **** - struct addrinfo a; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" ---- 4050,4056 ---- - struct addrinfo a; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" -*************** -*** 4061,4069 **** - - - echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -! echo "configure:4065: checking for int sethostent" >&5 - cat > conftest.$ac_ext < ---- 4069,4077 ---- - - - echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -! echo "configure:4073: checking for int sethostent" >&5 - cat > conftest.$ac_ext < -*************** -*** 4071,4077 **** - int i = sethostent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" ---- 4079,4085 ---- - int i = sethostent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" -*************** -*** 4086,4094 **** - - - echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -! echo "configure:4090: checking for int endhostent" >&5 - cat > conftest.$ac_ext < ---- 4094,4102 ---- - - - echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -! echo "configure:4098: checking for int endhostent" >&5 - cat > conftest.$ac_ext < -*************** -*** 4096,4102 **** - int i = endhostent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" ---- 4104,4110 ---- - int i = endhostent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" -*************** -*** 4111,4119 **** - - - echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -! echo "configure:4115: checking for getnetbyaddr(in_addr_t, ...)" >&5 - cat > conftest.$ac_ext < ---- 4119,4127 ---- - - - echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -! echo "configure:4123: checking for getnetbyaddr(in_addr_t, ...)" >&5 - cat > conftest.$ac_ext < -*************** -*** 4122,4128 **** - - ; return 0; } - EOF -! if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" ---- 4130,4136 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" -*************** -*** 4137,4145 **** - - - echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -! echo "configure:4141: checking for int setnetent" >&5 - cat > conftest.$ac_ext < ---- 4145,4153 ---- - - - echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -! echo "configure:4149: checking for int setnetent" >&5 - cat > conftest.$ac_ext < -*************** -*** 4147,4153 **** - int i = setnetent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" ---- 4155,4161 ---- - int i = setnetent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" -*************** -*** 4162,4170 **** - - - echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -! echo "configure:4166: checking for int endnetent" >&5 - cat > conftest.$ac_ext < ---- 4170,4178 ---- - - - echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -! echo "configure:4174: checking for int endnetent" >&5 - cat > conftest.$ac_ext < -*************** -*** 4172,4178 **** - int i = endnetent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" ---- 4180,4186 ---- - int i = endnetent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" -*************** -*** 4187,4195 **** - - - echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 -! echo "configure:4191: checking for gethostbyaddr(const void *, size_t, ...)" >&5 - cat > conftest.$ac_ext < ---- 4195,4203 ---- - - - echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 -! echo "configure:4199: checking for gethostbyaddr(const void *, size_t, ...)" >&5 - cat > conftest.$ac_ext < -*************** -*** 4198,4204 **** - return(0); - ; return 0; } - EOF -! if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" ---- 4206,4212 ---- - return(0); - ; return 0; } - EOF -! if { (eval echo configure:4210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" -*************** -*** 4213,4221 **** - - - echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -! echo "configure:4217: checking for h_errno in netdb.h" >&5 - cat > conftest.$ac_ext < ---- 4221,4229 ---- - - - echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -! echo "configure:4225: checking for h_errno in netdb.h" >&5 - cat > conftest.$ac_ext < -*************** -*** 4223,4229 **** - h_errno = 1; return(0); - ; return 0; } - EOF -! if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" ---- 4231,4237 ---- - h_errno = 1; return(0); - ; return 0; } - EOF -! if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" -*************** -*** 4238,4249 **** - - - echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 -! echo "configure:4242: checking for getipnodebyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4250: checking for getipnodebyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getipnodebyname=yes" - else ---- 4274,4280 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getipnodebyname=yes" - else -*************** -*** 4287,4298 **** - fi - - echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 -! echo "configure:4291: checking for getnameinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4299: checking for getnameinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getnameinfo=yes" - else ---- 4323,4329 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getnameinfo=yes" - else -*************** -*** 4336,4347 **** - fi - - echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 -! echo "configure:4340: checking for getaddrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4348: checking for getaddrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getaddrinfo=yes" - else ---- 4372,4378 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getaddrinfo=yes" - else -*************** -*** 4389,4400 **** - fi - - echo $ac_n "checking for gai_strerror""... $ac_c" 1>&6 -! echo "configure:4393: checking for gai_strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4401: checking for gai_strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gai_strerror=yes" - else ---- 4425,4431 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gai_strerror=yes" - else -*************** -*** 4447,4455 **** - # Look for a sysctl call to get the list of network interfaces. - # - echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 -! echo "configure:4451: checking for interface list sysctl" >&5 - cat > conftest.$ac_ext < ---- 4455,4463 ---- - # Look for a sysctl call to get the list of network interfaces. - # - echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 -! echo "configure:4459: checking for interface list sysctl" >&5 - cat > conftest.$ac_ext < -*************** -*** 4479,4490 **** - # Check for some other useful functions that are not ever-present. - # - echo $ac_n "checking for strsep""... $ac_c" 1>&6 -! echo "configure:4483: checking for strsep" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strsep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4491: checking for strsep" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strsep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strsep=yes" - else ---- 4515,4521 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strsep=yes" - else -*************** -*** 4528,4539 **** - fi - - echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -! echo "configure:4532: checking for vsnprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4540: checking for vsnprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vsnprintf=yes" - else ---- 4564,4570 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vsnprintf=yes" - else -*************** -*** 4585,4601 **** - - - echo $ac_n "checking for sizeof(long long int) == sizeof(long int)""... $ac_c" 1>&6 -! echo "configure:4589: checking for sizeof(long long int) == sizeof(long int)" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""default yes" 1>&6 - ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" ---- 4593,4609 ---- - - - echo $ac_n "checking for sizeof(long long int) == sizeof(long int)""... $ac_c" 1>&6 -! echo "configure:4597: checking for sizeof(long long int) == sizeof(long int)" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""default yes" 1>&6 - ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_LONGLONGEQUALLONG="#define ISC_PLATFORM_LONGLONGEQUALLONG 1" -*************** -*** 4615,4626 **** - # Security Stuff - # - echo $ac_n "checking for chroot""... $ac_c" 1>&6 -! echo "configure:4619: checking for chroot" >&5 - if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:4627: checking for chroot" >&5 - if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_chroot=yes" - else ---- 4651,4657 ---- - - ; return 0; } - EOF -! if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_chroot=yes" - else -*************** -*** 4669,4685 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4673: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 4677,4693 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4681: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 4709,4725 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4713: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 4717,4733 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4721: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 4750,4758 **** - # BSD/OS, and perhaps some others, don't define rlim_t. - # - echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 -! echo "configure:4754: checking for type rlim_t" >&5 - cat > conftest.$ac_ext < ---- 4758,4766 ---- - # BSD/OS, and perhaps some others, don't define rlim_t. - # - echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 -! echo "configure:4762: checking for type rlim_t" >&5 - cat > conftest.$ac_ext < -*************** -*** 4762,4768 **** - rlim_t rl = 19671212; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF ---- 4770,4776 ---- - rlim_t rl = 19671212; return (0); - ; return 0; } - EOF -! if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -*************** -*** 4777,4788 **** - fi - rm -f conftest* - echo $ac_n "checking sizeof rlim_cur""... $ac_c" 1>&6 -! echo "configure:4781: checking sizeof rlim_cur" >&5 - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 4785,4796 ---- - fi - rm -f conftest* - echo $ac_n "checking sizeof rlim_cur""... $ac_c" 1>&6 -! echo "configure:4789: checking sizeof rlim_cur" >&5 - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 4790,4796 **** - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} - EOF -! if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" ---- 4798,4804 ---- - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} - EOF -! if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" -*************** -*** 4803,4809 **** - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 4811,4817 ---- - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 4811,4817 **** - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} - EOF -! if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" ---- 4819,4825 ---- - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} - EOF -! if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" -*************** -*** 4824,4830 **** - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 4832,4838 ---- - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 4832,4838 **** - #include - main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} - EOF -! if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" ---- 4840,4846 ---- - #include - main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} - EOF -! if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" -*************** -*** 4935,4941 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4939: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4943,4949 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4947: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4981,4987 **** - SGMLDIR="" - - echo $ac_n "checking for SGML files""... $ac_c" 1>&6 -! echo "configure:4985: checking for SGML files" >&5 - for d in /usr/pkg/share/sgml /usr/local/share/sgml - do - if test -f $d/docbook/dsssl/modular/html/docbook.dsl ---- 4989,4995 ---- - SGMLDIR="" - - echo $ac_n "checking for SGML files""... $ac_c" 1>&6 -! echo "configure:4993: checking for SGML files" >&5 - for d in /usr/pkg/share/sgml /usr/local/share/sgml - do - if test -f $d/docbook/dsssl/modular/html/docbook.dsl -*************** -*** 5007,5013 **** - XGMLDIR="" - - echo $ac_n "checking for XML files""... $ac_c" 1>&6 -! echo "configure:5011: checking for XML files" >&5 - for d in /usr/pkg/share/xml /usr/local/share/xml - do - if test -f $d/dtd/docbook/docbookx.dtd ---- 5015,5021 ---- - XGMLDIR="" - - echo $ac_n "checking for XML files""... $ac_c" 1>&6 -! echo "configure:5019: checking for XML files" >&5 - for d in /usr/pkg/share/xml /usr/local/share/xml - do - if test -f $d/dtd/docbook/docbookx.dtd -*************** -*** 5024,5029 **** ---- 5032,5224 ---- - XMLDIR=/usr/local/share/xml - fi - -+ -+ -+ # -+ # MDN support -+ # -+ # Check whether --with-mdn or --without-mdn was given. -+ if test "${with_mdn+set}" = set; then -+ withval="$with_mdn" -+ use_mdn="$withval" -+ else -+ use_mdn="no" -+ fi -+ -+ case "$use_mdn" in -+ yes) -+ if test X$prefix = XNONE ; then -+ mdn_path=/usr/local -+ else -+ mdn_path=$prefix -+ fi -+ ;; -+ no) -+ ;; -+ *) -+ mdn_path="$use_mdn" -+ ;; -+ esac -+ -+ iconvinc= -+ iconvlib= -+ # Check whether --with-libiconv or --without-libiconv was given. -+ if test "${with_libiconv+set}" = set; then -+ withval="$with_libiconv" -+ use_libiconv="$withval" -+ else -+ use_libiconv="no" -+ fi -+ -+ case "$use_libiconv" in -+ yes) -+ if test X$prefix = XNONE ; then -+ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" -+ else -+ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" -+ fi -+ ;; -+ no) -+ iconvlib= -+ ;; -+ *) -+ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" -+ ;; -+ esac -+ -+ # Check whether --with-iconv or --without-iconv was given. -+ if test "${with_iconv+set}" = set; then -+ withval="$with_iconv" -+ iconvlib="$withval" -+ fi -+ -+ case "$iconvlib" in -+ no) -+ iconvlib= -+ ;; -+ yes) -+ iconvlib=-liconv -+ ;; -+ esac -+ -+ # Check whether --with-mdnlib or --without-mdnlib was given. -+ if test "${with_mdnlib+set}" = set; then -+ withval="$with_mdnlib" -+ mdnlib="$withval" -+ else -+ mdnlib="no" -+ fi -+ -+ if test "$mdnlib" = yes; then -+ { echo "configure: error: You must specify ARG for --with-mdnlib." 1>&2; exit 1; } -+ fi -+ -+ if test "$use_mdn" != no; then -+ cat >> confdefs.h <<\EOF -+ #define WITH_MDN 1 -+ EOF -+ -+ STD_CINCLUDES="$STD_CINCLUDES -I$mdn_path/include" -+ if test "$mdnlib" != no; then -+ LIBS="$mdnlib $iconvlib $LIBS" -+ else -+ LIBS="-L$mdn_path/lib -lmdn $iconvlib $LIBS" -+ fi -+ fi -+ for ac_hdr in locale.h -+ do -+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -+ echo "configure:5133: checking for $ac_hdr" >&5 -+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+ else -+ cat > conftest.$ac_ext < -+ EOF -+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+ { (eval echo configure:5143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+ if test -z "$ac_err"; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+ else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=no" -+ fi -+ rm -f conftest* -+ fi -+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.h <&6 -+ fi -+ done -+ -+ for ac_func in setlocale -+ do -+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+ echo "configure:5172: checking for $ac_func" >&5 -+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+ else -+ cat > conftest.$ac_ext < -+ /* Override any gcc2 internal prototype to avoid an error. */ -+ /* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+ char $ac_func(); -+ -+ int main() { -+ -+ /* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+ choke me -+ #else -+ $ac_func(); -+ #endif -+ -+ ; return 0; } -+ EOF -+ if { (eval echo configure:5200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=yes" -+ else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=no" -+ fi -+ rm -f conftest* -+ fi -+ -+ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -+ cat >> confdefs.h <&6 -+ fi -+ done - - - # -Index: configure.in -diff -c mdn/othersrc/bind9/configure.in:1.1.1.7 mdn/othersrc/bind9/configure.in:1.10 -*** configure.in Thu Jul 26 15:43:20 2001 ---- configure.in Thu Jul 26 16:44:20 2001 -*************** -*** 1305,1310 **** ---- 1305,1383 ---- - AC_SUBST(XMLDIR) - - # -+ # MDN support -+ # -+ AC_ARG_WITH(mdn, -+ [ --with-mdn[=MPREFIX] enable MDN support using mDNkit [default PREFIX]], -+ use_mdn="$withval", use_mdn="no") -+ case "$use_mdn" in -+ yes) -+ if test X$prefix = XNONE ; then -+ mdn_path=/usr/local -+ else -+ mdn_path=$prefix -+ fi -+ ;; -+ no) -+ ;; -+ *) -+ mdn_path="$use_mdn" -+ ;; -+ esac -+ -+ iconvinc= -+ iconvlib= -+ AC_ARG_WITH(libiconv, -+ [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], -+ use_libiconv="$withval", use_libiconv="no") -+ case "$use_libiconv" in -+ yes) -+ if test X$prefix = XNONE ; then -+ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" -+ else -+ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" -+ fi -+ ;; -+ no) -+ iconvlib= -+ ;; -+ *) -+ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" -+ ;; -+ esac -+ -+ AC_ARG_WITH(iconv, -+ [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], -+ iconvlib="$withval") -+ case "$iconvlib" in -+ no) -+ iconvlib= -+ ;; -+ yes) -+ iconvlib=-liconv -+ ;; -+ esac -+ -+ AC_ARG_WITH(mdnlib, -+ [ --with-mdnlib=ARG specify libmdn], -+ mdnlib="$withval", mdnlib="no") -+ if test "$mdnlib" = yes; then -+ AC_MSG_ERROR([You must specify ARG for --with-mdnlib.]) -+ fi -+ -+ if test "$use_mdn" != no; then -+ AC_DEFINE(WITH_MDN, 1, [define if mDNkit support is to be included.]) -+ STD_CINCLUDES="$STD_CINCLUDES -I$mdn_path/include" -+ if test "$mdnlib" != no; then -+ LIBS="$mdnlib $iconvlib $LIBS" -+ else -+ LIBS="-L$mdn_path/lib -lmdn $iconvlib $LIBS" -+ fi -+ fi -+ AC_CHECK_HEADERS(locale.h) -+ AC_CHECK_FUNCS(setlocale) -+ -+ # - # Substitutions - # - AC_SUBST(BIND9_TOP_BUILDDIR) -Index: bin/dig/dig.c -diff -c mdn/othersrc/bind9/bin/dig/dig.c:1.1.1.7 mdn/othersrc/bind9/bin/dig/dig.c:1.6 -*** bin/dig/dig.c Tue Apr 17 14:17:04 2001 ---- bin/dig/dig.c Wed Aug 15 11:26:01 2001 -*************** -*** 1284,1289 **** ---- 1284,1294 ---- - printgreeting(argc, argv, lookup); - ISC_LIST_APPEND(lookup_list, lookup, link); - } -+ -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - } - - /* -Index: bin/dig/dighost.c -diff -c mdn/othersrc/bind9/bin/dig/dighost.c:1.1.1.10 mdn/othersrc/bind9/bin/dig/dighost.c:1.23 -*** bin/dig/dighost.c Thu Jul 26 15:43:22 2001 ---- bin/dig/dighost.c Wed Aug 15 11:26:01 2001 -*************** -*** 33,38 **** ---- 33,49 ---- - #include - #include - -+ #ifdef HAVE_LOCALE_H -+ #include -+ #endif -+ -+ #ifdef WITH_MDN -+ #include -+ #include -+ #include -+ #include -+ #endif -+ - #include - #include - #include -*************** -*** 135,140 **** ---- 146,165 ---- - dig_lookup_t *current_lookup = NULL; - isc_uint32_t rr_limit = INT_MAX; - -+ #ifdef WITH_MDN -+ mdn_resconf_t mdnconf; -+ -+ static void initialize_mdn(void); -+ static isc_result_t output_filter(isc_buffer_t *buffer, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ static mdn_result_t append_textname(char *name, const char *origin, -+ size_t namesize); -+ static void mdn_check_result(mdn_result_t r, const char *msg); -+ -+ #define MAXDLEN 256 -+ #endif -+ - /* - * Apply and clear locks at the event level in global task. - * Can I get rid of these using shutdown events? XXX -*************** -*** 371,376 **** ---- 396,404 ---- - looknew->ignore = ISC_FALSE; - looknew->servfail_stops = ISC_FALSE; - looknew->besteffort = ISC_TRUE; -+ #ifdef WITH_MDN -+ looknew->mdn = ISC_TRUE; -+ #endif - looknew->dnssec = ISC_FALSE; - looknew->udpsize = 0; - looknew->recurse = ISC_TRUE; -*************** -*** 429,434 **** ---- 457,465 ---- - looknew->ignore = lookold->ignore; - looknew->servfail_stops = lookold->servfail_stops; - looknew->besteffort = lookold->besteffort; -+ #ifdef WITH_MDN -+ looknew->mdn = lookold->mdn; -+ #endif - looknew->dnssec = lookold->dnssec; - looknew->udpsize = lookold->udpsize; - looknew->recurse = lookold->recurse; -*************** -*** 697,702 **** ---- 728,737 ---- - ISC_LIST_APPEND(server_list, srv, link); - } - -+ #ifdef WITH_MDN -+ initialize_mdn(); -+ #endif -+ - if (keyfile[0] != 0) - setup_file_key(); - else if (keysecret[0] != 0) -*************** -*** 1232,1243 **** ---- 1267,1289 ---- - isc_region_t r; - isc_buffer_t b; - char store[MXNAME]; -+ #ifdef WITH_MDN -+ mdn_result_t mr; -+ char idn_textname[MXNAME], idn_origin[MXNAME], idn_tmp[MXNAME]; -+ #endif - - REQUIRE(lookup != NULL); - INSIST(!free_now); - - debug("setup_lookup(%p)", lookup); - -+ #ifdef WITH_MDN -+ if (lookup->mdn == ISC_TRUE) -+ dns_name_settotextfilter(output_filter); -+ else -+ dns_name_settotextfilter(NULL); -+ #endif -+ - result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, - &lookup->sendmsg); - check_result(result, "dns_message_create"); -*************** -*** 1291,1344 **** - } - if (lookup->origin != NULL) { - debug("trying origin %s", lookup->origin->origin); -! result = dns_message_gettempname(lookup->sendmsg, -! &lookup->oname); -! check_result(result, "dns_message_gettempname"); -! dns_name_init(lookup->oname, NULL); -! /* XXX Helper funct to conv char* to name? */ -! len = strlen(lookup->origin->origin); -! isc_buffer_init(&b, lookup->origin->origin, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->oname, &b, dns_rootname, -! ISC_FALSE, &lookup->onamebuf); -! if (result != ISC_R_SUCCESS) { -! dns_message_puttempname(lookup->sendmsg, -! &lookup->name); -! dns_message_puttempname(lookup->sendmsg, -! &lookup->oname); -! fatal("'%s' is not in legal name syntax (%s)", -! lookup->origin->origin, -! dns_result_totext(result)); -! } -! if (lookup->trace_root) { -! dns_name_clone(dns_rootname, lookup->name); - } else { -! len = strlen(lookup->textname); -! isc_buffer_init(&b, lookup->textname, len); - isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! lookup->oname, ISC_FALSE, -! &lookup->namebuf); -! } -! if (result != ISC_R_SUCCESS) { -! dns_message_puttempname(lookup->sendmsg, -! &lookup->name); - dns_message_puttempname(lookup->sendmsg, - &lookup->oname); -- fatal("'%s' is not in legal name syntax (%s)", -- lookup->textname, dns_result_totext(result)); - } -- dns_message_puttempname(lookup->sendmsg, &lookup->oname); - } else { - debug("using root origin"); - if (!lookup->trace_root) { -! len = strlen(lookup->textname); -! isc_buffer_init(&b, lookup->textname, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! dns_rootname, -! ISC_FALSE, -! &lookup->namebuf); - } else { - dns_name_clone(dns_rootname, lookup->name); - } ---- 1337,1464 ---- - } - if (lookup->origin != NULL) { - debug("trying origin %s", lookup->origin->origin); -! #ifdef WITH_MDN -! if (lookup->mdn) { -! /* -! * We cannot convert name and origin separately and -! * combine them later, because some encoding scheme -! * (such as UTF-5) can be applied only to an entire -! * domain name, not a partial one. -! */ -! mr = mdn_res_nameconv(mdnconf, "l", lookup->textname, -! idn_textname, -! sizeof(idn_textname)); -! mdn_check_result(mr, "convert textname to UCS"); -! mr = mdn_res_nameconv(mdnconf, "l", -! lookup->origin->origin, -! idn_origin, sizeof(idn_origin)); -! mdn_check_result(mr, "convert origin to UCS"); -! mr = append_textname(idn_textname, idn_origin, -! sizeof(idn_textname)); -! mdn_check_result(mr, "append UCS origin to UCS " -! "textname"); -! mr = mdn_res_nameconv(mdnconf, "dMNI", idn_textname, -! idn_tmp, sizeof(idn_tmp)); -! mdn_check_result(mr, "convert UCS textname to IDN " -! "encoding"); -! strcpy(idn_textname, idn_tmp); -! -! if (!lookup->trace_root) { -! len = strlen(idn_textname); -! isc_buffer_init(&b, idn_textname, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! dns_rootname, -! ISC_FALSE, -! &lookup->namebuf); -! } else { -! dns_name_clone(dns_rootname, lookup->name); -! } -! if (result != ISC_R_SUCCESS) { -! dns_message_puttempname(lookup->sendmsg, -! &lookup->name); -! isc_buffer_init(&b, store, MXNAME); -! fatal("'%s' is not a legal name syntax " -! "(%s)", lookup->textname, -! dns_result_totext(result)); -! } -! #else /* WITH_MDN */ -! if (0) { -! #endif /* WITH_MDN */ - } else { -! result = dns_message_gettempname(lookup->sendmsg, -! &lookup->oname); -! check_result(result, "dns_message_gettempname"); -! dns_name_init(lookup->oname, NULL); -! /* XXX Helper funct to conv char* to name? */ -! len = strlen(lookup->origin->origin); -! isc_buffer_init(&b, lookup->origin->origin, len); - isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->oname, &b, -! dns_rootname, ISC_FALSE, -! &lookup->onamebuf); -! if (result != ISC_R_SUCCESS) { -! dns_message_puttempname(lookup->sendmsg, -! &lookup->name); -! dns_message_puttempname(lookup->sendmsg, -! &lookup->oname); -! fatal("'%s' is not in legal name syntax (%s)", -! lookup->origin->origin, -! dns_result_totext(result)); -! } -! if (lookup->trace_root) { -! dns_name_clone(dns_rootname, lookup->name); -! } else { -! len = strlen(lookup->textname); -! isc_buffer_init(&b, lookup->textname, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! lookup->oname, -! ISC_FALSE, -! &lookup->namebuf); -! } -! if (result != ISC_R_SUCCESS) { -! dns_message_puttempname(lookup->sendmsg, -! &lookup->name); -! dns_message_puttempname(lookup->sendmsg, -! &lookup->oname); -! fatal("'%s' is not in legal name syntax (%s)", -! lookup->textname, -! dns_result_totext(result)); -! } - dns_message_puttempname(lookup->sendmsg, - &lookup->oname); - } - } else { - debug("using root origin"); - if (!lookup->trace_root) { -! #ifdef WITH_MDN -! if (lookup->mdn) { -! mr = mdn_res_nameconv(mdnconf, "ldMNI", -! lookup->textname, -! idn_textname, -! sizeof(idn_textname)); -! mdn_check_result(mr, "convert textname to " -! "IDN encoding"); -! len = strlen(idn_textname); -! isc_buffer_init(&b, idn_textname, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! dns_rootname, -! ISC_FALSE, -! &lookup->namebuf); -! #else /* WITH_MDN */ -! if (0) { -! #endif /* WITH_MDN */ -! } else { -! len = strlen(lookup->textname); -! isc_buffer_init(&b, lookup->textname, len); -! isc_buffer_add(&b, len); -! result = dns_name_fromtext(lookup->name, &b, -! dns_rootname, -! ISC_FALSE, -! &lookup->namebuf); -! } - } else { - dns_name_clone(dns_rootname, lookup->name); - } -*************** -*** 2763,2765 **** ---- 2883,2998 ---- - if (mctx != NULL) - isc_mem_destroy(&mctx); - } -+ -+ #ifdef WITH_MDN -+ static void -+ initialize_mdn(void) { -+ mdn_result_t r; -+ -+ #ifdef HAVE_SETLOCALE -+ /* Set locale */ -+ (void)setlocale(LC_ALL, ""); -+ #endif -+ -+ /* General initialization. */ -+ r = mdn_resconf_initialize(); -+ if (r != mdn_success) -+ fatal("mdn initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Create configuration context. */ -+ r = mdn_resconf_create(&mdnconf); -+ if (r != mdn_success) -+ fatal("mdn resconf initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ -+ /* Load mdn configuration file. */ -+ r = mdn_resconf_loadfile(mdnconf, NULL); -+ if (r != mdn_success) -+ fatal("mdn configuration loading failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Set domain name -> text post-conversion filter. */ -+ dns_name_settotextfilter(output_filter); -+ } -+ -+ static isc_result_t -+ output_filter(isc_buffer_t *buffer, unsigned int used_org, -+ isc_boolean_t absolute) -+ { -+ char tmp1[MAXDLEN], tmp2[MAXDLEN]; -+ size_t fromlen, tolen; -+ isc_boolean_t end_with_dot; -+ -+ /* -+ * Copy contents of 'buffer' to 'tmp1', supply trailing dot -+ * if 'absolute' is true, and terminate with NUL. -+ */ -+ fromlen = isc_buffer_usedlength(buffer) - used_org; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); -+ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; -+ if (absolute && !end_with_dot) { -+ fromlen++; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ tmp1[fromlen - 1] = '.'; -+ } -+ tmp1[fromlen] = '\0'; -+ -+ /* -+ * Convert contents of 'tmp1' to local encoding. -+ */ -+ if (mdn_res_nameconv(mdnconf, "i!NL", tmp1, tmp2, MAXDLEN) -+ != mdn_success) -+ return (ISC_R_SUCCESS); -+ strcpy(tmp1, tmp2); -+ -+ /* -+ * Copy the converted contents in 'tmp1' back to 'buffer'. -+ * If we have appended trailing dot, remove it. -+ */ -+ tolen = strlen(tmp1); -+ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') -+ tolen--; -+ -+ if (isc_buffer_length(buffer) < used_org + tolen) -+ return (ISC_R_NOSPACE); -+ -+ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); -+ memcpy(isc_buffer_used(buffer), tmp1, tolen); -+ isc_buffer_add(buffer, tolen); -+ -+ return (ISC_R_SUCCESS); -+ } -+ -+ static mdn_result_t -+ append_textname(char *name, const char *origin, size_t namesize) { -+ size_t namelen = strlen(name); -+ size_t originlen = strlen(origin); -+ -+ /* Already absolute? */ -+ if (namelen > 0 && name[namelen - 1] == '.') -+ return mdn_success; -+ -+ /* Append dot and origin */ -+ -+ if (namelen + 1 + originlen >= namesize) -+ return mdn_buffer_overflow; -+ -+ name[namelen++] = '.'; -+ (void)strcpy(name + namelen, origin); -+ return mdn_success; -+ } -+ -+ static void -+ mdn_check_result(mdn_result_t r, const char *msg) { -+ if (r != mdn_success) { -+ exitcode = 1; -+ fatal("%s: %s", msg, mdn_result_tostring(r)); -+ } -+ } -+ -+ #endif /* WITH_MDN */ -Index: bin/dig/host.c -diff -c mdn/othersrc/bind9/bin/dig/host.c:1.1.1.7 mdn/othersrc/bind9/bin/dig/host.c:1.6 -*** bin/dig/host.c Tue Apr 17 14:17:05 2001 ---- bin/dig/host.c Wed Aug 15 11:26:01 2001 -*************** -*** 669,674 **** ---- 669,679 ---- - lookup->new_search = ISC_TRUE; - ISC_LIST_APPEND(lookup_list, lookup, link); - -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif -+ - usesearch = ISC_TRUE; - } - -Index: bin/dig/nslookup.c -diff -c mdn/othersrc/bind9/bin/dig/nslookup.c:1.1.1.7 mdn/othersrc/bind9/bin/dig/nslookup.c:1.6 -*** bin/dig/nslookup.c Tue Apr 17 14:17:05 2001 ---- bin/dig/nslookup.c Wed Aug 15 11:26:01 2001 -*************** -*** 766,771 **** ---- 766,775 ---- - ISC_LIST_APPEND(lookup_list, lookup, link); - lookup->origin = NULL; - ISC_LIST_INIT(lookup->my_server_list); -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - debug("looking up %s", lookup->textname); - } - -Index: bin/dig/include/dig/dig.h -diff -c mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.1.1.5 mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.6 -*** bin/dig/include/dig/dig.h Fri Jan 19 11:58:37 2001 ---- bin/dig/include/dig/dig.h Wed Aug 15 11:26:01 2001 -*************** -*** 69,74 **** ---- 69,81 ---- - * be 1. - */ - -+ /* -+ * Name of environment variable which disables MDN support if defined. -+ */ -+ #ifdef WITH_MDN -+ #define MDN_DISABLE_ENVVAR_NAME "MDN_DISABLE" -+ #endif -+ - ISC_LANG_BEGINDECLS - - typedef struct dig_lookup dig_lookup_t; -*************** -*** 103,108 **** ---- 110,118 ---- - servfail_stops, - new_search, - besteffort, -+ #ifdef WITH_MDN -+ mdn, -+ #endif - dnssec; - char textname[MXNAME]; /* Name we're going to be looking up */ - char cmdline[MXNAME]; -Index: doc/man/bin/dig.1 -diff -c mdn/othersrc/bind9/doc/man/bin/dig.1:1.1.1.4 mdn/othersrc/bind9/doc/man/bin/dig.1:1.2 -*** doc/man/bin/dig.1 Thu Jul 26 15:44:12 2001 ---- doc/man/bin/dig.1 Wed Aug 22 13:20:44 2001 -*************** -*** 450,455 **** ---- 450,469 ---- - will not print the initial query when it looks up the - NS records for - .Dv isc.org . -+ .Sh MDN SUPPORT -+ If -+ .Nm dig -+ has been built with mdn support, it can accept and display non-ASCII -+ domain names. -+ .Nm dig -+ appropriately converts character encoding of domain name before sending -+ a request to DNS server or displaying a reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines the -+ .Ar MDN_DISABLE -+ environment variable. -+ The MDN support is disabled if the the variable is set when -+ .Nm dig -+ runs. - .Sh FILES - .Pa /etc/resolv.conf - .Sh SEE ALSO -Index: doc/man/bin/host.1 -diff -c mdn/othersrc/bind9/doc/man/bin/host.1:1.1.1.4 mdn/othersrc/bind9/doc/man/bin/host.1:1.2 -*** doc/man/bin/host.1 Thu Jul 26 15:44:12 2001 ---- doc/man/bin/host.1 Wed Aug 22 13:20:44 2001 -*************** -*** 206,211 **** ---- 206,225 ---- - will effectively wait forever for a reply. - The time to wait for a response will be set to the number of seconds - given by the hardware's maximum value for an integer quantity. -+ .Sh MDN SUPPORT -+ If -+ .Nm host -+ has been built with mdn support, it can accept and display non-ASCII -+ domain names. -+ .Nm host -+ appropriately converts character encoding of domain name before sending -+ a request to DNS server or displaying a reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines the -+ .Ar MDN_DISABLE -+ environment variable. -+ The MDN support is disabled if the the variable is set when -+ .Nm host -+ runs. - .Sh FILES - .Pa /etc/resolv.conf - .Sh SEE ALSO -Index: lib/dns/name.c -diff -c mdn/othersrc/bind9/lib/dns/name.c:1.1.1.8 mdn/othersrc/bind9/lib/dns/name.c:1.11 -*** lib/dns/name.c Thu Jul 26 15:44:38 2001 ---- lib/dns/name.c Thu Jul 26 16:44:21 2001 -*************** -*** 205,210 **** ---- 205,217 ---- - /* XXXDCL make const? */ - dns_name_t *dns_wildcardname = &wild.name; - -+ #ifdef WITH_MDN -+ /* -+ * dns_name_t to text post-conversion procedure. -+ */ -+ static dns_name_totextfilter_t totext_filter_proc = NULL; -+ #endif -+ - static void - set_offsets(const dns_name_t *name, unsigned char *offsets, - dns_name_t *set_name); -*************** -*** 1705,1710 **** ---- 1712,1720 ---- - unsigned int labels; - isc_boolean_t saw_root = ISC_FALSE; - char num[4]; -+ #ifdef WITH_MDN -+ unsigned int oused = target->used; -+ #endif - - /* - * This function assumes the name is in proper uncompressed -*************** -*** 1882,1887 **** ---- 1892,1901 ---- - - isc_buffer_add(target, tlen - trem); - -+ #ifdef WITH_MDN -+ if (totext_filter_proc != NULL) -+ return ((*totext_filter_proc)(target, oused, saw_root)); -+ #endif - return (ISC_R_SUCCESS); - } - -*************** -*** 3153,3155 **** ---- 3167,3176 ---- - } else - snprintf(cp, size, ""); - } -+ -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc) { -+ totext_filter_proc = proc; -+ } -+ #endif -Index: lib/dns/include/dns/name.h -diff -c mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.1.1.5 mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.7 -*** lib/dns/include/dns/name.h Tue Apr 17 14:18:27 2001 ---- lib/dns/include/dns/name.h Thu Apr 26 13:54:43 2001 -*************** -*** 217,222 **** ---- 217,233 ---- - */ - #define DNS_NAME_MAXWIRE 255 - -+ #ifdef WITH_MDN -+ /* -+ * Text output filter procedure. -+ * 'target' is the buffer to be converted. The region to be converted -+ * is from 'buffer'->base + 'used_org' to the end of the used region. -+ */ -+ typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ #endif -+ - /*** - *** Initialization - ***/ -*************** -*** 1215,1220 **** ---- 1226,1239 ---- - * 'size' > 0. - * - */ -+ -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc); -+ /* -+ * Call 'proc' at the end of dns_name_totext. -+ */ -+ #endif /* WITH_MDN */ - - #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) - /* diff --git a/contrib/idn/mdnkit/patch/bind9/bind-9.2.0-patch b/contrib/idn/mdnkit/patch/bind9/bind-9.2.0-patch deleted file mode 100644 index 509fc98e0a..0000000000 --- a/contrib/idn/mdnkit/patch/bind9/bind-9.2.0-patch +++ /dev/null @@ -1,6047 +0,0 @@ -MDN patch for bind-9.2.0 -======================== - - -This is a patch file for ISC BIND 9.2.0 to make it work with -internationalized/multilingual domain names. With this patch you'll -get MDN-aware dig/host/nslookup. - -To apply this patch, you should go to the top directory of the BIND -distribution (where you see `README' file), then invoke `patch' -command like this: - - % patch -p0 < this-file - -Then follow the instructions described in `README.mdnkit' to compile -and install. - - -Index: README.mdnkit -diff -c /dev/null mdn/othersrc/bind9/README.mdnkit:1.9 -*** README.mdnkit Thu Dec 6 13:51:44 2001 ---- README.mdnkit Wed Aug 22 15:19:31 2001 -*************** -*** 0 **** ---- 1,124 ---- -+ -+ BIND-9 MDN patch -+ -+ Japan Network Information Center (JPNIC) -+ -+ -+ * What is this patch for? -+ -+ This patch adds multilingual domain name (MDN) support to BIND-9. -+ You'll get multilingualized version of dig/host/nslookup commands. -+ -+ + mulltilingualized dig/host/nslookup -+ dig/host/nslookup accepts non-ASCII domain names in the local -+ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by -+ the locale information. The domain names are normalized and -+ converted to the encoding on the DNS protocol, and sent to DNS -+ servers. The replies are converted back to the local codeset -+ and displayed. -+ -+ -+ * Compilation & installation -+ -+ 0. Prerequisite -+ -+ You have to build and install mDNkit before building this patched version -+ of bind-9. -+ -+ 1. Running configure script -+ -+ Run `configure' in the top directory. See `README' for the -+ configuration options. -+ -+ This patch adds the following 4 options to `configure'. You should -+ at least specify `--with-mdn' option to enable MDN support. -+ -+ --with-mdn[=MDN_PREFIX] -+ To enable MDN support, you have to specify `--with-mdn' option. -+ The argument MDN_PREFIX is the install prefix of mDNkit. If -+ MDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') -+ is assumed. -+ -+ --with-libiconv[=LIBICONV_PREFIX] -+ Specify this option if mDNkit you have installed links GNU -+ libiconv. The argument LIBICONV_PREFIX is install prefix of -+ GNU libiconv. If the argument is omitted, PREFIX (derived -+ from `--prefix=PREFIX') is assumed. -+ -+ `--with-libiconv' is shorthand option for GNU libiconv. -+ -+ --with-libiconv=/usr/local -+ -+ This is equivalent to: -+ -+ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' -+ -+ `--with-libiconv' assumes that your C compiler has `-R' -+ option, and that the option adds the specified run-time path -+ to an exacutable binary. If `-R' option of your compiler has -+ different meaning, or your compiler lacks the option, you -+ should use `--with-iconv' option instead. Binary command -+ without run-time path information might be unexecutable. -+ In that case, you would see an error message like: -+ -+ error in loading shared libraries: libiconv.so.2: cannot -+ open shared object file -+ -+ If both `--with-libiconv' and `--with-iconv' options are -+ specified, `--with-iconv' is prior to `--with-libiconv'. -+ -+ --with-iconv=ICONV_LIBSPEC -+ If your libc doens't provide iconv(), you need to specify the -+ library containing iconv() with this option. `ICONV_LIBSPEC' -+ is the argument(s) to `cc' or `ld' to link the library, for -+ example, `--with-iconv="-L/usr/local/lib -liconv"'. -+ You don't need to specify the header file directory for "iconv.h" -+ to the compiler, as it isn't included directly by bind-9 with -+ this patch. -+ -+ --with-mdnlib=MDN_LIBSPEC -+ With this option, you can explicitly specify the argument(s) -+ to `cc' or `ld' to link the mDNkit's library, `libmdn'. If -+ this option is not specified, `-L${PREFIX}/lib -lmdn' is -+ assumed, where ${PREFIX} is the installation prefix specified -+ with `--with-mdn' option above. You may need to use this -+ option to specify extra argments, for example, -+ `--with-mdnlib="-L/usr/local/lib -R/usr/local/lib -lmdn"'. -+ -+ Please consult `README' for other configuration options. -+ -+ Note that if you want to specify some extra header file directories, -+ you should use the environment variable STD_CINCLUDES instead of -+ CFLAGS, as described in README. -+ -+ 2. Compilation and installation -+ -+ After running "configure", just do -+ -+ make -+ make install -+ -+ for compiling and installing. -+ -+ 3. Resolver configuration -+ -+ To handle multilingual domain names, you have to specify the -+ properties like: -+ + name encoding used in DNS protocol data -+ + normalization (NAMEPREP) schemes -+ These properties are specified by the mDNkit's configuration file, -+ "mdn.conf". You have to create and set up the file properly. The -+ pathname of the file and contents are described in the manual -+ "mdn.conf". -+ -+ -+ * Contact information -+ -+ Please see http//www.nic.ad.jp/jp/research/idn/ for the latest news -+ about mDNkit and this patch. -+ -+ Bug reports and comments on this kit should be sent to -+ mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -+ -+ -+ ; $Id: bind-9.2.0-patch,v 1.1 2002/02/08 05:41:25 marka Exp $ -Index: config.h.in -diff -c mdn/othersrc/bind9/config.h.in:1.1.1.6 mdn/othersrc/bind9/config.h.in:1.10.2.1 -*** config.h.in Tue Nov 27 16:55:45 2001 ---- config.h.in Thu Dec 6 13:51:12 2001 -*************** -*** 141,146 **** ---- 141,149 ---- - /* define if you have strerror in the C library. */ - #undef HAVE_STRERROR - -+ /* Define if you have the setlocale function. */ -+ #undef HAVE_SETLOCALE -+ - /* Define if you have the header file. */ - #undef HAVE_DLFCN_H - -*************** -*** 150,155 **** ---- 153,161 ---- - /* Define if you have the header file. */ - #undef HAVE_LINUX_CAPABILITY_H - -+ /* Define if you have the header file. */ -+ #undef HAVE_LOCALE_H -+ - /* Define if you have the header file. */ - #undef HAVE_SYS_PRCTL_H - -*************** -*** 176,178 **** ---- 182,188 ---- - - /* Define if you have the socket library (-lsocket). */ - #undef HAVE_LIBSOCKET -+ -+ /* define if mDNkit support is to be included. */ -+ #undef WITH_MDN -+ -Index: configure -diff -c mdn/othersrc/bind9/configure:1.1.1.8 mdn/othersrc/bind9/configure:1.11 -*** configure Tue Nov 27 16:55:47 2001 ---- configure Thu Nov 29 18:45:13 2001 -*************** -*** 369,374 **** ---- 369,382 ---- - --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]" - ac_help="$ac_help - --disable-linux-caps disable linux capabilities" -+ ac_help="$ac_help -+ --with-mdn[=MPREFIX] enable MDN support using mDNkit [default PREFIX]" -+ ac_help="$ac_help -+ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]" -+ ac_help="$ac_help -+ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]" -+ ac_help="$ac_help -+ --with-mdnlib=ARG specify libmdn" - - # Initialize some variables set by options. - # The variables have the same names as the options, with -*************** -*** 911,917 **** - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 -! echo "configure:915: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in ---- 919,925 ---- - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 -! echo "configure:923: checking host system type" >&5 - - host_alias=$host - case "$host_alias" in -*************** -*** 933,939 **** - - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -! echo "configure:937: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 941,947 ---- - - - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -! echo "configure:945: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 962,968 **** - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:966: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 970,976 ---- - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:974: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1001,1007 **** - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -! echo "configure:1005: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 1009,1015 ---- - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -! echo "configure:1013: checking for a BSD compatible install" >&5 - if test -z "$INSTALL"; then - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 1062,1068 **** - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1066: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1070,1076 ---- - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1074: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1121,1127 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1125: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1129,1135 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1133: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_ETAGS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1163,1169 **** - # - if test "X$ETAGS" != "X"; then - echo $ac_n "checking for Exuberant Ctags etags""... $ac_c" 1>&6 -! echo "configure:1167: checking for Exuberant Ctags etags" >&5 - if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then - echo "$ac_t""yes" 1>&6 - ETAGS="$ETAGS -L" ---- 1171,1177 ---- - # - if test "X$ETAGS" != "X"; then - echo $ac_n "checking for Exuberant Ctags etags""... $ac_c" 1>&6 -! echo "configure:1175: checking for Exuberant Ctags etags" >&5 - if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then - echo "$ac_t""yes" 1>&6 - ETAGS="$ETAGS -L" -*************** -*** 1181,1187 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1185: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1189,1195 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1193: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1328,1334 **** - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1332: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1336,1342 ---- - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1340: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1358,1364 **** - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1362: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1366,1372 ---- - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1370: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1409,1415 **** - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1413: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1417,1423 ---- - # Extract the first word of "cl", so it can be a program name with args. - set dummy cl; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:1421: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1441,1447 **** - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -! echo "configure:1445: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ---- 1449,1455 ---- - fi - - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -! echo "configure:1453: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -*************** -*** 1452,1463 **** - - cat > conftest.$ac_ext << EOF - -! #line 1456 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF -! if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then ---- 1460,1471 ---- - - cat > conftest.$ac_ext << EOF - -! #line 1464 "configure" - #include "confdefs.h" - - main(){return(0);} - EOF -! if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then -*************** -*** 1483,1494 **** - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -! echo "configure:1487: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -! echo "configure:1492: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1491,1502 ---- - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } - fi - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -! echo "configure:1495: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 - cross_compiling=$ac_cv_prog_cc_cross - - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -! echo "configure:1500: checking whether we are using GNU C" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1497,1503 **** - yes; - #endif - EOF -! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no ---- 1505,1511 ---- - yes; - #endif - EOF -! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes - else - ac_cv_prog_gcc=no -*************** -*** 1516,1522 **** - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -! echo "configure:1520: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 1524,1530 ---- - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -! echo "configure:1528: checking whether ${CC-cc} accepts -g" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 1549,1555 **** - - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -! echo "configure:1553: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= ---- 1557,1563 ---- - - - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -! echo "configure:1561: checking how to run the C preprocessor" >&5 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= -*************** -*** 1564,1576 **** - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1572,1584 ---- - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1581,1593 **** - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1589,1601 ---- - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1598,1610 **** - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : ---- 1606,1618 ---- - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < - Syntax Error - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - : -*************** -*** 1629,1640 **** - echo "$ac_t""$CPP" 1>&6 - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -! echo "configure:1633: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include ---- 1637,1648 ---- - echo "$ac_t""$CPP" 1>&6 - - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -! echo "configure:1641: checking for ANSI C header files" >&5 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -*************** -*** 1642,1648 **** - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 1650,1656 ---- - #include - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 1659,1665 **** - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF ---- 1667,1673 ---- - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -*************** -*** 1677,1683 **** - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF ---- 1685,1691 ---- - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat > conftest.$ac_ext < - EOF -*************** -*** 1698,1704 **** - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ---- 1706,1712 ---- - : - else - cat > conftest.$ac_ext < - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -*************** -*** 1709,1715 **** - exit (0); } - - EOF -! if { (eval echo configure:1713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else ---- 1717,1723 ---- - exit (0); } - - EOF -! if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - : - else -*************** -*** 1737,1753 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:1741: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 1745,1761 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:1749: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 1775,1786 **** - - - echo $ac_n "checking for working const""... $ac_c" 1>&6 -! echo "configure:1779: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:1787: checking for working const" >&5 - if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else ---- 1837,1843 ---- - - ; return 0; } - EOF -! if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes - else -*************** -*** 1850,1870 **** - fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 -! echo "configure:1854: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else ---- 1858,1878 ---- - fi - - echo $ac_n "checking for inline""... $ac_c" 1>&6 -! echo "configure:1862: checking for inline" >&5 - if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break - else -*************** -*** 1890,1901 **** - esac - - echo $ac_n "checking for sysctlbyname""... $ac_c" 1>&6 -! echo "configure:1894: checking for sysctlbyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:1902: checking for sysctlbyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysctlbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysctlbyname=yes" - else ---- 1926,1932 ---- - - ; return 0; } - EOF -! if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysctlbyname=yes" - else -*************** -*** 1946,1954 **** - # is reported to not support "static inline" (RT #1212). - # - echo $ac_n "checking for static inline breakage""... $ac_c" 1>&6 -! echo "configure:1950: checking for static inline breakage" >&5 - cat > conftest.$ac_ext <&6 -! echo "configure:1958: checking for static inline breakage" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 - else ---- 1973,1979 ---- - - ; return 0; } - EOF -! if { (eval echo configure:1977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 - else -*************** -*** 1981,1992 **** - rm -f conftest* - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 -! echo "configure:1985: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS ---- 1989,2000 ---- - rm -f conftest* - - echo $ac_n "checking for size_t""... $ac_c" 1>&6 -! echo "configure:1993: checking for size_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -*************** -*** 2014,2025 **** - fi - - echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -! echo "configure:2018: checking for ssize_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS ---- 2022,2033 ---- - fi - - echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -! echo "configure:2026: checking for ssize_t" >&5 - if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #if STDC_HEADERS -*************** -*** 2047,2058 **** - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -! echo "configure:2051: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include ---- 2055,2066 ---- - fi - - echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -! echo "configure:2059: checking whether time.h and sys/time.h may both be included" >&5 - if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - #include -*************** -*** 2061,2067 **** - struct tm *tp; - ; return 0; } - EOF -! if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else ---- 2069,2075 ---- - struct tm *tp; - ; return 0; } - EOF -! if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes - else -*************** -*** 2082,2097 **** - fi - - echo $ac_n "checking for long long""... $ac_c" 1>&6 -! echo "configure:2086: checking for long long" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" ---- 2090,2105 ---- - fi - - echo $ac_n "checking for long long""... $ac_c" 1>&6 -! echo "configure:2094: checking for long long" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1" -*************** -*** 2111,2119 **** - case $ac_cv_header_unistd_h in - yes) - echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 -! echo "configure:2115: checking if unistd.h defines fd_set" >&5 - cat > conftest.$ac_ext < ---- 2119,2127 ---- - case $ac_cv_header_unistd_h in - yes) - echo $ac_n "checking if unistd.h defines fd_set""... $ac_c" 1>&6 -! echo "configure:2123: checking if unistd.h defines fd_set" >&5 - cat > conftest.$ac_ext < -*************** -*** 2121,2127 **** - fd_set read_set; return (0); - ; return 0; } - EOF -! if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" ---- 2129,2135 ---- - fd_set read_set; return (0); - ; return 0; } - EOF -! if { (eval echo configure:2133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" -*************** -*** 2163,2176 **** - # Find the machine's endian flavor. - # - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -! echo "configure:2167: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include ---- 2171,2184 ---- - # Find the machine's endian flavor. - # - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -! echo "configure:2175: checking whether byte ordering is bigendian" >&5 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_cv_c_bigendian=unknown - # See if sys/param.h defines the BYTE_ORDER macro. - cat > conftest.$ac_ext < - #include -*************** -*** 2181,2191 **** - #endif - ; return 0; } - EOF -! if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include ---- 2189,2199 ---- - #endif - ; return 0; } - EOF -! if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. - cat > conftest.$ac_ext < - #include -*************** -*** 2196,2202 **** - #endif - ; return 0; } - EOF -! if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else ---- 2204,2210 ---- - #endif - ; return 0; } - EOF -! if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes - else -*************** -*** 2216,2222 **** - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } - else - cat > conftest.$ac_ext <&2; exit 1; } - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian=no - else ---- 2237,2243 ---- - exit (u.c[sizeof (long) - 1] == 1); - } - EOF -! if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - ac_cv_c_bigendian=no - else -*************** -*** 2257,2263 **** - # was --with-openssl specified? - # - echo $ac_n "checking for OpenSSL library""... $ac_c" 1>&6 -! echo "configure:2261: checking for OpenSSL library" >&5 - # Check whether --with-openssl or --without-openssl was given. - if test "${with_openssl+set}" = set; then - withval="$with_openssl" ---- 2265,2271 ---- - # was --with-openssl specified? - # - echo $ac_n "checking for OpenSSL library""... $ac_c" 1>&6 -! echo "configure:2269: checking for OpenSSL library" >&5 - # Check whether --with-openssl or --without-openssl was given. - if test "${with_openssl+set}" = set; then - withval="$with_openssl" -*************** -*** 2298,2304 **** - echo "$ac_t""using openssl from $use_openssl/lib and $use_openssl/include" 1>&6 - - echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 -! echo "configure:2302: checking OpenSSL library version" >&5 - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CFLAGS="$CFLAGS $DST_OPENSSL_INC" ---- 2306,2312 ---- - echo "$ac_t""using openssl from $use_openssl/lib and $use_openssl/include" 1>&6 - - echo $ac_n "checking OpenSSL library version""... $ac_c" 1>&6 -! echo "configure:2310: checking OpenSSL library version" >&5 - saved_cflags="$CFLAGS" - saved_libs="$LIBS" - CFLAGS="$CFLAGS $DST_OPENSSL_INC" -*************** -*** 2307,2313 **** - echo "$ac_t""assuming target platform has compatible version" 1>&6 - else - cat > conftest.$ac_ext < ---- 2315,2321 ---- - echo "$ac_t""assuming target platform has compatible version" 1>&6 - else - cat > conftest.$ac_ext < -*************** -*** 2322,2328 **** - } - - EOF -! if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""ok" 1>&6 - else ---- 2330,2336 ---- - } - - EOF -! if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""ok" 1>&6 - else -*************** -*** 2387,2393 **** - # was --with-randomdev specified? - # - echo $ac_n "checking for random device""... $ac_c" 1>&6 -! echo "configure:2391: checking for random device" >&5 - # Check whether --with-randomdev or --without-randomdev was given. - if test "${with_randomdev+set}" = set; then - withval="$with_randomdev" ---- 2395,2401 ---- - # was --with-randomdev specified? - # - echo $ac_n "checking for random device""... $ac_c" 1>&6 -! echo "configure:2399: checking for random device" >&5 - # Check whether --with-randomdev or --without-randomdev was given. - if test "${with_randomdev+set}" = set; then - withval="$with_randomdev" -*************** -*** 2411,2417 **** - - ac_safe=`echo "$devrandom" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $devrandom""... $ac_c" 1>&6 -! echo "configure:2415: checking for $devrandom" >&5 - if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 2419,2425 ---- - - ac_safe=`echo "$devrandom" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $devrandom""... $ac_c" 1>&6 -! echo "configure:2423: checking for $devrandom" >&5 - if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 2463,2469 **** - # - - echo $ac_n "checking whether to build with thread support""... $ac_c" 1>&6 -! echo "configure:2467: checking whether to build with thread support" >&5 - - case $host in - *-dec-osf*) ---- 2471,2477 ---- - # - - echo $ac_n "checking whether to build with thread support""... $ac_c" 1>&6 -! echo "configure:2475: checking whether to build with thread support" >&5 - - case $host in - *-dec-osf*) -*************** -*** 2551,2557 **** - # experiment with it. - CC="gcc" - echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -! echo "configure:2555: checking which NetBSD thread library to use" >&5 - - # Check whether --with-ptl2 or --without-ptl2 was given. - if test "${with_ptl2+set}" = set; then ---- 2559,2565 ---- - # experiment with it. - CC="gcc" - echo $ac_n "checking which NetBSD thread library to use""... $ac_c" 1>&6 -! echo "configure:2563: checking which NetBSD thread library to use" >&5 - - # Check whether --with-ptl2 or --without-ptl2 was given. - if test "${with_ptl2+set}" = set; then -*************** -*** 2590,2596 **** - ;; - *) - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2594: checking for pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2598,2604 ---- - ;; - *) - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2602: checking for pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2598,2604 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2617,2623 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2635,2641 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2639: checking for __pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2643,2649 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create in -lpthread""... $ac_c" 1>&6 -! echo "configure:2647: checking for __pthread_create in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2643,2649 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2662,2668 ---- - __pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2680,2686 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -! echo "configure:2684: checking for __pthread_create_system in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2688,2694 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 -! echo "configure:2692: checking for __pthread_create_system in -lpthread" >&5 - ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2688,2694 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2707,2713 ---- - __pthread_create_system() - ; return 0; } - EOF -! if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2725,2731 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -! echo "configure:2729: checking for pthread_create in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2733,2739 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -! echo "configure:2737: checking for pthread_create in -lc_r" >&5 - ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2733,2739 **** - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2752,2758 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2770,2776 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -! echo "configure:2774: checking for pthread_create in -lc" >&5 - ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2778,2784 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -! echo "configure:2782: checking for pthread_create in -lc" >&5 - ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2778,2784 **** - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2797,2803 ---- - pthread_create() - ; return 0; } - EOF -! if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2835,2841 **** - # We'd like to use sigwait() too - # - echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -! echo "configure:2839: checking for sigwait in -lc" >&5 - ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2843,2849 ---- - # We'd like to use sigwait() too - # - echo $ac_n "checking for sigwait in -lc""... $ac_c" 1>&6 -! echo "configure:2847: checking for sigwait in -lc" >&5 - ac_lib_var=`echo c'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2843,2849 **** - ac_save_LIBS="$LIBS" - LIBS="-lc $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2862,2868 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2876,2882 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2880: checking for sigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2884,2890 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for sigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2888: checking for sigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2884,2890 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2903,2909 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2917,2923 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2921: checking for _Psigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 2925,2931 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for _Psigwait in -lpthread""... $ac_c" 1>&6 -! echo "configure:2929: checking for _Psigwait in -lpthread" >&5 - ac_lib_var=`echo pthread'_'_Psigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 2925,2931 **** - ac_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 2944,2950 ---- - _Psigwait() - ; return 0; } - EOF -! if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 2966,2977 **** - - - echo $ac_n "checking for pthread_attr_getstacksize""... $ac_c" 1>&6 -! echo "configure:2970: checking for pthread_attr_getstacksize" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:2978: checking for pthread_attr_getstacksize" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getstacksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_attr_getstacksize=yes" - else ---- 3002,3008 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_attr_getstacksize=yes" - else -*************** -*** 3026,3032 **** - # - *-freebsd*) - echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -! echo "configure:3030: checking for sigwait in -lc_r" >&5 - ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3034,3040 ---- - # - *-freebsd*) - echo $ac_n "checking for sigwait in -lc_r""... $ac_c" 1>&6 -! echo "configure:3038: checking for sigwait in -lc_r" >&5 - ac_lib_var=`echo c_r'_'sigwait | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3034,3040 **** - ac_save_LIBS="$LIBS" - LIBS="-lc_r $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 3053,3059 ---- - sigwait() - ; return 0; } - EOF -! if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 3100,3111 **** - EOF - - echo $ac_n "checking for pthread_setconcurrency""... $ac_c" 1>&6 -! echo "configure:3104: checking for pthread_setconcurrency" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3112: checking for pthread_setconcurrency" >&5 - if eval "test \"`echo '$''{'ac_cv_func_pthread_setconcurrency'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_setconcurrency=yes" - else ---- 3136,3142 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_setconcurrency=yes" - else -*************** -*** 3166,3177 **** - # Look for sysconf to allow detection of the number of processors. - # - echo $ac_n "checking for sysconf""... $ac_c" 1>&6 -! echo "configure:3170: checking for sysconf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3178: checking for sysconf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysconf=yes" - else ---- 3202,3208 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_sysconf=yes" - else -*************** -*** 3275,3286 **** - # be defined. - # - echo $ac_n "checking for flockfile""... $ac_c" 1>&6 -! echo "configure:3279: checking for flockfile" >&5 - if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3287: checking for flockfile" >&5 - if eval "test \"`echo '$''{'ac_cv_func_flockfile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_flockfile=yes" - else ---- 3311,3317 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_flockfile=yes" - else -*************** -*** 3326,3337 **** - fi - - echo $ac_n "checking for getc_unlocked""... $ac_c" 1>&6 -! echo "configure:3330: checking for getc_unlocked" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getc_unlocked'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3338: checking for getc_unlocked" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getc_unlocked'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getc_unlocked=yes" - else ---- 3362,3368 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getc_unlocked=yes" - else -*************** -*** 3381,3387 **** - # Indicate what the final decision was regarding threads. - # - echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 -! echo "configure:3385: checking whether to build with threads" >&5 - if $use_threads; then - echo "$ac_t""yes" 1>&6 - else ---- 3389,3395 ---- - # Indicate what the final decision was regarding threads. - # - echo $ac_n "checking whether to build with threads""... $ac_c" 1>&6 -! echo "configure:3393: checking whether to build with threads" >&5 - if $use_threads; then - echo "$ac_t""yes" 1>&6 - else -*************** -*** 3457,3468 **** - # NLS - # - echo $ac_n "checking for catgets""... $ac_c" 1>&6 -! echo "configure:3461: checking for catgets" >&5 - if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3469: checking for catgets" >&5 - if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_catgets=yes" - else ---- 3493,3499 ---- - - ; return 0; } - EOF -! if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_catgets=yes" - else -*************** -*** 3523,3529 **** - ;; - *) - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -! echo "configure:3527: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3531,3537 ---- - ;; - *) - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -! echo "configure:3535: checking for socket in -lsocket" >&5 - ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3531,3537 **** - ac_save_LIBS="$LIBS" - LIBS="-lsocket $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 3550,3556 ---- - socket() - ; return 0; } - EOF -! if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 3570,3576 **** - fi - - echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -! echo "configure:3574: checking for inet_ntoa in -lnsl" >&5 - ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3578,3584 ---- - fi - - echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -! echo "configure:3582: checking for inet_ntoa in -lnsl" >&5 - ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3578,3584 **** - ac_save_LIBS="$LIBS" - LIBS="-lnsl $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 3597,3603 ---- - inet_ntoa() - ; return 0; } - EOF -! if { (eval echo configure:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 3623,3629 **** - # Purify support - # - echo $ac_n "checking whether to use purify""... $ac_c" 1>&6 -! echo "configure:3627: checking whether to use purify" >&5 - # Check whether --with-purify or --without-purify was given. - if test "${with_purify+set}" = set; then - withval="$with_purify" ---- 3631,3637 ---- - # Purify support - # - echo $ac_n "checking whether to use purify""... $ac_c" 1>&6 -! echo "configure:3635: checking whether to use purify" >&5 - # Check whether --with-purify or --without-purify was given. - if test "${with_purify+set}" = set; then - withval="$with_purify" -*************** -*** 3640,3646 **** - # Extract the first word of "purify", so it can be a program name with args. - set dummy purify; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:3644: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_purify_path'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3648,3654 ---- - # Extract the first word of "purify", so it can be a program name with args. - set dummy purify; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:3652: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_purify_path'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3717,3728 **** - case $use_libtool in - yes) - echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -! echo "configure:3721: checking for Cygwin environment" >&5 - if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:3729: checking for Cygwin environment" >&5 - if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes - else ---- 3741,3747 ---- - return __CYGWIN__; - ; return 0; } - EOF -! if { (eval echo configure:3745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes - else -*************** -*** 3750,3768 **** - CYGWIN= - test "$ac_cv_cygwin" = yes && CYGWIN=yes - echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -! echo "configure:3754: checking for mingw32 environment" >&5 - if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes - else ---- 3758,3776 ---- - CYGWIN= - test "$ac_cv_cygwin" = yes && CYGWIN=yes - echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -! echo "configure:3762: checking for mingw32 environment" >&5 - if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes - else -*************** -*** 3848,3854 **** - fi - - echo $ac_n "checking build system type""... $ac_c" 1>&6 -! echo "configure:3852: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in ---- 3856,3862 ---- - fi - - echo $ac_n "checking build system type""... $ac_c" 1>&6 -! echo "configure:3860: checking build system type" >&5 - - build_alias=$build - case "$build_alias" in -*************** -*** 3877,3883 **** - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -! echo "configure:3881: checking for ld used by GCC" >&5 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw ---- 3885,3891 ---- - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -! echo "configure:3889: checking for ld used by GCC" >&5 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw -*************** -*** 3907,3916 **** - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -! echo "configure:3911: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -! echo "configure:3914: checking for non-GNU ld" >&5 - fi - if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 3915,3924 ---- - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -! echo "configure:3919: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -! echo "configure:3922: checking for non-GNU ld" >&5 - fi - if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 3945,3951 **** - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -! echo "configure:3949: checking if the linker ($LD) is GNU ld" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3953,3959 ---- - fi - test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -! echo "configure:3957: checking if the linker ($LD) is GNU ld" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3962,3968 **** - - - echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -! echo "configure:3966: checking for $LD option to reload object files" >&5 - if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3970,3976 ---- - - - echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -! echo "configure:3974: checking for $LD option to reload object files" >&5 - if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 3974,3980 **** - test -n "$reload_flag" && reload_flag=" $reload_flag" - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -! echo "configure:3978: checking for BSD-compatible nm" >&5 - if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 3982,3988 ---- - test -n "$reload_flag" && reload_flag=" $reload_flag" - - echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -! echo "configure:3986: checking for BSD-compatible nm" >&5 - if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4012,4018 **** - echo "$ac_t""$NM" 1>&6 - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -! echo "configure:4016: checking whether ln -s works" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4020,4026 ---- - echo "$ac_t""$NM" 1>&6 - - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -! echo "configure:4024: checking whether ln -s works" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4033,4039 **** - fi - - echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -! echo "configure:4037: checking how to recognise dependant libraries" >&5 - if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4041,4047 ---- - fi - - echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -! echo "configure:4045: checking how to recognise dependant libraries" >&5 - if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4206,4218 **** - deplibs_check_method=$lt_cv_deplibs_check_method - - echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -! echo "configure:4210: checking for object suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - rm -f conftest* - echo 'int i = 1;' > conftest.$ac_ext -! if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; ---- 4214,4226 ---- - deplibs_check_method=$lt_cv_deplibs_check_method - - echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -! echo "configure:4218: checking for object suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - rm -f conftest* - echo 'int i = 1;' > conftest.$ac_ext -! if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; -*************** -*** 4232,4238 **** - - - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -! echo "configure:4236: checking for executable suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4240,4246 ---- - - - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -! echo "configure:4244: checking for executable suffix" >&5 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4242,4251 **** - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= -! if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in -! *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done ---- 4250,4259 ---- - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= -! if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in -! *.c | *.C | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done -*************** -*** 4273,4279 **** - - # Check for command to grab the raw symbol name followed by C symbol from nm. - echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -! echo "configure:4277: checking command to parse $NM output" >&5 - if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4281,4287 ---- - - # Check for command to grab the raw symbol name followed by C symbol from nm. - echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -! echo "configure:4285: checking command to parse $NM output" >&5 - if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4349,4358 **** - int main(){nm_test_var='a';nm_test_func();return(0);} - EOF - -! if { (eval echo configure:4353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - # Now try to grab the symbols. - nlist=conftest.nm -! if { (eval echo configure:4356: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" ---- 4357,4366 ---- - int main(){nm_test_var='a';nm_test_func();return(0);} - EOF - -! if { (eval echo configure:4361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - # Now try to grab the symbols. - nlist=conftest.nm -! if { (eval echo configure:4364: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" -*************** -*** 4403,4409 **** - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$no_builtin_flag" -! if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - fi - LIBS="$save_LIBS" ---- 4411,4417 ---- - save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$no_builtin_flag" -! if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - fi - LIBS="$save_LIBS" -*************** -*** 4449,4465 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4453: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 4457,4473 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:4461: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 4494,4500 **** - file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -! echo "configure:4498: checking for ${ac_tool_prefix}file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4502,4508 ---- - file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -! echo "configure:4506: checking for ${ac_tool_prefix}file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4556,4562 **** - if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - echo $ac_n "checking for file""... $ac_c" 1>&6 -! echo "configure:4560: checking for file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4564,4570 ---- - if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - echo $ac_n "checking for file""... $ac_c" 1>&6 -! echo "configure:4568: checking for file" >&5 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4627,4633 **** - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. - set dummy ${ac_tool_prefix}ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4631: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4635,4641 ---- - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. - set dummy ${ac_tool_prefix}ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4639: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4659,4665 **** - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4663: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4667,4673 ---- - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4671: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4694,4700 **** - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4698: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4702,4708 ---- - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4706: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4726,4732 **** - # Extract the first word of "strip", so it can be a program name with args. - set dummy strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4730: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4734,4740 ---- - # Extract the first word of "strip", so it can be a program name with args. - set dummy strip; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:4738: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4775,4782 **** - case $host in - *-*-irix6*) - # Find out which ABI we are using. -! echo '#line 4779 "configure"' > conftest.$ac_ext -! if { (eval echo configure:4780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" ---- 4783,4790 ---- - case $host in - *-*-irix6*) - # Find out which ABI we are using. -! echo '#line 4787 "configure"' > conftest.$ac_ext -! if { (eval echo configure:4788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" -*************** -*** 4797,4803 **** - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -! echo "configure:4801: checking whether the C compiler needs -belf" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4805,4811 ---- - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -! echo "configure:4809: checking whether the C compiler needs -belf" >&5 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 4810,4823 **** - cross_compiling=$ac_cv_prog_cc_cross - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes - else ---- 4818,4831 ---- - cross_compiling=$ac_cv_prog_cc_cross - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_cc_needs_belf=yes - else -*************** -*** 4932,4938 **** - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking for objdir""... $ac_c" 1>&6 -! echo "configure:4936: checking for objdir" >&5 - rm -f .libs 2>/dev/null - mkdir .libs 2>/dev/null - if test -d .libs; then ---- 4940,4946 ---- - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking for objdir""... $ac_c" 1>&6 -! echo "configure:4944: checking for objdir" >&5 - rm -f .libs 2>/dev/null - mkdir .libs 2>/dev/null - if test -d .libs; then -*************** -*** 4963,4969 **** - # in isolation, and that seeing it set (from the cache) indicates that - # the associated values are set (in the cache) correctly too. - echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 -! echo "configure:4967: checking for $compiler option to produce PIC" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 4971,4977 ---- - # in isolation, and that seeing it set (from the cache) indicates that - # the associated values are set (in the cache) correctly too. - echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 -! echo "configure:4975: checking for $compiler option to produce PIC" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 5115,5135 **** - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 -! echo "configure:5119: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - case $host_os in - hpux9* | hpux10* | hpux11*) ---- 5123,5143 ---- - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 -! echo "configure:5127: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - case $host_os in - hpux9* | hpux10* | hpux11*) -*************** -*** 5185,5191 **** - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 -! echo "configure:5189: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 5193,5199 ---- - ## FIXME: this should be a separate macro - ## - echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 -! echo "configure:5197: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 - if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 5193,5206 **** - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_prog_cc_static_works=yes - else ---- 5201,5214 ---- - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - lt_cv_prog_cc_static_works=yes - else -*************** -*** 5231,5237 **** - ## - # Check to see if options -o and -c are simultaneously supported by compiler - echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 -! echo "configure:5235: checking if $compiler supports -c -o file.$ac_objext" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 5239,5245 ---- - ## - # Check to see if options -o and -c are simultaneously supported by compiler - echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 -! echo "configure:5243: checking if $compiler supports -c -o file.$ac_objext" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 5250,5256 **** - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" - compiler_c_o=no -! if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then ---- 5258,5264 ---- - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" - compiler_c_o=no -! if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s out/conftest.err; then -*************** -*** 5279,5285 **** - if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 -! echo "configure:5283: checking if $compiler supports -c -o file.lo" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 5287,5293 ---- - if test x"$compiler_c_o" = x"yes"; then - # Check to see if we can write to a .lo - echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 -! echo "configure:5291: checking if $compiler supports -c -o file.lo" >&5 - if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 5288,5301 **** - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings ---- 5296,5309 ---- - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -c -o conftest.lo" - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -*************** -*** 5329,5335 **** - if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 -! echo "configure:5333: checking if we can lock with hard links" >&5 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no ---- 5337,5343 ---- - if test "$compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 -! echo "configure:5341: checking if we can lock with hard links" >&5 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no -*************** -*** 5352,5371 **** - if test "$GCC" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 -! echo "configure:5356: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - echo "int some_variable = 0;" > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" - compiler_rtti_exceptions=no - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings ---- 5360,5379 ---- - if test "$GCC" = yes; then - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 -! echo "configure:5364: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - echo "int some_variable = 0;" > conftest.$ac_ext - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" - compiler_rtti_exceptions=no - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -*************** -*** 5396,5402 **** - ## - # See if the linker supports building shared libraries. - echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 -! echo "configure:5400: checking whether the linker ($LD) supports shared libraries" >&5 - - allow_undefined_flag= - no_undefined_flag= ---- 5404,5410 ---- - ## - # See if the linker supports building shared libraries. - echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 -! echo "configure:5408: checking whether the linker ($LD) supports shared libraries" >&5 - - allow_undefined_flag= - no_undefined_flag= -*************** -*** 6016,6022 **** - ## - # Check hardcoding attributes. - echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 -! echo "configure:6020: checking how to hardcode library paths into programs" >&5 - hardcode_action= - if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then ---- 6024,6030 ---- - ## - # Check hardcoding attributes. - echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 -! echo "configure:6028: checking how to hardcode library paths into programs" >&5 - hardcode_action= - if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then -*************** -*** 6048,6054 **** - striplib= - old_striplib= - echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 -! echo "configure:6052: checking whether stripping libraries is possible" >&5 - if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" ---- 6056,6062 ---- - striplib= - old_striplib= - echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 -! echo "configure:6060: checking whether stripping libraries is possible" >&5 - if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" -*************** -*** 6066,6072 **** - ## - # PORTME Fill in your ld.so characteristics - echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 -! echo "configure:6070: checking dynamic linker characteristics" >&5 - library_names_spec= - libname_spec='lib$name' - soname_spec= ---- 6074,6080 ---- - ## - # PORTME Fill in your ld.so characteristics - echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 -! echo "configure:6078: checking dynamic linker characteristics" >&5 - library_names_spec= - libname_spec='lib$name' - soname_spec= -*************** -*** 6456,6462 **** - ## - # Report the final consequences. - echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 -! echo "configure:6460: checking if libtool supports shared libraries" >&5 - echo "$ac_t""$can_build_shared" 1>&6 - ## - ## END FIXME ---- 6464,6470 ---- - ## - # Report the final consequences. - echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 -! echo "configure:6468: checking if libtool supports shared libraries" >&5 - echo "$ac_t""$can_build_shared" 1>&6 - ## - ## END FIXME -*************** -*** 6497,6503 **** - - *) - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -! echo "configure:6501: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 6505,6511 ---- - - *) - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -! echo "configure:6509: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 6505,6511 **** - ac_save_LIBS="$LIBS" - LIBS="-ldl $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 6524,6530 ---- - dlopen() - ; return 0; } - EOF -! if { (eval echo configure:6528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 6535,6546 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -! echo "configure:6539: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -! echo "configure:6547: checking for dlopen" >&5 - if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else ---- 6571,6577 ---- - - ; return 0; } - EOF -! if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" - else -*************** -*** 6581,6592 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -! echo "configure:6585: checking for shl_load" >&5 - if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 - echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -! echo "configure:6593: checking for shl_load" >&5 - if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" - else ---- 6617,6623 ---- - - ; return 0; } - EOF -! if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_shl_load=yes" - else -*************** -*** 6627,6633 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 -! echo "configure:6631: checking for dlopen in -lsvld" >&5 - ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 6635,6641 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 -! echo "configure:6639: checking for dlopen in -lsvld" >&5 - ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 6635,6641 **** - ac_save_LIBS="$LIBS" - LIBS="-lsvld $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 6654,6660 ---- - dlopen() - ; return 0; } - EOF -! if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 6665,6671 **** - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -! echo "configure:6669: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 ---- 6673,6679 ---- - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -! echo "configure:6677: checking for shl_load in -ldld" >&5 - ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -*************** -*** 6673,6679 **** - ac_save_LIBS="$LIBS" - LIBS="-ldld $LIBS" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else ---- 6692,6698 ---- - shl_load() - ; return 0; } - EOF -! if { (eval echo configure:6696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" - else -*************** -*** 6737,6743 **** - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -! echo "configure:6741: checking whether a program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 6745,6751 ---- - LIBS="$lt_cv_dlopen_libs $LIBS" - - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -! echo "configure:6749: checking whether a program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 6747,6753 **** - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in ---- 6816,6822 ---- - exit (status); - } - EOF -! if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -*************** -*** 6831,6837 **** - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -! echo "configure:6835: checking whether a statically linked program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 6839,6845 ---- - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -! echo "configure:6843: checking whether a statically linked program can dlopen itself" >&5 - if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 6841,6847 **** - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in ---- 6910,6916 ---- - exit (status); - } - EOF -! if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in -*************** -*** 6953,6966 **** - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 -! echo "configure:6957: checking whether -lc should be explicitly linked in" >&5 - if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - $rm conftest* - echo 'static int dummy;' > conftest.$ac_ext - -! if { (eval echo configure:6964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext ---- 6961,6974 ---- - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 -! echo "configure:6965: checking whether -lc should be explicitly linked in" >&5 - if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - $rm conftest* - echo 'static int dummy;' > conftest.$ac_ext - -! if { (eval echo configure:6972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext -*************** -*** 6973,6979 **** - libname=conftest - save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= -! if { (eval echo configure:6977: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } - then - lt_cv_archive_cmds_need_lc=no - else ---- 6981,6987 ---- - libname=conftest - save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= -! if { (eval echo configure:6985: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } - then - lt_cv_archive_cmds_need_lc=no - else -*************** -*** 7630,7638 **** - # the right suffix on the files. - # - echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -! echo "configure:7634: checking for IPv6 structures" >&5 - cat > conftest.$ac_ext < ---- 7638,7646 ---- - # the right suffix on the files. - # - echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -! echo "configure:7642: checking for IPv6 structures" >&5 - cat > conftest.$ac_ext < -*************** -*** 7642,7648 **** - struct sockaddr_in6 sin6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - found_ipv6=yes ---- 7650,7656 ---- - struct sockaddr_in6 sin6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - found_ipv6=yes -*************** -*** 7660,7666 **** - # This is done before other IPv6 linking tests to LIBS is properly set. - # - echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 -! echo "configure:7664: checking for Kame IPv6 support" >&5 - # Check whether --with-kame or --without-kame was given. - if test "${with_kame+set}" = set; then - withval="$with_kame" ---- 7668,7674 ---- - # This is done before other IPv6 linking tests to LIBS is properly set. - # - echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6 -! echo "configure:7672: checking for Kame IPv6 support" >&5 - # Check whether --with-kame or --without-kame was given. - if test "${with_kame+set}" = set; then - withval="$with_kame" -*************** -*** 7751,7759 **** - LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" - - echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 -! echo "configure:7755: checking for in6_addr" >&5 - cat > conftest.$ac_ext < ---- 7759,7767 ---- - LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" - - echo $ac_n "checking for in6_addr""... $ac_c" 1>&6 -! echo "configure:7763: checking for in6_addr" >&5 - cat > conftest.$ac_ext < -*************** -*** 7766,7772 **** - struct in6_addr in6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" ---- 7774,7780 ---- - struct in6_addr in6; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" -*************** -*** 7784,7792 **** - rm -f conftest* - - echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 -! echo "configure:7788: checking for in6addr_any" >&5 - cat > conftest.$ac_ext < ---- 7792,7800 ---- - rm -f conftest* - - echo $ac_n "checking for in6addr_any""... $ac_c" 1>&6 -! echo "configure:7796: checking for in6addr_any" >&5 - cat > conftest.$ac_ext < -*************** -*** 7800,7806 **** - struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); - ; return 0; } - EOF -! if { (eval echo configure:7804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" ---- 7808,7814 ---- - struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]); - ; return 0; } - EOF -! if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" -*************** -*** 7816,7824 **** - rm -f conftest* - - echo $ac_n "checking for in6addr_loopback""... $ac_c" 1>&6 -! echo "configure:7820: checking for in6addr_loopback" >&5 - cat > conftest.$ac_ext < ---- 7824,7832 ---- - rm -f conftest* - - echo $ac_n "checking for in6addr_loopback""... $ac_c" 1>&6 -! echo "configure:7828: checking for in6addr_loopback" >&5 - cat > conftest.$ac_ext < -*************** -*** 7832,7838 **** - struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); - ; return 0; } - EOF -! if { (eval echo configure:7836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" ---- 7840,7846 ---- - struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]); - ; return 0; } - EOF -! if { (eval echo configure:7844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" -*************** -*** 7848,7856 **** - rm -f conftest* - - echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -! echo "configure:7852: checking for sin6_scope_id in struct sockaddr_in6" >&5 - cat > conftest.$ac_ext < ---- 7856,7864 ---- - rm -f conftest* - - echo $ac_n "checking for sin6_scope_id in struct sockaddr_in6""... $ac_c" 1>&6 -! echo "configure:7860: checking for sin6_scope_id in struct sockaddr_in6" >&5 - cat > conftest.$ac_ext < -*************** -*** 7863,7869 **** - struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" ---- 7871,7877 ---- - struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - result="#define LWRES_HAVE_SIN6_SCOPE_ID 1" -*************** -*** 7878,7886 **** - LWRES_HAVE_SIN6_SCOPE_ID="$result" - - echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -! echo "configure:7882: checking for in6_pktinfo" >&5 - cat > conftest.$ac_ext < ---- 7886,7894 ---- - LWRES_HAVE_SIN6_SCOPE_ID="$result" - - echo $ac_n "checking for in6_pktinfo""... $ac_c" 1>&6 -! echo "configure:7890: checking for in6_pktinfo" >&5 - cat > conftest.$ac_ext < -*************** -*** 7893,7899 **** - struct in6_pktinfo xyzzy; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" ---- 7901,7907 ---- - struct in6_pktinfo xyzzy; return (0); - ; return 0; } - EOF -! if { (eval echo configure:7905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1" -*************** -*** 7948,7956 **** - # - - echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -! echo "configure:7952: checking for inet_ntop" >&5 - cat > conftest.$ac_ext < ---- 7956,7964 ---- - # - - echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -! echo "configure:7960: checking for inet_ntop" >&5 - cat > conftest.$ac_ext < -*************** -*** 7960,7966 **** - inet_ntop(0, 0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" ---- 7968,7974 ---- - inet_ntop(0, 0, 0, 0); return (0); - ; return 0; } - EOF -! if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP" -*************** -*** 7981,7993 **** - # zeros should also be rejected. - - echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -! echo "configure:7985: checking for inet_pton" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""assuming target platform has working inet_pton" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" - else - cat > conftest.$ac_ext < ---- 7989,8001 ---- - # zeros should also be rejected. - - echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -! echo "configure:7993: checking for inet_pton" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""assuming target platform has working inet_pton" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" - else - cat > conftest.$ac_ext < -*************** -*** 7997,8003 **** - main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : - inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); } - EOF -! if { (eval echo configure:8001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" ---- 8005,8011 ---- - main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : - inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); } - EOF -! if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON" -*************** -*** 8015,8023 **** - - - echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -! echo "configure:8019: checking for inet_aton" >&5 - cat > conftest.$ac_ext < ---- 8023,8031 ---- - - - echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -! echo "configure:8027: checking for inet_aton" >&5 - cat > conftest.$ac_ext < -*************** -*** 8027,8033 **** - struct in_addr in; inet_aton(0, &in); return (0); - ; return 0; } - EOF -! if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" ---- 8035,8041 ---- - struct in_addr in; inet_aton(0, &in); return (0); - ; return 0; } - EOF -! if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON" -*************** -*** 8060,8068 **** - esac - - echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -! echo "configure:8064: checking for sa_len in struct sockaddr" >&5 - cat > conftest.$ac_ext < ---- 8068,8076 ---- - esac - - echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6 -! echo "configure:8072: checking for sa_len in struct sockaddr" >&5 - cat > conftest.$ac_ext < -*************** -*** 8071,8077 **** - struct sockaddr sa; sa.sa_len = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" ---- 8079,8085 ---- - struct sockaddr sa; sa.sa_len = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" -*************** -*** 8092,8100 **** - # Look for a 4.4BSD or 4.3BSD struct msghdr - # - echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 -! echo "configure:8096: checking for struct msghdr flavor" >&5 - cat > conftest.$ac_ext < ---- 8100,8108 ---- - # Look for a 4.4BSD or 4.3BSD struct msghdr - # - echo $ac_n "checking for struct msghdr flavor""... $ac_c" 1>&6 -! echo "configure:8104: checking for struct msghdr flavor" >&5 - cat > conftest.$ac_ext < -*************** -*** 8103,8109 **** - struct msghdr msg; msg.msg_flags = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""4.4BSD" 1>&6 - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" ---- 8111,8117 ---- - struct msghdr msg; msg.msg_flags = 0; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""4.4BSD" 1>&6 - ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1" -*************** -*** 8121,8129 **** - # Look for in_port_t. - # - echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -! echo "configure:8125: checking for type in_port_t" >&5 - cat > conftest.$ac_ext < ---- 8129,8137 ---- - # Look for in_port_t. - # - echo $ac_n "checking for type in_port_t""... $ac_c" 1>&6 -! echo "configure:8133: checking for type in_port_t" >&5 - cat > conftest.$ac_ext < -*************** -*** 8132,8138 **** - in_port_t port = 25; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" ---- 8140,8146 ---- - in_port_t port = 25; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT" -*************** -*** 8150,8158 **** - # Check for addrinfo - # - echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -! echo "configure:8154: checking for struct addrinfo" >&5 - cat > conftest.$ac_ext < ---- 8158,8166 ---- - # Check for addrinfo - # - echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -! echo "configure:8162: checking for struct addrinfo" >&5 - cat > conftest.$ac_ext < -*************** -*** 8160,8166 **** - struct addrinfo a; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" ---- 8168,8174 ---- - struct addrinfo a; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" -*************** -*** 8182,8190 **** - # Check for rrsetinfo - # - echo $ac_n "checking for struct rrsetinfo""... $ac_c" 1>&6 -! echo "configure:8186: checking for struct rrsetinfo" >&5 - cat > conftest.$ac_ext < ---- 8190,8198 ---- - # Check for rrsetinfo - # - echo $ac_n "checking for struct rrsetinfo""... $ac_c" 1>&6 -! echo "configure:8194: checking for struct rrsetinfo" >&5 - cat > conftest.$ac_ext < -*************** -*** 8192,8198 **** - struct rrsetinfo r; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" ---- 8200,8206 ---- - struct rrsetinfo r; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO" -*************** -*** 8207,8215 **** - - - echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -! echo "configure:8211: checking for int sethostent" >&5 - cat > conftest.$ac_ext < ---- 8215,8223 ---- - - - echo $ac_n "checking for int sethostent""... $ac_c" 1>&6 -! echo "configure:8219: checking for int sethostent" >&5 - cat > conftest.$ac_ext < -*************** -*** 8217,8223 **** - int i = sethostent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" ---- 8225,8231 ---- - int i = sethostent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1" -*************** -*** 8232,8240 **** - - - echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -! echo "configure:8236: checking for int endhostent" >&5 - cat > conftest.$ac_ext < ---- 8240,8248 ---- - - - echo $ac_n "checking for int endhostent""... $ac_c" 1>&6 -! echo "configure:8244: checking for int endhostent" >&5 - cat > conftest.$ac_ext < -*************** -*** 8242,8248 **** - int i = endhostent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" ---- 8250,8256 ---- - int i = endhostent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1" -*************** -*** 8257,8265 **** - - - echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -! echo "configure:8261: checking for getnetbyaddr(in_addr_t, ...)" >&5 - cat > conftest.$ac_ext < ---- 8265,8273 ---- - - - echo $ac_n "checking for getnetbyaddr(in_addr_t, ...)""... $ac_c" 1>&6 -! echo "configure:8269: checking for getnetbyaddr(in_addr_t, ...)" >&5 - cat > conftest.$ac_ext < -*************** -*** 8268,8274 **** - - ; return 0; } - EOF -! if { (eval echo configure:8272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" ---- 8276,8282 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1" -*************** -*** 8283,8291 **** - - - echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -! echo "configure:8287: checking for int setnetent" >&5 - cat > conftest.$ac_ext < ---- 8291,8299 ---- - - - echo $ac_n "checking for int setnetent""... $ac_c" 1>&6 -! echo "configure:8295: checking for int setnetent" >&5 - cat > conftest.$ac_ext < -*************** -*** 8293,8299 **** - int i = setnetent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" ---- 8301,8307 ---- - int i = setnetent(0); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1" -*************** -*** 8308,8316 **** - - - echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -! echo "configure:8312: checking for int endnetent" >&5 - cat > conftest.$ac_ext < ---- 8316,8324 ---- - - - echo $ac_n "checking for int endnetent""... $ac_c" 1>&6 -! echo "configure:8320: checking for int endnetent" >&5 - cat > conftest.$ac_ext < -*************** -*** 8318,8324 **** - int i = endnetent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" ---- 8326,8332 ---- - int i = endnetent(); return(0); - ; return 0; } - EOF -! if { (eval echo configure:8330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1" -*************** -*** 8333,8341 **** - - - echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 -! echo "configure:8337: checking for gethostbyaddr(const void *, size_t, ...)" >&5 - cat > conftest.$ac_ext < ---- 8341,8349 ---- - - - echo $ac_n "checking for gethostbyaddr(const void *, size_t, ...)""... $ac_c" 1>&6 -! echo "configure:8345: checking for gethostbyaddr(const void *, size_t, ...)" >&5 - cat > conftest.$ac_ext < -*************** -*** 8344,8350 **** - return(0); - ; return 0; } - EOF -! if { (eval echo configure:8348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" ---- 8352,8358 ---- - return(0); - ; return 0; } - EOF -! if { (eval echo configure:8356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1" -*************** -*** 8359,8367 **** - - - echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -! echo "configure:8363: checking for h_errno in netdb.h" >&5 - cat > conftest.$ac_ext < ---- 8367,8375 ---- - - - echo $ac_n "checking for h_errno in netdb.h""... $ac_c" 1>&6 -! echo "configure:8371: checking for h_errno in netdb.h" >&5 - cat > conftest.$ac_ext < -*************** -*** 8369,8375 **** - h_errno = 1; return(0); - ; return 0; } - EOF -! if { (eval echo configure:8373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" ---- 8377,8383 ---- - h_errno = 1; return(0); - ; return 0; } - EOF -! if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO" -*************** -*** 8384,8395 **** - - - echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6 -! echo "configure:8388: checking for getipnodebyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8396: checking for getipnodebyname" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getipnodebyname=yes" - else ---- 8420,8426 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getipnodebyname=yes" - else -*************** -*** 8433,8444 **** - fi - - echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6 -! echo "configure:8437: checking for getnameinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8445: checking for getnameinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getnameinfo=yes" - else ---- 8469,8475 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getnameinfo=yes" - else -*************** -*** 8482,8493 **** - fi - - echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 -! echo "configure:8486: checking for getaddrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8494: checking for getaddrinfo" >&5 - if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getaddrinfo=yes" - else ---- 8518,8524 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getaddrinfo=yes" - else -*************** -*** 8535,8546 **** - fi - - echo $ac_n "checking for gai_strerror""... $ac_c" 1>&6 -! echo "configure:8539: checking for gai_strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8547: checking for gai_strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_gai_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gai_strerror=yes" - else ---- 8571,8577 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_gai_strerror=yes" - else -*************** -*** 8593,8601 **** - # Look for a sysctl call to get the list of network interfaces. - # - echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 -! echo "configure:8597: checking for interface list sysctl" >&5 - cat > conftest.$ac_ext < ---- 8601,8609 ---- - # Look for a sysctl call to get the list of network interfaces. - # - echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6 -! echo "configure:8605: checking for interface list sysctl" >&5 - cat > conftest.$ac_ext < -*************** -*** 8625,8636 **** - # Check for some other useful functions that are not ever-present. - # - echo $ac_n "checking for strsep""... $ac_c" 1>&6 -! echo "configure:8629: checking for strsep" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strsep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8637: checking for strsep" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strsep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strsep=yes" - else ---- 8661,8667 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strsep=yes" - else -*************** -*** 8674,8685 **** - fi - - echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -! echo "configure:8678: checking for vsnprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8686: checking for vsnprintf" >&5 - if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vsnprintf=yes" - else ---- 8710,8716 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vsnprintf=yes" - else -*************** -*** 8727,8738 **** - - - echo $ac_n "checking for strerror""... $ac_c" 1>&6 -! echo "configure:8731: checking for strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8739: checking for strerror" >&5 - if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strerror=yes" - else ---- 8763,8769 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strerror=yes" - else -*************** -*** 8789,8805 **** - # but that's defined elsewhere since we don't use configure on Win32. - # - echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6 -! echo "configure:8793: checking printf format modifier for 64-bit integers" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""assuming target platform uses ll" 1>&6 - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""l" 1>&6 - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' ---- 8797,8813 ---- - # but that's defined elsewhere since we don't use configure on Win32. - # - echo $ac_n "checking printf format modifier for 64-bit integers""... $ac_c" 1>&6 -! echo "configure:8801: checking printf format modifier for 64-bit integers" >&5 - if test "$cross_compiling" = yes; then - echo "$ac_t""assuming target platform uses ll" 1>&6 - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"' - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""l" 1>&6 - ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"' -*************** -*** 8819,8830 **** - # Security Stuff - # - echo $ac_n "checking for chroot""... $ac_c" 1>&6 -! echo "configure:8823: checking for chroot" >&5 - if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&6 -! echo "configure:8831: checking for chroot" >&5 - if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_chroot=yes" - else ---- 8855,8861 ---- - - ; return 0; } - EOF -! if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_chroot=yes" - else -*************** -*** 8881,8897 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:8885: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:8895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 8889,8905 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:8893: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:8903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 8925,8941 **** - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:8929: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:8939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* ---- 8933,8949 ---- - do - ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -! echo "configure:8937: checking for $ac_hdr" >&5 - if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftest.$ac_ext < - EOF - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -! { (eval echo configure:8947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` - if test -z "$ac_err"; then - rm -rf conftest* -*************** -*** 8966,8974 **** - # BSD/OS, and perhaps some others, don't define rlim_t. - # - echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 -! echo "configure:8970: checking for type rlim_t" >&5 - cat > conftest.$ac_ext < ---- 8974,8982 ---- - # BSD/OS, and perhaps some others, don't define rlim_t. - # - echo $ac_n "checking for type rlim_t""... $ac_c" 1>&6 -! echo "configure:8978: checking for type rlim_t" >&5 - cat > conftest.$ac_ext < -*************** -*** 8978,8984 **** - rlim_t rl = 19671212; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" ---- 8986,8992 ---- - rlim_t rl = 19671212; return (0); - ; return 0; } - EOF -! if { (eval echo configure:8990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t" -*************** -*** 8989,9000 **** - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking type of rlim_cur""... $ac_c" 1>&6 -! echo "configure:8993: checking type of rlim_cur" >&5 - if test "$cross_compiling" = yes; then - { echo "configure: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 8997,9008 ---- - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking type of rlim_cur""... $ac_c" 1>&6 -! echo "configure:9001: checking type of rlim_cur" >&5 - if test "$cross_compiling" = yes; then - { echo "configure: error: cannot determine type of rlim_cur when cross compiling - define rlim_t" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 9002,9008 **** - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} - EOF -! if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" ---- 9010,9016 ---- - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} - EOF -! if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int" -*************** -*** 9015,9021 **** - { echo "configure: error: this cannot happen" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 9023,9029 ---- - { echo "configure: error: this cannot happen" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 9023,9029 **** - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} - EOF -! if { (eval echo configure:9027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" ---- 9031,9037 ---- - #include - main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} - EOF -! if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int" -*************** -*** 9036,9042 **** - { echo "configure: error: this cannot happen" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < ---- 9044,9050 ---- - { echo "configure: error: this cannot happen" 1>&2; exit 1; } - else - cat > conftest.$ac_ext < -*************** -*** 9044,9050 **** - #include - main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} - EOF -! if { (eval echo configure:9048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" ---- 9052,9058 ---- - #include - main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} - EOF -! if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null - then - echo "$ac_t""long long int" 1>&6 - ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int" -*************** -*** 9168,9174 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9172: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_OPENJADE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 9176,9182 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9180: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_OPENJADE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 9215,9221 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9219: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 9223,9229 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9227: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 9258,9264 **** - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9262: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PDFJADETEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else ---- 9266,9272 ---- - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -! echo "configure:9270: checking for $ac_word" >&5 - if eval "test \"`echo '$''{'ac_cv_path_PDFJADETEX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else -*************** -*** 9314,9320 **** - - SGMLCATALOG="" - echo $ac_n "checking for catalog""... $ac_c" 1>&6 -! echo "configure:9318: checking for catalog" >&5 - for d in $sgmltrees - do - f=$d/catalog ---- 9322,9328 ---- - - SGMLCATALOG="" - echo $ac_n "checking for catalog""... $ac_c" 1>&6 -! echo "configure:9326: checking for catalog" >&5 - for d in $sgmltrees - do - f=$d/catalog -*************** -*** 9356,9362 **** - - HTMLSTYLE="" - echo $ac_n "checking for html/docbook.dsl""... $ac_c" 1>&6 -! echo "configure:9360: checking for html/docbook.dsl" >&5 - for d in $stylepath - do - f=$d/html/docbook.dsl ---- 9364,9370 ---- - - HTMLSTYLE="" - echo $ac_n "checking for html/docbook.dsl""... $ac_c" 1>&6 -! echo "configure:9368: checking for html/docbook.dsl" >&5 - for d in $stylepath - do - f=$d/html/docbook.dsl -*************** -*** 9377,9383 **** - - PRINTSTYLE="" - echo $ac_n "checking for print/docbook.dsl""... $ac_c" 1>&6 -! echo "configure:9381: checking for print/docbook.dsl" >&5 - for d in $stylepath - do - f=$d/print/docbook.dsl ---- 9385,9391 ---- - - PRINTSTYLE="" - echo $ac_n "checking for print/docbook.dsl""... $ac_c" 1>&6 -! echo "configure:9389: checking for print/docbook.dsl" >&5 - for d in $stylepath - do - f=$d/print/docbook.dsl -*************** -*** 9403,9409 **** - - XMLDCL="" - echo $ac_n "checking for docbook/dsssl/modular/dtds/decls/xml.dcl""... $ac_c" 1>&6 -! echo "configure:9407: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 - for d in $sgmltrees - do - f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl ---- 9411,9417 ---- - - XMLDCL="" - echo $ac_n "checking for docbook/dsssl/modular/dtds/decls/xml.dcl""... $ac_c" 1>&6 -! echo "configure:9415: checking for docbook/dsssl/modular/dtds/decls/xml.dcl" >&5 - for d in $sgmltrees - do - f=$d/docbook/dsssl/modular/dtds/decls/xml.dcl -*************** -*** 9429,9435 **** - - DOCBOOK2MANSPEC="" - echo $ac_n "checking for docbook2X/docbook2man-spec.pl""... $ac_c" 1>&6 -! echo "configure:9433: checking for docbook2X/docbook2man-spec.pl" >&5 - for d in $sgmltrees - do - f=$d/docbook2X/docbook2man-spec.pl ---- 9437,9443 ---- - - DOCBOOK2MANSPEC="" - echo $ac_n "checking for docbook2X/docbook2man-spec.pl""... $ac_c" 1>&6 -! echo "configure:9441: checking for docbook2X/docbook2man-spec.pl" >&5 - for d in $sgmltrees - do - f=$d/docbook2X/docbook2man-spec.pl -*************** -*** 9449,9454 **** ---- 9457,9649 ---- - - - # -+ # MDN support -+ # -+ # Check whether --with-mdn or --without-mdn was given. -+ if test "${with_mdn+set}" = set; then -+ withval="$with_mdn" -+ use_mdn="$withval" -+ else -+ use_mdn="no" -+ fi -+ -+ case "$use_mdn" in -+ yes) -+ if test X$prefix = XNONE ; then -+ mdn_path=/usr/local -+ else -+ mdn_path=$prefix -+ fi -+ ;; -+ no) -+ ;; -+ *) -+ mdn_path="$use_mdn" -+ ;; -+ esac -+ -+ iconvinc= -+ iconvlib= -+ # Check whether --with-libiconv or --without-libiconv was given. -+ if test "${with_libiconv+set}" = set; then -+ withval="$with_libiconv" -+ use_libiconv="$withval" -+ else -+ use_libiconv="no" -+ fi -+ -+ case "$use_libiconv" in -+ yes) -+ if test X$prefix = XNONE ; then -+ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" -+ else -+ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" -+ fi -+ ;; -+ no) -+ iconvlib= -+ ;; -+ *) -+ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" -+ ;; -+ esac -+ -+ # Check whether --with-iconv or --without-iconv was given. -+ if test "${with_iconv+set}" = set; then -+ withval="$with_iconv" -+ iconvlib="$withval" -+ fi -+ -+ case "$iconvlib" in -+ no) -+ iconvlib= -+ ;; -+ yes) -+ iconvlib=-liconv -+ ;; -+ esac -+ -+ # Check whether --with-mdnlib or --without-mdnlib was given. -+ if test "${with_mdnlib+set}" = set; then -+ withval="$with_mdnlib" -+ mdnlib="$withval" -+ else -+ mdnlib="no" -+ fi -+ -+ if test "$mdnlib" = yes; then -+ { echo "configure: error: You must specify ARG for --with-mdnlib." 1>&2; exit 1; } -+ fi -+ -+ if test "$use_mdn" != no; then -+ cat >> confdefs.h <<\EOF -+ #define WITH_MDN 1 -+ EOF -+ -+ STD_CINCLUDES="$STD_CINCLUDES -I$mdn_path/include" -+ if test "$mdnlib" != no; then -+ LIBS="$mdnlib $iconvlib $LIBS" -+ else -+ LIBS="-L$mdn_path/lib -lmdn $iconvlib $LIBS" -+ fi -+ fi -+ for ac_hdr in locale.h -+ do -+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -+ echo "configure:9555: checking for $ac_hdr" >&5 -+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+ else -+ cat > conftest.$ac_ext < -+ EOF -+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -+ { (eval echo configure:9565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -+ if test -z "$ac_err"; then -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=yes" -+ else -+ echo "$ac_err" >&5 -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_header_$ac_safe=no" -+ fi -+ rm -f conftest* -+ fi -+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -+ cat >> confdefs.h <&6 -+ fi -+ done -+ -+ for ac_func in setlocale -+ do -+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -+ echo "configure:9594: checking for $ac_func" >&5 -+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+ else -+ cat > conftest.$ac_ext < -+ /* Override any gcc2 internal prototype to avoid an error. */ -+ /* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+ char $ac_func(); -+ -+ int main() { -+ -+ /* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+ choke me -+ #else -+ $ac_func(); -+ #endif -+ -+ ; return 0; } -+ EOF -+ if { (eval echo configure:9622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=yes" -+ else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_func_$ac_func=no" -+ fi -+ rm -f conftest* -+ fi -+ -+ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -+ cat >> confdefs.h <&6 -+ fi -+ done -+ -+ -+ # - # Substitutions - # - -*************** -*** 9849,9855 **** - - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. -! ac_max_sed_cmds=50 # Maximum number of lines to put in a sed script. - ac_file=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_cmds # Line after last line for current file. ---- 10044,10050 ---- - - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. -! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. - ac_file=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_cmds # Line after last line for current file. -Index: configure.in -diff -c mdn/othersrc/bind9/configure.in:1.1.1.8 mdn/othersrc/bind9/configure.in:1.11 -*** configure.in Tue Nov 27 16:55:48 2001 ---- configure.in Thu Nov 29 18:45:14 2001 -*************** -*** 1605,1610 **** ---- 1605,1683 ---- - NOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees) - - # -+ # MDN support -+ # -+ AC_ARG_WITH(mdn, -+ [ --with-mdn[=MPREFIX] enable MDN support using mDNkit [default PREFIX]], -+ use_mdn="$withval", use_mdn="no") -+ case "$use_mdn" in -+ yes) -+ if test X$prefix = XNONE ; then -+ mdn_path=/usr/local -+ else -+ mdn_path=$prefix -+ fi -+ ;; -+ no) -+ ;; -+ *) -+ mdn_path="$use_mdn" -+ ;; -+ esac -+ -+ iconvinc= -+ iconvlib= -+ AC_ARG_WITH(libiconv, -+ [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], -+ use_libiconv="$withval", use_libiconv="no") -+ case "$use_libiconv" in -+ yes) -+ if test X$prefix = XNONE ; then -+ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" -+ else -+ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" -+ fi -+ ;; -+ no) -+ iconvlib= -+ ;; -+ *) -+ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" -+ ;; -+ esac -+ -+ AC_ARG_WITH(iconv, -+ [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], -+ iconvlib="$withval") -+ case "$iconvlib" in -+ no) -+ iconvlib= -+ ;; -+ yes) -+ iconvlib=-liconv -+ ;; -+ esac -+ -+ AC_ARG_WITH(mdnlib, -+ [ --with-mdnlib=ARG specify libmdn], -+ mdnlib="$withval", mdnlib="no") -+ if test "$mdnlib" = yes; then -+ AC_MSG_ERROR([You must specify ARG for --with-mdnlib.]) -+ fi -+ -+ if test "$use_mdn" != no; then -+ AC_DEFINE(WITH_MDN, 1, [define if mDNkit support is to be included.]) -+ STD_CINCLUDES="$STD_CINCLUDES -I$mdn_path/include" -+ if test "$mdnlib" != no; then -+ LIBS="$mdnlib $iconvlib $LIBS" -+ else -+ LIBS="-L$mdn_path/lib -lmdn $iconvlib $LIBS" -+ fi -+ fi -+ AC_CHECK_HEADERS(locale.h) -+ AC_CHECK_FUNCS(setlocale) -+ -+ # - # Substitutions - # - AC_SUBST(BIND9_TOP_BUILDDIR) -Index: bin/dig/dig.1 -diff -c mdn/othersrc/bind9/bin/dig/dig.1:1.1.1.1 mdn/othersrc/bind9/bin/dig/dig.1:1.2 -*** bin/dig/dig.1 Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.1 Thu Nov 29 14:36:25 2001 -*************** -*** 73,79 **** - is the name of the resource record that is to be looked up. - .TP - \fBtype\fR -! indicates what type of query is required \(em - ANY, A, MX, SIG, etc. - \fItype\fR can be any valid query type. If no - \fItype\fR argument is supplied, ---- 73,79 ---- - is the name of the resource record that is to be looked up. - .TP - \fBtype\fR -! indicates what type of query is required - ANY, A, MX, SIG, etc. - \fItype\fR can be any valid query type. If no - \fItype\fR argument is supplied, -*************** -*** 336,341 **** ---- 336,352 ---- - \fI+noqr\fR which means that \fBdig\fR - will not print the initial query when it looks up the NS records for - isc.org. -+ .SH "MDN SUPPORT" -+ .PP -+ If \fBdig\fR has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ \fBdig\fR appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the \fBMDN_DISABLE\fR environment variable. -+ The MDN support is disabled if the the variable is set when -+ \fBdig\fR runs. - .SH "FILES" - .PP - \fI/etc/resolv.conf\fR -Index: bin/dig/dig.c -diff -c mdn/othersrc/bind9/bin/dig/dig.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/dig.c:1.7 -*** bin/dig/dig.c Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.c Thu Nov 29 18:45:14 2001 -*************** -*** 1305,1310 **** ---- 1305,1315 ---- - } - ISC_LIST_APPEND(lookup_list, lookup, link); - } -+ -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - } - - /* -Index: bin/dig/dig.docbook -diff -c mdn/othersrc/bind9/bin/dig/dig.docbook:1.1.1.1 mdn/othersrc/bind9/bin/dig/dig.docbook:1.2 -*** bin/dig/dig.docbook Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.docbook Thu Nov 29 14:36:26 2001 -*************** -*** 502,507 **** ---- 502,522 ---- - - - -+ MDN SUPPORT -+ -+ If dig has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ dig appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the MDN_DISABLE environment variable. -+ The MDN support is disabled if the the variable is set when -+ dig runs. -+ -+ -+ -+ - FILES - - /etc/resolv.conf -Index: bin/dig/dighost.c -diff -c mdn/othersrc/bind9/bin/dig/dighost.c:1.1.1.11 mdn/othersrc/bind9/bin/dig/dighost.c:1.26 -*** bin/dig/dighost.c Tue Nov 27 16:55:51 2001 ---- bin/dig/dighost.c Fri Nov 30 12:37:18 2001 -*************** -*** 32,37 **** ---- 32,48 ---- - #include - #include - -+ #ifdef HAVE_LOCALE_H -+ #include -+ #endif -+ -+ #ifdef WITH_MDN -+ #include -+ #include -+ #include -+ #include -+ #endif -+ - #include - #include - #include -*************** -*** 130,135 **** ---- 141,160 ---- - isc_mutex_t lookup_lock; - dig_lookup_t *current_lookup = NULL; - -+ #ifdef WITH_MDN -+ mdn_resconf_t mdnconf; -+ -+ static void initialize_mdn(void); -+ static isc_result_t output_filter(isc_buffer_t *buffer, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ static mdn_result_t append_textname(char *name, const char *origin, -+ size_t namesize); -+ static void mdn_check_result(mdn_result_t r, const char *msg); -+ -+ #define MAXDLEN 256 -+ #endif -+ - /* - * Apply and clear locks at the event level in global task. - * Can I get rid of these using shutdown events? XXX -*************** -*** 365,370 **** ---- 390,398 ---- - looknew->ignore = ISC_FALSE; - looknew->servfail_stops = ISC_FALSE; - looknew->besteffort = ISC_TRUE; -+ #ifdef WITH_MDN -+ looknew->mdn = ISC_TRUE; -+ #endif - looknew->dnssec = ISC_FALSE; - looknew->udpsize = 0; - looknew->recurse = ISC_TRUE; -*************** -*** 426,431 **** ---- 454,462 ---- - looknew->ignore = lookold->ignore; - looknew->servfail_stops = lookold->servfail_stops; - looknew->besteffort = lookold->besteffort; -+ #ifdef WITH_MDN -+ looknew->mdn = ISC_TRUE; -+ #endif - looknew->dnssec = lookold->dnssec; - looknew->udpsize = lookold->udpsize; - looknew->recurse = lookold->recurse; -*************** -*** 648,653 **** ---- 679,688 ---- - ISC_LIST_APPEND(server_list, srv, link); - } - -+ #ifdef WITH_MDN -+ initialize_mdn(); -+ #endif -+ - if (keyfile[0] != 0) - setup_file_key(); - else if (keysecret[0] != 0) -*************** -*** 1168,1174 **** ---- 1203,1220 ---- - isc_buffer_t b; - dns_compress_t cctx; - char store[MXNAME]; -+ #ifdef WITH_MDN -+ mdn_result_t mr; -+ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; -+ #endif - -+ #ifdef WITH_MDN -+ if (lookup->mdn == ISC_TRUE) -+ dns_name_settotextfilter(output_filter); -+ else -+ dns_name_settotextfilter(NULL); -+ #endif -+ - REQUIRE(lookup != NULL); - INSIST(!free_now); - -*************** -*** 1196,1201 **** ---- 1242,1262 ---- - isc_buffer_init(&lookup->onamebuf, lookup->onamespace, - sizeof(lookup->onamespace)); - -+ #ifdef WITH_MDN -+ if (lookup->mdn) { -+ /* -+ * We cannot convert `textname' and `origin' separately. -+ * `textname' doesn't contain TLD, but local mapping needs -+ * TLD. -+ */ -+ mr = mdn_res_nameconv(mdnconf, "ld", lookup->textname, -+ utf8_textname, sizeof(utf8_textname)); -+ mdn_check_result(mr, "convert textname to UTF-8"); -+ } else { -+ strcpy(utf8_textname, lookup->textname); -+ } -+ #endif -+ - /* - * If the name has too many dots, force the origin to be NULL - * (which produces an absolute lookup). Otherwise, take the origin -*************** -*** 1204,1215 **** ---- 1265,1307 ---- - * is TRUE or we got a domain line in the resolv.conf file. - */ - /* XXX New search here? */ -+ #ifdef WITH_MDN -+ if ((count_dots(utf8_textname) >= ndots) || !usesearch) -+ lookup->origin = NULL; /* Force abs lookup */ -+ else if (lookup->origin == NULL && lookup->new_search && usesearch) { -+ lookup->origin = ISC_LIST_HEAD(search_list); -+ } -+ #else - if ((count_dots(lookup->textname) >= ndots) || !usesearch) - lookup->origin = NULL; /* Force abs lookup */ - else if (lookup->origin == NULL && lookup->new_search && usesearch) { - lookup->origin = ISC_LIST_HEAD(search_list); - } -+ #endif -+ -+ #ifdef WITH_MDN -+ if (lookup->mdn) { -+ if (lookup->origin != NULL) { -+ mr = mdn_res_nameconv(mdnconf, "ld", -+ lookup->origin->origin, -+ utf8_origin, -+ sizeof(utf8_origin)); -+ mdn_check_result(mr, "convert origin to UTF-8"); -+ mr = append_textname(utf8_textname, utf8_origin, -+ sizeof(utf8_textname)); -+ mdn_check_result(mr, "append origin to textname"); -+ } -+ mr = mdn_res_nameconv(mdnconf, "MNI", utf8_textname, -+ idn_textname, sizeof(idn_textname)); -+ mdn_check_result(mr, "convert UTF-8 textname to IDN encoding"); -+ } -+ #endif -+ -+ #ifdef WITH_MDN -+ if (lookup->origin != NULL && !lookup->mdn) { -+ #else - if (lookup->origin != NULL) { -+ #endif - debug("trying origin %s", lookup->origin->origin); - result = dns_message_gettempname(lookup->sendmsg, - &lookup->oname); -*************** -*** 1253,1258 **** ---- 1345,1361 ---- - debug("using root origin"); - if (lookup->trace && lookup->trace_root) - dns_name_clone(dns_rootname, lookup->name); -+ #ifdef WITH_MDN -+ else if (lookup->mdn) { -+ len = strlen(idn_textname); -+ isc_buffer_init(&b, idn_textname, len); -+ isc_buffer_add(&b, len); -+ result = dns_name_fromtext(lookup->name, &b, -+ dns_rootname, -+ ISC_FALSE, -+ &lookup->namebuf); -+ } -+ #endif - else { - len = strlen(lookup->textname); - isc_buffer_init(&b, lookup->textname, len); -*************** -*** 2588,2590 **** ---- 2691,2806 ---- - if (mctx != NULL) - isc_mem_destroy(&mctx); - } -+ -+ #ifdef WITH_MDN -+ static void -+ initialize_mdn(void) { -+ mdn_result_t r; -+ -+ #ifdef HAVE_SETLOCALE -+ /* Set locale */ -+ (void)setlocale(LC_ALL, ""); -+ #endif -+ -+ /* General initialization. */ -+ r = mdn_resconf_initialize(); -+ if (r != mdn_success) -+ fatal("mdn initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Create configuration context. */ -+ r = mdn_resconf_create(&mdnconf); -+ if (r != mdn_success) -+ fatal("mdn resconf initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ -+ /* Load mdn configuration file. */ -+ r = mdn_resconf_loadfile(mdnconf, NULL); -+ if (r != mdn_success) -+ fatal("mdn configuration loading failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Set domain name -> text post-conversion filter. */ -+ dns_name_settotextfilter(output_filter); -+ } -+ -+ static isc_result_t -+ output_filter(isc_buffer_t *buffer, unsigned int used_org, -+ isc_boolean_t absolute) -+ { -+ char tmp1[MAXDLEN], tmp2[MAXDLEN]; -+ size_t fromlen, tolen; -+ isc_boolean_t end_with_dot; -+ -+ /* -+ * Copy contents of 'buffer' to 'tmp1', supply trailing dot -+ * if 'absolute' is true, and terminate with NUL. -+ */ -+ fromlen = isc_buffer_usedlength(buffer) - used_org; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); -+ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; -+ if (absolute && !end_with_dot) { -+ fromlen++; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ tmp1[fromlen - 1] = '.'; -+ } -+ tmp1[fromlen] = '\0'; -+ -+ /* -+ * Convert contents of 'tmp1' to local encoding. -+ */ -+ if (mdn_res_nameconv(mdnconf, "i!NL", tmp1, tmp2, MAXDLEN) -+ != mdn_success) -+ return (ISC_R_SUCCESS); -+ strcpy(tmp1, tmp2); -+ -+ /* -+ * Copy the converted contents in 'tmp1' back to 'buffer'. -+ * If we have appended trailing dot, remove it. -+ */ -+ tolen = strlen(tmp1); -+ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') -+ tolen--; -+ -+ if (isc_buffer_length(buffer) < used_org + tolen) -+ return (ISC_R_NOSPACE); -+ -+ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); -+ memcpy(isc_buffer_used(buffer), tmp1, tolen); -+ isc_buffer_add(buffer, tolen); -+ -+ return (ISC_R_SUCCESS); -+ } -+ -+ static mdn_result_t -+ append_textname(char *name, const char *origin, size_t namesize) { -+ size_t namelen = strlen(name); -+ size_t originlen = strlen(origin); -+ -+ /* Already absolute? */ -+ if (namelen > 0 && name[namelen - 1] == '.') -+ return mdn_success; -+ -+ /* Append dot and origin */ -+ -+ if (namelen + 1 + originlen >= namesize) -+ return mdn_buffer_overflow; -+ -+ name[namelen++] = '.'; -+ (void)strcpy(name + namelen, origin); -+ return mdn_success; -+ } -+ -+ static void -+ mdn_check_result(mdn_result_t r, const char *msg) { -+ if (r != mdn_success) { -+ exitcode = 1; -+ fatal("%s: %s", msg, mdn_result_tostring(r)); -+ } -+ } -+ -+ #endif /* WITH_MDN */ -Index: bin/dig/host.1 -diff -c mdn/othersrc/bind9/bin/dig/host.1:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.1:1.2 -*** bin/dig/host.1 Tue Nov 27 16:55:51 2001 ---- bin/dig/host.1 Thu Nov 29 14:36:26 2001 -*************** -*** 87,94 **** - retries will default to 1. - .PP - Non-recursive queries can be made via the \fB-r\fR option. -! Setting this option clears the \fBRD\fR \(em recursion -! desired \(em bit in the query which \fBhost\fR makes. - This should mean that the name server receiving the query will not - attempt to resolve \fIname\fR. The - \fB-r\fR option enables \fBhost\fR to mimic ---- 87,94 ---- - retries will default to 1. - .PP - Non-recursive queries can be made via the \fB-r\fR option. -! Setting this option clears the \fBRD\fR recursion -! desired bit in the query which \fBhost\fR makes. - This should mean that the name server receiving the query will not - attempt to resolve \fIname\fR. The - \fB-r\fR option enables \fBhost\fR to mimic -*************** -*** 120,125 **** ---- 120,136 ---- - effectively wait forever for a reply. The time to wait for a response - will be set to the number of seconds given by the hardware's maximum - value for an integer quantity. -+ .SH "MDN SUPPORT" -+ .PP -+ If \fBhost\fR has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ \fBhost\fR appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the \fBMDN_DISABLE\fR environment variable. -+ The MDN support is disabled if the the variable is set when -+ \fBhost\fR runs. - .SH "FILES" - .PP - \fI/etc/resolv.conf\fR -Index: bin/dig/host.c -diff -c mdn/othersrc/bind9/bin/dig/host.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/host.c:1.7 -*** bin/dig/host.c Tue Nov 27 16:55:51 2001 ---- bin/dig/host.c Thu Nov 29 18:45:14 2001 -*************** -*** 666,671 **** ---- 666,676 ---- - lookup->new_search = ISC_TRUE; - ISC_LIST_APPEND(lookup_list, lookup, link); - -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif -+ - usesearch = ISC_TRUE; - } - -Index: bin/dig/host.docbook -diff -c mdn/othersrc/bind9/bin/dig/host.docbook:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.docbook:1.2 -*** bin/dig/host.docbook Tue Nov 27 16:55:51 2001 ---- bin/dig/host.docbook Thu Nov 29 14:36:26 2001 -*************** -*** 181,186 **** ---- 181,201 ---- - - - -+ MDN SUPPORT -+ -+ If host has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ host appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the MDN_DISABLE environment variable. -+ The MDN support is disabled if the the variable is set when -+ host runs. -+ -+ -+ -+ - FILES - - /etc/resolv.conf -Index: bin/dig/nslookup.c -diff -c mdn/othersrc/bind9/bin/dig/nslookup.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/nslookup.c:1.7 -*** bin/dig/nslookup.c Tue Nov 27 16:55:51 2001 ---- bin/dig/nslookup.c Thu Nov 29 18:45:14 2001 -*************** -*** 656,661 **** ---- 656,665 ---- - ISC_LIST_APPEND(lookup_list, lookup, link); - lookup->origin = NULL; - ISC_LIST_INIT(lookup->my_server_list); -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - debug("looking up %s", lookup->textname); - } - -Index: bin/dig/include/dig/dig.h -diff -c mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.1.1.6 mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.7 -*** bin/dig/include/dig/dig.h Tue Nov 27 16:55:51 2001 ---- bin/dig/include/dig/dig.h Thu Nov 29 18:45:14 2001 -*************** -*** 74,79 **** ---- 74,86 ---- - * be 1. - */ - -+ /* -+ * Name of environment variable which disables MDN support if defined. -+ */ -+ #ifdef WITH_MDN -+ #define MDN_DISABLE_ENVVAR_NAME "MDN_DISABLE" -+ #endif -+ - ISC_LANG_BEGINDECLS - - typedef struct dig_lookup dig_lookup_t; -*************** -*** 109,114 **** ---- 116,124 ---- - servfail_stops, - new_search, - besteffort, -+ #ifdef WITH_MDN -+ mdn, -+ #endif - dnssec; - char textname[MXNAME]; /* Name we're going to be looking up */ - char cmdline[MXNAME]; -Index: lib/dns/name.c -diff -c mdn/othersrc/bind9/lib/dns/name.c:1.1.1.9 mdn/othersrc/bind9/lib/dns/name.c:1.12 -*** lib/dns/name.c Tue Nov 27 16:57:32 2001 ---- lib/dns/name.c Thu Nov 29 18:45:14 2001 -*************** -*** 194,199 **** ---- 194,206 ---- - /* XXXDCL make const? */ - dns_name_t *dns_wildcardname = &wild; - -+ #ifdef WITH_MDN -+ /* -+ * dns_name_t to text post-conversion procedure. -+ */ -+ static dns_name_totextfilter_t totext_filter_proc = NULL; -+ #endif -+ - static void - set_offsets(const dns_name_t *name, unsigned char *offsets, - dns_name_t *set_name); -*************** -*** 1682,1687 **** ---- 1689,1697 ---- - unsigned int labels; - isc_boolean_t saw_root = ISC_FALSE; - char num[4]; -+ #ifdef WITH_MDN -+ unsigned int oused = target->used; -+ #endif - - /* - * This function assumes the name is in proper uncompressed -*************** -*** 1859,1864 **** ---- 1869,1878 ---- - - isc_buffer_add(target, tlen - trem); - -+ #ifdef WITH_MDN -+ if (totext_filter_proc != NULL) -+ return ((*totext_filter_proc)(target, oused, saw_root)); -+ #endif - return (ISC_R_SUCCESS); - } - -*************** -*** 3315,3317 **** ---- 3329,3337 ---- - return (ISC_R_SUCCESS); - } - -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc) { -+ totext_filter_proc = proc; -+ } -+ #endif -Index: lib/dns/include/dns/name.h -diff -c mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.1.1.6 mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.8 -*** lib/dns/include/dns/name.h Tue Nov 27 16:57:38 2001 ---- lib/dns/include/dns/name.h Thu Nov 29 18:45:14 2001 -*************** -*** 218,223 **** ---- 218,234 ---- - */ - #define DNS_NAME_MAXWIRE 255 - -+ #ifdef WITH_MDN -+ /* -+ * Text output filter procedure. -+ * 'target' is the buffer to be converted. The region to be converted -+ * is from 'buffer'->base + 'used_org' to the end of the used region. -+ */ -+ typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ #endif -+ - /*** - *** Initialization - ***/ -*************** -*** 1243,1248 **** ---- 1254,1267 ---- - * 'size' > 0. - * - */ -+ -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc); -+ /* -+ * Call 'proc' at the end of dns_name_totext. -+ */ -+ #endif /* WITH_MDN */ - - #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) - /* diff --git a/contrib/idn/mdnkit/patch/bind9/patch.configure b/contrib/idn/mdnkit/patch/bind9/patch.configure deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/contrib/idn/mdnkit/patch/bind9/patch.most b/contrib/idn/mdnkit/patch/bind9/patch.most deleted file mode 100644 index a23bea0a0d..0000000000 --- a/contrib/idn/mdnkit/patch/bind9/patch.most +++ /dev/null @@ -1,910 +0,0 @@ -MDN patch for bind-9.2.0 -======================== - - -This is a patch file for ISC BIND 9.2.0 to make it work with -internationalized/multilingual domain names. With this patch you'll -get MDN-aware dig/host/nslookup. - -To apply this patch, you should go to the top directory of the BIND -distribution (where you see `README' file), then invoke `patch' -command like this: - - % patch -p0 < this-file - -Then follow the instructions described in `README.mdnkit' to compile -and install. - - -Index: README.mdnkit -diff -c /dev/null mdn/othersrc/bind9/README.mdnkit:1.9 -*** README.mdnkit Thu Dec 6 13:51:44 2001 ---- README.mdnkit Wed Aug 22 15:19:31 2001 -*************** -*** 0 **** ---- 1,124 ---- -+ -+ BIND-9 MDN patch -+ -+ Japan Network Information Center (JPNIC) -+ -+ -+ * What is this patch for? -+ -+ This patch adds multilingual domain name (MDN) support to BIND-9. -+ You'll get multilingualized version of dig/host/nslookup commands. -+ -+ + mulltilingualized dig/host/nslookup -+ dig/host/nslookup accepts non-ASCII domain names in the local -+ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by -+ the locale information. The domain names are normalized and -+ converted to the encoding on the DNS protocol, and sent to DNS -+ servers. The replies are converted back to the local codeset -+ and displayed. -+ -+ -+ * Compilation & installation -+ -+ 0. Prerequisite -+ -+ You have to build and install mDNkit before building this patched version -+ of bind-9. -+ -+ 1. Running configure script -+ -+ Run `configure' in the top directory. See `README' for the -+ configuration options. -+ -+ This patch adds the following 4 options to `configure'. You should -+ at least specify `--with-mdn' option to enable MDN support. -+ -+ --with-mdn[=MDN_PREFIX] -+ To enable MDN support, you have to specify `--with-mdn' option. -+ The argument MDN_PREFIX is the install prefix of mDNkit. If -+ MDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') -+ is assumed. -+ -+ --with-libiconv[=LIBICONV_PREFIX] -+ Specify this option if mDNkit you have installed links GNU -+ libiconv. The argument LIBICONV_PREFIX is install prefix of -+ GNU libiconv. If the argument is omitted, PREFIX (derived -+ from `--prefix=PREFIX') is assumed. -+ -+ `--with-libiconv' is shorthand option for GNU libiconv. -+ -+ --with-libiconv=/usr/local -+ -+ This is equivalent to: -+ -+ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' -+ -+ `--with-libiconv' assumes that your C compiler has `-R' -+ option, and that the option adds the specified run-time path -+ to an exacutable binary. If `-R' option of your compiler has -+ different meaning, or your compiler lacks the option, you -+ should use `--with-iconv' option instead. Binary command -+ without run-time path information might be unexecutable. -+ In that case, you would see an error message like: -+ -+ error in loading shared libraries: libiconv.so.2: cannot -+ open shared object file -+ -+ If both `--with-libiconv' and `--with-iconv' options are -+ specified, `--with-iconv' is prior to `--with-libiconv'. -+ -+ --with-iconv=ICONV_LIBSPEC -+ If your libc doens't provide iconv(), you need to specify the -+ library containing iconv() with this option. `ICONV_LIBSPEC' -+ is the argument(s) to `cc' or `ld' to link the library, for -+ example, `--with-iconv="-L/usr/local/lib -liconv"'. -+ You don't need to specify the header file directory for "iconv.h" -+ to the compiler, as it isn't included directly by bind-9 with -+ this patch. -+ -+ --with-mdnlib=MDN_LIBSPEC -+ With this option, you can explicitly specify the argument(s) -+ to `cc' or `ld' to link the mDNkit's library, `libmdn'. If -+ this option is not specified, `-L${PREFIX}/lib -lmdn' is -+ assumed, where ${PREFIX} is the installation prefix specified -+ with `--with-mdn' option above. You may need to use this -+ option to specify extra argments, for example, -+ `--with-mdnlib="-L/usr/local/lib -R/usr/local/lib -lmdn"'. -+ -+ Please consult `README' for other configuration options. -+ -+ Note that if you want to specify some extra header file directories, -+ you should use the environment variable STD_CINCLUDES instead of -+ CFLAGS, as described in README. -+ -+ 2. Compilation and installation -+ -+ After running "configure", just do -+ -+ make -+ make install -+ -+ for compiling and installing. -+ -+ 3. Resolver configuration -+ -+ To handle multilingual domain names, you have to specify the -+ properties like: -+ + name encoding used in DNS protocol data -+ + normalization (NAMEPREP) schemes -+ These properties are specified by the mDNkit's configuration file, -+ "mdn.conf". You have to create and set up the file properly. The -+ pathname of the file and contents are described in the manual -+ "mdn.conf". -+ -+ -+ * Contact information -+ -+ Please see http//www.nic.ad.jp/jp/research/idn/ for the latest news -+ about mDNkit and this patch. -+ -+ Bug reports and comments on this kit should be sent to -+ mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -+ -+ -+ ; $Id: bind-9.2.0-patch,v 1.1 2002/01/02 02:46:59 marka Exp $ -Index: config.h.in -diff -c mdn/othersrc/bind9/config.h.in:1.1.1.6 mdn/othersrc/bind9/config.h.in:1.10.2.1 -*** config.h.in Tue Nov 27 16:55:45 2001 ---- config.h.in Thu Dec 6 13:51:12 2001 -*************** -*** 141,146 **** ---- 141,149 ---- - /* define if you have strerror in the C library. */ - #undef HAVE_STRERROR - -+ /* Define if you have the setlocale function. */ -+ #undef HAVE_SETLOCALE -+ - /* Define if you have the header file. */ - #undef HAVE_DLFCN_H - -*************** -*** 150,155 **** ---- 153,161 ---- - /* Define if you have the header file. */ - #undef HAVE_LINUX_CAPABILITY_H - -+ /* Define if you have the header file. */ -+ #undef HAVE_LOCALE_H -+ - /* Define if you have the header file. */ - #undef HAVE_SYS_PRCTL_H - -*************** -*** 176,178 **** ---- 182,188 ---- - - /* Define if you have the socket library (-lsocket). */ - #undef HAVE_LIBSOCKET -+ -+ /* define if mDNkit support is to be included. */ -+ #undef WITH_MDN -+ -Index: configure.in -diff -c mdn/othersrc/bind9/configure.in:1.1.1.8 mdn/othersrc/bind9/configure.in:1.11 -*** configure.in Tue Nov 27 16:55:48 2001 ---- configure.in Thu Nov 29 18:45:14 2001 -*************** -*** 1605,1610 **** ---- 1605,1683 ---- - NOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees) - - # -+ # MDN support -+ # -+ AC_ARG_WITH(mdn, -+ [ --with-mdn[=MPREFIX] enable MDN support using mDNkit [default PREFIX]], -+ use_mdn="$withval", use_mdn="no") -+ case "$use_mdn" in -+ yes) -+ if test X$prefix = XNONE ; then -+ mdn_path=/usr/local -+ else -+ mdn_path=$prefix -+ fi -+ ;; -+ no) -+ ;; -+ *) -+ mdn_path="$use_mdn" -+ ;; -+ esac -+ -+ iconvinc= -+ iconvlib= -+ AC_ARG_WITH(libiconv, -+ [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], -+ use_libiconv="$withval", use_libiconv="no") -+ case "$use_libiconv" in -+ yes) -+ if test X$prefix = XNONE ; then -+ iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" -+ else -+ iconvlib="-L$prefix/lib -R$prefix/lib -liconv" -+ fi -+ ;; -+ no) -+ iconvlib= -+ ;; -+ *) -+ iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" -+ ;; -+ esac -+ -+ AC_ARG_WITH(iconv, -+ [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], -+ iconvlib="$withval") -+ case "$iconvlib" in -+ no) -+ iconvlib= -+ ;; -+ yes) -+ iconvlib=-liconv -+ ;; -+ esac -+ -+ AC_ARG_WITH(mdnlib, -+ [ --with-mdnlib=ARG specify libmdn], -+ mdnlib="$withval", mdnlib="no") -+ if test "$mdnlib" = yes; then -+ AC_MSG_ERROR([You must specify ARG for --with-mdnlib.]) -+ fi -+ -+ if test "$use_mdn" != no; then -+ AC_DEFINE(WITH_MDN, 1, [define if mDNkit support is to be included.]) -+ STD_CINCLUDES="$STD_CINCLUDES -I$mdn_path/include" -+ if test "$mdnlib" != no; then -+ LIBS="$mdnlib $iconvlib $LIBS" -+ else -+ LIBS="-L$mdn_path/lib -lmdn $iconvlib $LIBS" -+ fi -+ fi -+ AC_CHECK_HEADERS(locale.h) -+ AC_CHECK_FUNCS(setlocale) -+ -+ # - # Substitutions - # - AC_SUBST(BIND9_TOP_BUILDDIR) -Index: bin/dig/dig.1 -diff -c mdn/othersrc/bind9/bin/dig/dig.1:1.1.1.1 mdn/othersrc/bind9/bin/dig/dig.1:1.2 -*** bin/dig/dig.1 Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.1 Thu Nov 29 14:36:25 2001 -*************** -*** 73,79 **** - is the name of the resource record that is to be looked up. - .TP - \fBtype\fR -! indicates what type of query is required \(em - ANY, A, MX, SIG, etc. - \fItype\fR can be any valid query type. If no - \fItype\fR argument is supplied, ---- 73,79 ---- - is the name of the resource record that is to be looked up. - .TP - \fBtype\fR -! indicates what type of query is required - ANY, A, MX, SIG, etc. - \fItype\fR can be any valid query type. If no - \fItype\fR argument is supplied, -*************** -*** 336,341 **** ---- 336,352 ---- - \fI+noqr\fR which means that \fBdig\fR - will not print the initial query when it looks up the NS records for - isc.org. -+ .SH "MDN SUPPORT" -+ .PP -+ If \fBdig\fR has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ \fBdig\fR appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the \fBMDN_DISABLE\fR environment variable. -+ The MDN support is disabled if the the variable is set when -+ \fBdig\fR runs. - .SH "FILES" - .PP - \fI/etc/resolv.conf\fR -Index: bin/dig/dig.c -diff -c mdn/othersrc/bind9/bin/dig/dig.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/dig.c:1.7 -*** bin/dig/dig.c Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.c Thu Nov 29 18:45:14 2001 -*************** -*** 1305,1310 **** ---- 1305,1315 ---- - } - ISC_LIST_APPEND(lookup_list, lookup, link); - } -+ -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - } - - /* -Index: bin/dig/dig.docbook -diff -c mdn/othersrc/bind9/bin/dig/dig.docbook:1.1.1.1 mdn/othersrc/bind9/bin/dig/dig.docbook:1.2 -*** bin/dig/dig.docbook Tue Nov 27 16:55:50 2001 ---- bin/dig/dig.docbook Thu Nov 29 14:36:26 2001 -*************** -*** 502,507 **** ---- 502,522 ---- - - - -+ MDN SUPPORT -+ -+ If dig has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ dig appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the MDN_DISABLE environment variable. -+ The MDN support is disabled if the the variable is set when -+ dig runs. -+ -+ -+ -+ - FILES - - /etc/resolv.conf -Index: bin/dig/dighost.c -diff -c mdn/othersrc/bind9/bin/dig/dighost.c:1.1.1.11 mdn/othersrc/bind9/bin/dig/dighost.c:1.26 -*** bin/dig/dighost.c Tue Nov 27 16:55:51 2001 ---- bin/dig/dighost.c Fri Nov 30 12:37:18 2001 -*************** -*** 32,37 **** ---- 32,48 ---- - #include - #include - -+ #ifdef HAVE_LOCALE_H -+ #include -+ #endif -+ -+ #ifdef WITH_MDN -+ #include -+ #include -+ #include -+ #include -+ #endif -+ - #include - #include - #include -*************** -*** 130,135 **** ---- 141,160 ---- - isc_mutex_t lookup_lock; - dig_lookup_t *current_lookup = NULL; - -+ #ifdef WITH_MDN -+ mdn_resconf_t mdnconf; -+ -+ static void initialize_mdn(void); -+ static isc_result_t output_filter(isc_buffer_t *buffer, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ static mdn_result_t append_textname(char *name, const char *origin, -+ size_t namesize); -+ static void mdn_check_result(mdn_result_t r, const char *msg); -+ -+ #define MAXDLEN 256 -+ #endif -+ - /* - * Apply and clear locks at the event level in global task. - * Can I get rid of these using shutdown events? XXX -*************** -*** 365,370 **** ---- 390,398 ---- - looknew->ignore = ISC_FALSE; - looknew->servfail_stops = ISC_FALSE; - looknew->besteffort = ISC_TRUE; -+ #ifdef WITH_MDN -+ looknew->mdn = ISC_TRUE; -+ #endif - looknew->dnssec = ISC_FALSE; - looknew->udpsize = 0; - looknew->recurse = ISC_TRUE; -*************** -*** 426,431 **** ---- 454,462 ---- - looknew->ignore = lookold->ignore; - looknew->servfail_stops = lookold->servfail_stops; - looknew->besteffort = lookold->besteffort; -+ #ifdef WITH_MDN -+ looknew->mdn = ISC_TRUE; -+ #endif - looknew->dnssec = lookold->dnssec; - looknew->udpsize = lookold->udpsize; - looknew->recurse = lookold->recurse; -*************** -*** 648,653 **** ---- 679,688 ---- - ISC_LIST_APPEND(server_list, srv, link); - } - -+ #ifdef WITH_MDN -+ initialize_mdn(); -+ #endif -+ - if (keyfile[0] != 0) - setup_file_key(); - else if (keysecret[0] != 0) -*************** -*** 1168,1174 **** ---- 1203,1220 ---- - isc_buffer_t b; - dns_compress_t cctx; - char store[MXNAME]; -+ #ifdef WITH_MDN -+ mdn_result_t mr; -+ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; -+ #endif - -+ #ifdef WITH_MDN -+ if (lookup->mdn == ISC_TRUE) -+ dns_name_settotextfilter(output_filter); -+ else -+ dns_name_settotextfilter(NULL); -+ #endif -+ - REQUIRE(lookup != NULL); - INSIST(!free_now); - -*************** -*** 1196,1201 **** ---- 1242,1262 ---- - isc_buffer_init(&lookup->onamebuf, lookup->onamespace, - sizeof(lookup->onamespace)); - -+ #ifdef WITH_MDN -+ if (lookup->mdn) { -+ /* -+ * We cannot convert `textname' and `origin' separately. -+ * `textname' doesn't contain TLD, but local mapping needs -+ * TLD. -+ */ -+ mr = mdn_res_nameconv(mdnconf, "ld", lookup->textname, -+ utf8_textname, sizeof(utf8_textname)); -+ mdn_check_result(mr, "convert textname to UTF-8"); -+ } else { -+ strcpy(utf8_textname, lookup->textname); -+ } -+ #endif -+ - /* - * If the name has too many dots, force the origin to be NULL - * (which produces an absolute lookup). Otherwise, take the origin -*************** -*** 1204,1215 **** ---- 1265,1307 ---- - * is TRUE or we got a domain line in the resolv.conf file. - */ - /* XXX New search here? */ -+ #ifdef WITH_MDN -+ if ((count_dots(utf8_textname) >= ndots) || !usesearch) -+ lookup->origin = NULL; /* Force abs lookup */ -+ else if (lookup->origin == NULL && lookup->new_search && usesearch) { -+ lookup->origin = ISC_LIST_HEAD(search_list); -+ } -+ #else - if ((count_dots(lookup->textname) >= ndots) || !usesearch) - lookup->origin = NULL; /* Force abs lookup */ - else if (lookup->origin == NULL && lookup->new_search && usesearch) { - lookup->origin = ISC_LIST_HEAD(search_list); - } -+ #endif -+ -+ #ifdef WITH_MDN -+ if (lookup->mdn) { -+ if (lookup->origin != NULL) { -+ mr = mdn_res_nameconv(mdnconf, "ld", -+ lookup->origin->origin, -+ utf8_origin, -+ sizeof(utf8_origin)); -+ mdn_check_result(mr, "convert origin to UTF-8"); -+ mr = append_textname(utf8_textname, utf8_origin, -+ sizeof(utf8_textname)); -+ mdn_check_result(mr, "append origin to textname"); -+ } -+ mr = mdn_res_nameconv(mdnconf, "MNI", utf8_textname, -+ idn_textname, sizeof(idn_textname)); -+ mdn_check_result(mr, "convert UTF-8 textname to IDN encoding"); -+ } -+ #endif -+ -+ #ifdef WITH_MDN -+ if (lookup->origin != NULL && !lookup->mdn) { -+ #else - if (lookup->origin != NULL) { -+ #endif - debug("trying origin %s", lookup->origin->origin); - result = dns_message_gettempname(lookup->sendmsg, - &lookup->oname); -*************** -*** 1253,1258 **** ---- 1345,1361 ---- - debug("using root origin"); - if (lookup->trace && lookup->trace_root) - dns_name_clone(dns_rootname, lookup->name); -+ #ifdef WITH_MDN -+ else if (lookup->mdn) { -+ len = strlen(idn_textname); -+ isc_buffer_init(&b, idn_textname, len); -+ isc_buffer_add(&b, len); -+ result = dns_name_fromtext(lookup->name, &b, -+ dns_rootname, -+ ISC_FALSE, -+ &lookup->namebuf); -+ } -+ #endif - else { - len = strlen(lookup->textname); - isc_buffer_init(&b, lookup->textname, len); -*************** -*** 2588,2590 **** ---- 2691,2806 ---- - if (mctx != NULL) - isc_mem_destroy(&mctx); - } -+ -+ #ifdef WITH_MDN -+ static void -+ initialize_mdn(void) { -+ mdn_result_t r; -+ -+ #ifdef HAVE_SETLOCALE -+ /* Set locale */ -+ (void)setlocale(LC_ALL, ""); -+ #endif -+ -+ /* General initialization. */ -+ r = mdn_resconf_initialize(); -+ if (r != mdn_success) -+ fatal("mdn initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Create configuration context. */ -+ r = mdn_resconf_create(&mdnconf); -+ if (r != mdn_success) -+ fatal("mdn resconf initialization failed: %s", -+ mdn_result_tostring(r)); -+ -+ -+ /* Load mdn configuration file. */ -+ r = mdn_resconf_loadfile(mdnconf, NULL); -+ if (r != mdn_success) -+ fatal("mdn configuration loading failed: %s", -+ mdn_result_tostring(r)); -+ -+ /* Set domain name -> text post-conversion filter. */ -+ dns_name_settotextfilter(output_filter); -+ } -+ -+ static isc_result_t -+ output_filter(isc_buffer_t *buffer, unsigned int used_org, -+ isc_boolean_t absolute) -+ { -+ char tmp1[MAXDLEN], tmp2[MAXDLEN]; -+ size_t fromlen, tolen; -+ isc_boolean_t end_with_dot; -+ -+ /* -+ * Copy contents of 'buffer' to 'tmp1', supply trailing dot -+ * if 'absolute' is true, and terminate with NUL. -+ */ -+ fromlen = isc_buffer_usedlength(buffer) - used_org; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); -+ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; -+ if (absolute && !end_with_dot) { -+ fromlen++; -+ if (fromlen >= MAXDLEN) -+ return (ISC_R_SUCCESS); -+ tmp1[fromlen - 1] = '.'; -+ } -+ tmp1[fromlen] = '\0'; -+ -+ /* -+ * Convert contents of 'tmp1' to local encoding. -+ */ -+ if (mdn_res_nameconv(mdnconf, "i!NL", tmp1, tmp2, MAXDLEN) -+ != mdn_success) -+ return (ISC_R_SUCCESS); -+ strcpy(tmp1, tmp2); -+ -+ /* -+ * Copy the converted contents in 'tmp1' back to 'buffer'. -+ * If we have appended trailing dot, remove it. -+ */ -+ tolen = strlen(tmp1); -+ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') -+ tolen--; -+ -+ if (isc_buffer_length(buffer) < used_org + tolen) -+ return (ISC_R_NOSPACE); -+ -+ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); -+ memcpy(isc_buffer_used(buffer), tmp1, tolen); -+ isc_buffer_add(buffer, tolen); -+ -+ return (ISC_R_SUCCESS); -+ } -+ -+ static mdn_result_t -+ append_textname(char *name, const char *origin, size_t namesize) { -+ size_t namelen = strlen(name); -+ size_t originlen = strlen(origin); -+ -+ /* Already absolute? */ -+ if (namelen > 0 && name[namelen - 1] == '.') -+ return mdn_success; -+ -+ /* Append dot and origin */ -+ -+ if (namelen + 1 + originlen >= namesize) -+ return mdn_buffer_overflow; -+ -+ name[namelen++] = '.'; -+ (void)strcpy(name + namelen, origin); -+ return mdn_success; -+ } -+ -+ static void -+ mdn_check_result(mdn_result_t r, const char *msg) { -+ if (r != mdn_success) { -+ exitcode = 1; -+ fatal("%s: %s", msg, mdn_result_tostring(r)); -+ } -+ } -+ -+ #endif /* WITH_MDN */ -Index: bin/dig/host.1 -diff -c mdn/othersrc/bind9/bin/dig/host.1:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.1:1.2 -*** bin/dig/host.1 Tue Nov 27 16:55:51 2001 ---- bin/dig/host.1 Thu Nov 29 14:36:26 2001 -*************** -*** 87,94 **** - retries will default to 1. - .PP - Non-recursive queries can be made via the \fB-r\fR option. -! Setting this option clears the \fBRD\fR \(em recursion -! desired \(em bit in the query which \fBhost\fR makes. - This should mean that the name server receiving the query will not - attempt to resolve \fIname\fR. The - \fB-r\fR option enables \fBhost\fR to mimic ---- 87,94 ---- - retries will default to 1. - .PP - Non-recursive queries can be made via the \fB-r\fR option. -! Setting this option clears the \fBRD\fR recursion -! desired bit in the query which \fBhost\fR makes. - This should mean that the name server receiving the query will not - attempt to resolve \fIname\fR. The - \fB-r\fR option enables \fBhost\fR to mimic -*************** -*** 120,125 **** ---- 120,136 ---- - effectively wait forever for a reply. The time to wait for a response - will be set to the number of seconds given by the hardware's maximum - value for an integer quantity. -+ .SH "MDN SUPPORT" -+ .PP -+ If \fBhost\fR has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ \fBhost\fR appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the \fBMDN_DISABLE\fR environment variable. -+ The MDN support is disabled if the the variable is set when -+ \fBhost\fR runs. - .SH "FILES" - .PP - \fI/etc/resolv.conf\fR -Index: bin/dig/host.c -diff -c mdn/othersrc/bind9/bin/dig/host.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/host.c:1.7 -*** bin/dig/host.c Tue Nov 27 16:55:51 2001 ---- bin/dig/host.c Thu Nov 29 18:45:14 2001 -*************** -*** 666,671 **** ---- 666,676 ---- - lookup->new_search = ISC_TRUE; - ISC_LIST_APPEND(lookup_list, lookup, link); - -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif -+ - usesearch = ISC_TRUE; - } - -Index: bin/dig/host.docbook -diff -c mdn/othersrc/bind9/bin/dig/host.docbook:1.1.1.1 mdn/othersrc/bind9/bin/dig/host.docbook:1.2 -*** bin/dig/host.docbook Tue Nov 27 16:55:51 2001 ---- bin/dig/host.docbook Thu Nov 29 14:36:26 2001 -*************** -*** 181,186 **** ---- 181,201 ---- - - - -+ MDN SUPPORT -+ -+ If host has been built with mdn support, it can -+ accept and display non-ASCII domain names. -+ host appropriately converts character encoding of -+ domain name before sending a request to DNS server or displaying a -+ reply from the server. -+ If you'd like to turn off the MDN support for some reason, defines -+ the MDN_DISABLE environment variable. -+ The MDN support is disabled if the the variable is set when -+ host runs. -+ -+ -+ -+ - FILES - - /etc/resolv.conf -Index: bin/dig/nslookup.c -diff -c mdn/othersrc/bind9/bin/dig/nslookup.c:1.1.1.8 mdn/othersrc/bind9/bin/dig/nslookup.c:1.7 -*** bin/dig/nslookup.c Tue Nov 27 16:55:51 2001 ---- bin/dig/nslookup.c Thu Nov 29 18:45:14 2001 -*************** -*** 656,661 **** ---- 656,665 ---- - ISC_LIST_APPEND(lookup_list, lookup, link); - lookup->origin = NULL; - ISC_LIST_INIT(lookup->my_server_list); -+ #ifdef WITH_MDN -+ if (getenv(MDN_DISABLE_ENVVAR_NAME) != NULL) -+ lookup->mdn = ISC_FALSE; -+ #endif - debug("looking up %s", lookup->textname); - } - -Index: bin/dig/include/dig/dig.h -diff -c mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.1.1.6 mdn/othersrc/bind9/bin/dig/include/dig/dig.h:1.7 -*** bin/dig/include/dig/dig.h Tue Nov 27 16:55:51 2001 ---- bin/dig/include/dig/dig.h Thu Nov 29 18:45:14 2001 -*************** -*** 74,79 **** ---- 74,86 ---- - * be 1. - */ - -+ /* -+ * Name of environment variable which disables MDN support if defined. -+ */ -+ #ifdef WITH_MDN -+ #define MDN_DISABLE_ENVVAR_NAME "MDN_DISABLE" -+ #endif -+ - ISC_LANG_BEGINDECLS - - typedef struct dig_lookup dig_lookup_t; -*************** -*** 109,114 **** ---- 116,124 ---- - servfail_stops, - new_search, - besteffort, -+ #ifdef WITH_MDN -+ mdn, -+ #endif - dnssec; - char textname[MXNAME]; /* Name we're going to be looking up */ - char cmdline[MXNAME]; -Index: lib/dns/name.c -diff -c mdn/othersrc/bind9/lib/dns/name.c:1.1.1.9 mdn/othersrc/bind9/lib/dns/name.c:1.12 -*** lib/dns/name.c Tue Nov 27 16:57:32 2001 ---- lib/dns/name.c Thu Nov 29 18:45:14 2001 -*************** -*** 194,199 **** ---- 194,206 ---- - /* XXXDCL make const? */ - dns_name_t *dns_wildcardname = &wild; - -+ #ifdef WITH_MDN -+ /* -+ * dns_name_t to text post-conversion procedure. -+ */ -+ static dns_name_totextfilter_t totext_filter_proc = NULL; -+ #endif -+ - static void - set_offsets(const dns_name_t *name, unsigned char *offsets, - dns_name_t *set_name); -*************** -*** 1682,1687 **** ---- 1689,1697 ---- - unsigned int labels; - isc_boolean_t saw_root = ISC_FALSE; - char num[4]; -+ #ifdef WITH_MDN -+ unsigned int oused = target->used; -+ #endif - - /* - * This function assumes the name is in proper uncompressed -*************** -*** 1859,1864 **** ---- 1869,1878 ---- - - isc_buffer_add(target, tlen - trem); - -+ #ifdef WITH_MDN -+ if (totext_filter_proc != NULL) -+ return ((*totext_filter_proc)(target, oused, saw_root)); -+ #endif - return (ISC_R_SUCCESS); - } - -*************** -*** 3315,3317 **** ---- 3329,3337 ---- - return (ISC_R_SUCCESS); - } - -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc) { -+ totext_filter_proc = proc; -+ } -+ #endif -Index: lib/dns/include/dns/name.h -diff -c mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.1.1.6 mdn/othersrc/bind9/lib/dns/include/dns/name.h:1.8 -*** lib/dns/include/dns/name.h Tue Nov 27 16:57:38 2001 ---- lib/dns/include/dns/name.h Thu Nov 29 18:45:14 2001 -*************** -*** 218,223 **** ---- 218,234 ---- - */ - #define DNS_NAME_MAXWIRE 255 - -+ #ifdef WITH_MDN -+ /* -+ * Text output filter procedure. -+ * 'target' is the buffer to be converted. The region to be converted -+ * is from 'buffer'->base + 'used_org' to the end of the used region. -+ */ -+ typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, -+ unsigned int used_org, -+ isc_boolean_t absolute); -+ #endif -+ - /*** - *** Initialization - ***/ -*************** -*** 1243,1248 **** ---- 1254,1267 ---- - * 'size' > 0. - * - */ -+ -+ #ifdef WITH_MDN -+ void -+ dns_name_settotextfilter(dns_name_totextfilter_t proc); -+ /* -+ * Call 'proc' at the end of dns_name_totext. -+ */ -+ #endif /* WITH_MDN */ - - #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) - /* diff --git a/contrib/idn/mdnkit/patch/libiconv/libiconv-1.6.1.patch b/contrib/idn/mdnkit/patch/libiconv/libiconv-1.6.1.patch deleted file mode 100644 index ac2edd5eb2..0000000000 --- a/contrib/idn/mdnkit/patch/libiconv/libiconv-1.6.1.patch +++ /dev/null @@ -1,71 +0,0 @@ -Patch for libiconv-1.6.1+NetBSD 1.5 -=================================== - -This is a patch file for libiconv-1.6.1 to make it work on NetBSD 1.5. - -To apply this patch, you should go to the top directory of the libiconv -source tree (where you see `README' file), then invoke `patch' command -like this: - - % patch -p0 < this-file - -Then follow the normal build instructions described in README and -INSTALL.generic. - - -diff -c -r ../libiconv-1.6.1.org/autoconf/ltconfig ./autoconf/ltconfig -*** ../libiconv-1.6.1.org/autoconf/ltconfig Mon Feb 26 21:52:17 2001 ---- ./autoconf/ltconfig Fri Jun 1 09:29:30 2001 -*************** -*** 1188,1198 **** - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - fi - ;; - ---- 1188,1198 ---- - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva -+ else -+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -diff -c -r ../libiconv-1.6.1.org/libcharset/autoconf/ltconfig ./libcharset/autoconf/ltconfig -*** ../libiconv-1.6.1.org/libcharset/autoconf/ltconfig Mon Feb 26 21:49:31 2001 ---- ./libcharset/autoconf/ltconfig Fri Jun 1 09:29:31 2001 -*************** -*** 1194,1204 **** - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -- else - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva - fi - ;; - ---- 1194,1204 ---- - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' - # can we support soname and/or expsyms with a.out? -oliva -+ else -+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - diff --git a/contrib/idn/mdnkit/patch/squid/squid-2.4.STABLE1-patch b/contrib/idn/mdnkit/patch/squid/squid-2.4.STABLE1-patch deleted file mode 100644 index 278c0dab34..0000000000 --- a/contrib/idn/mdnkit/patch/squid/squid-2.4.STABLE1-patch +++ /dev/null @@ -1,32 +0,0 @@ -8bit-through patch for Squid 2.4-STABLE1 -======================================== - -This is a patch file for Squid 2.4-STABLE1 to make it work with -internationalized host names. It simply disables validity check of -host names. - -To apply this patch, you should go to the top directory of the source -tree (where README file resides), then invoke `patch' command like this: - - % patch -p1 < this-file - -Then follow the instructions described in INSTALL to configure and -(re)build the squid cache server. - -*** squid-2.4.STABLE1/src/url.c.dist Fri Jan 12 09:51:32 2001 ---- squid-2.4.STABLE1/src/url.c Tue May 1 17:42:15 2001 -*************** -*** 298,307 **** ---- 298,309 ---- - *q = '\0'; - } - } -+ #if 0 - if (strspn(host, valid_hostname_chars) != strlen(host)) { - debug(23, 1) ("urlParse: Illegal character in hostname '%s'\n", host); - return NULL; - } -+ #endif - /* remove trailing dots from hostnames */ - while ((l = strlen(host)) > 0 && host[--l] == '.') - host[l] = '\0'; diff --git a/contrib/idn/mdnkit/tools/Makefile.in b/contrib/idn/mdnkit/tools/Makefile.in deleted file mode 100644 index c23f5fb8de..0000000000 --- a/contrib/idn/mdnkit/tools/Makefile.in +++ /dev/null @@ -1,75 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:47:00 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -SUBDIRS = mdnconv @RUNMDN_SUBDIR@ - -SHELL = @SHELL@ - -all: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) all); done - -install: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) install); done - -clean: - for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean); done diff --git a/contrib/idn/mdnkit/tools/mdnconv/Makefile.in b/contrib/idn/mdnkit/tools/mdnconv/Makefile.in deleted file mode 100644 index e2af9b5635..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/Makefile.in +++ /dev/null @@ -1,114 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:47:01 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -top_builddir = ../.. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -mandir = @mandir@ - -CC = @CC@ -RANLIB = @RANLIB@ -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ -LIBTOOL = @LIBTOOL@ - -ICONVINC = @ICONVINC@ -ICONVLIB = @ICONVLIB@ -MDNLIB = ../../lib/libmdn.la - -OPTS = -INCS = -I$(srcdir)/../../include -I../../include $(ICONVINC) -DEFS = - -CFLAGS = $(OPTS) $(INCS) $(DEFS) @CFLAGS@ -LDFLAGS = $(OPTS) @LDFLAGS@ - -SRCS = mdnconv.c util.c -OBJS = mdnconv.o util.o - -all: mdnconv mdnslookup - -mdnconv: $(OBJS) $(MDNLIB) - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \ - $(OBJS) $(MDNLIB) $(ICONVLIB) - -mdnslookup: $(srcdir)/mdnslookup.in - sed -e 's%[@]bindir[@]%$(bindir)%' $(srcdir)/mdnslookup.in > mdnslookup - chmod 0755 mdnslookup - -install: install-prog install-man - -install-prog: mdnconv - $(MKINSTALLDIRS) $(bindir) - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mdnconv $(bindir) - -install-man: - $(MKINSTALLDIRS) $(mandir)/man1 - $(INSTALL_DATA) $(srcdir)/mdnconv.1 $(mandir)/man1 - -clean: - rm -f *.o mdnconv mdnslookup *.core core *~ - rm -fr .libs/ diff --git a/contrib/idn/mdnkit/tools/mdnconv/mdnconv.1 b/contrib/idn/mdnkit/tools/mdnconv/mdnconv.1 deleted file mode 100644 index c79116a298..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/mdnconv.1 +++ /dev/null @@ -1,501 +0,0 @@ -.\" $Id: mdnconv.1,v 1.1 2002/01/02 02:47:01 marka Exp $ -.\" -.\" Copyright (c) 2000,2001 Japan Network Information Center. -.\" All rights reserved. -.\" -.\" By using this file, you agree to the terms and conditions set forth bellow. -.\" -.\" LICENSE TERMS AND CONDITIONS -.\" -.\" The following License Terms and Conditions apply, unless a different -.\" license is obtained from Japan Network Information Center ("JPNIC"), -.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -.\" Chiyoda-ku, Tokyo 101-0047, Japan. -.\" -.\" 1. Use, Modification and Redistribution (including distribution of any -.\" modified or derived work) in source and/or binary forms is permitted -.\" under this License Terms and Conditions. -.\" -.\" 2. Redistribution of source code must retain the copyright notices as they -.\" appear in each source code file, this License Terms and Conditions. -.\" -.\" 3. Redistribution in binary form must reproduce the Copyright Notice, -.\" this License Terms and Conditions, in the documentation and/or other -.\" materials provided with the distribution. For the purposes of binary -.\" distribution the "Copyright Notice" refers to the following language: -.\" "Copyright (c) Japan Network Information Center. All rights reserved." -.\" -.\" 4. Neither the name of JPNIC may be used to endorse or promote products -.\" derived from this Software without specific prior written approval of -.\" JPNIC. -.\" -.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -.\" -.\" 6. Indemnification by Licensee -.\" Any person or entities using and/or redistributing this Software under -.\" this License Terms and Conditions shall defend indemnify and hold -.\" harmless JPNIC from and against any and all judgements damages, -.\" expenses, settlement liabilities, cost and other liabilities of any -.\" kind as a result of use and redistribution of this Software or any -.\" claim, suite, action, litigation or proceeding by any third party -.\" arising out of or relates to this License Terms and Conditions. -.\" -.\" 7. Governing Law, Jurisdiction and Venue -.\" This License Terms and Conditions shall be governed by and and -.\" construed in accordance with the law of Japan. Any person or entities -.\" using and/or redistributing this Software under this License Terms and -.\" Conditions hereby agrees and consent to the personal and exclusive -.\" jurisdiction and venue of Tokyo District Court of Japan. -.\" -.TH MDNCONV 1 "Mar 3, 2001" -.\" -.SH NAME -mdnconv \- codeset converter for named.conf and zone master files -.\" -.SH SYNOPSIS -\fBmdnconv\fP [\fIoptions..\fP] [\fIfile\fP...] -.\" -.SH DESCRIPTION -.B mdnconv -is a codeset converter for named configuration files and zone master files. -.B mdnconv -performs codeset conversion specified either by the command-line arguments -or by the configuration file, -and writes the converted text to stdout. -.PP -If file name is specified, -.B mdnconv -converts the contents of the file. Otherwise, -.B mdnconv -converts -.IR stdin . -.PP -Since -.B mdnconv -is specifically designed for converting internatinalized domain names, -it may not be suitable as a general codeset converter. -.\" -.SH "OPERATION MODES" -.B mdnconv -has two operation modes. -.PP -One is a mode to convert local-encoded domain names to IDN-encoded -one. Usually this mode is used for preparing domain names to be -listed in named configuration files or zone master files. -In this mode, the following processes are performed in addition to -the codeset (encoding) conversion. -.RS 2 -.IP \- 2 -local mapping -.IP \- 2 -standard domain name preperation (NAMEPREP) -.RE -.PP -Furthermore, delimiter mapping is also performed in case \-delimitermap -command line option is specified. -.PP -The other mode is a reverse conversion, from IDN-encoded domain name to -local-encoded domain names. -In this mode, local mapping and NAMEPREP are not performed since -IDN-encoded names should already be normalized. -Instead, a check is done in order to make sure the IDN-encoded domain name -is properly NAMEPREP'ed. If it is not, the name will be output in -IDN encoding, not in the local encoding. -.\" -.SH OPTIONS -Normally -.B mdnconv -reads system's default configuration file (mdn.conf) and perform -conversion or name preparation according to the parameters specified in -the file. You can override the setting in the configuration file by -various command line options below. -.TP 4 -\fB\-in\fP \fIin-code\fP, \fB\-i\fP \fIin-code\fP -Specify the codeset name of the input text. -Any of the following codeset names can be specified. -.RS 4 -.IP "\(bu" 2 -Any codeset names which \fIiconv_open()\fP library function accepts -.IP "\(bu" 2 -\f(CWAMC-ACE-Z\fR -.IP "\(bu" 2 -\f(CWRACE\fR -.IP "\(bu" 2 -\f(CWDUDE\fR -.IP "\(bu" 2 -\f(CWUTF-8\fR -.IP "\(bu" 2 -Any alias names for the above, defined by the codeset alias file. -.RE -.IP "" 4 -If this option is not specified, the default codeset is determined -from the locale in normal conversion mode. -In reverse conversion mode, the default codeset is the IDN encoding -specified by the configuration file (``idn-encoding'' entry). -.TP 4 -\fB\-out\fP \fIout-code\fP, \fB\-o\fP \fIout-code\fP -Specify the codeset name of the output text. \fIout-code\fP can be any -codeset name that can be specified for -.B \-in -option. -.IP "" 4 -If this option is not specified, the default is the IDN encoding -specified by the configuration file (``idn-encoding'' entry) in -normal conversion mode. -In reverse conversion mode, the default codeset is determined from -the locale. -.TP 4 -\fB\-conf\fP \fIpath\fP, \fB\-c\fP \fIpath\fP -Specify the pathname of mDNkit configuration file (``mdn.conf''). -If not specified, system's default file is used, unless \-noconf -option is specified. -.TP 4 -\fB\-noconf\fP, \fB\-C\fP -Specify that no configuration file is to be used. -.TP 4 -\fB\-reverse\fP, \fB\-r\fP -Specify reverse conversion mode. -.br -If this option is not specified, the normal conversion mode is used. -.TP 4 -\fB\-nameprep\fR \fIversion\fR, \fB\-n\fR \fIversion\fR -Specify the version of NAMEPREP. -The following is a list of currently available -.IR version s. -.RS 4 -.IP \f(CWnameprep-03\fR 4 -Perform NAMEPREP according to the Internet Draft -``draft-ietf-idn-nameprep-03.txt'' (NAMEPREP-03). -.IP \f(CWnameprep-05\fR 4 -Perform NAMEPREP according to the Internet Draft -``draft-ietf-idn-nameprep-05.txt'' (NAMEPREP-05). -.IP \f(CWnameprep-06\fR 4 -Perform NAMEPREP according to the Internet Draft -``draft-ietf-idn-nameprep-06.txt'' (NAMEPREP-06). -.RE -.IP "" 4 -This option is a shorthand for specifying the 4 options below. -.PP -.RS 8 -.ft CW --map -.I version -.br --normalize -.I version -.br --prohibit -.I version -.br --unassigned -.I version -.ft R -.RE -.TP 4 -\fB\-nonameprep\fR, \fB\-N\fR -Specify to skip NAMEPREP process (or NAMEPREP verification process -in the reverse conversion mode). -.TP 4 -\fB\-map\fR \fImap\fR -Specify the name of the mapping rule for NAMEPREP mapping process. -Currently, following -.IR map s -are available. -.RS 4 -.IP \f(CWnameprep-03\fR 4 -Use the list of mappings specified by NAMEPREP-03 draft. -.IP \f(CWnameprep-05\fR 4 -Use the list of mappings specified by NAMEPREP-05 draft. -.IP \f(CWnameprep-06\fR 4 -Use the list of mappings specified by NAMEPREP-06 draft. -.IP \f(CWfilemap:\fR\fIpath\fR 4 -Use list of mappings specified by mapfile -.IR path . -See mdn.conf(5) for the format of a mapfile. -.RE -.IP "" 4 -This option can be specified more than once. -In that case, each mapping will be performed in the order of the -specification. -.br -If neither this option nor ``\-nameprep'' are specified, -the schemes specified in the configuration file (``nameprep-map'' entry) -are used. -.TP 4 -\fB\-normalize\fP \fIscheme\fP -Specify the normalization scheme for NAMEPREP normalization process. -Currently, following \fIscheme\fPs are available: -.RS 4 -.IP \f(CWunicode-form-kc\fR -Unicode Normlization Form KC, also described in -``Unicode Technical Report #15: Unicode Normalization Forms'', -available from unicode.org. -.IP \f(CWunicode-form-kc/3.0.1\fR -Unicode Normlization Form KC, version 3.0.1 -.IP \f(CWunicode-form-kc/3.1.0\fR -Unicode Normlization Form KC, version 3.1.0 -.IP \f(CWnameprep-03\fR -Synonim for ``unicode-form-kc/3.0.1''. -.IP \f(CWnameprep-05\fR -Synonim for ``unicode-form-kc/3.1.0''. -.IP \f(CWnameprep-06\fR -Synonim for ``unicode-form-kc/3.1.0''. -.RE -.IP "" 4 -This option can be specified more than once. -In that case, each normalization will be performed in the order of the -specification. -.br -If neither this option nor ``\-nameprep'' are specified, -the schemes specified in the configuration file (``nameprep-normalize'' entry) -are used. -.TP 4 -\fB\-prohibit\fR \fIset\fR -Specify the set of prohibited characters. -Currently, following -.IR set s -are available. -.RS 4 -.IP \f(CWnameprep-03\fR 4 -Use list of prohibit characters specified by NAMEPREP-03 draft. -.IP \f(CWnameprep-05\fR 4 -Use list of prohibit characters specified by NAMEPREP-05 draft. -.IP \f(CWnameprep-06\fR 4 -Use list of prohibit characters specified by NAMEPREP-06 draft. -.IP \f(CWfileset:\fR\fIpath\fR 4 -Use list of characters specified by setfile -.IR path . -See mdn.conf(5) for the format of a setfile. -.RE -.IP "" 4 -This option can be specified more than once. In this case, the set of -prohibited characters is the union of the specified sets. -.br -If neither this option nor ``\-nameprep'' is specified, -list of characters specified by the configuration file -(``nameprep-prohibit'' entry) is used. -.TP 4 -\fB\-unassigned\fR \fIset\fR -Specify the set of unassigned codepoints. -Currently, following -.IR set s -are available. -.RS 4 -.IP \f(CWnameprep-03\fR 4 -Use the list of unassigned characters specified by NAMEPREP-03 draft. -.IP \f(CWnameprep-05\fR 4 -Use the list of unassigned characters specified by NAMEPREP-05 draft. -.IP \f(CWnameprep-06\fR 4 -Use the list of unassigned characters specified by NAMEPREP-06 draft. -.IP \f(CWfileset:\fR\fIpath\fR 4 -Use list of characters specified by setfile -.IR path . -See mdn.conf(5) for the format of a setfile. -.RE -.IP "" 4 -Note that unassigned codepoint checking is not performed -unless \-unassigncheck option is specified. -.br -This option can be specified more than once. In this case, the set of -prohibited characters is the union of the specified sets. -.br -If neither this option nor ``\-nameprep'' is specified, -list of characters specified by the configuration file -(``nameprep-unassigned'' entry) is used. -.TP 4 -\fB\-unassigncheck\fR, \fB\-u\fR -Specify unassigned codepoint check should be performed. -Unassigned codepoint check is disabled by default. -.TP 4 -\fB\-delimiter\fR \fIcodepoint\fP -Specify the character to be mapped to domain name delimiter (period). -This option can be specified more than once in order to specify multiple -characters. -.br -If this option is not specified, characters specified by the -configuration file (``delimiter-map'') is used. -.br -Note that delimiter mapping is not performed unless \-delimitermap option -is specified. -.br -This option is only meaningful in the normal conversion mode. -.TP 4 -\fB\-delimitermap\fR, \fB\-d\fR -Specify delimiter mapping should be performed. -By default, delimiter mapping is disabled. -.br -This option is only meaningful in the normal conversion mode. -.TP 4 -\fB\-whole\fP, \fB\-w\fP -Perform local mapping, nameprep and conversion to output codeset for the entire -input text. If this option is not specified, only non-ASCII characters -and their surrounding texts will be processed. -See ``CONVERSION MECHANISM'' for details. -.TP 4 -\fB\-alias\fP \fIpath\fP, \fB\-a\fP \fIpath\fP -Specify a codeset alias file. It is a simple text file, where -each line has a pair of alias name and real name separated by one -or more white spaces like below: -.nf -.ft CW - - \fIalias-codeset-name\fP \fIreal-codeset-name\fP - -.ft R -.fi -Lines starting with ``#'' are treated as comments. -.TP 4 -\fB\-flush\fP -Force line-buffering mode. -.TP 4 -\fB\-version\fP, \fB\-v\fP -Print version information and quit. -.\" -.SH LOCAL CODESET -mdnconv guesses local codeset from locale and environment variables. -See the ``LOCAL CODESET'' section in mdn.conf(5) for more details. -.\" -.SH CONVERSION MECHANISM -Here is a brief step-by-step description of how -.B mdnconv -does its job. -.IP "1. input-side convnersion" 4 -.B mdnconv -reads input text line by line, and converts them from the input codeset -to UTF-8 encoding. Basically this conversion is done using iconv() utility, -but for some special codesets like RACE, special converter will be used. -.br -Normally the whole line is converted, but if the input codeset is an -ACE (ASCII-compatible encoding, such as RACE), a special conversion -prodedure shown below is used: -.RS 4 -.IP 1) 3 -Find substrings which are valid ASCII domain names (i.e. constructed from -alphanumeric characters and hyphens) in the line. -.IP 2) 3 -For each substring found, try converting it to UTF-8. -.IP 3) 3 -If the conversion succeeds, replace the substring with the conversion -result. Otherwise, the original substring is retained. -.RE -.IP "2. finding where to process" 4 -Then -.B mdnconv -looks for (part of) internationalized domain name in the converted line, -and picks them up for further processing. -.br -.B mdnconv -recognizes the character sequence having the following property as -an internationalized domain name. -.RS 4 -.IP "\(bu" 2 -containing at least one non-ASCII character, and -.IP "\(bu" 2 -consisting of legal domain name characters (alphabets, digits, hypens), -non-ASCII characters and period. -.RE -.IP "" 4 -If you are not quite sure what this means (as I), -the following regular expression may help you. -.nf -.ft CW - - [-A-Za-z0-9.]*([-A-Za-z0-9.]|)* - -.ft P -.fi -For example, only ``www.###.com'' will be picked up from -the following lines (`#' denotes non-ASCII character). -.nf -.ft CW - - www.###.com. IN CNAME serv.xyz.com. - serv.xyz.com. IN A 10.0.0.1 - -.ft P -.fi -If \-whole option is specified, this step is skipped and the entire line -is subject to further processing. -.IP "3. delimiter mapping" 4 -For each string picked up by the last step, delimiter mapping is performed. -That is, substibute certain characters specified as domain name delimiter -with period. -.IP "4. local mapping" 4 -Perform local mapping. -If the local mapping is specified by command line option ``\-localmap'', -the specified mapping rule is applied. Otherwise, find the mapping rule -from the configuration file which matches to the TLD of the name, -and perform mapping according to the matched rule. -.IP "5. nameprep" 4 -Perform name preparation (NAMEPREP). This is a following 3-step process. -.RS 6 -.nf -1) Mapping -2) Normalization -3) Prohibited/unassigned character checking -.fi -.RE -.IP "" 4 -When -.B mdnconv -operates in the reverse conversion mode, this process checks that the -given domain name is properly NAMEPREP'ed. If it is not properly -NAMEPREP'ed and the input codeset is an ACE, the domain name is -converted back to the input codeset in the following process, instead -of the output codeset. -.IP "6. output-side conversion" 4 -Finally, -.B mdnconv -converts the nameprepped strings from UTF-8 encoding to the output codeset. -And it writes them to stdout together with the rest of the line. -.PP -If -.B mdnconv -operates in the reverse conversion mode, step 3 and 4 above are skipped. -.\" -.SH FILE MANAGEMENT -Maybe the best way to manage named.conf or zone master files that contains -internationalized domain name is to keep them in your local codeset so that -they can be edited with your favorite editor, and generate a version in -the IDN encoding using \fBmdnconv\fP. -.PP -`make' is a convenient tool for this purpose. -Suppose the local codeset version has suffix `.lc', and its ACE version -has suffix `.ace'. The following Makefile enables you to generate -ACE version from local codeset version by just typing `make'. -.RS 4 -.nf -.ft CW - -\&.SUFFIXES: .lc .ace -\&.lc.ace: - mdnconv -in $(LOCALCODE) $(MDNCONVOPT) $< > $@ - -LOCALCODE = EUC-JP -MDNCONVOPT = - -DESTFILES = db.zone1.ace db.zone2.ace - -all: $(DESTFILES) -.ft -.fi -.RE -.\" -.SH SEE ALSO -mdn.conf(5), -iconv(3) -.\" -.SH BUGS -The automatic input-code selection depends on your system, and sometimes -it cannot guess or guess wrong. It is better to explicitly specify it -using \-in option. diff --git a/contrib/idn/mdnkit/tools/mdnconv/mdnconv.c b/contrib/idn/mdnkit/tools/mdnconv/mdnconv.c deleted file mode 100644 index 0e75d7ee85..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/mdnconv.c +++ /dev/null @@ -1,546 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: mdnconv.c,v 1.1 2002/01/02 02:47:02 marka Exp $"; -#endif - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -/* - * mdnconv -- Codeset converter for named.conf and zone files - */ - -#include - -#include -#include -#include -#include -#include -#ifdef HAVE_LOCALE_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "util.h" - -#define MAX_DELIMITER 10 -#define MAX_LOCALMAPPER 10 -#define MAX_MAPPER 10 -#define MAX_NORMALIZER 10 -#define MAX_CHEKER 10 - -#define FLAG_REVERSE 1 -#define FLAG_DELIMITERMAP 2 -#define FLAG_LOCALMAP 4 -#define FLAG_NAMEPREP 8 -#define FLAG_UNASSIGNCHECK 16 -#define FLAG_SELECTIVE 32 - -int line_number; /* current input file line number */ -static int flush_every_line = 0; /* pretty obvious */ - -static int convert_file(mdn_resconf_t conf, FILE *fp, int flags); -static void print_usage(char *cmd); -static void print_version(void); -static unsigned long get_ucs(const char *p); - -int -main(int ac, char **av) { - char *cmd = *av; - char *cname; - unsigned long delimiters[MAX_DELIMITER]; - char *localmappers[MAX_LOCALMAPPER]; - char *mappers[MAX_MAPPER]; - char *normalizers[MAX_NORMALIZER]; - char *prohibits[MAX_CHEKER]; - char *unassigns[MAX_CHEKER]; - char *nameprep_version = NULL; - int ndelimiters = 0; - int nlocalmappers = 0; - int nmappers = 0; - int nnormalizers = 0; - int nprohibits = 0; - int nunassigns = 0; - char *in_code = NULL; - char *out_code = NULL; - char *resconf_file = NULL; - int no_resconf = 0; - char *encoding_alias = NULL; - int check_unassigned = 0; - int flags = FLAG_LOCALMAP | FLAG_NAMEPREP | FLAG_SELECTIVE; - FILE *fp; - mdn_result_t r; - mdn_resconf_t resconf; - -#ifdef HAVE_SETLOCALE - (void)setlocale(LC_ALL, ""); -#endif - - /* - * If the command name begins with 'r', reverse mode is assumed. - */ - if ((cname = strrchr(cmd, '/')) != NULL) - cname++; - else - cname = cmd; - if (cname[0] == 'r') - flags |= FLAG_REVERSE; - - ac--; - av++; - while (ac > 0 && **av == '-') { - -#define OPT_MATCH(opt) (strcmp(*av, opt) == 0) -#define MUST_HAVE_ARG if (ac < 2) print_usage(cmd) -#define APPEND_LIST(array, size, item, what) \ - if (size >= (sizeof(array) / sizeof(array[0]))) { \ - errormsg("too many " what "\n"); \ - exit(1); \ - } \ - array[size++] = item; \ - ac--; av++ - - if (OPT_MATCH("-in") || OPT_MATCH("-i")) { - MUST_HAVE_ARG; - in_code = av[1]; - ac--; - av++; - } else if (OPT_MATCH("-out") || OPT_MATCH("-o")) { - MUST_HAVE_ARG; - out_code = av[1]; - ac--; - av++; - } else if (OPT_MATCH("-conf") || OPT_MATCH("-c")) { - MUST_HAVE_ARG; - resconf_file = av[1]; - ac--; - av++; - } else if (OPT_MATCH("-nameprep") || OPT_MATCH("-n")) { - MUST_HAVE_ARG; - nameprep_version = av[1]; - ac--; - av++; - } else if (OPT_MATCH("-noconf") || OPT_MATCH("-C")) { - no_resconf = 1; - } else if (OPT_MATCH("-reverse") || OPT_MATCH("-r")) { - flags |= FLAG_REVERSE; - } else if (OPT_MATCH("-nolocalmap") || OPT_MATCH("-L")) { - flags &= ~FLAG_LOCALMAP; - } else if (OPT_MATCH("-delimitermap") || OPT_MATCH("-d")) { - flags |= FLAG_DELIMITERMAP; - } else if (OPT_MATCH("-nonameprep") || OPT_MATCH("-N")) { - flags &= ~FLAG_NAMEPREP; - } else if (OPT_MATCH("-unassigncheck") || OPT_MATCH("-u")) { - flags |= FLAG_UNASSIGNCHECK; - } else if (OPT_MATCH("-whole") || OPT_MATCH("-w")) { - flags &= ~FLAG_SELECTIVE; - } else if (OPT_MATCH("-localmap")) { - MUST_HAVE_ARG; - APPEND_LIST(localmappers, nlocalmappers, av[1], - "local maps"); - } else if (OPT_MATCH("-delimiter")) { - unsigned long v; - MUST_HAVE_ARG; - v = get_ucs(av[1]); - APPEND_LIST(delimiters, ndelimiters, v, - "delimiter maps"); - } else if (OPT_MATCH("-map")) { - MUST_HAVE_ARG; - APPEND_LIST(mappers, nmappers, av[1], "mappers"); - } else if (OPT_MATCH("-normalize")) { - MUST_HAVE_ARG; - APPEND_LIST(normalizers, nnormalizers, av[1], - "normalizers"); - } else if (OPT_MATCH("-prohibit")) { - MUST_HAVE_ARG; - APPEND_LIST(prohibits, nprohibits, av[1], - "prohibited checkers"); - } else if (OPT_MATCH("-unassigned")) { - MUST_HAVE_ARG; - APPEND_LIST(unassigns, nunassigns, av[1], - "unassigned checkers"); - check_unassigned = 1; - } else if (OPT_MATCH("-alias") || OPT_MATCH("-a")) { - MUST_HAVE_ARG; - encoding_alias = av[1]; - ac--; - av++; - } else if (OPT_MATCH("-flush")) { - flush_every_line = 1; - } else if (OPT_MATCH("-version") || OPT_MATCH("-v")) { - print_version(); - } else { - print_usage(cmd); - } -#undef OPT_MATCH -#undef MUST_HAVE_ARG -#undef APPEND_LIST - - ac--; - av++; - } - - if (ac > 1) - print_usage(cmd); - - /* Initialize. */ - if ((r = mdn_resconf_initialize()) != mdn_success) { - errormsg("error initializing library\n"); - return (1); - } - - /* Create resource context. */ - resconf = NULL; - if ((r = mdn_resconf_create(&resconf)) != mdn_success) { - errormsg("error initializing configuration parameters\n"); - return (1); - } - - /* Load configuration file. */ - if (!no_resconf) { - r = mdn_resconf_loadfile(resconf, resconf_file); - if (r != mdn_success) { - errormsg("error reading configuration file: %s\n", - mdn_result_tostring(r)); - return (1); - } - } - - /* Set encoding alias file. */ - if (encoding_alias != NULL) - set_encoding_alias(encoding_alias); - - /* Set input/output codeset. */ - if (flags & FLAG_REVERSE) { - if (in_code != NULL) - set_idncode(resconf, in_code); - else - check_defaultidncode(resconf, "-in"); - if (out_code != NULL) - set_localcode(resconf, out_code); - else - check_defaultlocalcode(resconf, "-out"); - } else { - if (in_code != NULL) - set_localcode(resconf, in_code); - else - check_defaultlocalcode(resconf, "-in"); - if (out_code != NULL) - set_idncode(resconf, out_code); - else - check_defaultidncode(resconf, "-out"); - } - - /* Set delimiter map(s). */ - if (ndelimiters > 0) - set_delimitermapper(resconf, delimiters, ndelimiters); - - /* Set local map(s). */ - if (nlocalmappers > 0) - set_localmapper(resconf, localmappers, nlocalmappers); - - /* Set NAMEPREP version. */ - if (nameprep_version != NULL) - set_nameprep(resconf, nameprep_version); - - /* Set NAMEPREP mapper. */ - if (nmappers > 0) - set_mapper(resconf, mappers, nmappers); - - /* Set NAMEPREP normalizer. */ - if (nnormalizers > 0) - set_normalizer(resconf, normalizers, nnormalizers); - - /* Set NAMEPREP prohibit checker. */ - if (nprohibits > 0) - set_prohibit_checkers(resconf, prohibits, nprohibits); - - /* Set NAMEPREP unassigned checker. */ - if (nunassigns > 0) - set_unassigned_checkers(resconf, unassigns, nunassigns); - - /* Open input file. */ - if (ac > 0) { - if ((fp = fopen(av[0], "r")) == NULL) { - errormsg("cannot open file %s: %s\n", - av[0], strerror(errno)); - return (1); - } - } else { - fp = stdin; - } - - /* Do the conversion. */ - return convert_file(resconf, fp, flags); -} - -static int -convert_file(mdn_resconf_t conf, FILE *fp, int flags) { - mdn_result_t r; - char line1[1024]; - char line2[1024]; - char insn1[10], insn2[10]; - int nl_trimmed; - int ace_hack; - mdn_converter_t conv; - - /* - * See if the input codeset is an ACE. - */ - if (flags & FLAG_REVERSE) - conv = mdn_resconf_getidnconverter(conf); - else - conv = mdn_resconf_getlocalconverter(conf); - if (conv != NULL && mdn_converter_isasciicompatible(conv)) - ace_hack = 1; - else - ace_hack = 0; - if (conv != NULL) - mdn_converter_destroy(conv); - - if (flags & FLAG_REVERSE) { - char *insnp = insn1; - - *insnp++ = 'i'; - if (flags & FLAG_NAMEPREP) { - *insnp++ = '!'; - *insnp++ = 'N'; - } - if (flags & FLAG_UNASSIGNCHECK) { - *insnp++ = '!'; - *insnp++ = 'u'; - } - *insnp = '\0'; - - strcpy(insn2, "L"); - } else { - char *insnp = insn2; - - strcpy(insn1, "l"); - - if (flags & FLAG_DELIMITERMAP) - *insnp++ = 'd'; - if (flags & FLAG_LOCALMAP) - *insnp++ = 'M'; - if (flags & FLAG_NAMEPREP) - *insnp++ = 'N'; - if (flags & FLAG_UNASSIGNCHECK) - *insnp++ = 'u'; - *insnp++ = 'I'; - *insnp = '\0'; - } - - line_number = 1; - while (fgets(line1, sizeof(line1), fp) != NULL) { - /* - * Trim newline at the end. This is needed for - * those ascii-comatible encodings such as UTF-5 or RACE - * not to try converting newlines, which will result - * in `invalid encoding' error. - */ - if (line1[strlen(line1) - 1] == '\n') { - line1[strlen(line1) - 1] = '\0'; - nl_trimmed = 1; - } else { - nl_trimmed = 0; - } - - /* - * Convert input line to UTF-8. - */ - if (ace_hack && (flags & FLAG_SELECTIVE)) { - /* - * Selectively decode those portions. - */ - r = selective_decode(conf, insn1, line1, line2, - sizeof(line2)); - } else { - r = mdn_res_nameconv(conf, insn1, - line1, line2, sizeof(line2)); - } - if (r != mdn_success) { - errormsg("conversion failed at line %d: %s\n", - line_number, - mdn_result_tostring(r)); - return (1); - } - if (!mdn_utf8_isvalidstring(line2)) { - errormsg("conversion to utf-8 failed at line %d\n", - line_number); - return (1); - } - - /* - * Perform local mapping and NAMEPREP, and convert to - * the output codeset. - */ - if (!(flags & FLAG_REVERSE) && (flags & FLAG_SELECTIVE)) { - r = selective_encode(conf, insn2, line2, line1, - sizeof(line1)); - } else { - r = mdn_res_nameconv(conf, insn2, line2, line1, - sizeof(line1)); - } - if (r != mdn_success) { - errormsg("error in nameprep or output conversion " - "at line %d: %s\n", - line_number, mdn_result_tostring(r)); - return (1); - } - - fputs(line1, stdout); - if (nl_trimmed) - putc('\n', stdout); - - if (flush_every_line) - fflush(stdout); - - line_number++; - } - return (0); -} - -static char *options[] = { - "-in INPUT-CODESET : specifies input codeset name.", - "-i INPUT-CODESET : synonym for -in", - "-out OUTPUT-CODESET : specifies output codeset name.", - "-o OUTPUT-CODESET : synonym for -out", - "-conf CONF-FILE : specifies pathname of MDN configuration file.", - "-c CONF-FILE : synonym for -conf", - "-noconf : do not load MDN configuration file.", - "-C : synonym for -noconf", - "-reverse : specifies reverse conversion.", - " (i.e. IDN encoding to local encoding)", - "-r : synonym for -reverse", - "-nameprep VERSION : specifies version name of NAMEPREP.", - "-n VERSION : synonym for -nameprep", - "-nonameprep : do not perform NAMEPREP.", - "-N : synonym for -nonameprep", - "-localmap MAPPING : specifies local mapping.", - "-nolocalmap : do not perform local mapping.", - "-L : synonym for -nolocalmap", - "-map SCHEME : specifies mapping scheme.", - "-normalize SCHEME : specifies normalization scheme.", - "-prohibit SET : specifies set of prohibited characters.", - "-unassigned SET : specifies set of unassigned code points.", - "-unassigncheck : perform unassigned codepoint check.", - "-u : synonym for -unassigncheck", - "-delimiter U+XXXX : specifies local delimiter code point.", - "-delimitermap : perform local delimiter mapping.", - "-d : synonym for -delimitermap", - "-alias alias-file : specifies codeset alias file.", - "-a : synonym for -alias", - "-flush : line-buffering mode.", - "-whole : convert the whole region instead of", - " regions containing non-ascii characters.", - "-w : synonym for -whole", - "-version : print version number, then exit.", - "-v : synonym for -version", - "", - " The following options can be specified multiple times", - " -localmap, -map, -normalize, -prohibit, -unassigned -delimiter", - NULL, -}; - -static void -print_version() { - fprintf(stderr, "mdnconv (mDNkit) version: %s\n" - "library version: %s\n", - MDNKIT_VERSION, - mdn_version_getstring()); - exit(0); -} - -static void -print_usage(char *cmd) { - int i; - - fprintf(stderr, "Usage: %s [options..] [file]\n", cmd); - - for (i = 0; options[i] != NULL; i++) - fprintf(stderr, "\t%s\n", options[i]); - - exit(1); -} - -static unsigned long -get_ucs(const char *p) { - unsigned long v; - char *end; - - /* Skip optional 'U+' */ - if (strncmp(p, "U+", 2) == 0) - p += 2; - - v = strtoul(p, &end, 16); - if (*end != '\0') { - fprintf(stderr, "invalid UCS code point \"%s\"\n", p); - exit(1); - } - - return v; -} diff --git a/contrib/idn/mdnkit/tools/mdnconv/mdnslookup.in b/contrib/idn/mdnkit/tools/mdnconv/mdnslookup.in deleted file mode 100644 index 84b6e62c2d..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/mdnslookup.in +++ /dev/null @@ -1,132 +0,0 @@ -#! /bin/sh -# $Id: mdnslookup.in,v 1.1 2002/02/08 05:41:33 marka Exp $ -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Fuundo Bldg., 1-2 Kanda Ogawamachi, Chiyoda-ku, -# Tokyo, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -USAGE="Usage: $0 domain-name DNS-server" - -# -# Parse command line arguments. -# -if [ $# -lt 2 ] ; then - echo "$0: too few argument" 1>&2 - echo $USAGE 1>&2 - exit 1 -fi - -if [ $# -gt 2 ] ; then - echo "$0: too many argument" 1>&2 - echo $USAGE 1>&2 - exit 1 -fi - -case "$1" in --*) echo "$0: unknown option $1" 1>&2 - echo $USAGE 1>&2 - exit 1 - ;; -esac - -LOCAL_DOMAIN_NAME="$1" -NAME_SERVER="$2" - -# -# Append some directories to PATH. -# -[ -d /usr/sbin ] && PATH=$PATH:/usr/sbin -[ -d /sbin ] && PATH=$PATH:/sbin - -# -# Find `nslookup' command. -# -if [ x"$NSLOOKUP" = x ] ; then - for I in `echo $PATH | sed -e 's/:/ /g'` ; do - if [ -x $I/nslookup ] ; then - NSLOOKUP="$I/nslookup" - break - fi - done - if [ "$NSLOOKUP" = "" ] ; then - echo "$0: nslookup not found" 1>&2 - exit 1 - fi -fi -if [ ! -x "$NSLOOKUP" ] ; then - echo "$0: nslookup not found" 1>&2 - exit 1 -fi - -# -# Check if `mdnconv' command exists. -# -MDNCONV=${MDNCONV-"@bindir@/mdnconv"} -if [ ! -x "$MDNCONV" ] ; then - echo "$0: mdnconv not found" 1>&2 - exit 1 -fi - -# -# Convert domain name to IDN encoding. -# -IDN_DOMAIN_NAME="`echo $LOCAL_DOMAIN_NAME | $MDNCONV -w`" || exit 1 - -# -# Invoke nslookup. -# -$NSLOOKUP $IDN_DOMAIN_NAME $NAME_SERVER < /dev/null || exit 1 - -exit 0 diff --git a/contrib/idn/mdnkit/tools/mdnconv/util.c b/contrib/idn/mdnkit/tools/mdnconv/util.c deleted file mode 100644 index 6ffec735ea..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/util.c +++ /dev/null @@ -1,439 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: util.c,v 1.1 2002/01/02 02:47:02 marka Exp $"; -#endif - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "util.h" - -extern int line_number; - -mdn_result_t -selective_encode(mdn_resconf_t conf, char *insn, - char *from, char *to, int tolen) -{ - for (;;) { - int len; - char *region_start, *region_end; - mdn_result_t r; - char save; - - /* - * Find the region that needs conversion. - */ - r = mdn_selectiveencode_findregion(from, ®ion_start, - ®ion_end); - if (r == mdn_notfound) { - /* - * Not found. Just copy the whole thing. - */ - if (tolen <= strlen(from)) - return (mdn_buffer_overflow); - (void)strcpy(to, from); - return (mdn_success); - } else if (r != mdn_success) { - /* This should not happen.. */ - errormsg("internal error at line %d: %s\n", - line_number, mdn_result_tostring(r)); - return (r); - } - - /* - * We have found a region to convert. - * First, copy the prefix part verbatim. - */ - len = region_start - from; - if (tolen < len) { - errormsg("internal buffer overflow at line %d\n", - line_number); - return (mdn_buffer_overflow); - } - (void)memcpy(to, from, len); - to += len; - tolen -= len; - - /* - * Terminate the region with NUL. - */ - save = *region_end; - *region_end = '\0'; - - /* - * Encode the region. - */ - r = mdn_res_nameconv(conf, insn, region_start, to, tolen); - - /* - * Restore character. - */ - *region_end = save; - - if (r != mdn_success) - return (r); - - len = strlen(to); - to += len; - tolen -= len; - - from = region_end; - } -} - -mdn_result_t -selective_decode(mdn_resconf_t conf, char *insn, - char *from, char *to, int tolen) -{ - char *domain_name; - char *ignored_chunk; - char save; - int len; - mdn_result_t r; - - /* - * While `*from' points to a character in a string which may be - * a domain name, `domain_name' refers to the beginning of the - * domain name. - */ - domain_name = NULL; - - /* - * We ignore chunks matching to the regular expression: - * [\-\.][0-9A-Za-z\-\.]* - * - * While `*from' points to a character in such a chunk, - * `ignored_chunk' refers to the beginning of the chunk. - */ - ignored_chunk = NULL; - - for (;;) { - if (*from == '-') { - /* - * We don't recognize `.-' as a part of domain name. - */ - if (domain_name != NULL) { - if (*(from - 1) == '.') { - ignored_chunk = domain_name; - domain_name = NULL; - } - } else if (ignored_chunk == NULL) { - ignored_chunk = from; - } - - } else if (*from == '.') { - /* - * We don't recognize `-.' nor `..' as a part of - * domain name. - */ - if (domain_name != NULL) { - if (*(from - 1) == '-' || *(from - 1) == '.') { - ignored_chunk = domain_name; - domain_name = NULL; - } - } else if (ignored_chunk == NULL) { - ignored_chunk = from; - } - - } else if (('a' <= *from && *from <= 'z') || - ('A' <= *from && *from <= 'Z') || - ('0' <= *from && *from <= '9')) { - if (ignored_chunk == NULL && domain_name == NULL) - domain_name = from; - - } else { - if (ignored_chunk != NULL) { - /* - * `from' reaches the end of the ignored chunk. - * Copy the chunk to `to'. - */ - len = from - ignored_chunk; - if (tolen < len) - return (mdn_buffer_overflow); - (void)memcpy(to, ignored_chunk, len); - to += len; - tolen -= len; - - } else if (domain_name != NULL) { - /* - * `from' reaches the end of the domain name. - * Decode the domain name, and copy the result - * to `to'. - */ - save = *from; - *from = '\0'; - r = mdn_res_nameconv(conf, insn, - domain_name, to, tolen); - *from = save; - - if (r == mdn_success) { - len = strlen(to); - } else if (r == mdn_invalid_encoding) { - len = from - domain_name; - if (tolen < len) - return (mdn_buffer_overflow); - (void)memcpy(to, domain_name, len); - } else { - return (r); - } - to += len; - tolen -= len; - } - - /* - * Copy a character `*from' to `to'. - */ - if (tolen < 1) - return (mdn_buffer_overflow); - *to = *from; - to++; - tolen--; - - domain_name = NULL; - ignored_chunk = NULL; - - if (*from == '\0') - break; - } - - from++; - } - - return (mdn_success); -} - -void -set_encoding_alias(const char *encoding_alias) { - mdn_result_t r; - - if ((r = mdn_converter_aliasfile(encoding_alias)) != mdn_success) { - errormsg("cannot read alias file %s: %s\n", - encoding_alias, mdn_result_tostring(r)); - exit(1); - } -} - -void -set_localcode(mdn_resconf_t conf, const char *code) { - mdn_result_t r; - - r = mdn_resconf_setlocalconvertername(conf, code, 0); - if (r != mdn_success) { - errormsg("cannot create converter for codeset %s: %s\n", - code, mdn_result_tostring(r)); - exit(1); - } -} - -void -set_idncode(mdn_resconf_t conf, const char *code) { - mdn_result_t r; - - r = mdn_resconf_setidnconvertername(conf, code, 0); - if (r != mdn_success) { - errormsg("cannot create converter for codeset %s: %s\n", - code, mdn_result_tostring(r)); - exit(1); - } -} - -void -set_delimitermapper(mdn_resconf_t conf, unsigned long *delimiters, - int ndelimiters) { - mdn_result_t r; - - r = mdn_resconf_addalldelimitermapucs(conf, delimiters, ndelimiters); - if (r != mdn_success) { - errormsg("cannot add delimiter: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -set_localmapper(mdn_resconf_t conf, char **mappers, int nmappers) { - mdn_result_t r; - - /* Add mapping. */ - r = mdn_resconf_addalllocalmapselectornames(conf, - MDN_MAPSELECTOR_DEFAULT, - (const char **)mappers, - nmappers); - if (r != mdn_success) { - errormsg("cannot add local map: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -set_nameprep(mdn_resconf_t conf, char *version) { - mdn_result_t r; - - r = mdn_resconf_setnameprepversion(conf, version); - if (r != mdn_success) { - errormsg("error setting nameprep %s: %s\n", - version, mdn_result_tostring(r)); - exit(1); - } -} - -void -set_mapper(mdn_resconf_t conf, char **mappers, int nmappers) { - mdn_result_t r; - - /* Configure mapper. */ - r = mdn_resconf_addallmappernames(conf, (const char **)mappers, - nmappers); - if (r != mdn_success) { - errormsg("cannot add nameprep map: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -set_normalizer(mdn_resconf_t conf, char **normalizers, int nnormalizer) { - mdn_result_t r; - - r = mdn_resconf_addallnormalizernames(conf, - (const char **)normalizers, - nnormalizer); - if (r != mdn_success) { - errormsg("cannot add normalizer: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -set_prohibit_checkers(mdn_resconf_t conf, char **prohibits, int nprohibits) { - mdn_result_t r; - - r = mdn_resconf_addallprohibitcheckernames(conf, - (const char **)prohibits, - nprohibits); - if (r != mdn_success) { - errormsg("cannot add prohibit checker: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -set_unassigned_checkers(mdn_resconf_t conf, char **unassigns, int nunassigns) { - mdn_result_t r; - - r = mdn_resconf_addallunassignedcheckernames(conf, - (const char **)unassigns, - nunassigns); - if (r != mdn_success) { - errormsg("cannot add unassigned checker: %s\n", - mdn_result_tostring(r)); - exit(1); - } -} - -void -check_defaultlocalcode(mdn_resconf_t conf, const char *opt) { - mdn_converter_t conv = mdn_resconf_getlocalconverter(conf); - - if (conv == NULL) { - errormsg("cannot get the default local encoding.\n" - "please specify an appropriate one " - "with `%s' option.\n", opt); - exit(1); - } else - mdn_converter_destroy(conv); -} - -void -check_defaultidncode(mdn_resconf_t conf, const char *opt) { - mdn_converter_t conv = mdn_resconf_getidnconverter(conf); - - if (conv == NULL) { - errormsg("cannot get the default IDN encoding.\n" - "please specify an appropriate one " - "with `%s' option.\n", opt); - exit(1); - } else - mdn_converter_destroy(conv); -} - -void -errormsg(const char *fmt, ...) { - va_list args; - - va_start(args, fmt); - vfprintf(stderr, fmt, args); - va_end(args); -} diff --git a/contrib/idn/mdnkit/tools/mdnconv/util.h b/contrib/idn/mdnkit/tools/mdnconv/util.h deleted file mode 100644 index 3a86e1fa2c..0000000000 --- a/contrib/idn/mdnkit/tools/mdnconv/util.h +++ /dev/null @@ -1,89 +0,0 @@ -/* $Id: util.h,v 1.1 2002/01/02 02:47:02 marka Exp $ */ -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -extern mdn_result_t selective_encode(mdn_resconf_t conf, char *insn, - char *from, char *to, int tolen); -extern mdn_result_t selective_decode(mdn_resconf_t conf, char *insn, - char *from, char *to, int tolen); -extern void set_encoding_alias(const char *encoding_alias); -extern void set_localcode(mdn_resconf_t conf, const char *code); -extern void set_idncode(mdn_resconf_t conf, const char *code); -extern void set_delimitermapper(mdn_resconf_t conf, - unsigned long *delimiters, - int ndelimiters); -extern void set_localmapper(mdn_resconf_t conf, - char **mappers, int nmappers); -extern void set_nameprep(mdn_resconf_t conf, char *version); -extern void set_mapper(mdn_resconf_t conf, - char **mappers, int nmappers); -extern void set_normalizer(mdn_resconf_t conf, - char **normalizer, int nnormalizer); -extern void set_prohibit_checkers(mdn_resconf_t conf, - char **prohibits, - int nprohibits); -extern void set_unassigned_checkers(mdn_resconf_t conf, - char **unassigns, - int nunassigns); -extern void check_defaultlocalcode(mdn_resconf_t conf, - const char *opt); -extern void check_defaultidncode(mdn_resconf_t conf, - const char *opt); -extern void errormsg(const char *fmt, ...); - diff --git a/contrib/idn/mdnkit/tools/rpm/mdnkit.spec b/contrib/idn/mdnkit/tools/rpm/mdnkit.spec deleted file mode 100644 index c52031d653..0000000000 --- a/contrib/idn/mdnkit/tools/rpm/mdnkit.spec +++ /dev/null @@ -1,146 +0,0 @@ -%define version 2.1 - -# official/beta release: -%define release 1 -%define distrel %{version} - -# release candidate: -#define release rc1 -#define distrel %{version}-%{release} - -%define serial 2001052801 - -%define name mdnkit -%define distsrc %{name}-%{distrel}-src - -Name: %{name} -Version: %{version} -Release: %{release} -Copyright: distributable -Group: System Environment/Daemons -Source: %{distsrc}.tar.gz -#Source1: mdnsproxy.init -BuildRoot: /var/tmp/%{name}-root -Serial: %{serial} -Summary: multilingual Domain Name evaluation kit (mDNkit/JPNIC) -Vendor: JPNIC -Packager: Japan Network Information Center - -%description -mDNkit is a kit for evaluating various proposed methods regarding -multilingualized/internationalized DNS. - -%package devel -Group: Development/Libraries -Summary: The development files for mDNkit - -%description devel -The header files and library(libmdn.a) to develop applications -that use MDN library. - -%prep -%setup -n %{distsrc} -#%patch0 -p1 -b .runmdn - -%build -if [ -f /usr/lib/libiconv.a -o -f /usr/lib/libiconv.so ] -then - if [ -f /lib/libc-2.0* ] - then - ICONV="--with-iconv=yes" - fi -fi - -CFLAGS="$RPM_OPT_FLAGS" ./configure \ - --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var $ICONV -make - -%install -rm -fr $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/bin -mkdir -p $RPM_BUILD_ROOT/usr/sbin -mkdir -p $RPM_BUILD_ROOT/usr/lib -mkdir -p $RPM_BUILD_ROOT/usr/include -mkdir -p $RPM_BUILD_ROOT/usr/share/mdnkit -mkdir -p $RPM_BUILD_ROOT/var/mdnsproxy -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -make prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc \ - localstatedir=$RPM_BUILD_ROOT/var install - -mv $RPM_BUILD_ROOT/etc/mdn.conf.sample $RPM_BUILD_ROOT/etc/mdn.conf -mv $RPM_BUILD_ROOT/etc/mdnsproxy.conf.sample $RPM_BUILD_ROOT/etc/mdnsproxy.conf -install -c -m 755 tools/rpm/mdnsproxy.init $RPM_BUILD_ROOT/etc/rc.d/init.d/mdnsproxy - -# devel kit -#install -c lib/libmdn.a $RPM_BUILD_ROOT/usr/lib -#cp -r include/mdn $RPM_BUILD_ROOT/usr/include - -# docs -mkdir rpm_docs -(cp NEWS DISTFILES README.ja README LICENSE.txt ChangeLog rpm_docs) -cp -r patch rpm_docs - -%clean -rm -fr $RPM_BUILD_ROOT - -%changelog -* Mon May 28 2001 MANABE Takashi -- include runmdn, libmdnresolv - -* Mon Apr 4 2001 Motoyuki Kasahara -- 2.1 release - -* Mon Apr 4 2001 Motoyuki Kasahara -- 2.0.1 release - -* Mon Apr 2 2001 MANABE Takashi -- 2.0 release - -* Fri Mar 3 2001 MANABE Takashi -- 1.3 release - -* Mon Dec 6 2000 MANABE Takashi -- add brace/lace functions to libmdnresolv(mdnkit-1.2-runmdn.patch) -- include /var/dnsproxy -- change files section for compressed man pages - -* Mon Nov 27 2000 Makoto Ishisone -- 1.2 release - -* Thu Nov 2 2000 MANABE Takashi -- 1.1 release - -* Fri Oct 27 2000 MANABE Takashi -- dnsproxy.patch1 -- move libmdnresolv.{la,so} from mdnkit-devel to mdnkit package - -* Wed Oct 18 2000 MANABE Takashi -- 1.0 release - -%files -%defattr(-, root, root) -/usr/sbin/mdnsproxy -/var/mdnsproxy -/usr/bin/mdnconv -/usr/bin/runmdn -/etc/rc.d/init.d/mdnsproxy -/usr/lib/libmdn.so.* -/usr/lib/libmdnresolv.so.* -/usr/lib/libmdnresolv.la -/usr/share/mdnkit/* -%attr(0644, root, root) %config(noreplace) /etc/mdn.conf -%attr(0644, root, root) %config(noreplace) /etc/mdnsproxy.conf -%attr(0644, root, man) /usr/man/man1/* -%attr(0644, root, man) /usr/man/man5/* -%attr(0644, root, man) /usr/man/man8/* -%doc rpm_docs/* - -%files devel -%defattr(-, root, root) -/usr/lib/libmdn.a -/usr/lib/libmdn.la -/usr/lib/libmdn.so -/usr/lib/libmdnresolv.a -/usr/include/mdn/* diff --git a/contrib/idn/mdnkit/tools/rpm/mdnsproxy.init b/contrib/idn/mdnkit/tools/rpm/mdnsproxy.init deleted file mode 100644 index 347ce64928..0000000000 --- a/contrib/idn/mdnkit/tools/rpm/mdnsproxy.init +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# chkconfig: 345 60 10 -# description: This shell script takes care of starting and stopping -# mdnsproxy (mDNS proxy server). -# - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -[ -f /usr/sbin/mdnsproxy ] || exit 0 - -[ -f /etc/mdnsproxy.conf ] || exit 0 - -# See how we were called. -case "$1" in - start) - # Start daemons. - echo -n "Starting mdnsproxy: " - daemon mdnsproxy -daemon - echo - touch /var/lock/subsys/mdnsproxy - ;; - stop) - # Stop daemons. - echo -n "Shutting down mdnsproxy: " - killproc mdnsproxy - echo "done" - rm -f /var/lock/subsys/mdnsproxy - ;; - *) - echo "Usage: mdnsproxy {start|stop}" - exit 1 -esac - -exit 0 diff --git a/contrib/idn/mdnkit/tools/runmdn/Makefile.in b/contrib/idn/mdnkit/tools/runmdn/Makefile.in deleted file mode 100644 index ea892d0bde..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/Makefile.in +++ /dev/null @@ -1,182 +0,0 @@ -# $Id: Makefile.in,v 1.1 2002/01/02 02:47:03 marka Exp $ -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -LIB_CURRENT = 7 -LIB_REVISION = 3 -LIB_AGE = 0 - -.SUFFIXES: .lo - -top_builddir = ../.. -subdir = tools/runmdn - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -mandir = @mandir@ - -CC = @CC@ -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = @top_srcdir@/mkinstalldirs -SHELL = @SHELL@ -LIBTOOL = @LIBTOOL@ - -ICONVINC = @ICONVINC@ -ICONVLIB = @ICONVLIB@ - -OPTS = -INCS = -I$(srcdir)/../../include -I../../include $(ICONVINC) -DEFS = -CFLAGS = $(INCS) $(OPTS) $(DEFS) @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -LIB = libmdnresolv -OBJS = rtresolver.lo stub.lo $(MDNOBJS) -SCRIPT = runmdn -LIBDL = @LIBDL@ - -MDNDIR = ../../lib -MDNOBJS = \ - $(MDNDIR)/ace.lo \ - $(MDNDIR)/altdude.lo \ - $(MDNDIR)/amcacem.lo \ - $(MDNDIR)/amcaceo.lo \ - $(MDNDIR)/amcacer.lo \ - $(MDNDIR)/amcacev.lo \ - $(MDNDIR)/amcacew.lo \ - $(MDNDIR)/amcacez.lo \ - $(MDNDIR)/api.lo \ - $(MDNDIR)/brace.lo \ - $(MDNDIR)/checker.lo \ - $(MDNDIR)/converter.lo \ - $(MDNDIR)/debug.lo \ - $(MDNDIR)/delimitermap.lo \ - $(MDNDIR)/dn.lo \ - $(MDNDIR)/dude.lo \ - $(MDNDIR)/filechecker.lo \ - $(MDNDIR)/filemapper.lo \ - $(MDNDIR)/lace.lo \ - $(MDNDIR)/localencoding.lo \ - $(MDNDIR)/log.lo \ - $(MDNDIR)/mace.lo \ - $(MDNDIR)/mapper.lo \ - $(MDNDIR)/mapselector.lo \ - $(MDNDIR)/nameprep.lo \ - $(MDNDIR)/normalizer.lo \ - $(MDNDIR)/race.lo \ - $(MDNDIR)/res.lo \ - $(MDNDIR)/resconf.lo \ - $(MDNDIR)/result.lo \ - $(MDNDIR)/strhash.lo \ - $(MDNDIR)/ucsmap.lo \ - $(MDNDIR)/ucsset.lo \ - $(MDNDIR)/unicode.lo \ - $(MDNDIR)/unormalize.lo \ - $(MDNDIR)/utf5.lo \ - $(MDNDIR)/utf6.lo \ - $(MDNDIR)/utf8.lo \ - $(MDNDIR)/util.lo \ - $(MDNDIR)/version.lo - -.c.lo: - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< - -all: $(LIB).la runmdn - -rtresolver.lo: $(srcdir)/resolver.c - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DFOR_RUNMDN -o $@ \ - -I$(srcdir) -c $(srcdir)/resolver.c - -$(LIB).la: $(OBJS) - $(LIBTOOL) --mode=link $(LD) $(LDFLAGS) -o $@ \ - -version-info $(LIB_CURRENT):$(LIB_REVISION):$(LIB_AGE) \ - -module -rpath $(libdir) $(OBJS) $(LIBDL) - -runmdn: $(srcdir)/runmdn.in - cd $(top_builddir) && \ - CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= \ - $(SHELL) ./config.status - -install: install-lib install-script install-man - -install-script: - $(MKINSTALLDIRS) $(bindir) - $(INSTALL_SCRIPT) $(SCRIPT) $(bindir) - -install-lib: $(LIB).la - $(MKINSTALLDIRS) $(libdir) - $(LIBTOOL) --mode=install $(INSTALL_DATA) $(LIB).la $(libdir) - -install-man: - $(MKINSTALLDIRS) $(mandir)/man1 - $(INSTALL_DATA) $(srcdir)/runmdn.1 $(mandir)/man1 - -clean: - rm -f *.lo *.la *.o - rm -fr .libs/ - -realclean: - rm -f Makefile runmdn config.cache config.log config.status libtool - rm -f *.lo *.la *.o *~ - rm -fr .libs/ diff --git a/contrib/idn/mdnkit/tools/runmdn/resolver.c b/contrib/idn/mdnkit/tools/runmdn/resolver.c deleted file mode 100644 index b86762c88c..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/resolver.c +++ /dev/null @@ -1,1049 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: resolver.c,v 1.2 2002/02/08 05:41:38 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifdef FOR_RUNMDN -/* - * This file is specially compiled for runmdn. - * Runmdn replaces existing resolver functions dynamically with ones - * with MDN processing (encoding conversion and normalization). - * So entry names must be same as the system's one. - */ -#include "stub.h" - -#define ENTRY(name) name -#define REAL(name) mdn_stub_ ## name -#else -/* - * For normal use. All the entry names are prefixed with "mdn_resolver_". - * has bunch of #defines to substitute the standard - * name resolver functions with ones provided here. - */ -#include -#undef gethostbyname -#undef gethostbyname2 -#undef gethostbyaddr -#undef gethostbyname_r -#undef gethostbyname2_r -#undef gethostbyaddr_r -#undef getipnodebyname -#undef getipnodebyaddr -#undef getaddrinfo -#undef getnameinfo - -#define ENTRY(name) mdn_resolver_ ## name -#define REAL(name) name -#endif - -#define MDN_NAME_SIZE 512 - -#define MDN_HOSTBUF_SIZE 2048 -typedef union { - char *dummy_for_alignment; - char data[MDN_HOSTBUF_SIZE]; -} hostbuf_t; - -typedef struct obj_lock { - void *key; - struct obj_lock *next; -} obj_lock_t; - -#define OBJLOCKHASH_SIZE 127 -static obj_lock_t *obj_lock_hash[OBJLOCKHASH_SIZE]; - -/* - * This variable is to prevent MDN processing occuring more than once for - * a single name resolution. This will happen if some resolver function - * is implemented using another function (e.g. gethostbyname() implemented - * using gethostbyname2()). - * No, using the static variable is not a correct thing to do for a multi- - * threading environment, but I don't think of a better solution.. - */ -static int mdn_isprocessing = 0; - -static int obj_hash(void *key); -static int obj_islocked(void *key); -static void obj_lock(void *key); -static void obj_unlock(void *key); -static struct hostent *copy_decode_hostent_static(struct hostent *hp, - struct hostent *newhp, - char *buf, size_t buflen, - int *errp); -static char *decode_name_dynamic(const char *name); -static struct hostent *copy_decode_hostent_dynamic(struct hostent *hp, - int *errp); -static void free_copied_hostent(struct hostent *hp); -#ifdef HAVE_GETADDRINFO -static struct addrinfo *copy_decode_addrinfo_dynamic(struct addrinfo *aip); -#endif -#ifdef HAVE_FREEADDRINFO -static void free_copied_addrinfo(struct addrinfo *aip); -#endif - -/* - * Object locking facility. - */ - -static int -obj_hash(void *key) { - /* - * Hash function for obj_*. - * 'key' is supposed to be an address. - */ - unsigned long v = (unsigned long)key; - - return ((v >> 3) % OBJLOCKHASH_SIZE); -} - -static int -obj_islocked(void *key) -{ - /* - * Check if the object specified by 'key' is locked. - * Return 1 if so, 0 otherwise. - */ - int h = obj_hash(key); - obj_lock_t *olp = obj_lock_hash[h]; - - while (olp != NULL) { - if (olp->key == key) - return (1); - olp = olp->next; - } - return (0); -} - -static void -obj_lock(void *key) -{ - /* - * Lock an object specified by 'key'. - */ - int h = obj_hash(key); - obj_lock_t *olp; - - olp = malloc(sizeof(obj_lock_t)); - if (olp != NULL) { - olp->key = key; - olp->next = obj_lock_hash[h]; - obj_lock_hash[h] = olp; - } -} - -static void -obj_unlock(void *key) -{ - /* - * Unlock an object specified by 'key'. - */ - int h = obj_hash(key); - obj_lock_t *olp, *olp0; - - olp = obj_lock_hash[h]; - olp0 = NULL; - while (olp != NULL) { - if (olp->key == key) { - if (olp0 == NULL) - obj_lock_hash[h] = olp->next; - else - olp0->next = olp->next; - free(olp); - return; - } - olp0 = olp; - olp = olp->next; - } -} - -static struct hostent * -copy_decode_hostent_static(struct hostent *hp, struct hostent *newhp, - char *buf, size_t buflen, int *errp) -{ - /* - * Copy "struct hostent" data referenced by 'hp' to 'newhp'. - * It's a deep-copy, meaning all the data referenced by 'hp' are - * also copied. They are copied into 'buf', whose length is 'buflen'. - * The domain names ('hp->h_name' and 'hp->h_aliases') are - * decoded from ACE to the local encoding before they are copied. - * If 'buf' is too small to hold all the data, NULL will be - * returned and '*errp' is set to NO_RECOVERY. - */ - int naliases = 0; - int naddrs = 0; - - if (hp == NULL) - return (NULL); - - *newhp = *hp; - - if (hp->h_aliases != NULL) { - /* - * Allocate aliase table in 'buf'. - */ - size_t sz; - - while (hp->h_aliases[naliases] != NULL) - naliases++; - - newhp->h_aliases = (char **)buf; - sz = sizeof(char *) * (naliases + 1); - - if (buflen < sz) - goto overflow; - - buf += sz; - buflen -= sz; - } - - if (hp->h_addr_list != NULL) { - /* - * Allocate address table in 'buf'. - */ - size_t sz; - int i; - - while (hp->h_addr_list[naddrs] != NULL) - naddrs++; - - newhp->h_addr_list = (char **)buf; - sz = sizeof(char *) * (naddrs + 1); - - if (buflen < sz) - goto overflow; - - buf += sz; - buflen -= sz; - - /* - * Copy the addresses. - */ - sz = hp->h_length * naddrs; - if (buflen < sz) - goto overflow; - - for (i = 0; i < naddrs; i++) { - newhp->h_addr_list[i] = buf; - memcpy(buf, hp->h_addr_list[i], hp->h_length); - buf += hp->h_length; - } - newhp->h_addr_list[naddrs] = NULL; - - buf += sz; - buflen -= sz; - } - - if (hp->h_name != NULL) { - /* - * Decode the name in h_name. - */ - mdn_result_t r; - size_t slen; - - r = mdn_decodename(MDN_DECODE_APP, hp->h_name, - buf, buflen); - switch (r) { - case mdn_success: - newhp->h_name = buf; - break; - default: - /* Copy hp->h_name verbatim. */ - if (strlen(hp->h_name) + 1 <= buflen) { - newhp->h_name = buf; - strcpy(buf, hp->h_name); - break; - } - /* falllthrough */ - case mdn_buffer_overflow: - goto overflow; - } - - slen = strlen(buf) + 1; - buf += slen; - buflen -= slen; - } - - if (hp->h_aliases != NULL) { - /* - * Decode the names in h_aliases. - */ - char **aliases = hp->h_aliases; - char **newaliases = newhp->h_aliases; - int i; - - for (i = 0; i < naliases; i++) { - mdn_result_t r; - size_t slen; - - r = mdn_decodename(MDN_DECODE_APP, aliases[i], - buf, buflen); - - switch (r) { - case mdn_success: - newaliases[i] = buf; - break; - default: - /* Copy hp->h_name verbatim. */ - if (strlen(aliases[i]) + 1 <= buflen) { - newaliases[i] = buf; - strcpy(buf, aliases[i]); - break; - } - /* falllthrough */ - case mdn_buffer_overflow: - goto overflow; - } - - slen = strlen(buf) + 1; - buf += slen; - buflen -= slen; - } - newaliases[naliases] = NULL; - } - - return (newhp); - - overflow: - *errp = NO_RECOVERY; - return (NULL); -} - -static char * -decode_name_dynamic(const char *name) { - mdn_result_t r; - char buf[MDN_NAME_SIZE]; - char *s; - - r = mdn_decodename(MDN_DECODE_APP, name, buf, sizeof(buf)); - if (r == mdn_success) { - name = buf; - } - s = malloc(strlen(name) + 1); - if (s == NULL) - return (NULL); - else - return (strcpy(s, name)); -} - -static struct hostent * -copy_decode_hostent_dynamic(struct hostent *hp, int *errp) { - /* - * Make a deep-copy of the data referenced by 'hp', and return - * a pointer to the copied data. - * All the data are dynamically allocated using malloc(). - * The domain names ('hp->h_name' and 'hp->h_aliases') are - * decoded from ACE to the local encoding before they are copied. - * If malloc() fails, NULL will be returned and '*errp' is set to - * NO_RECOVERY. - */ - struct hostent *newhp; - char **pp; - size_t alloc_size; - int naliases = 0; - int naddrs = 0; - int i; - - if (hp == NULL) - return (NULL); - - if (hp->h_aliases != NULL) { - while (hp->h_aliases[naliases] != NULL) - naliases++; - } - - if (hp->h_addr_list != NULL) { - while (hp->h_addr_list[naddrs] != NULL) - naddrs++; - } - - alloc_size = sizeof(struct hostent) + - sizeof(char *) * (naliases + 1) + - sizeof(char *) * (naddrs + 1) + - hp->h_length * naddrs; - - if ((newhp = malloc(alloc_size)) == NULL) { - return (hp); - } - - memset(newhp, 0, alloc_size); - - pp = (char **)(newhp + 1); - - if (hp->h_name != NULL) { - newhp->h_name = decode_name_dynamic(hp->h_name); - if (newhp->h_name == NULL) - goto alloc_fail; - } - - newhp->h_addrtype = hp->h_addrtype; - newhp->h_length = hp->h_length; - - if (hp->h_aliases != NULL) { - newhp->h_aliases = pp; - for (i = 0; i < naliases; i++) { - newhp->h_aliases[i] = - decode_name_dynamic(hp->h_aliases[i]); - if (newhp->h_aliases[i] == NULL) - goto alloc_fail; - } - newhp->h_aliases[naliases] = NULL; - pp += naliases + 1; - } - - if (hp->h_addr_list != NULL) { - char *p; - - newhp->h_addr_list = pp; - pp += naddrs + 1; - p = (char *)pp; - - for (i = 0; i < naddrs; i++) { - newhp->h_addr_list[i] = p; - memcpy(p, hp->h_addr_list[i], hp->h_length); - p += hp->h_length; - } - newhp->h_addr_list[naddrs] = NULL; - } - - return (newhp); - - alloc_fail: - free_copied_hostent(hp); - *errp = NO_RECOVERY; - return (NULL); -} - -static void -free_copied_hostent(struct hostent *hp) { - /* - * Free all the memory allocated by copy_decode_hostent_dynamic(). - */ - if (hp->h_name != NULL) - free(hp->h_name); - if (hp->h_aliases != NULL) { - char **pp = hp->h_aliases; - while (*pp != NULL) - free(*pp++); - } - free(hp); -} - -#ifdef HAVE_GETNAMEINFO -static struct addrinfo * -copy_decode_addrinfo_dynamic(struct addrinfo *aip) { - struct addrinfo *newaip; - - if (aip == NULL) - return (NULL); - - newaip = malloc(sizeof(struct addrinfo) + aip->ai_addrlen); - if (newaip == NULL) - return (NULL); - - *newaip = *aip; - newaip->ai_addr = (struct sockaddr *)(newaip + 1); - memcpy(newaip->ai_addr, aip->ai_addr, aip->ai_addrlen); - - if (newaip->ai_canonname != NULL) - newaip->ai_canonname = decode_name_dynamic(aip->ai_canonname); - - newaip->ai_next = copy_decode_addrinfo_dynamic(aip->ai_next); - return (newaip); -} -#endif - -#ifdef HAVE_FREEADDRINFO -static void -free_copied_addrinfo(struct addrinfo *aip) { - while (aip != NULL) { - struct addrinfo *next = aip->ai_next; - - if (aip->ai_canonname != NULL) - free(aip->ai_canonname); - free(aip); - aip = next; - } -} -#endif - -#ifdef HAVE_GETHOSTBYNAME -struct hostent * -ENTRY(gethostbyname)(const char *name) { - static hostbuf_t buf; - static struct hostent he; - mdn_result_t r; - struct hostent *hp; - - if (mdn_isprocessing) - return (REAL(gethostbyname)(name)); - - TRACE(("gethostbyname(name=%s)\n", mdn_debug_xstring(name, 60))); - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, buf.data, sizeof(buf)); - if (r == mdn_success) - name = buf.data; - - hp = copy_decode_hostent_static(REAL(gethostbyname)(name), - &he, buf.data, sizeof(buf), - &h_errno); - mdn_isprocessing = 0; - return (hp); -} -#endif - -#ifdef HAVE_GETHOSTBYNAME2 -struct hostent * -ENTRY(gethostbyname2)(const char *name, int af) { - static hostbuf_t buf; - static struct hostent he; - mdn_result_t r; - struct hostent *hp; - - if (mdn_isprocessing) - return (REAL(gethostbyname2)(name, af)); - - TRACE(("gethostbyname2(name=%s)\n", mdn_debug_xstring(name, 60), af)); - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, buf.data, sizeof(buf)); - if (r == mdn_success) - name = buf.data; - - hp = copy_decode_hostent_static(REAL(gethostbyname2)(name, af), - &he, buf.data, sizeof(buf), - &h_errno); - mdn_isprocessing = 0; - return (hp); -} -#endif - -#ifdef HAVE_GETHOSTBYADDR -struct hostent * -ENTRY(gethostbyaddr)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type) { - static hostbuf_t buf; - static struct hostent he; - struct hostent *hp; - - if (mdn_isprocessing) - return (REAL(gethostbyaddr)(addr, len, type)); - - TRACE(("gethostbyaddr()\n")); - - mdn_isprocessing = 1; - hp = copy_decode_hostent_static(REAL(gethostbyaddr)(addr, len, type), - &he, buf.data, sizeof(buf), - &h_errno); - mdn_isprocessing = 0; - return (hp); -} -#endif - -#ifdef GETHOST_R_GLIBC_FLAVOR - -#ifdef HAVE_GETHOSTBYNAME_R -int -ENTRY(gethostbyname_r)(const char *name, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp) -{ - char namebuf[MDN_NAME_SIZE]; - char *data; - size_t datalen; - mdn_result_t r; - struct hostent *hp, he; - hostbuf_t buf; - int n; - - if (mdn_isprocessing) - return (REAL(gethostbyname_r)(name, result, buffer, - buflen, rp, errp)); - - TRACE(("gethostbyname_r(name=%s,buflen=%d)\n", - mdn_debug_xstring(name, 60), buflen)); - - if (buflen <= sizeof(buf)) { - data = buf.data; - datalen = sizeof(buf); - } else { - data = malloc(buflen); - datalen = buflen; - if (data == NULL) { - *errp = NO_RECOVERY; - return (ENOMEM); - } - } - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); - if (r == mdn_success) - name = namebuf; - - *errp = 0; - n = REAL(gethostbyname_r)(name, &he, data, datalen, rp, errp); - - if (n == 0 && *rp != NULL) - *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, - errp); - mdn_isprocessing = 0; - - if (data != buf.data) - free(data); - - if (*errp != 0) - n = EINVAL; /* XXX */ - - return (n); -} -#endif - -#ifdef HAVE_GETHOSTBYNAME2_R -int -ENTRY(gethostbyname2_r)(const char *name, int af, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp) -{ - char namebuf[MDN_NAME_SIZE]; - char *data; - size_t datalen; - mdn_result_t r; - struct hostent *hp, he; - hostbuf_t buf; - int n; - - if (mdn_isprocessing) - return (REAL(gethostbyname2_r)(name, af, result, buffer, - buflen, rp, errp)); - - TRACE(("gethostbyname2_r(name=%s,buflen=%d)\n", - mdn_debug_xstring(name, 60), buflen)); - - if (buflen <= sizeof(buf)) { - data = buf.data; - datalen = sizeof(buf); - } else { - data = malloc(buflen); - datalen = buflen; - if (data == NULL) { - *errp = NO_RECOVERY; - return (ENOMEM); - } - } - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); - if (r == mdn_success) - name = namebuf; - - n = REAL(gethostbyname2_r)(name, af, &he, data, datalen, rp, errp); - - if (n == 0 && *rp != NULL) - *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, - errp); - mdn_isprocessing = 0; - - if (data != buf.data) - free(data); - - if (*errp != 0) - n = EINVAL; /* XXX */ - - return (n); -} -#endif - -#ifdef HAVE_GETHOSTBYADDR_R -int -ENTRY(gethostbyaddr_r)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp) -{ - char *data; - size_t datalen; - struct hostent *hp, he; - hostbuf_t buf; - int n; - - if (mdn_isprocessing) { - return (REAL(gethostbyaddr_r)(addr, len, type, result, - buffer, buflen, rp, errp)); - } - - TRACE(("gethostbyaddr_r(buflen=%d)\n", buflen)); - - if (buflen <= sizeof(buf)) { - data = buf.data; - datalen = sizeof(buf); - } else { - data = malloc(buflen); - datalen = buflen; - if (data == NULL) { - *errp = NO_RECOVERY; - return (ENOMEM); - } - } - - mdn_isprocessing = 1; - n = REAL(gethostbyaddr_r)(addr, len, type, &he, - data, datalen, rp, errp); - - if (n == 0 && *rp != NULL) - *rp = copy_decode_hostent_static(*rp, result, buffer, buflen, - errp); - mdn_isprocessing = 0; - - if (data != buf.data) - free(data); - - if (*errp != 0) - n = EINVAL; /* XXX */ - - return (0); -} -#endif - -#else /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETHOSTBYNAME_R -struct hostent * -ENTRY(gethostbyname_r)(const char *name, struct hostent *result, - char *buffer, int buflen, int *errp) -{ - char namebuf[MDN_NAME_SIZE]; - char *data; - size_t datalen; - mdn_result_t r; - struct hostent *hp, he; - hostbuf_t buf; - - if (mdn_isprocessing) - return (REAL(gethostbyname_r)(name, result, buffer, - buflen, errp)); - - TRACE(("gethostbyname_r(name=%s,buflen=%d)\n", - mdn_debug_xstring(name, 60), buflen)); - - if (buflen <= sizeof(buf)) { - data = buf.data; - datalen = sizeof(buf); - } else { - data = malloc(buflen); - datalen = buflen; - if (data == NULL) { - *errp = NO_RECOVERY; - return (NULL); - } - } - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); - if (r == mdn_success) - name = namebuf; - - hp = REAL(gethostbyname_r)(name, &he, data, datalen, errp); - - if (hp != NULL) - hp = copy_decode_hostent_static(hp, result, buffer, buflen, - errp); - mdn_isprocessing = 0; - - if (data != buf.data) - free(data); - - return (hp); -} -#endif - -#ifdef HAVE_GETHOSTBYADDR_R -struct hostent * -ENTRY(gethostbyaddr_r)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, - char *buffer, int buflen, int *errp) -{ - char *data; - size_t datalen; - struct hostent *hp, he; - hostbuf_t buf; - - if (mdn_isprocessing) { - return (REAL(gethostbyaddr_r)(addr, len, type, result, - buffer, buflen, errp)); - } - - TRACE(("gethostbyaddr_r(buflen=%d)\n", buflen)); - - if (buflen <= sizeof(buf)) { - data = buf.data; - datalen = sizeof(buf); - } else { - data = malloc(buflen); - datalen = buflen; - if (data == NULL) { - *errp = NO_RECOVERY; - return (NULL); - } - } - - mdn_isprocessing = 1; - hp = REAL(gethostbyaddr_r)(addr, len, type, &he, data, datalen, errp); - - if (hp != NULL) - hp = copy_decode_hostent_static(hp, result, buffer, buflen, - errp); - mdn_isprocessing = 0; - - if (data != buf.data) - free(data); - - return (hp); -} -#endif - -#endif /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETIPNODEBYNAME -struct hostent * -ENTRY(getipnodebyname)(const char *name, int af, int flags, int *errp) { - char namebuf[MDN_NAME_SIZE]; - mdn_result_t r; - struct hostent *hp; - - if (mdn_isprocessing) - return (REAL(getipnodebyname)(name, af, flags, errp)); - - TRACE(("getipnodebyname(name=%s)\n", mdn_debug_xstring(name, 60), af)); - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, name, namebuf, sizeof(namebuf)); - if (r == mdn_success) - name = namebuf; - - hp = REAL(getipnodebyname)(name, af, flags, errp); - if (hp != NULL) { - struct hostent *newhp = copy_decode_hostent_dynamic(hp, errp); - if (newhp != hp) { - REAL(freehostent)(hp); - obj_lock(newhp); - hp = newhp; - } - } - mdn_isprocessing = 0; - return (hp); -} -#endif - -#ifdef HAVE_GETIPNODEBYADDR -struct hostent * -ENTRY(getipnodebyaddr)(const void *src, size_t len, int af, int *errp) { - struct hostent *hp; - - if (mdn_isprocessing) - return (REAL(getipnodebyaddr)(src, len, af, errp)); - - TRACE(("getipnodebyaddr()\n")); - - mdn_isprocessing = 1; - hp = REAL(getipnodebyaddr)(src, len, af, errp); - if (hp != NULL) { - struct hostent *newhp = copy_decode_hostent_dynamic(hp, errp); - if (newhp != hp) { - REAL(freehostent)(hp); - obj_lock(newhp); - hp = newhp; - } - } - mdn_isprocessing = 0; - return (hp); -} -#endif - -#ifdef HAVE_FREEHOSTENT -void -ENTRY(freehostent)(struct hostent *hp) { - TRACE(("freehostent(hp=%p)\n", (void *)hp)); - - if (obj_islocked(hp)) { - /* - * We allocated the data. - */ - obj_unlock(hp); - free_copied_hostent(hp); - } else { - /* - * It was allocated the original getipnodeby*(). - */ - REAL(freehostent)(hp); - } -} -#endif - -#ifdef HAVE_GETADDRINFO -int -ENTRY(getaddrinfo)(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) -{ - char namebuf[MDN_NAME_SIZE]; - mdn_result_t r; - struct addrinfo *aip; - int err; - - if (nodename == NULL || mdn_isprocessing) - return (REAL(getaddrinfo)(nodename, servname, hints, res)); - - TRACE(("getaddrinfo(nodename=%s)\n", mdn_debug_xstring(nodename, 60))); - - mdn_isprocessing = 1; - r = mdn_encodename(MDN_ENCODE_APP, nodename, - namebuf, sizeof(namebuf)); - if (r == mdn_success) - nodename = namebuf; - - err = REAL(getaddrinfo)(nodename, servname, hints, &aip); - if (err == 0 && aip != NULL) { - *res = copy_decode_addrinfo_dynamic(aip); - if (*res == NULL) - err = EAI_FAIL; - else - obj_lock(*res); - if (aip != NULL) - REAL(freeaddrinfo)(aip); - } - mdn_isprocessing = 0; - return (err); -} -#endif - -#ifdef HAVE_FREEADDRINFO -void -ENTRY(freeaddrinfo)(struct addrinfo *aip) { - TRACE(("freeaddrinfo(aip=%p)\n", (void *)aip)); - - if (obj_islocked(aip)) { - /* - * We allocated the data. - */ - obj_unlock(aip); - free_copied_addrinfo(aip); - } else { - /* - * It was allocated the original getaddrinfo(). - */ - REAL(freeaddrinfo)(aip); - } -} -#endif - -#ifdef HAVE_GETNAMEINFO -int -ENTRY(getnameinfo)(const struct sockaddr *sa, GNI_SALEN_T salen, - char *host, GNI_HOSTLEN_T hostlen, char *serv, - GNI_SERVLEN_T servlen, GNI_FLAGS_T flags) -{ - char name[MDN_NAME_SIZE]; - size_t namelen = sizeof(name); - int code; - mdn_result_t r; - - if (host == NULL || hostlen == 0 || mdn_isprocessing) { - return (REAL(getnameinfo)(sa, salen, host, hostlen, - serv, servlen, flags)); - } - - TRACE(("getnameinfo(hostlen=%u)\n", hostlen)); - - mdn_isprocessing = 1; - code = REAL(getnameinfo)(sa, salen, name, namelen, - serv, servlen, flags); - if (code == 0 && name[0] != '\0') { - r = mdn_decodename(MDN_DECODE_APP, name, host, hostlen); - switch (r) { - case mdn_success: - code = 0; - break; - case mdn_buffer_overflow: - case mdn_nomemory: - code = EAI_MEMORY; - break; - default: - code = EAI_FAIL; - break; - } - } - mdn_isprocessing = 0; - return (code); -} -#endif diff --git a/contrib/idn/mdnkit/tools/runmdn/runmdn.1 b/contrib/idn/mdnkit/tools/runmdn/runmdn.1 deleted file mode 100644 index 8fc0bb3f34..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/runmdn.1 +++ /dev/null @@ -1,179 +0,0 @@ -.\" $Id: runmdn.1,v 1.1 2002/01/02 02:47:04 marka Exp $ -.\" -.\" Copyright (c) 2000,2001 Japan Network Information Center. -.\" All rights reserved. -.\" -.\" By using this file, you agree to the terms and conditions set forth bellow. -.\" -.\" LICENSE TERMS AND CONDITIONS -.\" -.\" The following License Terms and Conditions apply, unless a different -.\" license is obtained from Japan Network Information Center ("JPNIC"), -.\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -.\" Chiyoda-ku, Tokyo 101-0047, Japan. -.\" -.\" 1. Use, Modification and Redistribution (including distribution of any -.\" modified or derived work) in source and/or binary forms is permitted -.\" under this License Terms and Conditions. -.\" -.\" 2. Redistribution of source code must retain the copyright notices as they -.\" appear in each source code file, this License Terms and Conditions. -.\" -.\" 3. Redistribution in binary form must reproduce the Copyright Notice, -.\" this License Terms and Conditions, in the documentation and/or other -.\" materials provided with the distribution. For the purposes of binary -.\" distribution the "Copyright Notice" refers to the following language: -.\" "Copyright (c) Japan Network Information Center. All rights reserved." -.\" -.\" 4. Neither the name of JPNIC may be used to endorse or promote products -.\" derived from this Software without specific prior written approval of -.\" JPNIC. -.\" -.\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -.\" -.\" 6. Indemnification by Licensee -.\" Any person or entities using and/or redistributing this Software under -.\" this License Terms and Conditions shall defend indemnify and hold -.\" harmless JPNIC from and against any and all judgements damages, -.\" expenses, settlement liabilities, cost and other liabilities of any -.\" kind as a result of use and redistribution of this Software or any -.\" claim, suite, action, litigation or proceeding by any third party -.\" arising out of or relates to this License Terms and Conditions. -.\" -.\" 7. Governing Law, Jurisdiction and Venue -.\" This License Terms and Conditions shall be governed by and and -.\" construed in accordance with the law of Japan. Any person or entities -.\" using and/or redistributing this Software under this License Terms and -.\" Conditions hereby agrees and consent to the personal and exclusive -.\" jurisdiction and venue of Tokyo District Court of Japan. -.\" -.TH RUNMDN 1 "April 6, 2001" -.\" -.SH NAME -runmdn \- A script to allow applications to use multilingual domain names. -.\" -.SH SYNOPSIS -\fBrunmdn\fP [\fB-e\fP \fIlocal-codeset\fP] \fIprogram-name\fP [\fIargs..\fP] -.\" -.SH DESCRIPTION -.B runmdn -enables applications to use multilingual domain names without recompilation. -Just add ``runmdn'' before the application-name, and the application -can handle non-ASCII domain names. For example, you can do: -.PP -.RS 4 -.nf -\f(CW% runmdn telnet \fInon-ASCII-hostname\fR -.fi -.RE -.PP -Before using runmdn, you should set up properties related to -multilingual DNS by configuring mDNkit's configuration file -\fBmdn.conf\fP. -See mdn.conf(5) which describes the configuration. -.\" -.SH OPTION -The following option is available: -.TP 4 -\fB\-e\fP \fIlocal-codeset\fP -Specify the application's local codeset. -If the option is not specified, -.B runmdn -guesses the codeset from the current locale. -See the ``NOTE'' section for more details about local codeset. -.\" -.SH IMPLEMENTATION -.B runmdn -is a small shell script that sets up an environment variable called -``LD_PRELOAD'', so that an application dynamically links a shared -library ``libmdnresolv'' before any other shared libraries. -.PP -The library ``libmdnresolv'' provides a special version of -resolver functions which implement features for handling multilingual -domain names. -.B runmdn -replaces the following functions with the special version: -.PP -.RS 4 -.nf -.ft CW -gethostbyname -gethostbyname2 -gethostbyaddr -gethostbyname_r -gethostbyname2_r -gethostbyaddr_r -getipnodebyname -getipnodebyaddr -freehostent -getaddrinfo -freeaddrinfo -getnameinfo -.ft R -.fi -.RE -.PP -By overriding them in the standard libraries with the special version -provided by ``libmdnresolv'', -.B runmdn -enables applications to use multilingual domain names. -.RS 4 -.IP \(bu 2 -These API functions accept non-ASCII domain names -encoded in the local codeset that the application is using. -Also the result from these APIs may contain non-ASCII domain names. -.IP \(bu 2 -The normalization and codeset conversion between application's local -codeset and the codeset used in DNS protocol data are handled -automatically, so users/applications need not worry about them. -.RE -.PP -Properties of multilingual DNS (such as the normalization or the codeset -used on DNS protocol data) can be configured with the mDNkit's -configuration file ( -.B mdn.conf -). See mdn.conf(5) for details. -.\" -.SH NOTE -Unless -\fB\-e\fP -option is specified, -.B runmdn -tries to guess the application's local codeset from the application's current -locale. -However, sometimes it cannot guess the codeset correctly, for example -if the application does not set the locale appropriately -by calling `setlocale()'. -In that case, you can explicitly specify the local codeset by setting an -environment variable ``MDN_LOCAL_CODESET''. -See the section ``LOCAL CODESET'' in mdn.conf(5) for details. -.PP -The idea of using ``LD_PRELOAD'' to replace some functions in the standard -library was taken from ``runsocks'' script distributed as part of SOCKS5 -reference implementation. -.SH BUGS -There are many cases where -.B runmdn -does not work. -.PP -Your system must support ``LD_PRELOAD'' mechanism in the first place. -.PP -Due to security reasons, ``LD_PRELOAD'' mechanism is disabled for -setuid programs in any sane systems. So -.B runmdn -does not work for setuid programs such as ping or rsh. -.PP -If your application uses a function other than the ones runmdn supports for -name resolution, you lose. -.SH "SEE ALSO" -mdn.conf(5), runsocks(1) diff --git a/contrib/idn/mdnkit/tools/runmdn/runmdn.in b/contrib/idn/mdnkit/tools/runmdn/runmdn.in deleted file mode 100644 index 81e0f5203d..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/runmdn.in +++ /dev/null @@ -1,125 +0,0 @@ -#! /bin/sh -# $Id: runmdn.in,v 1.1 2002/01/02 02:47:04 marka Exp $ -# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Fuundo Bldg., 1-2 Kanda Ogawamachi, Chiyoda-ku, -# Tokyo, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -# Parse command line options. -usage="Usage: `basename $0` [-e local-encoding] command [argument..]" -while test $# -gt 0; do - case "$1" in - -e) - if test $# -le 1; then - echo $usage 1>&2 - exit 1 - fi - MDN_LOCAL_CODESET="$2" - export MDN_LOCAL_CODESET - shift - ;; - -) - break - ;; - -*) - echo $usage 1>&2 - exit 1 - ;; - *) - break - ;; - esac - shift -done -if test $# -eq 0; then - echo $usage 1>&2 - exit 1 -fi - -# Load library info. -preload= -iconv_file=@ICONVSOFILE@ -if test "$iconv_file" != none; then - preload="$iconv_file@PRELOAD_SEP@" -fi - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=`echo @libdir@` -if test ! -f $libdir/libmdnresolv.la; then - cat <&2 -Have you installed mdnkit? I cannot find libmdnresolv.la. -EOF - exit 1 -fi -eval `grep '^dlname' $libdir/libmdnresolv.la` -if test "$dlname" = ""; then - cat <&2 -Sorry, runmdn won't work because libmdnresolv is not dynamically loadable. -EOF - exit 1 -fi -preload=$preload$libdir/$dlname - -# Set @PRELOAD_VAR@. -if [ X$@PRELOAD_VAR@ = X ]; then - @PRELOAD_VAR@="$preload@PRELOAD_LAST@" -else - @PRELOAD_VAR@="$preload@PRELOAD_SEP@$@PRELOAD_VAR@@PRELOAD_LAST@" -fi -export @PRELOAD_VAR@ - -# Shoot. -exec "$@" diff --git a/contrib/idn/mdnkit/tools/runmdn/stub.c b/contrib/idn/mdnkit/tools/runmdn/stub.c deleted file mode 100644 index 6e11b71c08..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/stub.c +++ /dev/null @@ -1,389 +0,0 @@ -#ifndef lint -static char *rcsid = "$Id: stub.c,v 1.2 2002/02/08 05:41:42 marka Exp $"; -#endif - -/* - * Copyright (c) 2001 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_DLFCN_H -#include -#endif - -#include -#include - -#include "stub.h" - -typedef struct { - const char *name; - void *handle; -} shared_obj_t; - -static shared_obj_t shobj[] = { -#ifdef SOPATH_LIBC - { SOPATH_LIBC }, -#endif -#ifdef SOPATH_LIBNSL - { SOPATH_LIBNSL }, -#endif - { NULL }, -}; - -static void *shared_obj_open(const char *path); -static void *shared_obj_findsym(void *handle, const char *name); -static void *shared_obj_findsymx(void *handle, const char *name); -static void *get_func_addr(const char *name); - -static void * -shared_obj_open(const char *path) { -#ifdef HAVE_DLOPEN - return (dlopen(path, RTLD_LAZY)); -#endif - FATAL(("stub: no way to load shared object file\n")); - return (NULL); -} - -static void * -shared_obj_findsym(void *handle, const char *name) { - char namebuf[100]; - void *addr; - static int need_leading_underscore = -1; - - /* Prepend underscore. */ - namebuf[0] = '_'; - name = strcpy(namebuf + 1, name); - - if (need_leading_underscore < 0) { - /* First try without one. */ - if ((addr = shared_obj_findsymx(handle, name + 1)) != NULL) { - need_leading_underscore = 0; - return (addr); - } - /* Then try with one. */ - if ((addr = shared_obj_findsymx(handle, name)) != NULL) { - need_leading_underscore = 1; - return (addr); - } - } else if (need_leading_underscore) { - return (shared_obj_findsymx(handle, name)); - } else { - return (shared_obj_findsymx(handle, name + 1)); - } - return (NULL); -} - -static void * -shared_obj_findsymx(void *handle, const char *name) { -#ifdef HAVE_DLSYM - return (dlsym(handle, name)); -#endif - /* logging */ - FATAL(("stub: no way to get symbol address\n")); - return (NULL); -} - -static void * -get_func_addr(const char *name) { - int i; - - for (i = 0; shobj[i].name != NULL; i++) { - if (shobj[i].handle == NULL) { - TRACE(("stub: loading %s\n", shobj[i].name)); - shobj[i].handle = shared_obj_open(shobj[i].name); - } - if (shobj[i].handle != NULL) { - void *addr = shared_obj_findsym(shobj[i].handle, name); - if (addr != NULL) { - TRACE(("stub: %s found in %s\n", - name, shobj[i].name)); - return (addr); - } - } - } - TRACE(("stub: %s not found\n", name)); - return (NULL); -} - -#ifdef HAVE_GETHOSTBYNAME -struct hostent * -mdn_stub_gethostbyname(const char *name) { - static struct hostent *(*fp)(const char *name); - - if (fp == NULL) - fp = get_func_addr("gethostbyname"); - if (fp != NULL) - return ((*fp)(name)); - return (NULL); -} -#endif - -#ifdef HAVE_GETHOSTBYNAME2 -struct hostent * -mdn_stub_gethostbyname2(const char *name, int af) { - static struct hostent *(*fp)(const char *name, int af); - - if (fp == NULL) - fp = get_func_addr("gethostbyname2"); - if (fp != NULL) - return ((*fp)(name, af)); - return (NULL); -} -#endif - -#ifdef HAVE_GETHOSTBYADDR -struct hostent * -mdn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type) { - static struct hostent *(*fp)(GHBA_ADDR_T name, - GHBA_ADDRLEN_T len, int type); - - if (fp == NULL) - fp = get_func_addr("gethostbyaddr"); - if (fp != NULL) - return ((*fp)(addr, len, type)); - return (NULL); -} -#endif - -#ifdef GETHOST_R_GLIBC_FLAVOR - -#ifdef HAVE_GETHOSTBYNAME_R -int -mdn_stub_gethostbyname_r(const char *name, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp) -{ - static int (*fp)(const char *name, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp); - - if (fp == NULL) - fp = get_func_addr("gethostbyname_r"); - if (fp != NULL) - return ((*fp)(name, result, buffer, buflen, rp, errp)); - return (ENOENT); /* ??? */ -} -#endif - -#ifdef HAVE_GETHOSTBYNAME2_R -int -mdn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp) -{ - static int (*fp)(const char *name, int af, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp); - - if (fp == NULL) - fp = get_func_addr("gethostbyname2_r"); - if (fp != NULL) - return ((*fp)(name, af, result, buffer, buflen, rp, errp)); - return (ENOENT); /* ??? */ -} -#endif - -#ifdef HAVE_GETHOSTBYADDR_R -int -mdn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, char *buffer, - size_t buflen, struct hostent **rp, int *errp) -{ - static int (*fp)(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, char *buffer, - size_t buflen, struct hostent **rp, int *errp); - - if (fp == NULL) - fp = get_func_addr("gethostbyaddr_r"); - if (fp != NULL) - return ((*fp)(addr, len, type, result, - buffer, buflen, rp, errp)); - return (ENOENT); /* ??? */ -} -#endif - -#else /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETHOSTBYNAME_R -struct hostent * -mdn_stub_gethostbyname_r(const char *name, struct hostent *result, - char *buffer, int buflen, int *errp) -{ - static struct hostent *(*fp)(const char *name, struct hostent *result, - char *buffer, int buflen, int *errp); - - if (fp == NULL) - fp = get_func_addr("gethostbyname_r"); - if (fp != NULL) - return ((*fp)(name, result, buffer, buflen, errp)); - return (NULL); -} -#endif - -#ifdef HAVE_GETHOSTBYADDR_R -struct hostent * -mdn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, int len, int type, - struct hostent *result, char *buffer, - int buflen, int *errp) -{ - static struct hostent *(*fp)(GHBA_ADDR_T addr, int len, int type, - struct hostent *result, char *buffer, - int buflen, int *errp); - - if (fp == NULL) - fp = get_func_addr("gethostbyaddr_r"); - if (fp != NULL) - return ((*fp)(addr, len, type, result, buffer, buflen, errp)); - return (NULL); -} -#endif - -#endif /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETIPNODEBYNAME -struct hostent * -mdn_stub_getipnodebyname(const char *name, int af, int flags, int *errp) { - static struct hostent *(*fp)(const char *name, int af, int flags, - int *errp); - - if (fp == NULL) - fp = get_func_addr("getipnodebyname"); - if (fp != NULL) - return ((*fp)(name, af, flags, errp)); - return (NULL); -} -#endif - -#ifdef HAVE_GETIPNODEBYADDR -struct hostent * -mdn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp) { - static struct hostent *(*fp)(const void *src, size_t len, int af, - int *errp); - - if (fp == NULL) - fp = get_func_addr("getipnodebyaddr"); - if (fp != NULL) - return ((*fp)(src, len, af, errp)); - return (NULL); -} -#endif - -#ifdef HAVE_FREEHOSTENT -void -mdn_stub_freehostent(struct hostent *hp) { - static void (*fp)(struct hostent *hp); - - if (fp == NULL) - fp = get_func_addr("freehostent"); - if (fp != NULL) - (*fp)(hp); -} -#endif - -#ifdef HAVE_GETADDRINFO -int -mdn_stub_getaddrinfo(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) -{ - static int (*fp)(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res); - - if (fp == NULL) - fp = get_func_addr("getaddrinfo"); - if (fp != NULL) - return ((*fp)(nodename, servname, hints, res)); - return (EAI_FAIL); -} -#endif - -#ifdef HAVE_FREEADDRINFO -void -mdn_stub_freeaddrinfo(struct addrinfo *aip) { - static void (*fp)(struct addrinfo *aip); - - if (fp == NULL) - fp = get_func_addr("freeaddrinfo"); - if (fp != NULL) - (*fp)(aip); -} -#endif - -#ifdef HAVE_GETNAMEINFO -int -mdn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen, - char *host, GNI_HOSTLEN_T hostlen, - char *serv, GNI_SERVLEN_T servlen, GNI_FLAGS_T flags) { - static int (*fp)(const struct sockaddr *sa, GNI_SALEN_T salen, - char *host, GNI_HOSTLEN_T hostlen, - char *serv, GNI_SERVLEN_T servlen, - GNI_FLAGS_T flags); - - if (fp == NULL) - fp = get_func_addr("getnameinfo"); - if (fp != NULL) - return ((*fp)(sa, salen, host, hostlen, serv, servlen, flags)); - return (EAI_FAIL); -} -#endif diff --git a/contrib/idn/mdnkit/tools/runmdn/stub.h b/contrib/idn/mdnkit/tools/runmdn/stub.h deleted file mode 100644 index dcfff6b48e..0000000000 --- a/contrib/idn/mdnkit/tools/runmdn/stub.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id: stub.h,v 1.2 2002/02/08 05:41:43 marka Exp $ */ - -#ifndef STUB_H -#define STUB_H - -#ifdef HAVE_GETHOSTBYNAME -extern struct hostent * -mdn_stub_gethostbyname(const char *name); -#endif - -#ifdef GETHOST_R_GLIBC_FLAVOR -#ifdef HAVE_GETHOSTBYNAME_R -extern int -mdn_stub_gethostbyname_r(const char *name, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp); -#endif -#else /* GETHOST_R_GLIBC_FLAVOR */ -#ifdef HAVE_GETHOSTBYNAME_R -extern struct hostent * -mdn_stub_gethostbyname_r(const char *name, struct hostent *result, - char *buffer, int buflen, int *errp); -#endif -#endif /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETHOSTBYNAME2 -extern struct hostent * -mdn_stub_gethostbyname2(const char *name, int af); -#endif - -#ifdef GETHOST_R_GLIBC_FLAVOR -#ifdef HAVE_GETHOSTBYNAME2_R -extern int -mdn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result, - char *buffer, size_t buflen, - struct hostent **rp, int *errp); -#endif -#endif /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETHOSTBYADDR -extern struct hostent * -mdn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type); -#endif - -#ifdef GETHOST_R_GLIBC_FLAVOR -#ifdef HAVE_GETHOSTBYADDR_R -extern int -mdn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, char *buffer, - size_t buflen, struct hostent **rp, int *errp); -#endif -#else /* GETHOST_R_GLIBC_FLAVOR */ -#ifdef HAVE_GETHOSTBYADDR_R -extern struct hostent * -mdn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, - struct hostent *result, char *buffer, - int buflen, int *errp); -#endif -#endif /* GETHOST_R_GLIBC_FLAVOR */ - -#ifdef HAVE_GETIPNODEBYNAME -extern struct hostent * -mdn_stub_getipnodebyname(const char *name, int af, int flags, int *errp); -#endif - -#ifdef HAVE_GETIPNODEBYADDR -extern struct hostent * -mdn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp); -#endif - -#ifdef HAVE_FREEHOSTENT -extern void -mdn_stub_freehostent(struct hostent *hp); -#endif - -#ifdef HAVE_GETADDRINFO -extern int -mdn_stub_getaddrinfo(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res); -#endif - -#ifdef HAVE_FREEADDRINFO -extern void -mdn_stub_freeaddrinfo(struct addrinfo *aip); -#endif - -#ifdef HAVE_GETNAMEINFO -extern int -mdn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen, - char *host, GNI_HOSTLEN_T hostlen, char *serv, - GNI_SERVLEN_T servlen, GNI_FLAGS_T flags); -#endif - -#endif /* STUB_H */ diff --git a/contrib/idn/mdnkit/util/SparseMap.pm b/contrib/idn/mdnkit/util/SparseMap.pm deleted file mode 100644 index 0261874eb0..0000000000 --- a/contrib/idn/mdnkit/util/SparseMap.pm +++ /dev/null @@ -1,591 +0,0 @@ -# $Id: SparseMap.pm,v 1.2 2002/02/08 05:41:45 marka Exp $ -# -# Copyright (c) 2001 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is under this -# License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -# - -package SparseMap; - -use strict; -use Carp; - -my $debug = 0; - -sub new { - # common options are: - # BITS => [8, 7, 6], # 3-level map, 2nd level bits=7, 3rd = 6. - # MAX => 0x110000 # actually, max + 1. - my $class = shift; - my $self = {@_}; - - croak "BITS unspecified" unless exists $self->{BITS}; - croak "BITS is not an array reference" - unless ref($self->{BITS}) eq 'ARRAY'; - croak "MAX unspecified" unless exists $self->{MAX}; - - $self->{MAXLV} = @{$self->{BITS}} - 1; - $self->{FIXED} = 0; - - my $lv0size = (indices($self, $self->{MAX} - 1))[0] + 1; - - my @map = (undef) x $lv0size; - $self->{MAP} = \@map; - - bless $self, $class; -} - -sub add1 { - my ($self, $n, $val) = @_; - - croak "Already fixed" if $self->{FIXED}; - carp("data ($n) out of range"), return if $n >= $self->{MAX}; - - my @index = $self->indices($n); - my $r = $self->{MAP}; - my $maxlv = $self->{MAXLV}; - my $idx; - my $lv; - - for ($lv = 0; $lv < $maxlv - 1; $lv++) { - $idx = $index[$lv]; - $r->[$idx] = $self->create_imap($lv + 1, undef) - unless defined $r->[$idx]; - $r = $r->[$idx]; - } - $idx = $index[$lv]; - $r->[$idx] = $self->create_dmap() unless defined $r->[$idx]; - $self->add_to_dmap($r->[$idx], $index[$maxlv], $val); -} - -sub fix { - my $self = shift; - my $map = $self->{MAP}; - my $maxlv = $self->{MAXLV}; - my @tmp; - my @zero; - - carp "Already fixed" if $self->{FIXED}; - $self->collapse_tree(); - $self->fill_default(); - $self->{FIXED} = 1; -} - -sub indices { - my $self = shift; - my $v = shift; - my @bits = @{$self->{BITS}}; - my @idx; - - print "indices($v,", join(',', @bits), ") = " if $debug; - for (my $i = @bits - 1; $i >= 0; $i--) { - my $bit = $bits[$i]; - unshift @idx, $v & ((1 << $bit) - 1); - $v = $v >> $bit; - } - print "(", join(',', @idx), ")\n" if $debug; - @idx; -} - -sub get { - my $self = shift; - my $v = shift; - my $map = $self->{MAP}; - my @index = $self->indices($v); - - croak "Not yet fixed" unless $self->{FIXED}; - - my $lastidx = pop @index; - foreach my $idx (@index) { - return $map->{DEFAULT} unless defined $map->[$idx]; - $map = $map->[$idx]; - } - $map->[$lastidx]; -} - -sub indirectmap { - my $self = shift; - - croak "Not yet fixed" unless $self->{FIXED}; - - my @maps = $self->collect_maps(); - my $maxlv = $self->{MAXLV}; - my @bits = @{$self->{BITS}}; - - my @indirect = (); - for (my $lv = 0; $lv < $maxlv; $lv++) { - my $offset; - my $chunksz; - my $mapsz = @{$maps[$lv]->[0]}; - if ($lv < $maxlv - 1) { - # indirect map - $offset = @indirect + @{$maps[$lv]} * @{$maps[$lv]->[0]}; - $chunksz = (1 << $bits[$lv + 1]); - } else { - # direct map - $offset = 0; - $chunksz = 1; - } - my $nextmaps = $maps[$lv + 1]; - foreach my $mapref (@{$maps[$lv]}) { - croak "mapsize inconsistent ", scalar(@$mapref), - " should be ", $mapsz, " (lv $lv)\n" if @$mapref != $mapsz; - foreach my $m (@$mapref) { - my $idx; - for ($idx = 0; $idx < @$nextmaps; $idx++) { - last if $nextmaps->[$idx] == $m; - } - croak "internal error: map corrupted" if $idx >= @$nextmaps; - push @indirect, $offset + $chunksz * $idx; - } - } - } - @indirect; -} - -sub cprog_imap { - my $self = shift; - my %opt = @_; - my $name = $opt{NAME} || 'map'; - my @indirect = $self->indirectmap(); - my $prog; - my $i; - my ($idtype, $idcol, $idwid); - - my $max = 0; - $max < $_ and $max = $_ foreach @indirect; - - if ($max < 256) { - $idtype = 'char'; - $idcol = 8; - $idwid = 3; - } elsif ($max < 65536) { - $idtype = 'short'; - $idcol = 8; - $idwid = 5; - } else { - $idtype = 'long'; - $idcol = 4; - $idwid = 10; - } - $prog = "static const unsigned $idtype ${name}_imap[] = {\n"; - $i = 0; - foreach my $v (@indirect) { - if ($i % $idcol == 0) { - $prog .= "\n" if $i != 0; - $prog .= "\t"; - } - $prog .= sprintf "%${idwid}d, ", $v; - $i++; - } - $prog .= "\n};\n"; - $prog; -} - -sub cprog { - my $self = shift; - $self->cprog_imap(@_) . "\n" . $self->cprog_dmap(@_); -} - -sub stat { - my $self = shift; - my @maps = $self->collect_maps(); - my $elsize = $self->{ELSIZE}; - my $i; - my $total = 0; - my @lines; - - for ($i = 0; $i < $self->{MAXLV}; $i++) { - my $nmaps = @{$maps[$i]}; - my $mapsz = @{$maps[$i]->[0]}; - push @lines, "level $i: $nmaps maps (size $mapsz) "; - push @lines, "[", $nmaps * $mapsz * $elsize, "]" if $elsize; - push @lines, "\n"; - } - my $ndmaps = @{$maps[$i]}; - push @lines, "level $i: $ndmaps dmaps"; - my $r = $maps[$i]->[0]; - if (ref($r) eq 'ARRAY') { - push @lines, " (size ", scalar(@$r), ")"; - } - push @lines, "\n"; - join '', @lines; -} - -sub collapse_tree { - my $self = shift; - my @tmp; - - $self->_collapse_tree_rec($self->{MAP}, 0, \@tmp); -} - -sub _collapse_tree_rec { - my ($self, $r, $lv, $refs) = @_; - my $ref = $refs->[$lv]; - my $maxlv = $self->{MAXLV}; - my $found; - - return $r unless defined $r; - - $ref = $refs->[$lv] = [] unless defined $ref; - - if ($lv == $maxlv) { - $found = $self->find_dmap($ref, $r); - } else { - for (my $i = 0; $i < @$r; $i++) { - $r->[$i] = $self->_collapse_tree_rec($r->[$i], $lv + 1, $refs); - } - $found = $self->find_imap($ref, $r); - } - unless ($found) { - $found = $r; - push @$ref, $found; - } - return $found; -} - -sub fill_default { - my $self = shift; - my $maxlv = $self->{MAXLV}; - my $bits = $self->{BITS}; - my @zeros; - - $zeros[$maxlv] = $self->create_dmap(); - for (my $lv = $maxlv - 1; $lv >= 0; $lv--) { - my $r = $zeros[$lv + 1]; - $zeros[$lv] = $self->create_imap($lv, $r); - } - _fill_default_rec($self->{MAP}, 0, $maxlv, \@zeros); -} - -sub _fill_default_rec { - my ($r, $lv, $maxlv, $zeros) = @_; - - return if $lv == $maxlv; - for (my $i = 0; $i < @$r; $i++) { - if (defined($r->[$i])) { - _fill_default_rec($r->[$i], $lv + 1, $maxlv, $zeros); - } else { - $r->[$i] = $zeros->[$lv + 1]; - } - } -} - -sub create_imap { - my ($self, $lv, $v) = @_; - my @map; - @map = ($v) x (1 << $self->{BITS}->[$lv]); - \@map; -} - -sub find_imap { - my ($self, $maps, $map) = @_; - my $i; - - foreach my $el (@$maps) { - next unless @$el == @$map; - for ($i = 0; $i < @$el; $i++) { - last unless ($el->[$i] || 0) == ($map->[$i] || 0); - } - return $el if $i >= @$el; - } - undef; -} - -sub collect_maps { - my $self = shift; - my @maps; - _collect_maps_rec($self->{MAP}, 0, $self->{MAXLV}, \@maps); - @maps; -} - -sub _collect_maps_rec { - my ($r, $lv, $maxlv, $maps) = @_; - my $mapref = $maps->[$lv]; - - return unless defined $r; - foreach my $ref (@{$mapref}) { - return if $ref == $r; - } - push @{$maps->[$lv]}, $r; - if ($lv < $maxlv) { - _collect_maps_rec($_, $lv + 1, $maxlv, $maps) foreach @{$r}; - } -} - -sub add {confess "Subclass responsibility";} -sub create_dmap {confess "Subclass responsibility";} -sub add_to_dmap {confess "Subclass responsibility";} -sub find_dmap {confess "Subclass responsibility";} -sub cprog_dmap {confess "Subclass responsibility";} - -1; - -package SparseMap::Bit; - -use strict; -use vars qw(@ISA); -use Carp; -#use SparseMap; - -@ISA = qw(SparseMap); - -sub new { - my $class = shift; - my $self = $class->SUPER::new(@_); - $self->{DEFAULT} = 0; - bless $self, $class; -} - -sub add { - my $self = shift; - - $self->add1($_, undef) foreach @_; -} - -sub create_dmap { - my $self = shift; - my $bmbits = $self->{BITS}->[-1]; - - my $s = "\0" x (1 << ($bmbits - 3)); - \$s; -} - -sub add_to_dmap { - my ($self, $map, $idx, $val) = @_; - vec($$map, $idx, 1) = 1; -} - -sub find_dmap { - my ($self, $ref, $r) = @_; - foreach my $map (@$ref) { - return $map if $$map eq $$r; - } - return undef; -} - -sub cprog_dmap { - my $self = shift; - my %opt = @_; - my $name = $opt{NAME} || 'map'; - my @maps = $self->collect_maps(); - my @bitmap = @{$maps[-1]}; - my $prog; - my $bmsize = 1 << ($self->{BITS}->[-1] - 3); - - $prog = <<"END"; -static const struct { - unsigned char bm[$bmsize]; -} ${name}_bitmap[] = { -END - - foreach my $bm (@bitmap) { - my $i = 0; - $prog .= "\t{{\n"; - foreach my $v (unpack 'C*', $$bm) { - if ($i % 16 == 0) { - $prog .= "\n" if $i != 0; - $prog .= "\t"; - } - $prog .= sprintf "%3d,", $v; - $i++; - } - $prog .= "\n\t}},\n"; - } - $prog .= "};\n"; - $prog; -} - -1; - -package SparseMap::Int; - -use strict; -use vars qw(@ISA); -use Carp; -#use SparseMap; - -@ISA = qw(SparseMap); - -sub new { - my $class = shift; - my $self = $class->SUPER::new(@_); - $self->{DEFAULT} = 0 unless exists $self->{DEFAULT}; - bless $self, $class; -} - -sub add { - my $self = shift; - while (@_ > 0) { - my $n = shift; - my $val = shift; - $self->add1($n, $val); - } -} - -sub create_dmap { - my $self = shift; - my $tblbits = $self->{BITS}->[-1]; - my $default = $self->{DEFAULT}; - - my @tbl = ($default) x (1 << $tblbits); - \@tbl; -} - -sub add_to_dmap { - my ($self, $map, $idx, $val) = @_; - $map->[$idx] = $val; -} - -sub find_dmap { - my ($self, $ref, $r) = @_; - foreach my $map (@$ref) { - if (@$map == @$r) { - my $i; - for ($i = 0; $i < @$map; $i++) { - last if $map->[$i] != $r->[$i]; - } - return $map if $i == @$map; - } - } - return undef; -} - -sub cprog_dmap { - my $self = shift; - my %opt = @_; - my $name = $opt{NAME} || 'map'; - my @maps = $self->collect_maps(); - my @table = @{$maps[-1]}; - my $prog; - my $i; - my ($idtype, $idcol, $idwid); - my $tblsize = 1 << $self->{BITS}->[-1]; - - my ($min, $max); - foreach my $a (@table) { - foreach my $v (@$a) { - $min = $v if !defined($min) or $min > $v; - $max = $v if !defined($max) or $max < $v; - } - } - if (exists $opt{MAPTYPE}) { - $idtype = $opt{MAPTYPE}; - } else { - my $u = $min < 0 ? '' : 'unsigned '; - my $absmax = abs($max); - $absmax = abs($min) if abs($min) > $absmax; - - if ($absmax < 256) { - $idtype = "${u}char"; - } elsif ($absmax < 65536) { - $idtype = "${u}short"; - } else { - $idtype = "${u}long"; - } - } - - $idwid = decimalwidth($max); - $idwid = decimalwidth($min) if decimalwidth($min) > $idwid; - - $prog = <<"END"; -static const struct { - $idtype tbl[$tblsize]; -} ${name}_table[] = { -END - - foreach my $a (@table) { - my $i = 0; - my $col = 0; - $prog .= "\t{{\n\t"; - foreach my $v (@$a) { - my $s = sprintf "%${idwid}d, ", $v; - $col += length($s); - if ($col > 70) { - $prog .= "\n\t"; - $col = length($s); - } - $prog .= $s; - } - $prog .= "\n\t}},\n"; - } - $prog .= "};\n"; - $prog; -} - -sub decimalwidth { - my $n = shift; - my $neg = 0; - my $w; - - if ($n < 0) { - $neg = 1; - $n = -$n; - } - if ($n < 100) { - $w = 2; - } elsif ($n < 10000) { - $w = 4; - } elsif ($n < 1000000) { - $w = 6; - } elsif ($n < 100000000) { - $w = 8; - } else { - $w = 10; - } - $w + $neg; -} - -1; diff --git a/contrib/idn/mdnkit/util/UCD.pm b/contrib/idn/mdnkit/util/UCD.pm deleted file mode 100644 index 33eb8eeb34..0000000000 --- a/contrib/idn/mdnkit/util/UCD.pm +++ /dev/null @@ -1,210 +0,0 @@ -# $Id: UCD.pm,v 1.2 2002/02/08 05:41:46 marka Exp $ -# -# Copyright (c) 2000,2001 Japan Network Information Center. -# All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is under this -# License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -# - -package UCD; - -# -# UCD.pm -- parser for Unicode Character Database files. -# -# This file is an aggregation of the following modules, each of which -# provides a parser for a specific data file of UCD. -# UCD::UnicodeData -- for UnicodeData.txt -# UCD::CaseFolding -- for CaseFolding.txt -# UCD::SpecialCasing -- for SpecialCasing.txt -# UCD::CompositionExclusions -- for CompositionExclusions-1.txt -# -# Each module provides two subroutines: -# -# $line = getline(\*HANDLE); -# reads next non-comment line from HANDLE, and returns it. -# undef will be returned upon EOF. -# -# %fields = parse($line); -# parses a line and extract fields, and returns a list of -# field name and its value, suitable for assignment to a hash. -# - -package UCD::UnicodeData; - -use strict; -use Carp; - -sub getline { - my $fh = shift; - my $s = <$fh>; - $s =~ s/\r?\n$// if $s; - $s; -} - -sub parseline { - my $s = shift; - - my @f = split /;/, $s, -1; - return (CODE => hex($f[0]), - NAME => $f[1], - CATEGORY => $f[2], - CLASS => $f[3]+0, - BIDI => $f[4], - DECOMP => dcmap($f[5]), - DECIMAL => dvalue($f[6]), - DIGIT => dvalue($f[7]), - NUMERIC => dvalue($f[8]), - MIRRORED => $f[9] eq 'Y', - NAME10 => $f[10], - COMMENT => $f[11], - UPPER => ucode($f[12]), - LOWER => ucode($f[13]), - TITLE => ucode($f[14])); -} - -sub dcmap { - my $v = shift; - return undef if $v eq ''; - $v =~ /^(?:(<[^>]+>)\s*)?(\S.*)/ - or croak "invalid decomposition mapping \"$v\""; - my $tag = $1 || ''; - [$tag, map {hex($_)} split(' ', $2)]; -} - -sub ucode { - my $v = shift; - return undef if $v eq ''; - hex($v); -} - -sub dvalue { - my $v = shift; - return undef if $v eq ''; - $v; -} - -package UCD::CaseFolding; - -use strict; - -sub getline { - my $fh = shift; - while (defined(my $s = <$fh>)) { - next if $s =~ /^\#/; - next if $s =~ /^\s*$/; - $s =~ s/\r?\n$//; - return $s; - } - undef; -} - -sub parseline { - my $s = shift; - my @f = split /;\s*/, $s, -1; - return (CODE => hex($f[0]), - TYPE => $f[1], - MAP => [map(hex, split ' ', $f[2])], - ); -} - -package UCD::SpecialCasing; - -use strict; - -sub getline { - my $fh = shift; - while (defined(my $s = <$fh>)) { - next if $s =~ /^\#/; - next if $s =~ /^\s*$/; - $s =~ s/\r?\n$//; - return $s; - } - undef; -} - -sub parseline { - my $s = shift; - - my @f = split /;\s*/, $s, -1; - my $cond = (@f > 5) ? $f[4] : undef; - return (CODE => hex($f[0]), - LOWER => [map(hex, split ' ', $f[1])], - TITLE => [map(hex, split ' ', $f[2])], - UPPER => [map(hex, split ' ', $f[3])], - CONDITION => $cond); -} - -package UCD::CompositionExclusions; - -use strict; - -sub getline { - my $fh = shift; - while (defined(my $s = <$fh>)) { - next if $s =~ /^\#/; - next if $s =~ /^\s*$/; - $s =~ s/\r?\n$//; - return $s; - } - undef; -} - -sub parseline { - my $s = shift; - m/^[0-9A-Fa-f]+/; - return (CODE => hex($&)); -} - -1; diff --git a/contrib/idn/mdnkit/util/generate_nameprep_data.pl b/contrib/idn/mdnkit/util/generate_nameprep_data.pl deleted file mode 100644 index c3830b8b85..0000000000 --- a/contrib/idn/mdnkit/util/generate_nameprep_data.pl +++ /dev/null @@ -1,320 +0,0 @@ -#! /usr/local/bin/perl -w -# $Id: generate_nameprep_data.pl,v 1.2 2002/02/08 05:41:47 marka Exp $ -# -# Copyright (c) 2001 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is under this -# License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -# - -use v5.6.0; # for pack('U') -use bytes; - -use lib qw(.); - -use SparseMap; -use Getopt::Long; - -(my $myid = '$Id: generate_nameprep_data.pl,v 1.2 2002/02/08 05:41:47 marka Exp $') =~ s/\$([^\$]+)\$/\$-$1-\$/; - -my @map_bits = (9, 7, 5); -my @proh_bits = (7, 7, 7); -my @unas_bits = (7, 7, 7); - -my $dir = '.'; - -GetOptions('dir=s', \$dir) or die usage(); - -print_header(); - -bits_definition("MAP", @map_bits); -bits_definition("PROH", @proh_bits); -bits_definition("UNAS", @unas_bits); - -generate_data($_) foreach @ARGV; - -sub usage { - die "Usage: $0 [-dir dir] version..\n"; -} - -sub generate_data { - my $version = shift; - generate_mapdata($version, "$dir/nameprep.$version.map"); - generate_prohibiteddata($version, "$dir/nameprep.$version.prohibited"); - generate_unassigneddata($version, "$dir/nameprep.$version.unassigned"); -} - -# -# Generate mapping data. -# -sub generate_mapdata { - my $version = shift; - my $file = shift; - my $top = 1; - - my $map = SparseMap::Int->new(BITS => [@map_bits], - MAX => 0x110000, - MAPALL => 1, - DEFAULT => 0); - open FILE, $file or die "cannot open $file: $!\n"; - - my $mapbuf = "\0"; # dummy - my %maphash = (); - while () { - if ($top and /^%\s*SAME-AS\s+(\S+)/) { - generate_map_ref($version, $1); - close FILE; - return; - } - $top = 0; - next if /^\#/; - next if /^\s*$/; - register_map($map, \$mapbuf, \%maphash, $_); - } - close FILE; - generate_map($version, $map, \$mapbuf); -} - -# -# Generate prohibited character data. -# -sub generate_prohibiteddata { - my $version = shift; - my $file = shift; - my $top = 1; - - my $proh = SparseMap::Bit->new(BITS => [@proh_bits], - MAX => 0x110000); - open FILE, $file or die "cannot open $file: $!\n"; - while () { - if ($top and /^%\s*SAME-AS\s+(\S+)/) { - generate_prohibited_ref($version, $1); - close FILE; - return; - } - $top = 0; - next if /^\#/; - next if /^\s*$/; - register_prohibited($proh, $_); - } - close FILE; - generate_prohibited($version, $proh); -} - -# -# Generate unassigned codepoint data. -# -sub generate_unassigneddata { - my $version = shift; - my $file = shift; - my $top = 1; - - my $unas = SparseMap::Bit->new(BITS => [@unas_bits], - MAX => 0x110000); - open FILE, $file or die "cannot open $file: $!\n"; - while () { - if ($top and /^%\s*SAME-AS\s+(\S+)/) { - generate_unassigned_ref($version, $1); - close FILE; - return; - } - $top = 0; - next if /^\#/; - next if /^\s*$/; - register_unassigned($unas, $_); - } - close FILE; - generate_unassigned($version, $unas); -} - -sub print_header { - print <<"END"; -/* \$Id\$ */ -/* $myid */ -/* - * Do not edit this file! - * This file is generated from NAMEPREP specification. - */ - -END -} - -sub bits_definition { - my $name = shift; - my @bits = @_; - my $i = 0; - - foreach my $n (@bits) { - print "#define ${name}_BITS_$i\t$n\n"; - $i++; - } - print "\n"; -} - -sub register_map { - my ($map, $bufref, $hashref, $line) = @_; - - my ($from, $to) = split /;/, $line; - my @fcode = map {hex($_)} split ' ', $from; - my @tcode = map {hex($_)} split ' ', $to; - - my $utf8 = pack 'U*', @tcode; - - my $offset; - if (exists $hashref->{$utf8}) { - $offset = $hashref->{$utf8}; - } else { - $offset = length $$bufref; - $$bufref .= $utf8 . "\0"; - $hashref->{$utf8} = $offset; - } - - die "unrecognized line: $line" if @fcode != 1; - $map->add($fcode[0], $offset); -} - -sub generate_map { - my ($version, $map, $bufref) = @_; - - $map->fix(); - - print $map->cprog(NAME => "nameprep_${version}_map"); - print "\nstatic const unsigned char nameprep_${version}_map_data[] = \{\n"; - print_uchararray($$bufref); - print "};\n\n"; -} - -sub generate_map_ref { - my ($version, $refversion) = @_; - print <<"END"; -#define nameprep_${version}_map_imap nameprep_${refversion}_map_imap -#define nameprep_${version}_map_table nameprep_${refversion}_map_table -#define nameprep_${version}_map_data nameprep_${refversion}_map_data - -END -} - -sub print_uchararray { - my @chars = unpack 'C*', $_[0]; - my $i = 0; - foreach my $v (@chars) { - if ($i % 12 == 0) { - print "\n" if $i != 0; - print "\t"; - } - printf "%3d, ", $v; - $i++; - } - print "\n"; -} - -sub register_prohibited { - my $proh = shift; - register_bitmap($proh, @_); -} - -sub register_unassigned { - my $unas = shift; - register_bitmap($unas, @_); -} - -sub generate_prohibited { - my ($version, $proh) = @_; - generate_bitmap($proh, "nameprep_${version}_prohibited"); -} - -sub generate_prohibited_ref { - my ($version, $refversion) = @_; - print <<"END"; -#define nameprep_${version}_prohibited_imap nameprep_${refversion}_prohibited_imap -#define nameprep_${version}_prohibited_bitmap nameprep_${refversion}_prohibited_bitmap - -END -} - -sub generate_unassigned { - my ($version, $unas) = @_; - generate_bitmap($unas, "nameprep_${version}_unassigned"); -} - -sub generate_unassigned_ref { - my ($version, $refversion) = @_; - print <<"END"; -#define nameprep_${version}_unassigned_imap nameprep_${refversion}_unassigned_imap -#define nameprep_${version}_unassigned_bitmap nameprep_${refversion}_unassigned_bitmap - -END -} - -sub register_bitmap { - my $bm = shift; - my $line = shift; - - /^([0-9A-Fa-f]+)(?:-([0-9A-Fa-f]+))?/ or die "unrecognized line: $line"; - my $v1 = hex($1); - my $v2 = defined($2) ? hex($2) : undef; - if (defined $v2) { - $bm->add($v1 .. $v2); - } else { - $bm->add($v1); - } -} - -sub generate_bitmap { - my $bm = shift; - my $name = shift; - $bm->fix(); - #$map->stat(); - print $bm->cprog(NAME => $name); -} diff --git a/contrib/idn/mdnkit/util/generate_normalize_data.pl b/contrib/idn/mdnkit/util/generate_normalize_data.pl deleted file mode 100644 index bfb5b8a494..0000000000 --- a/contrib/idn/mdnkit/util/generate_normalize_data.pl +++ /dev/null @@ -1,602 +0,0 @@ -#! /usr/local/bin/perl -w -# $Id: generate_normalize_data.pl,v 1.1 2002/01/02 02:47:06 marka Exp $ -# -# Copyright (c) 2000,2001 Japan Network Information Center. -# All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is under this -# License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -# - -# -# Generate lib/unicodedata.c from UnicodeData.txt, -# CompositionExclusions-1.txt, SpecialCasing.txt and CaseFolding.txt, -# all of them available from ftp://ftp.unicode.org/Public/UNIDATA/. -# - -use strict; -use lib qw(.); - -use Getopt::Long; -use UCD; -use SparseMap; - -use constant UCS_MAX => 0x110000; -use constant END_BIT => 0x80000000; - -my $DECOMP_COMPAT_BIT = 0x8000; - -my $CASEMAP_FINAL_BIT = 0x1; -my $CASEMAP_NONFINAL_BIT = 0x2; -my $CASEMAP_LAST_BIT = 0x10; - -my $LETTER_BIT = 1; -my $NSPMARK_BIT = 2; - -(my $myid = '$Id: generate_normalize_data.pl,v 1.1 2002/01/02 02:47:06 marka Exp $') =~ s/\$([^\$]+)\$/\$-$1-\$/; - -my @default_bits = (9, 7, 5); -#my @default_bits = (7, 7, 7); -my @canon_class_bits = @default_bits; -my @decomp_bits = @default_bits; -my @comp_bits = @default_bits; -my @folding_bits = @default_bits; -my @casemap_bits = @default_bits; -my @casemap_ctx_bits = @default_bits; - -my $prefix = ''; -my $dir = '.'; -my $unicodedatafile = 'UnicodeData.txt'; -my $exclusionfile = 'CompositionExclusions.txt'; -my $specialcasefile = 'SpecialCasing.txt'; -my $casefoldingfile = 'CaseFolding.txt'; -my $verbose; - -GetOptions('dir|d=s' => \$dir, - 'unicodedata|u=s' => \$unicodedatafile, - 'exclude|e=s' => \$exclusionfile, - 'specialcase|s=s' => \$specialcasefile, - 'casefold|c=s' => \$casefoldingfile, - 'prefix|p=s' => \$prefix, - 'verbose|v' => \$verbose, -) or usage(); - -foreach my $r (\$unicodedatafile, \$exclusionfile, - \$specialcasefile, \$casefoldingfile) { - $$r = "$dir/$$r" unless $$r =~ m|^/|; -} - -my %exclusions; -my %lower_special; -my %upper_special; - -my @decomp_data; -my @comp_data; -my @toupper_data; -my @tolower_data; -my @folding_data; - -# -# Create Mapping/Bitmap objects. -# - -# canonical class -my $canon_class = SparseMap::Int->new(BITS => [@canon_class_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# canonical/compatibility decomposition -my $decomp = SparseMap::Int->new(BITS => [@decomp_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# canonical composition -my $comp = SparseMap::Int->new(BITS => [@comp_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# uppercase/lowercase -my $upper = SparseMap::Int->new(BITS => [@casemap_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); -my $lower = SparseMap::Int->new(BITS => [@casemap_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# final/nonfinal context -my $casemap_ctx = SparseMap::Int->new(BITS => [@casemap_ctx_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# casefolding -my $folding = SparseMap::Int->new(BITS => [@folding_bits], - MAX => UCS_MAX, - MAPALL => 1, - DEFAULT => 0); - -# -# Read datafiles. -# - -read_exclusion_file(); -read_specialcasing_file(); -read_unicodedata_file(); -read_casefolding_file(); - -print_header(); -print_canon_class(); -print_composition(); -print_decomposition(); -print_casemap(); -print_casemap_context(); -print_casefolding(); - -exit; - -sub usage { - print STDERR <<"END"; -Usage: $0 [options..] - options: - -d DIR directory where Unicode Character Data files resides [./] - -u FILE name of the UnicodeData file [UnicodeData.txt] - -e FILE name of the CompositionExclusion file [CompositionExclusions-1.txt] - -s FILE name of the SpecialCasing file [SpecialCasing.txt] - -c FILE name of the CaseFolding file [CaseFolding.txt] -END - exit 1; -} - -# -# read_exclusion_file -- read CompositionExclusions-1.txt. -# -sub read_exclusion_file { - open EXCLUDE, $exclusionfile or die "cannot open $exclusionfile: $!\n"; - while ($_ = UCD::CompositionExclusions::getline(\*EXCLUDE)) { - my %data = UCD::CompositionExclusions::parseline($_); - $exclusions{$data{CODE}} = 1; - } - close EXCLUDE; -} - -# -# read_specialcasing_file -- read SpecialCasing.txt -# -sub read_specialcasing_file { - open SPCASE, $specialcasefile or die "cannot open $specialcasefile: $!\n"; - while ($_ = UCD::SpecialCasing::getline(\*SPCASE)) { - my %data = UCD::SpecialCasing::parseline($_); - my $code = $data{CODE}; - my $lower = $data{LOWER}; - my $upper = $data{UPPER}; - my $cond = $data{CONDITION} || ''; - - next unless $cond eq '' or $cond =~ /^(NON_)?FINAL/; - - if (defined $cond && (@$lower > 1 || $lower->[0] != $code) - or @$lower > 1 or $lower->[0] != $code) { - $lower_special{$code} = [$lower, $cond]; - } - if (defined $cond && (@$upper > 1 || $upper->[0] != $code) - or @$upper > 1 or $upper->[0] != $code) { - $upper_special{$code} = [$upper, $cond]; - } - } - close SPCASE; -} - -# -# read_unicodedata_file -- read UnicodeData.txt -# -sub read_unicodedata_file { - open UCD, $unicodedatafile or die "cannot open $unicodedatafile: $!\n"; - - @decomp_data = (0); - @toupper_data = (0); - @tolower_data = (0); - - my @comp_cand; # canonical composition candidates - my %nonstarter; - - while ($_ = UCD::UnicodeData::getline(\*UCD)) { - my %data = UCD::UnicodeData::parseline($_); - my $code = $data{CODE}; - - # combining class - if ($data{CLASS} > 0) { - $nonstarter{$code} = 1; - $canon_class->add($code, $data{CLASS}); - } - - # uppercasing - if (exists $upper_special{$code} or defined $data{UPPER}) { - my $offset = @toupper_data; - my @casedata; - - $upper->add($code, $offset); - if (exists $upper_special{$code}) { - push @casedata, $upper_special{$code}; - } - if (defined $data{UPPER}) { - push @casedata, $data{UPPER}; - } - push @toupper_data, casemap_data(@casedata); - } - - # lowercasing - if (exists $lower_special{$code} or defined $data{LOWER}) { - my $offset = @tolower_data; - my @casedata; - - $lower->add($code, $offset); - if (exists $lower_special{$code}) { - push @casedata, $lower_special{$code}; - } - if (defined $data{LOWER}) { - push @casedata, $data{LOWER}; - } - push @tolower_data, casemap_data(@casedata); - } - - # composition/decomposition - if ($data{DECOMP}) { - my ($tag, @decomp) = @{$data{DECOMP}}; - my $offset = @decomp_data; - - # composition - if ($tag eq '' and @decomp > 1 and not exists $exclusions{$code}) { - # canonical composition candidate - push @comp_cand, [$code, @decomp]; - } - - # decomposition - if ($tag ne '') { - # compatibility decomposition - $offset |= $DECOMP_COMPAT_BIT; - } - $decomp->add($code, $offset); - push @decomp_data, @decomp; - $decomp_data[-1] |= END_BIT; - - } - - # final/nonfinal context - if ($data{CATEGORY} =~ /L[ult]/) { - $casemap_ctx->add($code, $LETTER_BIT); - } elsif ($data{CATEGORY} eq 'Mn') { - $casemap_ctx->add($code, $NSPMARK_BIT); - } - } - close UCD; - - # Eliminate composition candidates whose decomposition starts with - # a non-starter. - @comp_cand = grep {not exists $nonstarter{$_->[1]}} @comp_cand; - - @comp_data = ([0, 0, 0]); - my $last_code = -1; - my $last_offset = @comp_data; - for my $r (sort {$a->[1] <=> $b->[1] || $a->[2] <=> $b->[2]} @comp_cand) { - if ($r->[1] != $last_code) { - $comp->add($last_code, - ($last_offset | ((@comp_data - $last_offset)<<16))) - unless $last_code == -1; - $last_code = $r->[1]; - $last_offset = @comp_data; - } - push @comp_data, $r; - } - $comp->add($last_code, - ($last_offset | ((@comp_data - $last_offset)<<16))); -} - -sub casemap_data { - my @data = @_; - my @result = (); - while (@data > 0) { - my $r = shift @data; - my $flag = 0; - if (ref $r) { - if ($r->[1] eq 'FINAL') { - $flag |= $CASEMAP_FINAL_BIT; - } elsif ($r->[1] eq 'NON_FINAL') { - $flag |= $CASEMAP_NONFINAL_BIT; - } elsif ($r->[1] ne '') { - die "unknown condition \"", $r->[1], "\"\n"; - } - } - $flag |= $CASEMAP_LAST_BIT if @data == 0; - push @result, $flag; - push @result, (ref $r) ? @{$r->[0]} : $r; - $result[-1] |= END_BIT; - } - @result; -} - -# -# read_casefolding_file -- read CaseFolding.txt -# -sub read_casefolding_file { - open FOLD, $casefoldingfile or die "cannto open $casefoldingfile: $!\n"; - - # dummy. - @folding_data = (0); - - while ($_ = UCD::CaseFolding::getline(\*FOLD)) { - my %data = UCD::CaseFolding::parseline($_); - - $folding->add($data{CODE}, scalar(@folding_data)); - push @folding_data, @{$data{MAP}}; - $folding_data[-1] |= END_BIT; - } - close FOLD; -} - -sub print_header { - print <<"END"; -/* \$Id\$ */ -/* $myid */ -/* - * Do not edit this file! - * This file is generated from UnicodeData.txt, CompositionExclusions-1.txt, - * SpecialCasing.txt and CaseFolding.txt. - */ - -END -} - -# -# print_canon_class -- generate data for canonical class -# -sub print_canon_class { - $canon_class->fix(); - print STDERR "** cannon_class\n", $canon_class->stat() if $verbose; - - print <<"END"; - -/* - * Canonical Class - */ - -END - print_bits("CANON_CLASS", @canon_class_bits); - print "\n"; - print $canon_class->cprog(NAME => "${prefix}canon_class"); -} - -# -# print_composition -- generate data for canonical composition -# -sub print_composition { - $comp->fix(); - print STDERR "** composition\n", $comp->stat() if $verbose; - - print <<"END"; - -/* - * Canonical Composition - */ - -END - print_bits("CANON_COMPOSE", @comp_bits); - print "\n"; - print $comp->cprog(NAME => "${prefix}compose"); - print <<"END"; - -static const struct composition ${prefix}compose_seq[] = { -END - my $i = 0; - foreach my $r (@comp_data) { - if ($i % 2 == 0) { - print "\n" if $i != 0; - print "\t"; - } - printf "{ 0x%08x, 0x%08x }, ", $r->[2], $r->[0]; - $i++; - } - print "\n};\n\n"; -} - -# -# print_decomposition -- generate data for canonical/compatibility -# decomposition -# -sub print_decomposition { - $decomp->fix(); - print STDERR "** decomposition\n", $decomp->stat() if $verbose; - - print <<"END"; - -/* - * Canonical/Compatibility Decomposition - */ - -END - print_bits("DECOMP", @decomp_bits); - print "#define DECOMP_COMPAT\t$DECOMP_COMPAT_BIT\n\n"; - - print $decomp->cprog(NAME => "${prefix}decompose"); - - print "static const unsigned long ${prefix}decompose_seq[] = {\n"; - print_ulseq(@decomp_data); - print "};\n\n"; -} - -# -# print_casemap -- generate data for case mapping -# -sub print_casemap { - $upper->fix(); - $lower->fix(); - print STDERR "** upper mapping\n", $upper->stat() if $verbose; - print STDERR "** lower mapping\n", $lower->stat() if $verbose; - - print <<"END"; - -/* - * Lowercase <-> Uppercase mapping - */ - -/* - * Flags for special case mapping. - */ -#define CMF_FINAL $CASEMAP_FINAL_BIT -#define CMF_NONFINAL $CASEMAP_NONFINAL_BIT -#define CMF_LAST $CASEMAP_LAST_BIT -#define CMF_CTXDEP (CMF_FINAL|CMF_NONFINAL) - -END - print_bits("CASEMAP", @casemap_bits); - print "\n"; - print $upper->cprog(NAME => "${prefix}toupper"); - print $lower->cprog(NAME => "${prefix}tolower"); - - print "static const unsigned long ${prefix}toupper_seq[] = {\n"; - print_ulseq(@toupper_data); - print "};\n\n"; - - print "static const unsigned long ${prefix}tolower_seq[] = {\n"; - print_ulseq(@tolower_data); - print "};\n\n"; -} - -# -# print_casefolding -- generate data for case folding -# -sub print_casefolding { - $folding->fix(); - print STDERR "** case folding\n", $folding->stat() if $verbose; - - print <<"END"; - -/* - * Case Folding - */ - -END - print_bits("CASE_FOLDING", @folding_bits); - print "\n"; - print $folding->cprog(NAME => "${prefix}case_folding"); - - print "static const unsigned long ${prefix}case_folding_seq[] = {\n"; - print_ulseq(@folding_data); - print "};\n\n"; -} - -# -# print_casemap_context -- gerarate data for determining context -# (final/non-final) -# -sub print_casemap_context { - $casemap_ctx->fix(); - print STDERR "** casemap context\n", $casemap_ctx->stat() if $verbose; - - print <<"END"; - -/* - * Cased characters and non-spacing marks (for casemap context) - */ - -END - - print_bits("CASEMAP_CTX", @casemap_ctx_bits); - print <<"END"; - -#define CTX_CASED $LETTER_BIT -#define CTX_NSM $NSPMARK_BIT - -END - print $casemap_ctx->cprog(NAME => "${prefix}casemap_ctx"); -} - -sub sprint_composition_hash { - my $i = 0; - my $s = ''; - foreach my $r (@_) { - if ($i % 2 == 0) { - $s .= "\n" if $i != 0; - $s .= "\t"; - } - $s .= sprintf "{0x%04x, 0x%04x, 0x%04x}, ", @{$r}; - $i++; - } - $s; -} - -sub print_bits { - my $prefix = shift; - my $i = 0; - foreach my $bit (@_) { - print "#define ${prefix}_BITS_$i\t$bit\n"; - $i++; - } -} - -sub print_ulseq { - my $i = 0; - foreach my $v (@_) { - if ($i % 4 == 0) { - print "\n" if $i != 0; - print "\t"; - } - printf "0x%08x, ", $v; - $i++; - } - print "\n"; -} diff --git a/contrib/idn/mdnkit/win/README.WIN b/contrib/idn/mdnkit/win/README.WIN deleted file mode 100644 index bd7a4e3c47..0000000000 --- a/contrib/idn/mdnkit/win/README.WIN +++ /dev/null @@ -1,24 +0,0 @@ -To build `mdnsproxy' for Windows, follow the instruction below. -Please note that the Windows version is not officially supported. - -To build Windows version, you need `libiconv' library. A LGPL -implemenation is available from the following place. - - http://clisp.cons.org/~haible/packages-libiconv.html - -Follow the instructions described in README.win32 file which can be -found in the distribution, and you'll get a DLL vesion of `libiconv'. -Copy the DLL (iconv.dll), the header (iconv.h) and the import library -(iconv.lib) here. - -Then go to the top directory and run the following command to compile -`mdnsproxy'. - - nmake -f make.wnt - -* Running mdnsproxy - -On Windows NT you can run 'mdnsproxy' as a service, while on Windows -95/98 'mdnsproxy' can be run but not as a service. - -; $Id: README.WIN,v 1.2 2002/02/08 05:41:50 marka Exp $ diff --git a/contrib/idn/mdnkit/wsock/README.txt b/contrib/idn/mdnkit/wsock/README.txt deleted file mode 100644 index 29a81df413..0000000000 --- a/contrib/idn/mdnkit/wsock/README.txt +++ /dev/null @@ -1,642 +0,0 @@ - - mDN Wrapper - Client Side mDN Conversion for Windows - - Copyright (c) 2000,2001 Japan Network Information Center. - All rights reserved. - - *** IMPORTANT NOTICE ******************************************** - If you install a new version of mDN Wrapper to a machine where - older version is already installed, you need to rewrap all the - programs that has been wrapped when you first use the new version. - This can be done by pressing "Rewrap All" button from the - configuration GUI. - ***************************************************************** - - -1. Introduction - - For supporting multi-lingual domain name on Windows, client - application should convert domain names (their encodings) to that - DNS server accepts. Ofcourse, this requires windows applications to - handle multi-lingualized domain names in its core, and it is maker's - responsibility to make program mDN compatible. - - But now, there are still no acceptable standard for mDN, it is - difficult to expect software providers to create mDN version of the - programs. So, some tricks to make legacy application to do client - side mDN conversions. 'mdnsproxy' in mDNkit is one of such solution, - and also this one, WINSOCK Wrapper is another solution. - - On windows, name resolving request is passed to WINSOCK DLL. So, - replacing WINSOCK DLL with multi-lingual domain name version makes - legacy windows applications compatible with mDN. - -2. Architecture - -2.1. Wrapper DLL - - Wrapper DLL resides between application and original DLL. It - intercept application's calls to original DLL, and preforms some - additional processing on those calls. - - +------------+ Call +------------+ Call +------------+ - | |------->| |------->| | - |Application | |Wrapper DLL | |Original DLL| - | |<-------| |<-------| | - +------------+ Return +------------+ Return +------------+ - additional - processing - here - - DLL call from apllication is passed to wrapper DLL. Wrapper DLL - then performs some additional processing on that call, and then - calls original DLL. Also, result from original DLL will once passed - to wrapper DLL and wrapper does additional process on that result, - and finally result will passed to the application. - - mDN wrapper provides wrapper DLLs for WINSOCK, - - WSOCK32.DLL WINSOCK V1.1 - WS2_32.DLL WINSOCK V2.0 - - to resolve multi-lingual domain names. - -2.2. Wrapping APIs - - mDN Wrapper performs additional processing on name resolving APIs in - WINSOCK, listed below. - - both WINSOCK 1.1, WINSOCK 2.0 - - gethostbyaddr - gethostbyname - WSAAsyncGetHostByAddr - WSAAsyncGetHostByName - - only in WINSOCK 2.0 - - WSALookupServiceBeginA - WSALookupServiceNextA - WSALookupServiceEnd - - Some applications do not use these APIs to resolve domaimn names. - 'nslookup' is one of those program. 'nslookup' builds and parse DNS - messages internally and does not use WINSOCK's name resolve APIs. - mDN Wrapper cannot multi-ligualize those programs. - - NOTE: You can use 'mdnsproxy' to multi-ligualize those program. - 'mdnsproxy' intercepts DNS reqesut/response on the network - and convert encoding of domain names. - - NOTE: WINSOCK 2.0 also contains WIDE-CHARACTER based name - resolution APIs, - - WSALookupServiceBeginW - WSALookupServiceNextW - - mDN Wrapper does not wrap these APIs. These APIs are used - on microsoft's internartionalization, and used on their I18N - framework. It should be dangerouse to convert to another - multi-ligualization frame work. - -2.3. Other APIs in WINSOCK - - For another APIs in WINSOCK, mDN wrapper does nothing, only calls - original DLL's entries. - - mDN wrapper copies original WINSOCK DLLs with renaming - as below, and forward requests to them. - - wsock32.dll -> wsock32o.dll - ws2_32.dll -> ws2_32o.dll - - Wrappper DLL will installed with original DLL names. So after - install of mDN wrapper, WINSOCK DLLs should be - - wsock32.dll mDN Wrapper for WINSOCK V1.1 - ws2_32.dll mDN Wrapper for WINSOCK V2.0 - wsock32o.dll Original WINSOCK V1.1 DLL - ws2_32o.dll Original WINSOCK V2.0 DLL - -2.4. Asynchronous API - - Domain name conversion take place on - - request to DNS - - convert from local encoding to DNS compatible encoding - - response from DNS - - convert from DNS encoding to local encoding - - For synchronous APIs, local to DNS conversion is done before calling - original API, and after return from original API, name should be - converted from DNS encoding to local encoding. - - But WINSOCK having some asynchronous APIs, such as - - WSAAsyncGetHostByAddr - WSAAsyncGetHostByName - - In these APIs, completion is notified with windows message. To - perform DNS to local conversion, wrapper should hook target window - procedure to capture those completion messages. - - So, if asynchronous API was called, mDN wrapper set hook to target - window procedure (passed with API parameter). If hook found - notify message (also given with API parameter), then convert - resulting name (in DNS encoding) to local encoding. - -2.5. Installing Wrapper DLLs - - WINSOCK DLLs are placed at windows's system directory. To wrap - WINSOCK DLLs, one should do following sequence at system directory. - - Rename Original WINSOCK DLLs - - ren wsock32.dll wsock32o.dll - ren ws2_32.dll ws2_32o.dll - - Install (copy in) Wrapper DLLs - - copy somewhere\wsock32.dll wsock32.dll - copy somewhere\ws2_32.dll ws2_32.dll - copy another DLLs also - - But, replacing DLLs in window's system directory is very dangerous. - - a) If you want to re-install wrappers again, original WINSOCK DLLs - may be lost. - - b) Some application or service pack will replace WINSOCK DLLs. It - may corrupt WINSOCK environment. - - If these happen, at least networking does not work, and worse, - Windows never startup again. - - So, mDN wrapper usually does not wrap on system, but wrap on - indivisual applications. - - In Windows, DLL will be searched in the following places: - - Application's Load Directory - %SystemRoot%\System32 - %SystemRoot% - Directories in PATH - - and load & linked first found one. So if installed wrapper DLLs on - application's load directory, application's call to WINSOCK will - wrapped. - - But some applications or DLLs are binded to specific DLL, they does - not rely on above DLL's search path. For those applcaitons or DLLs, - mDN wrapper (in standard installation) cannot wrap them. - - NOTE: Netscape is one of those program. It cannot be wrapped if - installed to applications directory. Also WINSOCK DLLs are - also binded to related DLLs in system directory. On the - other hand, Internet Explore or Window Media Player relys on - standard DLL search path, and well wrapped with mDN wrapper. - -2.6. At which point conversion applied - - If windows supporting WINSOCK 2.0, there are DLLs one for 1.1 and - another for 2.0, and call to WINSOCK 1.1 will redirected to 2.0 DLL. - - +------------+ Call +------------+ Call +------------+ - | |------->| |------->| | - |Application | |WINSOCK 1.1 | |WINSOCK 2.0 | - | |<-------| |<-------| | - +------------+ Return +------------+ Return +------------+ - - In this case, calls to 1.1 and 2.0 are both passed to 2.0 DLL. So - conversion will done in WINSOCK 2.0 DLL side. - - If windows only supports WINSOCK 1.1, there's 1.1 DLL only. - - +------------+ Call +------------+ - | |------->| | - |Application | |WINSOCK 1.1 | - | |<-------| | - +------------+ Return +------------+ - - In this case, conversion must done in 1.1 DLL. - - If mDN Wrapper was installed on system directory, DLLs will work as - described above. But if wrapper was installed on application's - directory, call/return sequence changes. Original WINSOCK 1.1 DLL - in windows seems binded to specific WINSOCK 2.0 DLL, placed at - window's system diretory. So call from WINSOCK 1.1 to WINSOCK 2.0 - will passed to original DLL (in system directory) and never passed - to wrapper DLL in application's directory. So in this case, both - 1.1 and 2.0 DLLs should coonvert domain name encodings. - - These DLL binding is not documented. It may be change on OS - versions or DLL versions. So, mDn wrapper determines place of - conversion on registry value. With this registry value, mDN - wrappper absolb OS/DLL variations. - - Registry values for mDN Wrapper will placed under - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN - - Place of conversion is determined with registry value "Where", - - Registry Value "Where" REG_DWORD - - 0 both on WINSOCK 1.1 and WINSOCK 2.0 - 1 if WINSOCK 2.0 exist, only in WINSOCK 2.0 - otherwise, convert on WINSOCK 1.1 - 2 only in WINSOCK 1.1 - 3 only in WINSOCK 2.0 - - If you install mDN wrapper into application's directory, use "0". - If you install mDN wrapper into system directory, use "1". If there - are no "Where" value, mDN wrapper uses "0" as default, it is suited - to installation into application's directory (default installation). - -2.7. Converting From/To - - Wrapper DLL convert resolving domain name encoded with local code to - DNS server's encoding. Also, wrapper DLL convert resulting name ( - encoded with DNS's encoding) back to local encoding. - - There are several proposals for DNS encodings to handle multi-lingual - domain names. Wrapper DLL should be configured to convert to one of - those encodings. This DNS side encoding will specified with - registry. When installing mDN wrapper, this registry will set to - some (yet undefined) DNS encoding. - - Registry values for mDN Wrapper will placed under - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN - - DNS encoding name will given with registry value (REG_SZ) of "Encoding", - this name must be one of encoding names which 'libmdn' recognize. - - Registry Value "Encoding" REG_SZ - - Encoding name of DNS server accepts. - - Local encodings (Windows Apllication Encodings) is generally - acquired from process's code page. 'iconv' library, used for mDN - wrapper, generally accepts MS's codepage names. - - Some windows apllication encode domain name with some specific multi- - lingual encoding. For example, if you configured IE to use UTF-8, - then domain names are encoded with UTF-8. UTF-8 is one of proposed - DNS encoding, but DNS server may expect another encoding. - - For those cases, mDN wrapper accept program specific encoding as - local encoding. These program specific local encoding should be - marked in registry. - - Program specific registry setting will placed under - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg - - using program name (executable file name) as key. For example, - setting specific to Internet Explore, it executable name is - "IEXPLORE", will plcaed at - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE - - Local encoding name will specified with registry value (REG_SZ) of - "Encoding". This name must be one of encoding names which ' - recognize.libmdn' - - Registry Value "Encoding" REG_SZ - - Encoding name of application program encodes, if it is not - system's default encoding. - -3. Setup and Configuration - - mDN Wrapper, as standard installation, wraps WINSOCK DLL on - application's directory. For this installation, mDN Wrapper - presents setup program and configuration program. - - NOTE: You can also install mDN wrapper DLLs to wrap WINSOCK at - system directory. But this installations is very dangerous. - You should try it at your own risk. - -3.1. Setup Program - - To install mDN wrapper, run "setup.exe". Setup program will do: - - Install Files - - Copy mDN wrapper files (DLL, Program EXE, etc) into diretory - - "\Program Files\JPONIC\mDN Wrapper" - - This directory may be changed on setup sequence. - - Registry setting - - Setup program will create keys and values under registry: - - "HKEY_LOCAL_MACHINES\Software\JPNIC\MDN" - - Encoding REG_SZ "RACE" - - Name of DNS encoding. Default value is "RACE", which is - current candidate for DNS encoding. This value may be - changed with registry editor. - - PerProg KEY - - Under this key, mDN wrapper set program specific values. mDN - wrapper uses program's executable name as key, and put - values under that key. - - PerProg\\Where REG_DWORD Encoding Position - PerProg\>progname>\Encoding REG_SZ Local Encoding Name - - Configuration program set local encpoding name. "Where" - value is usually not required in standard installation. If - you installed mDN wrapper in system directory, chanage - "Where" values to fit your environment. - - Creating ICON - - Setup program will create program icon for mDN wrapper's - configuration program, and put it into "Start Menu". You can - start configuration program with it. - -3.2. Configuration Program - - Configuration program is a tool for wrap specific program, or unwrap - programs. If you start "Configuration Program", you'll get window - link this. - - +---+-------------------------------------------------+---+---+---+ - | | mDN Wrapper - Configuration | _ | O | X | - +---+-------------------------------------------------+---+---+---+ - | mDN Wrapper Configuration Program version X.X | - +-----------------------------------------------------------------+ - | Wrapped Program +---------+ | - | +---------------------------------------------+---+ | Wrap.. | | - | | | A | +---------+ | - | | +---+ +---------+ | - | | | | | Unwrap..| | - | | | | +---------+ | - | | | | +---------+ | - | | | | |UnwrapAll| | - | | | | +---------+ | - | | | | +---------+ | - | | | | |RewrapAll| | - | | | | +---------+ | - | | | | +---------+ | - | | | | | Log.. | | - | | | | +---------+ | - | | | | +---------+ | - | | +---+ |Advanced.| | - | | | V | +---------+ | - | +---+-------------------------------------+---+---+ +---------+ | - | | < | | > | | Exit | | - | +---+-------------------------------------+---+ +---------+ | - +-----------------------------------------------------------------+ - - Listbox contains list of current wrapped programs. It initially - empty. - - To wrap a program, press button "wrap". You'll get following dialog. - - +---+-------------------------------------------------+---+---+---+ - | | mDN Wrapper - Wrap Executable | _ | O | X | - +---+-------------------------------------------------+---+---+---+ - | +----------------------------------------+ +--------+ | - | Program: | | |Browse..| | - | +----------------------------------------+ +--------+ | - | +----------+ | - | Encoding: | | o Default o UTF-8 | - | +----------+ | - +-----------------------------------------------------------------+ - | +--------+ +--------+ | - | | Wrap | | Cancel | | - | +--------+ +--------+ | - +-----------------------------------------------------------------+ - - First, enter program (executable name with full path) or browse - wrapping exectable from file browser. Then set local encoding of - that program. Usually use "Default" as local encoding. If target - program uses internationalized encoding, then specify "UFT-8". - Finally, put "wrap" button to wrap specified program with given - encoding. Wrapped program will be listed in listbox of the first - window. - - When you install a new version of mDN Wrapper, you have to re-wrap - your programs in order to update DLLs used for wrapping. "Rewrap - all" button is provided for this purpose. Just press the button, - and all the currently wrapped programs will be re-wrapped. - - To unwrap a program, press button "unwrap". You'll get following - confirmating dialog. - - +---+-------------------------------------------------+---+---+---+ - | | mDN Wrapper - Unwrap Executable | _ | O | X | - +---+-------------------------------------------------+---+---+---+ - | +---------------------------------------------------+ | - | Program: | | | - | +---------------------------------------------------+ | - +-----------------------------------------------------------------+ - | +--------+ +--------+ | - | | Unwrap | | Cancel | | - | +--------+ +--------+ | - +-----------------------------------------------------------------+ - - If you unwrap a program, the program will be vanished from listbox - of the first window. - - Also "Unwrap all" button is provided to unwrap all the programs - that are currently wrapped. - - To configure logging, press button "log". You'll get the following - dialog. - - +---+-------------------------------------------------+---+---+---+ - | | mDN Wrapper - Log Configuration | _ | O | X | - +---+-------------------------------------------------+---+---+---+ - | Log Level: o None o Fatal o Error o Warning o Info o Trace | - | | - | +------------------------------------+ +---------+ | - | Log File:| | | Browse..| | - | +------------------------------------+ +---------+ | - | +------+ +--------+ | - |Log Operation: | View | | Delete | | - | +------+ +--------+ | - +-----------------------------------------------------------------+ - | +--------+ +--------+ | - | | OK | | Cancel | | - | +--------+ +--------+ | - +-----------------------------------------------------------------+ - - Logging level can be selected from the followings. - None no logging at all - Fatal only records fatal errors - Error also records non-fatal errors - Warning also records warning mssages - Info also records informational messages - Trace also records trace information - Note that these levels are for log output from MDN library (libmdn). - mDN Wrapper itself supports only off (None) and on (the rest). - - Pathname of the log file can also be specified with this dialog. - - You can view the current log file contents by pressing "View" button, - or delete it by "Delete" button. - - Note that log level and log file configuration doesn't affect already - running processes. - - Press "advanced" button to invoke the advanced configuration dialog. - This dialog is for advanced users and enables customization for - some basic parameters which normal users need not change, since - appropriate defaults are provided. - - +---+-------------------------------------------------+---+---+---+ - | | mDN Wrapper - Advanced Configuration | _ | O | X | - +---+-------------------------------------------------+---+---+---+ - | MDN Wrapping Mode | - | o Wrap both WINSOCK 1.1 and WINSOCK 2.0 | - | o Wrap only WINSOCK 1.1 | - | o Wrap only WINSOCK 2.0 | - | o Wrap only WINSOCK 2.0 if it exists. | - | Otherwise wrap only WINSOCK 1.1 | - +-----------------------------------------------------------------+ - | MDN Configuration | - | +--------------------------------+ +----------+ | - | Config File: | | | Browse.. | | - | +--------------------------------+ +----------+ | - | +------+ | - | | Edit | | - | +------+ | - +-----------------------------------------------------------------+ - | +--------+ +--------+ | - | | OK | | Cancel | | - | +--------+ +--------+ | - +-----------------------------------------------------------------+ - - With the dialog users can do the following configuration. - - Wrapping Mode - Customize wrapping mode. Normally the default item should be - appropriate. Changing it to other item may help when you - have problems. - - MDN Configuration - Set the configuration file for multilingual domain name handling. - By pressing "Edit" button, you can edit then contents of the file. - -4. Limitations - -4.1. DLL Versions - - Wrapper DLL is tightly coupled with specific DLL version. Wrapper - DLL is expoected to export all entries including un-documented ones. - If WINSOCK DLL version changed, mDN wrapper may not work correctly. - - Current mDN Wrapper is confirmed on - - WinNT4.0 SP6a (WINSOCK 1.1 + 2.0) - Win98 (WINSOCK 1.1 + 2.0) - Win95 OSR2 (WINSOCK 1.1) - - But there are no assuarance for feature version of windows. - -4.2. DNS, WINS, LMHOSTS - - There are three name resolving methods in windows, DNS, WINS and - LMHOSTS. Using mDN wrapper, domain name conversion will performed - on all of thoses methods. It may cause some trouble if windows - using WINS or LMHOSTS. We recommend use DNS oly if you want to use - mDN Wrapper. - -4.3. Converting Names other than Domain Name - - In WINSOCK 2.0, there are generic name resolution APIs are - introduced. - - WSALookupServiceBeginA - WSALookupServiceNextA - WSALookupServiceEnd - - They are use mainly domain name conversion now, but not limited to - resolving domain name. mDN wrapper hooks this API and convert - given name anyway. This causes some trouble if conversion name is - not domain name. - -4.4. Applications don't use these APIa - - Some applications don't use these APIs to resolving domain names. - For example, 'nslookup' issue DNS request locally. For these - applications, mDN wrapper does not work. - -4.5. Applications bound to specific WINSOCK DLL - - Some apllications are bound to specific DLL, not rely on standard - DLL search path. Netscape Communicator is one of such programs. mDN - wrapper in standard installation, cannot wrap such programs. - - If you want to wrap those programs, you may use installation into - system directory. But this installation is very dangerous, for - it is possible that your system cannot boot again. - -4.6. But 'mdnsproxy' exist - - If you have above problems with your environments, there is - 'mdnsproxy'. It hooks on DNS transactions, so it is free from above - problems. But of course, it is harder to setup, and also cannot work - with program specific encodings, such as IE, but sometimes, works - better than mDN Wrapper. - -5. Registry Setting - Summary - -5.1. Priority of Setting - - Settings of mDN Wrapper is placed on registry - - Software\JPNIC\MDN - - under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. mDN Wrapper first - read HKEY_LOCAL_MACHINE, and if HKEY_CURRENT_USER exist, overwrite - with this one. Usually set HKEY_LOCAL_MACHINE only. But if you - need per user setting, then set HKEY_CURRENT_USER. - - Note that the configuration program reads/writes only - HKEY_LOCAL_MACHINE. - -5.2. Registry Key - - There's common settings and per program settings. - -_Common Settings - - Software\\JPNIC\\MDN\\Where Where convert encoding - 0: both WINSOCK 1.1 and WINSOCK 2.0 - 1: if WINSOCK 2.0 exist, convert at 2.0 DLL - if WINSOCK 1.1 only, convert at 1.1 DLL - 2: only in WINSOCK1.1 - 3: only in WINSOCK2.0 - Software\\JPNIC\\MDN\\Encoding DNS Encoding Name - Software\\JPNIC\\MDN\\Normalize Normalization Scheme - Software\\JPNIC\\MDN\\LogLevel Log Level - Software\\JPNIC\\MDN\\LogFile Log File - -_Per Program Settings - - Converting position and program's local encoding may be set per - program bases. - - Software\\JPNIC\\MDN\\PerProg\\\\Where - Software\\JPNIC\\MDN\\PerProg\\\\Encoding - - If not specified, - - Where 0 both 1.1 DLL and 2.0 DLL - Encoding process's code page diff --git a/contrib/idn/mdnkit/wsock/README_j.txt b/contrib/idn/mdnkit/wsock/README_j.txt deleted file mode 100644 index a20545ecff..0000000000 --- a/contrib/idn/mdnkit/wsock/README_j.txt +++ /dev/null @@ -1,707 +0,0 @@ - - mDN Wrapper - ƒEƒBƒ“ƒhƒEƒY‚É‚¨‚¯‚éƒNƒ‰ƒCƒAƒ“ƒg‘¤‚ł̕ϊ· - - Copyright (c) 2000,2001 Japan Network Information Center. - All rights reserved. - - *** d—v‚È’ˆÓ **************************************************** - ‚à‚µ‚à‚·‚Å‚É mDN Wrapper ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚éƒ}ƒVƒ“‚ÉV‚µ‚¢ƒo[ - ƒWƒ‡ƒ“‚Ì mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍAV‚µ‚¢ƒo[ƒWƒ‡ƒ“‚ð - ʼn‚É‹N“®‚·‚éÛ‚ÉAƒ‰ƒbƒv‚³‚ê‚Ä‚¢‚é‚·‚ׂẴvƒƒOƒ‰ƒ€‚ðÄ“xƒ‰ƒbƒv - ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚ê‚̓Rƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ GUI ‚Å "Rewrap All" - ‚Æ‚¢‚¤ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚±‚ƂŎÀs‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - ******************************************************************* - - -1. ‚Í‚¶‚ß‚É - - Windows ‚Å‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤‚É‚·‚邽‚߂ɂÍAWindows ã‚̃N - ƒ‰ƒCƒAƒ“ƒgƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚¨‚¢‚ÄA‰ðŒˆ‚µ‚悤‚Æ‚·‚é–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ - ƒO‚ðADNS ƒT[ƒo‚ªŽó•t‚¯‚éŒ`Ž®‚Ì‚à‚̂ɕϊ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚ê‚ÍA - Windows ã‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ªA‚«‚¿‚ñ‚Æ‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðˆµ‚¦‚邿‚¤ - ‚ɂȂÁ‚Ä‚¢‚È‚¯‚ê‚΂Ȃç‚È‚¢A‚Æ‚¢‚¤‚±‚Ƃł ‚èA–{—ˆ‚Í‚»‚ꂼ‚ê‚̃vƒƒO - ƒ‰ƒ€‚Ì쬎҂ªs‚È‚¤‚ׂ«‚±‚Ƃł·B - - ‚µ‚©‚µA•W€‚ªŒˆ‚Ü‚Á‚Ä‚¢‚È‚¢Œ»ó‚Å‚ÍAƒvƒƒOƒ‰ƒ€ì¬ŽÒ‚É‚±‚̂悤‚ȑΠ- ‰ž‚ðŠú‘Ò‚·‚é‚͖̂³—‚Ȃ̂ÅAŠù‘¶‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚𑽌¾ŒêƒhƒƒCƒ“–¼ - ‘Ήž‚³‚¹‚邽‚߂̃gƒŠƒbƒN‚ª•K—v‚ɂȂè‚Ü‚·BmDNkit‚Ɋ܂܂ê‚é mdnsproxy - ƒT[ƒo‚Í‚»‚Ì‚½‚߂̈ê‚‚̕û–@‚Å‚·B‚±‚±‚Å‚ÍA‚à‚¤ˆê‚‚̕û–@AWINSOCK - Wrapper ‚ð’ñަ‚µ‚Ü‚·B - - Windows ‚É‚¨‚¢‚ÄA‘½‚­‚Ìê‡AƒhƒƒCƒ“–¼‰ðŒˆ‚Ì—v‹‚ÍWINSOCK DLL ‚É“n - ‚³‚ê‚Ü‚·B‚»‚±‚ÅAWINSOCK DLL ‚𑽌¾ŒêƒhƒƒCƒ“–¼‘Ήž‚Ì‚à‚̂ɒu‚«Š·‚¦ - ‚Ä‚â‚ê‚ÎAŠù‘¶‚̃vƒƒOƒ‰ƒ€‚©‚ç‚Å‚à‘½Œ¾ŒêƒhƒƒCƒ“–¼‚ðŽg‚¤‚±‚Æ‚ª‚Å‚«‚é - ‚悤‚ɂȂè‚Ü‚·B - -2. ŽÀŒ»•û–@ - -2.1. Wrapper DLL - - ƒ‰ƒbƒp[DLL ‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ÆŒ³‚ÌDLL ‚Ƃ̊ԂɊ„‚èž‚ñ‚ÅAƒAƒvƒŠ - ƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚ð‰¡Žæ‚肵‚ÄA–{—ˆ‚ÌDLL ‚Ƃ͈قȂÁ‚½ˆ - —‚ð‚³‚¹‚é‚à‚̂ł·B - - +------------+ Call +------------+ Call +------------+ - | |------->| |------->| | - |Application | |Wrapper DLL | |Original DLL| - | |<-------| |<-------| | - +------------+ Return +------------+ Return +------------+ - additional - processing - here - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌDLL ‚̌ĂÑo‚µ‚̓‰ƒbƒp[‚É“n‚³‚ê‚Ü‚·Bƒ‰ƒbƒp[ - ‚Í‚»‚±‚ÅA•t‰Á“I‚Ȉ—‚ðs‚È‚Á‚ÄAŒ³‚ÌDLL ‚̃Gƒ“ƒgƒŠ‚ðŒÄ‚Ño‚µ‚Ü‚·B - ‚Ü‚½AŒ³‚ÌDLL ‚̈—Œ‹‰Ê‚͈ê’Uƒ‰ƒbƒp[‚ɕԂ³‚êA‚±‚±‚Å‚à•t‰Á“I‚Ȉ— - ‚ðs‚È‚Á‚ÄAÅI“I‚ÈŒ‹‰Ê‚ªƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɕԂ³‚ê‚邱‚ƂɂȂè‚Ü‚·B - - mDN Wrapper ‚Å‚ÍAWINSOCK DLL‚Ì - - WSOCK32.DLL WINSOCK V1.1 - WS2_32.DLL WINSOCK V2.0 - - ‚ɑ΂·‚郉ƒbƒp[DLL ‚ð’ñ‹Ÿ‚µ‚ÄA‘½Œ¾ŒêƒhƒƒCƒ“–¼‚Ì–¼‘O‰ðŒˆ‚ª‚Å‚«‚邿 - ‚¤‚É‚µ‚Ü‚·B - - ’F16ƒrƒbƒg”Å‚ÌWINSOCK (WINSOCK.DLL) ‚Í‘ÎÛŠO‚Å‚·B - -2.2. ˆ—‘ÎÛ‚ÌAPI - - mDN Wrapper ‚ÍWINSOCK ‚Ì–¼‘O‰ðŒˆ‚ÉŠÖ˜A‚µ‚½API ‚ɂ‚¢‚Ă̂ݕt‰Á“I‚Ȉ - —‚ðs‚È‚¢‚Ü‚·Bˆ—‚Ì‘ÎۂƂȂéWINSOCK API‚͈ȉº‚Ì‚à‚̂ł·B - - WINSOCK 1.1, WINSOCK 2.0 ‚Ì—¼•û‚É‚ ‚é‚à‚Ì - - gethostbyaddr - gethostbyname - WSAAsyncGetHostByAddr - WSAAsyncGetHostByName - - WINSOCK 2.0 ‚¾‚¯‚É‚ ‚é‚à‚Ì - - WSALookupServiceBeginA - WSALookupServiceNextA - WSALookupServiceEnd - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í‚È‚¢‚œƎ©‚ɃhƒƒCƒ“–¼ - ‚Ì‰ðŒˆ‚ðs‚È‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎAnslookup‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg‚í - ‚È‚¢‚ÅA“à•”‚œƎ©‚ÉDNS ƒŠƒNƒGƒXƒg‚̶¬A‰ðŽß‚ðs‚È‚Á‚Ä‚¢‚Ü‚·B“–‘R - ‚Ì‚±‚ƂȂª‚çA‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚ł͑½ - Œ¾Œê‰»‘Ήž‚³‚¹‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB - - ’Fmdnsproxy‚̓lƒbƒgƒ[ƒNã‚ÅDNS ‚ÌƒŠƒNƒGƒXƒgAƒŒƒXƒ|ƒ“ƒX‚ɂ‚¢‚Ä‘½ - Œ¾Œê‰»‚µ‚Ü‚·‚Ì‚ÅA‚±‚ê‚ç‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢‚Ä‚à‘½Œ¾Œê‰»‚³‚¹ - ‚邱‚Æ‚ª‚Å‚«‚Ü‚·B•K—v‚ɉž‚¶‚Ä“KŽžŽg‚¢•ª‚¯‚邯‚¢‚¢‚Å‚µ‚傤B - - ’FWINSOCK 2.0 ‚É‚ÍAWIDE CHARACTER ƒx[ƒX‚Ì–¼‘O‰ðŒˆ‚ÌAPI ‚Æ‚µ‚Ä - - WSALookupServiceBeginW - WSALookupServiceNextW - - ‚à‚ ‚è‚Ü‚·‚ªA‚±‚ê‚ç‚ɂ‚¢‚Ă̓‰ƒbƒv‚µ‚Ü‚¹‚ñB‚±‚ê‚ç‚ÌAPI ‚̓}ƒC - ƒNƒƒ\ƒtƒgŽd—l‚É‚æ‚é‘Û‰»‚ɑΉž‚µ‚½‚à‚̂ł·‚©‚çA‚»‚̃tƒŒ[ƒ€ƒ[ - ƒNã‚ÅŽg‚¤‚ׂ«‚à‚̂ł·B‚±‚ê‚ç‚ɂ‚¢‚Ä‚ÍmDN Kit ‚É‚æ‚Á‚Ä‘¼‚Ì‘½Œ¾ - Œê‰»ƒtƒŒ[ƒ€ƒ[ƒN‚ɕϊ·‚µ‚Ä‚µ‚Ü‚¤‚̂͊댯‚ł͂Ȃ¢‚©A‚Æ”»’f‚µ‚Ü - ‚µ‚½B - -2.3. ˆ—‘ÎÛŠO‚ÌAPI - - ã‹LˆÈŠO‚ÌWINSOCK API ‚ɂ‚¢‚Ä‚ÍAmDN Wrapper ‚Í‚È‚É‚à‚µ‚È‚¢‚ÅAŒ³‚Ì - WINSOCK API ‚ðŒÄ‚Ño‚µ‚Ü‚·B - - mDN wrapper ‚Å‚ÍAŒ³‚ÌWINSOCK DLL ‚𖼑O‚ð•Ï‚¦‚ăRƒs[‚µA‚»‚ê‚ð - ŒÄ‚Ño‚·‚悤‚Éì‚ç‚ê‚Ä‚¢‚Ü‚·B - - wsock32.dll -> wsock32o.dll - ws2_32.dll -> ws2_32o.dll - - ƒ‰ƒbƒp[DLL ‚ÍŒ³‚ÌWINSOCK DLL ‚Æ“¯‚¶–¼‘O‚Å쬂³‚ê‚Ü‚·B]‚Á‚ÄmDN - Wrapper ‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ꂽó‘Ô‚Å‚ÍA - - wsock32.dll mDN Wrapper for WINSOCK V1.1 - ws2_32.dll mDN Wrapper for WINSOCK V2.0 - wsock32o.dll Original WINSOCK V1.1 DLL - ws2_32o.dll Original WINSOCK V2.0 DLL - - ‚ƂȂè‚Ü‚·B - -2.4. ”ñ“¯Šú API - - ƒhƒƒCƒ“–¼‚̕ϊ·‚ÍAˆÈ‰º‚̃^ƒCƒ~ƒ“ƒO‚Ås‚È‚í‚ê‚é•K—v‚ª‚ ‚è‚Ü‚·B - - DNS ‚Ö‚ÌƒŠƒNƒGƒXƒgŽž - - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO -> DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO - - DNS ‚©‚ç‚̉ž“šŽóMŽž - - DNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO -> ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO - - “¯ŠúAPI ‚É‚¨‚¢‚Ä‚ÍAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO - ‚ւ̕ϊ·‚ÍAŒ³‚ÌAPI ‚ðŒÄ‚Ño‚·‘O‚És‚í‚êADNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ - ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ւ̕ϊ·‚ÍAŒ³‚ÌAPI ‚©‚畜‹A‚µ‚Ä‚«‚½‚Æ‚±‚ë‚Ås‚È - ‚í‚ê‚Ü‚·B - - ‚µ‚©‚µAWINSOCK ‚̈ȉº‚ÌAPI ‚Í”ñ“¯ŠúAPI ‚ÅADNS ‚©‚ç‚̉ž“šŽóM‘O‚É•œ - ‹A‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B - - WSAAsyncGetHostByAddr - WSAAsyncGetHostByName - - ‚±‚ê‚ç‚ÌAPI ‚É‚¨‚¢‚Ä‚ÍA–¼‘O‰ðŒˆ‚ÌŠ®—¹‚ÍAWindows ‚ւ̃ƒbƒZ[ƒW‚É‚æ‚Á - ‚Ä’Ê’m‚³‚ê‚Ü‚·B‚±‚Ì‚½‚ßADNS ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ - ƒO‚ւ̕ϊ·‚ðs‚È‚¤‚É‚ÍAƒ‰ƒbƒp[‚Í’Ê’mæ‚̃EƒBƒ“ƒhƒEƒvƒƒVƒWƒƒ‚̃ƒb - ƒZ[ƒWƒLƒ…[‚ðƒtƒbƒN‚µ‚ÄA‚±‚ÌŠ®—¹ƒƒbƒZ[ƒW‚ð•ߊl‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - - ‚»‚±‚ÅA”ñ“¯ŠúAPI ‚ªŒÄ‚Ño‚³‚ꂽꇂɂÍAmDN Wrapper ‚ÍA’Ê’mæ‚̃EƒBƒ“ - ƒhƒEƒvƒƒVƒWƒƒi‚±‚ê‚ÍAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ɃtƒbƒN‚ðݒ肵 - ‚Ü‚·BƒtƒbƒN‚ªŠ®—¹ƒƒbƒZ[ƒWi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê‚Ü‚·j‚ð - ŒŸo‚µ‚½‚È‚çAƒtƒbƒN‚ÍŒ‹‰Ê‚ÌŠi”[—̈æi‚±‚ê‚àAPI ‚̃pƒ‰ƒƒ^‚ÅŽwަ‚³‚ê - ‚Ä‚¢‚Ü‚·j‚̃hƒƒCƒ“–¼‚ðADNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚©‚çƒ[ƒJƒ‹ƒGƒ“ƒR[ - ƒfƒBƒ“ƒO‚ɕϊ·‚·‚é‚à‚̂Ƃµ‚Ü‚·B - -2.5. Wrapper DLL ‚̃Cƒ“ƒXƒg[ƒ‹ - - WINSOCK DLL ‚ÍWindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É’u‚©‚ê‚Ä‚¢‚Ü‚·B - WINSOCK ‚ðŠmŽÀ‚Ƀ‰ƒbƒv‚·‚é‚É‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚É‚¨‚¢‚Ä - - ƒIƒŠƒWƒiƒ‹WINSOCK DLL ‚Ì–¼‘O‚Ì•ÏX - - ren wsock32.dll wsock32o.dll - ren ws2_32.dll ws2_32o.dll - - ƒ‰ƒbƒp[DLL ‚Ì“±“ü - - copy somewhere\wsock32.dll wsock32.dll - copy somewhere\ws2_32.dll ws2_32.dll - copy another DLLs also - - ‚ðs‚È‚¤•K—v‚ª‚ ‚è‚Ü‚·B - - ‚µ‚©‚µAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚Å‚±‚̂悤‚ÈDLL ‚Ì’u‚«Š·‚¦‚ðs‚È‚¤‚̂͑å - •ϊ댯‚È‘€ì‚ɂȂè‚Ü‚·B - - a) DLL ‚ð“ü‚ê‘Ö‚¦‚½ó‘Ô‚ÅA‚à‚¤‚¢‚¿‚Ç“¯‚¶‘€ì‚ðs‚È‚¤‚ÆAƒIƒŠƒWƒiƒ‹ - ‚ÌWINSOCK DLL ‚ªŽ¸‚í‚ê‚Ä‚µ‚Ü‚¤‚±‚ƂɂȂè‚Ü‚·B - - b) ƒT[ƒrƒXƒpƒbƒN‚âƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ȂǂÅAWINSOCK DLL ‚ðÄ“±“ü‚·‚é - ‚à‚Ì‚ª‚ ‚è‚Ü‚·‚ªA‚±‚ê‚É‚æ‚Á‚Ä‚àWINSOCK ‚ª—˜—p•s”\‚ɂȂ邱‚Æ‚ª‚  - ‚è‚Ü‚·B - - ‚±‚̂悤‚Èó‘Ô‚É‚È‚é‚ÆAƒlƒbƒgƒ[ƒN‹@”\‚ª‘S‚­Žg‚¦‚È‚­‚È‚Á‚½‚èAň« - ‚ÍWindows ‚Ì‹N“®‚·‚ço—ˆ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B - - ‚»‚±‚ÅAmDN Wrapper ‚Å‚ÍAã‚̂悤‚ȃVƒXƒeƒ€ƒŒƒxƒ‹‚̃‰ƒbƒv‚ł͂Ȃ­A - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɑ΂·‚郉ƒbƒv‚ðŠî–{‹@”\‚Æ‚µ‚Ä’ñ‹Ÿ‚·‚é‚à‚̂Ƃµ‚Ü‚·B - - Windows ‚É‚¨‚¢‚ÄADLL ‚ÍAŠî–{“I‚É‚Í - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ - %SystemRoot%\System32 - %SystemRoot% - PATH ‚ÅŽwަ‚³‚ê‚éƒfƒBƒŒƒNƒgƒŠ - - ‚̇˜‚ÅŒŸõ‚³‚ê‚ÄAʼn‚ÉŒ©‚‚©‚Á‚½‚à‚Ì‚ªƒ[ƒh‚³‚ê‚Ü‚·B‚Å‚·‚©‚çA - ˆê”Ê“I‚É‚ÍADLL ‚ðƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃[ƒhƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹ - ‚·‚ê‚ÎA‚»‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚©‚ç‚ÌWINSOCK ‚̌ĂÑo‚µ‚ðƒ‰ƒbƒv‚·‚邱‚Æ - ‚ª‚Å‚«‚Ü‚·B - - ‚½‚¾‚µA‚¢‚­‚‚©‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚Å‚ÍAŒŸõƒpƒX‚ðŒo—R‚¹‚¸‚É“Á - ’è‚ÌDLL ‚ðƒŠƒ“ƒN‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B‚±‚̂悤‚È\¬‚Ì - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ADLL ‚ªŽg‚í‚ê‚½ê‡‚É‚Í mDN Wrapper‚ł͑Έ‚·‚邱‚Æ - ‚͂ł«‚Ü‚¹‚ñB - - ’FNetscape‚Í“Á’èDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚ÅAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒB - ƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ł̓‰ƒbƒv‚Å‚«‚Ü‚¹‚ñBWINSOCK DLL Ž©‘Ì‚à - ƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ÌŠÖ˜ADLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邿‚¤‚Å‚·Bˆê•ûA - Internet Explore‚âWindows Media Player‚Í•W€‚̃T[ƒ`ƒpƒX‚É]‚Á‚Ä - ‚¢‚é‚Ì‚ÅAƒ‰ƒbƒv‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - -2.6. ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̕ϊ·ˆÊ’u - - WINSOCK 2.0 ‚ðƒTƒ|[ƒg‚µ‚Ä‚¢‚éWindows ‚É‚ÍAWINSOCK ‚Ì1.1 ‚Æ2.0 ‚Ì‚» - ‚ꂼ‚ê‚ɑΉž‚·‚éDLL ‚ª‚ ‚èAWINSOCK 1.1 ‚ÌAPI ‚̌ĂÑo‚µ‚Í2.0 ‚Ì“¯‚¶ - ƒGƒ“ƒgƒŠ‚ÉƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B - - +------------+ Call +------------+ Call +------------+ - | |------->| |------->| | - |Application | |WINSOCK 1.1 | |WINSOCK 2.0 | - | |<-------| |<-------| | - +------------+ Return +------------+ Return +------------+ - - ‚±‚ÌꇂɂÍ1.1 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚à2.0 ‚ɑ΂·‚éŒÄ‚Ño‚µ‚àA‚Æ‚à‚ÉV2.0 - —p‚ÌDLL ‚É“n‚³‚ê‚é‚Ì‚ÅA2.0—p‚̃‰ƒbƒp[DLL ‘¤‚¾‚¯‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚Ì - •ÏŠ·‚ðs‚È‚¤‚悤‚É‚·‚é‚ׂ«‚Å‚µ‚傤B - - ˆê•ûAWINSOCK 1.1 ‚µ‚©ƒTƒ|[ƒg‚µ‚Ä‚¢‚È‚¢ê‡(Win95)‚É‚ÍA1.1 ‚ɑΉž‚µ - ‚½DLL ‚µ‚©‚ ‚è‚Ü‚¹‚ñB - - +------------+ Call +------------+ - | |------->| | - |Application | |WINSOCK 1.1 | - | |<-------| | - +------------+ Return +------------+ - - ‚±‚Ìꇂɂ͕K‘R“I‚É1.1 —p‚̃‰ƒbƒp[DLL ‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚µ‚È - ‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB - - mDN Wrapepr ‚ªwindows ‚̃VƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚½ê‡ - ‚É‚ÍAã‚Ì’Ê‚è‚É“®ì‚·‚é‚Ì‚ÅA - - WINSOCK 2.0 ‚ ‚è 2.0 ƒ‰ƒbƒp[‚ŕϊ· - WINSOCK 1.1 ‚Ì‚Ý 1.1 ƒ‰ƒbƒp[‚ŕϊ· - - ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - - ‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ꂽꇂɂ͓®ì - ‚ª•Ï‚í‚Á‚Ä‚«‚Ü‚·BWindows •t‘®‚Ì WINSOCK 1.1 DLL‚ÍAƒVƒXƒeƒ€ƒfƒBƒŒƒN - ƒgƒŠ‚ÌWINSOCK 2.0 ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚邽‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒN - ƒgƒŠ‘¤‚ÌWINSOCK 2.0 ƒ‰ƒbƒp[DLL ‚É‚ÍƒŠƒ_ƒCƒŒƒNƒg‚³‚ê‚Ä‚«‚Ü‚¹‚ñB‚±‚Ì - ‚½‚ßAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚É‚¨‚¢‚Ä‚ÍA1.1DLLA - 2.0DLL‚Ì—¼•û‚ŃGƒ“ƒR[ƒfƒBƒ“ƒO‚ð•ÏŠ·‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - - ‚±‚̂悤‚ÈDLL ŠÔ‚̃oƒCƒ“ƒfƒBƒ“ƒO‚̓hƒLƒ…ƒƒ“ƒg‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ‚Ì‚ÅAŠÂ - ‹«Aƒo[ƒWƒ‡ƒ“‚É‚æ‚Á‚Ă͈قȂÁ‚½“®ì‚ð‚·‚é‚©‚à’m‚ê‚Ü‚¹‚ñB‚»‚±‚ÅmDN - Wrapper ‚Å‚ÍAƒŒƒWƒXƒgƒŠ’l‚É‚æ‚Á‚ÄAƒ‰ƒbƒp[DLL ‚̂ǂ±‚ŕϊ·‚ðs‚È‚¤ - ‚©‚ðŒˆ’è‚·‚邿‚¤‚É‚µ‚ÄAƒCƒ“ƒXƒg[ƒ‹æ‚É‚æ‚é·ˆÙA‚ ‚é‚¢‚̓o[ƒWƒ‡ƒ“ - ‚É‚æ‚é·ˆÙ‚ð‹zŽû‚·‚邿‚¤‚É‚µ‚Ü‚·B - - mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN - - ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BƒGƒ“ƒR[ƒfƒBƒ“ƒO•ÏŠ·‚ðs‚È‚¤ˆÊ’u‚ɂ‚¢‚Ä‚ÍA‚±‚Ì - ’¼‰º‚̃ŒƒWƒXƒgƒŠ’l WhereiREG_DWORDj ‚É‚æ‚Á‚ÄŒˆ’肵‚Ü‚·B—LŒø‚È’l‚ÍA - - ƒŒƒWƒXƒgƒŠ Where (REG_DWORD) - - 0 WINSOCK 1.1AWINSOCK 2.0 ‚Ì—¼•û‚ŕϊ·‚·‚é - 1 WINSOCK 2.0 ‚ª‚ ‚ê‚ÎAWINSOCK 2.0‚¾‚¯‚ŕϊ·‚·‚é - WINSOCK 1.1 ‚¾‚¯‚Ìê‡‚É‚Í WINSOCK 1.1 ‚ŕϊ·‚·‚é - 2 WINSOCK 1.1 ‚¾‚¯‚ŕϊ·‚·‚é - 3 WINSOCK 2.0 ‚¾‚¯‚ŕϊ·‚·‚é - - ‚Ì‚S’Ê‚è‚Å‚·BƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éê‡‚É‚Í - u‚Ov‚ðAƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂɂÍu‚Pv‚ðÝ’è - ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·BƒŒƒWƒXƒgƒŠ’l‚ª‘¶Ý‚µ‚È‚¢ê‡‚É‚Íu‚Ov‚ð‘z’肵‚Ü - ‚·B‚±‚ê‚̓AƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ð•W€‚Æ‚µ‚½‚à - ‚̂ł·B - -2.7. •ÏŠ·Œ³/æ‚̃Gƒ“ƒNƒR[ƒfƒBƒ“ƒO - - ƒ‰ƒbƒp[DLL ‚Å‚ÍA‰ðŒˆ‚µ‚悤‚Æ‚·‚éƒhƒƒCƒ“–¼‚ðAƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ - ƒR[ƒfƒBƒ“ƒO‚©‚çDNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚ɕϊ·‚µA‚Ü‚½ADNS ‚ª•Ô - ‚µ‚Ä‚«‚½ƒhƒƒCƒ“–¼(DNS ƒT[ƒo‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO)‚ðƒ}ƒVƒ“‚̃[ƒJƒ‹ƒGƒ“ - ƒR[ƒfƒBƒ“ƒO‚É–ß‚µ‚Ü‚·B - - Œ»ÝADNS ‘¤‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ɂ‚¢‚Ä‚ÍA‚¢‚­‚‚à‚Ì•ûŽ®‚ª’ñ - ˆÄ‚³‚ê‚Ä‚¢‚Ü‚·Bƒ‰ƒbƒp[DLL ‚Í‚»‚ê‚ç‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̂ǂꂩ - ‚ЂƂ‚ɕϊ·‚·‚邿‚¤‚É\¬‚³‚ê‚Ü‚·B‚±‚ÌDNS ‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒW - ƒXƒgƒŠ‚ÅŽwަ‚³‚ê‚Ü‚·B‚±‚̃ŒƒWƒXƒgƒŠ‚É‚ÍAmDN Wrapper ‚̃Cƒ“ƒXƒg[ƒ‹ - Žž‚ÉiŒ»Žž“_‚ł͖¢’è‚ÌjƒfƒtƒHƒ‹ƒgƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ªÝ’肳‚ê‚Ü‚·B“– - ‘RA‚±‚̃ŒƒWƒXƒgƒŠ‚ÍAŒã‚Å‘¼‚Ì‚à‚̂ɕÏX‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B - - mDN Wrapper —p‚̃ŒƒWƒXƒgƒŠÝ’è‚Í - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN - - ˆÈ‰º‚É”z’u‚³‚ê‚Ü‚·BDNS ‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒgƒŠ’l Encoding - iREG_SZj‚ÅŽwަ‚³‚ê‚Ü‚·B‚±‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAlibmdn‚Å”Fޝ‚³‚ê - ‚é‚à‚̂łȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB - - ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) - - DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ðݒ肵‚Ü‚· - - ˆê•ûAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ªŽg—p‚µ‚Ä‚¢‚éƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA’Êí - ‚̓vƒƒZƒX‚̃R[ƒhƒy[ƒW‚©‚狂߂܂·Bƒ‰ƒbƒp[DLL ‚ªŽg—p‚·‚é 'iconv' - ƒ‰ƒCƒuƒ‰ƒŠ‚ÍAwindows ‚̃R[ƒhƒy[ƒW–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Æ‚µ‚ÄŽó•t - ‚¯‚邱‚Æ‚ª‚Å‚«‚é‚Ì‚ÅAƒR[ƒhƒy[ƒW–¼‚ð‚»‚Ì‚Ü‚Üƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ - ƒO–¼‚Æ‚µ‚ÄŽg—p‚µ‚Ü‚·B - - ‚µ‚©‚µAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA“Á’è‚Ì‘½Œ¾Œê‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚Å - ƒhƒƒCƒ“–¼‚ðƒGƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚Ä‚µ‚Ü‚¤‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎAIE‚Å‚Í - ƒhƒƒCƒ“–¼‚ðUTF-8 ‚Å•\‹L‚·‚邿‚¤‚ÉŽwަ‚·‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚ɂȂÁ‚Ä‚¢ - ‚Ü‚·BUTF-8 ‚É‚æ‚éƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ÍA’ñˆÄ‚³‚ê‚Ä‚¢‚鑽Œ¾Œê‰»•ûŽ®‚̂Р- ‚Ƃ‚ł·‚ªA‘½Œ¾Œê‰»‚³‚ꂽDNS ƒT[ƒo‚Í‘¼‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚µ‚©Žó•t‚¯ - ‚È‚¢‚©‚à’m‚ê‚Ü‚¹‚ñB - - ‚±‚̂悤‚È󋵂ɑΈ‚·‚邽‚ßAmDN ƒ‰ƒbƒp[‚ÍAƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ - ƒO‚Æ‚µ‚ăvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚àŽó•t‚¯‚邱‚Æ‚ª‚Å‚«‚邿‚¤‚É - ‚µ‚Ü‚·B‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€“Á—L‚̃[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚̓ŒƒWƒXƒg - ƒŠ‹LÚ‚³‚ê‚é‚à‚̂Ƃµ‚Ü‚·B - - mDN Wrapper —p‚̃vƒƒOƒ‰ƒ€“Á—L‚̃ŒƒWƒXƒgƒŠÝ’è‚Í - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg - HKEY_CURRENT_USER\SOFTWARE\JPNIC\MDN\PerProg - - ˆÈ‰º‚ÉAƒvƒƒOƒ‰ƒ€–¼iŽÀsƒ‚ƒWƒ…[ƒ‹ƒtƒ@ƒCƒ‹–¼j‚ðƒL[‚Æ‚µ‚Ä”z’u‚³‚ê - ‚Ü‚·B—Ⴆ‚ÎAInternet Explore ‚ÌꇂɂÍAŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚Ì - IEXPLORE‚ðƒL[‚Æ‚µ‚Ä - - HKEY_LOCAL_MACHINE\SOFTWARE\JPNIC\MDN\PerProg\IEXPLORE - - ˆÈ‰º‚É’u‚©‚ê‚Ü‚·Bƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚ÍAƒŒƒWƒXƒgƒŠ’l - Encoding iREG_SZj‚ÅŽwަ‚µ‚Ü‚·B‚±‚ê‚àlibmdn‚Å”Fޝ‚³‚ê‚é‚à‚̂łȂ¯‚ê - ‚΂Ȃè‚Ü‚¹‚ñB - - ƒŒƒWƒXƒgƒŠ Encoding (REG_SZ) - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€“Á—L‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼iƒfƒtƒHƒ‹ - ƒg‚̃Gƒ“ƒR[ƒfƒBƒ“ƒOˆÈŠO‚ð•K—v‚Æ‚·‚éê‡j‚ðŽw’肵‚Ü‚·B - -3.ƒZƒbƒgƒAƒbƒv‚ƃRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ - - mDN Wrapper ‚ÍAŠî–{ƒCƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚Æ‚µ‚ÄAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ƒfƒBƒŒ - ƒNƒgƒŠ‚ÅWINSOCK ‚ðƒ‰ƒbƒv‚µ‚Ü‚·B‚±‚ê‚ɇ‚킹‚ÄAƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ - ƒ€‚ƃRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Æ‚ð’ñ‹Ÿ‚µ‚Ü‚·B - - ’FƒVƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ł̃‰ƒbƒv‚à‰Â”\‚Å‚·‚ªA‚±‚ê‚͊댯‚ÈÝ’è‚Å‚· - ‚Ì‚ÅA•W€ƒCƒ“ƒXƒgƒŒ[ƒVƒ‡ƒ“‚Æ‚µ‚Ă͒ñ‹Ÿ‚µ‚Ü‚¹‚ñBƒVƒXƒeƒ€ƒfƒBƒŒ - ƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤ê‡‚É‚ÍAŽ©ŒÈÓ”C‚Å‚â‚Á‚Ä‚­‚¾‚³‚¢B - -3.1.ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€ - - mDN Wrapper ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚Í"setup.exe" ‚ðŽÀs‚µ‚Ü‚·BƒZƒbƒgƒAƒb - ƒvƒvƒƒOƒ‰ƒ€‚Í - - ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒXƒg[ƒ‹ - - ƒfƒBƒŒƒNƒgƒŠu\Program Files\JPNIC\mDN Wrapperv i ƒZƒbƒgƒAƒbƒv - Žž“_‚Å•ÏX‰Â”\jˆÈ‰º‚ÉAmDN Wrapper ‚ð\¬‚·‚éƒtƒ@ƒCƒ‹‚ðƒRƒs[‚µ - ‚Ü‚·B - - ƒŒƒWƒXƒgƒŠ‚ÌÝ’è - - HKEY_LOCAL_MACHINE\Software\JPNIC\MDN ˆÈ‰º‚É•K—v‚ȃŒƒWƒXƒgƒŠƒL[A - ƒŒƒWƒXƒgƒŠ’l‚ðì¬Aݒ肵‚Ü‚·B - - Encoding REG_SZ "RACE" - - DNS ƒT[ƒo‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Å‚·BƒfƒtƒHƒ‹ƒg’l‚Æ‚µ‚ÄAŒ» - Žž“_‚ł̗L—ÍŒó•â‚Å‚ ‚éRACEƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðݒ肵‚Ü‚·B‚±‚ê - ‚ÍAƒŒƒWƒXƒgƒŠƒGƒfƒBƒ^‚Å•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - - PerProg ƒL[ - - ƒvƒƒOƒ‰ƒ€–ˆ‚ÌÝ’è’l‚ðŠi”[‚·‚邽‚߂̃L[‚Å‚·B‚±‚̉º‚ÉAƒvƒ - ƒOƒ‰ƒ€‚ÌŽÀsƒ‚ƒWƒ…[ƒ‹–¼‚ðƒL[‚Æ‚µ‚ăvƒƒOƒ‰ƒ€ŒÂ•Ê‚Ìݒ肪‹L - ˜^‚³‚ê‚Ü‚·Bݒ肳‚ê‚éî•ñ‚͈ȉº‚Ì“ñ‚‚ł·B - - PerProg\\Where REG_DWORD •ÏŠ·ˆÊ’u - PerProg\>progname>\Encoding REG_SZ ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ - - ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼‚Í’ÊíƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚É‚æ‚Á - ‚Äݒ肳‚ê‚Ü‚·B•ÏŠ·ˆÊ’u‚ÍA•W€ƒCƒ“ƒXƒg[ƒ‹‚ł͕s—v‚Å‚·BƒV - ƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚Á‚½ê‡‚É‚ÍAƒŒƒWƒX - ƒgƒŠƒGƒfƒBƒ^‚Ŋ‹«‚ɇ‚킹‚ÄÝ’è‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B - - ƒAƒCƒRƒ“‚Ìì¬ - - ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚̃AƒCƒRƒ“‚ð쬂µAƒXƒ^[ƒgƒƒjƒ…[ - ‚É“o˜^‚µ‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ăRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ð‹N“® - ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - - ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAƒRƒ“ƒgƒ[ƒ‹ƒpƒlƒ‹‚ÌuƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì’Ç - ‰Á‚Æíœv‚ÅAumDN Wrapperv ‚ð‘I‘ð‚µ‚Äíœiu’ljÁ‚Æíœvƒ{ƒ^ƒ“j - ‚µ‚Ü‚·B - -3.2.ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€ - - ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚ÍAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð“Á’肵‚ă‰ƒbƒv - ‚µ‚½‚èAƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃‰ƒbƒv‚ð‰ðœ‚·‚邽‚߂̃c[ƒ‹‚Å‚·B - - ‹N“®‚·‚邯ˆÈ‰º‚̂悤‚ȉæ–Ê‚ª•\ަ‚³‚ê‚Ü‚·B - - „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ - „ @„ mDN Wrapper - Configuration „ Q„  „ ~„  - „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ - „  mDN Wrapper Configuration Program version X.X „  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  Wrapped Program „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¢„  Wrap.. „ „  - „ „  „ È„ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „  „¥„Ÿ„§„¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „  „  „ „  Unwrap.. „ „  - „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „  „  „ „ UnwrapAll.„ „  - „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „  „  „ „ RewrapAll.„ „  - „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „  „  „ „  Log.. „ „  - „ „  „  „ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „  „  „ „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „  „¥„Ÿ„§„ Advanced..„ „  - „ „  „ É„ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „ „¥„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„©„Ÿ„£„¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ „ q„  „ r„  „  Exit „ „  - „ „¤„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„£ „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ - - ƒŠƒXƒgƒ{ƒbƒNƒX‚É‚ÍA‚»‚ÌŽž“_‚щƒbƒv‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ª•\ަ‚³‚ê‚Ü - ‚·Bʼn‚ÉŽÀs‚µ‚½ê‡‚ɂ͋ó‚ɂȂÁ‚Ä‚¢‚Ü‚·B - - ƒvƒƒOƒ‰ƒ€‚ðƒ‰ƒbƒv‚·‚é‚É‚ÍA"wrap"ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·B"wrap"ƒ{ƒ^ƒ“‚ð‰Ÿ - ‚·‚ƈȉº‚̂悤‚ȃ_ƒCƒAƒƒO‚ª•\ަ‚³‚ê‚Ü‚·B - - „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ - „ @„ mDN Wrapper - Wrap Executable „ Q„  „ ~„  - „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  Program: „  „ „ Browse..„ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „  „¡„Ÿ„Ÿ„Ÿ„¢ „  - „ Encoding: „  „  ›Default ›UTF-8 „  - „  „¤„Ÿ„Ÿ„Ÿ„£ „  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  „  wrap „ „  cancel „ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ - - ʼn‚ÉAƒ‰ƒbƒv‚·‚éƒvƒƒOƒ‰ƒ€‚ÌŽÀsƒtƒ@ƒCƒ‹–¼‚ðݒ肵‚Ü‚·B’¼Ú“ü—Í‚· - ‚é‚©Aƒuƒ‰ƒEƒYƒ{ƒ^ƒ“‚Ńtƒ@ƒCƒ‹‚ð’T‚µ‚Ä‚­‚¾‚³‚¢BŽŸ‚É‚»‚̃vƒƒOƒ‰ƒ€‚Ì - ƒ[ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽw’肵‚Ü‚·B’Êí‚ÍuDefaultv ‚Å‚©‚Ü‚¢‚Ü‚¹‚ñB - ƒvƒƒOƒ‰ƒ€‚ª‘Û‰»ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚É]‚Á‚Ä‚¢‚éꇂɂ̂ÝuUTF-8v ‚ð - Žwަ‚µ‚Ü‚·BÅŒã‚Éuwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚¹‚ÎAƒvƒƒOƒ‰ƒ€‚ªAŽw’肳‚ꂽƒGƒ“ - ƒR[ƒfƒBƒ“ƒO‚щƒbƒv‚³‚ê‚Ü‚·Bƒ‰ƒbƒv‚³‚ꂽƒvƒƒOƒ‰ƒ€‚ÍAʼn‚̃EƒBƒ“ - ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒNƒX‚É”½‰f‚³‚ê‚Ü‚·B - - mDN Wrapper ‚ðƒo[ƒWƒ‡ƒ“ƒAƒbƒv‚µ‚½ê‡‚É‚ÍAƒ‰ƒbƒv—p‚Ì DLL ‚ðƒAƒbƒv - ƒf[ƒg‚·‚邽‚ß‚ÉAƒvƒƒOƒ‰ƒ€‚ðă‰ƒbƒv‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚±‚Ì‚½‚ß‚ÉA - Œ»Ýƒ‰ƒbƒv‚³‚ê‚Ä‚¢‚éƒvƒƒOƒ‰ƒ€‚ɑ΂µ‚ÄÄ“xƒ‰ƒbƒv‚ðs‚¤‚½‚ß‚Ìurewrap - allvƒ{ƒ^ƒ“‚ª—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B - - ƒvƒƒOƒ‰ƒ€‚ɑ΂·‚郉ƒbƒv‚ð‰ðœ‚·‚é‚É‚ÍAƒŠƒXƒgƒ{ƒbƒNƒX‚ʼn𜂷‚éƒvƒ - ƒOƒ‰ƒ€‚ð‘I‘ð‚µ‚ÄAuunwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·BˆÈ‰º‚ÌŠm”F—p‚̃_ƒCƒAƒ - ƒO‚ª•\ަ‚³‚ê‚Ü‚·‚Ì‚ÅAŠÔˆá‚¢‚ª‚È‚¯‚ê‚Îuunwrapvƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³ - ‚¢B - - „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ - „ @„ mDN Wrapper - Unwrap Executable „ Q„  „ ~„  - „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „ Program: „  „ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  „  Unwrap „ „  Cancel „ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ - - ƒ‰ƒbƒv‚ª‰ðœ‚³‚ê‚邯A‚»‚̃vƒƒOƒ‰ƒ€‚Íʼn‚̃EƒBƒ“ƒhƒE‚ÌƒŠƒXƒgƒ{ƒbƒN - ƒX‚©‚ç‚à휂³‚ê‚Ü‚·B - - ƒvƒƒOƒ‰ƒ€‚ɑ΂µ‚ÄŒ»Ýݒ肳‚ê‚Ä‚¢‚郉ƒbƒv‚ð‚·‚×‚Ä‰ðœ‚·‚邽‚ß‚Ì - uunwrap allvƒ{ƒ^ƒ“‚à—pˆÓ‚³‚ê‚Ä‚¢‚Ü‚·B - - ƒƒO‚ÌÝ’è‚ðs‚¤‚É‚ÍA"log" ƒ{ƒ^ƒ“‚ð‰Ÿ‚µ‚Ü‚·BŽŸ‚̂悤‚ȃ_ƒCƒAƒƒO‚ª - •\ަ‚³‚ê‚Ü‚·B - - „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ - „ @„ mDN Wrapper - Log Configuration „ Q„  „ ~„  - „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ - „  Log Level: ›None ›Fatal ›Error ›Warning ›Info ›Trace „  - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  Log File:„  „ „ Browse..„ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „  „¡„Ÿ„Ÿ„Ÿ„¢ „¡„Ÿ„Ÿ„Ÿ„¢ „  - „ Log Operation:„  View „  „ Delete„  „  - „  „¤„Ÿ„Ÿ„Ÿ„£ „¤„Ÿ„Ÿ„Ÿ„£ „  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  „  OK „ „  Cancel „ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ - - ƒƒOƒŒƒxƒ‹‚ÍŽŸ‚Ì’†‚©‚ç‘I‘ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B - None ƒƒO‚ðo—Í‚µ‚È‚¢ - Fatal ’v–½“IƒGƒ‰[‚̂݋L˜^‚·‚é - Error ’v–½“I‚łȂ¢ƒGƒ‰[‚à‹L˜^‚·‚é - Warning ŒxƒƒbƒZ[ƒW‚à‹L˜^‚·‚é - Info ‚»‚Ì‘¼‚Ìî•ñ‚à‹L˜^‚·‚é - Trace ƒgƒŒ[ƒXo—Í‚à‹L˜^‚·‚é - ‚±‚±‚É‚ ‚°‚½ƒƒOƒŒƒxƒ‹‚ÌÝ’è‚ÍAMDN ƒ‰ƒCƒuƒ‰ƒŠ (libmdn) ‚ªo—Í‚·‚é - ƒƒO‚ɑ΂µ‚Ă̂ݗLŒø‚Å‚·BmDN Wrapper Ž©g‚ªo—Í‚·‚郃O‚Í ON/OFF - ‚µ‚©‚Å‚«‚Ü‚¹‚ñBNone ‚ðŽw’è‚·‚邯 OFF ‚ÉA‚»‚êˆÈŠO‚̃Œƒxƒ‹‚ðŽw’è‚·‚邯 - ON ‚ɂȂè‚Ü‚·B - - ‚±‚̃_ƒCƒAƒƒO‚ð—p‚¢‚ÄAƒƒOƒtƒ@ƒCƒ‹‚̃pƒX–¼‚ðŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B - - ‚Ü‚½AƒƒOƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•\ަ‚³‚¹‚½‚èAƒƒOƒtƒ@ƒCƒ‹‚ð휂·‚邱‚Æ‚à - ‰Â”\‚Å‚·B - - ƒƒOƒŒƒxƒ‹‚⃃Oƒtƒ@ƒCƒ‹‚ÌÝ’è‚ÍAݒ莞‚É‚·‚łɓ®ì‚µ‚Ä‚¢‚éƒvƒƒZƒX - ‚ɂ͉e‹¿‚ð—^‚¦‚È‚¢‚±‚ƂɋC‚ð‚‚¯‚Ä‚­‚¾‚³‚¢B - - "advanced" ƒ{ƒ^ƒ“‚ð‰Ÿ‚·‚Æuadvanced configurationv—p‚̃_ƒCƒAƒƒO - ‚ª•\ަ‚³‚ê‚Ü‚·B‚±‚̃_ƒCƒAƒƒO‚Í㋉ƒ†[ƒU‚Ì‚½‚߂̂à‚Ì‚ÅA“K؂ȃf - ƒtƒHƒ‹ƒg‚ªÝ’肳‚ê‚Ä‚¢‚邽‚߂ɒÊ탆[ƒU‚ª•ÏX‚·‚é•K—v‚̂Ȃ¢‚悤‚È - Šî–{“I‚ȃpƒ‰ƒ[ƒ^‚ð•ÏX‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B - - „¡„Ÿ„¦„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¦„Ÿ„¦„Ÿ„¦„Ÿ„¢ - „ @„ mDN Wrapper - Advanced Configuration „ Q„  „ ~„  - „¥„Ÿ„¨„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¨„Ÿ„¨„Ÿ„¨„Ÿ„§ - „  MDN Wrapping Mode „  - „  ›Wrap both WINSOCK 1.1 and WINSOCK 2.0 „  - „  ›Wrap only WINSOCK 1.1 „  - „  ›Wrap only WINSOCK 2.0 „  - „  ›Wrap only WINSOCK 2.0 if it exists. „  - „  Otherwise wrap only WINSOCK 1.1 „  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  MDN Configuration „  - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  Log File:„  „ „ Browse..„ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „  „¡„Ÿ„Ÿ„Ÿ„¢ „  - „  „  Edit „  „  - „  „¤„Ÿ„Ÿ„Ÿ„£ „  - „¥„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„§ - „  „¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„¡„Ÿ„Ÿ„Ÿ„Ÿ„¢„  - „  „  OK „ „  Cancel „ „  - „  „¤„Ÿ„Ÿ„Ÿ„Ÿ„£„¤„Ÿ„Ÿ„Ÿ„Ÿ„£„  - „¤„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„Ÿ„£ - - ‚±‚̃_ƒCƒAƒƒO‚ðŽg—p‚µ‚ÄAŽŸ‚Ì3Ží—Þ‚ÌÝ’è‚ðs‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B - - Wrapping Mode - ƒ‰ƒbƒv•û–@‚ðݒ肵‚Ü‚·B’Êí‚̓fƒtƒHƒ‹ƒg‚Åݒ肳‚ê‚Ä‚¢‚逖ڂð - ‘I‘ð‚µ‚Ä‚¨‚¯‚΂悢‚Í‚¸‚Å‚·‚ªA–â‘肪‹N‚Á‚½‚Æ‚«‚ɂ͕ʂ̀–Ú‚É‚· - ‚邯“®‚­‚悤‚ɂȂ邩‚à‚µ‚ê‚Ü‚¹‚ñB - - MDN Configuration - ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹–¼‚ðŽw’肵‚Ü‚·B‚Ü‚½ "Edit" ƒ{ƒ^ - ƒ“‚ð‰Ÿ‚·‚±‚Ƃɂæ‚èAƒtƒ@ƒCƒ‹‚Ì“à—e‚ð•ÒW‚·‚邱‚Æ‚à‰Â”\‚Å‚·B - -4. §ŒÀŽ–€ - -4.1. DLL ƒo[ƒWƒ‡ƒ“ - - ƒ‰ƒbƒp[DLL ‚ÍAŒ³‚ÌWINSOCK ‚ÌDLL ‚̃o[ƒWƒ‡ƒ“‚É‹­‚­ˆË‘¶‚µ‚Ü‚·B‚±‚ê - ‚ÍA”ñŒöŠJ‚̃Gƒ“ƒgƒŠ‚àŠÜ‚߂Ă·‚ׂẴGƒ“ƒgƒŠ‚ð’ñ‹Ÿ‚·‚é•K—v‚ª‚ ‚邽‚ß - ‚Å‚·B‚±‚Ì‚½‚ßWINSOCK DLL ‚̃o[ƒWƒ‡ƒ“‚ª•Ï‚í‚邯AmDN Wrapper ‚ª“®ì - ‚µ‚È‚­‚È‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B - - ¡‰ñ쬂³‚ꂽmDN Wrapper ‚ÍA - - WinNT4.0 SP6a (WINSOCK 1.1 + 2.0) - Win98 (WINSOCK 1.1 + 2.0) - Win95 OSR2 (WINSOCK 1.1) - - ‚Å“®ì‚ðŠm”F‚µ‚Ä‚¢‚Ü‚·B‚½‚¾A«—ˆ‚ɂ킽‚Á‚Ä“®ì‚·‚é•ÛØ‚Í‚ ‚è‚Ü‚¹‚ñB - -4.2. DNS, WINS, LMHOSTS - - Windows ‚Å‚ÍADNS ‚¾‚¯‚ł͂Ȃ­AWINS‚âLMHOSTS ‚É‚æ‚Á‚Ä‚àƒhƒƒCƒ“–¼A - ƒzƒXƒg–¼‚Ì‰ðŒˆ‚ªs‚È‚í‚ê‚Ü‚·BmDN Wrapper ‚ðŽg‚Á‚½ê‡‚É‚ÍAƒhƒƒCƒ“ - –¼‚̕ϊ·‚ªA‚±‚ê‚ç‚Ì•ûŽ®‚ւ̃fƒBƒXƒpƒbƒ`‚ðs‚È‚¤êŠ‚æ‚è‚àãˆÊ‘w‚Ås - ‚È‚í‚ê‚é‚Ì‚ÅA‚±‚ê‚ç‚Ì‚·‚ׂĂ̕ûŽ®‚ɂ‚¢‚ÄAƒhƒƒCƒ“–¼AƒzƒXƒg–¼‚Ì•Ï - Š·‚ªs‚È‚í‚ê‚邱‚ƂɂȂè‚Ü‚·B‚±‚Ì‚½‚ßAWindows ‚ªAWINS‚âLMHOSTS ‚ð - Žg‚Á‚Ä‚¢‚éꇂɂÍA—\Šú‚µ‚È‚¢–â‘肪”­¶‚·‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B‚±‚ê‚É - ‚‚¢‚Ä‚ÍAmDN Wrapper ‚ðŽg‚¤ê‡‚É‚ÍA–¼‘O‰ðŒˆ‚ÉDNS ‚¾‚¯‚ðŽg—p‚·‚邱 - ‚Æ‚ð‚¨Š©‚ß‚µ‚Ü‚·B - -3.3. ƒhƒƒCƒ“–¼ˆÈŠO‚Ì–¼‘O‚Ì‰ðŒˆ - - WINSOCK 2.0 ‚Ì–¼‘O‰ðŒˆAPI - - WSALookupServiceBeginA - WSALookupServiceNextA - WSALookupServiceEnd - - ‚ÍAƒhƒƒCƒ“–¼ˆÈŠO‚Å‚àŽg—p‚Å‚«‚éA”Ä—p‚Ì–¼‘O‰ðŒˆ—p‚ÌAPI ‚Æ‚µ‚Ä’è‹`‚³ - ‚ê‚Ä‚¢‚Ü‚·BŒ»Žž“_‚Å‚ÍA‚±‚ê‚ç‚Í‚à‚Á‚Ï‚çƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚ÅŽg—p‚³‚ê‚Ä - ‚¢‚Ü‚·‚ªA‘¼‚Ì–¼‘O(—Ⴆ‚΃T[ƒrƒX–¼)‚Ì‰ðŒˆ‚É‚àŽg—p‚Å‚«‚邱‚ƂɂȂÁ‚Ä - ‚¢‚Ü‚·B - - mDN Wrapper ‚ÍA–¼‘O‚Ì‘ÎÛ‚Ì”@‰½‚É‚©‚©‚í‚炸A–¼‘O‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO - ‚ð•ÏŠ·‚µ‚Ä‚µ‚Ü‚¤‚Ì‚ÅA‚±‚ê‚ç‚ÌAPI ‚ªAƒhƒƒCƒ“–¼ˆÈŠO‚Ì‰ðŒˆ‚ÉŽg‚í‚ê‚Ä - ‚¢‚éꇂɂÍA–â‘è‚ðˆø‚«‹N‚±‚·‰Â”\«‚ª‚ ‚è‚Ü‚·B - -4.4. –¼‘O‰ðŒˆAPI ‚ðŽg‚í‚È‚¢ƒvƒƒOƒ‰ƒ€ - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍAƒhƒƒCƒ“–¼‚Ì‰ðŒˆ‚É‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È - ‚¢‚à‚Ì‚à‚ ‚è‚Ü‚·B—Ⴆ‚ÎA'nslookup'‚ÍA‚±‚ê‚ç‚ÌAPI ‚ðŽg—p‚µ‚È‚¢‚ÅA - ’¼ÚDNS ƒT[ƒo‚Æ’ÊM‚µ‚Ä‚µ‚Ü‚¢‚Ü‚·B‚±‚̂悤‚ȃAƒvƒŠƒP[ƒVƒ‡ƒ“‚ɂ‚¢ - ‚Ä‚ÍAmDN Wrapper ‚Í–ð‚É—§‚¿‚Ü‚¹‚ñB - -4.5. “Á’èWINSOCK DLL ‚ɃoƒCƒ“ƒh‚³‚ꂽƒAƒvƒŠƒP[ƒVƒ‡ƒ“ - - ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚É‚æ‚Á‚Ä‚ÍA•W€‚ÌDLL ƒT[ƒ`ƒpƒX‚É]‚í‚È‚¢‚ÅA“Á’è‚Ì - ƒpƒX‚ÌDLL ‚ɃoƒCƒ“ƒh‚³‚ê‚Ä‚¢‚é‚à‚Ì‚ª‚ ‚è‚Ü‚·B‚æ‚­Žg‚í‚ê‚éƒvƒƒOƒ‰ƒ€ - ‚Ì’†‚Å‚ÍANetscape Communicator ‚ª‚»‚¤‚È‚Á‚Ä‚¢‚Ü‚·B‚±‚̂悤‚ȃvƒƒO - ƒ‰ƒ€‚ɂ‚¢‚Ä‚ÍA•W€‚̃Cƒ“ƒXƒg[ƒ‹^ƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“‚ł̓‰ƒbƒv - ‚·‚邱‚Ƃ͂ł«‚Ü‚¹‚ñB - - ‚±‚̂悤‚ȃvƒƒOƒ‰ƒ€‚ɂ‚¢‚ÄA‚Ç‚¤‚µ‚Ä‚àƒ‰ƒbƒv‚·‚é•K—v‚ª‚ ‚é‚È‚çAƒV - ƒXƒeƒ€ƒfƒBƒŒƒNƒgƒŠ‚ւ̃Cƒ“ƒXƒg[ƒ‹‚ðs‚È‚¤‚±‚Æ‚ª‚Å‚«‚Ü‚·B‚½‚¾‚µA‚± - ‚̃Cƒ“ƒXƒg[ƒ‹‚Í‘å•ϊ댯‚ÅAꇂɂæ‚Á‚Ă̓VƒXƒeƒ€‚ðÄ‹N“®•s”\‚É‚µ‚Ä - ‚µ‚Ü‚¤‰Â”\«‚à‚ ‚è‚Ü‚·B - -4.6. ‘ã‘ÖŽè’i‚Æ‚µ‚Ä‚Ì'mdnsproxy' - - ‚±‚ê‚ç‚̧ŒÀŽ–€‚ª–â‘è‚ɂȂéꇂɂÍA‘ã‘ÖŽè’i‚Æ‚µ‚Ä'mdnsproxy'‚ðŽg‚¤ - ‚±‚Æ‚à‚Å‚«‚Ü‚·B‚±‚ê‚ÍADNS ƒT[ƒo‚Ƃ̃gƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“‚𒆌p‚·‚é‚Ì‚ÅA - ã‚Å–â‘è‚ɂȂÁ‚½‚悤‚È‚±‚Æ‚ð‰ñ”ð‚·‚é‚±‚Æ‚ª‚Å‚«‚Ü‚·B - - ‚½‚¾‚µA'mdnsproxy'‚ÍAƒ‰ƒbƒp[‚æ‚è‚à•¡ŽG‚Èݒ肪•K—v‚Å‚·‚µA‚Ü‚½AŒÄ - ‚ÑŒ³‚̃vƒƒOƒ‰ƒ€‚ð“Á’è‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñ‚Ì‚ÅAƒvƒƒOƒ‰ƒ€ŒÅ—L‚̃[ - ƒJƒ‹ƒGƒ“ƒR[ƒfƒBƒ“ƒO‚ðŽæ‚èˆµ‚¤‚±‚Ƃ͂ł«‚Ü‚¹‚ñB‚µ‚©‚µAã‹L‚̧ŒÀŽ– - €‚ª–â‘è‚É‚È‚é‚æ‚¤‚ȃP[ƒX‚Å‚ÍAƒ‰ƒbƒp[‚Ì‘ã‚í‚è‚ÉŽg—p‚·‚邯‚¢‚¢‚©‚à - ‚µ‚ê‚Ü‚¹‚ñB - -5. ƒŒƒWƒXƒgƒŠÝ’è - ‚Ü‚Æ‚ß - -5.1. ƒŒƒWƒXƒgƒŠ‚Ì—Dæ‡ˆÊ - - mDN Wrapper ‚ÌÝ’èî•ñ‚ÍAHKEY_LOCAL_MACHINEAHKEY_CURRENT_USER‚Ì - - Software\JPNIC\MDN - - ˆÈ‰º‚ÉŠi”[‚³‚ê‚Ü‚·BmDN Wrapper‚Íʼn‚ÉHKEY_LOCAL_MACHINE‚ÌÝ’è‚ð“Ç - ‚Ýž‚ÝAHKEY_CURRENT_USER‘¤‚É‚àݒ肪‚ ‚ê‚ÎA‚±‚ê‚Åã‘‚«‚µ‚Ü‚·B’Ê - í‚ÍAHKEY_LOCAL_MACHINE ‘¤‚¾‚¯‚ðݒ肵‚Ü‚·Bƒ†[ƒUŒÂ•ʂɈقȂÁ‚½Ý - ’è‚ðŽg‚¢‚½‚¢ê‡‚Ì‚ÝAHKEY_CURRENT_USER‚ðÝ’è‚·‚邿‚¤‚É‚µ‚Ä‚­‚¾‚³‚¢B - - ‚È‚¨AƒRƒ“ƒtƒBƒMƒ…ƒŒ[ƒVƒ‡ƒ“ƒvƒƒOƒ‰ƒ€‚Í HKEY_LOCAL_MACHINE ‚ÌÝ’è - ‚¾‚¯‚ð“ǂݑ‚«‚·‚邿‚¤‚ɂȂÁ‚Ä‚¢‚Ü‚·B - -4.2. ƒŒƒWƒXƒgƒŠƒL[ - - ‘S‘̂̋¤’Ê‚ÌÝ’è‚ÆAƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è‚Æ‚ª‚ ‚è‚Ü‚·B - -Q‹¤’Ê’è‹` - - Software\\JPNIC\\MDN\\Where •ÏŠ·ˆÊ’u - 0:WINSOCK1.1 WINSOCK2.0‚Ì—¼•û‚Å - 1:WINSOCK2.0 ‚ª‚ ‚ê‚΂»‚¿‚ç‚Å - 2:WINSOCK1.1 ‚¾‚¯‚Å - 3:WINSOCK2.0 ‚¾‚¯‚Å - Software\\JPNIC\\MDN\\Encoding DNS‘¤ƒGƒ“ƒR[ƒfƒBƒ“ƒO–¼ - Software\\JPNIC\\MDN\\Normalize ³‹K‰»‚Ì•ûŽ® - Software\\JPNIC\\MDN\\LogLevel ƒƒOƒŒƒxƒ‹ - Software\\JPNIC\\MDN\\LogFile ƒƒOƒtƒ@ƒCƒ‹ - -QƒvƒƒOƒ‰ƒ€ŒÂ•ÊÝ’è - - •ÏŠ·ˆÊ’uA‚¨‚æ‚уvƒƒOƒ‰ƒ€‘¤‚̃Gƒ“ƒR[ƒfƒBƒ“ƒO‚̓vƒƒOƒ‰ƒ€–ˆ‚É“Á’è‚· - ‚邱‚Æ‚à‚Å‚«‚Ü‚·B‚±‚ê‚ç‚ÍAˆÈ‰º‚̃L[ƒnƒCƒu‚̉º‚ÉAƒvƒƒOƒ‰ƒ€–¼‚ðƒL[ - ‚Æ‚·‚é’l‚Åݒ肵‚Ü‚·B - - Software\\JPNIC\\MDN\\PerProg\\\\Where - Software\\JPNIC\\MDN\\PerProg\\\\Encoding - - Žw’肳‚ê‚Ä‚¢‚È‚¢ê‡‚É‚ÍA - - Where 0 1.1A2.0 ‚Ì—¼•û‚ŕϊ· - Encoding ƒvƒƒZƒX‚̃R[ƒhƒy[ƒW - - ‚Ƃ݂Ȃµ‚Ü‚·B - - diff --git a/contrib/idn/mdnkit/wsock/common/checkdll.c b/contrib/idn/mdnkit/wsock/common/checkdll.c deleted file mode 100644 index 5b3fd74a15..0000000000 --- a/contrib/idn/mdnkit/wsock/common/checkdll.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * checkdll.c - checks DLL existence - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include - -#include "jpnicmdn.h" - -/* - * Check if DLL exist - */ - -BOOL mdnCheckDll(PUCHAR name) -{ - HINSTANCE hdll = NULL ; - - if ((hdll = LoadLibrary(name)) == NULL) { - return FALSE ; - } - FreeLibrary(hdll) ; - return TRUE ; -} diff --git a/contrib/idn/mdnkit/wsock/common/convert.c b/contrib/idn/mdnkit/wsock/common/convert.c deleted file mode 100644 index 257e7a7bf9..0000000000 --- a/contrib/idn/mdnkit/wsock/common/convert.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * convert.c - convert domain name - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include - -#include "jpnicmdn.h" - -/* - * prepare/dispose conversion context - */ - -void -mdnConvDone(CONVPTR converter) -{ - if (converter == NULL) { - return; - } - mdn_resconf_destroy(converter->conf); - free(converter); -} - -CONVPTR -mdnConvInit(void) -{ - CONVPTR conv; - UCHAR confpath[256]; - UCHAR encoding[100]; - mdn_result_t r; - - mdnLogPrintf(mdn_log_level_info, "libmdn version: %s\n", - mdn_version_getstring()); - - if ((conv = malloc(sizeof(CONVREC))) == NULL) { - mdnPrintf("mdnConvInit: allocation failed\n"); - return NULL; - } - conv->conf = NULL; - - /* - * Initialize. - */ - if ((r = mdn_resconf_initialize()) != mdn_success) { - mdnPrintf("mdnConvInit: cannot initialize mdn library: %s\n", - mdn_result_tostring(r)); - mdnConvDone(conv); - return NULL; - } - if ((r = mdn_resconf_create(&conv->conf)) != mdn_success) { - mdnPrintf("mdnConvInit: cannot create configuration context: %s\n", - mdn_result_tostring(r)); - mdnConvDone(conv); - return NULL; - } - - /* - * load configuration file. - */ - if (mdnGetConfFile(confpath) != TRUE) { - mdnPrintf("mdnConvInit: cannot find configuration file path\n"); - mdnConvDone(conv); - return NULL; - } - if ((r = mdn_resconf_loadfile(conv->conf, confpath)) != mdn_success) { - mdnPrintf("mdnConvInit: cannot read configuration file %s: %s\n", - confpath, mdn_result_tostring(r)); - mdnConvDone(conv); - return NULL; - } - - /* - * Set local codeset. - */ - if (mdnGetPrgEncoding(encoding) == TRUE) { - mdnPrintf("Encoding PRG <%s>\n", encoding); - r = mdn_resconf_setlocalconvertername(conv->conf, encoding, - MDN_CONVERTER_RTCHECK); - if (r != mdn_success) { - mdnPrintf("mdnConvInit: cannot open converter for %s: %s\n", - encoding, mdn_result_tostring(r)); - mdnConvDone(conv); - return NULL; - } - } - - return conv; -} - -/* - * mdnConvReq - convert domain name in a DNS request - * - * convert local encoding to DNS encoding - */ - -BOOL -mdnConvReq(CONVPTR converter, const char FAR *from, char FAR *to, size_t tolen) -{ - if (converter == NULL) { - if (strlen(from) >= tolen) - return FALSE; - strcpy(to, from); - return TRUE; - } - - if (mdn_res_nameconv(converter->conf, "ldMNI", - from, to, tolen) == mdn_success) - return TRUE; - else - return FALSE; -} - -/* - * mdnConvRsp - convert domain name in a DNS response - * - * convert DNS encoding to local encoding - */ - -BOOL -mdnConvRsp(CONVPTR converter, const char FAR *from, char FAR *to, size_t tolen) -{ - if (converter == NULL) { - if (strlen(from) >= tolen) - return FALSE; - strcpy(to, from); - return TRUE; - } - - if (mdn_res_nameconv(converter->conf, "iL", - from, to, tolen) == mdn_success) - return TRUE; - else - return FALSE; -} - diff --git a/contrib/idn/mdnkit/wsock/common/dllmain.c b/contrib/idn/mdnkit/wsock/common/dllmain.c deleted file mode 100644 index d888e00a36..0000000000 --- a/contrib/idn/mdnkit/wsock/common/dllmain.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * dllmain.c - entry for DLL - */ - -#include -#include -#include -#include -#include - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include "jpnicmdn.h" - -/* - * DLL Entry - */ - -BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, LPVOID *resv) -{ - return TRUE ; -} - diff --git a/contrib/idn/mdnkit/wsock/common/dump.c b/contrib/idn/mdnkit/wsock/common/dump.c deleted file mode 100644 index 7ef92273b2..0000000000 --- a/contrib/idn/mdnkit/wsock/common/dump.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * dump.c - dump data - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include - -#include "jpnicmdn.h" - -PUCHAR dumpAddr(const char FAR *addr, int len, PUCHAR buff) -{ - int i ; - PUCHAR p ; - - for (i = 0, p = buff ; i < len ; i++, p += strlen(p)) { - sprintf(p, "%d", (addr[i] & 0xff)) ; - if (i + 1 < len) { - strcat(p, ".") ; - } - } - return buff ; -} - -PUCHAR dumpHost(struct hostent FAR *hp, PUCHAR buff) -{ - int i ; - PUCHAR p, a ; - - sprintf(buff, "%s ", hp->h_name) ; - p = buff + strlen(buff) ; - - for (i = 0, a = hp->h_addr_list[0] ; i < hp->h_length ; i++, p += strlen(p)) { - sprintf(p, "%d", (a[i] & 0xff)) ; - if (i + 1 < hp->h_length) { - strcat(p, ".") ; - } - } - return buff ; -} - -PUCHAR dumpName(PUCHAR name, PUCHAR buff) -{ - PUCHAR sp, dp ; - - for (sp = name, dp = buff ; *sp != '\0' ; sp++) { - if (*sp >= 0x21 && *sp <= 0x7e) { - *dp++ = *sp ; - } else { - *dp++ = '\\' ; - *dp++ = 'x' ; - sprintf(dp, "%02x", (*sp & 0xff)) ; - dp += 2 ; - } - } - *dp = '\0' ; - - return buff ; -} - diff --git a/contrib/idn/mdnkit/wsock/common/encoding.c b/contrib/idn/mdnkit/wsock/common/encoding.c deleted file mode 100644 index fef6ea6b8e..0000000000 --- a/contrib/idn/mdnkit/wsock/common/encoding.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * encoding.c - get DNS/Local encodings - * - * Software\\JPNIC\\MDN\\Where - * \\Encoding - * \\ConfFile - * \\LogFile - * \\PerProg\\\\Where - * \\PerProg\\\\Encoding - */ - -/* - * Copyright (c) 2000,2001 Japan Network Information Center. - * All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include - -#include "jpnicmdn.h" - -#define MDN_GLOBAL 1 -#define MDN_PERPROG 2 - -/* - * Registry of Encodings - */ - -static CHAR MDNKEY_WRAPPER[] = "Software\\JPNIC\\MDN"; -static CHAR MDNKEY_PERPROG[] = "Software\\JPNIC\\MDN\\PerProg"; -static CHAR MDNVAL_WHERE[] = "Where"; -static CHAR MDNVAL_ENCODE[] = "Encoding"; -static CHAR MDNVAL_CONFFILE[]= "ConfFile"; -static CHAR MDNVAL_LOGLVL[] = "LogLevel"; -static CHAR MDNVAL_LOGFILE[] = "LogFile"; - -static int GetRegistry(HKEY top, const char *key, const char *name, - DWORD type, void *param, DWORD length); -static char *GetPerProgKey(char *buf); -static int GetIntFromRegistry(const char *name, int defvalue, int where); -static BOOL GetStringFromRegistry(const char *name, PUCHAR result, - int where); - -static int -GetRegistry(HKEY top, const char *key, const char *name, DWORD type, - void *param, DWORD length) -{ - LONG stat; - HKEY hk; - DWORD realtype; - - stat = RegOpenKeyEx(top, key, 0, KEY_READ, &hk); - if (stat != ERROR_SUCCESS) { - return 0; - } - - stat = RegQueryValueEx(hk, (LPCTSTR)name, NULL, - &realtype, (LPBYTE)param, &length); - - RegCloseKey(hk); - - if (stat != ERROR_SUCCESS || realtype != type) - return 0; - - return 1; -} - -static char * -GetPerProgKey(char *buf) -{ - UCHAR exename[256]; - UCHAR prgname[256]; - PUCHAR p, last; - - GetModuleFileName(NULL, exename, 256); - - for (p = exename, last = NULL; *p != '\0'; p++) { - if (*p == '/' || *p == '\\') { - last = p; - } - } - if (last == NULL) { - strcpy(prgname, exename); - } else { - strcpy(prgname, last + 1); - } - - if ((p = strrchr(prgname, '.')) != NULL) { - *p = '\0'; - } - - sprintf(buf, "%s\\%s", MDNKEY_PERPROG, prgname); - return buf; -} - -static int -GetIntFromRegistry(const char *name, int defvalue, int where) -{ - DWORD param; - - if (where & MDN_PERPROG) { - /* - * First, try program specific setting. - */ - UCHAR keyname[256]; - - (void)GetPerProgKey(keyname); - - /* - * Try HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. - */ - if (GetRegistry(HKEY_CURRENT_USER, keyname, name, - REG_DWORD, ¶m, sizeof(param))) { - return (int)param; - } - - if (GetRegistry(HKEY_LOCAL_MACHINE, keyname, name, - REG_DWORD, ¶m, sizeof(param))) { - return (int)param; - } - } - - if (where & MDN_GLOBAL) { - /* - * Try global setting. - */ - if (GetRegistry(HKEY_CURRENT_USER, MDNKEY_WRAPPER, name, - REG_DWORD, ¶m, sizeof(param))) { - return (int)param; - } - if (GetRegistry(HKEY_LOCAL_MACHINE, MDNKEY_WRAPPER, name, - REG_DWORD, ¶m, sizeof(param))) { - return (int)param; - } - } - - /* - * Not found. Return default value. - */ - return defvalue; -} - -static BOOL -GetStringFromRegistry(const char *name, PUCHAR result, int where) -{ - UCHAR param[256]; - - if (where & MDN_PERPROG) { - /* - * First, try program specific setting. - */ - UCHAR keyname[256]; - - (void)GetPerProgKey(keyname); - - /* - * Try HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. - */ - if (GetRegistry(HKEY_CURRENT_USER, keyname, name, - REG_SZ, param, sizeof(param))) { - strcpy(result, param); - return TRUE; - } - if (GetRegistry(HKEY_LOCAL_MACHINE, keyname, name, - REG_SZ, param, sizeof(param))) { - strcpy(result, param); - return TRUE; - } - } - - if (where & MDN_GLOBAL) { - /* - * Try global setting. - */ - if (GetRegistry(HKEY_CURRENT_USER, MDNKEY_WRAPPER, name, - REG_SZ, param, sizeof(param))) { - strcpy(result, param); - return TRUE; - } - if (GetRegistry(HKEY_LOCAL_MACHINE, MDNKEY_WRAPPER, name, - REG_SZ, param, sizeof(param))) { - strcpy(result, param); - return TRUE; - } - } - - /* - * Not found. - */ - return FALSE; -} - -/* - * mdnEncodeWhere - which module should convert domain name - */ - -int mdnEncodeWhere(void) -{ - int v; - v = GetIntFromRegistry(MDNVAL_WHERE, MDN_ENCODE_ALWAYS, - MDN_GLOBAL|MDN_PERPROG); - mdnLogPrintf(mdn_log_level_trace, "mdnEncodeWhere: %d\n", v); - return v; -} - -/* - * mdnGetConfFile - refer to Configuration file - */ - -BOOL mdnGetConfFile(PUCHAR file) -{ - BOOL v; - - v = GetStringFromRegistry(MDNVAL_CONFFILE, file, MDN_GLOBAL); - if (v == TRUE) { - mdnLogPrintf(mdn_log_level_trace, "mdnGetConfFile: %s\n", file); - } else { - mdnLogPrintf(mdn_log_level_trace, "mdnGetConfFile: \n"); - } - return v; -} - -/* - * mdnGetLogFile - refer to log file - */ - -BOOL mdnGetLogFile(PUCHAR file) -{ - BOOL v; - - v = GetStringFromRegistry(MDNVAL_LOGFILE, file, MDN_GLOBAL); - if (v == TRUE) { - mdnLogPrintf(mdn_log_level_trace, "mdnGetLogFile: %s\n", file); - } else { - mdnLogPrintf(mdn_log_level_trace, "mdnGetLogFile: \n"); - } - return v; -} - -/* - * mdnGetPrgEncoding - refer to Program's Local Encoding - * - * use program name as registry key - */ - -BOOL mdnGetPrgEncoding(PUCHAR enc) -{ - if (GetStringFromRegistry(MDNVAL_ENCODE, enc, MDN_PERPROG) != TRUE || - enc[0] == '\0') { - sprintf(enc, "CP%d", GetACP()); - } - mdnLogPrintf(mdn_log_level_trace, "mdnGetPrgEncoding: %s\n", enc); - return TRUE; -} - -/* - * mdnGetLogLevel - */ - -int mdnGetLogLevel(void) -{ - int v; - - v = GetIntFromRegistry(MDNVAL_LOGLVL, 0, MDN_GLOBAL|MDN_PERPROG); - mdnLogPrintf(mdn_log_level_trace, "mdnGetLogLevel: %d\n", v); - return v; -} - diff --git a/contrib/idn/mdnkit/wsock/common/hook.c b/contrib/idn/mdnkit/wsock/common/hook.c deleted file mode 100644 index 80f6b3fcf3..0000000000 --- a/contrib/idn/mdnkit/wsock/common/hook.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * hook.c - Hooking Asynchronous Completion - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include - -#include "jpnicmdn.h" - -/* - * Hook Managements - */ - -static HHOOK hookHandle = NULL ; - -typedef struct _HOOK *HOOKPTR ; - -typedef struct _HOOK { - HOOKPTR prev ; - HOOKPTR next ; - CONVPTR pCnv ; - HWND hWnd ; - u_int wMsg ; - char FAR *pBuf ; -} HOOKREC ; - -static HOOKREC hookList = { 0 } ; - -static void hookListInit(void) -{ - if (hookList.prev == NULL || hookList.next == NULL) { - hookList.prev = &hookList ; - hookList.next = &hookList ; - } -} - -static HOOKPTR hookListSearch(HWND hWnd, u_int wMsg) -{ - HOOKPTR hp ; - - for (hp = hookList.next ; hp != &hookList ; hp = hp->next) { - if (hp->hWnd == hWnd && hp->wMsg == wMsg) { - return hp ; - } - } - return NULL ; -} - -static BOOL hookListAppend(HWND hWnd, u_int wMsg, char FAR *buf, CONVPTR pConv) -{ - HOOKPTR hp, prev, next ; - - if ((hp = (HOOKPTR) malloc(sizeof(HOOKREC))) == NULL) { - mdnPrintf("cannot create hook record\n") ; - return FALSE ; - } - memset(hp, 0, sizeof(HOOKREC)) ; - - hp->pCnv = pConv ; - hp->hWnd = hWnd ; - hp->wMsg = wMsg ; - hp->pBuf = buf ; - - prev = hookList.prev ; - next = prev->next ; - prev->next = hp ; - next->prev = hp ; - hp->next = next ; - hp->prev = prev ; - - return TRUE ; -} - -static void hookListDelete(HOOKPTR hp) -{ - HOOKPTR prev, next ; - - prev = hp->prev ; - next = hp->next ; - prev->next = next ; - next->prev = prev ; - - free(hp) ; -} - -static void hookListDone(void) -{ - HOOKPTR hp ; - - while ((hp = hookList.next) != &hookList) { - hookListDelete(hp) ; - } -} - -/* - * mdnHookInit - initialize Hook Management - */ - -void mdnHookInit(void) -{ - hookListInit() ; -} - -/* - * mdnHookDone - finalize Hook Management - */ - -void mdnHookDone(void) -{ - if (hookHandle != NULL) { - UnhookWindowsHookEx(hookHandle) ; - hookHandle = NULL ; - } - hookListDone() ; -} - -/* - * hookProc - hookprocedure, used as WH_GETMESSAGE hook - */ - -LRESULT CALLBACK hookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - MSG *pMsg ; - HOOKPTR pHook ; - struct hostent *pHost ; - char nbuff[256] ; - char hbuff[256] ; - - if (nCode < 0) { - return CallNextHookEx(hookHandle, nCode, wParam, lParam) ; - } - if (nCode != HC_ACTION) { - return 0 ; - } - if ((pMsg = (MSG *) lParam) == NULL) { - return 0 ; - } - if ((pHook = hookListSearch(pMsg->hwnd, pMsg->message)) == NULL) { - return 0 ; - } - - /* - * Convert the Host Name - */ - - pHost = (struct hostent *) pHook->pBuf ; - - mdnPrintf("AsyncComplete Resulting <%s>\n", dumpName(pHost->h_name, hbuff)) ; - mdnConvRsp(pHook->pCnv, pHost->h_name, nbuff, sizeof(nbuff)) ; - mdnPrintf("AsyncComplete Converted <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(pHost->h_name, nbuff) ; - - /* - * Delete target - */ - - hookListDelete(pHook) ; - - return 0 ; -} - -/* - * mdnHook - hook async. completion message - */ - -BOOL mdnHook(HWND hWnd, u_int wMsg, char FAR *buf, CONVPTR pConv) -{ - if (hookHandle == NULL) { - hookHandle = SetWindowsHookEx(WH_GETMESSAGE, hookProc, NULL, GetCurrentThreadId()) ; - } - if (hookHandle == NULL) { - mdnPrintf("mdnHook: cannot set hook\n") ; - return FALSE ; - } - if (hookListAppend(hWnd, wMsg, buf, pConv) != TRUE) { - return FALSE ; - } - return TRUE ; -} diff --git a/contrib/idn/mdnkit/wsock/common/jpnicmdn.def b/contrib/idn/mdnkit/wsock/common/jpnicmdn.def deleted file mode 100644 index e824d6fb25..0000000000 --- a/contrib/idn/mdnkit/wsock/common/jpnicmdn.def +++ /dev/null @@ -1,21 +0,0 @@ -; -; EXPORTS in JPNICMDN -; -LIBRARY jpnicmdn -DESCRIPTION "JPNICMDN - mMDNS Wrapper for WinSock by JPNIC" -EXPORTS - mdnPrintf @1 - mdnEncodeWhere @2 - mdnCheckDll @6 - mdnLogInit @7 - mdnLogPrintf @8 - mdnConvInit @10 - mdnConvDone @11 - mdnConvReq @12 - mdnConvRsp @13 - mdnHookInit @15 - mdnHookDone @16 - mdnHook @17 - dumpAddr @20 - dumpHost @21 - dumpName @22 diff --git a/contrib/idn/mdnkit/wsock/common/jpnicmdn.h b/contrib/idn/mdnkit/wsock/common/jpnicmdn.h deleted file mode 100644 index fe78192170..0000000000 --- a/contrib/idn/mdnkit/wsock/common/jpnicmdn.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * jpnicmdn.h - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef _JPNICMDN_H -#define _JPNICMDN_H - -extern void mdnPrintf(PUCHAR fmt, ...); -extern void mdnLogPrintf(int level, PUCHAR fmt, ...); -extern void mdnLogProc(int level, const char *msg); -extern void mdnLogInit(void); - -extern PUCHAR dumpAddr(const char FAR *addr, int len, PUCHAR buff); -extern PUCHAR dumpHost(struct hostent FAR *hp, PUCHAR buff); -extern PUCHAR dumpName(PUCHAR name, PUCHAR buff); - -extern int mdnEncodeWhere(void); - -#define MDN_ENCODE_ALWAYS 0 -#define MDN_ENCODE_CHECK 1 -#define MDN_ENCODE_ONLY11 2 -#define MDN_ENCODE_ONLY20 3 - -extern BOOL mdnGetPrgEncoding(PUCHAR enc); -extern BOOL mdnGetConfFile(PUCHAR file); -extern BOOL mdnGetLogFile(PUCHAR file); - -extern BOOL mdnCheckDll(PUCHAR name); - -extern int mdnGetLogLevel(void) ; /* 0 : fatal */ - /* 1 : error */ - /* 2 : warning */ - /* 3 : info */ - /* 4 : trace */ - /* 5 : dump */ - -/* - * Converter I/F, wrapper for libmdn - */ - -#include -#include -#include -#include -#include - -/* - * Conversion Context, determined when attached to process - */ - -typedef struct _CONV { - mdn_resconf_t conf; -} CONVREC, *CONVPTR; - -extern CONVPTR mdnConvInit(void); -extern void mdnConvDone(CONVPTR converter); - -/* - * Converting Request/Response - */ - -extern BOOL mdnConvReq(CONVPTR converter, const char FAR *from, - char FAR *to, size_t tolen); -extern BOOL mdnConvRsp(CONVPTR converter, const char FAR *from, - char FAR *to, size_t tolen); - -/* - * Hook for Asynchronouse Query - */ - -extern void mdnHookInit(void); -extern void mdnHookDone(void); -extern BOOL mdnHook(HWND hWnd, u_int wMsg, char FAR *buf, CONVPTR pConv); - -#endif /* _JPNICMDN_H */ diff --git a/contrib/idn/mdnkit/wsock/common/make.wnt b/contrib/idn/mdnkit/wsock/common/make.wnt deleted file mode 100644 index 260050801b..0000000000 --- a/contrib/idn/mdnkit/wsock/common/make.wnt +++ /dev/null @@ -1,125 +0,0 @@ -# -# Makefile for WinSock Wrapper (common part) -# - -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -!include - -SYSLIBS = $(libcdll) kernel32.lib advapi32.lib user32.lib - -# -# Files to use -# - -HDRS = jpnicmdn.h -SRCS = dllmain.c printf.c dump.c checkdll.c encoding.c convert.c hook.c -OBJS = dllmain.obj printf.obj dump.obj checkdll.obj encoding.obj convert.obj hook.obj -LIBS = ..\..\lib\libmdn.lib ..\..\win\iconv.lib - -cflags = $(cflags) -I..\..\include - -# -# Targets to Build -# - -TARGETS = jpnicmdn.dll jpnicmdn.lib - -all : $(TARGETS) - -jpnicmdn.dll : jpnicmdn.def $(OBJS) $(LIBS) - $(link) $(dlllflags) /OUT:jpnicmdn.dll /DEF:jpnicmdn.def $(OBJS) $(LIBS) $(SYSLIBS) - -jpnicmdn.lib : jpnicmdn.def - LIB /DEF:jpnicmdn.def /MACHINE:IX86 - -install : $(TARGETS) - copy jpnicmdn.dll ..\bin\jpnicmdn.dll - -clean : force - -del *.obj - -del *.lib - -del *.dll - -del *.exp - -# -# Dependencies -# - -dllmain.obj : dllmain.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -printf.obj : printf.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -dump.obj : dump.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -checkdll.obj : checkdll.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -encoding.obj : encoding.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -convert.obj : convert.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -hook.obj : hook.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -force : - diff --git a/contrib/idn/mdnkit/wsock/common/printf.c b/contrib/idn/mdnkit/wsock/common/printf.c deleted file mode 100644 index 1a12d8a7d4..0000000000 --- a/contrib/idn/mdnkit/wsock/common/printf.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * printf.c - printf like debug print function - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include - -#include "jpnicmdn.h" - -/* - * Debug Tracer for DLL - */ - -static UCHAR logName[128] = { 0 } ; -static int logLevel = -1 ; - -void mdnPrintf(PUCHAR fmt, ...) -{ - va_list arg_ptr ; - PUCHAR ep ; - FILE *fp ; - UCHAR msg[256] ; - - if (logLevel < 0 || logName[0] == '\0') return; - - va_start(arg_ptr, fmt) ; - vsprintf(msg, fmt, arg_ptr) ; - va_end(arg_ptr) ; - - if ((fp = fopen(logName, "a")) != NULL) { - fputs(msg, fp) ; - fclose(fp) ; - } -} - -void mdnLogPrintf(int level, PUCHAR fmt, ...) -{ - va_list arg_ptr ; - PUCHAR ep ; - FILE *fp ; - UCHAR msg[256] ; - - if (level > logLevel || logName[0] == '\0') return; - - va_start(arg_ptr, fmt) ; - vsprintf(msg, fmt, arg_ptr) ; - va_end(arg_ptr) ; - - if ((fp = fopen(logName, "a")) != NULL) { - fputs(msg, fp) ; - fclose(fp) ; - } -} - -void mdnLogProc(int level, const char *msg) -{ - PUCHAR ep ; - FILE *fp ; - - if (logLevel < 0 || logName[0] == '\0') return; - - if ((fp = fopen(logName, "a")) != NULL) { - fputs(msg, fp) ; - fclose(fp) ; - } -} - -void mdnLogInit(void) -{ - logLevel = mdnGetLogLevel(); - /* If log file is not stored in the registry, don't do logging. */ - if (mdnGetLogFile(logName) == FALSE) { - logLevel = -1; - } - mdn_log_setproc(mdnLogProc) ; - mdn_log_setlevel(logLevel < 0 ? 0 : logLevel) ; -} diff --git a/contrib/idn/mdnkit/wsock/config/make.wnt b/contrib/idn/mdnkit/wsock/config/make.wnt deleted file mode 100644 index 0969cf022e..0000000000 --- a/contrib/idn/mdnkit/wsock/config/make.wnt +++ /dev/null @@ -1,74 +0,0 @@ -# -# Makefile for building mDNS Wrapper Configuration Tool -# - -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -TARGETS = mdnconf.exe - -all : $(TARGETS) - -mdnconf.exe : mdnconf.tcl - freewrap mdnconf.tcl - -install : $(TARGETS) - copy mdnconf.exe ..\bin - -clean : force - -del mdnconf.exe - -force : diff --git a/contrib/idn/mdnkit/wsock/config/mdnconf.tcl b/contrib/idn/mdnkit/wsock/config/mdnconf.tcl deleted file mode 100644 index f8af6c402c..0000000000 --- a/contrib/idn/mdnkit/wsock/config/mdnconf.tcl +++ /dev/null @@ -1,943 +0,0 @@ -# $Id: mdnconf.tcl,v 1.2 2002/02/08 05:42:08 marka Exp $ -# -# mdnconf.tcl - configure mDN Wrapper -# - -############################################################################# -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. -############################################################################# - -global configFile configBack -global registryKey registryEnc registryDef -global filesCpy filesRen filesDel - -# mDNkit version -set version "2.2.2" - -set configFile "mdnconf.lst" ;# list of wrapped program -set configBack "mdnconf.bak" ;# backup of previous data - -set serverKey "HKEY_LOCAL_MACHINE\\Software\\JPNIC\\MDN" -set serverLogLevel LogLevel -set serverLogLevelDef -1 -set serverLogLevelNone -1 -set serverLogFile LogFile -set serverLogFileDef {C:\mdn_wrapper.log} -set serverConfFile ConfFile - -set perprogKey "HKEY_LOCAL_MACHINE\\Software\\JPNIC\\MDN\\PerProg\\" -set perprogEnc Encoding -set perprogDef Default - -set logFileNameDef mdn_wrapper.log -set confFileNameDef mdn.conf - -set filesCpy11 { "jpnicmdn.dll" "iconv.dll" "wsock32.dll" } -set filesCpy20 { "jpnicmdn.dll" "iconv.dll" "wsock32.dll" "ws2_32.dll" } -set filesRen11 { { "wsock32.dll" "wsock32o.dll" } } -set filesRen20 { { "wsock32.dll" "wsock32o.dll" } { "ws2_32.dll" "ws2_32o.dll" } } -set filesDel11 { "jpnicmdn.dll" "iconv.dll" "wsock32.dll" "wsock32o.dll" } -set filesDel20 { "jpnicmdn.dll" "iconv.dll" "wsock32.dll" "wsock32o.dll" "ws2_32.dll" "ws2_32o.dll" } - -######################################################################## -# -# handling pathname -# - -proc getExeName { prg } { - set elem [file split $prg] - set leng [expr {[llength $elem] - 1}] - set name [lindex $elem $leng] - set exe [file rootname $name] - return $exe -} - -proc getDirName { prg } { - set dir [file dirname $prg] - return $dir -} - -######################################################################## -# -# loadList / saveList -# -# loadList - load list of wrapped executables from $configFile -# saveList - save list of wrapped executables into $configFile -# - -proc loadList {} { - - global configFile configBack - - if { [file exists $configFile] } { - file copy -force $configFile $configBack - } - - set aList {} - set fd [open $configFile {CREAT RDONLY}] - while { ! [eof $fd]} { - set line [gets $fd] - if { [string length $line] > 0} { - lappend aList "$line" - } - } - close $fd - return $aList -} - -proc saveList { aList } { - global configFile - file delete -force $configFile - set fd [open $configFile {CREAT WRONLY}] - foreach e $aList { - puts $fd $e - } - close $fd -} - -######################################################################## -# -# putList / getList - set/get list to/from listbox -# - -proc putList { lb aList } { - foreach e $aList { - $lb insert end $e - } -} - -proc getList { lb } { - return [$lb get 0 end] -} - -######################################################################## -# -# checkList / appendList / deleteList - check / append / delete program from/to listbox -# - -proc checkList { lb prg } { - set cnt 0 - set lst [getList $lb] - - foreach n $lst { - if { [string compare $prg $n] == 0 } { - incr cnt - } - } - return $cnt -} - -proc appendList { lb prg } { - - if { [checkList $lb $prg] == 0 } { - $lb insert end $prg - } -} - -proc deleteList { lb prg } { - set cnt 0 - set lst [getList $lb] - - foreach n $lst { - if { [string compare $n $prg] == 0 } { - $lb delete $cnt - } - incr cnt - } -} - -######################################################################## -# -# registry operations -# - -proc regGetEncode { prg } { - - global perprogKey perprogEnc perprogDef - - if { [string compare $prg "" ] == 0 } { - return $perprogDef - } - - global tcl_platform - set os $tcl_platform(platform) - if { [string compare $os "windows"] != 0 } { - return $perprogDef - } - package require registry 1.0 - - set name [getExeName $prg] - set key $perprogKey$name - - if { [catch {set enc [registry get $key $perprogEnc]} err] } { - return $perprogDef - } - if { [string compare $enc ""] == 0 } { - return $perprogDef - } - return $enc -} - -proc regSetEncode { prg enc } { - - global perprogKey perprogEnc perprogDef - - global tcl_platform - set os $tcl_platform(platform) - if { [string compare $os "windows"] != 0 } { - return 1 - } - - package require registry 1.0 - - set name [getExeName $prg] - set key $perprogKey$name - - if { [string compare $enc $perprogDef] == 0 } { - set enc "" - } - if { [catch {registry set $key $perprogEnc $enc sz} ] } { - return 2 - } - return 0 -} - -proc regGetLogLevel {} { - global serverKey serverLogLevel serverLogLevelDef - regGetValue $serverKey $serverLogLevel $serverLogLevelDef -} - -proc regSetLogLevel {level} { - global serverKey serverLogLevel - regSetValue $serverKey $serverLogLevel $level dword -} - -proc regGetLogFile {} { - global serverKey serverLogFile serverLogFileDef - set file [regGetValue $serverKey $serverLogFile $serverLogFileDef] - if {[catch {file attributes $file -longname} lfile]} { - # Maybe $file doesn't exist (yet). Get the longname of - # directory portion. - set dir [file dirname $file] - if {[catch {file attributes $dir -longname} ldir]} { - set ldir $dir - } - set lfile [file join $ldir [file tail $file]] - } - file nativename $lfile -} - -proc regSetLogFile {file} { - global serverKey serverLogFile - regSetValue $serverKey $serverLogFile [file nativename $file] -} - -proc regGetConfFile {} { - global serverKey serverConfFile - set file [regGetValue $serverKey $serverConfFile {}] - if {[string compare $file {}] == 0} { - return {} - } - if {[catch {file attributes $file -longname} lfile]} { - # Maybe $file doesn't exist (yet). Get the longname of - # directory portion. - set dir [file dirname $file] - if {[catch {file attributes $dir -longname} ldir]} { - set ldir $dir - } - set lfile [file join $ldir [file tail $file]] - } - file nativename $lfile -} - -proc regSetConfFile {file} { - global serverKey serverConfFile - regSetValue $serverKey $serverConfFile [file nativename $file] -} - -proc regGetWhere {} { - global serverKey - regGetValue $serverKey Where 0 -} - -proc regSetWhere {where} { - global serverKey - regSetValue $serverKey Where $where dword -} - -proc regGetValue {key name default} { - if {![isWindows]} { - puts "--regGetValue $key $name" - return $default - } - package require registry 1.0 - - if {[catch {registry get $key $name} value]} { - return $default - } - if {[string compare $value {}] == 0} { - return $default - } - return $value -} - -proc regSetValue {key name value {type sz}} { - if {![isWindows]} { - puts "--regSetValue $key $name $value" - return 1 - } - - package require registry 1.0 - - if {[catch {registry set $key $name $value $type}]} { - return 2 - } - return 0 -} - -######################################################################## -# -# install / uninstall DLL s -# - -proc fileInstall { prg } { - - global env tcl_platform - global filesCpy11 filesCpy20 filesRen11 filesRen20 - - set pl $tcl_platform(platform) - if { [string compare $pl "windows"] != 0 } { - return 1 - } - - set os $tcl_platform(os) - switch $os { - "Windows 95" { - set winDir $env(windir) - set sysDir $winDir/system - set filesCpy $filesCpy11 - set filesRen $filesRen11 - } - "Windows 98" { - set winDir $env(windir) - set sysDir $winDir/system - set filesCpy $filesCpy20 - set filesRen $filesRen20 - } - default { - set winDir $env(SystemRoot) - set sysDir $winDir/system32 - set filesCpy $filesCpy20 - set filesRen $filesRen20 - } - } - - set toDir [getDirName $prg ] - - foreach n $filesCpy { - file copy -force $n $toDir - } - foreach n $filesRen { - set src [lindex $n 0] - set dst [lindex $n 1] - file copy -force $sysDir/$src $toDir/$dst - } - return 0 -} - -proc fileRemove { prg } { - - global tcl_platform - global filesDel11 filesDel20 - - set pl $tcl_platform(platform) - if { [string compare $pl "windows"] != 0 } { - return 1 - } - - set os $tcl_platform(os) - switch $os { - "Windows 95" { - set filesDel $filesDel11 - } - "Windows 98" { - set filesDel $filesDel20 - } - default { - set filesDel $filesDel20 - } - } - - set fromDir [getDirName $prg ] - - foreach n $filesDel { - file delete -force $fromDir/$n - } - return 0 -} - -######################################################################## -# -# Wrap/Unwrap program -# - -proc execWrap { pw lb dlg prg enc } { - - set prgName [$prg get] - set encName [$enc get] - - if {[string compare $prgName {}] == 0} { - confErrorDialog $dlg "Program must be specified.\nClick \"Browse..\" button for browsing." - return - } - if { [fileInstall $prgName] } { - tk_messageBox -icon warning -type ok \ - -title "Warning" \ - -message "Cannot Install DLLs" \ - -parent $dlg - destroy $dlg - return 1 - } - if { [regSetEncode $prgName $encName] } { - tk_messageBox -icon warning -type ok \ - -title "Warning" \ - -message "Cannot Set Encoding" \ - -parent $dlg - fileRemove $prgName - destroy $dlg - return 2 - } - if { [checkList $lb $prgName] == 0 } { - appendList $lb $prgName - } - saveList [getList $lb] - destroy $dlg -} - -proc execUnwrap { pw lb dlg prg } { - - set prgName [$prg get] - - if { [checkList $lb $prgName] == 1 } { - fileRemove $prgName - } - deleteList $lb $prgName - saveList [getList $lb] - destroy $dlg -} - -######################################################################## -# -# dialog for Wrap / Unwrap -# - -proc syncEncode { v i op } { - global prgName encName - set enc [regGetEncode $prgName] - if { [string compare $encName $enc] != 0 } { - set encName $enc - } -} - -proc confBrowse { p ePrg eEnc } { - - set types { - { "Executable" .exe } - } - - set file [tk_getOpenFile -filetypes $types -parent $p ] - - if { [string compare $file ""] == 0 } { - return - } - set enc [regGetEncode $file] - $ePrg delete 0 end - $ePrg insert 0 $file -} - -proc confWrap { pw lb } { - - global prgName encName - - set idx [$lb curselection] - if { [llength $idx] == 1 } { - set prg [$lb get $idx] - } else { - set prg "" - } - - set top .wrap - toplevel $top - grab $top - wm title $top "mDN Wrapper - Wrap Executable" - - frame $top.f1 -bd 1 -relief raised - frame $top.f2 -bd 1 -relief raised - pack $top.f1 -side top -fill x -expand on - pack $top.f2 -side top -fill x -expand on - - frame $top.f1.f - pack $top.f1.f -fill both -expand on -padx 4 -pady 4 - - set w $top.f1.f - label $w.prgtitle -text "Program:" - label $w.enctitle -text "Encoding:" - - entry $w.prgname -relief sunken -width 56 -textvariable prgName - entry $w.encname -relief sunken -width 8 -textvariable encName - set w_prgname $w.prgname - set w_encname $w.encname - button $w.browse -text "Browse.." \ - -command [list confBrowse $w $w_prgname $w_encname] - - frame $w.rbf - radiobutton $w.rbf.encdef -text "Default" -variable encName \ - -value "Default" - radiobutton $w.rbf.encutf -text "UTF-8" -variable encName \ - -value "UTF-8" - pack $w.rbf.encdef $w.rbf.encutf -side left -padx 4 - - grid $w.prgtitle -row 0 -column 0 -sticky e - grid $w.enctitle -row 1 -column 0 -sticky e - grid $w.prgname -row 0 -column 1 -sticky we -pady 4 -padx 2 -columnspan 2 - grid $w.browse -row 0 -column 3 -sticky w -pady 4 -padx 4 - grid $w.encname -row 1 -column 1 -sticky we -pady 4 -padx 2 - grid $w.rbf -row 1 -column 2 -sticky w -padx 2 - grid columnconfig $w 1 -weight 1 -minsize 20 - grid columnconfig $w 2 -weight 2 -minsize 20 - - trace variable prgName w syncEncode - - $w.prgname delete 0 end - $w.prgname insert 0 $prg - - focus $w.prgname - - set w $top.f2 - button $w.wrap -text "Wrap" \ - -command [list execWrap $pw $lb $top $w_prgname $w_encname] - button $w.cancel -text "Cancel" \ - -command [list destroy $top] - pack $w.cancel -side right -fill y -padx 12 -pady 4 - pack $w.wrap -side right -fill y -padx 12 -pady 4 - - tkwait window $top -} - -proc confUnwrap { pw lb } { - - set idx [$lb curselection] - if { [llength $idx] != 1 } { - tk_messageBox -icon warning -type ok \ - -title "Warning" \ - -message "first, select unwrapping executable" \ - -parent $pw - return 0 - } - set prg [$lb get $idx] - if { [string length $prg] == 0 } { - tk_messageBox -icon warning -type ok \ - -title "Warning" \ - -message "first, select unwrapping executable" \ - -parent $pw - return 0 - } - - set top .unwrap - toplevel $top - grab $top - wm title $top "mDN Wrapper - Unwrap Executable" - - frame $top.f1 -bd 1 -relief raised - frame $top.f2 -bd 1 -relief raised - pack $top.f2 -side bottom -fill x - pack $top.f1 -side bottom -fill x -expand on - - frame $top.f1.f - pack $top.f1.f -padx 4 -pady 4 -fill both -expand on - set w $top.f1.f - label $w.prgtitle -text "Program:" - entry $w.prgname -relief sunken -width 56 -textvariable prgName - $w.prgname delete 0 end - $w.prgname insert 0 $prg - - set w_prgname $w.prgname - - grid $w.prgtitle -row 0 -column 0 -sticky w - grid $w.prgname -row 0 -column 1 -sticky we -pady 4 - grid columnconfig $w 1 -weight 1 -minsize 20 - - set w $top.f2 - button $w.wrap -text "Unwrap" \ - -command [list execUnwrap $pw $lb $top $w_prgname] - button $w.cancel -text "Cancel" \ - -command [list destroy $top] - - pack $w.cancel -side right -padx 12 -pady 6 - pack $w.wrap -side right -padx 12 -pady 6 - - focus $w.wrap - tkwait window $top -} - -proc unwrapAll {pw lb} { - set ans [tk_messageBox -type yesno -default no -icon question \ - -parent $pw -title {mdnWrapper Configuration} \ - -message {Really unwrap all programs?}] - if {[string compare $ans yes] != 0} { - return - } - foreach prog [$lb get 0 end] { - fileRemove $prog - } - $lb delete 0 end - saveList {} -} - -proc rewrapAll {pw lb} { - set ans [tk_messageBox -type yesno -default yes -icon question \ - -parent $pw -title {mdnWrapper Configuration} \ - -message {Really rewrap all programs?}] - if {[string compare $ans yes] != 0} { - return - } - foreach prog [$lb get 0 end] { - fileInstall $prog - } -} - -proc confLog {pw} { - global _logLevel _logFile - - set top .log - catch {destroy $top} - toplevel $top - wm title $top "mDN Wrapper - Log Configuration" - # wm transient $top $pw - - set _logLevel [regGetLogLevel] - set _logFile [regGetLogFile] - - frame $top.f1 -bd 1 -relief raised - frame $top.f2 -bd 1 -relief raised - pack $top.f2 -side bottom -fill x - pack $top.f1 -side top -fill both -expand on - - set w $top.f1 - label $w.lv_l -text "Log Level:" - frame $w.lv_v - global serverLogLevelNone - set i 0 - foreach {lvl text} [list $serverLogLevelNone None \ - 0 Fatal 1 Error 2 Warning 3 Info 4 Trace] { - radiobutton $w.lv_v.btn$i -text $text -value $lvl -variable _logLevel - pack $w.lv_v.btn$i -side left -padx 3 - incr i - } - label $w.ld_l -text "Log File:" - frame $w.ld_v - entry $w.ld_v.e -width 40 -textvariable _logFile - focus $w.ld_v.e - button $w.ld_v.b -text "Browse.." -command [list selectLog $top $w.ld_v.e] - pack $w.ld_v.b -side right -fill y -padx 6 - pack $w.ld_v.e -side left -fill both -expand yes - #label $w.lo_l -text "Log Operation:" - frame $w.lo_v - button $w.lo_v.show -text "View" -command [list showLog $top] - button $w.lo_v.delete -text "Delete" -command [list deleteLog $top] - pack $w.lo_v.show $w.lo_v.delete -side left -padx 4 - - grid $w.lv_l -row 0 -column 0 -sticky e -padx 4 - grid $w.ld_l -row 1 -column 0 -sticky e -padx 4 - #grid $w.lo_l -row 2 -column 0 -sticky e -padx 4 - grid $w.lv_v -row 0 -column 1 -sticky w -padx 4 -pady 4 - grid $w.ld_v -row 1 -column 1 -sticky we -padx 4 -pady 4 - grid $w.lo_v -row 2 -column 1 -sticky w -padx 4 -pady 4 - - set w $top.f2 - button $w.ok -text "OK" -command [list configureLog $top] - button $w.cancel -text "Cancel" -command [list destroy $top] - pack $w.cancel -side right -padx 12 -pady 6 - pack $w.ok -side right -padx 12 -pady 6 -} - -proc configureLog {top} { - global _logLevel _logFile - - if {$_logLevel != [regGetLogLevel] || - [string compare $_logFile [regGetLogFile]] != 0} { - set dir [file dirname $_logFile] - if {[string compare $dir {}]} { - if {![file exists $dir]} { - confErrorDialog $top "Directory $dir doesn't exist" - return - } elseif {![file isdirectory $dir]} { - confErrorDialog $top "$dir is not a directory" - return - } - } - regSetLogLevel $_logLevel - regSetLogFile $_logFile - tk_messageBox -type ok -default ok -icon info -parent $top \ - -title "mDN Wrapper Configuration" \ - -message "Changing log level or file does not affect already running processes." - } - destroy $top -} - -proc selectLog {top e} { - global logFileNameDef - set file [tk_getSaveFile -title {mDN Wrapper Logfile Selection} \ - -defaultextension .log \ - -filetypes {{{Log Files} .log} {{All Files} *}} \ - -initialfile $logFileNameDef \ - -parent $top] - if {[string compare $file {}]} { - $e delete 0 end - $e insert insert $file - } -} - -proc showLog {top} { - global _logFile - if {[catch {exec notepad.exe $_logFile &} r]} { - confErrorDialog $top "Cannot execute notepad" - } -} - -proc deleteLog {top} { - global _logFile - set ans [tk_messageBox -type yesno -default no -icon question \ - -parent $top -title "mdnWrapper Configuration" \ - -message "Really delete $_logFile?"] - if {[string compare $ans yes] == 0} { - file delete $_logFile - } -} - -######################################################################## -# -# dialog for advanced configuration -# - -proc advancedConf {pw} { - global normalizerList normalizerDef - - set top .adv - catch {destroy $top} - toplevel $top - wm title $top "mDN Wrapper - Advanced Configuration" - - global _mdnOperation _confFile - set _mdnOperation [regGetWhere] - set _confFile [regGetConfFile] - - foreach f {f1 f2 f3} { - frame $top.$f -bd 1 -relief raised - pack $top.$f -side top -fill x - } - - set f $top.f1 - label $f.lbl -text {MDN Wrapping Mode} - set w $f.f - frame $w - foreach {rb val txt} [list \ - rb1 0 {Wrap both WINSOCK 1.1 and WINSOCK 2.0} \ - rb2 2 {Wrap only WINSOCK 1.1} \ - rb3 3 {Wrap only WINSOCK 2.0} \ - rb4 1 "Wrap only WINSOCK2.0 if it exists.\nOtherwise wrap only WINSOCK1.1"] { - radiobutton $w.$rb -text $txt -variable _mdnOperation -value $val \ - -anchor w -justify left - pack $w.$rb -side top -fill x -pady 1 - } - pack $f.lbl -side top -fill x -pady 4 - pack $w -side top -fill both -padx 20 -pady 10 - - set f $top.f2 - label $f.lbl -text {MDN Configuration} - pack $f.lbl -side top -fill x -pady 6 - - set w $f.f - frame $w - pack $w -side top -fill both -padx 10 -pady 6 - label $w.l1 -text {Config File:} - #label $w.l2 -text {Config Operation:} - entry $w.e -width 40 -textvariable _confFile - focus $w.e - button $w.br -text "Browse.." -command [list selectConf $top $w.e] - button $w.b -text Edit -command [list editConf $top] - grid $w.l1 -row 0 -column 0 -sticky e -padx 4 - #grid $w.l2 -row 1 -column 0 -sticky e -padx 4 - grid $w.e -row 0 -column 1 -sticky we -padx 4 -pady 4 - grid $w.b -row 1 -column 1 -sticky w -padx 4 -pady 4 - grid $w.br -row 0 -column 2 -sticky w -padx 4 -pady 4 - - set w $top.f3 - button $w.ok -text "OK" -command [list advConf $top] - button $w.cancel -text "Cancel" -command [list destroy $top] - pack $w.cancel -side right -padx 12 -pady 8 - pack $w.ok -side right -padx 12 -pady 8 -} - -proc editConf {top} { - global _confFile - if {[catch {exec notepad.exe $_confFile &} r]} { - confErrorDialog $top "Cannot execute notepad" - } -} - -proc selectConf {top e} { - global confFileNameDef - set file [tk_getOpenFile -title {mDN Wrapper Config File Selection} \ - -defaultextension .conf \ - -filetypes {{{Config Files} .conf} {{All Files} *}} \ - -initialfile $confFileNameDef \ - -parent $top] - if {[string compare $file {}]} { - $e delete 0 end - $e insert insert $file - } -} - -proc advConf {top} { - global _mdnOperation _confFile - regSetWhere $_mdnOperation - regSetConfFile $_confFile - destroy $top -} - -######################################################################## -# -# utility -# - -proc confErrorDialog {top message} { - tk_messageBox -default ok -icon error -parent $top -type ok \ - -title {mDN Wrapper Configuration Error} -message $message -} - -proc isWindows {} { - global tcl_platform - expr {[string compare $tcl_platform(platform) "windows"] == 0} -} - -######################################################################## -# -# config program start here -# - -wm title . "mDN Wrapper - Configuration" -wm iconname . "mDN Wrapper - Configuration" - - -label .title -bd 1 -relief raised -pady 5 \ - -text "mDN Wrapper Configuration Program version $version" - -frame .left -bd 1 -relief raised -frame .right -bd 1 -relief raised - -frame .lst -label .lst.title -text "Wrapped Programs" -pady 3 -listbox .lst.list -width 64 -height 16 -setgrid 1 \ - -xscrollcommand ".lst.xscroll set" \ - -yscrollcommand ".lst.yscroll set" -scrollbar .lst.yscroll -orient vertical -command ".lst.list yview" -scrollbar .lst.xscroll -orient horizontal -command ".lst.list xview" -grid .lst.title -row 0 -column 0 -columnspan 2 -sticky news -grid .lst.list -row 1 -column 0 -sticky news -grid .lst.xscroll -row 2 -column 0 -sticky news -grid .lst.yscroll -row 1 -column 1 -sticky news -grid rowconfig .lst 1 -weight 1 -grid columnconfig .lst 0 -weight 1 - -frame .btn -button .btn.wrap -text "Wrap.." -command [list confWrap . .lst.list] -button .btn.unwrap -text "Unwrap.." -command [list confUnwrap . .lst.list] -button .btn.unwrapall -text "Unwrap All" -command [list unwrapAll . .lst.list] -button .btn.rewrapall -text "Rewrap All" -command [list rewrapAll . .lst.list] -frame .btn.spacing1 -width 1 -height 12 -bd 0 -button .btn.log -text "Log.." -command [list confLog .] -frame .btn.spacing2 -width 1 -height 12 -bd 0 -button .btn.adv -text "Advanced.." -command [list advancedConf .] -button .btn.exit -text Exit -command exit -pack .btn.wrap -side top -fill x -pady 4 -pack .btn.unwrap -side top -fill x -pady 4 -pack .btn.unwrapall -side top -fill x -pady 4 -pack .btn.rewrapall -side top -fill x -pady 4 -pack .btn.spacing1 -side top -pack .btn.log -side top -fill x -pady 4 -pack .btn.spacing2 -side top -pack .btn.adv -side top -fill x -pady 4 -pack .btn.exit -side bottom -fill x -pady 4 - -pack .lst -in .left -padx 4 -pady 4 -fill both -expand on -pack .btn -in .right -padx 6 -pady 4 -fill both -expand on - -pack .title -side top -fill x -pack .right -side right -fill y -pack .left -side left -fill y -expand on - -# -# then set current list into listbox -# - -set theList [loadList] -#saveList $theList -putList .lst.list $theList - -# -######################################################################## diff --git a/contrib/idn/mdnkit/wsock/make.wnt b/contrib/idn/mdnkit/wsock/make.wnt deleted file mode 100644 index 71855af252..0000000000 --- a/contrib/idn/mdnkit/wsock/make.wnt +++ /dev/null @@ -1,106 +0,0 @@ -# -# Top Level Makefile for building WINSOCK mDNS Wrapper -# - -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -all : force - cd common - $(MAKE) -f make.wnt all - cd .. - cd wsock11 - $(MAKE) -f make.wnt all - cd .. - cd wsock20 - $(MAKE) -f make.wnt all - cd .. - cd config - $(MAKE) -f make.wnt all - cd .. - -install : force - copy ..\win\iconv.dll bin - copy ..\map\jp.map bin - cd common - $(MAKE) -f make.wnt install - cd .. - cd wsock11 - $(MAKE) -f make.wnt install - cd .. - cd wsock20 - $(MAKE) -f make.wnt install - cd .. - cd config - $(MAKE) -f make.wnt install - cd .. - -clean : force - cd common - $(MAKE) -f make.wnt clean - cd .. - cd wsock11 - $(MAKE) -f make.wnt clean - cd .. - cd wsock20 - $(MAKE) -f make.wnt clean - cd .. - cd config - $(MAKE) -f make.wnt clean - cd .. - -force : - diff --git a/contrib/idn/mdnkit/wsock/wsock11/dlldef.h b/contrib/idn/mdnkit/wsock/wsock11/dlldef.h deleted file mode 100644 index 14fa633edf..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/dlldef.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * dlldef.h - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef _DLLDEF_H -#define _DLLDEF_H - -#include "../common/jpnicmdn.h" - -/* - * Execution Tracing - */ - -extern int procPid ; -extern UCHAR procExe[] ; - -#ifdef DEBUG -#define TRACE mdnPrintf("%04x ws11 : ",procPid) ; mdnPrintf -#define FATAL mdnPrintf("%04x ws11 : ",procPid) ; mdnPrintf -#else -#define TRACE -#define FATAL mdnPrintf("%04x ws11 : ",procPid) ; mdnPrintf -#endif - -/* - * Encoding Names and Options - */ - -extern BOOL encodeHere ; -extern CONVPTR encodeCtx ; - -/* - * Stub functions for calling original version. - */ -extern int PASCAL -_org_gethostname(char FAR * name, int namelen) ; - -extern struct hostent FAR * PASCAL -_org_gethostbyname(const char FAR * name); - -extern struct hostent FAR * PASCAL -_org_gethostbyaddr(const char FAR * addr, int len, int type); - -extern HANDLE PASCAL -_org_WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR * name, - char FAR * buf, int buflen); -extern HANDLE PASCAL -_org_WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, - int len, int type, char FAR * buf, int buflen); - -/* - * Original DLL loader/unloader. - */ - -void linkFree(void) ; -BOOL linkLoad(void) ; - -#endif /* _DLLDEF_H */ diff --git a/contrib/idn/mdnkit/wsock/wsock11/dllfunc.c b/contrib/idn/mdnkit/wsock/wsock11/dllfunc.c deleted file mode 100644 index b4755b2221..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/dllfunc.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * dllfunc.c - wrapper functions - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include - -#include "dlldef.h" - -int -PASCAL FAR gethostname(char FAR * name, int namelen) -{ - int ret ; - - TRACE("ENTER gethostname\n") ; - ret = _org_gethostname(name, namelen) ; - TRACE("LEAVE gethostname %d <%s>\n", ret, name) ; - - return ret ; -} - -struct hostent FAR * -PASCAL FAR gethostbyname(const char FAR * name) -{ - struct hostent FAR *ret ; - char nbuff[64] ; - char hbuff[256] ; - BOOL stat ; - - TRACE("ENTER gethostbyname <%s>\n", (name != NULL ? name : "NULL")) ; - - if (encodeHere != TRUE) { - ret = _org_gethostbyname(name) ; - } else if (name == NULL) { - ret = _org_gethostbyname(name) ; - } else { - stat = mdnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvReq failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Name <%s>\n", dumpName(nbuff, hbuff)) ; - ret = _org_gethostbyname(nbuff) ; - } - } - - if (ret != NULL && encodeHere) { - TRACE("Resulting Name <%s>\n", dumpName(ret->h_name, hbuff)) ; - stat = mdnConvRsp(encodeCtx, ret->h_name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvRsp failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Back <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(ret->h_name, nbuff) ; - } - } - - if (ret == NULL) { - TRACE("LEAVE gethostbyname NULL\n") ; - } else { - TRACE("LEAVE gethostbyname <%s>\n", dumpHost(ret, hbuff)) ; - } - return ret ; -} - -struct hostent FAR * -PASCAL FAR gethostbyaddr(const char FAR * addr, int len, int type) -{ - struct hostent FAR *ret ; - char nbuff[64] ; - char abuff[256] ; - char hbuff[256] ; - BOOL stat ; - - TRACE("ENTER gethostbyaddr <%s>\n", dumpAddr(addr, len, abuff)) ; - - ret = _org_gethostbyaddr(addr, len, type) ; - - if (ret != NULL && encodeHere) { - TRACE("Resulting Name <%s>\n", dumpName(ret->h_name, hbuff)) ; - stat = mdnConvRsp(encodeCtx, ret->h_name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvRsp failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Back <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(ret->h_name, nbuff) ; - } - } - - if (ret == NULL) { - TRACE("LEAVE gethostbyaddr NULL\n") ; - } else { - TRACE("LEAVE gethostbyaddr <%s>\n", dumpHost(ret, hbuff)) ; - } - return ret ; -} - -HANDLE -PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, int buflen) -{ - HANDLE ret ; - char nbuff[64] ; - char hbuff[256] ; - - TRACE("ENTER WSAAsyncGetHostByName <%s>\n", name) ; - - if (encodeHere != TRUE) { - ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, name, buf, buflen) ; - } else if (name == NULL) { - ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, name, buf, buflen) ; - } else { - mdnHook(hWnd, wMsg, buf, encodeCtx) ; - mdnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)) ; - TRACE("Converted Name <%s>\n", dumpName(nbuff, hbuff)) ; - ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, nbuff, buf, buflen) ; - } - - TRACE("LEAVE WSAAsyncGetHostByName HANDLE %08x\n", ret) ; - - return ret ; -} - -HANDLE -PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, char FAR * buf, int buflen) -{ - HANDLE ret ; - char abuff[256] ; - - if (encodeHere) { - mdnHook(hWnd, wMsg, buf, encodeCtx) ; - } - - TRACE("ENTER WSAAsyncGetHostByAddr <%s>\n", dumpAddr(addr, len, abuff)) ; - ret = _org_WSAAsyncGetHostByAddr(hWnd, wMsg, addr, len, type, buf, buflen) ; - TRACE("LEAVE WSAAsyncGetHostByAddr HANDLE %08x\n", ret) ; - - return ret ; -} - - diff --git a/contrib/idn/mdnkit/wsock/wsock11/dllload.c b/contrib/idn/mdnkit/wsock/wsock11/dllload.c deleted file mode 100644 index 929b1890d4..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/dllload.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * dllload.c - load original entries - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "dlldef.h" - -/* - * Manages original DLL - */ - -static HINSTANCE dllHandle = NULL ; - -/* - * linkFree - dispose module - */ - -void linkFree(void) -{ - if (dllHandle != NULL) { - FreeLibrary(dllHandle) ; - dllHandle = NULL ; - } -} - -/* - * linkLoad - load & link original DLL - */ - -BOOL linkLoad(void) -{ - PUCHAR name ; - - /* - * Load Original DLL - */ - - name = "WSOCK32O" ; - - if ((dllHandle = LoadLibrary(name)) == NULL) { - FATAL("linkLoad - no %s\n", name) ; - return FALSE ; - } - - return TRUE ; -} - -#define DLLHANDLE dllHandle -#include "dllstub.c" diff --git a/contrib/idn/mdnkit/wsock/wsock11/dllmain.c b/contrib/idn/mdnkit/wsock/wsock11/dllmain.c deleted file mode 100644 index 9ef58006bc..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/dllmain.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * dllmain.c - entry for DLL - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include - -#include "dlldef.h" - -/* - * Control Variables - */ - -int procPid = 0 ; -UCHAR procExe[256] = { 0 } ; - -BOOL encodeHere = FALSE ; -CONVPTR encodeCtx = NULL ; - -/* - * DLL Entry - */ - -BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, LPVOID *resv) -{ - switch (reason) { - - case DLL_PROCESS_ATTACH : - procPid = getpid() ; - GetModuleFileName(NULL, procExe, 256) ; - - TRACE("Attached to Process <%s>\n", procExe) ; - - if (linkLoad() != TRUE) { - FATAL("cannot link to original DLL\n") ; - return FALSE ; - } - - mdnLogInit() ; - mdnHookInit() ; - - switch (mdnEncodeWhere()) { - case MDN_ENCODE_ALWAYS : - case MDN_ENCODE_ONLY11 : - encodeHere = TRUE ; - break ; - case MDN_ENCODE_CHECK : - if (mdnCheckDll("WS2_32")) { - encodeHere = FALSE ; - } else { - encodeHere = TRUE ; - } - break ; - default : - encodeHere = FALSE ; - break ; - } - - if (encodeHere == FALSE) { - TRACE("not encode here\n") ; - } else { - encodeCtx = mdnConvInit() ; - TRACE("Context %08x\n", encodeCtx) ; - } - break ; - - case DLL_PROCESS_DETACH : - if (encodeCtx != NULL) { - mdnConvDone(encodeCtx) ; - } - mdnHookDone() ; - linkFree() ; - TRACE("Detached from Process\n") ; - break ; - - case DLL_THREAD_ATTACH : - break ; - case DLL_THREAD_DETACH : - break ; - } - return TRUE ; -} - diff --git a/contrib/idn/mdnkit/wsock/wsock11/dllstub.c b/contrib/idn/mdnkit/wsock/wsock11/dllstub.c deleted file mode 100644 index d560cf9dc6..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/dllstub.c +++ /dev/null @@ -1,1541 +0,0 @@ -/* $Id: dllstub.c,v 1.2 2002/02/08 05:42:14 marka Exp $ */ - -SOCKET PASCAL -accept(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static SOCKET (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub accept() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "accept")) == NULL) { - FATAL("cannot find entry accept (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -bind(SOCKET a0, const struct sockaddr* a1, int a2) -{ - static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub bind() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "bind")) == NULL) { - FATAL("cannot find entry bind (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -closesocket(SOCKET a0) -{ - static int (PASCAL *fp)(SOCKET a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub closesocket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "closesocket")) == NULL) { - FATAL("cannot find entry closesocket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -connect(SOCKET a0, const struct sockaddr* a1, int a2) -{ - static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub connect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "connect")) == NULL) { - FATAL("cannot find entry connect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getpeername(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getpeername() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getpeername")) == NULL) { - FATAL("cannot find entry getpeername (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getsockname(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getsockname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getsockname")) == NULL) { - FATAL("cannot find entry getsockname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getsockopt(SOCKET a0, int a1, int a2, char* a3, int* a4) -{ - static int (PASCAL *fp)(SOCKET a0, int a1, int a2, char* a3, int* a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getsockopt() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getsockopt")) == NULL) { - FATAL("cannot find entry getsockopt (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -u_long PASCAL -htonl(u_long a0) -{ - static u_long (PASCAL *fp)(u_long a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub htonl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "htonl")) == NULL) { - FATAL("cannot find entry htonl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -u_short PASCAL -htons(u_short a0) -{ - static u_short (PASCAL *fp)(u_short a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub htons() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "htons")) == NULL) { - FATAL("cannot find entry htons (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -unsigned long PASCAL -inet_addr(const char* a0) -{ - static unsigned long (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub inet_addr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "inet_addr")) == NULL) { - FATAL("cannot find entry inet_addr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - char * PASCAL -inet_ntoa(struct in_addr a0) -{ - static char * (PASCAL *fp)(struct in_addr a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub inet_ntoa() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "inet_ntoa")) == NULL) { - FATAL("cannot find entry inet_ntoa (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -ioctlsocket(SOCKET a0, long a1, u_long * a2) -{ - static int (PASCAL *fp)(SOCKET a0, long a1, u_long * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ioctlsocket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ioctlsocket")) == NULL) { - FATAL("cannot find entry ioctlsocket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -listen(SOCKET a0, int a1) -{ - static int (PASCAL *fp)(SOCKET a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub listen() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "listen")) == NULL) { - FATAL("cannot find entry listen (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -u_long PASCAL -ntohl(u_long a0) -{ - static u_long (PASCAL *fp)(u_long a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ntohl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ntohl")) == NULL) { - FATAL("cannot find entry ntohl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -u_short PASCAL -ntohs(u_short a0) -{ - static u_short (PASCAL *fp)(u_short a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ntohs() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ntohs")) == NULL) { - FATAL("cannot find entry ntohs (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -recv(SOCKET a0, char* a1, int a2, int a3) -{ - static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub recv() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "recv")) == NULL) { - FATAL("cannot find entry recv (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -recvfrom(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5) -{ - static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub recvfrom() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "recvfrom")) == NULL) { - FATAL("cannot find entry recvfrom (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -select(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4) -{ - static int (PASCAL *fp)(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub select() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "select")) == NULL) { - FATAL("cannot find entry select (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int PASCAL -send(SOCKET a0, const char* a1, int a2, int a3) -{ - static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub send() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "send")) == NULL) { - FATAL("cannot find entry send (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -sendto(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5) -{ - static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub sendto() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "sendto")) == NULL) { - FATAL("cannot find entry sendto (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -setsockopt(SOCKET a0, int a1, int a2, const char* a3, int a4) -{ - static int (PASCAL *fp)(SOCKET a0, int a1, int a2, const char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub setsockopt() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "setsockopt")) == NULL) { - FATAL("cannot find entry setsockopt (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int PASCAL -shutdown(SOCKET a0, int a1) -{ - static int (PASCAL *fp)(SOCKET a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub shutdown() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "shutdown")) == NULL) { - FATAL("cannot find entry shutdown (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -SOCKET PASCAL -socket(int a0, int a1, int a2) -{ - static SOCKET (PASCAL *fp)(int a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub socket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "socket")) == NULL) { - FATAL("cannot find entry socket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -MigrateWinsockConfiguration(int a0, int a1, int a2) -{ - static int (PASCAL *fp)(int a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub MigrateWinsockConfiguration() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "MigrateWinsockConfiguration")) == NULL) { - FATAL("cannot find entry MigrateWinsockConfiguration (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - - struct hostent * PASCAL -_org_gethostbyaddr(const char* a0, int a1, int a2) -{ - static struct hostent * (PASCAL *fp)(const char* a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostbyaddr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostbyaddr")) == NULL) { - FATAL("cannot find entry gethostbyaddr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - - struct hostent * PASCAL -_org_gethostbyname(const char* a0) -{ - static struct hostent * (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostbyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostbyname")) == NULL) { - FATAL("cannot find entry gethostbyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct protoent * PASCAL -getprotobyname(const char* a0) -{ - static struct protoent * (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getprotobyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getprotobyname")) == NULL) { - FATAL("cannot find entry getprotobyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct protoent * PASCAL -getprotobynumber(int a0) -{ - static struct protoent * (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getprotobynumber() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getprotobynumber")) == NULL) { - FATAL("cannot find entry getprotobynumber (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct servent * PASCAL -getservbyname(const char* a0, const char* a1) -{ - static struct servent * (PASCAL *fp)(const char* a0, const char* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getservbyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getservbyname")) == NULL) { - FATAL("cannot find entry getservbyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - - struct servent * PASCAL -getservbyport(int a0, const char* a1) -{ - static struct servent * (PASCAL *fp)(int a0, const char* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getservbyport() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getservbyport")) == NULL) { - FATAL("cannot find entry getservbyport (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -_org_gethostname(char* a0, int a1) -{ - static int (PASCAL *fp)(char* a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostname")) == NULL) { - FATAL("cannot find entry gethostname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -WSAAsyncSelect(SOCKET a0, HWND a1, u_int a2, long a3) -{ - static int (PASCAL *fp)(SOCKET a0, HWND a1, u_int a2, long a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncSelect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncSelect")) == NULL) { - FATAL("cannot find entry WSAAsyncSelect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -HANDLE PASCAL -_org_WSAAsyncGetHostByAddr(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSAAsyncGetHostByAddr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByAddr")) == NULL) { - FATAL("cannot find entry WSAAsyncGetHostByAddr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -HANDLE PASCAL -_org_WSAAsyncGetHostByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSAAsyncGetHostByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetHostByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetProtoByNumber(HWND a0, u_int a1, int a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetProtoByNumber() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByNumber")) == NULL) { - FATAL("cannot find entry WSAAsyncGetProtoByNumber (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetProtoByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetProtoByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetProtoByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetServByPort(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetServByPort() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByPort")) == NULL) { - FATAL("cannot find entry WSAAsyncGetServByPort (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -HANDLE PASCAL -WSAAsyncGetServByName(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetServByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetServByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -WSACancelAsyncRequest(HANDLE a0) -{ - static int (PASCAL *fp)(HANDLE a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACancelAsyncRequest() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACancelAsyncRequest")) == NULL) { - FATAL("cannot find entry WSACancelAsyncRequest (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -FARPROC PASCAL -WSASetBlockingHook(FARPROC a0) -{ - static FARPROC (PASCAL *fp)(FARPROC a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetBlockingHook() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetBlockingHook")) == NULL) { - FATAL("cannot find entry WSASetBlockingHook (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -WSAUnhookBlockingHook(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAUnhookBlockingHook() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAUnhookBlockingHook")) == NULL) { - FATAL("cannot find entry WSAUnhookBlockingHook (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -WSAGetLastError(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetLastError() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetLastError")) == NULL) { - FATAL("cannot find entry WSAGetLastError (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -void PASCAL -WSASetLastError(int a0) -{ - static void (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetLastError() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetLastError")) == NULL) { - FATAL("cannot find entry WSASetLastError (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - (*fp)(a0); -} - -int PASCAL -WSACancelBlockingCall(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACancelBlockingCall() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACancelBlockingCall")) == NULL) { - FATAL("cannot find entry WSACancelBlockingCall (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -BOOL PASCAL -WSAIsBlocking(void) -{ - static BOOL (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAIsBlocking() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAIsBlocking")) == NULL) { - FATAL("cannot find entry WSAIsBlocking (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -WSAStartup(WORD a0, LPWSADATA a1) -{ - static int (PASCAL *fp)(WORD a0, LPWSADATA a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAStartup() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAStartup")) == NULL) { - FATAL("cannot find entry WSAStartup (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -WSACleanup(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACleanup() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACleanup")) == NULL) { - FATAL("cannot find entry WSACleanup (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -__WSAFDIsSet(SOCKET a0, fd_set* a1) -{ - static int (PASCAL *fp)(SOCKET a0, fd_set* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub __WSAFDIsSet() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "__WSAFDIsSet")) == NULL) { - FATAL("cannot find entry __WSAFDIsSet (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -WEP(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WEP() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WEP")) == NULL) { - FATAL("cannot find entry WEP (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -WSApSetPostRoutine(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSApSetPostRoutine() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSApSetPostRoutine")) == NULL) { - FATAL("cannot find entry WSApSetPostRoutine (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -WsControl(int a0, int a1, int a2, int a3, int a4, int a5) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WsControl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WsControl")) == NULL) { - FATAL("cannot find entry WsControl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -closesockinfo(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub closesockinfo() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "closesockinfo")) == NULL) { - FATAL("cannot find entry closesockinfo (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -Arecv(int a0, int a1, int a2, int a3) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub Arecv() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "Arecv")) == NULL) { - FATAL("cannot find entry Arecv (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -Asend(int a0, int a1, int a2, int a3) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub Asend() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "Asend")) == NULL) { - FATAL("cannot find entry Asend (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -WSHEnumProtocols(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSHEnumProtocols() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSHEnumProtocols")) == NULL) { - FATAL("cannot find entry WSHEnumProtocols (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -inet_network(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub inet_network() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "inet_network")) == NULL) { - FATAL("cannot find entry inet_network (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -getnetbyname(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getnetbyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getnetbyname")) == NULL) { - FATAL("cannot find entry getnetbyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -rcmd(int a0, int a1, int a2, int a3, int a4, int a5) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub rcmd() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "rcmd")) == NULL) { - FATAL("cannot find entry rcmd (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -rexec(int a0, int a1, int a2, int a3, int a4, int a5) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub rexec() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "rexec")) == NULL) { - FATAL("cannot find entry rexec (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -rresvport(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub rresvport() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "rresvport")) == NULL) { - FATAL("cannot find entry rresvport (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -sethostname(int a0, int a1) -{ - static int (PASCAL *fp)(int a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub sethostname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "sethostname")) == NULL) { - FATAL("cannot find entry sethostname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -dn_expand(int a0, int a1, int a2, int a3, int a4) -{ - static int (PASCAL *fp)(int a0, int a1, int a2, int a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub dn_expand() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "dn_expand")) == NULL) { - FATAL("cannot find entry dn_expand (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int PASCAL -WSARecvEx(SOCKET a0, char* a1, int a2, int* a3) -{ - static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int* a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSARecvEx() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSARecvEx")) == NULL) { - FATAL("cannot find entry WSARecvEx (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -s_perror(int a0, int a1) -{ - static int (PASCAL *fp)(int a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub s_perror() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "s_perror")) == NULL) { - FATAL("cannot find entry s_perror (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -INT PASCAL -GetAddressByNameA(DWORD a0, LPGUID a1, LPSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPSTR a8, LPDWORD a9) -{ - static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPSTR a8, LPDWORD a9); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetAddressByNameA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetAddressByNameA")) == NULL) { - FATAL("cannot find entry GetAddressByNameA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); -} - -INT PASCAL -GetAddressByNameW(DWORD a0, LPGUID a1, LPWSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPWSTR a8, LPDWORD a9) -{ - static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPWSTR a2, LPINT a3, DWORD a4, LPSERVICE_ASYNC_INFO a5, LPVOID a6, LPDWORD a7, LPWSTR a8, LPDWORD a9); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetAddressByNameW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetAddressByNameW")) == NULL) { - FATAL("cannot find entry GetAddressByNameW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); -} - -INT PASCAL -EnumProtocolsA(LPINT a0, LPVOID a1, LPDWORD a2) -{ - static INT (PASCAL *fp)(LPINT a0, LPVOID a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub EnumProtocolsA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "EnumProtocolsA")) == NULL) { - FATAL("cannot find entry EnumProtocolsA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT PASCAL -EnumProtocolsW(LPINT a0, LPVOID a1, LPDWORD a2) -{ - static INT (PASCAL *fp)(LPINT a0, LPVOID a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub EnumProtocolsW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "EnumProtocolsW")) == NULL) { - FATAL("cannot find entry EnumProtocolsW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT PASCAL -GetTypeByNameA(LPSTR a0, LPGUID a1) -{ - static INT (PASCAL *fp)(LPSTR a0, LPGUID a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetTypeByNameA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetTypeByNameA")) == NULL) { - FATAL("cannot find entry GetTypeByNameA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -INT PASCAL -GetTypeByNameW(LPWSTR a0, LPGUID a1) -{ - static INT (PASCAL *fp)(LPWSTR a0, LPGUID a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetTypeByNameW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetTypeByNameW")) == NULL) { - FATAL("cannot find entry GetTypeByNameW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -INT PASCAL -GetNameByTypeA(LPGUID a0, LPSTR a1, DWORD a2) -{ - static INT (PASCAL *fp)(LPGUID a0, LPSTR a1, DWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetNameByTypeA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetNameByTypeA")) == NULL) { - FATAL("cannot find entry GetNameByTypeA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT PASCAL -GetNameByTypeW(LPGUID a0, LPWSTR a1, DWORD a2) -{ - static INT (PASCAL *fp)(LPGUID a0, LPWSTR a1, DWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetNameByTypeW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetNameByTypeW")) == NULL) { - FATAL("cannot find entry GetNameByTypeW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT PASCAL -SetServiceA(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOA a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5) -{ - static INT (PASCAL *fp)(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOA a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub SetServiceA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "SetServiceA")) == NULL) { - FATAL("cannot find entry SetServiceA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -INT PASCAL -SetServiceW(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOW a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5) -{ - static INT (PASCAL *fp)(DWORD a0, DWORD a1, DWORD a2, LPSERVICE_INFOW a3, LPSERVICE_ASYNC_INFO a4, LPDWORD a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub SetServiceW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "SetServiceW")) == NULL) { - FATAL("cannot find entry SetServiceW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -INT PASCAL -GetServiceA(DWORD a0, LPGUID a1, LPSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6) -{ - static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetServiceA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetServiceA")) == NULL) { - FATAL("cannot find entry GetServiceA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -INT PASCAL -GetServiceW(DWORD a0, LPGUID a1, LPWSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6) -{ - static INT (PASCAL *fp)(DWORD a0, LPGUID a1, LPWSTR a2, DWORD a3, LPVOID a4, LPDWORD a5, LPSERVICE_ASYNC_INFO a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetServiceW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetServiceW")) == NULL) { - FATAL("cannot find entry GetServiceW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -int PASCAL -NPLoadNameSpaces(int a0, int a1, int a2) -{ - static int (PASCAL *fp)(int a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub NPLoadNameSpaces() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "NPLoadNameSpaces")) == NULL) { - FATAL("cannot find entry NPLoadNameSpaces (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -NSPStartup(int a0, int a1) -{ - static int (PASCAL *fp)(int a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub NSPStartup() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "NSPStartup")) == NULL) { - FATAL("cannot find entry NSPStartup (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -BOOL PASCAL -TransmitFile(SOCKET a0, HANDLE a1, DWORD a2, DWORD a3, LPOVERLAPPED a4, LPTRANSMIT_FILE_BUFFERS a5, DWORD a6) -{ - static BOOL (PASCAL *fp)(SOCKET a0, HANDLE a1, DWORD a2, DWORD a3, LPOVERLAPPED a4, LPTRANSMIT_FILE_BUFFERS a5, DWORD a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub TransmitFile() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "TransmitFile")) == NULL) { - FATAL("cannot find entry TransmitFile (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -BOOL PASCAL -AcceptEx(SOCKET a0, SOCKET a1, PVOID a2, DWORD a3, DWORD a4, DWORD a5, LPDWORD a6, LPOVERLAPPED a7) -{ - static BOOL (PASCAL *fp)(SOCKET a0, SOCKET a1, PVOID a2, DWORD a3, DWORD a4, DWORD a5, LPDWORD a6, LPOVERLAPPED a7); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub AcceptEx() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "AcceptEx")) == NULL) { - FATAL("cannot find entry AcceptEx (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); -} - -VOID PASCAL -GetAcceptExSockaddrs(PVOID a0, DWORD a1, DWORD a2, DWORD a3, struct sockaddr** a4, LPINT a5, struct sockaddr** a6, LPINT a7) -{ - static VOID (PASCAL *fp)(PVOID a0, DWORD a1, DWORD a2, DWORD a3, struct sockaddr** a4, LPINT a5, struct sockaddr** a6, LPINT a7); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub GetAcceptExSockaddrs() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "GetAcceptExSockaddrs")) == NULL) { - FATAL("cannot find entry GetAcceptExSockaddrs (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); -} - diff --git a/contrib/idn/mdnkit/wsock/wsock11/make.wnt b/contrib/idn/mdnkit/wsock/wsock11/make.wnt deleted file mode 100644 index ddabc1224a..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/make.wnt +++ /dev/null @@ -1,114 +0,0 @@ -# -# Makefile for WinSock Wrapper (for WinSock 1.1) -# - -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -!include - -SYSLIBS = $(libcdll) kernel32.lib advapi32.lib - -# -# Files to use -# - -HDRS = dlldef.h ..\common\jpnicmdn.h -SRCS = dllmain.c dllload.c dllfunc.c dllstub.c -OBJS = dllmain.obj dllload.obj dllfunc.obj -LIBS = ..\common\jpnicmdn.lib - -cflags = $(cflags) -I..\..\include - -# -# Targets to Build -# - -TARGETS = wsock32.dll - -all : $(TARGETS) - -wsock32.dll : wsock32.def $(OBJS) $(LIBS) - $(link) $(dlllflags) /OUT:wsock32.dll /DEF:wsock32.def $(OBJS) $(LIBS) $(SYSLIBS) - -install : $(TARGETS) - copy wsock32.dll ..\bin - -clean : force - -del *.obj - -del *.lib - -del *.dll - -del *.exp - -# -# Dependencies -# - -dllmain.obj : dllmain.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -dllload.obj : dllload.c dllstub.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - - -dllfunc.obj : dllfunc.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -wsock32o.lib : wsock32o.def - LIB /DEF:wsock32o.def /MACHINE:IX86 - -force : - diff --git a/contrib/idn/mdnkit/wsock/wsock11/wsock32.def b/contrib/idn/mdnkit/wsock/wsock11/wsock32.def deleted file mode 100644 index b37a5f792e..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/wsock32.def +++ /dev/null @@ -1,87 +0,0 @@ -; -; Library Defition for mDNS'd WSOCK32.DLL -; -LIBRARY wsock32 -DESCRIPTION "JPNIC/mDNS Wrapper for WSOCK32" -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - MigrateWinsockConfiguration @24 - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - __WSAFDIsSet @151 - WEP @500 - WSApSetPostRoutine @1000 - WsControl @1001 - closesockinfo @1002 - Arecv @1003 - Asend @1004 - WSHEnumProtocols @1005 - inet_network @1100 - getnetbyname @1101 - rcmd @1102 - rexec @1103 - rresvport @1104 - sethostname @1105 - dn_expand @1106 - WSARecvEx @1107 - s_perror @1108 - GetAddressByNameA @1109 - GetAddressByNameW @1110 - EnumProtocolsA @1111 - EnumProtocolsW @1112 - GetTypeByNameA @1113 - GetTypeByNameW @1114 - GetNameByTypeA @1115 - GetNameByTypeW @1116 - SetServiceA @1117 - SetServiceW @1118 - GetServiceA @1119 - GetServiceW @1120 - NPLoadNameSpaces @1130 - NSPStartup @1131 - TransmitFile @1140 - AcceptEx @1141 - GetAcceptExSockaddrs @1142 diff --git a/contrib/idn/mdnkit/wsock/wsock11/wsock32o.def b/contrib/idn/mdnkit/wsock/wsock11/wsock32o.def deleted file mode 100644 index 89443b1a8c..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock11/wsock32o.def +++ /dev/null @@ -1,88 +0,0 @@ -; -; EXPORTS in WSOCK32 -; -LIBRARY wsock32o -DESCRIPTION "WSOCK32 original exports" -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - inet_addr @10 - inet_ntoa @11 - ioctlsocket @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - MigrateWinsockConfiguration @24 - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - __WSAFDIsSet @151 - WEP @500 - WSApSetPostRoutine @1000 - WsControl @1001 - closesockinfo @1002 - Arecv @1003 - Asend @1004 - WSHEnumProtocols @1005 - inet_network @1100 - getnetbyname @1101 - rcmd @1102 - rexec @1103 - rresvport @1104 - sethostname @1105 - dn_expand @1106 - WSARecvEx @1107 - s_perror @1108 - GetAddressByNameA @1109 - GetAddressByNameW @1110 - EnumProtocolsA @1111 - EnumProtocolsW @1112 - GetTypeByNameA @1113 - GetTypeByNameW @1114 - GetNameByTypeA @1115 - GetNameByTypeW @1116 - SetServiceA @1117 - SetServiceW @1118 - GetServiceA @1119 - GetServiceW @1120 - NPLoadNameSpaces @1130 - NSPStartup @1131 - TransmitFile @1140 - AcceptEx @1141 - GetAcceptExSockaddrs @1142 - diff --git a/contrib/idn/mdnkit/wsock/wsock20/dlldef.h b/contrib/idn/mdnkit/wsock/wsock20/dlldef.h deleted file mode 100644 index 17bd74727f..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/dlldef.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * dlldef.h - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#ifndef _DLLDEF_H -#define _DLLDEF_H - -#include "../common/jpnicmdn.h" - -/* - * Execution TRacing - */ - -extern int procPid ; -extern UCHAR procExe[] ; - -#ifdef DEBUG -#define TRACE mdnPrintf("%04x ws20 : ",procPid) ; mdnPrintf -#define FATAL mdnPrintf("%04x ws20 : ",procPid) ; mdnPrintf -#else -#define TRACE -#define FATAL mdnPrintf("%04x ws20 : ",procPid) ; mdnPrintf -#endif - -/* - * Encoding Names and Options - */ - -extern BOOL encodeHere ; -extern CONVPTR encodeCtx ; - -/* - * entry points to wrap - */ - -extern int WSAAPI -_org_gethostname(char FAR * name, int namelen) ; - -extern struct hostent FAR * WSAAPI -_org_gethostbyaddr(const char FAR * addr, int len, int type) ; - -extern struct hostent FAR * WSAAPI -_org_gethostbyname(const char FAR * name) ; - -extern HANDLE WSAAPI -_org_WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR * name, - char FAR * buf,int buflen) ; - -extern HANDLE WSAAPI -_org_WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr, - int len, int type, char FAR * buf, int buflen) ; - -extern INT WSAAPI -_org_WSALookupServiceBeginA(LPWSAQUERYSETA lpqsRestrictions, - DWORD dwControlFlags, - LPHANDLE lphLookup) ; - -extern INT WSAAPI -_org_WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, - DWORD dwControlFlags, - LPHANDLE lphLookup) ; - -extern INT WSAAPI -_org_WSALookupServiceNextA(HANDLE hLookup, - DWORD dwControlFlags, - LPDWORD lpdwBufferLength, - LPWSAQUERYSETA lpqsResults) ; - -extern INT WSAAPI -_org_WSALookupServiceNextW(HANDLE hLookup, - DWORD dwControlFlags, - LPDWORD lpdwBufferLength, - LPWSAQUERYSETW lpqsResults) ; - -extern INT WSAAPI -_org_WSALookupServiceEnd(HANDLE hLookup) ; - -/* - * link above entries - */ - -void linkFree(void) ; -BOOL linkLoad(void) ; - -#endif /* _DLLDEF_H */ diff --git a/contrib/idn/mdnkit/wsock/wsock20/dllfunc.c b/contrib/idn/mdnkit/wsock/wsock20/dllfunc.c deleted file mode 100644 index 3d794b2f4e..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/dllfunc.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * dllfunc.c - wrapper functions - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include -#include - -#include "dlldef.h" - -static GUID guid_habn = SVCID_INET_HOSTADDRBYNAME; -static GUID guid_habis = SVCID_INET_HOSTADDRBYINETSTRING; - -#define SVCID_IS_HABN(p) (memcmp(p, &guid_habn, sizeof(GUID)) == 0) -#define SVCID_IS_HABIS(p) (memcmp(p, &guid_habis, sizeof(GUID)) == 0) - -int -WSAAPI gethostname(char FAR * name, int namelen) -{ - int ret ; - - TRACE("ENTER gethostname\n") ; - ret = _org_gethostname(name, namelen) ; - TRACE("LEAVE gethostname %d <%s>\n", ret, name) ; - - return ret ; -} - -struct hostent FAR * -WSAAPI gethostbyname(const char FAR * name) -{ - struct hostent FAR *ret ; - char nbuff[256] ; - char hbuff[256] ; - BOOL stat ; - - TRACE("ENTER gethostbyname <%s>\n", (name != NULL ? name : "NULL")) ; - - if (encodeHere != TRUE || name == NULL) { - ret = _org_gethostbyname(name) ; - } else { - stat = mdnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvReq failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Name <%s>\n", dumpName(nbuff, hbuff)) ; - ret = _org_gethostbyname(nbuff) ; - } - } - - if (ret != NULL && encodeHere) { - TRACE("Resulting Name <%s>\n", dumpName(ret->h_name, hbuff)) ; - stat = mdnConvRsp(encodeCtx, ret->h_name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvRsp failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Back <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(ret->h_name, nbuff) ; - } - } - - if (ret == NULL) { - TRACE("LEAVE gethostbyname NULL\n") ; - } else { - TRACE("LEAVE gethostbyname <%s>\n", dumpHost(ret, hbuff)) ; - } - return ret ; -} - -struct hostent FAR * -WSAAPI gethostbyaddr(const char FAR * addr, int len, int type) -{ - struct hostent FAR *ret ; - char nbuff[256] ; - char abuff[256] ; - char hbuff[256] ; - BOOL stat ; - - TRACE("ENTER gethostbyaddr <%s>\n", dumpAddr(addr, len, abuff)) ; - - ret = _org_gethostbyaddr(addr, len, type) ; - - if (ret != NULL && encodeHere) { - TRACE("Resulting Name <%s>\n", dumpName(ret->h_name, hbuff)) ; - stat = mdnConvRsp(encodeCtx, ret->h_name, nbuff, sizeof(nbuff)) ; - if (stat == FALSE) { - TRACE("mdnConvRsp failed\n") ; - ret = NULL ; - } else { - TRACE("Converted Back <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(ret->h_name, nbuff) ; - } - } - - if (ret == NULL) { - TRACE("LEAVE gethostbyaddr NULL\n") ; - } else { - TRACE("LEAVE gethostbyaddr <%s>\n", dumpHost(ret, hbuff)) ; - } - return ret ; -} - -HANDLE -WSAAPI WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, - const char FAR * name, char FAR * buf, int buflen) -{ - HANDLE ret ; - char nbuff[256] ; - char hbuff[256] ; - - - TRACE("ENTER WSAAsyncGetHostByName <%s>\n", name) ; - - if (encodeHere != TRUE || name == NULL) { - ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, name, buf, buflen) ; - } else { - mdnHook(hWnd, wMsg, buf, encodeCtx) ; - mdnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)) ; - TRACE("Converted Name <%s>\n", dumpName(nbuff, hbuff)) ; - ret = _org_WSAAsyncGetHostByName(hWnd, wMsg, nbuff, buf, buflen) ; - } - - TRACE("LEAVE WSAAsyncGetHostByName HANDLE %08x\n", ret) ; - - return ret ; -} - -HANDLE -WSAAPI WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, - const char FAR * addr, int len, int type, char FAR * buf, int buflen) -{ - HANDLE ret ; - char abuff[256] ; - - if (encodeHere) { - mdnHook(hWnd, wMsg, buf, encodeCtx) ; - } - - TRACE("ENTER WSAAsyncGetHostByAddr <%s>\n", dumpAddr(addr, len, abuff)) ; - ret = _org_WSAAsyncGetHostByAddr(hWnd, wMsg, addr, len, type, buf, buflen) ; - TRACE("LEAVE WSAAsyncGetHostByAddr HANDLE %08x\n", ret) ; - - return ret ; -} - -INT -WSAAPI WSALookupServiceBeginA(LPWSAQUERYSETA lpqsRestrictions, - DWORD dwControlFlags, LPHANDLE lphLookup) -{ - INT ret ; - char nbuff[256] ; - char hbuff[256] ; - LPSTR name = lpqsRestrictions->lpszServiceInstanceName; - LPGUID class = lpqsRestrictions->lpServiceClassId; - - TRACE("ENTER WSALookupServiceBeginA <%s>\n", - name == NULL ? "" : name) ; - - if (name != NULL && - encodeHere && - SVCID_IS_HABN(class) == 0) { - mdnConvReq(encodeCtx, name, nbuff, sizeof(nbuff)) ; - TRACE("Converted Name <%s>\n", dumpName(nbuff, hbuff)) ; - /* strcpy(lpqsRestrictions->lpszQueryString, nbuff) ; */ - lpqsRestrictions->lpszServiceInstanceName = nbuff; - } - ret = _org_WSALookupServiceBeginA(lpqsRestrictions, - dwControlFlags, lphLookup) ; - TRACE("LEAVE WSALookupServiceBeginA %d\n", ret) ; - - return ret ; -} - -INT -WSAAPI WSALookupServiceNextA(HANDLE hLookup, DWORD dwControlFlags, - LPDWORD lpdwBufferLength, LPWSAQUERYSETA lpqsResults) -{ - INT ret ; - char nbuff[256] ; - char hbuff[256] ; - LPGUID class; - - TRACE("ENTER WSALookupServiceNextA\n") ; - ret = _org_WSALookupServiceNextA(hLookup, - dwControlFlags, lpdwBufferLength, lpqsResults) ; - class = lpqsResults->lpServiceClassId; - - if (ret == 0 && - encodeHere && - (dwControlFlags & LUP_RETURN_NAME) && - (SVCID_IS_HABN(class) || SVCID_IS_HABIS(class))) { - TRACE("Resulting Name <%s>\n", - dumpName(lpqsResults->lpszServiceInstanceName, hbuff)) ; - mdnConvRsp(encodeCtx, - lpqsResults->lpszServiceInstanceName, - nbuff, sizeof(nbuff)) ; - TRACE("Converted Back <%s>\n", dumpName(nbuff, hbuff)) ; - strcpy(lpqsResults->lpszServiceInstanceName, nbuff) ; - } - TRACE("LEAVE WSALookupServiceNextA %d <%s>\n", ret, nbuff) ; - - return ret ; -} - -INT -WSAAPI WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, - DWORD dwControlFlags, LPHANDLE lphLookup) -{ - INT ret ; - - TRACE("ENTER WSALookupServiceBeginW\n") ; - ret = _org_WSALookupServiceBeginW(lpqsRestrictions, - dwControlFlags,lphLookup) ; - TRACE("LEAVE WSALookupServiceBeginW %d\n", ret) ; - - return ret ; -} - -INT -WSAAPI WSALookupServiceNextW(HANDLE hLookup, DWORD dwControlFlags, - LPDWORD lpdwBufferLength, LPWSAQUERYSETW lpqsResults) -{ - INT ret ; - - TRACE("ENTER WSALookupServiceNextW\n") ; - ret = _org_WSALookupServiceNextW(hLookup, - dwControlFlags, lpdwBufferLength, lpqsResults) ; - TRACE("LEAVE WSALookupServiceNextW %d\n", ret) ; - - return ret ; -} - -INT -WSAAPI WSALookupServiceEnd(HANDLE hLookup) -{ - INT ret ; - - TRACE("ENTER WSALookupServiceEnd\n") ; - ret = _org_WSALookupServiceEnd(hLookup) ; - TRACE("LEAVE WSALookupServiceEnd %d\n", ret) ; - - return ret ; -} - - diff --git a/contrib/idn/mdnkit/wsock/wsock20/dllload.c b/contrib/idn/mdnkit/wsock/wsock20/dllload.c deleted file mode 100644 index 9e12d9df7d..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/dllload.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * dllload.c - load original entries - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include -#include - -#include "dlldef.h" - -/* - * Manages original DLL - */ - -static HINSTANCE dllHandle = NULL ; - -/* - * linkFree - dispose module - */ - -void linkFree(void) -{ - if (dllHandle != NULL) { - FreeLibrary(dllHandle) ; - dllHandle = NULL ; - } -} - -/* - * linkLoad - load & link original DLL - */ - -BOOL linkLoad(void) -{ - PUCHAR name ; - - /* - * Load Original DLL - */ - - name = "WS2_32O" ; - - if ((dllHandle = LoadLibrary(name)) == NULL) { - FATAL("linkLoad - no %s\n", name) ; - return FALSE ; - } - - return TRUE ; -} - -#define DLLHANDLE dllHandle -#include "dllstub.c" diff --git a/contrib/idn/mdnkit/wsock/wsock20/dllmain.c b/contrib/idn/mdnkit/wsock/wsock20/dllmain.c deleted file mode 100644 index 0fd3a4bd94..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/dllmain.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * dllmain.c - entry for DLL - */ - -/* - * Copyright (c) 2000 Japan Network Information Center. All rights reserved. - * - * By using this file, you agree to the terms and conditions set forth bellow. - * - * LICENSE TERMS AND CONDITIONS - * - * The following License Terms and Conditions apply, unless a different - * license is obtained from Japan Network Information Center ("JPNIC"), - * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, - * Chiyoda-ku, Tokyo 101-0047, Japan. - * - * 1. Use, Modification and Redistribution (including distribution of any - * modified or derived work) in source and/or binary forms is permitted - * under this License Terms and Conditions. - * - * 2. Redistribution of source code must retain the copyright notices as they - * appear in each source code file, this License Terms and Conditions. - * - * 3. Redistribution in binary form must reproduce the Copyright Notice, - * this License Terms and Conditions, in the documentation and/or other - * materials provided with the distribution. For the purposes of binary - * distribution the "Copyright Notice" refers to the following language: - * "Copyright (c) Japan Network Information Center. All rights reserved." - * - * 4. Neither the name of JPNIC may be used to endorse or promote products - * derived from this Software without specific prior written approval of - * JPNIC. - * - * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - * 6. Indemnification by Licensee - * Any person or entities using and/or redistributing this Software under - * this License Terms and Conditions shall defend indemnify and hold - * harmless JPNIC from and against any and all judgements damages, - * expenses, settlement liabilities, cost and other liabilities of any - * kind as a result of use and redistribution of this Software or any - * claim, suite, action, litigation or proceeding by any third party - * arising out of or relates to this License Terms and Conditions. - * - * 7. Governing Law, Jurisdiction and Venue - * This License Terms and Conditions shall be governed by and and - * construed in accordance with the law of Japan. Any person or entities - * using and/or redistributing this Software under this License Terms and - * Conditions hereby agrees and consent to the personal and exclusive - * jurisdiction and venue of Tokyo District Court of Japan. - */ - -#include -#include -#include -#include -#include - -#include "dlldef.h" - -/* - * Control Variables - */ - -int procPid = 0 ; -UCHAR procExe[256] = { 0 } ; - -BOOL encodeHere = FALSE ; -CONVPTR encodeCtx = NULL ; - -/* - * DLL Entry - */ - -BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, LPVOID *resv) -{ - switch (reason) { - case DLL_PROCESS_ATTACH : - procPid = getpid() ; - GetModuleFileName(NULL, procExe, 256) ; - - TRACE("Attached to Process <%s>\n", procExe) ; - - if (linkLoad() != TRUE) { - FATAL("cannot link to original DLL\n") ; - return FALSE ; - } - - mdnLogInit() ; - mdnHookInit() ; - - switch (mdnEncodeWhere()) { - case MDN_ENCODE_ALWAYS : - case MDN_ENCODE_ONLY20 : - case MDN_ENCODE_CHECK : - encodeHere = TRUE ; - break ; - default : - encodeHere = FALSE ; - break ; - } - - if (encodeHere == FALSE) { - TRACE("not encode here\n") ; - } else { - encodeCtx = mdnConvInit() ; - TRACE("Context %08x\n", encodeCtx) ; - } - break ; - - case DLL_PROCESS_DETACH : - if (encodeCtx != NULL) { - mdnConvDone(encodeCtx) ; - } - mdnHookDone() ; - linkFree() ; - TRACE("Deatched from Process\n") ; - break ; - - case DLL_THREAD_ATTACH : - break ; - case DLL_THREAD_DETACH : - break ; - } - return TRUE ; -} diff --git a/contrib/idn/mdnkit/wsock/wsock20/dllstub.c b/contrib/idn/mdnkit/wsock/wsock20/dllstub.c deleted file mode 100644 index 24bf0c1697..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/dllstub.c +++ /dev/null @@ -1,2035 +0,0 @@ -/* $Id: dllstub.c,v 1.2 2002/02/08 05:42:23 marka Exp $ */ - -SOCKET PASCAL -accept(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static SOCKET (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub accept() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "accept")) == NULL) { - FATAL("cannot find entry accept (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -bind(SOCKET a0, const struct sockaddr* a1, int a2) -{ - static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub bind() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "bind")) == NULL) { - FATAL("cannot find entry bind (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -closesocket(SOCKET a0) -{ - static int (PASCAL *fp)(SOCKET a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub closesocket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "closesocket")) == NULL) { - FATAL("cannot find entry closesocket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -connect(SOCKET a0, const struct sockaddr* a1, int a2) -{ - static int (PASCAL *fp)(SOCKET a0, const struct sockaddr* a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub connect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "connect")) == NULL) { - FATAL("cannot find entry connect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getpeername(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getpeername() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getpeername")) == NULL) { - FATAL("cannot find entry getpeername (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getsockname(SOCKET a0, struct sockaddr* a1, int* a2) -{ - static int (PASCAL *fp)(SOCKET a0, struct sockaddr* a1, int* a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getsockname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getsockname")) == NULL) { - FATAL("cannot find entry getsockname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -getsockopt(SOCKET a0, int a1, int a2, char* a3, int* a4) -{ - static int (PASCAL *fp)(SOCKET a0, int a1, int a2, char* a3, int* a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getsockopt() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getsockopt")) == NULL) { - FATAL("cannot find entry getsockopt (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -u_long PASCAL -htonl(u_long a0) -{ - static u_long (PASCAL *fp)(u_long a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub htonl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "htonl")) == NULL) { - FATAL("cannot find entry htonl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -u_short PASCAL -htons(u_short a0) -{ - static u_short (PASCAL *fp)(u_short a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub htons() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "htons")) == NULL) { - FATAL("cannot find entry htons (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -ioctlsocket(SOCKET a0, long a1, u_long * a2) -{ - static int (PASCAL *fp)(SOCKET a0, long a1, u_long * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ioctlsocket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ioctlsocket")) == NULL) { - FATAL("cannot find entry ioctlsocket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -unsigned long PASCAL -inet_addr(const char* a0) -{ - static unsigned long (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub inet_addr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "inet_addr")) == NULL) { - FATAL("cannot find entry inet_addr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - char * PASCAL -inet_ntoa(struct in_addr a0) -{ - static char * (PASCAL *fp)(struct in_addr a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub inet_ntoa() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "inet_ntoa")) == NULL) { - FATAL("cannot find entry inet_ntoa (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -listen(SOCKET a0, int a1) -{ - static int (PASCAL *fp)(SOCKET a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub listen() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "listen")) == NULL) { - FATAL("cannot find entry listen (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -u_long PASCAL -ntohl(u_long a0) -{ - static u_long (PASCAL *fp)(u_long a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ntohl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ntohl")) == NULL) { - FATAL("cannot find entry ntohl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -u_short PASCAL -ntohs(u_short a0) -{ - static u_short (PASCAL *fp)(u_short a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub ntohs() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "ntohs")) == NULL) { - FATAL("cannot find entry ntohs (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -recv(SOCKET a0, char* a1, int a2, int a3) -{ - static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub recv() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "recv")) == NULL) { - FATAL("cannot find entry recv (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -recvfrom(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5) -{ - static int (PASCAL *fp)(SOCKET a0, char* a1, int a2, int a3, struct sockaddr* a4, int* a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub recvfrom() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "recvfrom")) == NULL) { - FATAL("cannot find entry recvfrom (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -select(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4) -{ - static int (PASCAL *fp)(int a0, fd_set* a1, fd_set* a2, fd_set* a3, const struct timeval* a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub select() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "select")) == NULL) { - FATAL("cannot find entry select (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int PASCAL -send(SOCKET a0, const char* a1, int a2, int a3) -{ - static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub send() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "send")) == NULL) { - FATAL("cannot find entry send (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int PASCAL -sendto(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5) -{ - static int (PASCAL *fp)(SOCKET a0, const char* a1, int a2, int a3, const struct sockaddr* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub sendto() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "sendto")) == NULL) { - FATAL("cannot find entry sendto (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -setsockopt(SOCKET a0, int a1, int a2, const char* a3, int a4) -{ - static int (PASCAL *fp)(SOCKET a0, int a1, int a2, const char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub setsockopt() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "setsockopt")) == NULL) { - FATAL("cannot find entry setsockopt (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int PASCAL -shutdown(SOCKET a0, int a1) -{ - static int (PASCAL *fp)(SOCKET a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub shutdown() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "shutdown")) == NULL) { - FATAL("cannot find entry shutdown (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -SOCKET PASCAL -socket(int a0, int a1, int a2) -{ - static SOCKET (PASCAL *fp)(int a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub socket() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "socket")) == NULL) { - FATAL("cannot find entry socket (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int PASCAL -WSApSetPostRoutine(int a0) -{ - static int (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSApSetPostRoutine() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSApSetPostRoutine")) == NULL) { - FATAL("cannot find entry WSApSetPostRoutine (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -WSAEVENT WSAAPI -WPUCompleteOverlappedRequest(SOCKET a0, LPWSAOVERLAPPED a1, DWORD a2, DWORD a3, LPINT a4) -{ - static WSAEVENT (WSAAPI *fp)(SOCKET a0, LPWSAOVERLAPPED a1, DWORD a2, DWORD a3, LPINT a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WPUCompleteOverlappedRequest() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WPUCompleteOverlappedRequest")) == NULL) { - FATAL("cannot find entry WPUCompleteOverlappedRequest (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -SOCKET WINAPI -WSAAccept(SOCKET a0, struct sockaddr * a1, LPINT a2, LPCONDITIONPROC a3, DWORD a4) -{ - static SOCKET (WINAPI *fp)(SOCKET a0, struct sockaddr * a1, LPINT a2, LPCONDITIONPROC a3, DWORD a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAccept() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAccept")) == NULL) { - FATAL("cannot find entry WSAAccept (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -INT WINAPI -WSAAddressToStringA(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOA a2, LPSTR a3, LPDWORD a4) -{ - static INT (WINAPI *fp)(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOA a2, LPSTR a3, LPDWORD a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAddressToStringA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAddressToStringA")) == NULL) { - FATAL("cannot find entry WSAAddressToStringA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -INT WINAPI -WSAAddressToStringW(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOW a2, LPWSTR a3, LPDWORD a4) -{ - static INT (WINAPI *fp)(LPSOCKADDR a0, DWORD a1, LPWSAPROTOCOL_INFOW a2, LPWSTR a3, LPDWORD a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAddressToStringW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAddressToStringW")) == NULL) { - FATAL("cannot find entry WSAAddressToStringW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -BOOL WINAPI -WSACloseEvent(WSAEVENT a0) -{ - static BOOL (WINAPI *fp)(WSAEVENT a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACloseEvent() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACloseEvent")) == NULL) { - FATAL("cannot find entry WSACloseEvent (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int WINAPI -WSAConnect(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6) -{ - static int (WINAPI *fp)(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAConnect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAConnect")) == NULL) { - FATAL("cannot find entry WSAConnect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -WSAEVENT WINAPI -WSACreateEvent(void) -{ - static WSAEVENT (WINAPI *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACreateEvent() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACreateEvent")) == NULL) { - FATAL("cannot find entry WSACreateEvent (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int WINAPI -WSADuplicateSocketA(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOA a2) -{ - static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOA a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSADuplicateSocketA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSADuplicateSocketA")) == NULL) { - FATAL("cannot find entry WSADuplicateSocketA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSADuplicateSocketW(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOW a2) -{ - static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPWSAPROTOCOL_INFOW a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSADuplicateSocketW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSADuplicateSocketW")) == NULL) { - FATAL("cannot find entry WSADuplicateSocketW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -WSAEnumNameSpaceProvidersA(LPDWORD a0, LPWSANAMESPACE_INFOA a1) -{ - static INT (WINAPI *fp)(LPDWORD a0, LPWSANAMESPACE_INFOA a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEnumNameSpaceProvidersA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNameSpaceProvidersA")) == NULL) { - FATAL("cannot find entry WSAEnumNameSpaceProvidersA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -INT WINAPI -WSAEnumNameSpaceProvidersW(LPDWORD a0, LPWSANAMESPACE_INFOW a1) -{ - static INT (WINAPI *fp)(LPDWORD a0, LPWSANAMESPACE_INFOW a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEnumNameSpaceProvidersW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNameSpaceProvidersW")) == NULL) { - FATAL("cannot find entry WSAEnumNameSpaceProvidersW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int WINAPI -WSAEnumNetworkEvents(SOCKET a0, WSAEVENT a1, LPWSANETWORKEVENTS a2) -{ - static int (WINAPI *fp)(SOCKET a0, WSAEVENT a1, LPWSANETWORKEVENTS a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEnumNetworkEvents() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEnumNetworkEvents")) == NULL) { - FATAL("cannot find entry WSAEnumNetworkEvents (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSAEnumProtocolsA(LPINT a0, LPWSAPROTOCOL_INFOA a1, LPDWORD a2) -{ - static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOA a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEnumProtocolsA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEnumProtocolsA")) == NULL) { - FATAL("cannot find entry WSAEnumProtocolsA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSAEnumProtocolsW(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2) -{ - static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEnumProtocolsW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEnumProtocolsW")) == NULL) { - FATAL("cannot find entry WSAEnumProtocolsW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSAEventSelect(SOCKET a0, WSAEVENT a1, long a2) -{ - static int (WINAPI *fp)(SOCKET a0, WSAEVENT a1, long a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAEventSelect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAEventSelect")) == NULL) { - FATAL("cannot find entry WSAEventSelect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -BOOL WINAPI -WSAGetOverlappedResult(SOCKET a0, LPWSAOVERLAPPED a1, LPDWORD a2, BOOL a3, LPDWORD a4) -{ - static BOOL (WINAPI *fp)(SOCKET a0, LPWSAOVERLAPPED a1, LPDWORD a2, BOOL a3, LPDWORD a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetOverlappedResult() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetOverlappedResult")) == NULL) { - FATAL("cannot find entry WSAGetOverlappedResult (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -BOOL WINAPI -WSAGetQOSByName(SOCKET a0, LPWSABUF a1, LPQOS a2) -{ - static BOOL (WINAPI *fp)(SOCKET a0, LPWSABUF a1, LPQOS a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetQOSByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetQOSByName")) == NULL) { - FATAL("cannot find entry WSAGetQOSByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -WSAGetServiceClassInfoA(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOA a3) -{ - static INT (WINAPI *fp)(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOA a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetServiceClassInfoA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassInfoA")) == NULL) { - FATAL("cannot find entry WSAGetServiceClassInfoA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -INT WINAPI -WSAGetServiceClassInfoW(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOW a3) -{ - static INT (WINAPI *fp)(LPGUID a0, LPGUID a1, LPDWORD a2, LPWSASERVICECLASSINFOW a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetServiceClassInfoW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassInfoW")) == NULL) { - FATAL("cannot find entry WSAGetServiceClassInfoW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -INT WINAPI -WSAGetServiceClassNameByClassIdA(LPGUID a0, LPSTR a1, LPDWORD a2) -{ - static INT (WINAPI *fp)(LPGUID a0, LPSTR a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetServiceClassNameByClassIdA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassNameByClassIdA")) == NULL) { - FATAL("cannot find entry WSAGetServiceClassNameByClassIdA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -WSAGetServiceClassNameByClassIdW(LPGUID a0, LPWSTR a1, LPDWORD a2) -{ - static INT (WINAPI *fp)(LPGUID a0, LPWSTR a1, LPDWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetServiceClassNameByClassIdW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetServiceClassNameByClassIdW")) == NULL) { - FATAL("cannot find entry WSAGetServiceClassNameByClassIdW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSAHtonl(SOCKET a0, unsigned long a1, unsigned long * a2) -{ - static int (WINAPI *fp)(SOCKET a0, unsigned long a1, unsigned long * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAHtonl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAHtonl")) == NULL) { - FATAL("cannot find entry WSAHtonl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSAHtons(SOCKET a0, unsigned short a1, unsigned short * a2) -{ - static int (WINAPI *fp)(SOCKET a0, unsigned short a1, unsigned short * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAHtons() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAHtons")) == NULL) { - FATAL("cannot find entry WSAHtons (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -WSAInstallServiceClassA(LPWSASERVICECLASSINFOA a0) -{ - static INT (WINAPI *fp)(LPWSASERVICECLASSINFOA a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAInstallServiceClassA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAInstallServiceClassA")) == NULL) { - FATAL("cannot find entry WSAInstallServiceClassA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -INT WINAPI -WSAInstallServiceClassW(LPWSASERVICECLASSINFOW a0) -{ - static INT (WINAPI *fp)(LPWSASERVICECLASSINFOW a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAInstallServiceClassW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAInstallServiceClassW")) == NULL) { - FATAL("cannot find entry WSAInstallServiceClassW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int WINAPI -WSAIoctl(SOCKET a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) -{ - static int (WINAPI *fp)(SOCKET a0, DWORD a1, LPVOID a2, DWORD a3, LPVOID a4, DWORD a5, LPDWORD a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAIoctl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAIoctl")) == NULL) { - FATAL("cannot find entry WSAIoctl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); -} - - struct hostent * PASCAL -_org_gethostbyaddr(const char* a0, int a1, int a2) -{ - static struct hostent * (PASCAL *fp)(const char* a0, int a1, int a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostbyaddr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostbyaddr")) == NULL) { - FATAL("cannot find entry gethostbyaddr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - - struct hostent * PASCAL -_org_gethostbyname(const char* a0) -{ - static struct hostent * (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostbyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostbyname")) == NULL) { - FATAL("cannot find entry gethostbyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct protoent * PASCAL -getprotobyname(const char* a0) -{ - static struct protoent * (PASCAL *fp)(const char* a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getprotobyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getprotobyname")) == NULL) { - FATAL("cannot find entry getprotobyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct protoent * PASCAL -getprotobynumber(int a0) -{ - static struct protoent * (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getprotobynumber() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getprotobynumber")) == NULL) { - FATAL("cannot find entry getprotobynumber (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - - struct servent * PASCAL -getservbyname(const char* a0, const char* a1) -{ - static struct servent * (PASCAL *fp)(const char* a0, const char* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getservbyname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getservbyname")) == NULL) { - FATAL("cannot find entry getservbyname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - - struct servent * PASCAL -getservbyport(int a0, const char* a1) -{ - static struct servent * (PASCAL *fp)(int a0, const char* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub getservbyport() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "getservbyport")) == NULL) { - FATAL("cannot find entry getservbyport (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -_org_gethostname(char* a0, int a1) -{ - static int (PASCAL *fp)(char* a0, int a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_gethostname() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "gethostname")) == NULL) { - FATAL("cannot find entry gethostname (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -SOCKET WINAPI -WSAJoinLeaf(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6, DWORD a7) -{ - static SOCKET (WINAPI *fp)(SOCKET a0, const struct sockaddr * a1, int a2, LPWSABUF a3, LPWSABUF a4, LPQOS a5, LPQOS a6, DWORD a7); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAJoinLeaf() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAJoinLeaf")) == NULL) { - FATAL("cannot find entry WSAJoinLeaf (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7); -} - -INT WINAPI -_org_WSALookupServiceBeginA(LPWSAQUERYSETA a0, DWORD a1, LPHANDLE a2) -{ - static INT (WINAPI *fp)(LPWSAQUERYSETA a0, DWORD a1, LPHANDLE a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSALookupServiceBeginA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceBeginA")) == NULL) { - FATAL("cannot find entry WSALookupServiceBeginA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -_org_WSALookupServiceBeginW(LPWSAQUERYSETW a0, DWORD a1, LPHANDLE a2) -{ - static INT (WINAPI *fp)(LPWSAQUERYSETW a0, DWORD a1, LPHANDLE a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSALookupServiceBeginW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceBeginW")) == NULL) { - FATAL("cannot find entry WSALookupServiceBeginW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -_org_WSALookupServiceEnd(HANDLE a0) -{ - static INT (WINAPI *fp)(HANDLE a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSALookupServiceEnd() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceEnd")) == NULL) { - FATAL("cannot find entry WSALookupServiceEnd (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -INT WINAPI -_org_WSALookupServiceNextA(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETA a3) -{ - static INT (WINAPI *fp)(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETA a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSALookupServiceNextA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceNextA")) == NULL) { - FATAL("cannot find entry WSALookupServiceNextA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -INT WINAPI -_org_WSALookupServiceNextW(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETW a3) -{ - static INT (WINAPI *fp)(HANDLE a0, DWORD a1, LPDWORD a2, LPWSAQUERYSETW a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSALookupServiceNextW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSALookupServiceNextW")) == NULL) { - FATAL("cannot find entry WSALookupServiceNextW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int WINAPI -WSANtohl(SOCKET a0, unsigned long a1, unsigned long * a2) -{ - static int (WINAPI *fp)(SOCKET a0, unsigned long a1, unsigned long * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSANtohl() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSANtohl")) == NULL) { - FATAL("cannot find entry WSANtohl (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSANtohs(SOCKET a0, unsigned short a1, unsigned short * a2) -{ - static int (WINAPI *fp)(SOCKET a0, unsigned short a1, unsigned short * a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSANtohs() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSANtohs")) == NULL) { - FATAL("cannot find entry WSANtohs (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WSAAPI -WSAProviderConfigChange(LPHANDLE a0, LPWSAOVERLAPPED a1, LPWSAOVERLAPPED_COMPLETION_ROUTINE a2) -{ - static int (WSAAPI *fp)(LPHANDLE a0, LPWSAOVERLAPPED a1, LPWSAOVERLAPPED_COMPLETION_ROUTINE a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAProviderConfigChange() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAProviderConfigChange")) == NULL) { - FATAL("cannot find entry WSAProviderConfigChange (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -int WINAPI -WSARecv(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSARecv() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSARecv")) == NULL) { - FATAL("cannot find entry WSARecv (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -int WINAPI -WSARecvDisconnect(SOCKET a0, LPWSABUF a1) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSARecvDisconnect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSARecvDisconnect")) == NULL) { - FATAL("cannot find entry WSARecvDisconnect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int WINAPI -WSARecvFrom(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, struct sockaddr * a5, LPINT a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, LPDWORD a4, struct sockaddr * a5, LPINT a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSARecvFrom() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSARecvFrom")) == NULL) { - FATAL("cannot find entry WSARecvFrom (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); -} - -INT WINAPI -WSARemoveServiceClass(LPGUID a0) -{ - static INT (WINAPI *fp)(LPGUID a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSARemoveServiceClass() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSARemoveServiceClass")) == NULL) { - FATAL("cannot find entry WSARemoveServiceClass (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -BOOL WINAPI -WSAResetEvent(WSAEVENT a0) -{ - static BOOL (WINAPI *fp)(WSAEVENT a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAResetEvent() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAResetEvent")) == NULL) { - FATAL("cannot find entry WSAResetEvent (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int WINAPI -WSASend(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, LPWSAOVERLAPPED a5, LPWSAOVERLAPPED_COMPLETION_ROUTINE a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASend() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASend")) == NULL) { - FATAL("cannot find entry WSASend (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -int WINAPI -WSASendDisconnect(SOCKET a0, LPWSABUF a1) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASendDisconnect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASendDisconnect")) == NULL) { - FATAL("cannot find entry WSASendDisconnect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int WINAPI -WSASendTo(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, const struct sockaddr * a5, int a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8) -{ - static int (WINAPI *fp)(SOCKET a0, LPWSABUF a1, DWORD a2, LPDWORD a3, DWORD a4, const struct sockaddr * a5, int a6, LPWSAOVERLAPPED a7, LPWSAOVERLAPPED_COMPLETION_ROUTINE a8); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASendTo() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASendTo")) == NULL) { - FATAL("cannot find entry WSASendTo (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6, a7, a8); -} - -BOOL WINAPI -WSASetEvent(WSAEVENT a0) -{ - static BOOL (WINAPI *fp)(WSAEVENT a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetEvent() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetEvent")) == NULL) { - FATAL("cannot find entry WSASetEvent (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -INT WSAAPI -WSASetServiceA(LPWSAQUERYSETA a0, WSAESETSERVICEOP a1, DWORD a2) -{ - static INT (WSAAPI *fp)(LPWSAQUERYSETA a0, WSAESETSERVICEOP a1, DWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetServiceA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetServiceA")) == NULL) { - FATAL("cannot find entry WSASetServiceA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -INT WINAPI -WSASetServiceW(LPWSAQUERYSETW a0, WSAESETSERVICEOP a1, DWORD a2) -{ - static INT (WINAPI *fp)(LPWSAQUERYSETW a0, WSAESETSERVICEOP a1, DWORD a2); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetServiceW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetServiceW")) == NULL) { - FATAL("cannot find entry WSASetServiceW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2); -} - -SOCKET WINAPI -WSASocketA(int a0, int a1, int a2, LPWSAPROTOCOL_INFOA a3, GROUP a4, DWORD a5) -{ - static SOCKET (WINAPI *fp)(int a0, int a1, int a2, LPWSAPROTOCOL_INFOA a3, GROUP a4, DWORD a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASocketA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASocketA")) == NULL) { - FATAL("cannot find entry WSASocketA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -SOCKET WINAPI -WSASocketW(int a0, int a1, int a2, LPWSAPROTOCOL_INFOW a3, GROUP a4, DWORD a5) -{ - static SOCKET (WINAPI *fp)(int a0, int a1, int a2, LPWSAPROTOCOL_INFOW a3, GROUP a4, DWORD a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASocketW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASocketW")) == NULL) { - FATAL("cannot find entry WSASocketW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -INT WINAPI -WSAStringToAddressA(LPSTR a0, INT a1, LPWSAPROTOCOL_INFOA a2, LPSOCKADDR a3, LPINT a4) -{ - static INT (WINAPI *fp)(LPSTR a0, INT a1, LPWSAPROTOCOL_INFOA a2, LPSOCKADDR a3, LPINT a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAStringToAddressA() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAStringToAddressA")) == NULL) { - FATAL("cannot find entry WSAStringToAddressA (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -INT WINAPI -WSAStringToAddressW(LPWSTR a0, INT a1, LPWSAPROTOCOL_INFOW a2, LPSOCKADDR a3, LPINT a4) -{ - static INT (WINAPI *fp)(LPWSTR a0, INT a1, LPWSAPROTOCOL_INFOW a2, LPSOCKADDR a3, LPINT a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAStringToAddressW() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAStringToAddressW")) == NULL) { - FATAL("cannot find entry WSAStringToAddressW (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -DWORD WINAPI -WSAWaitForMultipleEvents(DWORD a0, const WSAEVENT * a1, BOOL a2, DWORD a3, BOOL a4) -{ - static DWORD (WINAPI *fp)(DWORD a0, const WSAEVENT * a1, BOOL a2, DWORD a3, BOOL a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAWaitForMultipleEvents() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAWaitForMultipleEvents")) == NULL) { - FATAL("cannot find entry WSAWaitForMultipleEvents (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int WINAPI -WSCDeinstallProvider(LPGUID a0, LPINT a1) -{ - static int (WINAPI *fp)(LPGUID a0, LPINT a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCDeinstallProvider() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCDeinstallProvider")) == NULL) { - FATAL("cannot find entry WSCDeinstallProvider (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int WINAPI -WSCEnableNSProvider(LPGUID a0, BOOL a1) -{ - static int (WINAPI *fp)(LPGUID a0, BOOL a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCEnableNSProvider() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCEnableNSProvider")) == NULL) { - FATAL("cannot find entry WSCEnableNSProvider (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int WINAPI -WSCEnumProtocols(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2, LPINT a3) -{ - static int (WINAPI *fp)(LPINT a0, LPWSAPROTOCOL_INFOW a1, LPDWORD a2, LPINT a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCEnumProtocols() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCEnumProtocols")) == NULL) { - FATAL("cannot find entry WSCEnumProtocols (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int WINAPI -WSCGetProviderPath(LPGUID a0, LPWSTR a1, LPINT a2, LPINT a3) -{ - static int (WINAPI *fp)(LPGUID a0, LPWSTR a1, LPINT a2, LPINT a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCGetProviderPath() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCGetProviderPath")) == NULL) { - FATAL("cannot find entry WSCGetProviderPath (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -int WINAPI -WSCInstallNameSpace(LPWSTR a0, LPWSTR a1, DWORD a2, DWORD a3, LPGUID a4) -{ - static int (WINAPI *fp)(LPWSTR a0, LPWSTR a1, DWORD a2, DWORD a3, LPGUID a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCInstallNameSpace() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCInstallNameSpace")) == NULL) { - FATAL("cannot find entry WSCInstallNameSpace (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int WINAPI -WSCInstallProvider(const LPGUID a0, const LPWSTR a1, const LPWSAPROTOCOL_INFOW a2, DWORD a3, LPINT a4) -{ - static int (WINAPI *fp)(const LPGUID a0, const LPWSTR a1, const LPWSAPROTOCOL_INFOW a2, DWORD a3, LPINT a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCInstallProvider() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCInstallProvider")) == NULL) { - FATAL("cannot find entry WSCInstallProvider (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -int WINAPI -WSCUnInstallNameSpace(LPGUID a0) -{ - static int (WINAPI *fp)(LPGUID a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSCUnInstallNameSpace() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSCUnInstallNameSpace")) == NULL) { - FATAL("cannot find entry WSCUnInstallNameSpace (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -WSAAsyncSelect(SOCKET a0, HWND a1, u_int a2, long a3) -{ - static int (PASCAL *fp)(SOCKET a0, HWND a1, u_int a2, long a3); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncSelect() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncSelect")) == NULL) { - FATAL("cannot find entry WSAAsyncSelect (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3); -} - -HANDLE PASCAL -_org_WSAAsyncGetHostByAddr(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, int a3, int a4, char* a5, int a6); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSAAsyncGetHostByAddr() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByAddr")) == NULL) { - FATAL("cannot find entry WSAAsyncGetHostByAddr (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5, a6); -} - -HANDLE PASCAL -_org_WSAAsyncGetHostByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub _org_WSAAsyncGetHostByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetHostByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetHostByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetProtoByNumber(HWND a0, u_int a1, int a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetProtoByNumber() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByNumber")) == NULL) { - FATAL("cannot find entry WSAAsyncGetProtoByNumber (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetProtoByName(HWND a0, u_int a1, const char* a2, char* a3, int a4) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, char* a3, int a4); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetProtoByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetProtoByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetProtoByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4); -} - -HANDLE PASCAL -WSAAsyncGetServByPort(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, int a2, const char* a3, char* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetServByPort() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByPort")) == NULL) { - FATAL("cannot find entry WSAAsyncGetServByPort (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -HANDLE PASCAL -WSAAsyncGetServByName(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5) -{ - static HANDLE (PASCAL *fp)(HWND a0, u_int a1, const char* a2, const char* a3, char* a4, int a5); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAAsyncGetServByName() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAAsyncGetServByName")) == NULL) { - FATAL("cannot find entry WSAAsyncGetServByName (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1, a2, a3, a4, a5); -} - -int PASCAL -WSACancelAsyncRequest(HANDLE a0) -{ - static int (PASCAL *fp)(HANDLE a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACancelAsyncRequest() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACancelAsyncRequest")) == NULL) { - FATAL("cannot find entry WSACancelAsyncRequest (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -FARPROC PASCAL -WSASetBlockingHook(FARPROC a0) -{ - static FARPROC (PASCAL *fp)(FARPROC a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetBlockingHook() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetBlockingHook")) == NULL) { - FATAL("cannot find entry WSASetBlockingHook (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0); -} - -int PASCAL -WSAUnhookBlockingHook(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAUnhookBlockingHook() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAUnhookBlockingHook")) == NULL) { - FATAL("cannot find entry WSAUnhookBlockingHook (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -WSAGetLastError(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAGetLastError() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAGetLastError")) == NULL) { - FATAL("cannot find entry WSAGetLastError (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -void PASCAL -WSASetLastError(int a0) -{ - static void (PASCAL *fp)(int a0); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSASetLastError() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSASetLastError")) == NULL) { - FATAL("cannot find entry WSASetLastError (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - (*fp)(a0); -} - -int PASCAL -WSACancelBlockingCall(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACancelBlockingCall() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACancelBlockingCall")) == NULL) { - FATAL("cannot find entry WSACancelBlockingCall (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -BOOL PASCAL -WSAIsBlocking(void) -{ - static BOOL (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAIsBlocking() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAIsBlocking")) == NULL) { - FATAL("cannot find entry WSAIsBlocking (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -WSAStartup(WORD a0, LPWSADATA a1) -{ - static int (PASCAL *fp)(WORD a0, LPWSADATA a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSAStartup() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSAStartup")) == NULL) { - FATAL("cannot find entry WSAStartup (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -WSACleanup(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WSACleanup() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WSACleanup")) == NULL) { - FATAL("cannot find entry WSACleanup (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - -int PASCAL -__WSAFDIsSet(SOCKET a0, fd_set* a1) -{ - static int (PASCAL *fp)(SOCKET a0, fd_set* a1); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub __WSAFDIsSet() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "__WSAFDIsSet")) == NULL) { - FATAL("cannot find entry __WSAFDIsSet (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(a0, a1); -} - -int PASCAL -WEP(void) -{ - static int (PASCAL *fp)(void); - -#ifdef DEBUG_STUB - mdnLogPrintf(mdn_log_level_trace, "stub WEP() called\n"); -#endif - if (fp == NULL) { - void *p; - if ((p = GetProcAddress(DLLHANDLE, "WEP")) == NULL) { - FATAL("cannot find entry WEP (%d)\n", GetLastError()); - abort(); - } - fp = p; - } - return (*fp)(); -} - diff --git a/contrib/idn/mdnkit/wsock/wsock20/make.wnt b/contrib/idn/mdnkit/wsock/wsock20/make.wnt deleted file mode 100644 index e9d8985a1a..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/make.wnt +++ /dev/null @@ -1,113 +0,0 @@ -# -# Makefile for WinSock Wrapper (for WinSock 2.0) -# - -# Copyright (c) 2000 Japan Network Information Center. All rights reserved. -# -# By using this file, you agree to the terms and conditions set forth bellow. -# -# LICENSE TERMS AND CONDITIONS -# -# The following License Terms and Conditions apply, unless a different -# license is obtained from Japan Network Information Center ("JPNIC"), -# a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, -# Chiyoda-ku, Tokyo 101-0047, Japan. -# -# 1. Use, Modification and Redistribution (including distribution of any -# modified or derived work) in source and/or binary forms is permitted -# under this License Terms and Conditions. -# -# 2. Redistribution of source code must retain the copyright notices as they -# appear in each source code file, this License Terms and Conditions. -# -# 3. Redistribution in binary form must reproduce the Copyright Notice, -# this License Terms and Conditions, in the documentation and/or other -# materials provided with the distribution. For the purposes of binary -# distribution the "Copyright Notice" refers to the following language: -# "Copyright (c) Japan Network Information Center. All rights reserved." -# -# 4. Neither the name of JPNIC may be used to endorse or promote products -# derived from this Software without specific prior written approval of -# JPNIC. -# -# 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -# -# 6. Indemnification by Licensee -# Any person or entities using and/or redistributing this Software under -# this License Terms and Conditions shall defend indemnify and hold -# harmless JPNIC from and against any and all judgements damages, -# expenses, settlement liabilities, cost and other liabilities of any -# kind as a result of use and redistribution of this Software or any -# claim, suite, action, litigation or proceeding by any third party -# arising out of or relates to this License Terms and Conditions. -# -# 7. Governing Law, Jurisdiction and Venue -# This License Terms and Conditions shall be governed by and and -# construed in accordance with the law of Japan. Any person or entities -# using and/or redistributing this Software under this License Terms and -# Conditions hereby agrees and consent to the personal and exclusive -# jurisdiction and venue of Tokyo District Court of Japan. - -!include - -SYSLIBS = $(libcdll) kernel32.lib advapi32.lib - -# -# Files to use -# - -HDRS = dlldef.h ..\common\jpnicmdn.h -SRCS = dllmain.c dllload.obj dllfunc.c dllstub.c -OBJS = dllmain.obj dllload.obj dllfunc.obj -LIBS = ..\common\jpnicmdn.lib - -cflags = $(cflags) -I..\..\include - -# -# Targets to Build -# - -TARGETS = ws2_32.dll - -all : $(TARGETS) - -ws2_32.dll : ws2_32.def $(OBJS) $(LIBS) - $(link) $(dlllflags) /OUT:ws2_32.dll /DEF:ws2_32.def $(OBJS) $(LIBS) $(SYSLIBS) - -install : $(TARGETS) - copy ws2_32.dll ..\bin - -clean : force - -del *.obj - -del *.lib - -del *.dll - -del *.exp - -# -# Dependencies -# - -dllmain.obj : dllmain.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -dllload.obj : dllload.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -dllfunc.obj : dllfunc.c dllstub.c $(HDRS) - $(cc) $(cflags) $(cvarsdll) -DDEBUG $*.c - -ws2_32o.lib : ws2_32o.def - LIB /DEF:ws2_32o.def /MACHINE:IX86 - -force: - diff --git a/contrib/idn/mdnkit/wsock/wsock20/ws2_32.def b/contrib/idn/mdnkit/wsock/wsock20/ws2_32.def deleted file mode 100644 index c0527f28ed..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/ws2_32.def +++ /dev/null @@ -1,113 +0,0 @@ -; -; Library Defition for mDNS'd WS2_32.DLL -; -LIBRARY ws2_32 -DESCRIPTION "JPNIC/mDNS Warpper for WS2_32" -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - ioctlsocket @10 - inet_addr @11 - inet_ntoa @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - WSApSetPostRoutine @24 - WPUCompleteOverlappedRequest @25 - WSAAccept @26 - WSAAddressToStringA @27 - WSAAddressToStringW @28 - WSACloseEvent @29 - WSAConnect @30 - WSACreateEvent @31 - WSADuplicateSocketA @32 - WSADuplicateSocketW @33 - WSAEnumNameSpaceProvidersA @34 - WSAEnumNameSpaceProvidersW @35 - WSAEnumNetworkEvents @36 - WSAEnumProtocolsA @37 - WSAEnumProtocolsW @38 - WSAEventSelect @39 - WSAGetOverlappedResult @40 - WSAGetQOSByName @41 - WSAGetServiceClassInfoA @42 - WSAGetServiceClassInfoW @43 - WSAGetServiceClassNameByClassIdA @44 - WSAGetServiceClassNameByClassIdW @45 - WSAHtonl @46 - WSAHtons @47 - WSAInstallServiceClassA @48 - WSAInstallServiceClassW @49 - WSAIoctl @50 - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - WSAJoinLeaf @58 - WSALookupServiceBeginA @59 - WSALookupServiceBeginW @60 - WSALookupServiceEnd @61 - WSALookupServiceNextA @62 - WSALookupServiceNextW @63 - WSANtohl @64 - WSANtohs @65 - WSAProviderConfigChange @66 - WSARecv @67 - WSARecvDisconnect @68 - WSARecvFrom @69 - WSARemoveServiceClass @70 - WSAResetEvent @71 - WSASend @72 - WSASendDisconnect @73 - WSASendTo @74 - WSASetEvent @75 - WSASetServiceA @76 - WSASetServiceW @77 - WSASocketA @78 - WSASocketW @79 - WSAStringToAddressA @80 - WSAStringToAddressW @81 - WSAWaitForMultipleEvents @82 - WSCDeinstallProvider @83 - WSCEnableNSProvider @84 - WSCEnumProtocols @85 - WSCGetProviderPath @86 - WSCInstallNameSpace @87 - WSCInstallProvider @88 - WSCUnInstallNameSpace @89 - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - __WSAFDIsSet @151 - WEP @500 diff --git a/contrib/idn/mdnkit/wsock/wsock20/ws2_32o.def b/contrib/idn/mdnkit/wsock/wsock20/ws2_32o.def deleted file mode 100644 index 6a9be77277..0000000000 --- a/contrib/idn/mdnkit/wsock/wsock20/ws2_32o.def +++ /dev/null @@ -1,115 +0,0 @@ -; -; EXPORTS in WS2_32 -; - -LIBRARY ws2_32o -DESCRIPTION "WS2_32 original exports" -EXPORTS - accept @1 - bind @2 - closesocket @3 - connect @4 - getpeername @5 - getsockname @6 - getsockopt @7 - htonl @8 - htons @9 - ioctlsocket @10 - inet_addr @11 - inet_ntoa @12 - listen @13 - ntohl @14 - ntohs @15 - recv @16 - recvfrom @17 - select @18 - send @19 - sendto @20 - setsockopt @21 - shutdown @22 - socket @23 - WSApSetPostRoutine @24 - WPUCompleteOverlappedRequest @25 - WSAAccept @26 - WSAAddressToStringA @27 - WSAAddressToStringW @28 - WSACloseEvent @29 - WSAConnect @30 - WSACreateEvent @31 - WSADuplicateSocketA @32 - WSADuplicateSocketW @33 - WSAEnumNameSpaceProvidersA @34 - WSAEnumNameSpaceProvidersW @35 - WSAEnumNetworkEvents @36 - WSAEnumProtocolsA @37 - WSAEnumProtocolsW @38 - WSAEventSelect @39 - WSAGetOverlappedResult @40 - WSAGetQOSByName @41 - WSAGetServiceClassInfoA @42 - WSAGetServiceClassInfoW @43 - WSAGetServiceClassNameByClassIdA @44 - WSAGetServiceClassNameByClassIdW @45 - WSAHtonl @46 - WSAHtons @47 - WSAInstallServiceClassA @48 - WSAInstallServiceClassW @49 - WSAIoctl @50 - gethostbyaddr @51 - gethostbyname @52 - getprotobyname @53 - getprotobynumber @54 - getservbyname @55 - getservbyport @56 - gethostname @57 - WSAJoinLeaf @58 - WSALookupServiceBeginA @59 - WSALookupServiceBeginW @60 - WSALookupServiceEnd @61 - WSALookupServiceNextA @62 - WSALookupServiceNextW @63 - WSANtohl @64 - WSANtohs @65 - WSAProviderConfigChange @66 - WSARecv @67 - WSARecvDisconnect @68 - WSARecvFrom @69 - WSARemoveServiceClass @70 - WSAResetEvent @71 - WSASend @72 - WSASendDisconnect @73 - WSASendTo @74 - WSASetEvent @75 - WSASetServiceA @76 - WSASetServiceW @77 - WSASocketA @78 - WSASocketW @79 - WSAStringToAddressA @80 - WSAStringToAddressW @81 - WSAWaitForMultipleEvents @82 - WSCDeinstallProvider @83 - WSCEnableNSProvider @84 - WSCEnumProtocols @85 - WSCGetProviderPath @86 - WSCInstallNameSpace @87 - WSCInstallProvider @88 - WSCUnInstallNameSpace @89 - WSAAsyncSelect @101 - WSAAsyncGetHostByAddr @102 - WSAAsyncGetHostByName @103 - WSAAsyncGetProtoByNumber @104 - WSAAsyncGetProtoByName @105 - WSAAsyncGetServByPort @106 - WSAAsyncGetServByName @107 - WSACancelAsyncRequest @108 - WSASetBlockingHook @109 - WSAUnhookBlockingHook @110 - WSAGetLastError @111 - WSASetLastError @112 - WSACancelBlockingCall @113 - WSAIsBlocking @114 - WSAStartup @115 - WSACleanup @116 - __WSAFDIsSet @151 - WEP @500 - From b8c6dd7a3c6070712b0924b0519b96044f36ca27 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 4 Jun 2003 06:03:08 +0000 Subject: [PATCH 17/75] new draft --- doc/draft/draft-ietf-ipseckey-rr-00.txt | 728 -------------------- doc/draft/draft-ietf-ipseckey-rr-03.txt | 840 ++++++++++++++++++++++++ 2 files changed, 840 insertions(+), 728 deletions(-) delete mode 100644 doc/draft/draft-ietf-ipseckey-rr-00.txt create mode 100644 doc/draft/draft-ietf-ipseckey-rr-03.txt diff --git a/doc/draft/draft-ietf-ipseckey-rr-00.txt b/doc/draft/draft-ietf-ipseckey-rr-00.txt deleted file mode 100644 index 49df4b0ae1..0000000000 --- a/doc/draft/draft-ietf-ipseckey-rr-00.txt +++ /dev/null @@ -1,728 +0,0 @@ - - -IPSECKEY WG M. Richardson -Internet-Draft SSW -Expires: September 28, 2003 March 30, 2003 - - - A method for storing IPsec keying material in DNS. - draft-ietf-ipseckey-rr-00.txt - -Status of this Memo - - This document is an Internet-Draft and is in full conformance with - all provisions of Section 10 of RFC2026. - - Internet-Drafts are working documents of the Internet Engineering - Task Force (IETF), its areas, and its working groups. Note that - other groups may also distribute working documents as Internet- - Drafts. - - Internet-Drafts are draft documents valid for a maximum of six months - and may be updated, replaced, or obsoleted by other documents at any - time. It is inappropriate to use Internet-Drafts as reference - material or to cite them other than as "work in progress." - - The list of current Internet-Drafts can be accessed at http:// - www.ietf.org/ietf/1id-abstracts.txt. - - The list of Internet-Draft Shadow Directories can be accessed at - http://www.ietf.org/shadow.html. - - This Internet-Draft will expire on September 28, 2003. - -Copyright Notice - - Copyright (C) The Internet Society (2003). All Rights Reserved. - -Abstract - - This document describes a new resource record for DNS. This record - may be used to store public keys for use in IPsec systems. - - This record replaces the functionality of the sub-type #1 of the KEY - Resource Record, which has been proposed to be obsoleted by RFC3445 - [9]. - - - - - - - - - -Richardson Expires September 28, 2003 [Page 1] - -Internet-Draft ipsecrr March 2003 - - -Table of Contents - - 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 2. Storage formats . . . . . . . . . . . . . . . . . . . . . . . 4 - 2.1 IPSECKEY RDATA format . . . . . . . . . . . . . . . . . . . . 4 - 2.2 RDATA format - precedence . . . . . . . . . . . . . . . . . . 4 - 2.3 RDATA format - algorithm type . . . . . . . . . . . . . . . . 4 - 2.4 RDATA format - gateway . . . . . . . . . . . . . . . . . . . . 4 - 2.5 RDATA format - RSA public key . . . . . . . . . . . . . . . . 5 - 2.6 RDATA format - DSA public key . . . . . . . . . . . . . . . . 5 - 3. Presentation formats . . . . . . . . . . . . . . . . . . . . . 6 - 3.1 Representation of IPSECKEY RRs . . . . . . . . . . . . . . . . 6 - 3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 - 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 - 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 - Normative references . . . . . . . . . . . . . . . . . . . . . 11 - Non-normative references . . . . . . . . . . . . . . . . . . . 12 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . 12 - Full Copyright Statement . . . . . . . . . . . . . . . . . . . 13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 2] - -Internet-Draft ipsecrr March 2003 - - -1. Introduction - -1.1 Overview - - The IPSECKEY resource record (RR) is used to publish a public key - that is to be associated with a Domain Name System (DNS) name. This - can be the public key of a host, network, or application (in the case - of per-port keying). - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in RFC2119 [5]. - - An IPSECKEY resource record SHOULD be authenticated DNSSEC resource - record. - - It is expected that there will often be multiple IPSECKEY resource - records at the same terminal node. This will be due to the presence - of multiple gateways and the need to rollover keys. - - This resource record is class independent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 3] - -Internet-Draft ipsecrr March 2003 - - -2. Storage formats - - The type number for the IPSECKEY RR is TBD. - -2.1 IPSECKEY RDATA format - - The RDATA for an IPSECKEY RR consists of a precedence value, a public - key (and algorithm type), and an optional gateway address. - - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | precedence | algorithm | gateway | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + - ~ gateway ~ - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | / - / public key / - / / - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - - -2.2 RDATA format - precedence - - This is an 8-bit precedence for this record. This is interpreted in - the same way as the PREFERENCE field described in section 3.3.9 of - RFC1035 [2]. - -2.3 RDATA format - algorithm type - - aThe algorithm type field indicates the type of key that is present - in the public key field. A positive number, larger than 0 identifies - an algorithm type. The following values, which have been previously - defined by IANA are useful (see RFC2535 [6]). - - A value of 0 indicates that no key is present. - - The following values defined by IANA are useful: - - 3 A DSA key is present, in the format defined in RFC2536 [7] - - 5 A RSA key is present, in the format defined in RFC3110 [8] - - -2.4 RDATA format - gateway - - The gateway field indicates a gateway to which an IPsec tunnel may be - created in order to reach the entity holding this resource record. - - - -Richardson Expires September 28, 2003 [Page 4] - -Internet-Draft ipsecrr March 2003 - - - The gateway field is a normal wire-encoded domain name (section 3.3 - of RFC1035 [2]). - - If no gateway is to be represented, then a null domain name MUST be - present. - - It is a simple fully qualified domain name (FQDN). IP version 4 and - IP version 6 addresses may be represented using the reverse name - format, from in-addr.arpa. and ip6.arpa. - - For instance, the IP version 4 address 192.0.1.2 is represented as - the domain name 2.1.0.192.in-addr.arpa. - -2.5 RDATA format - RSA public key - - If the algorithm type has the value 5 then public key portion - contains an RSA public key, encoded as described in secion 2 of - RFC3110 [8]. - - RFC2065 limited the exponent and modulus to 2552 bits in length, and - RFC3110 to 4096 bits. No such limit is specified here for the - purposes of encoding and decoding. - - The length in octets of the public exponent length is represented as - one octet if it is in the range of 1 to 255 and by a zero octet - followed by a two octet unsigned length if it is longer than 255 - bytes. The public key modulus field is a multiprecision unsigned - integer. The length of the modulus can be determined from the - RDLENGTH and the preceding RDATA fields including the exponent. - - Leading zero bytes are prohibited in the exponent and modulus. - -2.6 RDATA format - DSA public key - - If the algorithm type has the value 3, then public key portion - contains an DSA public key, encoded as described in RFC2536 [7]. - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 5] - -Internet-Draft ipsecrr March 2003 - - -3. Presentation formats - -3.1 Representation of IPSECKEY RRs - - IPSECKEY RRs may appear as lines in a zone data master file. The - precedence, algorithm and gateway fields are REQUIRED. There base64 - encoded public key block is OPTIONAL. - - If no gateway is to be indicated, then the root (".") SHOULD be used. - -3.2 Examples - - An example of a node 192.2.0.38 that will accept IPsec tunnels on its - own behalf. - - 38.0.2.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 5 - 38.0.2.192.in-addr.arpa. - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) - - An example of a node, 192.2.0.38 that has published its key only. - - 38.0.2.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 5 - . - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) - - An example of a node, 192.2.0.38 that has delegated authority to the - node 192.2.3.5. - - 38.0.2.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 5 - 5.3.2.192.in-addr.arpa. - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - - - -Richardson Expires September 28, 2003 [Page 6] - -Internet-Draft ipsecrr March 2003 - - - fejrfi1H ) - - An example of a node, 192.1.0.38 that has delegated authority to the - node with the identity "mygateway.example.com". - - 38.0.2.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 5 - mygateway.example.com. - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 7] - -Internet-Draft ipsecrr March 2003 - - -4. Security Considerations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 8] - -Internet-Draft ipsecrr March 2003 - - -5. IANA Considerations - - IANA is asked to assign a resource record type number from the normal - resource record number space. - - The algorithm field does not require any IANA action, as it is - inherited from DNS KEY algorithm values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 9] - -Internet-Draft ipsecrr March 2003 - - -6. Acknowledgments - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 10] - -Internet-Draft ipsecrr March 2003 - - -Normative references - - [1] Mockapetris, P., "Domain names - concepts and facilities", STD - 13, RFC 1034, November 1987. - - [2] Mockapetris, P., "Domain names - implementation and - specification", STD 13, RFC 1035, November 1987. - - [3] Bradner, S., "The Internet Standards Process -- Revision 3", BCP - 9, RFC 2026, October 1996. - - [4] Eastlake, D. and C. Kaufman, "Domain Name System Security - Extensions", RFC 2065, January 1997. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 11] - -Internet-Draft ipsecrr March 2003 - - -Non-normative references - - [5] Bradner, S., "Key words for use in RFCs to Indicate Requirement - Levels", BCP 14, RFC 2119, March 1997. - - [6] Eastlake, D., "Domain Name System Security Extensions", RFC - 2535, March 1999. - - [7] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System - (DNS)", RFC 2536, March 1999. - - [8] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name - System (DNS)", RFC 3110, May 2001. - - [9] Massey, D. and S. Rose, "Limiting the Scope of the KEY Resource - Record (RR)", RFC 3445, December 2002. - - -Author's Address - - Michael C. Richardson - Sandelman Software Works - 470 Dawson Avenue - Ottawa, ON K1Z 5V7 - CA - - EMail: mcr@sandelman.ottawa.on.ca - URI: http://www.sandelman.ottawa.on.ca/ - - - - - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 12] - -Internet-Draft ipsecrr March 2003 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2003). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Richardson Expires September 28, 2003 [Page 13] - diff --git a/doc/draft/draft-ietf-ipseckey-rr-03.txt b/doc/draft/draft-ietf-ipseckey-rr-03.txt new file mode 100644 index 0000000000..aa39126345 --- /dev/null +++ b/doc/draft/draft-ietf-ipseckey-rr-03.txt @@ -0,0 +1,840 @@ + + +IPSECKEY WG M. Richardson +Internet-Draft SSW +Expires: November 26, 2003 May 28, 2003 + + + A method for storing IPsec keying material in DNS. + draft-ietf-ipseckey-rr-03.txt + +Status of this Memo + + This document is an Internet-Draft and is in full conformance with + all provisions of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as Internet- + Drafts. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + The list of current Internet-Drafts can be accessed at http:// + www.ietf.org/ietf/1id-abstracts.txt. + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + + This Internet-Draft will expire on November 26, 2003. + +Copyright Notice + + Copyright (C) The Internet Society (2003). All Rights Reserved. + +Abstract + + This document describes a new resource record for DNS. This record + may be used to store public keys for use in IPsec systems. + + This record replaces the functionality of the sub-type #1 of the KEY + Resource Record, which has been obsoleted by RFC3445. + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 1] + +Internet-Draft ipsecrr May 2003 + + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 2. Storage formats . . . . . . . . . . . . . . . . . . . . . . . 4 + 2.1 IPSECKEY RDATA format . . . . . . . . . . . . . . . . . . . . 4 + 2.2 RDATA format - precedence . . . . . . . . . . . . . . . . . . 4 + 2.3 RDATA format - algorithm type . . . . . . . . . . . . . . . . 4 + 2.4 RDATA format - gateway type . . . . . . . . . . . . . . . . . 5 + 2.5 RDATA format - gateway . . . . . . . . . . . . . . . . . . . . 5 + 2.6 RDATA format - RSA public key . . . . . . . . . . . . . . . . 5 + 2.7 RDATA format - DSA public key . . . . . . . . . . . . . . . . 6 + 3. Presentation formats . . . . . . . . . . . . . . . . . . . . . 7 + 3.1 Representation of IPSECKEY RRs . . . . . . . . . . . . . . . . 7 + 3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 + 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 + 4.1 Active attacks against unsecured IPSECKEY resource records . . 9 + 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 + 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 + Normative references . . . . . . . . . . . . . . . . . . . . . 13 + Non-normative references . . . . . . . . . . . . . . . . . . . 14 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . 14 + Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 2] + +Internet-Draft ipsecrr May 2003 + + +1. Introduction + + The type number for the IPSECKEY RR is TBD. + +1.1 Overview + + The IPSECKEY resource record (RR) is used to publish a public key + that is to be associated with a Domain Name System (DNS) name for use + with the IPsec protocol suite. This can be the public key of a + host, network, or application (in the case of per-port keying). + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in RFC2119 [6]. + + An IPSECKEY resource record SHOULD be used in combination with DNSSEC + unless some other means of authenticating the IPSECKEY resource + record is available. + + It is expected that there will often be multiple IPSECKEY resource + records at the same node. This will be due to the presence of + multiple gateways and the need to rollover keys. + + This resource record is class independent. + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 3] + +Internet-Draft ipsecrr May 2003 + + +2. Storage formats + +2.1 IPSECKEY RDATA format + + The RDATA for an IPSECKEY RR consists of a precedence value, a public + key, algorithm type, and an optional gateway address. + + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | precedence | gateway type | algorithm | gateway | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------+ + + ~ gateway ~ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | / + / public key / + / / + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + + +2.2 RDATA format - precedence + + This is an 8-bit precedence for this record. This is interpreted in + the same way as the PREFERENCE field described in section 3.3.9 of + RFC1035 [2]. + + Gateways listed in IPSECKEY records records with lower precedence + are to be attempted first. Where there is a tie in precedence, they + order should be non-deterministic. + +2.3 RDATA format - algorithm type + + The algorithm field indicates the type of key that is present in the + public key field. A positive number larger than 0 identifies an + algorithm type. The following values, which have been previously + defined by IANA, are useful (see RFC2535 [8]). + + A value of 0 indicates that no key is present. + + The following values defined by IANA are useful: + + 3 A DSA key is present, in the format defined in RFC2536 [9] + + 5 A RSA key is present, in the format defined in RFC3110 [10] + + + + + + + +Richardson Expires November 26, 2003 [Page 4] + +Internet-Draft ipsecrr May 2003 + + +2.4 RDATA format - gateway type + + The gateway type field indicates the format of the information that + is stored in the gateway field. + + The following values are defined: + + 0 No gateway is present + + 1 A 4-byte IPv4 address is present + + 2 A 16-byte IPv6 address is present + + 3 A wire-encoded domain name is present. The wire-encoded format is + self-describing, so the length is implicit. The domain name MUST + NOT be compressed. + + +2.5 RDATA format - gateway + + The gateway field indicates a gateway to which an IPsec tunnel may be + created in order to reach the entity named by this resource record. + + There are three formats: + + A 32-bit IPv4 address is present in the gateway field. The data + portion is an IPv4 address as described in section 3.4.1 of RFC1035 + [2]. This is a 32-bit number in network byte order. + + A 128-bit IPv6 address is present in the gateway field. The data + portion is an IPv6 address as described in section 3.2 of RFC1886 + [5]. This is a 128-bit number in network byte order. + + The gateway field is a normal wire-encoded domain name, as described + in section 3.3 of RFC1035 [2]. + +2.6 RDATA format - RSA public key + + If the algorithm type has the value 5, then public key portion + contains an RSA public key, encoded as described in section 2 of + RFC3110 [10]. + + RFC2065 limited the exponent and modulus to 2552 bits in length, and + RFC3110 limits them to 4096 bits. No such limit is specified here + for the purposes of encoding and decoding. + + The length in octets of the public exponent length is represented as + one octet if it is in the range of 1 to 255, and by a zero octet + + + +Richardson Expires November 26, 2003 [Page 5] + +Internet-Draft ipsecrr May 2003 + + + followed by a two octet unsigned length if it is longer than 255 + bytes. The public key modulus field is a multiprecision unsigned + integer. The length of the modulus can be determined from the + RDLENGTH and the preceding RDATA fields including the exponent. + + Leading zero bytes are prohibited in the exponent and modulus. + +2.7 RDATA format - DSA public key + + If the algorithm type has the value 3, then public key portion + contains an DSA public key, encoded as described in RFC2536 [9]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 6] + +Internet-Draft ipsecrr May 2003 + + +3. Presentation formats + +3.1 Representation of IPSECKEY RRs + + IPSECKEY RRs may appears in a zone data master file. The precedence, + gateway type and algorithm and gateway fields are REQUIRED. There + base64 encoded public key block is OPTIONAL; if not present, then the + public key field of the resource record MUST be contrued being zero + octets in length. + + If no gateway is to be indicated, then the gateway type field MUST be + zero, and the gateway field MUST be "." + + IN IPSECKEY ( precedence gateway-type algorithm + gateway base64-encoded-public-key ) + + +3.2 Examples + + An example of a node 192.0.2.38 that will accept IPsec tunnels on its + own behalf. + + 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 5 + 192.0.2.38 + AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ + Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La + 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 + 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC + MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 + cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 + fejrfi1H ) + + An example of a node, 192.0.2.38 that has published its key only. + + 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 0 5 + . + AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ + Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La + 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 + 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC + MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 + cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 + fejrfi1H ) + + An example of a node, 192.0.2.38 that has delegated authority to the + node 192.0.2.3. + + 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 5 + + + +Richardson Expires November 26, 2003 [Page 7] + +Internet-Draft ipsecrr May 2003 + + + 192.0.2.3 + AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ + Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La + 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 + 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC + MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 + cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 + fejrfi1H ) + + An example of a node, 192.0.1.38 that has delegated authority to the + node with the identity "mygateway.example.com". + + 38.1.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 3 5 + mygateway.example.com. + AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ + Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La + 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 + 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC + MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 + cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 + fejrfi1H ) + + An example of a node, 2001:0DB8:0200:1:210:f3ff:fe03:4d0 that has + delegated authority to the node 2001:0DB8:c000:0200:2::1 + + $ORIGIN 1.0.0.0.0.0.2.8.B.D.0.1.0.0.2.ip6.int. + 0.d.4.0.3.0.e.f.f.f.3.f.0.1.2.0 7200 IN IPSECKEY ( 10 2 5 + 2001:0DB8:0:8002::2000:1 + AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ + Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La + 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 + 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC + MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 + cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 + fejrfi1H ) + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 8] + +Internet-Draft ipsecrr May 2003 + + +4. Security Considerations + + This entire memo pertains to the provision of public keying material + for use by key management protocols such as ISAKMP/IKE (RFC2407) [7]. + + The IPSECKEY resource record contains information that SHOULD be + communicated to the end client in an integral fashion - i.e. free + from modification. The form of this channel is up to the consumer of + the data - there must be a trust relationship between the end + consumer of this resource record and the server. This relationship + may be end-to-end DNSSEC validation, a TSIG or SIG(0) channel to + another secure source, a secure local channel on the host, or some + combination of the above. + + The keying material provided by the IPSECKEY resource record is not + sensitive to passive attacks. The keying material may be freely + disclosed to any party without any impact on the security properties + of the resulting IPsec session: IPsec and IKE provide for defense + against both active and passive attacks. + + Any use of this resource record MUST carefully document their trust + model, and why the trust model of DNSSEC is appropriate, if that is + the secure channel used. + +4.1 Active attacks against unsecured IPSECKEY resource records + + This section deals with active attacks against the DNS. These + attacks require that DNS requests and responses be intercepted and + changed. DNSSEC is designed to defend against attacks of this kind. + + The first kind of active attack is when the attacker replaces the + keying material with either a key under its control, or with garbage. + + If the attacker is not able to mount a subsequent man-in-the-middle + attack on the IKE negotiation after replacing the public key, then + this will result in a denial of service, as the authenticator used by + IKE would fail. + + If the attacker is able to both to mount active attacks against DNS + and is also in a position to perform a man-in-the-middle attack on + IKE and IPsec negotiations, then the attacker will be in a position + to compromise the resulting IPsec channel. Note that an attacker + must be able to perform active DNS attacks on both sides of the IKE + negotiation in order for this to succeed. + + The second kind of active attack is one in which the attacker + replaces the the gateway address to point to a node under the + attacker's control. The attacker can then either replace the public + + + +Richardson Expires November 26, 2003 [Page 9] + +Internet-Draft ipsecrr May 2003 + + + key or remove it, thus providing an IPSECKEY record of its own to + match the gateway address. + + This later form creates a simple man-in-the-middle since the attacker + can then create a second tunnel to the real destination. Note that, + as before, this requires that the attacker also mount an active + attack against the responder. + + Note that the man-in-the-middle can not just forward cleartext + packets to the original destination. While the destination may be + willing to speak in the clear, replying to the original sender, the + sender will have already created a policy expecting ciphertext. + Thus, the attacker will need to intercept traffic from both sides. + + Note that the danger here only applies to cases where the gateway + field of the IPSECKEY RR indicates a different entity than the owner + name of the IPSECKEY RR. In cases where the end-to-end integrity of + the IPSECKEY RR is suspect, the end client MUST restrict its use of + the IPSECKEY RR to cases where the RR owner name matches the content + of the gateway field. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 10] + +Internet-Draft ipsecrr May 2003 + + +5. IANA Considerations + + IANA is asked to assign a resource record type number from the normal + resource record number space. + + The algorithm field does not require any IANA action, as it is + inherited from DNS KEY algorithm values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 11] + +Internet-Draft ipsecrr May 2003 + + +6. Acknowledgments + + My thanks to Paul Hoffman, Sam Weiler, Jean-Jacques Puig, and Olafur + Gurmundsson who reviewed this document carefully. Additional thanks + to Olafur Gurmundsson for a reference implementation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 12] + +Internet-Draft ipsecrr May 2003 + + +Normative references + + [1] Mockapetris, P., "Domain names - concepts and facilities", STD + 13, RFC 1034, November 1987. + + [2] Mockapetris, P., "Domain names - implementation and + specification", STD 13, RFC 1035, November 1987. + + [3] Bradner, S., "The Internet Standards Process -- Revision 3", BCP + 9, RFC 2026, October 1996. + + [4] Eastlake, D. and C. Kaufman, "Domain Name System Security + Extensions", RFC 2065, January 1997. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 13] + +Internet-Draft ipsecrr May 2003 + + +Non-normative references + + [5] Thomson, S. and C. Huitema, "DNS Extensions to support IP + version 6", RFC 1886, December 1995. + + [6] Bradner, S., "Key words for use in RFCs to Indicate Requirement + Levels", BCP 14, RFC 2119, March 1997. + + [7] Piper, D., "The Internet IP Security Domain of Interpretation + for ISAKMP", RFC 2407, November 1998. + + [8] Eastlake, D., "Domain Name System Security Extensions", RFC + 2535, March 1999. + + [9] Eastlake, D., "DSA KEYs and SIGs in the Domain Name System + (DNS)", RFC 2536, March 1999. + + [10] Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name + System (DNS)", RFC 3110, May 2001. + + [11] Massey, D. and S. Rose, "Limiting the Scope of the KEY Resource + Record (RR)", RFC 3445, December 2002. + + +Author's Address + + Michael C. Richardson + Sandelman Software Works + 470 Dawson Avenue + Ottawa, ON K1Z 5V7 + CA + + EMail: mcr@sandelman.ottawa.on.ca + URI: http://www.sandelman.ottawa.on.ca/ + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 14] + +Internet-Draft ipsecrr May 2003 + + +Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. + + + + + + + + + + + + + + + + + + + +Richardson Expires November 26, 2003 [Page 15] + From be063aae540002f72e02046151e9bcaafa63ec6c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 5 Jun 2003 01:48:37 +0000 Subject: [PATCH 18/75] new draft --- doc/draft/draft-danisch-dns-rr-smtp-02.txt | 1344 ++++++++++++++++++++ 1 file changed, 1344 insertions(+) create mode 100644 doc/draft/draft-danisch-dns-rr-smtp-02.txt diff --git a/doc/draft/draft-danisch-dns-rr-smtp-02.txt b/doc/draft/draft-danisch-dns-rr-smtp-02.txt new file mode 100644 index 0000000000..41b1b3c528 --- /dev/null +++ b/doc/draft/draft-danisch-dns-rr-smtp-02.txt @@ -0,0 +1,1344 @@ + + + +INTERNET-DRAFT Hadmut Danisch +Category: Experimental Jun 2003 +Expires: Dec 1, 2003 + + A DNS RR for simple SMTP sender authentication + draft-danisch-dns-rr-smtp-02.txt + +Status of this Memo + + This document is an Internet-Draft and is subject to all provisions + of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as Internet- + Drafts. + + Internet-Drafts are draft documents valid for a maximum of six + months and may be updated, replaced, or obsoleted by other + documents at any time. It is inappropriate to use Internet-Drafts + as reference material or to cite them other than as "work in + progress." + + The list of current Internet-Drafts can be accessed at + http://www.ietf.org/1id-abstracts.html + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html + +Abstract + + This memo suggests a new DNS RR type to provide a very simple + light-weight authentication scheme for the domain part of the + sender address for SMTP mail transport. It is designed to be a + simple and robust protection against e-mail fraud and especially + spam. It is easy to implement and administer, compatible with all + legislations known by the author, and cheap. It also focuses on + security and privacy problems and requirements in context of spam + defense, and touches non-technical problems of defense against + spam. + + + + + + + + + + + +Hadmut Danisch Experimental [Page 1] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + Table of Contents + + +1. Threat description . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1. Mail sender forgery . . . . . . . . . . . . . . . . . . . 4 + 1.2. Spam . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 +2. Problem analysis . . . . . . . . . . . . . . . . . . . . . . . . 4 +3. Shortcomings of strong authentication mechanisms . . . . . . . . 4 +4. DNS based sender address verification . . . . . . . . . . . . . 5 +5. RMX entry types . . . . . . . . . . . . . . . . . . . . . . . . 5 + 5.1. Overall structure . . . . . . . . . . . . . . . . . . . . 5 + 5.1.1 Description . . . . . . . . . . . . . . . . . . . . 6 + 5.1.2 Zone File Syntax . . . . . . . . . . . . . . . . . 6 + 5.1.3 Encoding . . . . . . . . . . . . . . . . . . . . . 6 + 5.2. IPv4 and IPv6 address ranges (Type1/2) . . . . . . . . . . 7 + 5.2.1 Description . . . . . . . . . . . . . . . . . . . . 7 + 5.2.2 Zone File Syntax . . . . . . . . . . . . . . . . . 7 + 5.2.3 Encoding . . . . . . . . . . . . . . . . . . . . . 7 + 5.3. Hostname (Type 3) . . . . . . . . . . . . . . . . . . . . 7 + 5.3.1 Description . . . . . . . . . . . . . . . . . . . . 7 + 5.3.2 Zone File Syntax . . . . . . . . . . . . . . . . . 8 + 5.3.3 Encoding . . . . . . . . . . . . . . . . . . . . . 8 + 5.3.4 Additional Records . . . . . . . . . . . . . . . . 8 + 5.4. APL Reference (Type 4) . . . . . . . . . . . . . . . . . . 8 + 5.4.1 Description . . . . . . . . . . . . . . . . . . . . 8 + 5.4.2 Zone File Syntax . . . . . . . . . . . . . . . . . 8 + 5.4.3 Encoding . . . . . . . . . . . . . . . . . . . . . 9 + 5.4.4 Additional Records . . . . . . . . . . . . . . . . 9 + 5.5. Future Entry Types . . . . . . . . . . . . . . . . . . . . 9 +6. Message Headers . . . . . . . . . . . . . . . . . . . . . . . . 9 +7. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . 10 + 7.1. Compatibility with old mail receivers . . . . . . . . . . 10 + 7.2. Compatibility with old mail senders . . . . . . . . . . . 10 + 7.3. Compatibility with old DNS clients . . . . . . . . . . . . 10 + 7.4. Compatibility with old DNS servers . . . . . . . . . . . . 10 +8. Message relaying and forwarding . . . . . . . . . . . . . . . . 10 + 8.1. Problem description . . . . . . . . . . . . . . . . . . . 10 + 8.2. Trusted relaying/forwarding . . . . . . . . . . . . . . . 11 + 8.3. Untrusted relaying/forwarding . . . . . . . . . . . . . . 11 +9. Enforcement policy . . . . . . . . . . . . . . . . . . . . . . . 12 +10. Security Considerations . . . . . . . . . . . . . . . . . . . . 12 + 10.1. Draft specific considerations . . . . . . . . . . . . . . 12 + 10.1.1 Authentication strength . . . . . . . . . . . . . 12 + 10.1.2 Where Authentication and Authorization end . . . . 13 + 10.1.3 Vulnerability of DNS . . . . . . . . . . . . . . . 13 + 10.1.4 Additional data attack? . . . . . . . . . . . . . 15 + 10.1.5 Open SMTP relays . . . . . . . . . . . . . . . . . 15 + 10.1.6 Unforged Spam . . . . . . . . . . . . . . . . . . 16 + + + +Hadmut Danisch Experimental [Page 2] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + 10.1.7 Empty Sender address . . . . . . . . . . . . . . . 16 + 10.1.8 Reliability of Whois Entries . . . . . . . . . . . 16 + 10.1.9 Hazards for Freedom of Speech . . . . . . . . . . 17 + 10.2. General Considerations about spam defense . . . . . . . . 17 + 10.2.1 Action vs. reaction . . . . . . . . . . . . . . . 18 + 10.2.2 Content based Denial of Service attacks . . . . . 18 +11. Privacy Considerations . . . . . . . . . . . . . . . . . . . . 18 + 11.1. Draft specific considerations . . . . . . . . . . . . . . 18 + 11.1.1 No content leaking . . . . . . . . . . . . . . . . 19 + 11.1.2 Message reception and sender domain . . . . . . . 19 + 11.1.3 Network structure . . . . . . . . . . . . . . . . 19 + 11.1.4 Owner information distribution . . . . . . . . . . 19 + 11.2. General Considerations about spam defense . . . . . . . . 20 + 11.2.1 Content leaking of content filters . . . . . . . . 20 + 11.2.2 Black- and Whitelists . . . . . . . . . . . . . . 20 +12. Deployment Considerations . . . . . . . . . . . . . . . . . . . 20 + 12.1. The economical problem . . . . . . . . . . . . . . . . . 21 + 12.2. The POP problem . . . . . . . . . . . . . . . . . . . . . 21 + 12.3. The network structure problem . . . . . . . . . . . . . . 22 + 12.4. The mentality problem . . . . . . . . . . . . . . . . . . 22 + 12.5. The identity problem . . . . . . . . . . . . . . . . . . 23 + 12.6. The multi-legislation problem . . . . . . . . . . . . . . 23 +Implementation and further Information . . . . . . . . . . . . . . . 23 +References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 +Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . . 24 + + + + + + + + + + + + + + + + + + + + + + + + + + +Hadmut Danisch Experimental [Page 3] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +1. Threat description + +1.1. Mail sender forgery + + Security surveillances found a significant increase in the number + of e-mails with forged sender addresses. As a consequence, damage + caused by such e-mails increased as well. In the majority of + examined e-mails the domain name of the envelope sender address was + forged, and the e-mail was sent from an IP address which does not + belong to a network used by the actual owner of the domain. + +1.2. Spam + + A common and well known problem is the dramatic increase of + unsolicited e-mail, commonly called "spam". Again, the majority of + examined e-mails had forged sender addresses. The abused domains + were mainly those of common webmailers as hotmail or yahoo, or + well-known companies. + +2. Problem analysis + + The real cause for forged e-mail is the lack of the Simple Mail + Transfer Protocol SMTP[1] to provide any kind of sender + authentication, authorisation, or verification. Efforts have been + made to block such e-mails by requiring the sender address domain + part to be resolvable (e.g. latest sendmail configurations). This + method provides protection from e-mails with non-existing sender + domains, and indeed, for some time it blocked most spam e-mails. + However, since attackers and spam senders began to abuse existing + domain names, this method was rendered ineffective. + +3. Shortcomings of strong authentication mechanisms + + Without any doubt, SMTP needs to be improved and reengineered in + the future in order to resist against these kinds of threat. + Cryptographical or organisational security mechanisms have to be + designed an implemented for some sort of SMTPng. + + Unfortunately, it is impossible to seamlessly switch to a new + protocol, since most of the SMTP servers and client programs can't + be replaced or updated easily and quickly. Any kind of security + mechanism has to be simple and backward compatible in order to be + accepted. That's why extensions like SMTP with TLS are not widely + spread. + + + + + + + +Hadmut Danisch Experimental [Page 4] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +4. DNS based sender address verification + + To gain at least some improvement in e-mail authenticity while + keeping as much SMTP compatibility as possible, a method is + suggested which doesn't change SMTP at all. + + When the sender has issued the "MAIL FROM:" SMTP command, the + receiving mail transfer agent (MTA) can - and modern MTAs do - + perform some authorization checks, e.g. run a local rule database + or check whether the sender domain is resolvable. + + The suggested method is to let the DNS server for the sender domain + provide informations about which IP addresses are authorized to use + the domain within a sender's address. After receiving the "MAIL + FROM:" SMTP command, the receiving MTA can verify, whether the IP + address of the sending MTA is authorized to send mails with this + domain name. Therefore, a list of authorized IP addresses is + provided by the authoritative DNS server of that domain. + + This version of the draft defines three distinct methods to + describe IP address authorizations: + + - An IPv4 or IPv6 network address and mask + - A fully qualified domain name referring to an A record + - A fully qualified domain name referring to an APL record + + RMX records could look like this: + + rmxtest.de. IN RMX host:relay.provider.com + danisch.de. IN RMX apl:relays.rackland.de + relays.rackland.de. IN APL 1:213.133.101.23/32 1:1.2.3.0/24 + + where the machine with the example address 213.133.101.23 and the + machines in the example subnet 1.2.3.0/24 are the only machines + allowed to send e-mails with an envelope sender address of domain + danisch.de. Since the APL records do not necessarily belong to the + same domain or zone table as the RMX records, this easily allows to + refer to APL records defined by someone else, e.g. the internet + access or server hosting provider, thus reducing administrative + overhead to a minimum. In the example given above, the domain + danisch.de and several other domains are hosted by the service + provider Rackland. So if the relay structure of Rackland is + modified, only the zone of rackland.de needs to be modified. The + domain owners don't need to care about such details. + +5. RMX entry types + +5.1. Overall structure + + + +Hadmut Danisch Experimental [Page 5] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +5.1.1. Description + + Similar to APL, an RMX record is just a concatenation of zero or + more RMX entries. The entries within one record form an ordered + rule base, i. e. they are processed one ofter another until the + first entry matches. This entry determines the result of the query. + Once a matching entry is found, the RMX processing is finished. + This method is known from many other rule based security + mechanisms. + + For any domain name there should not exist more than a single RMX + entry. Due to the structure of DNS, it is nevertheless possible to + have more than a single RMX entry. Multiple RMX entries are treated + as a single record consisting of the concatenation of all records. + While the entries in a record are ordered, the records are not + ordered and may be processed in arbitrary order. If the order of + the entries matters, it is the zone maintainer's responsibility to + keep those entries in a single record. + +5.1.2. Zone File Syntax + + An RMX record may consist of zero or more entries, where the + entries are separated by whitespace. Each entry consists of a tag, + determining the entry type, a colon, and the entry data. + + Example: + + danisch.de. IN RMX apl:relays.rackland.de ipv4:1.2.3.0/24 + +5.1.3. Encoding + + Each entry starts with an octet containting the entry type and the + negation flag: + + +---+---+---+---+---+---+---+---+ + | N | Entry Type Code | + +---+---+---+---+---+---+---+---+ + + N If this bit (MSB) is set, an IP address + matching this entry is not authorized, + but explicitely rejected. See entry + type descriptions for details. + + Entry Type A 7bit number simply determining the entry + type. + + + Currently, entries do not have an explicit length field, the entry + + + +Hadmut Danisch Experimental [Page 6] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + length is determined implicitely by the entry type. Applications + are required to abort if an unknown entry type is found, instead of + skipping unknown entries. + +5.2. IPv4 and IPv6 address ranges (Type1/2) + +5.2.1. Description + + These entry types (IPv4 = Type 1, IPv6 = Type 2) contain a bit + sequence representing a CIDR address part. If that bit sequence + matches the given IP address, authorization is granted or denied, + depending on the negation flag. + +5.2.2. Zone File Syntax + + The entry is prepended with the tag "IPv4" or "IPv6". The colon is + followed with an IPv4 or IPv6 address in standard notation, + optionally followed by a slash and a mask length. Examples: + + danisch.de IN RMX ipv4:213.133.101.23 ipv6:fe00::0 + IN RMX ipv4:10.0.0.0/8 ipv6:fec0::0/16 + IN RMX !ipv4:1.2.3.4 + +5.2.3. Encoding + + After the entry type tag as described above, one octet follows + giving the length L of the bit sequence. Then a sequence of exactly + as many octets follows as needed to carry L bits of information (= + trunc((L+7)/8) ). + + +---+---+---+---+---+---+---+---+ + | N | Entry Type Code (1 or 2) | + +---+---+---+---+---+---+---+---+ + | Length Field L | + +---+---+---+---+---+---+---+---+ + | Bit Field | + / ((L+7)/8) Octets / + +---+---+---+---+---+---+---+---+ + + +5.3. Hostname (Type 3) + +5.3.1. Description + + This entry type simply contains a regular DNS name, which is to be + resolved as a host name (fetch the A record or IPv6 equivalent). If + the given IP address matches the result, authorization is granted + or denied, depending on the negation flag. + + + +Hadmut Danisch Experimental [Page 7] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + It is still to be defined how to treat unresolvable entries. + +5.3.2. Zone File Syntax + + The entry is prepended with the tag "host", followed by a colon and + the hostname. Examples: + + danisch.de IN RMX host:relay.provider.de + IN RMX !host:badmachine.domain.de apl:relays.domain.de + +5.3.3. Encoding + + After the entry type tag immediately follows a DNS encoded and + compressed [2] domain name. Length is determined by called the + decompression function of the resolver library. + + +---+---+---+---+---+---+---+---+ + | N | Entry Type Code (3) | + +---+---+---+---+---+---+---+---+ + | Encoded and Compressed DNS | + / Name as described in RFC1035 / + +---+---+---+---+---+---+---+---+ + +5.3.4. Additional Records + + In order to avoid the need of a second query to resolve the given + host name, a DNS server should enclose the A record for that domain + name in the additional section of the additional section of the DNS + reply, if the server happens to be authoritative. + +5.4. APL Reference (Type 4) + +5.4.1. Description + + This entry type simply contains a regular DNS name, which is to be + resolved as an APL record index (fetch the APL record). If the + given IP address positively matches the APL, authorization is + granted. Details of the semantic (espially when the negation bit is + set) are still to be defined. + + It is still to be defined how to treat unresolvable entries. + +5.4.2. Zone File Syntax + + The entry is prepended with the tag "host", followed by a colon and + the hostname. Examples: + + danisch.de IN RMX apl:relays.rackland.de + + + +Hadmut Danisch Experimental [Page 8] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +5.4.3. Encoding + + After the entry type tag immediately follows a DNS encoded and + compressed domain name. Length is determined by called the + decompression function of the resolver library. + + +---+---+---+---+---+---+---+---+ + | N | Entry Type Code (4) | + +---+---+---+---+---+---+---+---+ + | Encoded and Compressed DNS | + / Name as described in RFC1035 / + +---+---+---+---+---+---+---+---+ + +5.4.4. Additional Records + + In order to avoid the need of a second query to resolve the given + host name, a DNS server should enclose the APL record for that + domain name in the additional section of the additional section of + the DNS reply, if the server happens to be authoritative. + +5.5. Future Entry Types + + In future, more entry type might be defined, e.g. data used for + challenge response authentication, a URL or DNS name ponting to + some kind of service for authentication and authorization, entries + pointing to other directory services (e.g. LDAP), or public key + informations to require signatures on the message header or body. + +6. Message Headers + + An RMX query must be followed by any kind of action depending on + the RMX result. One action might be to reject the message. Another + action might be to add a header line to the message body, thus + allowing MUAs and delivery programs to filter or sort messages. + + In future, the RMX result might be melted into the Received: header + line. + + The details of such entries are to be discussed. As a proposal the + following form is suggested: + + X-RMX: RESULT addr ADDRESS by HOST on DATE + + where + + RESULT is one of "Granted", "Denied", "NotInRMX", "NoRMX", + "TempFail", "BadData", "Trusted". + + + + +Hadmut Danisch Experimental [Page 9] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + ADDRESS is the IP address where the RMX query was based on. + + HOST is the name of the machine performing the RMX query. + + DATE is the date of the query. + + + +7. Compatibility + +7.1. Compatibility with old mail receivers + + Since the suggested extension doesn't change the SMTP protocol at + all, it is fully compatible with old mail receivers. They simply + don't ask for the RMX records and don't perform the check. + +7.2. Compatibility with old mail senders + + Since the SMTP protocol is unchanged and the SMTP sender is not + involved in the check, the method is fully compatible with old mail + senders. + +7.3. Compatibility with old DNS clients + + Since the RMX is a new RR, the existing DNS protocol and zone + informations remain completely untouched. + +7.4. Compatibility with old DNS servers + + If a server can't provide RMX records or a zone doesn't contain + them, the check can't be performed, while compatibility is still + guaranteed. + +8. Message relaying and forwarding + +8.1. Problem description + + Message forwarding and relaying means that an MTA which received an + e-mail by SMTP does not deliver it locally, but resends the message + - usually unchanged except for an additional Received header line + and maybe the recipient's address rewritten - to the next SMTP MTA. + Message forwarding is an essential functionality of e-mail + transport services, for example: + + - Message transport from outer MX relay to the intranet + - Message forwarding and Cc-ing by .forward or .procmail-alike + mechanisms + - Mailing list processing + + + +Hadmut Danisch Experimental [Page 10] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + - Message reception by mail relays with low MX priority, + usually provided by third parties as a stand-by service + in case of relay failure or maintenance + - "Forwarding" and "Bouncing" as a MUA functionality + + In all these cases a message is sent by SMTP from a host which is + not covered by the original sender domain's RMX records. While the + RMX records would forbid accepting this message, it still must be + accepted. The following subsections explain how to cope with that + problem. + +8.2. Trusted relaying/forwarding + + In some cases the receiving MTA trusts the sending MTA to not fake + messages and to already have checked the RMX records at message + reception. As a typical example, a company might have an outer mail + relay which receives messages from the Internet and checks the RMX + records. This relay then forwards the messages to the different + department's mail servers. It does not make sense for these + department mail servers to check the RMX record, since the RMX + records have already been checked and - since the message was + relayed by the outer relay - always would deny the message. In this + case there is a trust relationship between the department relays + and the outer relay. So RMX checking is turned off for trusted + relays. In this example, the department relays would not check + messages from the outer relay (but for intranet security, they + could still check RMX records of the other departments sub-domains + to avoid internal forgery between departments). + + When a relay forwards a message to a trusting machine, the envelope + sender address should remain unchanged. + +8.3. Untrusted relaying/forwarding + + If the receiving MTA does not trust the forwarding MTA, then there + is no chance to leave the sender envelope address unchanged. At a + first glance this might appear impracticable, but this is + absolutely necessary. If an untrusted MTA could claim to have + forwarded a message from a foreign sender address, it could have + forged the message as well. Spammers and forgers would just have to + act as such a relay. + + Therefore, it is required that, when performing untrusted + forwarding, the envelope sender address has to be replaced by the + sender address of someone responsible for the relaying mechanism, + e.g. the owner of the mailing list or the mail address of the user + who's .forward caused the transmission. It is important to stress + that untrusted relaying/forwarding means taking over responsibility + + + +Hadmut Danisch Experimental [Page 11] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + for the message. It is the idea of RMX records to tie + responsibility to message transmission. Untrusted relaying without + replacing the sender address would mean to transmit without taking + responsibility. + + The disadvantage is that the original sender address is lost. + Therefore, whenever a sender address replacement happens, the + Received-Line must contain the old address. Many of today's MTAs + already insert the envelope recipient address, but not the sender + address into the Received header line. It seems reasonable to + require every Received line to include both the sender and + recipient address of the incoming SMTP connection. + +9. Enforcement policy + + Obviously, for reasons of backward compatibility and smooth + introduction of this scheme, RMX records can't be required + immediately. Domains without RMX records must temporarily be + treated the same way as they are treated right now, i.e. e-mail + must be accepted from anywhere. But once the scheme becomes + sufficiently widespread, mail relays can start to refuse e-mails + with sender addresses from domains without RMX records, thus + forcing the owner of the domain to include a statement of + authorization into the domain's zone table. Domain owners will + still be free to have an RMX record with a network and mask + 0.0.0.0/0, i.e. to allow e-mails with that domain from everywhere. + On the other hand, mail receivers will be free to refuse mails from + domains without RMX records or RMX records which are too loose. + Advanced MTAs might have a configuration option to set the maximum + number of IP addresses authorized to use a domain. E-mails from a + domain, which's RMX records exceed this limit, would be rejected. + For example, a relay could reject e-mails from domains which + authorize more than 8 IP addresses. That allows to accept e-mails + only from domains with a reasonable security policy. + +10. Security Considerations + +10.1. Draft specific considerations + +10.1.1. Authentication strength + + It is important to stress, that the suggested method does not + provide high level security and does not completely block forged e- + mails or spam. It is not a reliable and completely secure security + mechanism. It is to be considered as a very cheap and simple light + weight mechanism, which can nevertheless provide a significant + improvement in mail security against a certain class of attacks, + until a successor of SMTP has been defined and commonly accepted. + + + +Hadmut Danisch Experimental [Page 12] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +10.1.2. Where Authentication and Authorization end + + RMX records do not cover the local part of the e-mail address, i.e. + what's on the left side of the @ sign. Authentication and + authorization are limited to the sending MTA's IP address. The + authentication is limited to the TCP functionality, which is + sufficient for light weight authentication. The RMX records + authorize the IP address of the sending host only, not the + particular sender of the message. So if a machine is authorized to + use sender addresses of more than a single domain, the + authentication scheme does not prevent that any user on this + machine can send with any of these domains. RMX is not a substitute + for the host security of the involved machines. + + The proposed authentication scheme can be seen as a "half way + authentication": It does not track back an e-mail to the effective + sender. It tracks only half of the way, i. e. it tracks back to the + domain and it's DNS administrators who authorized that particular + sender IP address to use it for sending e-mail. How the party + responsible for that domain performs user authentication, whom it + grants access to, how it helds people responsible for abuse, is + completely left as the private business of those who are in charge + of that domain. So this draft does not interfere with the domain's + individual security policy or any legislation about such policies. + On the other hand, the proposed authentication scheme does not give + any statement about the nature and quality of the domain's security + policy. This is an essential feature of the proposal: E-mail + authentication must be deployed world wide, otherwise it won't do + the job. Any security scheme interfering with the local + legislations or the domain's security policy will not be accepted + and can't effectively deployed. Therefore, the security policy must + remain the domain's private business, no matter how lousy the + policy might be. + + In order to achieve this and to make use of the only existing world + wide Internet directory scheme (DNS), the approach of this proposal + is to just ignore the local part of the sender address (i.e. what's + left of the @ part) and limit view to the domain part. After all, + that's what we do anyway when delivering to a given address with + SMTP. + +10.1.3. Vulnerability of DNS + + DNS is an essential part of the proposed authentication scheme, + since it requires any directory service, and DNS is currently the + only one available. Unfortunately, DNS is vulnerable and can be + spoofed and poisoned. This flaw is commonly known and weakens many + network services, but for reasons beyond that draft DNS has not + + + +Hadmut Danisch Experimental [Page 13] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + been significantly improved yet. After the first version of this + draft, I received several comments who asked me not to use DNS + because of its lack of security. I took this into consideration, + but came to the conclusion that this is unfeasible: Any + authentication scheme linked to some kind of symbolic identity (in + this case the domain name) needs some kind of infrastructure and + trusted assignment. There are basically two ways to do it: Do it + yourself and trust nobody else, or let someone else do it. There + are methods to do it the former way, e.g. to give someone some kind + of authentication information after a first successful e-mail + exchange, e.g. some kind of cookie or special e-mail address. This + is certainly interesting and powerful, but it does not solve the + problem on a world wide scale and is far to complicated and error + prone for the average user, i. e. 99% of the users. + + The latter method to let someone else do the symbolic name + assignment and create the authentication framework is well known. + It context of public key cryptography, this is called a Public Key + Infrastructure (PKI). On of the best known facts about PKIs is + that, until now, we don't have any covering a significant part of + the Internet. And we won't have any in near future. The complexity + is far too high, it is too expensive, and it involves cooperation + of every single user, which is simply unrealistic and extremely + error prone. So what do we have we can use? All we have is the DNS + and the Whois database. And we have countries who don't allow + cryptography. So the proposal was designed to use DNS without + cryptography. It does not avoid DNS because of its vulnerability, + it asks for a better DNS, but accepts the DNS as it is for the + moment. Currently there are two main threats caused by the DNS + weakness: + + - A spammer/forger could spoof DNS in order to gain false + authorization to send fake e-mails. + + - An attacker could spoof DNS in order to block delivery from + authorized machines, i. e. perform a Denial of Service attack. + + The first one is rather unrealistic, because it would require an + average spammer to poison a significant part of the DNS servers of + its victims. A spammer sending messages to one million receipients + would need to poison at least 1-10% which is 10,000 to 100,000 + receipient's DNS servers. This should be unfeasible in most cases. + + In contrast, the second threat is a severe one. If an attacker + wanted to block messages from one company to another, he just needs + to poison the recipients DNS server with a wrong RMX record in + order to make the recipient's SMTP machine reject all messages. And + this is feasible since the attacker needs to poison only a single + + + +Hadmut Danisch Experimental [Page 14] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + DNS server. But does this make SMTP more vulnerable? No. Because + the attacker can already do even more without RMX. By poisoning the + sender's DNS server with wrong MX records, the attacker can also + block message delivery or even redirect the messages to the + attacker's machine, thus preventing any delivery error messages and + furthermore getting access to the messages. + + As a consequence, e-mail delivery by SMTP requires a better DNS + anyway. The requirements are not significantly expanded by RMX. + +10.1.4. Additional data attack? + + While writing a test implementation, a certain kind of attack came + into my mind. I'm still not sure, whether this attack is possible + on any DNS server, but I believe it should be mentioned: + + Imagine an unauthorized sender is sending a forged mail (e.g. + spam). At connection time, before querying the RMX record, the + receiving MTA usually performs a PTR query for the IP address of + the sending MTA. If the sender has control over the authoritative + name server for that particular IP address, the sender could give a + normal PTR answer, but could append a wrong RMX, APL, or A record + in the additional section of the query. A subsequent RMX query + could receive wrong DNS data if the DNS server used by the + receiving MTA accepted those forged records. + +10.1.5. Open SMTP relays + + Open SMTP relays (i.e. machines who accept any e-mail message from + anyone and deliver to the world) abused by spammers are a one of + the main problems of spam defense and sender backtracking. In most + cases this problem just vanishes because foreign open relay + machines will not be covered by the RMX records of the forged + sender address. But there are two special cases: + + If the spammer knows about a domain which authorizes this + particular machine, that domain can be used for forgery. But in + this case, the IP address of the relay machine and the RMX records + of the domain track back to the persons responsible. Both can be + demanded to fix the relay or remove the RMX record for this + machine. An open relay is a security flaw like leaving the machine + open for everybody to login and send random mails from inside. Once + the administrative persons refuse to solve the problem, they can be + identified as spammers and held responsible. + + The second special case is when a domain authorizes all IP + addresses by having the network 0.0.0.0/0 in the RMX/APL record. In + this case, open relays don't make things worse. It's up to the + + + +Hadmut Danisch Experimental [Page 15] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + recipient's MTA to reject mails from domains with loose security + policies. + +10.1.6. Unforged Spam + + This proposal does not prevent spam (which is, by the way, not yet + exactly defined), it prevents forgery. Since spam is against law + and violates the recipients rights, spam depends on untracability + of the sender. In practice the sender forges the sender address + (other cases see below). This proposal is designed to detect such + forgeries. + + However, the RMX approach is rendered ineffective, if the sender + doesn't forge. If the sender uses just a normal address of it's own + domain, this is just a plain, normal e-mail, which needs to be let + through. Since it is up to the human's taste whether this is spam + or not, there's no technical way to reliably identify this as spam. + But since the sender domain is known, this domain can be + blacklisted or legal steps can be gone into. + +10.1.7. Empty Sender address + + There is a design flaw of current SMTP and SMTP programs: The empty + sender envelope address. This is used for delivery of error + messages, and most MTAs accept messages with an empty sender + address. Obviously, RMX records can't be checked for empty sender + addresses. + + It is a design flaw to inherently allow anonymous mails. This flaw + must either be fixed, or other methods have to be developed. For + example MTAs could accept such mails only if they reference the + Message-ID of another e-mail which has recently been delivered. + +10.1.8. Reliability of Whois Entries + + Once the RMX infrastructure gets deployed, what's the security + gain? It allows to determine the domain which's DNS zone + authorized the sending machine. What's that good for? There are + some immediate uses of the domain name, e.g. in black- and + whitelisting. But in most cases this is just the starting point of + further investigations, either performed automatically before + message acceptance, or manually after spam has been received and + complainted about. + + The next step after determining the domain is determining the + people responsible for this domain. This can sometimes be achieved + by querying the Whois databases. Unfortunately, many whois entries + are useless because they are incomplete, wrong, obsolete, or in + + + +Hadmut Danisch Experimental [Page 16] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + uncommon languages. Furthermore, there are several formats of + address informations which make it difficult to automatically + extract the address. Sometimes the whois entry identifies the + provider and not the owner of the domain. Whois servers are not + built for high availability and sometimes unreachable. + + Therefore, a mandatory standard is required about the contents and + the format of whois entries, and the availability of the servers. + After receiving the MAIL FROM SMTP command with the sender envelope + address, the receiving MTA could check the RMX record and Whois + entry. If it doesn't point to a real human, the message could be + rejected and an error message like "Ask your provider to fix your + Whois entry" could be issued. Obviously, domain providers must be + held responsible for wrong entries. It might still be acceptable to + allow anonymous domains, i. e. domains which don't point to a + responsible human. But it is the receivers choice to accept e-mails + from such domains or not. + +10.1.9. Hazards for Freedom of Speech + + Currently, some governments try to enforce limitations of internet + traffic in order to cut unwanted content providers from the + network. Some of these governments try to hide a whole country + behind firewalls, others try to force Internet providers to poison + DNS servers with wrong A records for web servers, e.g. one county + administration in Germany tries to do so. If message reception + depends on DNS entries, the same governments will try to block not + only HTTP, but SMTP also. + + However, since most MTAs already reject messages from unresolvable + domain names this is not a new threat. + +10.2. General Considerations about spam defense + + After discussing security requirements of the proposal, now the + security advantages of the RMX approach over content based filters + will be explained. Basically, there are three kinds of content + filters: + + - Those who upload the message or some digest to an external + third party and ask "Is this spam"? + + - Those who download a set of patterns and rules from a third + party and apply this set to incoming messages in order to + determine whether it is spam. + + - Those who are independent and don't contact any third party, + but try to learn themselves what is spam and what isn't. + + + +Hadmut Danisch Experimental [Page 17] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + The message filters provided by some e-mail service providers are + usually not a kind of their own, but a combination of the first two + kinds. + +10.2.1. Action vs. reaction + + Content filters suffer from a fundamental design problem: They are + late. They need to see some content of the same kind before in + order to learn and to block further distribution. + + This works for viruses and worms, which redistribute. This doesn't + work for spam, since spam is usually not redistributed after the + first delivery. When the filters have learned or downloaded new + pattern sets, it's too late. + + This proposal does not have this problem. + +10.2.2. Content based Denial of Service attacks + + All three kinds of content filters, but especially the second and + the third kind are vulnerable to content based Denial of Service + attacks. + + If some kind of third party (e.g. non-democratic government, + intellectual property warriors, religious groups, military, secret + services, patriots, public relation agents, etc.) wants certain + contents not to be distributed, they could either poison the + pattern/rule databases or feed wrong sets to particular receivers. + + Such pattern/rule sets are the perfect tool for censoring e-mail + traffic and denial of service attacks by governments and other + parties, and a similar threat are virus filters. E. g. the content + industry could demand to teach all virus and spam filters to delete + all e-mails containing the URL of an MP3 web server outside the + legislations. Software manufacturers could try to block all e-mails + containing software license keys, thus trying to make unallowed + distribution more difficult. Governments could try to block + distribution of unwanted informations. + + This proposal does not have this problem. + +11. Privacy Considerations + + (It was proposed on the 56th IETF meeting to have a privacy section + in drafts and RFCs.) + +11.1. Draft specific considerations + + + + +Hadmut Danisch Experimental [Page 18] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +11.1.1. No content leaking + + Since the RMX approach doesn't touch the contents of a message in + any way, there is obviously no way of leaking out any information + about the content of the message. RMX is based solely on the + envelope recipient address. However, methods to fix problems not + covered by RMX might allow content leaking, e.g. if the acceptance + of a message with an empty sender address requires the reference to + the message id of an e-mail recently sent, this allows an attacker + to verify whether a certain message was delivered from there. + +11.1.2. Message reception and sender domain + + Message delivery triggers RMX and APL requests by the recipient. + Thus, the admin of the DNS server or an eavesdropper could learn + that the given machine has just received a message with a sender + from this address, even if the SMTP traffic itself had been + encrypted. + + However, most of today's MTAs do query the MX and A records of the + domain after the MAIL FROM command, so this is not a real new + threat. + +11.1.3. Network structure + + Since RMX and its associated APL records provide a complete list of + all IP addresses of hosts authorized to send messages from this + address, they do reveal informations about the network structure + and maybe the lifestyle of the domain owner, since a growing number + of domains are owned by single persons or families. E.g. the RMX + records could reveal where someone has his job or spends his time + at weekends. + + If such informations are to be kept secret, it is the user's job to + not sent e-mails from there and to relay them from non-compromising + IP addresses. + +11.1.4. Owner information distribution + + As described above, RMX depends partly on the reliability of the + whois database entries. It does not make anonymous domains + impossible, but it requires to keep the database entries "true", i. + e. if a whois entry does not contain informations about the + responsible person, this must be unambigously labeled as anonymous. + It must not contain fake names and addresses to pretend a non- + existing person. However, since most Internet users on the world + feel extremely annoyed by spam, they will urge their MTA admin to + reject messages from anonymous domains. The domain owner will have + + + +Hadmut Danisch Experimental [Page 19] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + the choice to either remain anonymous but be not able to send e- + mail to everyone in the world, or to be able but to reveal his + identity to everyone on the world. + + It would be possible to provide whois-like services only to + recipients of recent messages, but this would make things too + complicated to be commonly adopted. + +11.2. General Considerations about spam defense + +11.2.1. Content leaking of content filters + + As described above in the Security chapter, there are spam filters + which inherently allow leakage of the message body. Those filters + upload either the message body, or in most cases just some kind of + checksum to a third party, which replies whether this is to be seen + as spam or not. The idea is to keep a databases of all digests of + all messages. If a message is sent more often than some threshold, + it is to be considered as a mass mail and therefore tagged as spam. + + While the digest itself does not reveal the content of the message, + it perfectly reveals where a particular message has been delivered + to. If a government finds just a single unwanted message, if a + software manufacturer finds a single message with a stolen product + license key, if someone finds a message with unpatriotic content, + it takes just a single database lookup to get a list of all people + who received this particular message. Content filters with digest + upload are the perfect "Big Brother". + +11.2.2. Black- and Whitelists + + Some proposals against spam are based on a central database of + white- or blacklisted IP addresses, Sender names, Message IDs or + whatever. Again, there is a central database which learns who has + received which e-mail or from which sender with every query. This + allows tracking relations between persons, which is also a breach + of privacy. + + +12. Deployment Considerations + + Is there a concise technical solution against spam? Yes. + + Will it be deployed? Certainly not. + + Why not? Because of the strong non-technical interests of several + parties against a solution to the problem, as described below. + Since these are non-technical reasons, they might be beyond the + + + +Hadmut Danisch Experimental [Page 20] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + scope of such a draft. But since they are the main problems that + prevent fighting spam, it is unavoidable to address them. This + chapter exists temporarily only and should support the discussion + of solutions. It is not supposed to be included in a later RFC. + +12.1. The economical problem + + As has been recently illustrated in the initial session of the + IRTF's Anti Spam Research Group (ASRG) on the 56th IETF meeting, + sending spam is a business with significant revenues. + + But a much bigger business is selling Anti-Spam software. This is a + billion dollar market, and it is rapidly growing. Any simple and + effective solution against spam would defeat revenues and drive + several companies into bankrupt, would make consultants jobless. + + Therefore, spam is essential for the Anti-Spam business. If there + is no spam, then no Anti-Spam software can be sold, similar to the + Anti-Virus business. There are extremely strong efforts to keep + this market growing. Viruses, Worms, and now spam are just perfect + to keep this market alive: It is not sufficient to just buy a + software. Databases need to be updated continuously, thus making + the cash flow continuously. Have a single, simple, and permanent + solution to the problem and - boom - this billion dollar market is + dead. + + That's one of the reasons why people are expected to live with + spam. They have to live with it to make them buy Anti-Spam + software. Content filters are perfect products to keep this market + alive. + +12.2. The POP problem + + Another problem is the history of mail delivery. Once upon a time, + there used to be very few SMTP relays which handled the e-mail + traffic of all the world, and everybody was happy with that. Then + odd things like Personal Computers, which are sometimes switched + off, portable computers, dynamicly assigned IP addresses, IP access + from hotel rooms, etc. was invented, and people became unhappy, + because SMTP does not support delivery to such machines. To make + them happy again, the Post Office Protocol[3] was invented, which + turned the last part of message delivery from SMTP's push style + into a pull style, thus making virtually every computer on the + world with any random IP address a potential receiver of mails for + random domains. Unfortunately, only receiving e-mail was covered, + but sending e-mail was left to SMTP. + + The result is that today we have only very few SMTP relays pointed + + + +Hadmut Danisch Experimental [Page 21] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + to by MX records, but an extreme number of hosts sending e-mail + with SMTP from any IP address with sender addresses from any + domain. Mail delivery has become very asymmetric. Insecurity, + especially forgeability, has become an essential part of mail + transport. + + That problem could easily be fixed: Use protocols which allow + uploading of messages to be delivered. If a host doesn't receive + messages by SMTP, it shouldn't deliver by SMTP. Mail delivery + should go the same way back that incoming mail went in. This is + not a limitation to those people on the road who plug their + portable computer in any hotel room's phone plug and use any + provider. If there is a POP server granting download access from + anywhere, then the same server should be ready to accept uploading + of outgoing messages. + + But as I saw from the comments on the first version of this draft, + people religiously insist on sending e-mail with their domain from + any computer with any IP address in the world, e.g. when visiting a + friend using her computer. It appears to be impossible to convince + people that stopping mail forgery requires every one of them to + give up forging. + +12.3. The network structure problem + + A subsequent problem is that many organisations failed to implement + a proper mail delivery structure and heavily based their network on + this asymmetry. I received harsh comments from Universities who + were unable to give their network a good structure. While they do + have a central mail relay for incoming mail to the universities + domain, they developed a structure where every member of the + University randomly sends e-mails with that University's domain as + a sender address from home or everywhere in the world with any + dynamically assigned IP address from any provider. So this domain + is to be used from every possible IP address on earth, and they are + unable to operate any authentication scheme. Furthermore, they were + unable to understand that such a policy heavily supports spam and + that they have to expect that people don't accept such e-mails + anymore once they become blacklisted. + + As long as organisations insist on having such policies, spammers + will have a perfect playground. + +12.4. The mentality problem + + Another problem is the mentality of many internet users of certain + countries. I received harsh comments from people who strongly + insisted on the freedom to send any e-mail with any sender address + + + +Hadmut Danisch Experimental [Page 22] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + + from anywhere, and who heavily refused any kind of authentication + step or any limitation, because they claimed that this would + infringe their constitutional "Freedom of speech". They are + undeviatingly convinced that "Freedom of speech" guarantees their + right to talk to everybody with any sender address, and that is has + to be kept the recipient's own problem to sort out what he doesn't + want to read - on the recipient's expense. + + It requires a clear statement that the constitutional "Freedom of + Speech" does not cover molesting people with unsolicited e-mail + with forged sender address. + +12.5. The identity problem + + How does one fight against mail forgery? With authentication. What + is authentication? In simple words: Making sure that the sender's + real identity meets the recipients idea of who is the sender, based + on the sender address which came with the message. + + What is identity? It is the main problem. Several countries have + different ideas of "identity", which turn out to be somehow + incompatible. In some countries people have identity cards and + never change their name and birthday. Identities are created by + human birth, not by identity changes. Other countries do not have + such a tight idea about identity. People's temporary identity is + based on nothing more than a driving license and a social security + number. With this background, it is virtually impossible to create + a trustworthy PKI covering all Internet users. I learned that it is + extremely difficult to convince some people to give up random e- + mail sending. + +12.6. The multi-legislation problem + + Many proposals about fighting spam are feasible under certain + legislations only, and are inacceptable under some of the + legislations. But a world wide applicable method is required. + That's why the approach to ask everone on the world to sign + messages with cryptographic keys is not feasible. + +Implementation and further Information + + Further informations and a test implementation are available at + + http://www.danisch.de/work/security/antispam.html + + and + + http://www.danisch.de/software/rmx/ + + + +Hadmut Danisch Experimental [Page 23] + +INTERNET-DRAFT DNS RMX RR Jun 2003 + + +References + + + +1. J. Klensin, "Simple Mail Transfer Protocol," RFC 2821 (April 2001). + +2. P. Mockapetris, "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION," + RFC 1035 (November 1987). + +3. J. Myers, M. Rose, "Post Office Protocol - Version 3," RFC 1939 + (May 1996). + + +Author's Address + + Hadmut Danisch + + Tennesseeallee 58 + 76149 Karlsruhe + Germany + + Phone: ++49-721-843004 + E-Mail: rfc@danisch.de + +Comments + + Please send comments to rfc@danisch.de. + +Expiry + + This drafts expires on Dec 1, 2003 + + + + + + + + + + + + + + + + + + + + +Hadmut Danisch Experimental [Page 24] + From c8af2c78dda159803ca45e9181e35baf98571437 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 6 Jun 2003 06:09:39 +0000 Subject: [PATCH 19/75] Use LOCK_ZONE/UNLOCK_ZONE. --- lib/dns/zone.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index c08ba48dc4..ab09bb8d44 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.390 2003/05/21 14:15:32 marka Exp $ */ +/* $Id: zone.c,v 1.391 2003/06/06 06:09:39 marka Exp $ */ #include @@ -1138,14 +1138,14 @@ zone_gotwritehandle(isc_task_t *task, isc_event_t *event) { if (result == ISC_R_CANCELED) goto fail; - LOCK(&zone->lock); + LOCK_ZONE(zone); dns_db_currentversion(zone->db, &version); result = dns_master_dumpinc(zone->mctx, zone->db, version, &dns_master_style_default, zone->masterfile, zone->task, dump_done, zone, &zone->dctx); dns_db_closeversion(zone->db, &version, ISC_FALSE); - UNLOCK(&zone->lock); + UNLOCK_ZONE(zone); if (result != DNS_R_CONTINUE) goto fail; return; From 5d4999d24144f18881d96eb157a5aac96ee237b6 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 17 Jun 2003 14:37:25 +0000 Subject: [PATCH 20/75] new draft --- doc/draft/draft-stjohns-secure-notify-00.txt | 560 +++++++++++++++++++ 1 file changed, 560 insertions(+) create mode 100644 doc/draft/draft-stjohns-secure-notify-00.txt diff --git a/doc/draft/draft-stjohns-secure-notify-00.txt b/doc/draft/draft-stjohns-secure-notify-00.txt new file mode 100644 index 0000000000..d651cfb986 --- /dev/null +++ b/doc/draft/draft-stjohns-secure-notify-00.txt @@ -0,0 +1,560 @@ + + +Network Working Group M. StJohns +Internet-Draft Nominum, Inc. +Expires: December 12, 2003 June 13, 2003 + + + Using DNSSEC-secured NOTIFY to Trigger Parent Zone Updating + draft-stjohns-secure-notify-00 + +Status of this Memo + + This document is an Internet-Draft and is in full conformance with + all provisions of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that other + groups may also distribute working documents as Internet-Drafts. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress." + + The list of current Internet-Drafts can be accessed at http:// + www.ietf.org/ietf/1id-abstracts.txt. + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + + This Internet-Draft will expire on December 12, 2003. + +Copyright Notice + + Copyright (C) The Internet Society (2003). All Rights Reserved. + +Abstract + + This document describes an extension or revision to the DNS NOTIFY + mechanism which would allow a child zone to securely notify a parent + zone of the need to update records that appear in the parent zone, + but are related to records in the child zone. At this time, the two + resource record types are the NS or Name Server record, and the DS or + Delegation Signer record. + + + + + + + + + + +StJohns Expires December 12, 2003 [Page 1] + +Internet-Draft secured-notify June 2003 + + +Table of Contents + + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 + 2. General Mechanism . . . . . . . . . . . . . . . . . . . . . 4 + 2.1 Update Methods . . . . . . . . . . . . . . . . . . . . . . . 5 + 2.1.1 Automatic Update . . . . . . . . . . . . . . . . . . . . . . 5 + 2.1.2 Manual Update . . . . . . . . . . . . . . . . . . . . . . . 5 + 2.1.3 Parent Pull . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2.2 Update of Parent DS Records . . . . . . . . . . . . . . . . 6 + 2.3 Update of Parent NS Records . . . . . . . . . . . . . . . . 6 + 2.4 Uncommitted Updates . . . . . . . . . . . . . . . . . . . . 6 + 3. Parent Zone Secondary Server Update . . . . . . . . . . . . 6 + 4. Security Considerations . . . . . . . . . . . . . . . . . . 7 + Author's Address . . . . . . . . . . . . . . . . . . . . . . 8 + Normative References . . . . . . . . . . . . . . . . . . . . 7 + A. Discussion: NOTIFY vs UPDATE & Push vs Pull . . . . . . . . 8 + Intellectual Property and Copyright Statements . . . . . . . 9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +StJohns Expires December 12, 2003 [Page 2] + +Internet-Draft secured-notify June 2003 + + +1. Introduction + + Author's note: "SEP" will be changed to whatever the final version of + [SEPFLAG] ends up making it. + + Author's note: There may be too many options at places in this + document. Prior to any submission for advancement to standard, the + intent is reduce each set of choices down to either a single + preferred approach, or a preferred choice plus one alternate. + + The orignal DNS NOTIFY RFC [RFC1996] specified a mechanism for a + master server of a zone to tell its secondary servers that a zone had + changed. The secondary server could then initiate a transfer from + the master server to update its copy of that zone. RFC1996 only + specified a notify of a change of an SOA record, and only a + notification between primary and secondary servers. + + The original DNS Security (DNSSEC) RFC [RFC2535] specified various + mechanisms for securing (i.e. authenticating) the data within the + DNS. It also included mechanisms for signing transactions. [DSREC] + specifies a change to RFC2535 which removes the glue KEY record from + a parent domain, and replaces it with the Delegation Signer or DS + record which points at a KEY record held by a child zone. The DS + record is only present in the parent zone at a delegation point. + + This document specifies a mechanism for a child zone to notify a + parent zone (more specifically, the master server of a parent zone) + of changes in the child zone which might affect glue information held + in the parent. The transaction signature mechanisms specified in + RFC2535 and modified in RFC2931 [RFC2931] are used to provide + authentication of the notification. A notify is triggered by a + change to records in the child zone which have or should have related + records in the parent. At this time, these are either the KSK KEY + records (a subset of the KEY RRSet)which are represented in the + parent by DS records, or records in the child's apex NS RRSet. Once + notified, the parent MAY update its glue information. + + Note that while both parent and child zones may have RRSets of SIG + and NXT with the same name, the content of those records in the + parent zone is directly related to the content of the parent zone, + and not to the child zone and vice versa. + + Glue "A" records could be updated using this mechanism, but may be + problematic as not all "A" records covering the glue "NS" records + will always reside within the child zone. Specifically, not all names + contained in NS records for a zone will be names within the zone. In + fact, best practice requires that a zone be served by at least one + server that can be referenced by a name not within that zone. + + + +StJohns Expires December 12, 2003 [Page 3] + +Internet-Draft secured-notify June 2003 + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in [RFC2119]. + +2. General Mechanism + + When the primary server of the child zone detects a change in either + its set of secure-entry-point (SEP) KEY records or in its set of NS + records, it MAY (configuration dependent) send a NOTIFY to the + primary (or other designated server) of its parent zone. The NOTIFY + includes the complete set of records which make up the changed RRSet. + If more than one type of RRSet has changed, seperate NOTIFYs should + be sent for each change, and per RFC1996, no more than one NOTIFY + should be outstanding at any time. + + The NOTIFY is protected using a transaction signature SIG(0)RR + [RFC2931]. The private key used to form the signature MUST be one of + the ones currently used to sign the KEY RRSet in the child zone (e.g. + there MUST be a SIG(KEY) record pointing at that key). If the SEP + KEY record associated with this private key is not otherwise included + in the NOTIFY message, it SHOULD be included in the additional + information section of the NOTIFY message. If the KEY record is not + included, there will be a delay in completing the NOTIFY transaction + while the receiving parent server retrieves the KEY record from the + child. + + If the SIG(0)is missing the server MUST return an error code of ??. + + The receiving server first checks to see if it holds a DS record that + maps to the KEY associated with the SIG(0) on the NOTIFY. If the DS + exists AND is signed, the signature over the NOTIFY is validated + against the KEY record. If the DS does not exist, the server MUST + return an error code of ?? + + If the signature verifies, the NOTIFY message should be considered + authentic, and the server then sends the NOTIFY response. If the + signature does not verify, the server MUST return an error code of ?? + + The sending server should continue to retry until it gets some + response from the parent zone server, or until too many retries. See + RFC1996 for details on general retransmission and retry procedures + for NOTIFY. [Author's note: This may not be sufficient guidance to + cover the case where the parent has to retrieve the KEY record from + the child.] + + If the policy at the receiving server permits, the data included in + the NOTIFY and secured under the signature MUST be considered + authentic, and MUST be used as the source data to update the records + + + +StJohns Expires December 12, 2003 [Page 4] + +Internet-Draft secured-notify June 2003 + + + held by the parent zone. If policy does not permit acceptance of the + data in the NOTIFY, or if data is missing (e.g. if the TC bit is + set), the parent server MUST query the child zone to retrieve any + missing data (e.g. KEY records, NS records, applicable SIG records). + The retrieved data MUST be secured (e.g. the SIG records must verify, + and the KEY used to sign the SIG MUST have a signed DS present in the + parent zone.) + + At this point, the parent server has enough information to update the + records it holds. How it does it is a matter of policy. + +2.1 Update Methods + + Author's note - I personally prefer Automatic or Manual - I think + Parent Pull is the wrong model here. + +2.1.1 Automatic Update + + In the "Automatic Update" model, the parent server has immediate + access to the private keys needed to sign the new records. Once the + NOTIFY is verified, and the contents of the new records are checked + or generated, the parent zone signs the new records and publishes + them. + +2.1.2 Manual Update + + In the "Manual Update" model, private keys are either off-line, or + require human action to sign the zone, or policy requires someone to + check the data before its added to the zone (e.g. for child NS + records). When an update becomes available (e.g. when the parent + server verifies and accepts the NOTIFY), the server MUST notify an + administrator by email or other appropriate method of the pending + action. It must repeat that notification at a configurable interval + (e.g. once a day) until the adminstrator takes action to approve or + reject the change. + + Once the changes are approved and signed, the new records are + published to the DNS. + +2.1.3 Parent Pull + + In the "Parent Pull" model, the child to parent NOTIFY acts like the + master to secondary NOTIFY works currently. E.g. the parent takes the + NOTIFY as a request to gather data to update its zone. The parent, + on its own schedule, retrieves the NS or KEY records from the child + and compares them to what it current has. If there are differences, + the parent copies or generates replacement records (i.e. the DS + records which map to the child KEY records), signs them, and + + + +StJohns Expires December 12, 2003 [Page 5] + +Internet-Draft secured-notify June 2003 + + + publishes them. As above, this can proceed either manually or + automatically. + +2.2 Update of Parent DS Records + + The DS records held in the parent zone are derived from the KEY + records originated by the child. They are also protected under a key + held by the parent zone. Upon receipt of the NOTIFY indicating a + child KEY change, and after any other queries required (e.g. to + retrieve copies of the KEY or NS records from the child), the parent + forms a new DS RRSet consisting only of DS's which point to the + current set of child SEP KEY records. This new DS RRSet, after it is + signed, replaces the current DS RRSet held by the parent server in + its entirety. + +2.3 Update of Parent NS Records + + Since the parent zone's copies of the NS records for the child zone + are not signed, it is a simple matter of policy as to whether the + update of the NS records requires human intervention, or can be done + automatically upon receipt of the NOTIFY. This should be a + configurable item, and the action should default to automatic. + + The parent zone MUST verify the names pointed to by the NS are + resolvable, that at least one name points to a server not named in + the child zone, and that it has glue A records for any server named + in the child zone. [Q: Does this make sense, or is it better to just + trust the child?] If these conditions are not satisfied, the parent + server MUST NOT install the new records, and MUST log the problem. + It must also return an error code of ?? + + The set of glue NS records held by the parent which point to the + child MUST be replaced in their entirety by the new set of NS records + provided either in the notify, or by retrieval by the parent server + from the child. + +2.4 Uncommitted Updates + + If a parent zone has a uncommitted update of child information (e.g. + because policy requires manual intervention to approve the update), + it MUST discard that update upon validated receipt of a new NOTIFY + covering the information to be updated. I.e., if the new NOTIFY + covers NS records, discard any previous uncommitted updates to the NS + RRSet. + +3. Parent Zone Secondary Server Update + + Once the adminstrator of the parent zone has accepted the changes + + + +StJohns Expires December 12, 2003 [Page 6] + +Internet-Draft secured-notify June 2003 + + + (either automatically, or by specific action), the parent zone + records on the primary server MUST be updated, and, if policy allows, + the primary SHOULD do a DNS NOTIFY to the secondary servers + indicating the change to the NS or DS records. + +4. Security Considerations + + The security of this mechanism is directly related to the protection + afforded the private keys of the parent and child zones. Compromise + of the child zone keys can result in incorrect information being + added to both the parent and child zones. It could also result in + additional denial of service threats to the parent servers in that + the servers could be tied up validating and processing bogus (but + authenticated) update requests for the compromised child zone. + +Normative References + + [DSREC] Gudmundsson, O., "Delegation Signer Resource Record", ID + draft-ietf-dnsext-delegation-signer-14.txt, May 2003, + . + + [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone + Changes (DNS NOTIFY)", RFC 1996, August 1996. + + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, March 1997. + + [RFC2535] Eastlake, D., "Domain Name System Security Extensions", + RFC 2535, March 1999. + + [RFC2931] Eastlake, D., "DNS Request and Transaction Signatures ( + SIG(0)s)", RFC 2931, September 2000. + + [SEPFLAG] Kolkman, O., "KEY RR Secure Entry Point (SEP) Flag", ID + draft-ietf-dnsext-keyrr-key-signing-flag-07.txt, January + 2003, . + + + + + + + + + + + + + +StJohns Expires December 12, 2003 [Page 7] + +Internet-Draft secured-notify June 2003 + + +Author's Address + + Michael StJohns + Nominum, Inc. + 2385 Bay Road + Redwood City, CA 94063 + USA + + Phone: +1-301-528-4729 + EMail: Mike.StJohns@nominum.com + URI: www.nominum.com + +Appendix A. Discussion: NOTIFY vs UPDATE & Push vs Pull + + During the pre-publication phase, the author solicited comments on + this draft. One email made two suggestions. The first was to use + UPDATE instead of NOTIFY, the second was if NOTIFY was used then to + use the notify/pull model for update rather than the mode proposed + here of pushing the data as part of the NOTIFY. + + On the subject of NOTIFY vs UPDATE, neither has exactly the model + described here, but NOTIFY comes closer. UPDATE has semantics that + says "please update your copy of something that I own with this + information that I've provided." NOTIFY's semantics are "something's + changed that you may care about." What we really want is + "something's changed that I own, that may affect something that you + own and here's the data that's changed." NOTIFY is probably the + closest to this meaning. + + On the subject of push vs pull, either of these two models would + work, and the pull model (ala the original NOTIFY RFC) should be the + fall back if data isn't provided as part of the secured NOTIFY. If + the data is provided and secured (i.e. signed) in the NOTIFY, the + parent shouldn't actually have to retrieve data from the child zone + (unless the NOTIFY is truncated). If the NOTIFY isn't signed, then + the pull model is the only one that will work, but then there's no + point in actually writing this document. In general, the author + would like to minimize the work factor for the parent and keeping + track of which child zones need to be polled could be expensive, + especially in very large parent zones. Placing the burden on the + child to push data to the parent seems a better choice. + + + + + + + + + + +StJohns Expires December 12, 2003 [Page 8] + +Internet-Draft secured-notify June 2003 + + +Intellectual Property Statement + + The IETF takes no position regarding the validity or scope of any + intellectual property or other rights that might be claimed to + pertain to the implementation or use of the technology described in + this document or the extent to which any license under such rights + might or might not be available; neither does it represent that it + has made any effort to identify any such rights. Information on the + IETF's procedures with respect to rights in standards-track and + standards-related documentation can be found in BCP-11. Copies of + claims of rights made available for publication and any assurances of + licenses to be made available, or the result of an attempt made to + obtain a general license or permission for the use of such + proprietary rights by implementors or users of this specification can + be obtained from the IETF Secretariat. + + The IETF invites any interested party to bring to its attention any + copyrights, patents or patent applications, or other proprietary + rights which may cover technology that may be required to practice + this standard. Please address the information to the IETF Executive + Director. + + The IETF has been notified of intellectual property rights claimed in + regard to some or all of the specification contained in this + document. For more information consult the online list of claimed + rights. + + +Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assignees. + + + +StJohns Expires December 12, 2003 [Page 9] + +Internet-Draft secured-notify June 2003 + + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +StJohns Expires December 12, 2003 [Page 10] + From 692ae2fff922f1c072169d1ddda8e600cb572a9b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 18 Jun 2003 05:42:45 +0000 Subject: [PATCH 21/75] don't print redundant $ORIGIN's. --- lib/dns/masterdump.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index 79977cc970..c4499e4c56 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: masterdump.c,v 1.67 2003/04/11 07:25:24 marka Exp $ */ +/* $Id: masterdump.c,v 1.68 2003/06/18 05:42:45 marka Exp $ */ #include @@ -81,6 +81,7 @@ typedef struct dns_totext_ctx { char * linebreak; char linebreak_buf[DNS_TOTEXT_LINEBREAK_MAXLEN]; dns_name_t * origin; + dns_name_t * neworigin; dns_fixedname_t origin_fixname; isc_uint32_t current_ttl; isc_boolean_t current_ttl_valid; @@ -285,6 +286,7 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) { } ctx->origin = NULL; + ctx->neworigin = NULL; ctx->current_ttl = 0; ctx->current_ttl_valid = ISC_FALSE; @@ -770,6 +772,7 @@ dump_rdatasets(isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter, isc_buffer_t *buffer, FILE *f) { isc_result_t itresult, dumpresult; + isc_region_t r; dns_rdataset_t rdatasets[MAXSORT]; dns_rdataset_t *sorted[MAXSORT]; int i, n; @@ -777,6 +780,15 @@ dump_rdatasets(isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter, itresult = dns_rdatasetiter_first(rdsiter); dumpresult = ISC_R_SUCCESS; + if (itresult == ISC_R_SUCCESS && ctx->neworigin != NULL) { + isc_buffer_clear(buffer); + itresult = dns_name_totext(ctx->neworigin, ISC_FALSE, buffer); + RUNTIME_CHECK(itresult == ISC_R_SUCCESS); + isc_buffer_usedregion(buffer, &r); + fprintf(f, "$ORIGIN %.*s\n", (int) r.length, (char *) r.base); + ctx->neworigin = NULL; + } + again: for (i = 0; itresult == ISC_R_SUCCESS && i < MAXSORT; @@ -1117,14 +1129,9 @@ dumptostreaminc(dns_dumpctx_t *dctx) { dns_fixedname_name(&dctx->tctx.origin_fixname); result = dns_dbiterator_origin(dctx->dbiter, origin); RUNTIME_CHECK(result == ISC_R_SUCCESS); - isc_buffer_clear(&buffer); - result = dns_name_totext(origin, ISC_FALSE, &buffer); - RUNTIME_CHECK(result == ISC_R_SUCCESS); - isc_buffer_usedregion(&buffer, &r); - fprintf(dctx->f, "$ORIGIN %.*s\n", (int) r.length, - (char *) r.base); if ((dctx->tctx.style.flags & DNS_STYLEFLAG_REL_DATA) != 0) dctx->tctx.origin = origin; + dctx->tctx.neworigin = origin; } result = dns_db_allrdatasets(dctx->db, node, dctx->version, dctx->now, &rdsiter); From ef239afc1c2e8d3b9d076295e8ae04451e8879d9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 18 Jun 2003 21:37:50 +0000 Subject: [PATCH 22/75] new draft --- ...-dnsext-dnssec-2535typecode-change-02.txt} | 137 +- .../draft-ietf-dnsext-wcard-clarify-00.txt | 888 +++++++++++ doc/draft/draft-jseng-idn-admin-01.txt | 1175 --------------- doc/draft/draft-jseng-idn-admin-03.txt | 1335 +++++++++++++++++ 4 files changed, 2319 insertions(+), 1216 deletions(-) rename doc/draft/{draft-ietf-dnsext-dnssec-2535typecode-change-01.txt => draft-ietf-dnsext-dnssec-2535typecode-change-02.txt} (73%) create mode 100644 doc/draft/draft-ietf-dnsext-wcard-clarify-00.txt delete mode 100644 doc/draft/draft-jseng-idn-admin-01.txt create mode 100644 doc/draft/draft-jseng-idn-admin-03.txt diff --git a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt similarity index 73% rename from doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt rename to doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt index a28552912b..daea79c59a 100644 --- a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-01.txt +++ b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt @@ -1,9 +1,10 @@ -INTERNET-DRAFT Samuel Weiler -Expires: November 2003 May 22, 2003 +INTERNET-DRAFT Samuel Weiler +Expires: December 2003 June 12, 2003 +Updates: RFC 2535, [DS] Legacy Resolver Compatibility for Delegation Signer - draft-ietf-dnsext-dnssec-2535typecode-change-01.txt + draft-ietf-dnsext-dnssec-2535typecode-change-02.txt Status of this Memo @@ -17,7 +18,7 @@ Status of this Memo Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other - documents at any time. It is inappropriate to use Internet- Drafts + documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." @@ -43,6 +44,25 @@ Abstract these interactions be avoided by changing the type codes and mnemonics of the DNSSEC RRs (SIG, KEY, and NXT). +Changes between 01 and 02: + + SIG(0) still uses SIG, not RRSIG. Added 2931 reference. + + Domain names embedded in NSECs and RRSIGs are not compressible and + are not downcased. Added unknown-rrs reference. + + Simplified the last paragraph of section 3 (NSEC doesn't always + signal a negative answer). + + Changed the suggested type code assignments. + + Added 2119 reference. + + Added definitions of "unsecure delegation" and "unsecure referral", + since they're not clearly defined elsewhere. + + Moved 2065 to informative references, not normative. + 1. Introduction The DNSSEC protocol has been through many iterations whose syntax @@ -75,12 +95,23 @@ Abstract disincentive to sign zones with DS. The proposed solution allows for the incremental deployment of DS. -1.1 The Problem +1.1 Terminology - Delegation signer [DS] introduces new semantics for the NXT RR that + In this document, the term "unsecure delegation" means any + delegation for which no DS record appears at the parent. An + "unsecure referral" is an answer from the parent containing an NS + RRset and a proof that no DS record exists for that name. + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + document are to be interpreted as described in [RFC2119]. + +1.2 The Problem + + Delegation Signer [DS] introduces new semantics for the NXT RR that are incompatible with the semantics in [RFC2535]. In [RFC2535], NXT records were only required to be returned as part of a - non-existence proof. In [DS], an unsecure referral returns, in + non-existence proof. With DS, an unsecure referral returns, in addition to the NS, a proof of non-existence of a DS RR in the form of an NXT and SIG(NXT). RFC 2535 didn't specify how a resolver was to interpret a response with both an NS and an NXT in the authority @@ -90,14 +121,14 @@ Abstract delegations being invisible to 2535-aware resolvers and violates the basic architectural principle that DNSSEC must do no harm -- the signing of zones must not prevent the resolution of unsecured - names. + delegations. 2. Possible Solutions This section presents several possible solutions. Section 3 recommends one and describes it in more detail. -2.1. Change SIG, KEY, and NXT +2.1. Change SIG, KEY, and NXT type codes To avoid the problem described above, legacy (RFC2535-aware) resolvers need to be kept from seeing unsecure referrals that @@ -177,49 +208,60 @@ Abstract 3. Protocol changes This document proposes changing the type codes of SIG, KEY, and - NXT. This solution is the cleanest and safest, largely because the - behavior of resolvers that receive unknown type codes is well - understood. This approach has also received the most testing. + NXT. This approach is the cleanest and safest of those discussed + above, largely because the behavior of resolvers that receive + unknown type codes is well understood. This approach has also + received the most testing. To avoid operational confusion, it's also necessary to change the mnemonics for these RRs. DNSKEY will be the replacement for KEY, with the mnemonic indicating that these keys are not for application use, per [RFC3445]. RRSIG (Resource Record SIGnature) - will replace SIG, and NSEC (Next SECure) will replace NXT. + will replace SIG, and NSEC (Next SECure) will replace NXT. These + new types completely replace the old types, except that SIG(0) + [RFC2931] will continue to use SIG. The new types will have exactly the same syntax and semantics as - specified for SIG, KEY, and NXT in [RFC2535] and [DS], and they - completely replace the old types. A resolver, if it receives the - old types, SHOULD treat them as unknown RRs, and SHOULD NOT assign - any special semantic value to them. It MUST NOT use them for - DNSSEC validations or other DNS operational decision making. For - example, a resolver MUST NOT use DNSKEYs to validate SIGs or use - KEYs to validate RRSIGs. Authoritative servers SHOULD NOT serve - SIG, KEY, or NXT records. If those records are included, they MUST - NOT receive special treatment. As an example, if a SIG is included - in a signed zone, there MUST be an RRSIG for it. + specified for SIG, KEY, and NXT in [RFC2535] and [DS] except for + the following: + + 1) Consistent with [UNKNOWN-RRs], domain names embedded in + RRSIG and NSEC RRs MUST NOT be compressed, + + 2) Embedded domain names in RRSIG and NSEC RRs are not downcased + for purposes of DNSSEC canonical form and ordering nor for + equality comparison, and + + 3) An RRSIG with a type covered field of zero has undefined + semantics. + + If a resolver receives the old types, it SHOULD treat them as + unknown RRs and SHOULD NOT assign any special semantic value to + them. It MUST NOT use them for DNSSEC validations or other DNS + operational decision making. For example, a resolver MUST NOT use + DNSKEYs to validate SIGs or use KEYs to validate RRSIGs. + Authoritative servers SHOULD NOT serve SIG, KEY, or NXT records. + If those records are included, they MUST NOT receive special + treatment. As an example, if a SIG is included in a signed zone, + there MUST be an RRSIG for it. + + As a clarification to previous documents, some positive responses, + particularly wildcard proofs and unsecure referrals, will contain + NSEC RRs. Resolvers MUST NOT treat answers with NSEC RRs as + negative answers merely because they contain an NSEC. - As a clarification to previous documents, many positive responses, - including wildcard proofs and insecure referrals, will contain NSEC - RRs. As a result, resolvers MUST NOT treat answers with NSEC RRs - as negative answers merely because they contain an NSEC. A - resolver SHOULD either ignore the NSEC, as a DNSSEC-unaware (or - 2535-aware) resolver would, or validate the NSEC and check its - applicability and interpretation as described in [RFC2535] and - [DS]. - 4. IANA Considerations This document updates the IANA registry for DNS Resource Record - Types by assigning types 46, 47, and 48 to the DNSKEY, RRSIG, and - NSEC RRs, respectively. + Types by assigning types 46, 47, and 48 to the RRSIG, NSEC, and + DNSKEY RRs, respectively. - Types 24, 25, and 30 (SIG, KEY, and NXT) should be marked as - Obsolete. + Types 24 (SIG) is retained for SIG(0) [RFC2931] use only. Types 25 + and 30 (KEY and NXT) should be marked as Obsolete. 5. Security Considerations - The change proposed here does not materially effect security. The + The change proposed here does not materially affect security. The implications of trying to use both new and legacy types together are not well understood, and attempts to do so would probably lead to unintended and dangerous results. @@ -235,9 +277,6 @@ Abstract 6. Normative references - [RFC2065] Eastlake, D. and C. Kaufman, "Domain Name System Security - Extensions", RFC 2065, January 1997. - [RFC2535] Eastlake, D., "Domain Name System Security Extensions", RFC 2535, March 1999. @@ -245,8 +284,17 @@ Abstract draft-ietf-dnsext-delegation-signer-14.txt, work in progress, May 2003. + [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate + Requirement Levels", BCP 14, RFC 2119, March 1997. + + [RFC2931] Eastlake, D., "DNS Request and Transaction Signatures + (SIG(0)s)", RFC 2931, September 2000. + 7. Informative References + [RFC2065] Eastlake, D. and C. Kaufman, "Domain Name System Security + Extensions", RFC 2065, January 1997. + [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC 2671, August 1999. @@ -260,6 +308,11 @@ Abstract [RFC3445] Massey, D., and S. Rose. Limiting the Scope of the KEY Resource Record (RR). RFC 3445, December 2002. + [UNKNOWN-RRs] Gustafsson, A. Handling of Unknown DNS Resource + Record Types. draft-ietf-dnsext-unknown-rrs-05.txt + Publication as RFC pending. + + 8. Acknowledgments The proposed solution and the analysis of alternatives had many @@ -268,7 +321,7 @@ Abstract Bill Manning, and Suzanne Woolf. Thanks to Jakob Schlyter and Mark Andrews for identifying the - incompatibility described in section 1.1. + incompatibility described in section 1.2. In addition to the above, the author would like to thank Scott Rose, Olafur Gudmundsson, and Sandra Murphy for their substantive @@ -284,3 +337,5 @@ Abstract weiler@tislabs.com + + diff --git a/doc/draft/draft-ietf-dnsext-wcard-clarify-00.txt b/doc/draft/draft-ietf-dnsext-wcard-clarify-00.txt new file mode 100644 index 0000000000..e5cb2b27b2 --- /dev/null +++ b/doc/draft/draft-ietf-dnsext-wcard-clarify-00.txt @@ -0,0 +1,888 @@ +Internet Engineering Task Force B. Halley +Internet-Draft Nominum + E. Lewis + ARIN + +June 17, 2003 Expires: December 17, 2003 + + Clarifying the Role of Wild Card Domains + in the Domain Name System + + +Status of this Memo + + This document is an Internet-Draft and is in full conformance with all + provisions of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering Task + Force (IETF), its areas, and its working groups. Note that other + groups may also distribute working documents as Internet-Drafts. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as "work in progress". + + The list of current Internet-Drafts can be accessed at + http://www.ietf.org/ietf/1id-abstracts.txt + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + +Abstract + +The definition of wild cards is recast from the original in RFC 1034, +in words that are more specific and in line with RFC 2119. This document +is meant to supplement the definition in RFC 1034 and to alter neither +the spirit nor intent of that definition. + +1 Introduction + +The first section of this document will give a crisp overview of what +is begin defined, as well as the motivation for what amounts to a +simple rewording of an original document. Examples are included to +help orient the reader. + +Wild card domain names are defined in Section 4.3.3. of RFC 1034 as +"instructions for synthesizing RRs." [RFC1034] The meaning of this is +that a specific, special domain name is used to construct responses in +instances in which the query name is not otherwise represented in a zone. + +A wild card domain name has a specific range of influence on query names +(QNAMEs) within a given class, which is rooted at the domain name +containing the wild card label, and is limited by explicit entries, zone +cuts and empty non-terminal domains (see section 1.3 of this document). + +Note that a wild card domain name has no special impact on the search +for a query type (QTYPE). If a domain name is found that matches the +QNAME (exact or a wild card) but the QTYPE is not found at that point, +the proper response is that there is no data available. The search +does not continue on to seek other wild cards that might match the QTYPE. +To illustrate, a wild card owning an MX RR does not 'cover' other names +in the zone that own an A RR. + +Why is this document needed? Empirical evidence suggests that the +words in RFC 1034 are not clear enough. There exist a number of +implementations that have strayed (each differently) from that definition. +There also exists a misconception of operators that the wild card can be +used to add a specific RR type to all names, such as the MX RR example +cited above. This document is also needed as input to efforts to extend +DNS, such as the DNS Security Extensions [RFC 2535]. Lack of a clear +base specification has proven to result in extension documents that +have unpredictable consequences. (This is true in general, not just +for DNS.) + +Another reason this clarification is needed is to answer questions +regarding authenticated denial of existence, a service introduced in the +DNS Security Extensions [RFC 2535]. Prior to the work leading up to this +document, it had been feared that a large number of proof records (NXTs) +might be needed in each reply because of the unknown number of potential +wild card domains that were thought to be applicable. One outcome of this +fear is a now discontinued document solving a problem that is now known +not to exist. I.e., this clarification has the impact of defending against +unwarranted protocol surgery. It is not "yet another" effort to just +rewrite the early specifications for the sake of purity. + +1.1 Document Limits + +This document limits itself to reinforcing the concepts in RFC 1034. +Any deviation from this should be brought to the attention of the editors. + +Two changes to the text of RFC 1034 that fall within the realm of +clarifying the wild card definition have been suggested. (Changes aren't +really clarifications.) The two suggestions are barring the ownership +by a wild card domain of an CNAME resource record set and barring the +ownership by a wild card domain of a NS resource record set. Both +of these have some merit, but do not belong in a document that has not +yet been reviewed by the working group. + +1.2 Existence + +The notion that a domain name 'exists' will arise numerous times in this +discussion. RFC 1034 raises the issue of existence in a number of places, +usually in reference to non-existence and often in reference to processing +involving wild card domain names. RFC 1034 does contain algorithms that +describe how domain names impact the preparation of an answer and does +define wild cards as a means of synthesizing answers. + +To help clarify the topic of wild cards, a positive definition of existence +is needed. Complicating matters, though, is the realization that existence +is relative. To an authoritative server, a domain name exists if the +domain name plays a role following the algorithms of preparing a response. +To a resolver, a domain name exists if there is any data available +corresponding to the name. The difference between the two is the synthesis +of records according to a wild card. + +For the purposes of this document, the point of view of an authoritative +server is adopted. A domain name is said to exist if it plays a role in +the execution of the algorithms in RFC 1034. + +1.3 An Example + +For example, consider this wild card domain name: *.example. Any query +name under example. is a candidate to be matched (answered) by this wild +card, i.e., to have an response returned that is synthesized from the wild +card's RR sets. Although any name is a candidate, not all queries will +match. + +To further illustrate this, consider this example: + + $ORIGIN example. + @ IN SOA + NS + NS + * TXT "this is a wild card" + MX 10 mailhost.example. + host1 A 10.0.0.1 + _ssh._tcp.host1 SRV + _ssh._tcp.host2 SRV + subdel NS + +The following queries would be synthesized from the wild card: + QNAME=host3.example. QTYPE=MX, QCLASS=IN + the answer will be a "host3.example. IN MX ..." + QNAME=host3.example. QTYPE=A, QCLASS=IN + the answer will reflect "no error, but no data" + because there is no A RR set at '*' + +The following queries would not be synthesized from the wild card: + QNAME=host1.example., QTYPE=MX, QCLASS=IN + because host1.example. exists + QNAME=_telnet._tcp.host1.example., QTYPE=SRV, QCLASS=IN + because _tcp.host1.example. exists (without data) + QNAME=_telnet._tcp.host2.example., QTYPE=SRV, QCLASS=IN + because host2.example. exists (without data) + QNAME=host.subdel.example., QTYPE=A, QCLASS=IN + because subdel.example. exists and is a zone cut + +To the server, the following domains are considered to exist in the zone: +*, host1, _tcp.host1, _ssh._tcp.host1, host2, _tcp.host2, _ssh._tcp.host2, +and subdel. To a resolver, many more domains appear to exist via the +synthesis of the wild card. + +1.4 Empty Non-terminals + +Empty non-terminals are domain names that own no data but have subdomains. +This is defined in section 3.1 of RFC 1034: + +# The domain name space is a tree structure. Each node and leaf on the +# tree corresponds to a resource set (which may be empty). The domain +# system makes no distinctions between the uses of the interior nodes and +# leaves, and this memo uses the term "node" to refer to both. + +The parenthesized "which may be empty" specifies that empty non-terminals +are explicitly recognized. According to the definition of existence in +this document, empty non-terminals do exist at the server. + +Carefully reading the above paragraph can lead to an interpretation that +all possible domains exist - up to the suggested limit of 255 octets for +a domain name [RFC 1035]. For example, www.example. may have an A RR, and +as far as is practically concerned, is a leaf of the domain tree. But the +definition can be taken to mean that sub.www.example. also exists, albeit +with no data. By extension, all possible domains exist, from the root on +down. As RFC 1034 also defines "an authoritative name error indicating +that the name does not exist" in section 4.3.1, this is not the intent +of the original document. + +RFC1034's wording is to be clarified by adding the following paragraph: + + A node is considered to have an impact on the algorithms of 4.3.2 + if it is a leaf node with any resource sets or an interior node, + with or without a resource set, that has a subdomain that is a leaf + node with a resource set. A QNAME and QCLASS matching an existing + node never results in a response return code of authoritative name + error. + +The terminology in the above paragraph is chosen to remain as close to +that in the original document. The term "with" is a alternate form for +"owning" in this case, hence "a leaf node owning resources sets, or an +interior node, owning or not owning any resource set, that has a leaf +node owning a resource set as a subdomain," is the proper interpretation +of the middle sentence. + +As an aside, an "authoritative name error" has been called NXDOMAIN in +some RFCs, such as RFC 2136 [RFC 2136]. NXDOMAIN is the mnemonic assigned +to such an error by at least one implementation of DNS. As this +mnemonic is specific to implementations, it is avoided in the remainder +of this document. + +1.3 Terminology + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", +"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this +document are to be interpreted as described in the document entitled +"Key words for use in RFCs to Indicate Requirement Levels." [RFC2119] + +Requirements are denoted by paragraphs that begin with with the following +convention: 'R'.. + +2 Defining the Wild Card Domain Name + +A wild card domain name is defined by having the initial label be: + + 0000 0001 0010 1010 (binary) = 0x01 0x2a (hexadecimal) + +This defines domain names that may play a role in being a wild card, that +is, being a source for synthesized answers. Domain names conforming to +this definition that appear in queries and RDATA sections do not have +any special role. These cases will be described in more detail in +following sections. + +R2.1 A domain name that is to be interpreted as a wild card MUST begin + with a label of '0000 0001 0010 1010' in binary. + +The first octet is the normal label type and length for a 1 octet long +label, the second octet is the ASCII representation [RFC 20] for the +'*' character. In RFC 1034, ASCII encoding is assumed to be the character +encoding. + +In the master file formats used in RFCs, a "*" is a legal representation +for the wild card label. Even if the "*" is escaped, it is still +interpreted as the wild card when it is the only character in the label. + +R2.2. A server MUST treat a wild card domain name as the basis of + synthesized answers regardless of any "escape" sequences in + the input format. + +RFC 1034 and RFC 1035 ignore the case in which a domain name might be +"the*.example.com." The interpretation is that this domain name in a +zone would only match queries for "the*.example.com" and not have any +other role. + +Note: By virtue of this definition, a wild card domain name may have a +subdomain. The subdomain (or sub-subdomain) itself may also be a wild +card. E.g., *.*.example. is a wild card, so is *.sub.*.example. +More discussion on this is given in Appendix A. + +3 Defining Existence + +As described in the Introduction, a precise definition of existence is +needed. + +R3.1 An authoritative server MUST treat a domain name as existing during + the execution of the algorithms in RFC 1034 when the domain name + conforms to the following definition. A domain name is defined + to exist if the domain name owns data and/or has a subdomain that + exists. + +Note that at a zone boundary, the domain name owns data, including the +NS RR set. At the delegating server, the NS RR set is not authoritative, +but that is of no consequence here. The domain name owns data, therefore, +it exists. + +R3.2 An authoritative server MUST treat a domain name that has neither + a resource record set nor an existing subdomain as non-existent when + executing the algorithm in section 4.3.2. of RFC 1034. + +A note on terminology. A domain transcends zones, i.e., all DNS data is +in the root domain but segmented into zones of control. In this document, +there are references to a "domain name" in the context of existing "in a +zone." In this usage, a domain name is the root of a domain, not the entire +domain. The domain's root point is said to "exist in a zone" if the zone +is authoritative for the name. RR sets existing in a domain need not be +owned by the domain's root domain name, but are owned by other domain +names in the domain. + +4 Impact of a Wild Card Domain In a Query Message + +When a wild card domain name appears in a question, e.g., the query name +is "*.example.", the response in no way differs from any other query. +In other words, the wild card label in a QNAME has no special meaning, +and query processing will proceed using '*' as a literal query name. + +R4.1 A wild card domain name acting as a QNAME MUST be treated as any + other QNAME, there MUST be no special processing accorded it. + +If a wild card domain name appears in the RDATA of a CNAME RR or any +other RR that has a domain name in it, the same rule applies. In the +instance of a CNAME RR, the wild card domain name is used in the same +manner of as being the original QNAME. For other RR's, rules vary +regarding what is done with the domain name(s) appearing in them, +in no case does the wild card hold special meaning. + +R4.2 A wild card domain name appearing in any RR's RDATA MUST be treated + as any other domain name in that situation, there MUST be no special + processing accorded it. + +5 Impact of a Wild Card Domain On a Response + +The description of how wild cards impact response generation is in RFC +1034, section 4.3.2. That passage contains the algorithm followed by a +server in constructing a response. Within that algorithm, step 3, part +'c' defines the behavior of the wild card. The algorithm is directly +quoted in lines that begin with a '#' sign. Commentary is interleaved. + +[Note that are no requirements specifically listed in this section. The +text here is explanatory and interpretative. There is no change to +the algorithm specified in RFC 1034.] + +The context of part 'c' is that the search is progressing label by label +through the QNAME. (Note that the data being searched is the authoritative +data in the server, the cache is searched in step 4.) Step 3's part 'a' +covers the case that the QNAME has been matched in full, regardless of the +presence of a CNAME RR. Step 'b' covers crossing a cut point, resulting +in a referral. All that is left is to look for the wild card. + +Step 3 of the algorithm also assumes that the search is looking in the +zone closest to the answer, i.e., in the same class as QCLASS and as +close to the authority as possible on this server. If the zone is not +the authority, then a referral is given, possibly one indicating lameness. + +# c. If at some label, a match is impossible (i.e., the +# corresponding label does not exist), look to see if a +# the "*" label exists. + +The above paragraph refers to finding the domain name that exists in the +zone and that most encloses the QNAME. Such a domain name will mark the +boundary of candidate wild card domain names that might be used to +synthesize an answer. (Remember that at this point, if the most enclosing +name is the same as the QNAME, part 'a' would have recorded an exact +match.) The existence of the enclosing name means that no wild card name +higher in the tree is a candidate to answer the query. + +Once the closest enclosing node is identified, there's the matter of what +exists below it. It may have subdomains, but none will be closer to the +QNAME. One of the subdomains just might be a wild card. If it exists, +this is the only wild card eligible to be used to synthesize an answer +for the query. Even if the closest enclosing node conforms to the syntax +rule in section 2 for being a wild card domain name, the closest enclosing +node is not eligible to be a source of a synthesized answer. + +The only wild card domain name that is a candidate to synthesize an answer +will be the "*" subdomain of the closest enclosing domain name. Three +possibilities can happen. The "*" subdomain does not exist, the "*" +subdomain does but does not have an RR set of the same type as the QTYPE, +or it exists and has the desired RR set. + +For the sake of brevity, the closest enclosing node can be referred to as +the "closest encloser." The closest encloser is the most important concept +in this clarification. Describing the closest encloser is a bit tricky, +but it is an easy concept. + +To find the closest encloser, you have to first locate the zone that is +the authority for the query name. This eliminates the need to be concerned +that the closest encloser is a cut point. In addition, we can assume too +that the query name does not exist, hence the closest encloser is not equal +to the query name. We can assume away these two cases because they are +handled in steps a and b of section 4.3.2.'s algorithm. + +What is left is to identify the existing domain name that would have been +up the tree (closer to the root) from the query name. Knowing that an +exact match is impossible, if there is a "*" label descending from the +unique closest encloser, this is the one and only wild card from which +an answer can be synthesized for the query. + +To illustrate, using the example in section 1.2 of this document, the +following chart shows QNAMEs and the closest enclosers. In Appendix A +there is another chart showing unusual cases. + + QNAME Closest Encloser Wild Card Source + host3.example. example. *.example. + _telnet._tcp.host1.example. _tcp.host1.example. no wild card + _telnet._tcp.host2.example. host2.example. no wild card + _telnet._tcp.host3.example. example. *.example. + _chat._udp.host3.example. example. *.example. + +Note that host1.subdel.example. is in a subzone, so the search for it ends +in a referral in part 'b', thus does not enter into finding a closest +encloser. + +The fact that a closest encloser will be the only superdomain that +can have a candidate wild card will have an impact when it comes to +designing authenticated denial of existence proofs. (This concept +is not introduced until DNS Security Extensions are considered in +upcoming sections.) + +# If the "*" label does not exist, check whether the name +# we are looking for is the original QNAME in the query +# or a name we have followed due to a CNAME. If the name +# is original, set an authoritative name error in the +# response and exit. Otherwise just exit. + +The above passage says that if there is not even a wild card domain name +to match at this point (failing to find an explicit answer elsewhere), +we are to return an authoritative name error at this point. If we were +following a CNAME, the specification is unclear, but seems to imply that +a no error return code is appropriate, with just the CNAME RR (or sequence +of CNAME RRs) in the answer section. + +# If the "*" label does exist, match RRs at that node +# against QTYPE. If any match, copy them into the answer +# section, but set the owner of the RR to be QNAME, and +# not the node with the "*" label. Go to step 6. + +This final paragraph covers the role of the QTYPE in the process. Note +that if no resource record set matches the QTYPE the result is that no data +is copied, but the search still ceases ("Go to step 6."). + +6 Authenticated Denial and Wild Cards + +In unsecured DNS, the only concern when there is no data to return to +a query is whether the domain name from which the answer comes exists or +not, whether or not a name error is indicated in the return code. In +either case the answer section is empty or contained just a sequence of +CNAME RR sets. + +In securing DNS, authenticated denial of existence is a service that is +provided. The chosen solution to provide this service is to generate +resource records indicating what is protected in a zone and to digitally +sign these. + +The resource records that do this, as defined in RFC 2535, are NXT RRs. + +There are three points to consider when clarifying the topic of wild card +domain names. One is the construction of the records. The second is +the inclusion of records in responses. The third is the interpretation +of the records in a response by the resolver. + +In short, authenticated denial has to be sure to prove that the closest +encloser does not equal the query name, whether there is a wild card +name directly under the closest encloser. + +6.1 Preparing Wild Card Domain Name Owned Non-existence Proofs + +During the creation of the authenticated denial records, the wild card +domain name plays no special role, in the same manner as the wild card +domain name playing no special role in a query. + +There are two considerations with regards to preparing non-existence +proofs. + +R6.1 Any mechanism used to provide authenticated denial MUST reveal the + closest enclosing existing domain name for the query. If this is not + provided, the resolver will not be able to ascertain the identity + of an appropriate wild card domain name. + +R6.2 If a zone is signed in such a way that offers authenticated denial + of existence, wild card domain name owned RR sets MUST be signed. + Otherwise the determination of the "closest encloser" is not possible. + +6.2 Role of Wild Cards in Answers + +There are three cases to address. The first is synthesizing from wild card +domain name with data, the second is negatively synthesizing from an +existing wild card, and the third is denying that neither an exact match, +referral, nor wild card exist to answer the query. + +6.2.1 Synthesizing From a Wild Card + +When preparing an answer from a wild card domain name, the answer needs +to include proof that the exact match of the QNAME and QCLASS does not +exist. This is needed because synthesis of the answer replaces the "*" +label with the QNAME without securing the result. The resolver will +realize that the answer was derived from a wild card, but cannot +detect whether an exact match was maliciously omitted. + +R6.3 When synthesizing a positive answer from a wild card domain name, the + answer MUST include proof that the exact match for the QNAME and + QCLASS does not exist. + +Note that a proof that the QTYPE does not exist at the QNAME and QCLASS is +not sufficient to justify synthesis from a wild card. + +6.2.2. Synthesizing Authoritative No Error, No Data From a Wild Card + +When synthesizing a negative answer that is derived from a wild card, +meaning that a wild card matched the QNAME (no exact match happened for +QNAME) but that there is no match for QTYPE there, at most two negative +answers are needed, possibly one. As in 6.2.1, a proof that the exact +match failed is needed. A second proof is needed to show that the wild +card domain name does not have the QTYPE. Depending on the method of +authenticated denial, these this could be possible with one statement. + +R6.4 When synthesizing a negative answer from a wild card domain name, the + answer MUST include proof that the exact match of the QNAME and + QCLASS does not exist and that the QTYPE matches no RR set at the + wild card. If this answer can be optimized, an implementation + SHOULD reduce the number of records included in the response. + +6.2.3. Answering With an Authoritative Name Error + +When answering with a result code of a name error, the answer needs to +provide proof that neither the exact match for QNAME and QCLASS exists +nor that a wild card domain name exists as a subdomain of the closest +enclosing domain name. + +R6.5 When preparing a reply with an authoritative name error, the answer + MUST include proof that the exact match for the QNAME and QCLASS + does not exist and that no wild card is available to provide a match. + +6.2.4. The Remaining Case (Authoritative No Error, No Data at QNAME) + +When answering negatively because there is a match for QNAME and QCLASS +but no match for the QTYPE, only a proof for that is needed. Just as +the search does not proceed onto a search for the wild card in this +case, neither does the construction of the negative answer proof. + +R6.6 When preparing a reply in which there is an exact match of the + QNAME and QCLASS, but there is no RR set matching the QTYPE, + the reply SHOULD NOT contain any proof regarding the wild card + domain name. + +6.3 Interpreting Negative Answers Involving Wild Cards + +There are three requirements for resolvers when it comes to handling +negative answers generated as described in section 6.2. + +R6.7 A resolver MUST confirm that the negative data relates to the + query submitted. + +It is incumbent upon the resolver to interpret the answer correctly. + +R6.8 A resolver MUST confirm that an answer synthesized from a wild + card domain name is done so only in an authoritative absence of + a domain name with the query name and query class. + +In the case of a wild card synthesized answer, the resolver has to +see that the query name and class has no node, proving that a synthesized +answer would be appropriate (subject to validation of it). + +R6.9 A resolver MUST confirm that an authoritative name error is + valid if there is proof that both domain name matching the query + name and class and if there is proof that the closest encloser + does not have a wild card domain name as an immediate descendent. + +Before concluding that an authoritative name error is justified, a +resolver has to determine that neither an exact match for the query +name and class exists nor an appropriate wild card domain name. + +6.4 Authenticated Denial, Wild Card Domain Names, and Opt-In + +When considering the Opt-In proposal [WIP], it is wise to not combine +a zone that adheres to both opt-in and that has a wild card domain +name. The reason is rooted in that the synthesis of an answer is done +by substituting the QNAME for the wild card domain name in the answer. +Because this is unsecured, and the is ambiguity regarding whether a +negative proof can be provided for the exact match (when it is outside +the opt-in secured area), a definitive proof of authenticated denial +is not possible. + +For a more complete discussion of this topic, please refer to the document +describing the Opt-In proposal, referenced above. + +7 Analytical Proof That NXT Names the Closest Encloser + +How does one know, and (more importantly) *prove* using NXT records, what +the closest encloser of a given QNAME is? This section answers that +question with a rigorous proof, because security is the topic. + +7.1 Background to the Proof + +We'd like to have empty non-terminals provably exist in secure zones. +In other words, if someone has: + + a.b.c 3600 IN A 10.0.0.1 + +in their zone, but does not have any records with owner names "c" or +"b.c", we'd like to be able to say (with proof) that "nodes 'c' and +'b.c' exist and yet have no RRs." + +We want this because it is the behavior mandated by the nameserver +algorithm in section 4.3.2 of RFC 1034, and because it is regarded by +most as a better, more "natural" behavior than the alternative of +treating such empty non-terminals as being non-existent. + +There are two ways to achieve this. One way is to instantiate all +the implied empty non-terminals, and then add NXT and SIG(NXT) to them. +This works, but is a burden to the server in storage and computation +resources. It especially complicates updates, since any deletion of +the last record at a node necessitates a computation to determine +which empty non-terminals are no longer relevant and thus must also be +deleted. + +The second way is to infer the existence of the empty non-terminals +from the names of the nodes with real data (i.e. the names in the NXT +chain). + +Using this technique, the "deepest existing ancestor" a.k.a. the "most +enclosing name" of any query name Q can be easily found, and proved to +exist. This allows great efficiency in the wild card matching +algorithm as well, since only one wild card possibility exists and must +subsequently be either proven to exist or proven not to exist. This +is a big improvement on the "empty non-terminals do not exist" +approach, which has many more possible candidate wild card names which +must be proven not to exist. + +7.2 Definitions and Preliminaries + +When we say "subdomain" anywhere below, we mean "is contained within the +domain (in the sense that RFC 1034 describes), or is equal to the domain". +I.e., we're treating it like "subset" in mathematics. + +X is a "superdomain" of Y iff. Y is a subdomain of X. + +A name is an "owner name in zone Z" if it is an owner name, is a subdomain +of the origin of zone Z, and is not glue (or otherwise beneath a zone cut +of zone Z). + +A name N is "directly in zone Z" iff. there is some owner name in Z equal +to N. + +A name N is "inferred to be in zone Z", if it is not directly in zone Z, +but is a superdomain of some direct name of Z and is still a subdomain of +Z. I.e., it is an "empty non-terminal" required to make the path from the +zone origin to some name directly in Z. + +A name is "in zone Z" if it is directly in zone Z, or is inferred to be in +zone Z. + +Let "<" denote the DNSSEC name order relation. + +The "greatest common superdomain" of names A and B, denoted GCS(A,B), is +the greatest (according to the DNSSEC ordering) name X such that X is a +superdomain of both A and B. I.e. it is the "deepest common ancestor" of +A and B. GCS(A,B) always exists, because the root name is a superdomain +of all names. + +Let Q be a name which is a subdomain of the origin of zone Z. + +7.3 Bounds of Q in Z + +There is always a name directly in Z, call it "GLB(Q,Z)", which is the +greatest lower bound of Q. I.e. GLB(Q,Z) <= Q, and for all N in Z where +N <= Q, N <= GLB(Q,Z). + +There may or may not be a name directly in Z, call it "LUB(Q,Z)", which is +the least upper bound of Q. If there is no N directly in Z such that +N >= Q, then there is no LUB(Q,Z). If there is some N directly in Z where +N >= Q, then there is an LUB(Q,Z) >= Q such that if N >= Q, then +LUB(Q,Z) <= N. + +So, GLB(Q,Z) <= Q < LUB(Q,Z), if the least upper bound exists. + +GLB(Q,Z) will have a NXT record which: + + If GLB(Q,Z) = Q, proves that Q is directly in Z + + If GLB(Q,Z) != Q, proves that Q is not directly in Z + +The "next domain name" field of this NXT record is the LUB, unless it is +the zone origin (the DNSSEC "end of chain" marker) and Q != the origin of +Z, in which case there is no LUB. + +THEOREM 1: Let A, B, and Q be subdomains of Z. Let A <= B and B <= Q. Then + + GCS(Q, A) <= GCS(Q, B) + +Proof: + +Assume GCS(Q, A) > GCS(Q, B). Then A must have more labels in common with +Q than B, but since A and B are less than Q, that means that A > B by the +DNSSEC ordering, which is a contradiction since A <= B. + +THEOREM 2: Let A, B, and Q be subdomains of Z. Let A >= B and B >= Q. Then + + GCS(Q, A) <= GCS(Q, B) + +Proof: + +Assume GCS(Q, A) > GCS(Q, B). Then A must have more labels in common with +Q than B, but since A and B are greater than Q, that means that A < B by +the DNSSEC ordering, which is a contradiction since A >= B. + +7.4 Greatest Ancestor of Q in Z + +The "greatest ancestor of Q in Z", denoted GA(Q,Z), is the greatest N in Z, +directly or inferred, such that Q is a subdomain of N. GA(Q,Z) is also +called the "most enclosing name of Q in Z" or the "deepest ancestor of +Q in Z". + +GA(Q,Z) always exists. Since Q is a subdomain of the origin of Z, and the +origin of Z is "directly in zone Z", so there's always at least one N in Z +such that Q is a subdomain of N. + +THEOREM 3: Let Q be a subdomain of the origin of zone Z. If LUB(Q,Z) +exists, then: + + GA(Q,Z) = the greater of GCS(Q, GLB(Q,Z)) and GCS(Q, LUB(Q,Z)) + +otherwise + + GA(Q,Z) = GCS(Q, GLB(Q,Z)) + +Proof: + +We can eliminate the trivial case where Q is directly in Z, since in that +case GA(Q,Z) is obviously Q. + +For notational convenience, let + + L = GCS(Q, GLB(Q,Z)) + U = GCS(Q, LUB(Q,Z)) + +Assume L and U both exist. Assume there is an M in Z that is greater than +both L and U, and is a superdomain of Q. + +If M is directly in Z, then M > GLB(Q,Z). This is because if M were +<= GLB(Q,Z), then GCS(Q,M) would be <= L by Theorem 1. If M is directly +in Z, it cannot be >= Q since it is a superdomain of Q and M != Q. So, +we have GLB(Q,Z) < M < Q, which implies that GLB(Q,Z) is not the greatest +lower bound, which is a contradiction. + +If M is inferred to be in Z, then there is some N directly in Z and M is a +superdomain of N. Either N < Q or N > Q (since Q is not directly in Z). + +If N < Q, then N > GLB(Q,Z). If N were <= GLB(Q,Z), then the GCS(Q,N) +would be <= L by Theorem 1, but GCS(Q,N) = M, and M > L. We thus have a +contradiction, since this implies that GLB(Q,Z) is not the greatest lower +bound. + +If N > Q, then N < LUB(Q,Z). If N were >= LUB(Q,Z), then the GCS(Q,N) +would be <= U by Theorem 2, but GCS(Q,N) = M, and M > U. We thus have a +contradiction, since this implies that LUB(Q,Z) is not the least upper bound. + +Now we deal with the case where U doesn't exist. Again, assume M in Z that +is greater than L, and is a superdomain of Q. + +The cases where M is directly in Z, or where M is inferred and N < Q are as +above. Now we deal with the case where N > Q. First we note that since < +is a well-ordering of the names in Z, if there are any upper bounds to Q in +Z, then there must be a least upper bound. Now, if N existed, it would be +an upper bound of Q in Z, and hence a least upper bound would have to exist, +but there is no least upper bound of Q in Z by assumption, so we again have +a contradiction. + +Q.E.D. + +7.5 Conclusion of the Proof + +We've shown how to find the "closest encloser" of any given QNAME by looking +at the QNAME along with the owner name and "next domain name" field of the +NXT record which proves the QNAME doesn't exist. The technique works even +when the closest encloser is an inferred name. + +Knowing the closest encloser lets us do very simple wild card checking in +secure zones, since the only possible matching wild card is + + *. + +We simply lookup that name, and if found, proceed accordingly. If not, we +add the NXT record which proves it doesn't exist to the authority section. + +8 Security Considerations + +This document is refining the specifications to make it more likely that +security can be added to DNS. No functional additions are being made, just +refining what is considered proper to allow the DNS, security of the DNS, and +extending the DNS to be more predictable. + +9 References + +Normative References + +[RFC 20] ASCII Format for Network Interchange, V.G. Cerf, Oct-16-1969 +[RFC 1034] Domain Names - Concepts and Facilities, P.V. Mockapetris, + Nov-01-1987 +[RFC 1035] Domain Names - Implementation and Specification, P.V + Mockapetris, Nov-01-1987 +[RFC 2119] Key Words for Use in RFCs to Indicate Requirement Levels, S + Bradner, March 1997 + +Non-normative References + +[RFC 2136] Dynamic Updates in the Domain Name System (DNS UPDATE), P. Vixie, + Ed., S. Thomson, Y. Rekhter, J. Bound, April 1997 +[RFC 2535] Domain Name System Security Extensions, D. Eastlake, March 1999 +[WIP] DNSSEC Opt-In, Internet Draft, R. Arends, M. Kosters, D. Blacka, 2002 + +10 Others Contributing to This Document + +Others who have directly caused text to appear in the document: Paul Vixie +and Olaf Kolkman. Many others have indirect influences on the content. + +11 Editors + +Name: Bob Halley +Affiliation: Nominum, Inc. +Address: 2385 Bay Road, Redwood City, CA 94063 USA +Phone: +1-650-381-6016 +EMail: Bob.Halley@nominum.com + +Name: Edward Lewis +Affiliation: ARIN +Address: 3635 Concorde Pkwy, Suite 200, Chantilly, VA 20151 USA +Phone: +1-703-227-9854 +Email: edlewis@arin.net + +Appendix A: Subdomains of Wild Card Domain Names + +In reading the definition of section 2 carefully, it is possible to +rationalize unusual names as legal. In the example given, *.example. +could have subdomains of *.sub.*.example. and even the more direct +*.*.example. (The implication here is that these domain names own +explicit resource records sets.) Although defining these names is not +easy to justify, it is important that implementions account for the +possibility. This section will give some further guidence on handling +these names. + +The first thing to realize is that by all definitions, subdomains of +wild card domain names are legal. In analyzing them, one realizes +that they cause no harm by their existence. Because of this, they are +allowed to exist, i.e., there are no special case rules made to disallow +them. The reason for not preventing these names is that the prevention +would just introduce more code paths to put into implementations. + +The concept of "closest enclosing" existing names is important to keep in +mind. It is also important to realize that a wild card domain name can +be a closest encloser of a query name. For example, if *.*.example. is +defined in a zone, and the query name is a.*.example., then the closest +enclosing domain name is *.example. Keep in mind that the closest +encloser is not eligible to be a source of synthesized answers, just the +subdomain of it that has the first label "*". + +To illustrate this, the following chart shows some matches. Assume that +the names *.example., *.*.example., and *.sub.*.example. are defined +in the zone. + + QNAME Closest Encloser Wild Card Source + a.example. example. *.example. + b.a.example. example. *.example. + a.*.example. *.example. *.*.example. + b.a.*.example. *.example. *.*.example. + b.a.*.*.example. *.*.example. no wild card + a.sub.*.example. sub.*.example. *.sub.*.example. + b.a.sub.*.example. sub.*.example. *.sub.*.example. + a.*.sub.*.example. *.sub.*.example. no wild card + *.a.example. example. *.example. + a.sub.b.example. example. *.example. + +Recall that the closest encloser itself cannot be the wild card. Therefore +the match for b.a.*.*.example. has no applicable wild card. + +Finally, if a query name is sub.*.example., any answer available will come +from an exact name match for sub.*.example. No wild card synthesis is +performed in this case. + +Full Copyright Statement + + Copyright (C) The Internet Society 2003. All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published and + distributed, in whole or in part, without restriction of any kind, + provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of developing + Internet standards in which case the procedures for copyrights defined + in the Internet Standards process must be followed, or as required to + translate it into languages other than English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN + WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. + +-- diff --git a/doc/draft/draft-jseng-idn-admin-01.txt b/doc/draft/draft-jseng-idn-admin-01.txt deleted file mode 100644 index c0998e4b64..0000000000 --- a/doc/draft/draft-jseng-idn-admin-01.txt +++ /dev/null @@ -1,1175 +0,0 @@ -INTERNET DRAFT Editors: James SENG -draft-jseng-idn-admin-01.txt John KLENSIN -18th Oct 2002 Authors: K. KONISHI -Expires 18th April 2003 K. HUANG, H. QIAN, Y. KO - - Internationalized Domain Names Registration and Administration - Guideline for Chinese, Japanese and Korean - -Status of this Memo - - This document is an Internet-Draft and is in full conformance - with all provisions of Section 10 of RFC2026 except that the - right to produce derivative works is not granted. - - Internet-Drafts are working documents of the Internet - Engineering Task Force (IETF), its areas, and its working - groups. Note that other groups may also distribute working - documents as Internet-Drafts. - - Internet-Drafts are draft documents valid for a maximum of - six months and may be updated, replaced, or obsoleted by other - documents at any time. It is inappropriate to use Internet- - Drafts as reference material or to cite them other than as - "work in progress." - - The list of current Internet-Drafts can be accessed at - http://www.ietf.org/ietf/1id-abstracts.txt - - The list of Internet-Draft Shadow Directories can be accessed at - http://www.ietf.org/shadow.html. - -Abstract - -Achieving internationalized access to domain names raises many complex -issues. These include not only associated with basic protocol design -(i.e., how the names are represented on the network, compared, and -converted to appropriate forms) but also issues and options for -deployment, transition, registration and administration. - -The IETF IDN working group focused on the development of a standards -track specification for access to domain names in a broader range of -scripts than the original ASCII. It became clear during its efforts -that there was great potential for confusion, and difficulties in -deployment and transition, due to characters with similar appearances -or interpretations and that those issues could best be addressed -administratively, rather than through restrictions embedded in the -protocols. - -This document provides guidelines for zone administrators (including -but not limited to registry operators and registrars), and information -for all domain names holders, on the administration of those domain -names which contain characters drawn from Chinese, Japanese and Korean -scripts (CJK). Other language groups are encouraged to develop their -own guidelines as needed, based on these guideline if that is helpful. - -Comments on this document can be sent to the authors at -idn-admin@jdna.jp. - -Table of Contents - -0. Pre-Note for ASCII-version of this document 2 - -1. Introduction 3 - -2. Definitions 5 - -3. Administrative Framework 6 -3.1. Principles underlying these Guidelines 7 -3.2. Registration of IDL 8 -3.2.1. Language character variant table 9 -3.2.2 Formal syntax 10 -3.2.3. Registration Algorithm 10 -3.3. Deletion and Transfer of IDL and IDL Package 12 -3.4. Activation and De-activation of IDN variants 13 -3.5. Adding/Deleting language(s) association 13 -3.6. Versioning of the language character variant tables 13 - -4. Example of Guideline Adoption 14 - -i. Notes 17 - -ii. Acknowledgements 17 - -iii. Authors 18 - -iv. Appendex A 18 - -v. Normative References 19 - -vi. Non-normative References 19 - -vii. Other Issues 19 - - - -0. Pre-Note for ASCII-version of this document - -In order to make meanings clear, especially in examples, Han ideographs -are used in several places in this document. Of course, these -ideographs do not appear in its ASCII form of this document. So, for -the convenience of readers of the ASCII format and some readers not -familiar with recognizing and distinguishing Chinese characters, each -use of a particular character will be associated with both its Unicode -code point and an "asterisk tag" with its corresponding Chinese -Romanization [ISO7098] with the tone mark represented by a number 1 to -4. Those tags have no meaning outside this document; they are intended -simply to provide a quick visual and reading reference to facilitate -the combinations and transformations of characters in the guideline and -table excerpts. Appendix A would provide the Romanization of the -ideographs in Japanese (ISO 3602) and Korean (ISO 11941). - -1. Introduction - -Defining and specifying protocols for Internationalized Domain Names -has been one of the most controversial tasks initiated by the IETF in -recent years. Domain names are the fundamental naming architecture of -the Internet; many Internet protocols and applications rely on the -stability, continuity, and absence of ambiguity of the DNS. - -The introduction of internationalized domain names (IDN) amplifies the -difficulty of putting names into identifiers and the confusion between -scripts and languages. It impacts many internet protocols and -applications and creates more complexity in technical administration -and services. - -While the IETF IDN working group [IDN-WG] focused on the technical -problems of IDN, administrative guidelines are also important in order -to reduce unnecessary user confusion and domain name disputes among -domain name holders. - -The IDN working group has completed working group last call for the -following internet-drafts: - -1. Preparation of Internationalized Strings [STRINGPREP] -2. Internationalizing Host Names In Applications [IDNA] -3. Punycode version 0.3.3 [PUNYCODE] -4. A Stringprep Profile for Internationalized Domain Names [NAMEPREP] - -These drafts specify that the intersystem protocols that make up the -domain name system infrastructure remain unchanged. Instead, they -introduce internationalization (I18N) [Note1] in client software -(particularly via the IDNA protocol) using an ASCII Compatible Encoding -(ACE) known as Punycode. - -The domain name protocols [STD13] also specify that characters are to -be interpreted so that upper and lower case Latin-based characters are -considered equivalent. But with the introduction of Unicode characters -beyond US-ASCII, and the possibility to represent a single character in -multiple ways in ISO10646/Unicode [UNICODE], a normalization process, -known as Nameprep, has been proposed to handle the more complex -problems of character-matching for those additional characters. -Nameprep is also executed by client software as described in IDNA. - -While Nameprep normalizes domain names so that the users have an -improved chance of getting the right domain name from information -provided in other forms, as required for I18N, Nameprep does not handle -any localization (L10N). - -This becomes significant when a domain name holder attempts to use a -Unicode string forming a "name", "word", or "phrase" that may have -certain meaning in a certain language or when used as a domain name. -Such Unicode string may have different variants in the context of the -language or culture. - -Generally, these localized variants in CJK can be classified into four -categories, as described by Halpern et al. [C2C]: [Note2] - -a. Character (or Code) variants - -Character (or Code) variants refer to variants that are generated by -character-by-character (or code-by-code) substitution. - -An example in English would be "A" or "a" (U+0041 or U+0061). -Two examples in Chinese would be U+98DB *fei1* or U+98DE *fei1* -and U+6A5F *ji1* or U+673A *ji1*. - -Note that this does not mean the choice between U+6A5F and U+673A is -always symmetric like the one between "A" and "a" -- it is a choice only -for Chinese but not for Japanese. - -The variants for particular characters may be just to drop them. For -example, points and vowels characters in Hebrew (U+05B0 to U+05C4) and -Arabic (U+064B to U+0652) are optional; the variants for strings -containing them are constructed by simply dropping those points and -vowels. - -Code variants may also occur when different code points are assigned to -what visually or abstractly are the "same" character, possibility due -to compatibility issues, type face differences or script range. For -example, LATIN CAPITAL LETTER A (U+0041) normally has an appearance -identical to GREEK CAPTIAL LETTER A (U+0391). CJK scripts have font -variants for compatibility (either U+4E0D or U+F967 may be used) and -"zVariant" (e.g. U+5154 and U+514E). - -The difficulty lies in defining which characters are the "same" and -which are not. - -b. Orthographic variants - -Orthographic variants refer to variants that are generated by word-by- -word substitution. - -An example in English would be "color" and "colour". - -It is possible for some of these orthographic variants to be generated -by character variants. For example "airplane" in Chinese may be either -U+98DB U+6A5F *fei1 ji1* or U+98DE U+673A *fei1 ji1*. - -Other orthographic variants may not be generated by character variants. -For example, in Chinese, both U+767C *fa1* and U+9AEE *fa4* -are related to U+53D1 *fa1 or fa4* depending on the word. For hair, -U+5934 U+53D1 *tou2 fa4*, the variant should be U+982D U+9AEE -*tou2 fa4* but not U+982D U+767C *tou2 fa1*. - -c. Lexemic variants - -Lexemic variants refer to variants that can be generated when language -is considered, by word-by-word substitution. - -An example in English would be cab, taxi, or taxicab. - -An example in Chinese would be U+8CC7 U+8A0A *zi1 xun4* or -U+4FE1 U+606F *xin4 xi1*. - -Note that there is no relationship between U+8CC7 and U+4FE1 or U+8A0A -and U+606F, i.e., the sequence U+8CC7 U+606F *zi1 xi1* does not -exist in Chinese. - -d. Contextual variants - -Contextual variants refer to variants that are generated by word-by- -word substitutions with context considered. - -In English, the word "plane" has different meanings and could be -replaced by with different equivalent words (synonyms) such as -"airplane" or "plane" (as in a flat-surface or device for smoothing -wood) depending on context. And, of course, "plain", which is -pronounced the same way, and indistinguishable in speech-to-text -contexts such as computer input systems for the visually impaired, is a -different word entirely. - -Similarly, the word U+6587 U+4EF6 *wen2 jian4* could be either -document U+6587 U+4EF6 *wen2 jian4* or data file U+6A94 U+6848 -*dang3 an4* depending on context. - -Although domain names were designed to be identifiers without any -language context, users have not been prevented from using strings in -domain names and interpreting them as "words" or "names". It is likely -that users will do this with IDN as well. Therefore, given the added -complications of using a much broader range of characters, precautions -will be required when deploying IDN to minimize confusion and fraud. - -The intention of these guidelines is to provide advice about the -deployment of IDNs, with language consideration, but focusing only on -the category of character variants to increase the possibility of -successful resolution and reduced confusion while accepting inherent -DNS limitations. - -2. Definitions - -Unless otherwise stated, the definitions of the terms used in this -document are consistent with "Terminology Used in Internationalization -in the IETF" [I18NTERMS]. - -"FQDN" refers to a fully-qualified domain name and "domain name label" -refers to a label of a FQDN. - -RFC3066 [RFC3066] defines a system for coding and representing -languages. - -ISO/IEC 10646 is a universal multiple-octet coded character set that is -a product of ISO/IEC JTC1/SC2/WG2, Work Item JTC1.02.18 (ISO/IEC 10646). -It is a multi-part standard: Part 1, published as ISO/IEC 10646- -1:2000(E) covering the Architecture and Basic Multilingual Plane; Part -2, published as ISO/IEC 10646-2:2001(E) covers the supplementary -(additional) planes. - -The Unicode Consortium publishes "The Unicode Standard -- Version 3.0", -ISBN 0-201-61633-5. In March 2002, Unicode Consortium published Unicode -Standard Annex #28. That annex defines Version 3.2 of The Unicode -Standard, which is fully synchronized with ISO/IEC 10646-1:2000 (with -Amendment 1). - -The term "Unicode character" is used here to refer to characters chosen -from The Unicode Standard Version 3.2 (and hence from ISO/IEC 10646). -In this document, the characters are identified by their positions (or -"code points"). The notation U+12AB, for example, indicates the -character at the position 12AB (hexadecimal) in the Unicode 3.2 table. - -Similarly, "Unicode string" refers to a string of Unicode characters. -The Unicode string is identify by the sequence of the Unicode -characters regardless of the encoding scheme. - -The term "IDN" is often used to refer to many different things: (a) an -abbreviation for "Internationalized Domain Name" (b) a fully-qualified -domain name that contains at least one label that contains characters -not appearing in ASCII (c) a label of a domain name that contains at -least one character beyond ASCII (d) a Unicode string to be processed -by Nameprep (e) an IDN Package (in this document context) (f) a -Nameprep processed string (g) a Nameprep and Punycode processed string -(h) the IETF IDN Working Group (g) ICANN IDN Committee (h) other IDN -activities in other companies/organizations etc. - -Because of the potential confusion, this document shall use the term -"IDN" as an abbreviation for "Internationalized Domain Name" only. - -And also, this document provides a guideline to be applied on a per -zone basis, one label at a time, the term "Internationalized Domain -Name Label" or "IDL" will be used instead. - -In this document, the term "registration" refers to the process by -which a potential domain name holder requests that a label be placed in -the DNS, either as an individual name within a domain or as a sub- -domain delegation from another domain name holder. A successful -registration would then lead to the label or delegation records being -placed in the relevant zone file. The guidelines presented here are -recommended for all zones, at any hierarchy level, in which CJK -characters are to appear, not just domains at the first or second level. - -CJK characters are characters commonly used in Chinese, Japanese or -Korean language including but not limited to ASCII (U+0020 to U+007F, -Han Ideograph (U+3400 to U+9FAF and U+20000 to U+2A6DF), Bopomofo -(U+3100 to U+312F and U+31A0 to U+31BF), Kana (U+3040 to U+30FF), Jamo -(U+1100 to 11FF and U+3130 to U+318F), Hangul (U+AC00 to U+D7AF and -U+3130 to U+318F) and its respective compatibility forms. - -3. Administrative Framework - -Zone administrators are responsible for the administration of the -domain name labels under their control. A zone administrator might be -responsible for a large zone such as a Top Level Domain (TLD), generic -or country code, or a smaller one such as a typical second or third -level domain. A large zone would often be more complex then a smaller -one (sometimes it is just larger). However, normally, actual technical -administrative tasks -- such as addition, deletion, delegation and -transfer of zones between domain name holders -- are similar for all -zones. - -At the same time, different zones may have different policies and -processes. For example, a pay-per-domain policy and registry/registrar -model for .COM may not be applicable to such domains as .SG or .IBM.COM. -The latter, for example, has very restricted policies about who is -permitted to have a domain name label under IBM.COM, the types of -string that are permitted, and different procedures for obtaining those -string. - -This document only provides guidelines for how CJK characters should be -handled within a zone, how language issues should be considered and -incorporated, and how domain name labels containing CJK characters -should be administered (including registration, deletion and transfer -of labels). It does not provide any guidance for handling of non-CKJ -characters or languages in zones. - -Other IDN policies, as the creation of new TLDs, or the cost structure -for registrations, are outside the scope of this document. Such -discussions should be conducted in forums outside the IETF as well. - -Technical implementation issues are not discussed here either. For -example, the decision as to whether various of the guidelines should be -implemented as registry or registrar actions is left to zone -administrators, possibly differing from zone to zone. - -3.1. Principles underlying these Guidelines - -In many places, this document would assumes "First-Come-First-Serve" -(FCFS) as a conflict policy in the event of a dispute although FCFS is -not listed as one of the principles. If other policies dominate -priorities and "rights", one can use these guidelines by replacing uses -of FCFS in this document by appropriate other policy rules specific to -the zone. In other cases, some of these guidelines may not be -applicable although, some alternatives for determining rights to labels --- such as use of UDRP or mutual exclusion -- might have little impact -on other aspects of these guidelines. - -(a) Each IDL to be registered should be associated with one or more -languages. - -Although some Unicode strings may be pure identifiers made up of an -assortment of characters from many languages and scripts, IDLs are -likely to be names or phrases that have certain meaning in some -language. While a zone administration might or might not require -"meaning" as a registration criterion, the possibility of meaning -provides a useful tool when trying to avoid user confusion. - -Zone administrators should administratively associate one or more -language with each IDL. These associations should either be pre- -determined by the zone administrator and applied to the entire zone or -chosen by the registrants on a per-IDL basis. The latter may be -necessary for some zones, but will make administration more difficult -and will increase the likelihood of conflicts in variant forms. - -A given zone might have multiple languages associated with it, or have -no language specified at all, but doing so may provide additional -opportunities for user confusion, and is therefore not recommended. - -The zone administrator must also verify the validity of the IDL -requested by using information associated with the chosen language and -possibly other rules as appropriate. - -(b) When an IDL is registered, all of the character variants for the -associated language(s) should be reserved for the registrant. Each -language associated with the IDL will lead to different character -variants. - -IDL reservations of the type described here normally do not appear in -the distributed DNS zone file. In other words, these reserved IDLs do -not resolve. Domain name holders could request these reserved IDLs to -be placed in the zone file and made active and resolvable as, e.g., -aliases or synonyms. - -Since different languages may imply different sets of variants, the -IDLs reserved for one IDL may overlap those reserved for another. In -this case, the reserved IDLs should be bound to one registration or the -other, or excluded from both, according to the applicable registration -or dispute resolution policy for the zone. - -(c) For a given base language, the IDL may have one or more recommended -variants that should be suggested to the domain name holder for active -registration as synonyms. - -Some language rules may prefer certain variants over others. To -increase the likelihood of correct and predictable resolution of the -IDL by end-users, the recommended variants should be active. - -(d) The IDL and its reserved variants with the language(s) association -must be atomic. - -The IDL and its reserved variants for the associated language(s) are to -be considered as a single unit -- an "IDL Package". For a given IDL, -that IDL package is defined by these guidelines and created upon -registration. - -The IDL Package is atomic: Transfer and deletion of IDL are performed -on the IDL Package as a whole. IDL, either active or reserved, within -the IDL Package must not be transferred or deleted individually. I.e., -any re-registration, transfers, or other actions that impact the IDL -should also impact the reserved variants. Separate registration or -other actions for the variants are not possible if these guidelines are -to accomplish their purpose. - -Conflict policy of the zone may result in violation of the IDL Package -atomicity. In such case, the conflict policy would take precedence. - -3.2. Registration of IDL - -Conforming to the principles described in 3.1, the registration of an -IDL would require at least two components, i.e., the character variant -tables for the language and the registration algorithm. - -3.2.1. Language character variant table - -Any lines starting with, or portions of lines after, the hash -symbol("#") are treated as comments. Comments have no significance in -the processing of the tables, nor are there any syntax requirements -between the hash symbol and the end of the line. Blank lines in the -tables are ignored completely. - -Every language should have a character variant table provided by a -relevant group (or organization or other body) and based on established -standards. The group that defines a particular character variant table -should document references to the appropriate standards in beginning of -table, tagged with the word "Reference" followed by an integer (the -reference number) followed by the description of the reference. For -example, - -Reference 1 CP936 (commonly known as GBK) -Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt -Reference 3 List of Simplified character Table (Simplified column) -Reference 4 zSimpVariant in Unihan.txt -Reference 5 variant that exists in GB2312, common simplified hanzi - -Each language character variant table must have a version number. This -is tagged with the word "Version" followed by an integer then followed -by the date in the format YYYYMMDD, where YYYY is the 4 digit Year, MM -is the 2 digit Month and DD is the 2 digit Day of the publication date -of the table - -Version 1 20020701 # July 2002 Version 1 - -The table has three fields, separated by semicolons. The fields are: -"valid code point"; "recommended variant(s)"; and "character -variant(s)". - -Only code points listed in the "valid code point" field are allowed to -be registered as part of a IDL associated with that language. - -There can be one or more "recommended variant(s)" (i.e., entries in the -"recommended variant(s)" column). If the "recommended variant(s)" -column is empty, then there is no corresponding variant. - -The "character variant(s)" column contains all variants of the code -point, including but not limited to the code point itself and the -"recommended variant(s)". - -If the variant is composed of a sequence of code points, then sequence -of code points is listed separated by a space in the "recommended -variant(s)" or "character variant(s)". - -If there are multiple variants, each variant must be separated by a -comma in the "recommended variant(s)" or "character variant(s)". - -Any code point listed in the "recommended variant(s)" column must be -allowed, by the rules for the relevant language, to be registered. -However, this is not a requirement for the entries in the "character -variant(s)" column; it is possible that some of those entries may not -be allowed to be registered. - -Every code point in the table should have a corresponding reference -number (associated with the references) specified to justify the entry. -The reference number is placed in parentheses after the code point. If -there is more than one reference, then the numbers are placed within a -single set of parentheses and separated by commas. - -3.2.2. Formal syntax - -This section uses the IETF "ABNF" metalanguage [ABNF] - -LanguageCharacterVariantTable = 1*ReferenceLine VersionLine 1*EntryLine -ReferenceLine = "Reference" SP RefNo SP RefDesciption [ Comment ] CRLF -RefNo = 1*DIGIT -RefDesciption = *[VCHAR] -VersionLine = "Version" SP VersionNo SP VersionDate [ Comment ] CRLF -VersionNo = 1*DIGIT -VersionDate = YYYYMMDD -EntryLine = VariantEntry/Comment CRLF -VariantEntry = ValidCodePoint [ "(" RefList ") ] ;" RecommendedVariant -";" CharacterVariant [ Comment ] -ValidCodePoint = CodePoint -RefList = RefNo 0*( "," RefNo ) -RecommendedVariant = CodePointSet 0*( "," CodePointSet ) -CharacterVariant = CodePointSet 0*( "," CodePointSet ) -CodePointSet = CodePoint 0* ( SP CodePoint ) -CodePoint = 4DIGIT [DIGIT] [DIGIT] -Comment = "#" *VCHAR - -YYYYMMDD is an integer representing a date where YYYY is the 4 digit -year, MM is the 2 digit month and DD is the 2 digit day. - -3.2.3. Registration Algorithm - -(An explanation of these steps follows them) - -1. IN <= IDL to be registered and - {L} <= Set of languages associated with IN -2. {V} <= Set of version numbers of the language character - variant tables derived from {L} -3. NP(IN) <= Nameprep processed IN and - check availability of NP(IN). - If not available, route to conflict policy. -4. For each AL in {L} -4.1. Check validity of NP(IN) in AL. If failed, stop processing. -4.2. PV(IN,AL) <= Set of available Nameprep processed recommended - variants of NP(IN) in AL -4.3. RV(IN,AL) <= Set of available Nameprep processed character - variants of NP(IN) in AL -4.4. End of Loop -5. {PV} <= Set of all PV(IN,AL) with optional processing. -6. {ZV} <= {PV} set-union NP(IN) -7. {RV} <= Set of all RV(IN,AL) set-minus {ZV} -8. Create IDL Package for IN using IN, {L}, {V}, {ZV} and {RV} -9. Put {ZV} into zone file - -Explanation - -Step 1 takes the IDL to be registered and the associated language(s) as -input to the process. - -Step 2 extract the set of version numbers of the associated language(s) -tables. - -Step 3 Nameprep processed the IDL. If the Nameprep processed IDL is -already registered or reserved, then the conflict policy is applied -here. For example, if FCFS is used, the registration process would stop -here. - -Step 4 goes through all languages associated with the proposed IDL, -checks for validity in each language, and generates the recommended -variants and the reserved variants. - -In step 4.1, IDL validation is done by checking that every code point -in the Nameprep processed IDL is a code point allowed by the "valid -code point" column of the character variant table for the language. If -one or more code points are invalid, the registration process must stop -here. - -Step 4.2 generates the list of recommended variants of the IDL by doing -a combination of all possible variants listed in "recommend variant(s)" -column for each code point in the Nameprep processed IDL. Generated -variants must be processed with Nameprep. If any of the recommended -variants of the IDL is registered or reserved, then the conflict policy -will be applied although this does not prevent the IDL from being -registered. For example, if FCFS is used, then the conflicting -variant(s) will be removed from the list. - -Step 4.3 generates the list of reserved variants by doing a combination -of all the possible variants listed in "character variant(s)" column -for each code point in the Nameprep processed IDL. Generated variants -must be Nameprep processed. If any of the variants are registered or -reserved, then the conflict policy will apply here although this does -not prevent the IDL from being registered. For example, if FCFS is -used, then the conflict variants will be removed from the list. - -The "combination" in Step 4.2 and Step 4.3 could achieve by a recursive -function similar to the following pseudo code: - -Function Combination(Str) - F <= first codepoint of Str - SStr <= Substring of Str, without the first code point - NSC <= {} - - If SStr is empty Then - For each V in (Variants of code point F) - NSC = NSC set-union (the string with the code point V) - End of Loop - Else - SubCom = Combination(SStr) - For each V in (Variants of code point F) - For each SC in SubCom - NSC = NSC set-union (the string with the - first code point V followed by the string SC) - End of Loop - End of Loop - Endif - - Return NSC - - -Step 5 generates the list of all recommended variants for all language. -Optionally, the algorithm may reduce the list of recommended variants -by prompting the user to select the recommended variants. - -Step 6 generates the list of variants including the Nameprep processed -IDL which to be activated and Step 7 generates the list of reserved -variants. - -Then an "IDL Package" for IDL is created in Step 8 with the original -IDL, the associated language(s), all the list of activated IDLs and the -list of variants. The version numbers of the language character -variants tables are also stored in the IDL Package. - -Lastly, the activated IDLs are converted using ToASCII [IDNA] with -UseSTD13ASCIIRules on and then put into the zone file. If the IDL is a -subdomain name, it will be delegated. The activated IDLs may be -delegated to a different domain name server so long it is owned by the -same domain name holder. - -3.3. Deletion and Transfer of IDL and IDL Package - -In normal domain administration, every domain name label is independent -of all other domain name labels. Registration, deletion and transfer -of domain name labels is done on a per domain name label basis. -Depending on the zone's administrative policies, aliases (e.g., "CNAME" -entries) may be bound to particular labels with rules about whether one -can be changed without the other. Current policies in gTLDs generally -prohibit registration of such aliases, in part to avoid needing to form -and enforce policies about these change (or binding) rules. - -However, with internationalization, each IDL is bound to a list of -variant IDLs (with the list depending on the associated language), -bound together in an IDL Package. - -Because all variants of the IDL should belong to a single domain name -holder, the IDL Package should be treated as a single entity. -Individual IDL, either active or reserved, within the IDL Package must -not be deleted or transferred independently of the other IDLs. -Specifically, if an IDL is to be deleted or transferred, that action -must be taken only as part of an action that affects the entire IDL -Package. - -If the local conflict policy requires IDL to be transferred and deleted -independently of the IDL Package, the conflict policy would take -precedence. In such event, the conflict policy should be associated -with a transfer or delete procedure taking IDL Package into -consideration. - -When an IDL Package is deleted, all the active and reserved variants -would be available again. IDL Package deletion does not change any -other IDL Packages, including IDL Packages that have variants that -conflict with the variants in the deleted IDL Package. This is to be -consistent with the atomicity and predictability of the IDL Package. - -3.4. Activation and De-activation of IDL variants - -As there are active IDLs and inactive IDLs within an IDL Package, -processes are required to activate or de-activate IDL variants in an -IDL Package. - -The activation algorithm is described below: - -1. IN <= IDL to be activated & PA <= IDL Package -2. NP(IN) <= Nameprep processed IN -3. If NP(IN) not in {RV} then stop -4. {RV} <= {RV} set-minus NP(IN) and {ZV} <= {ZV} set-union NP(IN) -5. Put {ZV} into the zone file - -Similarly, the deactivation algorithm: -1. IN <= IDL to be deactivated & PA <= IDL Package -2. NP(IN) <= Nameprep processed IN -3. If NP(IN) not in {ZV} then stop -4. {RV} <= {RV} set-union NP(IN) and {ZV} <= {ZV} set-minus NP(IN) -5. Put {ZV} into the zone file - -3.5. Adding/Deleting language(s) association - -The list of variants is generated from the IDL and tables for the -associated languages. If the language associations are changed, then -the lists of variants have to be updated. On the other hand, the IDL -Package is atomic and the list of variants must not be changed after -creation. - -Therefore, this document recommends deleting the IDL Package followed -by a registration with the new set of languages rather than attempting -to add or delete language(s) association within the IDL Package. Zone -administrators may find it desirable to devise procedures to prevent -other parties from capturing the labels in the IDL Package during these -operations. - -3.6. Versioning of the language character variant tables - -Language character variants tables are subjected to changes over time -and the changes may or may not be backward compatible. It is possible -that different version of the language character variants tables may -produce a different set of recommended variants and reserved variants. - -New IDL Packages should use the latest version of the language -character variants tables. - -Existing IDL Packages created using previous version of language -character variants tables are not affected when there a new version of -the character variants table is released. - -4. Example of Guideline Adoption - -To provide a meaningful example, some language character variant tables -have to be defined. Assume, then, that the following four language -character variants tables are defined (note that these tables are not a -representation of the actual table and they do not contain sufficient -entries to be used in any actual implementation): - -a) language character variants tables for zh-cn and zh-sg - -Reference 1 CP936 (commonly known as GBK) -Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt -Reference 3 List of Simplified character Table (Simplified column) -Reference 4 zSimpVariant in Unihan.txt -Reference 5 variant that exists in GB2312, common simplified hanzi - -Version 1 20020701 # July 2002 - -56E2(1);56E2(5);5718(2) # sphere, ball, circle; mass, lump -5718(1);56E2(4);56E2(2),56E3(2) # sphere, ball, circle; mass, lump -60F3(1);60F3(5); # think, speculate, plan, consider -654E(1);6559(5);6559(2) # teach -6559(1);6559(5);654E(2) # teach, class -6DF8(1);6E05(5);6E05(2) # clear -6E05(1);6E05(5);6DF8(2) # clear, pure, clean; peaceful -771E(1);771F(5);771F(2) # real, actual, true, genuine -771F(1);771F(5);771E(2) # real, actual, true, genuine -8054(1);8054(3);806F(2) # connect, join; associate, ally -806F(1);8054(3);8054(2),8068(2) # connect, join; associate, ally -96C6(1);96C6(5); # assemble, collect together - - -b) language variants table for zh-tw - -Reference 1 CP950 (commonly known as BIG5) -Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt -Reference 3 List of Simplified Character Table (Traditional column) -Reference 4 zTradVariant in Unihan.txt - -Version 1 20020701 # July 2002 - -5718(1);5718(4);56E2(2),56E3(2) # sphere, ball, circle; mass, lump -60F3(1);60F3(1); # think, speculate, plan, consider -6559(1);6559(1);654E(2) # teach, class -6E05(1);6E05(1);6DF8(2) # clear, pure, clean; peaceful -771F(1);771F(1);771E(2) # real, actual, true, genuine -806F(1);806F(3);8054(2),8068(2) # connect, join; associate, ally -96C6(1);96C6(1); # assemble, collect together - -c) language variants table for ja - -Reference 1 CP932 (commonly known as Shift-JIS) -Reference 2 zVariant in Unihan.txt -Reference 3 variant that exists in JIS X0208, commonly used Kanji - -Version 1 20020701 # July 2002 - -5718(1);5718(3);56E3(2) # sphere, ball, circle; mass, lump -60F3(1);60F3(3); # think, speculate, plan, consider -654E(1);6559(3);6559(2) # teach -6559(1);6559(3);654E(2) # teach, class -6DF8(1);6E05(3);6E05(2) # clear -6E05(1);6E05(3);6DF8(2) # clear, pure, clean; peaceful -771E(1);771E(1);771F(2) # real, actual, true, genuine -771F(1);771F(1);771E(2) # real, actual, true, genuine -806F(1);806F(1);8068(2) # connect, join; associate, ally -96C6(1);96C6(3); # assemble, collect together - -d) language variants table for ko - -Reference 1 CP949 (commonly known as EUC-KR) -Reference 2 zVariant in Unihan.txt - -Version 1 20020701 # July 2002 - -5718(1);56E2(1);56E3(2) # sphere, ball, circle; mass, lump -60F3(1);60F3(1); # think, speculate, plan, consider -654E(1);6559(1);6559(2) # teach -6DF8(1);6E05(1);6E05(2) # clear -771E(1);771F(1);771F(2) # real, actual, true, genuine -806F(1);8054(1);8068(2) # connect, join; associate, ally -96C6(1);96C6(1); # assemble, collect together - -Example 1: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* - {L} = {zh-cn, zh-sg, zh-tw} - -NP(IN) = (U+6E05 U+771F U+6559) -PV(IN,zh-cn) = (U+6E05 U+771F U+6559) -PV(IN,zh-sg) = (U+6E05 U+771F U+6559) -PV(IN,zh-tw) = (U+6E05 U+771F U+6559) -{ZV} = {(U+6E05 U+771F U+6559)} -{RV} = {(U+6E05 U+771E U+6559), - (U+6E05 U+771E U+654E), - (U+6E05 U+771F U+654E), - (U+6DF8 U+771E U+6559), - (U+6DF8 U+771E U+654E), - (U+6DF8 U+771F U+6559), - (U+6DF8 U+771F U+654E)} - -Example 2: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* - {L} = {ja} - -NP(IN) = (U+6E05 U+771F U+6559) -PV(IN,ja) = (U+6E05 U+771F U+6559) -{ZV} = {(U+6E05 U+771F U+6559)} -{RV} = {(U+6E05 U+771E U+6559), - (U+6E05 U+771E U+654E), - (U+6E05 U+771F U+654E), - (U+6DF8 U+771E U+6559), - (U+6DF8 U+771E U+654E), - (U+6DF8 U+771F U+6559), - (U+6DF8 U+771F U+654E)} - -Example 3: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* - {L} = {zh-cn, zh-sg, zh-tw, ja, ko} - -NP(IN) = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* -Invalid registration because U+6E05 is invalid in L = ko - -Example 4: IDL = (U+806F U+60F3 U+96C6 U+5718) - *lian2 xiang3 ji2 tuan2* - {L} = {zh-cn, zh-sg, zh-tw} - -NP(IN) = (U+806F U+60F3 U+96C6 U+5718) -PV(IN,zh-cn) = (U+8054 U+60F3 U+96C6 U+56E2) -PV(IN,zh-sg) = (U+8054 U+60F3 U+96C6 U+56E2) -PV(IN,zh-tw) = (U+806F U+60F3 U+96C6 U+5718) -{ZV} = {(U+8054 U+60F3 U+96C6 U+56E2), - (U+806F U+60F3 U+96C6 U+5718)} -{RV} = {(U+8054 U+60F3 U+96C6 U+56E3), - (U+8054 U+60F3 U+96C6 U+5718), - (U+806F U+60F3 U+96C6 U+56E2), - (U+806f U+60F3 U+96C6 U+56E3), - (U+8068 U+60F3 U+96C6 U+56E2), - (U+8068 U+60F3 U+96C6 U+56E3), - (U+8068 U+60F3 U+96C6 U+5718) - -Example 5: IDL = (U+8054 U+60F3 U+96C6 U+56E2) - *lian2 xiang3 ji2 tuan2* - {L} = {zh-cn, zh-sg} - -NP(IN) = (U+8054 U+60F3 U+96C6 U+56E2) -PV(IN,zh-cn) = (U+8054 U+60F3 U+96C6 U+56E2) -PV(IN,zh-sg) = (U+8054 U+60F3 U+96C6 U+56E2) -{ZV} = {(U+8054 U+60F3 U+96C6 U+56E2)} -{RV} = {(U+8054 U+60F3 U+96C6 U+56E3), - (U+8054 U+60F3 U+96C6 U+5718), - (U+806F U+60F3 U+96C6 U+56E2), - (U+806f U+60F3 U+96C6 U+56E3), - (U+806F U+60F3 U+96C6 U+5718), - (U+8068 U+60F3 U+96C6 U+56E2), - (U+8068 U+60F3 U+96C6 U+56E3), - (U+8068 U+60F3 U+96C6 U+5718)} - -Example 6: IDL = (U+8054 U+60F3 U+96C6 U+56E2) - *lian2 xiang3 ji2 tuan2* - {L} = {zh-cn, zh-sg, zh-tw} - -NP(IN) = (U+8054 U+60F3 U+96C6 U+56E2) -Invalid registration because U+8054 is invalid in L = zh-tw - -Example 7: IDL = (U+806F U+60F3 U+96C6 U+5718) - *lian2 xiang3 ji2 tuan2* - {L} = {ja,ko} - -NP(IN) = (U+806F U+60F3 U+96C6 U+5718) -PV(IN,ja) = (U+806F U+60F3 U+96C6 U+5718) -PV(IN,ko) = (U+806F U+60F3 U+96C6 U+5718) -{ZV} = {(U+806F U+60F3 U+96C6 U+5718)} -{RV} = {(U+806F U+60F3 U+96C6 U+56E3), - (U+8068 U+60F3 U+96C6 U+5718), - (U+8068 U+60F3 U+96C6 U+56E3)} - -i. Notes - -1. The terms "i18n" and "l10n", sometimes used in upper-case form (i.e., -"I18N" and "L10N"), have become popular in international standards -usage as abbreviations for "internationalization" and "localization", -respectively. The abbreviations were derived by using the first and -last letters of the words, with the number of characters that appear -between them. I.e., in "internationalization", there are 18 characters -between the initial "i" and the terminal "n". - -2. Every human language is unique and therefore, every linguistic and -localization issue is also unique. It is difficult or impossible to -make comparisons across multiple languages or to classify them into -categories. And any cross-language analogies are, by their very nature, -imperfect at best. - -For example, to classify Traditional Chinese/Simplified Chinese as -upper/lower case makes as much sense as to classify TC/SC as "spelling -variant" like "color" and "colour". Both comparisons are potentially -useful but neither is completely correct. - -3. The variants in CJK are very complex and require many different -layers of solution. This guideline is a one of the solution components, -but not sufficient, by itself, to solve the whole problem. - -ii. Acknowledgements - -The authors gratefully acknowledge the contributions of: - -V.CHEN, N.HSU, H.HOTTA, S.TASHIRO, Y.YONEYA and other Joint Engineering -Team members at the JET meeting in Bangkok. - -Yves Arrouye, an observer at the JET meeting, for his contribution on -the IDL Package. - -Soobok LEE -L.M TSENG -Patrik FALTSTROM -Paul HOFFMAN -Erin CHEN -LEE Xiaodong -Harald ALVESTRAND - -iii. Author(s) - -James SENG -PSB Certification -3 Science Park Drive -#03-12 PSB Annex -Singapore 118233 -Phone: +65 6885-1657 -Email: jseng@pobox.org.sg - -Kazunori KONISHI -JPNIC -Kokusai-Kougyou-Kanda Bldg 6F -2-3-4 Uchi-Kanda, Chiyoda-ku -Tokyo 101-0047 -JAPAN -Phone: +81 49-278-7313 -Email: konishi@jp.apan.net - -Kenny HUANG -TWNIC -3F, 16, Kang Hwa Street, Taipei -Taiwan -TEL : 886-2-2658-6510 -Email: huangk@alum.sinica.edu - -QIAN Hualin -CNNIC -No.6 Branch-box of No.349 Mailbox, Beijing 100080 -Peoples Republic of China -Email: Hlqian@cnnic.net.cn - -KO YangWoo -PeaceNet -Yangchun P.O. Box 81 Seoul 158-600 -Korea -Email: newcat@peacenet.or.kr - -John C KLENSIN -1770 Massachusetts Ave, No. 322 -Cambridge, MA 02140 -USA -Email: Klensin+ietf@jck.com - -iv. Appendix A - -[How to read the Han Ideograph provided in this document. -- Will -complete this section in next revision] - -v. Normative References - -[ABNF] Augmented BNF for Syntax Specifications: ABNF, RFC 2234, D. - Crocker and P. Overell, Eds., November 1997. - -[I18NTERMS] Terminology Used in Internationalization in the IETF, - draft-hoffman-i18n-terms-07.txt, September 2002, - Paul Hoffman, work in progress - -[RFC3066] Tags for the Identification of Languages, RFC3066, - Jan 2001, H. Alvestrand - -[IDNA] Internationalizing Domain Names in Applications, - draft-ietf-idn-idna, Feb 2002, Patrik Faltstrom, - Paul Hoffman, Adam M. Costella, work in progress - -[PUNYCODE] Punycode: An encoding of Unicode for use with IDNA, - draft-ietf-idn-punycode, Feb 2002, Adam M. Costello, - work in progress - -[STRINGPREP]Preparation of Internationalized Strings, - draft-hoffman-stringprep, Feb 2002, Paul Hoffman, - Marc Blanchet, work in progress - -[NAMEPREP] Nameprep: A Stringprep Profile for Internationalized - Domain Names, work in progress, draft-ietf-idn-nameprep, - Feb 2002, Paul Hoffman, Marc Blanchet, work in progress - -[UNIHAN] Unicode Han Database, Unicode Consortium - ftp://ftp.unicode.org/Public/UNIDATA/Unihan.txt - -[UNICODE] The Unicode Consortium, "The Unicode Standard -- Version - 3.0", ISBN 0-201-61633-5. Unicode Standard Annex #28, - (http://www.unicode.org/unicode/reports/tr28/) defines - Version 3.2 of The Unicode Standard. - -[ISO7098] ISO 7098;1991 Information and documentation -- Romanization - of Chinese, ISO/TC46/SC2. - -vi. Non-normative References - -[IDN-WG] IETF Internationalized Domain Names Working Group, - idn@ops.ietf.org, James Seng, Marc Blanchet. - http://www.i-d-n.net/ - -[STD13] Paul Mockapetris, "Domain names - concepts and facilities" - (RFC 1034) and "Domain names - implementation and - specification" (RFC 1035), STD 13, November 1987. - -[C2C] Pitfalls and Complexities of Chinese to Chinese Conversion, - http://www.cjk.org/cjk/c2c/c2c.pdf, Jack Halpern, Jouni - Kerman - -vii. Other Issues - -It is possible that many variants generated may have no meaning in the -associated language or languages. The intention is not to generate -meaningful "words" but to generate similar variants to be reserved. - -The language Character Variants tables are critical to the success of -the guideline. A badly designed table may either generate too many -meaningless variants or may not generate enough meaningful variants. -The principles to be used to generate the tables are not within the -scope of this document, nor are the tables themselves. - -This document recommends against registration of IDL in a particular -language until the language character variants table for that language -is available. - -Outstanding Issues - -(1) Erin suggested (if I (JcK) correctly understood her) that, if -multiple languages are associated with a given name, the recommended -variant list for a given code point be treated as the intersection of -the variant lists for each of the languages, not the union. As I -understand the current algorithm, it effectively takes the union. -Taking the intersection has the technical advantage that it would -significantly reduce the number of variant strings that must be -reserved. It also has the policy advantage of discouraging people -from registering with multiple languages if they don't need to - -otherwise, we will have everyone trying to register in all of the -possibly-relevant languages, which would make this effort a good deal -less effective than it might be. - -Taking the intersection is also consistent with a rule that appears to -exist now. As shown in Example 3, if an attempt is made to register a -name and associate it with multiple languages, it must be valid in all -of those languages or the registration attempt will fail. So we -intersect the validity criteria on a language basis, and should -probably intersect the variants. - -But that is an algorithm change, since we have to extract the variant -lists for each code point for each language, take the intersection, -and then process against that, rather than against each language in -turn. - -[JS - I disagree in taking the intersection of the set. No doubt by -doing intersection we will reduce the abuse of specifying multiple -language to increase the set of reserved variants, our goal is -precisely to reserve as much variants as possible for the domain name -holder, not vice versa. - -Suppose we have a string ABC with variants ABD ACD ABF in Chinese, ABE -ACD in Japanese and CBD ACD in Korean. - -Assuming a registrant register ABC in CJK, right now he will get the -reserved set of {ABC, ACD, ABF, ABE, CBD}. - -On the other hand, if we do intersection, this set will be reduced to -{ACD}, leaving other variants like ABF, ABE and CBD open for potential -conflict. And the only way he can protect this confusion is to -individually register ABF, ABE and CBD manually individually, -something we trying to prevent.] - -[Further explanation by Erin: - -I'm sorry maybe my previous suggestion is not clear enough. - -I mean if multiple languages are associated with a given nanme, the -range of valid code point sould be the intersection of all the -associated languages. - -But, if multiple languages are associated with a given nanme, the -recommended variants should be take the union and put into zone file. -The same, the character variant code also sould be take the union for -each of the languages.] - -(2) A note went by indicating that the plan was to drop the Han -characters from the IETF-submission version of this document. We can -post I-Ds in PDF and publish RFCs in PDF and/or Postscript, as long as -we provide ASCII. I find having the Han characters very useful, and -trust that those of you who can read them find them even more so. So -I would suggest that we hand off the pair of an ASCII document (with -the Han characters removed) and a PDF document (that looks like the -Word text we have been looking it) to the I-D editor. I've got full -Acrobat here and can presumably produce the thing if needed. - -(3) We still need to sort out the issue of whether reserving a -variant that may (in a current or future table) conflict with another -character, with the possibility of activating it is an invitation to -cybersquatting and other abuses. That isn't clear, let me try an -illustration: suppose we have a character X, with variants A, B, and C, -and a character Y, with variants D and C. Now, if Y is registered -first, then its package includes {Y*, D, C}, using the symbol "*" to -denote an active name. When X is registered, its package consists of -{X, A, B}. X's owner can't reserve or activate C, since it was -reserved to Y. But much of the reason for doing all of this work was -the concern that C can be confused with either Y or X. So doesn't -this create an opportunity for Y to threaten, or extort money from, X -by threatening to activate C? - -[JS -- The conflict of X & Y over C in this case could be resolved by -existing conflict policy. The revised guideline now makes it possible -to modify the IDL Package in the event of dispute] - -That problem gets worse, I think, if Erin's suggestion in (1) is not -adopted. And I continue to believe that the only solution that will -work is to prevent anyone from activating C. Or, more generally, at -any given time, there will be a set of language variant tables that -will be considered valid by the administrator of a particular zone. -The zone administrator would take the union of all of those tables, -using the 'valid code point' as the key as usual, and then permanently -reserve any character that appeared most than once in a variant column. -Small matter of programming. - -(4) In page 9, on the paragraph starting with "The character -variant(s) column contains ..." - -Page: 21 -This seems to be saying that the code points listed in the third -column will always be a proper superset of the union of the first and -second columns. If that is correct, it violates a fundamental -principle that I was taught about good programming and systems design --- minimization of duplication of information, since such duplicates -are error-prone. And, if I have not interpreted the intent correctly, -the text needs to be fixed. Somehow. - -[JS -- correct, it is duplicated. The duplication is bad from -system design view but it makes it 'complete' and easy to explain.] diff --git a/doc/draft/draft-jseng-idn-admin-03.txt b/doc/draft/draft-jseng-idn-admin-03.txt new file mode 100644 index 0000000000..24e66a2fdb --- /dev/null +++ b/doc/draft/draft-jseng-idn-admin-03.txt @@ -0,0 +1,1335 @@ +INTERNET DRAFT Editors: James SENG +draft-jseng-idn-admin-03.txt John C KLENSIN, Wendy RICKARD +16 June 2003 Authors: K. KONISHI +Expires December 2003 K. HUANG, H. QIAN, Y. KO + + Internationalized Domain Names Registration and Administration + Guideline for Chinese, Japanese, and Korean + +Status of This Memo + +This document is an Internet Draft and is in full conformance +with all provisions of Section 10 of RFC2026 except that the +right to produce derivative works is not granted. + + Internet Drafts are working documents of the Internet + Engineering Task Force (IETF), its areas, and its working + groups. Note that other groups may also distribute working + documents as Internet Drafts. + + Internet Drafts are draft documents valid for a maximum of + six months and may be updated, replaced, or rendered obsolete by + other documents at any time. It is inappropriate to use Internet + Drafts as reference material or to cite them other than as + "works in progress." + + The list of current Internet Drafts can be accessed at + http://www.ietf.org/ietf/1id-abstracts.txt. + + The list of Internet Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html. + +Abstract + +Achieving internationalized access to domain names raises many complex +issues. These are associated not only with basic protocol design--such +as how names are represented on the network, compared, and converted to +appropriate forms--but also with issues and options for deployment, +transition, registration, and administration. + +The IETF Internationalized Domain Name (IDN) Working Group focused its +efforts on the development of a standards-track specification for access +to domain names in a range of scripts that is broader in scope than the +original ASCII. During its efforts, it became clear that the appearance +of characters with similar appearances and/or interpretations created +potential for confusion, as well as difficulties in deployment and +transition, and that those issues could best be addressed +administratively rather than through restrictions embedded in the +protocols. + +This document is an effort of the Joint Engineering Team (JET), a group +composed of members of CNNIC, TWNIC, KRNIC, and JPNIC as well as other +individual experts. It offers guidelines for zone administrators -- +including but not limited to registry operators and registrars -- and +information for all domain names holders on the administration of domain +names that contain characters drawn from Chinese, Japanese, and Korean +scripts. Other language groups are encouraged to develop their own +guidelines as needed, based on these guidelines if that is helpful. + +Table of Contents + +1. Introduction + +2. Definitions, Context, and Notation +2.1. Definitions and Context +2.2. Notation for Ideographs and Other Non-ASCII CJK Characters + +3. Scope of the Administrative Guidelines +3.1. Principles Underlying These Guidelines +3.2. Registration of IDL +3.2.1. Using the Language Variant Table +3.2.2. IDL Package +3.2.3. Procedure for Registering IDLs +3.3. Deletion and Transfer of IDL and IDL Package +3.4. Activation and Deactivation of IDL Variants +3.4.1. Activation Algorithm +3.4.2. Deactivation Algorithm +3.5. Managing Changes in Language Associations +3.6. Managing Changes to Language Variant Tables + +4. Examples of Guideline Use in Zones + +5. Syntax Description for the Language Variant Table +5.1 ABNF Syntax +5.2. Comments and Explanation of Syntax + +6. Security Considerations + +7. Index to Terminology + +8. Acknowledgments + +9. Authors’ Addresses + +10. Normative References + +11. Nonnormative References + +1. Introduction + +Domain names form the fundamental naming architecture of the Internet. +Countless Internet protocols and applications rely on them, not just for +stability and continuity, but also to avoid ambiguity. They were +designed to be identifiers without any language context. However, as +domain names have become visible to end users through Web URLs and +e-mail addresses, the strings in domain-name labels are being +increasingly interpreted as names, words, or phrases. It is likely that +users will do the same with languages of differing character sets--such +as Chinese, Japanese and Korean (CJK)--in which many words or concepts +are represented using short sequences of characters. + +The introduction of what are called Internationalized Domain Names (IDN) +amplifies both the difficulty of putting names into identifiers and the +confusion that exists between scripts and languages. It also affects a +number of Internet protocols and applications and creates additional +layers of complexity in terms of technical administration and services. +Given the added complications of using a much broader range of +characters than the original small ASCII subset, precautions are +necessary in the deployment of IDNs in order to minimize confusion and +fraud. + +The IETF IDN Working Group [IDN-WG] addressed the problem of handling +the encoding and decoding of Unicode strings into and out of Domain Name +System (DNS) labels with the goal that its solution would not put the +operational DNS at any risk. Its work resulted in one primary protocol +and three supporting ones, respectively: + +1. Internationalizing Host Names in Applications [IDNA] +2. Preparation of Internationalized Strings [STRINGPREP] +3. A Stringprep Profile for Internationalized Domain Names [NAMEPREP] +4. Punycode [PUNYCODE] + +IDNA--which calls on the others--normalizes and transforms strings that +are intended to be used as IDNs. In combination, the four provide the +minimum functions required for internationalization, such as performing +case mappings, eliminating character differences that would cause severe +problems, and specifying matching (equality). They also convert between +the resulting Unicode code points and an ASCII-based form that is more +suitable for storing in actual DNS labels. In this way, the IDNA +transformations improve a user’s chances of getting to the correct IDN. + +Addressing the issues around differing character sets, a primary +consideration and administrative challenge involves region-specific +definitions, interpretations, and the semantics of strings to be used in +IDNs. A Unicode string may have a specific meaning as a name, word, or +phrase in a particular language but that meaning could vary depending on +the country, region, culture, or other context in which the string is +used. It might also have different interpretations in different +languages that share some or all of the same characters. Therefore, +individual zones and zone administrators may find it necessary to impose +restrictions and procedures to reduce the likelihood of confusion--and +instabilities of reference--within their own environments. + +Over the centuries, the evolution of CJK characters--and the differences +in their use in different languages and even in different regions where +the same language is spoken--has given rise to the idea of "variants", +wherein one conceptual character can be identified with several +different Code Points in character sets for computer use. This document +provides a framework for handling such variants while minimizing the +possibility of serious user confusion in the obtaining or use of domain +names. However, the concept of variants is complex and may require many +different layers of solution, this guideline offers only one of the +solution components. It is not sufficient by itself to solve the whole +problem, even with zone-specific tables as described below. + +Additionally, because of local language or writing-system differences, +it is impossible to create universally accepted definitions for which +potential variants are the same and which are not the same. It is even +more difficult to define a technical algorithm to generate variants that +are linguistically accurate--that is, that the variant forms produced +make as much sense in the language as the originally specified forms. +It is also possible that variants generated may have no meaning in the +associated language or languages. The intention is not to generate +meaningful "words" but to generate similar variants to be reserved. So +even though the method described in this document may not always be +linguistically accurate--or need to be--it increases the chances of +getting the right variants while accepting the inherent limitations of +the DNS and the complexities of human language. + +This document outlines a model for such conventions for zones in which +labels that contain CJK characters are to be registered and a system for +implementing that model. It provides a mechanism that allows each zone +to define its own local rules for permitted characters and sequences and +the handling of IDNs and their variants. + +2. Definitions, Context, and Notation + +2.1. Definitions and Context + +This document uses a number of special terms. In this section, +definitions and explanations are grouped topically. Some readers may +prefer to skip over this material, returning, perhaps via the index to +terminology in section 7, when needed. + +2.1.1. IDN: The term "IDN" has a number of different uses: (a) as an +abbreviation for "Internationalized Domain Name"; (b) as a fully +qualified domain name that contains at least one label that contains +characters not appearing in ASCII, specifically not in the subset of +ASCII recommended for domain names (the so-called "hostname" or "LDH" +subset, see RFC1035 [STD13]); (c) as a label of a domain name that +contains at least one character beyond ASCII; (d) as a Unicode string to +be processed by Nameprep; (e) as a string that is an output from +Nameprep; (f) as a string that is the result of processing through both +Nameprep and conversion into Punycode; (g) as the abbreviation of an IDN +(more properly, IDL) Package, in the terminology of this document; (h) +as the abbreviation of the IETF IDN Working Group; (g) as the +abbreviation of the ICANN IDN Committee; and (h) as standing for other +IDN activities in other companies/organizations. + +Because of the potential confusion, this document uses the term "IDN" as +an abbreviation for Internationalized Domain Name and, specifically, in +the second sense described in (b) above. It uses "IDL," defined +immediately below, to refer to Internationalized Domain Labels. + +2.1.2. IDL: This document provides a guideline to be applied on a +per-zone basis, one label at a time. Therefore, the term +"Internationalized Domain Label" or "IDL" will be used instead of the +more general term "IDN" or its equivalents. The processing +specifications of this document may be applied, in some zones, to ASCII +characters also, if those characters are specified as valid in a +Language Variant Table (see below). Hence, in some zones, an IDL may +contain or consist entirely of "LDH" characters. + +2.1.3. FQDN: A fully qualified domain name, one that explicitly +contains all labels, including a Top-Level Domain (TLD) name. In this +context, a TLD name is one whose label appears in a nameserver record in +the root zone. The term "Domain Name Label" refers to any label of a +FQDN. + +2.1.4. Registration: In this document, the term "registration" refers +to the process by which a potential domain name holder requests that a +label be placed in the DNS either as an individual name within a domain +or as a subdomain delegation from another domain name holder. In the +case of a successful registration, the label or delegation records are +placed in the relevant zone file, or, more specifically, they are +"activated" or made "active" and additional IDLs may be reserved as part +of an "IDL Package" (see below). The guidelines presented here are +recommended for all zones--at any hierarchy level--in which CJK +characters are to appear and not just domains at the first or second +level. + +2.1.5. RFC3066: A system, widely used in the Internet, for coding and +representing names of languages. It is based on an International +Organization for Standardization (ISO) standard for coding language +names [ISO639], but expands it to provide additional precision. + +2.1.6. ISO/IEC 10646: The international standard universal +multiple-octet coded character set ("UCS") [IS10646]. The Code Point +definitions of this standard are identical to those of corresponding +versions of the Unicode standard (see below). Consequently, the +characters and their coding are often referred to as "Unicode +characters." + +2.1.7. Unicode Character: The term "Unicode character" is used here in +reference to characters chosen from the Unicode Standard Version 3.2 +[UNICODE] (and hence from ISO/IEC 10646). In this document, the +characters are identified by their positions, or "Code Points." The +notation U+12AB, for example, indicates the character at the position +12AB (hexadecimal) in the Unicode 3.2 table. For characters in +positions above FFFF—i.e., requiring more than sixteen bits to +represent--a five to eight-character string is used, such as U+112AB for +the character in position 12AB of plane 1. + +2.1.8. Unicode String: "Unicode string" refers to a string of Unicode +characters. The Unicode string is identified by the sequence of the +Unicode characters regardless of the encoding scheme. + +2.1.9. CJK Characters: CJK characters are characters commonly used in +the Chinese, Japanese, or Korean languages, including but not limited to +those defined in the Unicode Standard as ASCII (U+0020 to U+007F), Han +ideographs (U+3400 to U+9FAF and U+20000 to U+2A6DF), Bopomofo (U+3100 +to U+312F and U+31A0 to U+31BF), Kana (U+3040 to U+30FF), Jamo (U+1100 +to 11FF and U+3130 to U+318F), Hangul (U+AC00 to U+D7AF and U+3130 to +U+318F), and the respective compatibility forms. The particular +characters that are permitted in a given zone are specified in the +Language Variant Table(s) for that zone. + +2.1.10. Label String: A generic term referring to a string of +characters that is a candidate for registration in the DNS or such a +string, once registered. A label string may or may not be valid +according to the rules of this specification and may even be invalid for +IDNA use. The term "label", by itself, refers to a string that has been +validated and may be formatted to appear in a DNS zone file. + +2.1.11. Language Variant Table: The key mechanisms of this +specification utilize a three-column table, called a Language Variant +Table, for each language permitted to be registered in the zone. Those +columns are known, respectively, as "Valid Code Point", "Preferred +Variant", and "Character Variant", which are defined separately below. +The Language Variant Tables are critical to the success of the guideline +described in this document. However, the principles to be used to +generate the tables are not within the scope of this document and should +be worked out by each registry separately (perhaps by adopting or +adapting the work of some other registry). In this document, "Table" +and "Variant Table" are used as short forms for Language Variant Table. + +2.1.12. Valid Code Point: In a Language Variant Table, the list of Code +Points that is permitted for that language. Any other Code Points, or +any string containing them, will be rejected by this specification. The +Valid Code Point list appears as the first column of the Language +Variant Table. + +2.1.13. Preferred Variant: In a Language Variant Table, a list of Code +Points corresponding to each Valid Code Point and providing possible +substitutions for it. These substitutions are "preferred" in the sense +that the variant labels generated using them are normally registered in +the zone file, or "activated." The Preferred Code Points appear in +column 2 of the Language Variant Table. "Preferred Code Point" is used +interchangeably with this term. + +2.1.14. Character Variant: In a Language Variant Table, a second list +of Code Points corresponding to each Valid Code Point and providing +possible substitutions for it. Unlike the Preferred Variants, +substitutions based on Character Variants are normally reserved but not +actually registered (or "activated"). Character Variants appear in +column 3 of the Language Variant Table. The term "Code Point Variants" +is used interchangeably with this term. + +2.1.15. Preferred Variant Label: A label generated by use of Preferred +Variants (or Preferred Code Points). + +2.1.16. Character Variant Label: A label generated by use of Character +Variants. + +2.1.17. Zone Variant: A Preferred or Character Variant Label that is +actually to be entered (registered) into the DNS--that is, into the zone +file for the relevant zone. Zone Variants are also referred to as Zone +Variant Labels or Active (or Activated) Labels. + +2.1.18. IDL Package: A collection of IDLs as determined by these +Guidelines. All labels in the package are "reserved", meaning they +cannot be registered by anyone other than the holder of the Package. +These reserved IDLs may be "activated", meaning they are actually +entered into a zone file as a "Zone Variant". The IDL Package also +contains identification of the language(s) associated with the +registration process. The IDL and its variant labels form a single, +atomic unit. + +2.2 Notation for Ideographs and Other Non-ASCII CJK Characters. + +For purposes of clarity, particularly in regard to examples, Han +ideographs appear in several places in this document. However, they do +not appear in the ASCII version of this document. For the convenience +of readers of the ASCII version--and some readers not familiar with +recognizing and distinguishing Chinese characters--most uses of these +characters will be associated with both their Unicode Code Points and an +"asterisk tag" with its corresponding Chinese Romanization [ISO7098], +with the tone mark represented by a number from 1 to 4. Those tags have +no meaning outside this document; they are a quick visual and reading +reference to help facilitate the combinations and transformations of +characters in the guideline and table excerpts. + +3. Scope of the Administrative Guidelines + +Zone administrators are responsible for the administration of the domain +name labels under their control. A zone administrator might be +responsible for a large zone, such as a top-level domain (TLD)--whether +generic or country code--or a smaller one, such as a typical second- or +third-level domain. A large zone is often more complex than its smaller +counterpart. However, actual technical administrative tasks--such as +addition, deletion, delegation, and transfer of zones between domain +name holders--are similar for all zones. + +This document provides guidelines for the ways CJK characters should be +handled within a zone, for how language issues should be considered and +incorporated, and for how Domain Name Labels containing CJK characters +should be administered (including registration, deletion, and transfer +of labels). It does not provide any guidance for the handling of +non-CKJ characters or languages in zones. + +Other IDN policies--such as the creation of new top-level domains +(TLDs), the cost structure for registrations, and how the processes +described here get allocated between registrar and registry if the zone +makes that distinction--also are outside the scope of this document. + +Technical implementation issues are not discussed here either. For +example, deciding which guidelines should be implemented as registry +actions and which should be registrar actions is left to zone +administrators, with the possibility that it will differ from zone to +zone. + +3.1. Principles Underlying These Guidelines + +In many places, in the event of a dispute over rights to a name (or, +more accurately, DNS label string), this document assumes "first-come, +first-served" (FCFS) as a resolution policy even though FCFS is not +listed below as one of the principles for this document. If policies +are already in place governing priorities and "rights", one can use the +guidelines here by replacing uses of FCFS in this document with policies +specific to the zone. Some of the guidelines here may not be applicable +to other policies for determining rights to labels. Still other +alternatives--such as use of UDRP [WIPO-UDRP] or mutual exclusion--might +have little impact on other aspects of these guidelines. + +(a) Although some Unicode strings may be pure identifiers made up of an +assortment of characters from many languages and scripts, IDLs are +likely to be "words" or "names" or "phrases" that have specific meaning +in a language. While a zone administration might or might not require +"meaning" as a registration criterion, meaning could prove to be a +useful tool for avoiding user confusion. + + Each IDL to be registered should be associated administratively + with one or more languages. + +Language associations should either be predetermined by the zone +administrator and applied to the entire zone or be chosen by the +registrants on a per-IDL basis. The latter may be necessary for some +zones, but it will make administration more difficult and will increase +the likelihood of conflicts in variant forms. + + A given zone might have multiple languages associated with it or + it may have no language specified at all. Omitting specification + of a language may provide additional opportunities for user + confusion and is therefore NOT recommended. + +(b) Each language uses only a subset of Unicode characters. Therefore, +if an IDL is associated with a language, it is not permitted to contain +any Unicode character that is not within the valid subset for that +language. + + Each IDL to be registered must be verified against the valid subset + of Unicode for the language(s) associated with the IDL. That subset + is specified by the list of characters appearing in the first column + of the language and zone-specific tables as described later in this + document. + +If the IDL fails this test for any of its associated languages, the IDL +is not valid for registration. + +Note that this verification is not necessarily linguistically accurate, +because some languages have special rules. For example, some languages +impose restrictions on the order in which particular combinations of +characters may appear. Characters that are valid for the language--and +hence permitted by this specification--might still not form valid words +or even strings in the language. + +(c) When an IDL is associated with a language, it may have Character +Variants that depend on that language associated with it in addition to +any Preferred Variants. These variants are potential sources of +confusion with the Code Points in the original label string. +Consequently, the labels generated from them should be unavailable to +registrants of other names, words, or phrases. + + During registration, all labels generated from the Character + Variants for the associated language(s) of the IDL should be + reserved. + +IDL reservations of the type described here normally do not appear in +the distributed DNS zone file. In other words, these reserved IDLs may +not resolve. Domain name holders could request that these reserved IDLs +be placed in the zone file and made active and resolvable. + +Zones will need to establish local policies about how they are to be +made active. Specifically, many zones, especially at the top level, +have prohibited or restricted the use of "CNAME"s--DNS +aliases--especially CNAMEs that point to nameserver delegation records +(NS records). And long-term use of long-term aliases for domain +hierarchies, rather than single names ("DNAME records") are considered +problematic because of the recursion they can introduce into DNS +lookups. + +(d) When an IDL is a "name", "word", or "phrase", it will have Character +Variants depending on the associated language. Furthermore, one or more +of those Character Variants will be used more often than others for +linguistic, political, or other reasons. These more commonly used +variants are distinguished from ordinary Character Variants and are +known as Preferred Variant(s) for the particular language. + + To increase the likelihood of correct and predictable resolution of + the IDN by end users, all labels generated from the Preferred + Variants for the associated language(s) should be resolvable. + +In other words, the Preferred Variant Labels should appear in the +distributed DNS zone file. + +(e) IDLs associated with one or more languages may have a large number +of Character Variant Labels or Preferred Variant Labels. Some of these +labels may include combinations of characters that are meaningless or +invalid linguistically. It may therefore be appropriate for a zone to +adopt procedures that include only linguistically-acceptable labels in +the IDL Package. + + A zone administrator may impose additional rules and other + processing activities to limit the number of Character Variant + Labels or Preferred Variant Labels that are actually reserved or + registered. + +These additional rules and other processing activities are based on +policies and/or procedures imposed on a per-zone basis and therefore are +not within the scope of this document. Such policies or procedures +might be used, for example, to restrict the number of Preferred Variant +Labels actually reserved or to prevent certain words from being +registered at all. + +(f) There are some Character Variant Labels and Preferred Variant Labels +that are associated with each IDL. These labels are considered +"equivalent" to each another. To avoid confusion, they all should be +assigned to a single domain name holder. + + The IDL and its variant labels should be grouped together into a + single atomic unit, known in this document as an "IDL Package". + +The IDL Package is created upon registration and is atomic: Transfer and +deletion of an IDL is performed on the IDL Package as a whole. That is, +an IDL within the IDL Package may not be transferred or deleted +individually; any re-registration, transfers, or other actions that +impact the IDL should also affect the other variants. + +The name-conflict resolution policy associated with this zone could +result in a conflict with the principle of IDL Package atomicity. In +such a case, the policy must be defined to make the precedence clear. + +3.2. Registration of IDL + +To conform to the principles described in 3.1, this document introduces +two concepts: the Language Variant Table and the IDL Package. These are +described in the next two subsections, followed by a description of the +algorithm that is used to interpret the table and generate variant +labels. + +3.2.1. Using the Language Variant Table + +For each zone that uses a given language, each language should have its +own Language Variant Table. The table consists of a header section that +identifies references and version information, followed by a section +with one row for each Code Point that is valid for the language and +three columns.. + +a) The first column contains the subset of Unicode characters that is +valid to be registered ("Valid Code Point"). This is used to verify the +IDL to be registered (see 3.1b). As in the registration procedure +described later, this column is used as an index to examine characters +that appear in a proposed IDL to be processed. The collection of Valid +Code Points in the table for a particular language can be thought of as +defining the script for that language, although the normal definition of +a script would not include, for example, ASCII characters with CJK ones. + +b) The second column contains the Preferred Variant(s) of the +corresponding Unicode character in column one ("Valid Code Point"). +These variant characters are used to generate the Preferred Variant +Labels for the IDL. Those labels should be resolvable (see 3.1d). +Under normal circumstances, all of those Preferred Variant Labels will +be activated in the relevant zone file so that they will resolve when +the DNS is queried for them. + +c) The third column contains the Character Variant(s) for the +corresponding Valid Code Point. These are used to generate the +Character Variant Labels of the IDL, which are then to be reserved (see +3.1c). Registration--or activation--of labels generated from Character +Variants will normally be a registrant decision, subject to local +policy. + +Each entry in a column consists of one or more Code Points, expressed as +a numeric character number in the Unicode table and optionally followed +by a parenthetical reference. The first column--or Valid Code Point-- +may have only one Code Point specified in a given row. The other +columns may have more than one. + +Any row may be terminated with an optional comment, starting in "#". + +The formal syntax of the table and more-precise definitions of some of +its organization appear in Section 5. + +The Language Variant Table should be provided by a relevant group, +organization, or body. However, the question of who is relevant or has +the authority to create this table and the rules that define it is +beyond the scope of this document. + +3.2.2. IDL Package + +The IDL Package is created on successful registration and consists of: + +a) the IDL registered + +b) the language(s) associated with the IDL + +c) the reserved IDLs + +d) active IDLs--that is, "Zone Variant Labels" that are to appear in + the DNS zone file + +3.2.3. Procedure for Registering IDLs + +An explanation follows each step. + +Step 1. IN <= IDL to be registered and + {L} <= Set of languages associated with IN + +Start the process with the label string (prospective IDL) to be +registered and the associated language(s) as input. + +Step 2. Generate the Nameprep-processed version of the IN, applying + all mappings and canonicalization required by IDNA. + +The prospective IDL is processed by using Nameprep to apply the +normalizations and exclusions globally required to use IDNA. If the +Nameprep processing fails, then the IDL is invalid and the registration +process must stop. + +Step 2.1. NP(IN) <= Nameprep processed IN +Step 2.2. Check availability of NP(IN). + If not available, route to conflict policy. + +The Nameprep-processed IDL is then checked against the contents of the +zone file and previously created IDL Packages. If it is already +registered or reserved, then a conflict exists that must be resolved by +applying whatever policy is applicable for the zone. For example, if +FCFS is used, the registration process terminates unless the conflict +resolution policy provides another alternative. + +Step 3. Process each language. + For each language (AL} in {L} + +Step 3 goes through all languages associated with the proposed IDL and +checks each character (after Nameprep has been applied) for validity in +each of them. It then applies the Preferred Variants (column 2 values) +and the Character Variants (column 3 values) to generate candidate +labels. + +Step 3.1. Check validity of NP(IN) in AL. If failed, stop processing. + +In step 3.1, IDL validation is done by checking that every Code Point in +the Nameprep-processed IDL is a Code Point allowed by the "Valid Code +Point" column of the Character Variant Table for the language. This is +then repeated for any other languages (and hence, Language Variant +Tables) specified in the registration. If one or more Code Points are +not valid, the registration process terminates. + +Step 3.2. PV(IN,AL) <= Set of available Nameprep-processed Preferred + Variants of NP(IN) in AL + +Step 3.2 generates the list of Preferred Variant Labels of the IDL by +doing a combination (see Step 3.2A below) of all possible variants +listed in the "Preferred Variant(s)" column for each Code Point in the +Nameprep-processed IDL. The generated Preferred Variant Labels must be +processed through Nameprep. If the Nameprep processing fails for any +Preferred Variant Label (this is unlikely to occur if the Preferred +Variants [Code Points] are processed through Nameprep before being +placed in the table), then that variant label will be removed from the +list. The remaining Preferred Variant Labels in the list are then +checked to see whether they are already registered or reserved. If any +are registered or reserved, then the conflict resolution policy will +apply. In general, this will not prevent the originally requested IDL +from being registered unless the policy prevents such registration. For +example, if FCFS is applied, then the conflicting variants will be +removed from the list, but the originally requested IDL and any +remaining variants will be registered (see steps 5 and 8 below). + +Step 3.2A Generating variant labels from Variant Code Points. + +Steps 3.2 and 3.3 require that the Preferred Variants and Character +Variants be combined with the original IDL to form sets of variant +labels. Conceptually, one starts with the original, Nameprep-processed, +IDL and examines each of its characters in turn. If a character is +encountered for which there is a corresponding Preferred Variant or +Character Variant, a new variant label is produced with the Variant Code +Point substituted for the original one. If variant labels already exist +as the result of the processing of characters that appeared earlier in +the original IDL, then the substitutions are made in them as well, +resulting in additional generated variant labels. This operation is +repeated separately for the Preferred Variants (in Step 3.2) and +Character Variants (in Step 3.3). Of course, equivalent results could +be achieved by processing the original IDL’s characters in order, +building the Preferred Variant Label set and Character Variant Label set +in parallel. + +This process will sometimes generate a very large number of labels. For +example, if only two of the characters in the original IDL are +associated with Preferred Variants and if the first of those characters +has three Preferred Variants and the second has two, one ends up with 12 +variant labels to be placed in the IDL Package and, normally, in the +zone file. Repeating the process for Character Variants, if any exist, +would further increase the number of labels. And if more than one +language is specified for the original IDL, then repetition of the +process for additional languages (see step 4, below) might further +increase the size of the set. + +For illustrative purposes, the "combination" process could be achieved +by a recursive function similar to the following pseudocode: + +Function Combination(Str) + F <= first codepoint of Str + SStr <= Substring of Str, without the first code point + NSC <= {} + + If SStr is empty then + For each V in (Variants of code point F) + NSC = NSC set-union (the string with the code point V) + End of Loop + Else + SubCom = Combination(SStr) + For each V in (Variants of code point F) + For each SC in SubCom + NSC = NSC set-union (the string with the first code point V + followed by the string SC) + End of Loop + End of Loop + Endif + + Return NSC + +Step 3.3. CV(IN,AL) <= Set of available Nameprep-processed Character + Variants of NP(IN) in AL + +This step generates the list of Character Variant Labels by doing a +combination (see Step 3.2A above) of all the possible variants listed in +the "Character Variant(s)" column for each Code Point in the +Nameprep-processed original IDL. As with the Preferred Variant Labels, +the generated Character Variant Labels must be processed by, and +acceptable to, Nameprep. If the Nameprep processing fails for a +Character Variant Label, then that variant label will be removed from +the list. The remaining Character Variant Labels are then checked to be +sure they are not registered or reserved. If one or more are, then the +conflict resolution policy is applied. As with Preferred Variant +Labels, a conflict that is resolved in favor of the earlier registrant +does not, in general, prevent the IDL from being registered, nor the +remaining variants from being reserved in step 6 below. + +Step 3.4. End of Loop + +Step 4. Let PVall be the set-union of all PV(IN,AL) + +Step 4 generates the Preferred Variants Label for all languages. +In this step, and again in step 6 below, the zone administrator may +impose additional rules and processing activities to restrict the number +of Preferred (tentatively to be reserved and activated) and Character +(tentatively to be reserved) Label Variants. These additional rules and +processing activities are zone policy specific and therefore are not +specified in this document. + +Step 5. {ZV} <= PVall set-union NP(IN) + +Step 5 generates the initial Zone Variants. The set includes all +Preferred Variants for all languages and the original Nameprep-processed +IDL. Unless excluded by further processing, these Zone Variants will be +activated--that is, placed into the DNS zone. Note that the "set-union" +operation will eliminate any duplicates. + +Step 6. Let CVall be the set-union of all CV(IN,AL), set-minus {ZV} + +Step 6 generates the Reserved Label Variants (the Character Variant +Label set). These labels are normally reserved but not activated. The +set includes all Character Variant Labels for all languages, but not the +Zone Variants defined in the previous step. The set-union and set-minus +operations eliminate any duplicates. + +Step 7. Create IDL Package for IN using IN, {L}, {ZV} and CVall + +In Step 7, the "IDL Package" is created using the original IDL, the +associated language(s), the Zone Variant Labels, and the Reserved +Variant Labels. If zone-specific additional processing or filtering is +to be applied to eliminate linguistically inappropriate or other forms, +it should be applied before the IDL Package is actually assembled. + +Step 8. Put {ZV} into zone file + +The activated IDLs are converted via ToASCII with UseSTD13ASCIIRules +[IDNA] before being placed into the zone file. This conversion results +in the IDLs being in the actual IDNA ("Punycode") form used in zone +files, while the IDLs have been carried in Unicode form up to this +point. If ToASCII fails for any of the activated IDLs, that IDL must +not be placed into the zone file. If the IDL is a subdomain name, it +will be delegated. + +3.3. Deletion and Transfer of IDL and IDL Package + +In traditional domain administration, every Domain Name Label is +independent of all other Domain Name Labels. Registration, deletion, +and transfer of labels is done on a per-label basis. However, with the +guidelines discussed here, each IDL is associated with specific +languages, with all label variants--both active (zone) and reserved-- +together in an IDL Package. This quite deliberately prohibits labels +that contain sufficient mixtures of characters from different scripts +to make them impossible as words in any given language. If a zone +chooses to not impose that restriction--that is, to permit labels to +be constructed by picking characters from several different languages +and scripts--then the guidelines described here would be inappropriate. + +As stated earlier, the IDL package should be treated as a single atomic +unit and all variants of the IDL should belong to a single domain-name +holder. If the local policy related to the handling of disagreements +requires a particular IDL to be transferred and deleted independently of +the IDL Package, the conflict policy would take precedence. In such an +event, the conflict policy should include a transfer or delete procedure +that takes the nature of IDL Packages into consideration. + +When an IDL Package is deleted, all of the Zone and Reserved Label +Variants again become available. The deletion of one IDL Package does +not change any other IDL Packages. + +3.4. Activation and Deactivation of IDL variants + +Because there are active (registered) IDLs and inactive (reserved but +not registered) IDLs within an IDL package, processes are required to +activate or deactivate IDL variants within an IDL Package. + +3.4.1. Activation Algorithm + +Step 1. IN <= IDL to be activated and PA <= IDL Package + +Start with the IDL to be activated and the IDL Package of which it is a +member. + +Step 2. NP(IN) <= Nameprep processed IN + +Process the IDL through Nameprep. This step should never cause a +problem, or even a change, since all labels that become part of the IDL +Package are processed through Nameprep in Step 3.2 or 3.3 of the +Registration procedure (section 3.2.3). + +Step 3. If NP(IN) not in {RV} then stop + +Verify that the Nameprep-processed version of the IDL appears as a +still-unactivated label in the IDL Package, i.e., in the list of +Reserved Label Variants, {RV}. It might be a useful "sanity check" to +also verify that it does not already appear in the zone file. + +Step 4. {RV} <= {RV} set-minus NP(IN) and {ZV} <= {ZV} set-union NP(IN) + +Within the IDL Package, remove the Nameprep-processed version of the IDL +from the list of Reserved Label Variants and add it to the list of +active (zone) label variants. + +Step 5. Put {ZV} into the zone file + +Actually register (activate) the Zone Variant Labels. + + +3.4.2. Deactivation Algorithm + +Step 1. IN <= IDL to be deactivated and PA <= IDL Package + +As with activation, start with the IDL to be deactivated and the IDL +Package of which it is a member. + +Step 2. NP(IN) <= Nameprep processed IN + +Get the Nameprep-processed version of the name (see discussion in the +previous section). + +Step 3. If NP(IN) not in {ZV} then stop + +Verify that the Nameprep-processed version of the IDL appears as an +activated (zone) label variant in the IDL Package. It might be a useful +"sanity check" at this point to also verify that it actually appears in +the zone file. + +Step 4. {RV} <= {RV} set-union NP(IN) and {ZV} <= {ZV} set-minus NP(IN) + +Within the IDL Package, remove the Nameprep-processed version of the IDL +from the list of Active (Zone) Label Variants and add it to the list of +Reserved (but inactive) Label Variants. + +Step 5. Put {ZV} into the zone file + +3.5. Managing Changes in Language Associations + +Since the IDL package is an atomic unit and the associated list of +variants must not be changed after creation, this document does not +include a mechanism for adding and deleting language associations within +the IDL package. Instead, it recommends deleting the IDL package +entirely, followed by a registration with the new set of languages. +Zone administrators may find it desirable to devise procedures that +prevent other parties from capturing the labels in the IDL Package +during these operations. + +3.6. Managing Changes to the Language Variant Tables + +Language Variant Tables are subject to changes over time, and these +changes may or may not be backward compatible. It is possible that +updated Language Variant Tables may produce a different set of Preferred +Variants and Reserved Variants. + +In order to preserve the atomicity of the IDL Package, when the Language +Variant Table is changed, IDL Packages created using the previous +version of the Language Variant Table must not be updated or affected. + +4. Examples of Guideline Use in Zones + +To provide a meaningful example, some Language Variant Tables must be +defined. Assume, then, for the purpose of giving examples, that the +following four Language Variant Tables are defined: + +Note: these tables are not a representation of the actual tables, and +they do not contain sufficient entries to be used in any actual +implementation. + +a) Language Variant Table for zh-cn and zh-sg + +Reference 1 CP936 (commonly known as GBK) +Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt +Reference 3 List of Simplified character Table (Simplified column) +Reference 4 zSimpVariant in Unihan.txt +Reference 5 variant that exists in GB2312, common simplified hanzi + +Version 1 20020701 # July 2002 + +56E2(1);56E2(5);5718(2) # sphere, ball, circle; mass, lump +5718(1);56E2(4);56E2(2),56E3(2) # sphere, ball, circle; mass, lump +60F3(1);60F3(5); # think, speculate, plan, consider +654E(1);6559(5);6559(2) # teach +6559(1);6559(5);654E(2) # teach, class +6DF8(1);6E05(5);6E05(2) # clear +6E05(1);6E05(5);6DF8(2) # clear, pure, clean; peaceful +771E(1);771F(5);771F(2) # real, actual, true, genuine +771F(1);771F(5);771E(2) # real, actual, true, genuine +8054(1);8054(3);806F(2) # connect, join; associate, ally +806F(1);8054(3);8054(2),8068(2) # connect, join; associate, ally +96C6(1);96C6(5); # assemble, collect together + + +b) Language Variant Table for zh-tw + +Reference 1 CP950 (commonly known as BIG5) +Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt +Reference 3 List of Simplified Character Table (Traditional column) +Reference 4 zTradVariant in Unihan.txt + +Version 1 20020701 # July 2002 + +5718(1);5718(4);56E2(2),56E3(2) # sphere, ball, circle; mass, lump +60F3(1);60F3(1); # think, speculate, plan, consider +6559(1);6559(1);654E(2) # teach, class +6E05(1);6E05(1);6DF8(2) # clear, pure, clean; peaceful +771F(1);771F(1);771E(2) # real, actual, true, genuine +806F(1);806F(3);8054(2),8068(2) # connect, join; associate, ally +96C6(1);96C6(1); # assemble, collect together + +c) Language Variant Table for ja + +Reference 1 CP932 (commonly known as Shift-JIS) +Reference 2 zVariant in Unihan.txt +Reference 3 variant that exists in JIS X0208, commonly used Kanji + +Version 1 20020701 # July 2002 + +5718(1);5718(3);56E3(2) # sphere, ball, circle; mass, lump +60F3(1);60F3(3); # think, speculate, plan, consider +654E(1);6559(3);6559(2) # teach +6559(1);6559(3);654E(2) # teach, class +6DF8(1);6E05(3);6E05(2) # clear +6E05(1);6E05(3);6DF8(2) # clear, pure, clean; peaceful +771E(1);771E(1);771F(2) # real, actual, true, genuine +771F(1);771F(1);771E(2) # real, actual, true, genuine +806F(1);806F(1);8068(2) # connect, join; associate, ally +96C6(1);96C6(3); # assemble, collect together + +d) Language Variant Table for ko + +Reference 1 CP949 (commonly known as EUC-KR) +Reference 2 zVariant and K-source in Unihan.txt + +Version 1 20020701 # July 2002 + +5718(1);5718(1);56E3(2) # sphere, ball, circle; mass, lump +60F3(1);60F3(1); # think, speculate, plan, consider +654E(1);654E(1);6559(2) # teach +6DF8(1);6DF8(1);6E05(2) # clear +771E(1);771E(1);771F(2) # real, actual, true, genuine +806F(1);806F(1);8068(2) # connect, join; associate, ally +96C6(1);96C6(1); # assemble, collect together + +Example 1: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* + {L} = {zh-cn, zh-sg, zh-tw} + +NP(IN) = (U+6E05 U+771F U+6559) +PV(IN,zh-cn) = (U+6E05 U+771F U+6559) +PV(IN,zh-sg) = (U+6E05 U+771F U+6559) +PV(IN,zh-tw) = (U+6E05 U+771F U+6559) +{ZV} = (U+6E05 U+771F U+6559)} +CVall = (U+6E05 U+771E U+6559), + (U+6E05 U+771E U+654E), + (U+6E05 U+771F U+654E), + (U+6DF8 U+771E U+6559), + (U+6DF8 U+771E U+654E), + (U+6DF8 U+771F U+6559), + (U+6DF8 U+771F U+654E)} + +Example 2: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* + {L} = {ja} + +NP(IN) = (U+6E05 U+771F U+6559) +PV(IN,ja) = (U+6E05 U+771F U+6559) +{ZV} = (U+6E05 U+771F U+6559)} +CVall = (U+6E05 U+771E U+6559), + (U+6E05 U+771E U+654E), + (U+6E05 U+771F U+654E), + (U+6DF8 U+771E U+6559), + (U+6DF8 U+771E U+654E), + (U+6DF8 U+771F U+6559), + (U+6DF8 U+771F U+654E)} + +Example 3: IDL = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* + {L} = {zh-cn, zh-sg, zh-tw, ja, ko} + +NP(IN) = (U+6E05 U+771F U+6559) *qing2 zhen1 jiao4* +Invalid registration because U+6E05 is invalid in L = ko + +Example 4: IDL = (U+806F U+60F3 U+96C6 U+5718) + *lian2 xiang3 ji2 tuan2* + {L} = {zh-cn, zh-sg, zh-tw} + +NP(IN) = (U+806F U+60F3 U+96C6 U+5718) +PV(IN,zh-cn) = (U+8054 U+60F3 U+96C6 U+56E2) +PV(IN,zh-sg) = (U+8054 U+60F3 U+96C6 U+56E2) +PV(IN,zh-tw) = (U+806F U+60F3 U+96C6 U+5718) +{ZV} = (U+8054 U+60F3 U+96C6 U+56E2), + (U+806F U+60F3 U+96C6 U+5718)} +CVall = (U+8054 U+60F3 U+96C6 U+56E3), + (U+8054 U+60F3 U+96C6 U+5718), + (U+806F U+60F3 U+96C6 U+56E2), + (U+806f U+60F3 U+96C6 U+56E3), + (U+8068 U+60F3 U+96C6 U+56E2), + (U+8068 U+60F3 U+96C6 U+56E3), + (U+8068 U+60F3 U+96C6 U+5718) + +Example 5: IDL = (U+8054 U+60F3 U+96C6 U+56E2) + *lian2 xiang3 ji2 tuan2* + {L} = {zh-cn, zh-sg} + +NP(IN) = (U+8054 U+60F3 U+96C6 U+56E2) +PV(IN,zh-cn) = (U+8054 U+60F3 U+96C6 U+56E2) +PV(IN,zh-sg) = (U+8054 U+60F3 U+96C6 U+56E2) +{ZV} = (U+8054 U+60F3 U+96C6 U+56E2)} +CVall = (U+8054 U+60F3 U+96C6 U+56E3), + (U+8054 U+60F3 U+96C6 U+5718), + (U+806F U+60F3 U+96C6 U+56E2), + (U+806f U+60F3 U+96C6 U+56E3), + (U+806F U+60F3 U+96C6 U+5718), + (U+8068 U+60F3 U+96C6 U+56E2), + (U+8068 U+60F3 U+96C6 U+56E3), + (U+8068 U+60F3 U+96C6 U+5718)} + +Example 6: IDL = (U+8054 U+60F3 U+96C6 U+56E2) + *lian2 xiang3 ji2 tuan2* + {L} = {zh-cn, zh-sg, zh-tw} + +NP(IN) = (U+8054 U+60F3 U+96C6 U+56E2) +Invalid registration because U+8054 is invalid in L = zh-tw + +Example 7: IDL = (U+806F U+60F3 U+96C6 U+5718) + *lian2 xiang3 ji2 tuan2* + {L} = {ja,ko} + +NP(IN) = (U+806F U+60F3 U+96C6 U+5718) +PV(IN,ja) = (U+806F U+60F3 U+96C6 U+5718) +PV(IN,ko) = (U+806F U+60F3 U+96C6 U+5718) +{ZV} = (U+806F U+60F3 U+96C6 U+5718)} +CVall = (U+806F U+60F3 U+96C6 U+56E3), + (U+8068 U+60F3 U+96C6 U+5718), + (U+8068 U+60F3 U+96C6 U+56E3)} + +5. Syntax Description for the Language Variant Table + +The formal syntax for the Language Variant Table is as follows, using +the IETF "ABNF" metalanguage [ABNF]. Some comments on this syntax +appear immediately after it. + +5.1 ABNF Syntax + +LanguageVariantTable = 1*ReferenceLine VersionLine 1*EntryLine +ReferenceLine = "Reference" SP RefNo SP RefDesciption [ Comment ] CRLF +RefNo = 1*DIGIT +RefDesciption = *[VCHAR] +VersionLine = "Version" SP VersionNo SP VersionDate [ Comment ] CRLF +VersionNo = 1*DIGIT +VersionDate = YYYYMMDD +EntryLine = VariantEntry/Comment CRLF +VariantEntry = ValidCodePoint ";" + PreferredVariant ";" CharacterVariant [ Comment ] +ValidCodePoint = CodePoint +RefList = RefNo 0*( "," RefNo ) +PreferredVariant = CodePointSet 0*( "," CodePointSet ) +CharacterVariant = CodePointSet 0*( "," CodePointSet ) +CodePointSet = CodePoint 0*( SP CodePoint ) +CodePoint = 4*8DIGIT [ "(" Reflist ")" ] +Comment = "#" *VCHAR + +YYYYMMDD is an integer, in alphabetic form, representing a date, where +YYYY is the 4-digit year, MM is the 2-digit month, and DD is the 2-digit +day. + +5.2. Comments and Explanation of Syntax + +Any lines starting with, or portions of lines after, the hash +symbol("#") are treated as comments. Comments have no significance in +the processing of the tables; nor are there any syntax requirements +between the hash symbol and the end of the line. Blank lines in the +tables are ignored completely. + +Every language should have its own Language Variant Table provided by a +relevant group, organization, or other body. That table will normally +be based on some established standard or standards. The group that +defines a Language Variant Table should document references to the +appropriate standards at the beginning of the table, tagged with the +word "Reference" followed by an integer (the reference number) followed +by the description of the reference. For example: + +Reference 1 CP936 (commonly known as GBK) +Reference 2 zVariant, zTradVariant, zSimpVariant in Unihan.txt +Reference 3 List of Simplified Character Table (Simplified column) +Reference 4 zSimpVariant in Unihan.txt +Reference 5 Variant that exists in GB2312, common simplified Hanzi + +Each Language Variant Table must have a version number and its release +date. This is tagged with the word "Version" followed by an integer +then followed by the date in the format YYYYMMDD, where YYYY is the +4-digit year, MM is the 2-digit month, and DD is the 2-digit day of the +publication date of the table. + +Version 1 20020701 # July 2002 Version 1 + +The table has three columns, separated by semicolons: "Valid Code +Point"; "Preferred Variant(s)"; and "Character Variant(s)". + +The "Valid Code Point" is the subset of Unicode characters that are +valid to be registered. + +There can be more than one Preferred Variant; hence there could be +multiple entries in the "Preferred Variant(s)" column. If the +"Preferred Variant(s)" column is empty, then there is no corresponding +Preferred Variant; in other words, the Preferred Variant is null. +Unless local policy dictates otherwise, the procedures above will result +in only those labels that reflect the valid code point being activated +(registered) into the zone file. + +The "Character Variant(s)" column contains all Character Variants of the +Code Point. Since the Code Point is always a variant of itself, to +avoid redundancy, the Code Point is assumed to be part of the "Character +Variant(s)" and need not be repeated in the "Character Variant(s)" +column. + +If the variant in the "Preferred Variant(s)" or the "Character +Variant(s)" column is composed of a sequence of Code Points, then +sequence of Code Points is listed separated by a space. + +If there are multiple variants in the "Preferred Variant(s)" or the +"Character Variant(s)" column, then each variant is separated by a +comma. + +Any Code Point listed in the "Preferred Variant(s)" column must be +allowed by the rules for the relevant language to be registered. +However, this is not a requirement for the entries in the "Character +Variant(s)" column; it is possible that some of those entries may not be +allowed to be registered. + +Every Code Point in the table should have a corresponding reference +number (associated with the references) specified to justify the entry. +The reference number is placed in parentheses after the Code Point. If +there is more than one reference, then the numbers are placed within a +single set of parentheses and separated by commas. + +6. Security Considerations + +As discussed in the Introduction, substantially-unrestricted use of +international (non-ASCII) characters in domain name labels may cause +user confusion and invite various types of attacks. In particular, in +the case of CJK languages, an attacker has an opportunity to divert or +confuse users as a result of different characters (or, more +specifically, assigned code points) with identical or similar semantics. +These Guidelines provide a partial remedy for those risks by supplying +a framework for prohibiting inappropriate characters from being +registered at all and for permitting "variant" characters to be grouped +together and reserved, so that they can only be registered in the DNS by +the same owner. However, the system it suggests is no better or worse +than the per-zone and per-language tables whose format and use this +document specifies. Specific tables, and any additional local +processing, will reflect per-zone decisions about the balance between +risk and flexibility of registrations. And, of course, errors in +construction of those tables may significantly reduce the quality of +protection provided. + +7. Index to Terminology + +As a convenience to the reader, this section lists all of the special +terminology used in this document, with a pointer to the section in +which it is defined. + +Activated Label 2.1.17 +Activation 2.1.4 +Active Label 2.1.17 +Character Variant 2.1.14 +Character Variant Label 2.1.16 +CJK Characters 2.1.9 +Code point 2.1.7 +Code Point Variant 2.1.14 +FQDN 2.1.3 +Hostname 2.1.1 +IDL 2.1.2 +IDL Package 2.1.18 +IDN 2.1.1 +Internationalized Domain Label 2.1.2 +ISO/IEC 10646 2.1.6 +Label String 2.1.10 +Language name codes 2.1.5 +Language Variant Table 2.1.11 +LDH Subset 2.1.1 +Preferred Code Point 2.1.13 +Preferred Variant 2.1.13 +Preferred Variant Label 2.1.15 +Registration 2.1.4 +Reserved 2.1.18 +RFC3066 2.1.5 +Table 2.1.11 +UCS 2.1.6 +Unicode Character 2.1.7 +Unicode String 2.1.8 +Valid Code Point 2.1.12 +Variant Table 2.1.11 +Zone Variant 2.1.17 + + +8. Acknowledgments + +The authors gratefully acknowledge the contributions of: + +- V. CHEN, N. HSU, H. HOTTA, S. TASHIRO, Y. YONEYA, and other Joint +Engineering Team members at the JET meeting in Bangkok, Thailand. + +- Yves Arrouye, an observer at the JET meeting in Bangkok, for his +contribution on the IDL Package. + +- Those who commented on, and made suggestions about, earlier versions, +including Harald ALVESTRAND, Erin CHEN, Patrik FALTSTROM, Paul HOFFMAN, +Soobok LEE, LEE Xiaodong, MAO Wei, Erik NORDMARK, and L.M. TSENG. + +9. Authors’ Addresses + +James SENG +Infocomm Development Authority +8 Temasek Boulevard +#14-00 Suntec Tower Three +Singapore 038988 +Phone: +65 9638-7085 +E-mail: jseng@pobox.org.sg + +Kazunori KONISHI +JPNIC +Kokusai-Kougyou-Kanda Bldg 6F +2-3-4 Uchi-Kanda, Chiyoda-ku +Tokyo 101-0047 +Japan +Phone: +81 49-278-7313 +E-mail: konishi@jp.apan.net + +Kenny HUANG +TWNIC +3F, 16, Kang Hwa Street, Taipei +Taiwan +TEL : 886-2-2658-6510 +E-mail: huangk@alum.sinica.edu + +QIAN Hualin +CNNIC +No.6 Branch-box of No.349 Mailbox, Beijing 100080 +Peoples Republic of China +E-mail: Hlqian@cnnic.net.cn + +KO YangWoo +PeaceNet +Yangchun P.O. Box 81 Seoul 158-600 +Korea +E-mail: newcat@peacenet.or.kr + +John C KLENSIN +1770 Massachusetts Avenue, No. 322 +Cambridge, MA 02140 +U.S.A. +E-mail: Klensin+ietf@jck.com + +Wendy RICKARD +The Rickard Group +16 Seminary Ave +Hopewell, NJ 08525 +USA +E-mail: rickard@rickardgroup.com + +10. Normative References + +[ABNF] Augmented BNF for Syntax Specifications: ABNF, RFC 2234, D. + Crocker and P. Overell, eds., November 1997. + +[STD13] Paul Mockapetris, "Domain names--concepts and facilities" + (RFC 1034) and "Domain names--implementation and + specification" (RFC 1035), STD 13, November 1987. + + +[RFC3066] Tags for the Identification of Languages, RFC3066, + Jan 2001, H. Alvestrand. + +[IDNA] Internationalizing Domain Names in Applications (IDNA), + RFC 3490, March 2003, Patrik Faltstrom, Paul Hoffman, + Adam M. Costello. + +[PUNYCODE] Punycode: A Bootstring encoding of Unicode for + Internationalized Domain Names in Applications (IDNA), + RFC 3492, March 2003, Adam M. Costello. + +[STRINGPREP]Preparation of Internationalized Strings ("stringprep"), + RFC 3454, December 2002, P. Hoffman, M. Blanchet. + +[NAMEPREP] Nameprep: A Stringprep Profile for Internationalized + Domain Names, RFC 3491, March 2003, P. Hoffman, M. Blanchet. + +[IS10646] A product of ISO/IEC JTC1/SC2/WG2, Work Item JTC1.02.18 + (ISO/IEC 10646). It is a multipart standard: Part 1, + published as ISO/IEC 10646-1:2000(E), covers the + Architecture and Basic Multilingual Plane, and Part 2, + published as ISO/IEC 10646-2:2001(E), covers the + supplementary (additional) planes. + +[UNIHAN] Unicode Han Database, Unicode Consortium + ftp://ftp.unicode.org/Public/UNIDATA/Unihan.txt. + +[UNICODE] The Unicode Consortium, "The Unicode Standard--Version + 3.0," ISBN 0-201-61633-5. Unicode Standard Annex #28 + (http://www.unicode.org/unicode/reports/tr28/) defines + Version 3.2 of the Unicode Standard, which is definitive + for IDNA and this document. + +[ISO7098] ISO 7098;1991 Information and documentation--Romanization + of Chinese, ISO/TC46/SC2. + +11. Nonnormative References + +[IDN-WG] IETF Internationalized Domain Names Working Group, + idn@ops.ietf.org, James Seng, Marc Blanchet. + http://www.i-d-n.net/. + +[IESG-IDN] "IESG Statement on IDN", Internet Engineering Steering Group, + IETF, 11 February 2003, + http://www.ietf.org/IESG/STATEMENTS/IDNstatement.txt. + +[ISO639] "ISO 639:1988 (E/F)--Code for the representation of names + of languages"--International Organization for + Standardization, 1st edition, 1988-04-01. From 82ce657001db1d2c41e984012848c5db58db0d11 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 19 Jun 2003 23:41:31 +0000 Subject: [PATCH 23/75] new draft --- ...draft-ietf-dnsext-delegation-signer-14.txt | 914 ---------------- ...draft-ietf-dnsext-delegation-signer-15.txt | 992 ++++++++++++++++++ 2 files changed, 992 insertions(+), 914 deletions(-) delete mode 100644 doc/draft/draft-ietf-dnsext-delegation-signer-14.txt create mode 100644 doc/draft/draft-ietf-dnsext-delegation-signer-15.txt diff --git a/doc/draft/draft-ietf-dnsext-delegation-signer-14.txt b/doc/draft/draft-ietf-dnsext-delegation-signer-14.txt deleted file mode 100644 index bddf377df5..0000000000 --- a/doc/draft/draft-ietf-dnsext-delegation-signer-14.txt +++ /dev/null @@ -1,914 +0,0 @@ - - - - - - - DNSEXT Working Group Olafur Gudmundsson - INTERNET-DRAFT May 2003 - - - Updates: RFC 1035, RFC 2535, RFC 3008, RFC 3090. - - - Delegation Signer Resource Record - - -Status of this Memo - - This document is an Internet-Draft and is in full conformance with - all provisions of Section 10 of RFC2026. - - Internet-Drafts are working documents of the Internet Engineering - Task Force (IETF), its areas, and its working groups. Note that - other groups may also distribute working documents as Internet- - Drafts. - - Internet-Drafts are draft documents valid for a maximum of six months - and may be updated, replaced, or obsoleted by other documents at any - time. It is inappropriate to use Internet-Drafts as reference - material or to cite them other than as ``work in progress.'' - - The list of current Internet-Drafts can be accessed at - http://www.ietf.org/ietf/1id-abstracts.txt - - The list of Internet-Draft Shadow Directories can be accessed at - http://www.ietf.org/shadow.html - - Comments should be sent to the authors or the DNSEXT WG mailing list - namedroppers@ops.ietf.org - - This draft expires on December 6, 2003. - - Copyright Notice - - Copyright (C) The Internet Society (2003). All rights reserved. - - - -Abstract - - The delegation signer (DS) resource record is inserted at a zone cut - (i.e., a delegation point) to indicate that the delegated zone is - digitally signed and that the delegated zone recognizes the indicated - key as a valid zone key for the delegated zone. The DS RR is a - modification to the DNS Security Extensions definition, motivated by - - - -Gudmundsson Expires December 2003 [Page 1] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - operational considerations. The intent is to use this resource record - as an explicit statement about the delegation, rather than relying on - inference. - - This document defines the DS RR, gives examples of how it is used and - the implications of this record on resolvers. This change is not - backwards compatible with RFC 2535. - This document updates RFC1035, RFC2535, RFC3008 and RFC3090. - - -1 Introduction - - Familiarity with the DNS system [RFC1035], DNS security extensions - [RFC2535] and DNSSEC terminology [RFC3090] is important. - - Experience shows that when the same data can reside in two - administratively different DNS zones, the data frequently gets out of - sync. The presence of an NS RRset in a zone anywhere other than at - the apex indicates a zone cut or delegation. The RDATA of the NS - RRset specifies the authoritative servers for the delegated or - "child" zone. Based on actual measurements, 10-30% of all delegations - on the Internet have differing NS RRsets at parent and child. There - are a number of reasons for this, including a lack of communication - between parent and child and bogus name servers being listed to meet - registry requirements. - - DNSSEC [RFC2535,RFC3008,RFC3090] specifies that a child zone needs to - have its KEY RRset signed by its parent to create a verifiable chain - of KEYs. There has been some debate on where the signed KEY RRset - should reside, whether at the child [RFC2535] or at the parent. If - the KEY RRset resides at the child, maintaining the signed KEY RRset - in the child requires frequent two-way communication between the two - parties. First the child transmits the KEY RRset to the parent and - then the parent sends the signature(s) to the child. Storing the KEY - RRset at the parent was thought to simplify the communication. - - DNSSEC [RFC2535] requires that the parent store a NULL KEY record for - an unsecure child zone to indicate that the child is unsecure. A NULL - KEY record is a waste: an entire signed RRset is used to communicate - effectively one bit of information--that the child is unsecure. - Chasing down NULL KEY RRsets complicates the resolution process in - many cases, because servers for both parent and child need to be - queried for the KEY RRset if the child server does not return it. - Storing the KEY RRset only in the parent zone simplifies this and - would allow the elimination of the NULL KEY RRsets entirely. For - large delegation zones the cost of NULL keys is a significant barrier - to deployment. - - - - - -Gudmundsson Expires December 2003 [Page 2] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - Another complication of the DNSSEC key model is that the KEY record - can be used to store public keys for other protocols in addition to - DNSSEC keys. There are number of potential problems with this, - including: - 1. The KEY RRset can become quite large if many applications and - protocols store their keys at the zone apex. Possible protocols - are IPSEC, HTTP, SMTP, SSH and others that use public key - cryptography. - 2. The KEY RRset may require frequent updates. - 3. The probability of compromised or lost keys, which trigger - emergency key rollover procedures, increases. - 4. The parent may refuse sign KEY RRsets with non-DNSSEC zone keys. - 5. The parent may not meet the child's expectations in turnaround - time for resigning the KEY RRset. - - Given these reasons, SIG@parent isn't any better than SIG/KEY@Child. - - -1.2 Reserved Words - - The key words "MAY","MAY NOT", "MUST", "MUST NOT", "REQUIRED", - "RECOMMENDED", "SHOULD", and "SHOULD NOT" in this document are to be - interpreted as described in RFC2119. - -2 Specification of the Delegation key Signer - - This section defines the Delegation Signer (DS) RR type (type code - TBD) and the changes to DNS to accommodate it. - -2.1 Delegation Signer Record Model - - This document presents a replacement for the DNSSEC KEY record chain - of trust [RFC2535] that uses a new RR that resides only at the - parent. This record identifies the key(s) that the child uses to - self-sign its own KEY RRset. - - The chain of trust is now established by verifying the parent KEY - RRset, the DS RRset from the parent and the KEY RRset at the child. - This is cryptographically equivalent to using just KEY records. - - Communication between the parent and child is greatly reduced, since - the child only needs to notify the parent about changes in keys that - sign its apex KEY RRset. The parent is ignorant of all other keys in - the child's apex KEY RRset. Furthermore, the child maintains full - control over the apex KEY RRset and its content. The child can - maintain any policies regarding its KEY usage for DNSSEC with minimal - impact on the parent. Thus if the child wants to have frequent key - rollover for its DNS zone keys, the parent does not need to be aware - of it. The child can use one key to sign only its apex KEY RRset and - - - -Gudmundsson Expires December 2003 [Page 3] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - a different key to sign the other RRsets in the zone. - - This model fits well with a slow roll out of DNSSEC and the islands - of security model. In this model, someone who trusts "good.example." - can preconfigure a key from "good.example." as a trusted key, and - from then on trusts any data signed by that key or that has a chain - of trust to that key. If "example." starts advertising DS records, - "good.example." does not have to change operations by suspending - self-signing. DS records can also be used to identify trusted keys - instead of KEY records. Another significant advantage is that the - amount of information stored in large delegation zones is reduced: - rather than the NULL KEY record at every unsecure delegation required - by RFC 2535, only secure delegations require additional information - in the form of a signed DS RRset. - - The main disadvantage of this approach is that verifying a zone's KEY - RRset requires two signature verification operations instead of the - one required by RFC 2535. There is no impact on the number of - signatures verified for other types of RRsets. - - Even though DS identifies two roles for KEY's, Key Signing Key (KSK) - and Zone Signing Key (ZSK), there is no requirement that zone use two - different keys for these roles. It is expected that many small zones - will only use one key, while larger organizations will be more likely - to use multiple keys. - -2.2 Protocol Change - - All DNS servers and resolvers that support DS MUST support the OK bit - [RFC3225] and a larger message size [RFC3226]. In order for a - delegation to be considered secure the delegation MUST contain a DS - RRset. If a query contains the OK bit, a server returning a referral - for the delegation MUST include the following RRsets in the authority - section in this order: - If DS RRset is present: - parents copy of childs NS RRset - DS and SIG(DS) - If no DS RRset is present: - parents copy of childs NS RRset - parents zone NXT and SIG(NXT) - - This increases the size of referral messages and possilbly causing - some or all glue to be omitted. If the DS or NXT RRsets with - signatures do not fit in the DNS message, the TC bit MUST be set. - Additional section processing is not changed. - - A DS RRset accompanying a NS RRset indicates that the child zone is - secure. If a NS RRset exists without a DS RRset, the child zone is - unsecure (from the parents point of view). DS RRsets MUST NOT appear - - - -Gudmundsson Expires December 2003 [Page 4] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - at non-delegation points or at a zone's apex. - - Section 2.2.1 defines special considerations related to authoritative - servers responding to DS queries and replaces RFC2535 sections 2.3.4 - and 3.4. Section 2.2.2 replaces RFC3008 section 2.7, and section - 2.2.3 updates RFC3090. - - -2.2.1 RFC2535 2.3.4 and 3.4: Special Considerations at Delegation Points - - DNS security views each zone as a unit of data completely under the - control of the zone owner with each entry (RRset) signed by a special - private key held by the zone manager. But the DNS protocol views the - leaf nodes in a zone that are also the apex nodes of a child zone - (i.e., delegation points) as "really" belonging to the child zone. - The corresponding domain names appear in two master files and might - have RRsets signed by both the parent and child zones' keys. A - retrieval could get a mixture of these RRsets and SIGs, especially - since one server could be serving both the zone above and below a - delegation point [RFC 2181]. - - Each DS RRset stored in the parent zone MUST be signed by at least - one of the parent zone's private key. The parent zone MUST NOT - contain a KEY RRset at any delegation point. Delegations in the - parent MAY contain only the following RR types: NS, DS, NXT and SIG. - The NS RRset MUST NOT be signed. The NXT RRset is the exceptional - case: it will always appear differently and authoritatively in both - the parent and child zones if both are secure. - - A secure zone MUST contain a self-signed KEY RRset at its apex. Upon - verifying the DS RRset from the parent, a resolver MAY trust any KEY - identified in the DS RRset as a valid signer of the child's apex KEY - RRset. Resolvers configured to trust one of the keys signing the KEY - RRset MAY now treat any data signed by the zone keys in the KEY RRset - as secure. In all other cases resolvers MUST consider the zone - unsecure. A DS RRset MUST NOT appear at a zone's apex. - - An authoritative server queried for type DS MUST return the DS RRset - in the answer section. - - -2.2.1.1 Special processing for DS queries - - When a server is authoritative for the parent zone at a delegation - point and receives a query for the DS record at that name, it will - return the DS from the parent zone. This is true whether or not it - is also authoritative for the child zone. - - - - - -Gudmundsson Expires December 2003 [Page 5] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - When the server is authoritative for the child zone at a delegation - point but not the parent zone, there is no natural response, since - the child zone is not authoritative for the DS record at the zone's - apex. As these queries are only expected to originate from recursive - servers which are not DS-aware, the authoritative server MUST answer - with: - RCODE: NOERROR - AA bit: set - Answer Section: Empty - Authority Section: SOA [+ SIG(SOA) + NXT + SIG(NXT)] - - That is, it answers as if it is authoritative and the DS record does - not exist. DS-aware recursive servers will query the parent zone at - delegation points, so will not be affected by this. - - A server authoritative for only the child zone at a delegation point - that is also a caching server MAY (if the RD bit is set in the query) - perform recursion to find the DS record at the delegation point, and - may return the DS record from its cache. In this case, the AA bit - MUST not be set in the response. - - -2.2.1.2 Special processing when child and an ancestor share server" - - Special rules are needed to permit DS RR aware servers to gracefully - interact with older caches which otherwise might falsely label a - server as lame because of the new placement of the DS RR set. - - Such a situation might arise when a server is authoritative for both - a zone and it's grandparent, but not the parent. This sounds like an - obscure example, but it is very real. The root zone is currently - served on 13 machines, and "root-servers.net." is served on 4 of the - same 13, but "net." is served elsewhere. - - When a server receives a query for (, DS, IN), the response - MUST be determined from reading these rules in order: - - - 1) If the server is authoritative for the zone that holds the DS RR - set (i.e., the zone that delegates away, aka the "parent" - zone), the response contains the DS RR set as an authoritative - answer. - - 2) If the server is offering recursive service and the RD bit is set - in the query, the server performs the query itself (according to the - rules for resolvers described below) and returns it's findings. - - 3) If the server is authoritative for the zone that holds the - 's SOA RR set, the response is an authoritative negative - - - -Gudmundsson Expires December 2003 [Page 6] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - answer as described in 2.2.1.1. - - 4) If the server is authoritative for a zone or zones above the - QNAME, a referral to the most enclosing zone's servers is made. - - 5) If the server is not authoritative for any part of the QNAME, a - response indicating a lame server for QNAME is given. - - Using these rules will require some special processing on the part of - a DS RR aware resolver. To illustrate this, an example is used. - - Assuming a server is authoritative for roots.example.net. and for the - root zone but not the intervening two zones (or the intervening two - label deep zone). Assume that QNAME=roots.example.net., QTYPE=DS, - and QCLASS=IN. - - The resolver will issue this request (assuming no cached data) - expecting a referral to a net. server. Instead, rule number 3 above - applies and a negative answer is returned by the server. The - reaction by the resolver is not to accept this answer as final as it - can determine from the SOA RR in the negative answer the context - within which the server has answered. - - A solution to this is to instruct the resolver to hunt for the - authoritative zone of the data in a brute force manner. - - This can be accomplished by taking the owner name of the returned SOA - RR and strip off enough left-hand labels until a successful NS - response is obtained. A successful response here means that the - answer has NS records in it. (Entertaining the possibility that a - cut point may be two labels down in a zone.) - - Returning to the example, the response will include a negative answer - with either the SOA RR for "roots.example.net." or "example.net." - depending on whether roots.example.net is a delegated domain. In - either case, removing the least significant label of the SOA owner - name will lead to the location of the desired data. - - -2.2.1.3 Modification on KEY RR in the construction of Responses - - This section updates RFC2535 section 3.5 by replacing it with the - following: - - An query for KEY RR MUST NOT trigger any additional section - processing. Security aware resolver will include corresponding SIG - records in the answer section. - - - - - -Gudmundsson Expires December 2003 [Page 7] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - KEY records SHOULD NOT be added to additional records section in - response to any query. - - RFC2535 included rules to in add KEY records to additional section - when SOA or NS records where included in an answer. The is was done - to reduce round trips (in the case of SOA) and to force out NULL - KEY's (in the NS case), as this document obsoletes NULL keys there is - no need for the second case, the first case causes redundant - transfers of KEY RRset as SOA is included in the authority section of - negative answers. - - RFC2535 section 3.5 also included rule for adding KEY RRset to query - for A and AAAA, as Restrict KEY[RFC3445] eliminated use of KEY RR by - all applications therfore the rule is not needed anymore. - - -2.2.2 Signer's Name (replaces RFC3008 section 2.7) - - The signer's name field of a SIG RR MUST contain the name of the zone - to which the data and signature belong. The combination of signer's - name, key tag, and algorithm MUST identify a zone key if the SIG is - to be considered material. This document defines a standard policy - for DNSSEC validation; local policy may override the standard policy. - - There are no restrictions on the signer field of a SIG(0) record. - The combination of signer's name, key tag, and algorithm MUST - identify a key if this SIG(0) is to be processed. - - -2.2.3 Changes to RFC3090 - - A number of sections of RFC3090 need to be updated to reflect the DS - record. - - -2.2.3.1 RFC3090: Updates to section 1: Introduction - - Most of the text is still relevant but the words ``NULL key'' are to - be replaced with ``missing DS RRset''. In section 1.3 the last three - paragraphs discuss the confusion in sections of RFC 2535 that are - replaced in section 2.2.1 above. Therefore, these paragraphs are now - obsolete. - - -2.2.3.2 RFC3090 section 2.1: Globally Secured - - Rule 2.1.b is replaced by the following rule: - - - - - -Gudmundsson Expires December 2003 [Page 8] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - 2.1.b. The KEY RRset at a zone's apex MUST be self-signed by a - private key whose public counterpart MUST appear in a zone signing - KEY RR (2.a) owned by the zone's apex and specifying a mandatory-to- - implement algorithm. This KEY RR MUST be identified by a DS RR in a - signed DS RRset in the parent zone. - - If a zone cannot get its parent to advertise a DS record for it, the - child zone cannot be considered globally secured. The only exception - to this is the root zone, for which there is no parent zone. - - -2.2.3.3 RFC3090 section 3: Experimental Status. - - The only difference between experimental status and globally secured - is the missing DS RRset in the parent zone. All locally secured zones - are experimental. - - -2.2.4 NULL KEY elimination - - RFC3445 section 3 elminates the top two bits in the flags field of - KEY RR. These two bits where used to indicate NULL KEY or NO KEY. - RFC3090 defines that zone that defines that zone is either secure or - not, eliminates the possible need to put NULL keys in the zone apex - to indicate that the zone is not secured for a algorithm. Along with - this document these other two elminate all uses for the NULL KEY, - Thus this document obsoletes NULL KEY. - -2.3 Comments on Protocol Changes - - Over the years there have been various discussions surrounding the - DNS delegation model, declaring it to be broken because there is no - good way to assert if a delegation exists. In the RFC2535 version of - DNSSEC, the presence of the NS bit in the NXT bit map proves there is - a delegation at this name. Something more explicit is needed and the - DS record addresses this need for secure delegations. - - The DS record is a major change to DNS: it is the first resource - record that can appear only on the upper side of a delegation. Adding - it will cause interoperabilty problems and requires a flag day for - DNSSEC. Many old servers and resolvers MUST be upgraded to take - advantage of DS. Some old servers will be able to be authoritative - for zones with DS records but will not add the NXT or DS records to - the authority section. The same is true for caching servers; in - fact, some may even refuse to pass on the DS or NXT records. - - - - - - - -Gudmundsson Expires December 2003 [Page 9] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - -2.4 Wire Format of the DS record - - The DS (type=TDB) record contains these fields: key tag, algorithm, - digest type, and the digest of a public key KEY record that is - allowed and/or used to sign the child's apex KEY RRset. Other keys - MAY sign the child's apex KEY RRset. - - 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | key tag | algorithm | Digest type | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | digest (length depends on type) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | (SHA-1 digest is 20 bytes) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - - The key tag is calculated as specified in RFC2535. Algorithm MUST be - an algorithm number assigned in the range 1..251 and the algorithm - MUST be allowed to sign DNS data. The digest type is an identifier - for the digest algorithm used. The digest is calculated over the - canonical name of the delegated domain name followed by the whole - RDATA of the KEY record (all four fields). - - digest = hash( canonical FQDN on KEY RR | KEY_RR_rdata) - - KEY_RR_rdata = Flags | Protocol | Algorithm | Public Key - - Digest type value 0 is reserved, value 1 is SHA-1, and reserving - other types requires IETF standards action. For interoperabilty - reasons, as few digest algorithms as possible should be reserved. The - only reason to reserve additional digest types is to increase - security. - - DS records MUST point to zone KEY records that are allowed to - authenticate DNS data. The indicated KEY record's protocol field - MUST be set to 3; flag field bit 7 MUST be set to 1. The value of - other flag bits is not significant for the purposes of this document. - - The size of the DS RDATA for type 1 (SHA-1) is 24 bytes, regardless - of key size, new digest types probably will have larger digests. - - - - - -Gudmundsson Expires December 2003 [Page 10] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - -2.4.1 Justifications for Fields - - The algorithm and key tag fields are present to allow resolvers to - quickly identify the candidate KEY records to examine. SHA-1 is a - strong cryptographic checksum: it is computationally infeasible for - an attacker to generate a KEY record that has the same SHA-1 digest. - Combining the name of the key and the key rdata as input to the - digest provides stronger assurance of the binding. Having the key - tag in the DS record adds greater assurance than the SHA-1 digest - alone, as there are now two different mapping functions that a KEY RR - must match. - - This format allows concise representation of the keys that the child - will use, thus keeping down the size of the answer for the - delegation, reducing the probability of DNS message overflow. The - SHA-1 hash is strong enough to uniquely identify the key and is - similar to the PGP key footprint. The digest type field is present - for possible future expansion. - - The DS record is well suited to listing trusted keys for islands of - security in configuration files. - -2.5 Presentation Format of the DS Record - - The presentation format of the DS record consists of three numbers - (key tag, algorithm and digest type) followed by the digest itself - presented in hex: - example. DS 12345 3 1 123456789abcdef67890123456789abcdef67890 - -2.6 Transition Issues for Installed Base - - No backwards compatibility with RFC2535 is provided. - - RFC2535-compliant resolvers will assume that all DS-secured - delegations are locally secure. This is bad, but the DNSEXT Working - Group has determined that rather than dealing with both - RFC2535-secured zones and DS-secured zones, a rapid adoption of DS is - preferable. Thus the only option for early adopters is to upgrade to - DS as soon as possible. - -2.6.1 Backwards compatibility with RFC2535 and RFC1035 - - This section documents how a resolver determines the type of - delegation. - RFC1035 delegation (in parent) has: - - RFC1035 NS - - RFC2535 adds the following two cases: - - - -Gudmundsson Expires December 2003 [Page 11] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - Secure RFC2535: NS + NXT + SIG(NXT) - NXT bit map contains: NS SIG NXT - Unsecure RFC2535: NS + KEY + SIG(KEY) + NXT + SIG(NXT) - NXT bit map contains: NS SIG KEY NXT - KEY must be a NULL key. - - DNSSEC with DS has the following two states: - - Secure DS: NS + DS + SIG(DS) - NXT bit map contains: NS SIG NXT DS - Unsecure DS: NS + NXT + SIG(NXT) - NXT bit map contains: NS SIG NXT - - It is difficult for a resolver to determine if a delegation is secure - RFC 2535 or unsecure DS. This could be overcome by adding a flag to - the NXT bit map, but only upgraded resolvers would understand this - flag, anyway. Having both parent and child signatures for a KEY RRset - might allow old resolvers to accept a zone as secure, but the cost of - doing this for a long time is much higher than just prohibiting RFC - 2535-style signatures at child zone apexes and forcing rapid - deployment of DS-enabled servers and resolvers. - - RFC 2535 and DS can in theory be deployed in parallel, but this would - require resolvers to deal with RFC 2535 configurations forever. This - document obsoletes the NULL KEY in parent zones, which is a difficult - enough change that a flag day is required. - -2.7 KEY and corresponding DS record example - - This is an example of a KEY record and the corresponding DS record. - - dskey.example. KEY 256 3 1 ( - AQPwHb4UL1U9RHaU8qP+Ts5bVOU1s7fYbj2b3CCbzNdj - 4+/ECd18yKiyUQqKqQFWW5T3iVc8SJOKnueJHt/Jb/wt - ) ; key id = 28668 - DS 28668 1 1 49FD46E6C4B45C55D4AC69CBD3CD34AC1AFE51DE - - - - - - - - - - - - - - - - -Gudmundsson Expires December 2003 [Page 12] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - -3 Resolver - -3.1 DS Example - - To create a chain of trust, a resolver goes from trusted KEY to DS to - KEY. - - Assume the key for domain "example." is trusted. Zone "example." - contains at least the following records: - example. SOA - example. NS ns.example. - example. KEY - example. NXT NS SOA KEY SIG NXT secure.example. - example. SIG(SOA) - example. SIG(NS) - example. SIG(NXT) - example. SIG(KEY) - secure.example. NS ns1.secure.example. - secure.example. DS tag=12345 alg=3 digest_type=1 - secure.example. NXT NS SIG NXT DS unsecure.example. - secure.example. SIG(NXT) - secure.example. SIG(DS) - unsecure.example NS ns1.unsecure.example. - unsecure.example. NXT NS SIG NXT example. - unsecure.example. SIG(NXT) - - In zone "secure.example." following records exist: - secure.example. SOA - secure.example. NS ns1.secure.example. - secure.example. KEY - secure.example. KEY - secure.example. NXT - secure.example. SIG(KEY) - secure.example. SIG(SOA) - secure.example. SIG(NS) - secure.example. SIG(NXT) - - In this example the private key for "example." signs the DS record - for "secure.example.", making that a secure delegation. The DS record - states which key is expected to sign the KEY RRset at - "secure.example.". Here "secure.example." signs its KEY RRset with - the KEY identified in the DS RRset, thus the KEY RRset is validated - and trusted. - - This example has only one DS record for the child, but parents MUST - allow multiple DS records to facilitate key rollover and multiple KEY - algorithms. - - - - - -Gudmundsson Expires December 2003 [Page 13] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - The resolver determines the security status of "unsecure.example." by - examining the parent zone's NXT record for this name. The absence of - the DS bit indicates an unsecure delegation. Note the NXT record - SHOULD only be examined after verifying the corresponding signature. - -3.1 Resolver Cost Estimates for DS Records - - From a RFC2535 resolver point of view, for each delegation followed - to chase down an answer, one KEY RRset has to be verified. - Additional RRsets might also need to be verified based on local - policy (e.g., the contents of the NS RRset). Once the resolver gets - to the appropriate delegation, validating the answer might require - verifying one or more signatures. A simple A record lookup requires - at least N delegations to be verified and one RRset. For a DS-enabled - resolver, the cost is 2N+1. For an MX record, where the target of - the MX record is in the same zone as the MX record, the costs are N+2 - and 2N+2, for RFC 2535 and DS, respectively. In the case of negatives - answer the same ratios hold true. - - The resolver may require an extra query to get the DS record and this - may add to the overall cost of the query, but this is never worse - than chasing down NULL KEY records from the parent in RFC2535 DNSSEC. - - DS adds processing overhead on resolvers and increases the size of - delegation answers, but much less than storing signatures in the - parent zone. - -4 Security Considerations: - - This document proposes a change to the validation chain of KEY - records in DNSSEC. The change is not believed to reduce security in - the overall system. In RFC2535 DNSSEC, the child zone has to - communicate keys to its parent and prudent parents will require some - authentication with that transaction. The modified protocol will - require the same authentication, but allows the child to exert more - local control over its own KEY RRset. - - There is a remote possibility that an attacker could generate a valid - KEY that matches all the DS fields, of a specific DS set, and thus - forge data from the child. This possibility is considered - impractical, as on average more than - 2 ^ (160 - ) - keys would have to be generated before a match would be found. - - An attacker that wants to match any DS record will have to generate - on average at least 2^80 keys. - - The DS record represents a change to the DNSSEC protocol and there is - an installed base of implementations, as well as textbooks on how to - - - -Gudmundsson Expires December 2003 [Page 14] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - - set up secure delegations. Implementations that do not understand the - DS record will not be able to follow the KEY to DS to KEY chain and - will consider all zones secured that way as unsecure. - -5 IANA Considerations: - - IANA needs to allocate an RR type code for DS from the standard RR - type space (type 43 requested). - - IANA needs to open a new registry for the DS RR type for digest - algorithms. Defined types are: - 0 is Reserved, - 1 is SHA-1. - Adding new reservations requires IETF standards action. - -6 Acknowledgments - - Over the last few years a number of people have contributed ideas - that are captured in this document. The core idea of using one key to - sign only the KEY RRset comes from discussions with Bill Manning and - Perry Metzger on how to put in a single root key in all resolvers. - Alexis Yushin, Brian Wellington, Sam Weiler, Paul Vixie, Jakob - Schlyter, Scott Rose, Edward Lewis, Lars-Johan Liman, Matt Larson, - Mark Kosters, Dan Massey, Olaf Kolman, Phillip Hallam-Baker, Miek - Gieben, Havard Eidnes, Donald Eastlake 3rd., Randy Bush, David - Blacka, Steve Bellovin, Rob Austein, Derek Atkins, Roy Arends, Mark - Andrews, Harald Alvestrand, and others have provided useful comments. - -Normative References: - -[RFC1035] P. Mockapetris, ``Domain Names - Implementation and - Specification'', STD 13, RFC 1035, November 1987. - -[RFC2535] D. Eastlake, ``Domain Name System Security Extensions'', RFC - 2535, March 1999. - -[RFC3008] B. Wellington, ``Domain Name System Security (DNSSEC) Signing - Authority'', RFC 3008, November 2000. - -[RFC3090] E. Lewis `` DNS Security Extension Clarification on Zone - Status'', RFC 3090, March 2001. - -[RFC3225] D. Conrad, ``Indicating Resolver Support of DNSSEC'', RFC - 3225, December 2001. - -[RFC3445] D. Massey, S. Rose ``Limiting the scope of the KEY Resource - Record (RR)``, RFC 3445, December 2002. - - - - - -Gudmundsson Expires December 2003 [Page 15] - -INTERNET-DRAFT Delegation Signer Record February 2003 - - -Informational References - -[RFC2181] R. Elz, R. Bush, ``Clarifications to the DNS Specification'', - RFC 2181, July 1997. - -[RFC3226] O. Gudmundsson, ``DNSSEC and IPv6 A6 aware server/resolver - message size requirements'', RFC 3226, December 2001. - -Author Address - - Olafur Gudmundsson - 3821 Village Park Drive - Chevy Chase, MD, 20815 - USA - - -Full Copyright Statement - - Copyright (C) The Internet Society (2003). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." - - - - - - - - - -Gudmundsson Expires December 2003 [Page 16] diff --git a/doc/draft/draft-ietf-dnsext-delegation-signer-15.txt b/doc/draft/draft-ietf-dnsext-delegation-signer-15.txt new file mode 100644 index 0000000000..2164a10a71 --- /dev/null +++ b/doc/draft/draft-ietf-dnsext-delegation-signer-15.txt @@ -0,0 +1,992 @@ + + + + + + + DNSEXT Working Group Olafur Gudmundsson + INTERNET-DRAFT June 2003 + + + Updates: RFC 1035, RFC 2535, RFC 3008, RFC 3090. + + + Delegation Signer Resource Record + + +Status of this Memo + + This document is an Internet-Draft and is in full conformance with + all provisions of Section 10 of RFC2026. + + Internet-Drafts are working documents of the Internet Engineering + Task Force (IETF), its areas, and its working groups. Note that + other groups may also distribute working documents as Internet- + Drafts. + + Internet-Drafts are draft documents valid for a maximum of six months + and may be updated, replaced, or obsoleted by other documents at any + time. It is inappropriate to use Internet-Drafts as reference + material or to cite them other than as ``work in progress.'' + + The list of current Internet-Drafts can be accessed at + http://www.ietf.org/ietf/1id-abstracts.txt + + The list of Internet-Draft Shadow Directories can be accessed at + http://www.ietf.org/shadow.html + + This draft expires on January 19, 2004. + + Copyright Notice + + Copyright (C) The Internet Society (2003). All rights reserved. + + + +Abstract + + The delegation signer (DS) resource record is inserted at a zone cut + (i.e., a delegation point) to indicate that the delegated zone is + digitally signed and that the delegated zone recognizes the indicated + key as a valid zone key for the delegated zone. The DS RR is a + modification to the DNS Security Extensions definition, motivated by + operational considerations. The intent is to use this resource record + as an explicit statement about the delegation, rather than relying on + inference. + + + + Gudmundsson Expires January 2004 [Page 1] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + This document defines the DS RR, gives examples of how it is used and + describes the implications on resolvers. This change is not backwards + compatible with RFC 2535. + This document updates RFC1035, RFC2535, RFC3008 and RFC3090. + + Table of contents + + Status of this Memo . . . . . . . . . . . . . . . . . . . . . . . . 1 + Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 + Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . 2 + 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 1.2 Reserved Words" . . . . . . . . . . . . . . . . . . . . . . . . 4 + 2 Specification of the Delegation key Signer" . . . . . . . . . . . 4 + 2.1 Delegation Signer Record Model" . . . . . . . . . . . . . . . . 4 + 2.2 Protocol Change" . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2.2.1 RFC2535 2.3.4 and 3.4: Special Considerations at + Delegation Points" . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 2.2.1.1 Special processing for DS queries" . . . . . . . . . . . . 6 + 2.2.1.2 Special processing when child and an ancestor share + server" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 + 2.2.1.3 Modification on use of KEY RR in the construction of + Responses" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.2.2 Signer's Name (replaces RFC3008 section 2.7)" . . . . . . . . 9 + 2.2.3 Changes to RFC3090" . . . . . . . . . . . . . . . . . . . . . 9 + 2.2.3.1 RFC3090: Updates to section 1: Introduction" . . . . . . . . 9 + 2.2.3.2 RFC3090 section 2.1: Globally Secured" . . . . . . . . . . . 9 + 2.2.3.3 RFC3090 section 3: Experimental Status." . . . . . . . . . 10 + 2.2.4 NULL KEY elimination" . . . . . . . . . . . . . . . . . . . . 10 + 2.3 Comments on Protocol Changes" . . . . . . . . . . . . . . . . . 10 + 2.4 Wire Format of the DS record" . . . . . . . . . . . . . . . . . 11 + 2.4.1 Justifications for Fields" . . . . . . . . . . . . . . . . . . 12 + 2.5 Presentation Format of the DS Record" . . . . . . . . . . . . . 12 + 2.6 Transition Issues for Installed Base" . . . . . . . . . . . . . 12 + 2.6.1 Backwards compatibility with RFC2535 and RFC1035" . . . . . . 12 + 2.7 KEY and corresponding DS record example" . . . . . . . . . . . . 13 + 3 Resolver" . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 + 3.1 DS Example" . . . . . . . . . . . . . . . . . . . . . . . . . . 14 + 3.2 Resolver Cost Estimates for DS Records" . . . . . . . . . . . . 15 + 4 Security Considerations: " . . . . . . . . . . . . . . . . . . . . 15 + 5 IANA Considerations: " . . . . . . . . . . . . . . . . . . . . . . 16 + 6 Acknowledgments" . . . . . . . . . . . . . . . . . . . . . . . . . 16 + Normative References: " . . . . . . . . . . . . . . . . . . . . . . 16 + Informational References" " . . . . . . . . . . . . . . . . . . . . 17 + Author Address" . . . . . . . . . . . . . . . . . . . . . . . . . . 17 + Full Copyright Statement" . . . . . . . . . . . . . . . . . . . . . 17 + + + + + + + + + + Gudmundsson Expires January 2004 [Page 2] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 1 Introduction + + Familiarity with the DNS system [RFC1035], DNS security extensions + [RFC2535] and DNSSEC terminology [RFC3090] is important. + + Experience shows that when the same data can reside in two + administratively different DNS zones, the data frequently gets out of + sync. The presence of an NS RRset in a zone anywhere other than at + the apex indicates a zone cut or delegation. The RDATA of the NS + RRset specifies the authoritative servers for the delegated or + "child" zone. Based on actual measurements, 10-30% of all delegations + on the Internet have differing NS RRsets at parent and child. There + are a number of reasons for this, including a lack of communication + between parent and child and bogus name servers being listed to meet + registry requirements. + + DNSSEC [RFC2535,RFC3008,RFC3090] specifies that a child zone needs to + have its KEY RRset signed by its parent to create a verifiable chain + of KEYs. There has been some debate on where the signed KEY RRset + should reside, whether at the child [RFC2535] or at the parent. If + the KEY RRset resides at the child, maintaining the signed KEY RRset + in the child requires frequent two-way communication between the two + parties. First the child transmits the KEY RRset to the parent and + then the parent sends the signature(s) to the child. Storing the KEY + RRset at the parent was thought to simplify the communication. + + DNSSEC [RFC2535] requires that the parent store a NULL KEY record for + an unsecure child zone to indicate that the child is unsecure. A NULL + KEY record is a waste: an entire signed RRset is used to communicate + effectively one bit of information--that the child is unsecure. + Chasing down NULL KEY RRsets complicates the resolution process in + many cases, because servers for both parent and child need to be + queried for the KEY RRset if the child server does not return it. + Storing the KEY RRset only in the parent zone simplifies this and + would allow the elimination of the NULL KEY RRsets entirely. For + large delegation zones the cost of NULL keys is a significant barrier + to deployment. + + Prior to the restrictions imposed by RFC3445[RFC3445], another + implication of the DNSSEC key model is that the KEY record could be + used to store public keys for other protocols in addition to DNSSEC + keys. There are number of potential problems with this, including: + 1. The KEY RRset can become quite large if many applications and + protocols store their keys at the zone apex. Possible protocols + are IPSEC, HTTP, SMTP, SSH and others that use public key + cryptography. + 2. The KEY RRset may require frequent updates. + 3. The probability of compromised or lost keys, which trigger + emergency key rollover procedures, increases. + + + + Gudmundsson Expires January 2004 [Page 3] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 4. The parent may refuse to sign KEY RRsets with non-DNSSEC zone + keys. + 5. The parent may not meet the child's expectations of turnaround + time for resigning the KEY RRset. + + Given these reasons, SIG@parent isn't any better than SIG/KEY@Child. + + + 1.2 Reserved Words + + The key words "MAY","MAY NOT", "MUST", "MUST NOT", "REQUIRED", + "RECOMMENDED", "SHOULD", and "SHOULD NOT" in this document are to be + interpreted as described in RFC2119. + + 2 Specification of the Delegation key Signer + + This section defines the Delegation Signer (DS) RR type (type code + TBD) and the changes to DNS to accommodate it. + + 2.1 Delegation Signer Record Model + + This document presents a replacement for the DNSSEC KEY record chain + of trust [RFC2535] that uses a new RR that resides only at the + parent. This record identifies the key(s) that the child uses to + self-sign its own KEY RRset. + + Even though DS identifies two roles for KEYs, Key Signing Key (KSK) + and Zone Signing Key (ZSK), there is no requirement that zone use two + different keys for these roles. It is expected that many small zones + will only use one key, while larger zones will be more likely to use + multiple keys. + + The chain of trust is now established by verifying the parent KEY + RRset, the DS RRset from the parent and the KEY RRset at the child. + This is cryptographically equivalent to using just KEY records. + + Communication between the parent and child is greatly reduced, since + the child only needs to notify the parent about changes in keys that + sign its apex KEY RRset. The parent is ignorant of all other keys in + the child's apex KEY RRset. Furthermore, the child maintains full + control over the apex KEY RRset and its content. The child can + maintain any policies regarding its KEY usage for DNSSEC with minimal + impact on the parent. Thus if the child wants to have frequent key + rollover for its DNS zone keys, the parent does not need to be aware + of it. The child can use one key to sign only its apex KEY RRset and + a different key to sign the other RRsets in the zone. + + This model fits well with a slow roll out of DNSSEC and the islands + of security model. In this model, someone who trusts "good.example." + + + + Gudmundsson Expires January 2004 [Page 4] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + can preconfigure a key from "good.example." as a trusted key, and + from then on trusts any data signed by that key or that has a chain + of trust to that key. If "example." starts advertising DS records, + "good.example." does not have to change operations by suspending + self-signing. DS records can be used in configuration files to + identify trusted keys instead of KEY records. Another significant + advantage is that the amount of information stored in large + delegation zones is reduced: rather than the NULL KEY record at every + unsecure delegation demanded by RFC 2535, only secure delegations + require additional information in the form of a signed DS RRset. + + The main disadvantage of this approach is that verifying a zone's KEY + RRset requires two signature verification operations instead of the + one in RFC 2535 chain of trust. There is no impact on the number of + signatures verified for other types of RRsets. + + 2.2 Protocol Change + + All DNS servers and resolvers that support DS MUST support the OK bit + [RFC3225] and a larger message size [RFC3226]. In order for a + delegation to be considered secure the delegation MUST contain a DS + RRset. If a query contains the OK bit, a server returning a referral + for the delegation MUST include the following RRsets in the authority + section in this order: + If DS RRset is present: + parent's copy of child's NS RRset + DS and SIG(DS) + If no DS RRset is present: + parent's copy of child's NS RRset + parent's zone NXT and SIG(NXT) + + This increases the size of referral messages, possibly causing some + or all glue to be omitted. If the DS or NXT RRsets with signatures do + not fit in the DNS message, the TC bit MUST be set. Additional + section processing is not changed. + + A DS RRset accompanying a NS RRset indicates that the child zone is + secure. If a NS RRset exists without a DS RRset, the child zone is + unsecure (from the parents point of view). DS RRsets MUST NOT appear + at non-delegation points or at a zone's apex. + + Section 2.2.1 defines special considerations related to authoritative + servers responding to DS queries and replaces RFC2535 sections 2.3.4 + and 3.4. Section 2.2.2 replaces RFC3008 section 2.7, and section + 2.2.3 updates RFC3090. + + + + + + + + Gudmundsson Expires January 2004 [Page 5] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 2.2.1 RFC2535 2.3.4 and 3.4: Special Considerations at Delegation Points + + DNS security views each zone as a unit of data completely under the + control of the zone owner with each entry (RRset) signed by a special + private key held by the zone manager. But the DNS protocol views the + leaf nodes in a zone that are also the apex nodes of a child zone + (i.e., delegation points) as "really" belonging to the child zone. + The corresponding domain names appear in two master files and might + have RRsets signed by both the parent and child zones' keys. A + retrieval could get a mixture of these RRsets and SIGs, especially + since one server could be serving both the zone above and below a + delegation point [RFC 2181]. + + Each DS RRset stored in the parent zone MUST be signed by at least + one of the parent zone's private keys. The parent zone MUST NOT + contain a KEY RRset at any delegation point. Delegations in the + parent MAY contain only the following RR types: NS, DS, NXT and SIG. + The NS RRset MUST NOT be signed. The NXT RRset is the exceptional + case: it will always appear differently and authoritatively in both + the parent and child zones if both are secure. + + A secure zone MUST contain a self-signed KEY RRset at its apex. Upon + verifying the DS RRset from the parent, a resolver MAY trust any KEY + identified in the DS RRset as a valid signer of the child's apex KEY + RRset. Resolvers configured to trust one of the keys signing the KEY + RRset MAY now treat any data signed by the zone keys in the KEY RRset + as secure. In all other cases resolvers MUST consider the zone + unsecure. A DS RRset MUST NOT appear at a zone's apex. + + An authoritative server queried for type DS MUST return the DS RRset + in the answer section. + + + 2.2.1.1 Special processing for DS queries + + When a server is authoritative for the parent zone at a delegation + point and receives a query for the DS record at that name, it MUST + answer based on data in the parent zone, return DS or negative + answer. This is true whether or not it is also authoritative for the + child zone. + + When the server is authoritative for the child zone at a delegation + point but not the parent zone, there is no natural response, since + the child zone is not authoritative for the DS record at the zone's + apex. As these queries are only expected to originate from recursive + servers which are not DS-aware, the authoritative server MUST answer + with: + RCODE: NOERROR + AA bit: set + + + + Gudmundsson Expires January 2004 [Page 6] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + Answer Section: Empty + Authority Section: SOA [+ SIG(SOA) + NXT + SIG(NXT)] + + That is, it answers as if it is authoritative and the DS record does + not exist. DS-aware recursive servers will query the parent zone at + delegation points, so will not be affected by this. + + A server authoritative for only the child zone, that is also a + caching server MAY (if the RD bit is set in the query) perform + recursion to find the DS record at the delegation point, or MAY + return the DS record from its cache. In this case, the AA bit MUST + not be set in the response. + + + 2.2.1.2 Special processing when child and an ancestor share server + + Special rules are needed to permit DS RR aware servers to gracefully + interact with older caches which otherwise might falsely label a + server as lame because of the placement of the DS RR set. + + Such a situation might arise when a server is authoritative for both + a zone and it's grandparent, but not the parent. This sounds like an + obscure example, but it is very real. The root zone is currently + served on 13 machines, and "root-servers.net." is served on 4 of the + same 13, but "net." is served elsewhere. + + When a server receives a query for (, DS, ), the + response MUST be determined from reading these rules in order: + + + 1) If the server is authoritative for the zone that holds the DS RR + set (i.e., the zone that delegates , aka the "parent" zone), + the response contains the DS RR set as an authoritative answer. + + 2) If the server is offering recursive service and the RD bit is set + in the query, the server performs the query itself (according to the + rules for resolvers described below) and returns its findings. + + 3) If the server is authoritative for the zone that holds the + 's SOA RR set, the response is an authoritative negative + answer as described in 2.2.1.1. + + 4) If the server is authoritative for a zone or zones above the + QNAME, a referral to the most enclosing zone's servers is made. + + 5) If the server is not authoritative for any part of the QNAME, a + response indicating a lame server for QNAME is given. + + + + + + Gudmundsson Expires January 2004 [Page 7] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + Using these rules will require some special processing on the part of + a DS RR aware resolver. To illustrate this, an example is used. + + Assuming a server is authoritative for roots.example.net. and for the + root zone but not the intervening two zones (or the intervening two + label deep zone). Assume that QNAME=roots.example.net., QTYPE=DS, + and QCLASS=IN. + + The resolver will issue this request (assuming no cached data) + expecting a referral to a net. server. Instead, rule number 3 above + applies and a negative answer is returned by the server. The + reaction by the resolver is not to accept this answer as final as it + can determine from the SOA RR in the negative answer the context + within which the server has answered. + + A solution to this is to instruct the resolver to hunt for the + authoritative zone of the data in a brute force manner. + + This can be accomplished by taking the owner name of the returned SOA + RR and striping off enough left-hand labels until a successful NS + response is obtained. A successful response here means that the + answer has NS records in it. (Entertaining the possibility that a + cut point can be two labels down in a zone.) + + Returning to the example, the response will include a negative answer + with either the SOA RR for "roots.example.net." or "example.net." + depending on whether roots.example.net is a delegated domain. In + either case, removing the left most label of the SOA owner name will + lead to the location of the desired data. + + + 2.2.1.3 Modification on use of KEY RR in the construction of Responses + + This section updates RFC2535 section 3.5 by replacing it with the + following: + + A query for KEY RR MUST NOT trigger any additional section + processing. Security aware resolvers will include corresponding SIG + records in the answer section. + + KEY records SHOULD NOT be added to the additional records section in + response to any query. + + RFC2535 specified that KEY records be added to the additional section + when SOA or NS records where included in an answer. This was done to + reduce round trips (in the case of SOA) and to force out NULL KEYs + (in the NS case). As this document obsoletes NULL keys there is no + need for the inclusion of KEYs with NSs. Furthermore as SOAs are + included in the authority section of negative answers, including the + + + + Gudmundsson Expires January 2004 [Page 8] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + KEYs each time will cause redundant transfers of KEYs. + + RFC2535 section 3.5 also included rule for adding the KEY RRset to + the response for a query for A and AAAA types. As Restrict + KEY[RFC3445] eliminated use of KEY RR by all applications this rule + is no longer needed. + + + 2.2.2 Signer's Name (replaces RFC3008 section 2.7) + + The signer's name field of a SIG RR MUST contain the name of the zone + to which the data and signature belong. The combination of signer's + name, key tag, and algorithm MUST identify a zone key if the SIG is + to be considered material. This document defines a standard policy + for DNSSEC validation; local policy MAY override the standard policy. + + There are no restrictions on the signer field of a SIG(0) record. + The combination of signer's name, key tag, and algorithm MUST + identify a key if this SIG(0) is to be processed. + + + 2.2.3 Changes to RFC3090 + + A number of sections of RFC3090 need to be updated to reflect the DS + record. + + + 2.2.3.1 RFC3090: Updates to section 1: Introduction + + Most of the text is still relevant but the words ``NULL key'' are to + be replaced with ``missing DS RRset''. In section 1.3 the last three + paragraphs discuss the confusion in sections of RFC 2535 that are + replaced in section 2.2.1 above. Therefore, these paragraphs are now + obsolete. + + + 2.2.3.2 RFC3090 section 2.1: Globally Secured + + Rule 2.1.b is replaced by the following rule: + + 2.1.b. The KEY RRset at a zone's apex MUST be self-signed by a + private key whose public counterpart MUST appear in a zone signing + KEY RR (2.a) owned by the zone's apex and specifying a mandatory-to- + implement algorithm. This KEY RR MUST be identified by a DS RR in a + signed DS RRset in the parent zone. + + If a zone cannot get its parent to advertise a DS record for it, the + child zone cannot be considered globally secured. The only exception + to this is the root zone, for which there is no parent zone. + + + + Gudmundsson Expires January 2004 [Page 9] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 2.2.3.3 RFC3090 section 3: Experimental Status. + + The only difference between experimental status and globally secured + is the missing DS RRset in the parent zone. All locally secured zones + are experimental. + + + 2.2.4 NULL KEY elimination + + RFC3445 section 3 eliminates the top two bits in the flags field of + KEY RR. These two bits were used to indicate NULL KEY or NO KEY. + RFC3090 defines that zone is either secure or not, these rules + eliminates the possible need to put NULL keys in the zone apex to + indicate that the zone is not secured for a algorithm. Along with + this document these other two eliminate all uses for the NULL KEY, + This document obsoletes NULL KEY. + + 2.3 Comments on Protocol Changes + + Over the years there have been various discussions surrounding the + DNS delegation model, declaring it to be broken because there is no + good way to assert if a delegation exists. In the RFC2535 version of + DNSSEC, the presence of the NS bit in the NXT bit map proves there is + a delegation at this name. Something more explicit is needed and the + DS record addresses this need for secure delegations. + + The DS record is a major change to DNS: it is the first resource + record that can appear only on the upper side of a delegation. Adding + it will cause interoperabilty problems and requires a flag day for + DNSSEC. Many old servers and resolvers MUST be upgraded to take + advantage of DS. Some old servers will be able to be authoritative + for zones with DS records but will not add the NXT or DS records to + the authority section. The same is true for caching servers; in + fact, some might even refuse to pass on the DS or NXT records. + + + + + + + + + + + + + + + + + + + Gudmundsson Expires January 2004 [Page 10] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 2.4 Wire Format of the DS record + + The DS (type=TDB) record contains these fields: key tag, algorithm, + digest type, and the digest of a public key KEY record that is + allowed and/or used to sign the child's apex KEY RRset. Other keys + MAY sign the child's apex KEY RRset. + + 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | key tag | algorithm | Digest type | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | digest (length depends on type) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | (SHA-1 digest is 20 bytes) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + The key tag is calculated as specified in RFC2535. Algorithm MUST be + an algorithm number assigned in the range 1..251 and the algorithm + MUST be allowed to sign DNS data. The digest type is an identifier + for the digest algorithm used. The digest is calculated over the + canonical name of the delegated domain name followed by the whole + RDATA of the KEY record (all four fields). + + digest = hash( canonical FQDN on KEY RR | KEY_RR_rdata) + + KEY_RR_rdata = Flags | Protocol | Algorithm | Public Key + + Digest type value 0 is reserved, value 1 is SHA-1, and reserving + other types requires IETF standards action. For interoperabilty + reasons, keeping number of digest algorithms low is strongly + RECOMMENDED. The only reason to reserve additional digest types is + to increase security. + + DS records MUST point to zone KEY records that are allowed to + authenticate DNS data. The indicated KEY records protocol field MUST + be set to 3; flag field bit 7 MUST be set to 1. The value of other + flag bits is not significant for the purposes of this document. + + The size of the DS RDATA for type 1 (SHA-1) is 24 bytes, regardless + of key size. New digest types probably will have larger digests. + + + + + + Gudmundsson Expires January 2004 [Page 11] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 2.4.1 Justifications for Fields + + The algorithm and key tag fields are present to allow resolvers to + quickly identify the candidate KEY records to examine. SHA-1 is a + strong cryptographic checksum: it is computationally infeasible for + an attacker to generate a KEY record that has the same SHA-1 digest. + Combining the name of the key and the key rdata as input to the + digest provides stronger assurance of the binding. Having the key + tag in the DS record adds greater assurance than the SHA-1 digest + alone, as there are now two different mapping functions. + + This format allows concise representation of the keys that the child + will use, thus keeping down the size of the answer for the + delegation, reducing the probability of DNS message overflow. The + SHA-1 hash is strong enough to uniquely identify the key and is + similar to the PGP key footprint. The digest type field is present + for possible future expansion. + + The DS record is well suited to listing trusted keys for islands of + security in configuration files. + + 2.5 Presentation Format of the DS Record + + The presentation format of the DS record consists of three numbers + (key tag, algorithm and digest type) followed by the digest itself + presented in hex: + example. DS 12345 3 1 123456789abcdef67890123456789abcdef67890 + + 2.6 Transition Issues for Installed Base + + No backwards compatibility with RFC2535 is provided. + + RFC2535-compliant resolvers will assume that all DS-secured + delegations are locally secure. This is bad, but the DNSEXT Working + Group has determined that rather than dealing with both + RFC2535-secured zones and DS-secured zones, a rapid adoption of DS is + preferable. Thus the only option for early adopters is to upgrade to + DS as soon as possible. + + 2.6.1 Backwards compatibility with RFC2535 and RFC1035 + + This section documents how a resolver determines the type of + delegation. + RFC1035 delegation (in parent) has: + + RFC1035 NS + + RFC2535 adds the following two cases: + + + + + Gudmundsson Expires January 2004 [Page 12] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + Secure RFC2535: NS + NXT + SIG(NXT) + NXT bit map contains: NS SIG NXT + Unsecure RFC2535: NS + KEY + SIG(KEY) + NXT + SIG(NXT) + NXT bit map contains: NS SIG KEY NXT + KEY must be a NULL key. + + DNSSEC with DS has the following two states: + + Secure DS: NS + DS + SIG(DS) + NXT bit map contains: NS SIG NXT DS + Unsecure DS: NS + NXT + SIG(NXT) + NXT bit map contains: NS SIG NXT + + It is difficult for a resolver to determine if a delegation is secure + RFC 2535 or unsecure DS. This could be overcome by adding a flag to + the NXT bit map, but only upgraded resolvers would understand this + flag, anyway. Having both parent and child signatures for a KEY RRset + might allow old resolvers to accept a zone as secure, but the cost of + doing this for a long time is much higher than just prohibiting RFC + 2535-style signatures at child zone apexes and forcing rapid + deployment of DS-enabled servers and resolvers. + + RFC 2535 and DS can in theory be deployed in parallel, but this would + require resolvers to deal with RFC 2535 configurations forever. This + document obsoletes the NULL KEY in parent zones, which is a difficult + enough change that to cause a flag day. + + 2.7 KEY and corresponding DS record example + + This is an example of a KEY record and the corresponding DS record. + + dskey.example. KEY 256 3 1 ( + AQPwHb4UL1U9RHaU8qP+Ts5bVOU1s7fYbj2b3CCbzNdj + 4+/ECd18yKiyUQqKqQFWW5T3iVc8SJOKnueJHt/Jb/wt + ) ; key id = 28668 + DS 28668 1 1 49FD46E6C4B45C55D4AC69CBD3CD34AC1AFE51DE + + + + + + + + + + + + + + + + + Gudmundsson Expires January 2004 [Page 13] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + 3 Resolver + + 3.1 DS Example + + To create a chain of trust, a resolver goes from trusted KEY to DS to + KEY. + + Assume the key for domain "example." is trusted. Zone "example." + contains at least the following records: + example. SOA + example. NS ns.example. + example. KEY + example. NXT NS SOA KEY SIG NXT secure.example. + example. SIG(SOA) + example. SIG(NS) + example. SIG(NXT) + example. SIG(KEY) + secure.example. NS ns1.secure.example. + secure.example. DS tag=12345 alg=3 digest_type=1 + secure.example. NXT NS SIG NXT DS unsecure.example. + secure.example. SIG(NXT) + secure.example. SIG(DS) + unsecure.example NS ns1.unsecure.example. + unsecure.example. NXT NS SIG NXT example. + unsecure.example. SIG(NXT) + + In zone "secure.example." following records exist: + secure.example. SOA + secure.example. NS ns1.secure.example. + secure.example. KEY + secure.example. KEY + secure.example. NXT + secure.example. SIG(KEY) + secure.example. SIG(SOA) + secure.example. SIG(NS) + secure.example. SIG(NXT) + + In this example the private key for "example." signs the DS record + for "secure.example.", making that a secure delegation. The DS record + states which key is expected to sign the KEY RRset at + "secure.example.". Here "secure.example." signs its KEY RRset with + the KEY identified in the DS RRset, thus the KEY RRset is validated + and trusted. + + This example has only one DS record for the child, but parents MUST + allow multiple DS records to facilitate key rollover and multiple KEY + algorithms. + + + + + + Gudmundsson Expires January 2004 [Page 14] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + The resolver determines the security status of "unsecure.example." by + examining the parent zone's NXT record for this name. The absence of + the DS bit indicates an unsecure delegation. Note the NXT record + SHOULD only be examined after verifying the corresponding signature. + + 3.2 Resolver Cost Estimates for DS Records + + From a RFC2535 resolver point of view, for each delegation followed + to chase down an answer, one KEY RRset has to be verified. + Additional RRsets might also need to be verified based on local + policy (e.g., the contents of the NS RRset). Once the resolver gets + to the appropriate delegation, validating the answer might require + verifying one or more signatures. A simple A record lookup requires + at least N delegations to be verified and one RRset. For a DS-enabled + resolver, the cost is 2N+1. For an MX record, where the target of + the MX record is in the same zone as the MX record, the costs are N+2 + and 2N+2, for RFC 2535 and DS, respectively. In the case of negatives + answer the same ratios hold true. + + The resolver have to do an extra query to get the DS record and this + increases the overall cost of resolving this question, but this is + never worse than chasing down NULL KEY records from the parent in + RFC2535 DNSSEC. + + DS adds processing overhead on resolvers and increases the size of + delegation answers, but much less than storing signatures in the + parent zone. + + 4 Security Considerations: + + This document proposes a change to the validation chain of KEY + records in DNSSEC. The change is not believed to reduce security in + the overall system. In RFC2535 DNSSEC, the child zone has to + communicate keys to its parent and prudent parents will require some + authentication with that transaction. The modified protocol will + require the same authentication, but allows the child to exert more + local control over its own KEY RRset. + + There is a remote possibility that an attacker could generate a valid + KEY that matches all the DS fields, of a specific DS set, and thus + forge data from the child. This possibility is considered + impractical, as on average more than + 2 ^ (160 - ) + keys would have to be generated before a match would be found. + + An attacker that wants to match any DS record will have to generate + on average at least 2^80 keys. + + + + + + Gudmundsson Expires January 2004 [Page 15] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + The DS record represents a change to the DNSSEC protocol and there is + an installed base of implementations, as well as textbooks on how to + set up secure delegations. Implementations that do not understand the + DS record will not be able to follow the KEY to DS to KEY chain and + will consider all zones secured that way as unsecure. + + 5 IANA Considerations: + + IANA needs to allocate an RR type code for DS from the standard RR + type space (type 43 requested). + + IANA needs to open a new registry for the DS RR type for digest + algorithms. Defined types are: + 0 is Reserved, + 1 is SHA-1. + Adding new reservations requires IETF standards action. + + 6 Acknowledgments + + Over the last few years a number of people have contributed ideas + that are captured in this document. The core idea of using one key to + sign only the KEY RRset comes from discussions with Bill Manning and + Perry Metzger on how to put in a single root key in all resolvers. + Alexis Yushin, Brian Wellington, Sam Weiler, Paul Vixie, Jakob + Schlyter, Scott Rose, Edward Lewis, Lars-Johan Liman, Matt Larson, + Mark Kosters, Dan Massey, Olaf Kolman, Phillip Hallam-Baker, Miek + Gieben, Havard Eidnes, Donald Eastlake 3rd., Randy Bush, David + Blacka, Steve Bellovin, Rob Austein, Derek Atkins, Roy Arends, Mark + Andrews, Harald Alvestrand, and others have provided useful comments. + + Normative References: + + [RFC1035] P. Mockapetris, ``Domain Names - Implementation and + Specification'', STD 13, RFC 1035, November 1987. + + [RFC2535] D. Eastlake, ``Domain Name System Security Extensions'', RFC + 2535, March 1999. + + [RFC3008] B. Wellington, ``Domain Name System Security (DNSSEC) Signing + Authority'', RFC 3008, November 2000. + + [RFC3090] E. Lewis `` DNS Security Extension Clarification on Zone + Status'', RFC 3090, March 2001. + + [RFC3225] D. Conrad, ``Indicating Resolver Support of DNSSEC'', RFC + 3225, December 2001. + + [RFC3445] D. Massey, S. Rose ``Limiting the scope of the KEY Resource + Record (RR)``, RFC 3445, December 2002. + + + + Gudmundsson Expires January 2004 [Page 16] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + Informational References + + [RFC2181] R. Elz, R. Bush, ``Clarifications to the DNS Specification'', + RFC 2181, July 1997. + + [RFC3226] O. Gudmundsson, ``DNSSEC and IPv6 A6 aware server/resolver + message size requirements'', RFC 3226, December 2001. + + Author Address + + Olafur Gudmundsson + 3821 Village Park Drive + Chevy Chase, MD, 20815 + USA + + + Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." + + + + + + + + + + Gudmundsson Expires January 2004 [Page 17] + +INTERNET-DRAFT Delegation Signer Record June 2003 + + + + + + + + + + + + + + + + + Gudmundsson Expires January 2004 [Page 1] From 0cb25226fba18befbe40156c93845f2fc9bf3524 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 20 Jun 2003 02:50:48 +0000 Subject: [PATCH 24/75] 1473. [bug] free_map() and free_string() failed to handle out of memory cleanup. [RT #6813] --- CHANGES | 3 +++ lib/isccfg/parser.c | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 15f83e95a8..0819e9153b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1473. [bug] free_map() and free_string() failed to handle out + of memory cleanup. [RT #6813] + 1472. [contrib] idnkit-1.0 from JPNIC, replaces mdnkit. 1471. [bug] libbind: updated to BIND 8.4.0. diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 905838047a..36ca35c0a9 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: parser.c,v 1.107 2003/04/11 07:25:28 marka Exp $ */ +/* $Id: parser.c,v 1.108 2003/06/20 02:50:48 marka Exp $ */ #include @@ -793,8 +793,9 @@ print_qstring(cfg_printer_t *pctx, cfg_obj_t *obj) { static void free_string(cfg_parser_t *pctx, cfg_obj_t *obj) { - isc_mem_put(pctx->mctx, obj->value.string.base, - obj->value.string.length + 1); + if (obj->value.string.base != NULL) + isc_mem_put(pctx->mctx, obj->value.string.base, + obj->value.string.length + 1); } isc_boolean_t @@ -2231,7 +2232,8 @@ create_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { static void free_map(cfg_parser_t *pctx, cfg_obj_t *obj) { - CLEANUP_OBJ(obj->value.map.id); + if (obj->value.map.id != NULL) + CLEANUP_OBJ(obj->value.map.id); isc_symtab_destroy(&obj->value.map.symtab); } From 7a16f27a5a1804b97ba1d0630f3f948f68e29773 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 21 Jun 2003 22:30:03 +0000 Subject: [PATCH 25/75] new draft --- ...r-03.txt => draft-ietf-ipseckey-rr-04.txt} | 288 +++++++++--------- 1 file changed, 144 insertions(+), 144 deletions(-) rename doc/draft/{draft-ietf-ipseckey-rr-03.txt => draft-ietf-ipseckey-rr-04.txt} (64%) diff --git a/doc/draft/draft-ietf-ipseckey-rr-03.txt b/doc/draft/draft-ietf-ipseckey-rr-04.txt similarity index 64% rename from doc/draft/draft-ietf-ipseckey-rr-03.txt rename to doc/draft/draft-ietf-ipseckey-rr-04.txt index aa39126345..4fec23b2b4 100644 --- a/doc/draft/draft-ietf-ipseckey-rr-03.txt +++ b/doc/draft/draft-ietf-ipseckey-rr-04.txt @@ -2,11 +2,11 @@ IPSECKEY WG M. Richardson Internet-Draft SSW -Expires: November 26, 2003 May 28, 2003 +Expires: December 15, 2003 June 16, 2003 A method for storing IPsec keying material in DNS. - draft-ietf-ipseckey-rr-03.txt + draft-ietf-ipseckey-rr-04.txt Status of this Memo @@ -29,7 +29,7 @@ Status of this Memo The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. - This Internet-Draft will expire on November 26, 2003. + This Internet-Draft will expire on December 15, 2003. Copyright Notice @@ -52,34 +52,34 @@ Abstract -Richardson Expires November 26, 2003 [Page 1] +Richardson Expires December 15, 2003 [Page 1] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 Table of Contents - 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 2. Storage formats . . . . . . . . . . . . . . . . . . . . . . . 4 - 2.1 IPSECKEY RDATA format . . . . . . . . . . . . . . . . . . . . 4 - 2.2 RDATA format - precedence . . . . . . . . . . . . . . . . . . 4 - 2.3 RDATA format - algorithm type . . . . . . . . . . . . . . . . 4 - 2.4 RDATA format - gateway type . . . . . . . . . . . . . . . . . 5 - 2.5 RDATA format - gateway . . . . . . . . . . . . . . . . . . . . 5 - 2.6 RDATA format - RSA public key . . . . . . . . . . . . . . . . 5 - 2.7 RDATA format - DSA public key . . . . . . . . . . . . . . . . 6 - 3. Presentation formats . . . . . . . . . . . . . . . . . . . . . 7 - 3.1 Representation of IPSECKEY RRs . . . . . . . . . . . . . . . . 7 - 3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 - 4.1 Active attacks against unsecured IPSECKEY resource records . . 9 - 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 - 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 - Normative references . . . . . . . . . . . . . . . . . . . . . 13 - Non-normative references . . . . . . . . . . . . . . . . . . . 14 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . 14 - Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15 + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 + 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 2. Storage formats . . . . . . . . . . . . . . . . . . . . . . 4 + 2.1 IPSECKEY RDATA format . . . . . . . . . . . . . . . . . . . 4 + 2.2 RDATA format - precedence . . . . . . . . . . . . . . . . . 4 + 2.3 RDATA format - algorithm type . . . . . . . . . . . . . . . 4 + 2.4 RDATA format - gateway type . . . . . . . . . . . . . . . . 5 + 2.5 RDATA format - gateway . . . . . . . . . . . . . . . . . . . 5 + 2.6 RDATA format - public keys . . . . . . . . . . . . . . . . . 5 + 2.6.1 Example: RSA public keys . . . . . . . . . . . . . . . . . . 6 + 3. Presentation formats . . . . . . . . . . . . . . . . . . . . 7 + 3.1 Representation of IPSECKEY RRs . . . . . . . . . . . . . . . 7 + 3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 7 + 4. Security Considerations . . . . . . . . . . . . . . . . . . 9 + 4.1 Active attacks against unsecured IPSECKEY resource records . 9 + 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . 11 + 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 12 + Normative references . . . . . . . . . . . . . . . . . . . . 13 + Non-normative references . . . . . . . . . . . . . . . . . . 14 + Author's Address . . . . . . . . . . . . . . . . . . . . . . 14 + Full Copyright Statement . . . . . . . . . . . . . . . . . . 15 @@ -108,9 +108,9 @@ Table of Contents -Richardson Expires November 26, 2003 [Page 2] +Richardson Expires December 15, 2003 [Page 2] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 1. Introduction @@ -133,7 +133,7 @@ Internet-Draft ipsecrr May 2003 record is available. It is expected that there will often be multiple IPSECKEY resource - records at the same node. This will be due to the presence of + records at the same name. This will be due to the presence of multiple gateways and the need to rollover keys. This resource record is class independent. @@ -164,9 +164,9 @@ Internet-Draft ipsecrr May 2003 -Richardson Expires November 26, 2003 [Page 3] +Richardson Expires December 15, 2003 [Page 3] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 2. Storage formats @@ -196,35 +196,44 @@ Internet-Draft ipsecrr May 2003 RFC1035 [2]. Gateways listed in IPSECKEY records records with lower precedence - are to be attempted first. Where there is a tie in precedence, they + are to be attempted first. Where there is a tie in precedence, the order should be non-deterministic. 2.3 RDATA format - algorithm type - The algorithm field indicates the type of key that is present in the - public key field. A positive number larger than 0 identifies an - algorithm type. The following values, which have been previously - defined by IANA, are useful (see RFC2535 [8]). + RFC2535 established an IANA registry for DNS Security Algorithm + Numbers, and subsequent documents have specified algorithms and + associated KEY RR formats for use with DNSSEC. Rather than respecify + those formats, this document reuses that registry and the associated + KEY RR formats. + + The algorithm type field identifies the public key's cryptographic + algorithm and determines the format of the public key field. + + The public key field contains the algorithm-specific portion of the + KEY RR RDATA, omitting the first four octets of the KEY RR RDATA. + This is the same portion of the KEY RR that must be specified by + documents that define a DNSSEC algorithm. Those documents also + specify a message digest to be used for generation of SIG RRs; that + specification is not relevant to the IPSECKEY usage of the public key + format. + + + +Richardson Expires December 15, 2003 [Page 4] + +Internet-Draft ipsecrr June 2003 + A value of 0 indicates that no key is present. - The following values defined by IANA are useful: + The following values defined by IANA are legal: 3 A DSA key is present, in the format defined in RFC2536 [9] 5 A RSA key is present, in the format defined in RFC3110 [10] - - - - - -Richardson Expires November 26, 2003 [Page 4] - -Internet-Draft ipsecrr May 2003 - - 2.4 RDATA format - gateway type The gateway type field indicates the format of the information that @@ -261,37 +270,34 @@ Internet-Draft ipsecrr May 2003 The gateway field is a normal wire-encoded domain name, as described in section 3.3 of RFC1035 [2]. -2.6 RDATA format - RSA public key +2.6 RDATA format - public keys - If the algorithm type has the value 5, then public key portion - contains an RSA public key, encoded as described in section 2 of - RFC3110 [10]. - - RFC2065 limited the exponent and modulus to 2552 bits in length, and - RFC3110 limits them to 4096 bits. No such limit is specified here - for the purposes of encoding and decoding. - - The length in octets of the public exponent length is represented as - one octet if it is in the range of 1 to 255, and by a zero octet + There are two defined public key formats: RSA and DSA. No other -Richardson Expires November 26, 2003 [Page 5] +Richardson Expires December 15, 2003 [Page 5] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 - followed by a two octet unsigned length if it is longer than 255 - bytes. The public key modulus field is a multiprecision unsigned - integer. The length of the modulus can be determined from the - RDLENGTH and the preceding RDATA fields including the exponent. + types are supported. - Leading zero bytes are prohibited in the exponent and modulus. +2.6.1 Example: RSA public keys -2.7 RDATA format - DSA public key + Per the DNS Security Algorithm registry, an algorithm type of 5 + identifies an RSA public key, encoded as described in section 2 of + RFC3110. [The encoding of RSA/MD5 KEYs (type 1) specified in RFC2537 + is the same as that defined in RFC3110. For simplicity and in + keeping with RSA/MD5 being NOT RECOMMENDED for DNSSEC, type 1 SHOULD + NOT be used in the IPSECKEY algorithm type.] - If the algorithm type has the value 3, then public key portion - contains an DSA public key, encoded as described in RFC2536 [9]. + The earlier definition of RSA/MD5 (algorithm type 1) in RFC2065 + limited the exponent and modulus to 2552 bits in length. RFC3110 + extended that limit to 4096 bits for RSA/SHA1 keys (type 5). The + IPSECKEY RR imposes no length limit on type 5 public keys, other than + the 65535 octet limit imposed by the two-octet length encoding. This + length extension is applicable only to IPSECKEY and not to KEY RRs. @@ -326,15 +332,9 @@ Internet-Draft ipsecrr May 2003 - - - - - - -Richardson Expires November 26, 2003 [Page 6] +Richardson Expires December 15, 2003 [Page 6] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 3. Presentation formats @@ -342,10 +342,10 @@ Internet-Draft ipsecrr May 2003 3.1 Representation of IPSECKEY RRs IPSECKEY RRs may appears in a zone data master file. The precedence, - gateway type and algorithm and gateway fields are REQUIRED. There + gateway type and algorithm and gateway fields are REQUIRED. The base64 encoded public key block is OPTIONAL; if not present, then the - public key field of the resource record MUST be contrued being zero - octets in length. + public key field of the resource record MUST be construed as being + zero octets in length. If no gateway is to be indicated, then the gateway type field MUST be zero, and the gateway field MUST be "." @@ -361,73 +361,42 @@ Internet-Draft ipsecrr May 2003 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 5 192.0.2.38 - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) + AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) An example of a node, 192.0.2.38 that has published its key only. 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 0 5 . - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) + AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) An example of a node, 192.0.2.38 that has delegated authority to the node 192.0.2.3. 38.2.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 1 5 - - - -Richardson Expires November 26, 2003 [Page 7] - -Internet-Draft ipsecrr May 2003 - - 192.0.2.3 - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) + AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) An example of a node, 192.0.1.38 that has delegated authority to the node with the identity "mygateway.example.com". 38.1.0.192.in-addr.arpa. 7200 IN IPSECKEY ( 10 3 5 mygateway.example.com. - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) + AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) An example of a node, 2001:0DB8:0200:1:210:f3ff:fe03:4d0 that has delegated authority to the node 2001:0DB8:c000:0200:2::1 + + +Richardson Expires December 15, 2003 [Page 7] + +Internet-Draft ipsecrr June 2003 + + $ORIGIN 1.0.0.0.0.0.2.8.B.D.0.1.0.0.2.ip6.int. 0.d.4.0.3.0.e.f.f.f.3.f.0.1.2.0 7200 IN IPSECKEY ( 10 2 5 2001:0DB8:0:8002::2000:1 - AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ - Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La - 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 - 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC - MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 - cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 - fejrfi1H ) + AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) @@ -444,9 +413,40 @@ Internet-Draft ipsecrr May 2003 -Richardson Expires November 26, 2003 [Page 8] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Richardson Expires December 15, 2003 [Page 8] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 4. Security Considerations @@ -469,7 +469,7 @@ Internet-Draft ipsecrr May 2003 of the resulting IPsec session: IPsec and IKE provide for defense against both active and passive attacks. - Any use of this resource record MUST carefully document their trust + Any user of this resource record MUST carefully document their trust model, and why the trust model of DNSSEC is appropriate, if that is the secure channel used. @@ -480,7 +480,7 @@ Internet-Draft ipsecrr May 2003 changed. DNSSEC is designed to defend against attacks of this kind. The first kind of active attack is when the attacker replaces the - keying material with either a key under its control, or with garbage. + keying material with either a key under its control or with garbage. If the attacker is not able to mount a subsequent man-in-the-middle attack on the IKE negotiation after replacing the public key, then @@ -500,9 +500,9 @@ Internet-Draft ipsecrr May 2003 -Richardson Expires November 26, 2003 [Page 9] +Richardson Expires December 15, 2003 [Page 9] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 key or remove it, thus providing an IPSECKEY record of its own to @@ -556,18 +556,19 @@ Internet-Draft ipsecrr May 2003 -Richardson Expires November 26, 2003 [Page 10] +Richardson Expires December 15, 2003 [Page 10] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 5. IANA Considerations - IANA is asked to assign a resource record type number from the normal - resource record number space. + This document updates the IANA Registry for DNS Resource Record Types + by assigning type X to the IPSECKEY record. - The algorithm field does not require any IANA action, as it is - inherited from DNS KEY algorithm values. + The values for the algorithm type field in the IPSECKEY record are + inherited from the DNS Security Algorithm Numbers registry, and this + document makes no changes to that registry. @@ -611,10 +612,9 @@ Internet-Draft ipsecrr May 2003 - -Richardson Expires November 26, 2003 [Page 11] +Richardson Expires December 15, 2003 [Page 11] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 6. Acknowledgments @@ -668,9 +668,9 @@ Internet-Draft ipsecrr May 2003 -Richardson Expires November 26, 2003 [Page 12] +Richardson Expires December 15, 2003 [Page 12] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 Normative references @@ -724,9 +724,9 @@ Normative references -Richardson Expires November 26, 2003 [Page 13] +Richardson Expires December 15, 2003 [Page 13] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 Non-normative references @@ -780,9 +780,9 @@ Author's Address -Richardson Expires November 26, 2003 [Page 14] +Richardson Expires December 15, 2003 [Page 14] -Internet-Draft ipsecrr May 2003 +Internet-Draft ipsecrr June 2003 Full Copyright Statement @@ -836,5 +836,5 @@ Acknowledgement -Richardson Expires November 26, 2003 [Page 15] +Richardson Expires December 15, 2003 [Page 15] From de90c0b2efac159580365beaa761a14bdb74330c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 01:51:11 +0000 Subject: [PATCH 26/75] 3513: Internet Protocol Version 6 (IPv6) Addressing Architecture --- doc/rfc/index | 1 + doc/rfc/rfc3513.txt | 1459 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1460 insertions(+) create mode 100644 doc/rfc/rfc3513.txt diff --git a/doc/rfc/index b/doc/rfc/index index cc5fe2c0a4..57ed3b20d5 100644 --- a/doc/rfc/index +++ b/doc/rfc/index @@ -75,3 +75,4 @@ for Internet Protocol version 6 (IPv6) 3445: Limiting the Scope of the KEY Resource Record (RR) 3493: Basic Socket Interface Extensions for IPv6 +3513: Internet Protocol Version 6 (IPv6) Addressing Architecture diff --git a/doc/rfc/rfc3513.txt b/doc/rfc/rfc3513.txt new file mode 100644 index 0000000000..49c0fa4124 --- /dev/null +++ b/doc/rfc/rfc3513.txt @@ -0,0 +1,1459 @@ + + + + + + +Network Working Group R. Hinden +Request for Comments: 3513 Nokia +Obsoletes: 2373 S. Deering +Category: Standards Track Cisco Systems + April 2003 + + + Internet Protocol Version 6 (IPv6) Addressing Architecture + +Status of this Memo + + This document specifies an Internet standards track protocol for the + Internet community, and requests discussion and suggestions for + improvements. Please refer to the current edition of the "Internet + Official Protocol Standards" (STD 1) for the standardization state + and status of this protocol. Distribution of this memo is unlimited. + +Copyright Notice + + Copyright (C) The Internet Society (2003). All Rights Reserved. + +Abstract + + This specification defines the addressing architecture of the IP + Version 6 (IPv6) protocol. The document includes the IPv6 addressing + model, text representations of IPv6 addresses, definition of IPv6 + unicast addresses, anycast addresses, and multicast addresses, and an + IPv6 node's required addresses. + + + + + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 1] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +Table of Contents + + 1. Introduction.................................................3 + 2. IPv6 Addressing..............................................3 + 2.1 Addressing Model.........................................4 + 2.2 Text Representation of Addresses.........................4 + 2.3 Text Representation of Address Prefixes..................5 + 2.4 Address Type Identification..............................6 + 2.5 Unicast Addresses........................................7 + 2.5.1 Interface Identifiers..............................8 + 2.5.2 The Unspecified Address............................9 + 2.5.3 The Loopback Address...............................9 + 2.5.4 Global Unicast Addresses..........................10 + 2.5.5 IPv6 Addresses with Embedded IPv4 Addresses.......10 + 2.5.6 Local-use IPv6 Unicast Addresses..................11 + 2.6 Anycast Addresses.......................................12 + 2.6.1 Required Anycast Address..........................13 + 2.7 Multicast Addresses.....................................13 + 2.7.1 Pre-Defined Multicast Addresses...................15 + 2.8 A Node's Required Addresses.............................17 + 3. Security Considerations.....................................17 + 4. IANA Considerations.........................................18 + 5. References..................................................19 + 5.1 Normative References....................................19 + 5.2 Informative References..................................19 + APPENDIX A: Creating Modified EUI-64 format Interface IDs......21 + APPENDIX B: Changes from RFC-2373..............................24 + Authors' Addresses.............................................25 + Full Copyright Statement.......................................26 + + + + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 2] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +1. Introduction + + This specification defines the addressing architecture of the IP + Version 6 (IPv6) protocol. It includes the basic formats for the + various types of IPv6 addresses (unicast, anycast, and multicast). + + The authors would like to acknowledge the contributions of Paul + Francis, Scott Bradner, Jim Bound, Brian Carpenter, Matt Crawford, + Deborah Estrin, Roger Fajman, Bob Fink, Peter Ford, Bob Gilligan, + Dimitry Haskin, Tom Harsch, Christian Huitema, Tony Li, Greg + Minshall, Thomas Narten, Erik Nordmark, Yakov Rekhter, Bill Simpson, + Sue Thomson, Markku Savela, and Larry Masinter. + +2. IPv6 Addressing + + IPv6 addresses are 128-bit identifiers for interfaces and sets of + interfaces (where "interface" is as defined in section 2 of [IPV6]). + There are three types of addresses: + + Unicast: An identifier for a single interface. A packet sent to a + unicast address is delivered to the interface identified + by that address. + + Anycast: An identifier for a set of interfaces (typically belonging + to different nodes). A packet sent to an anycast address + is delivered to one of the interfaces identified by that + address (the "nearest" one, according to the routing + protocols' measure of distance). + + Multicast: An identifier for a set of interfaces (typically belonging + to different nodes). A packet sent to a multicast address + is delivered to all interfaces identified by that address. + + There are no broadcast addresses in IPv6, their function being + superseded by multicast addresses. + + In this document, fields in addresses are given a specific name, for + example "subnet". When this name is used with the term "ID" for + identifier after the name (e.g., "subnet ID"), it refers to the + contents of the named field. When it is used with the term "prefix" + (e.g., "subnet prefix") it refers to all of the address from the left + up to and including this field. + + In IPv6, all zeros and all ones are legal values for any field, + unless specifically excluded. Specifically, prefixes may contain, or + end with, zero-valued fields. + + + + + +Hinden & Deering Standards Track [Page 3] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +2.1 Addressing Model + + IPv6 addresses of all types are assigned to interfaces, not nodes. + An IPv6 unicast address refers to a single interface. Since each + interface belongs to a single node, any of that node's interfaces' + unicast addresses may be used as an identifier for the node. + + All interfaces are required to have at least one link-local unicast + address (see section 2.8 for additional required addresses). A + single interface may also have multiple IPv6 addresses of any type + (unicast, anycast, and multicast) or scope. Unicast addresses with + scope greater than link-scope are not needed for interfaces that are + not used as the origin or destination of any IPv6 packets to or from + non-neighbors. This is sometimes convenient for point-to-point + interfaces. There is one exception to this addressing model: + + A unicast address or a set of unicast addresses may be assigned to + multiple physical interfaces if the implementation treats the + multiple physical interfaces as one interface when presenting it + to the internet layer. This is useful for load-sharing over + multiple physical interfaces. + + Currently IPv6 continues the IPv4 model that a subnet prefix is + associated with one link. Multiple subnet prefixes may be assigned + to the same link. + +2.2 Text Representation of Addresses + + There are three conventional forms for representing IPv6 addresses as + text strings: + + 1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are the + hexadecimal values of the eight 16-bit pieces of the address. + + Examples: + + FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 + + 1080:0:0:0:8:800:200C:417A + + Note that it is not necessary to write the leading zeros in an + individual field, but there must be at least one numeral in every + field (except for the case described in 2.). + + 2. Due to some methods of allocating certain styles of IPv6 + addresses, it will be common for addresses to contain long strings + of zero bits. In order to make writing addresses containing zero + bits easier a special syntax is available to compress the zeros. + + + +Hinden & Deering Standards Track [Page 4] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + The use of "::" indicates one or more groups of 16 bits of zeros. + The "::" can only appear once in an address. The "::" can also be + used to compress leading or trailing zeros in an address. + + For example, the following addresses: + + 1080:0:0:0:8:800:200C:417A a unicast address + FF01:0:0:0:0:0:0:101 a multicast address + 0:0:0:0:0:0:0:1 the loopback address + 0:0:0:0:0:0:0:0 the unspecified addresses + + may be represented as: + + 1080::8:800:200C:417A a unicast address + FF01::101 a multicast address + ::1 the loopback address + :: the unspecified addresses + + 3. An alternative form that is sometimes more convenient when dealing + with a mixed environment of IPv4 and IPv6 nodes is + x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of + the six high-order 16-bit pieces of the address, and the 'd's are + the decimal values of the four low-order 8-bit pieces of the + address (standard IPv4 representation). Examples: + + 0:0:0:0:0:0:13.1.68.3 + + 0:0:0:0:0:FFFF:129.144.52.38 + + or in compressed form: + + ::13.1.68.3 + + ::FFFF:129.144.52.38 + +2.3 Text Representation of Address Prefixes + + The text representation of IPv6 address prefixes is similar to the + way IPv4 addresses prefixes are written in CIDR notation [CIDR]. An + IPv6 address prefix is represented by the notation: + + ipv6-address/prefix-length + + where + + ipv6-address is an IPv6 address in any of the notations listed + in section 2.2. + + + + +Hinden & Deering Standards Track [Page 5] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + prefix-length is a decimal value specifying how many of the + leftmost contiguous bits of the address comprise + the prefix. + + For example, the following are legal representations of the 60-bit + prefix 12AB00000000CD3 (hexadecimal): + + 12AB:0000:0000:CD30:0000:0000:0000:0000/60 + 12AB::CD30:0:0:0:0/60 + 12AB:0:0:CD30::/60 + + The following are NOT legal representations of the above prefix: + + 12AB:0:0:CD3/60 may drop leading zeros, but not trailing zeros, + within any 16-bit chunk of the address + + 12AB::CD30/60 address to left of "/" expands to + 12AB:0000:0000:0000:0000:000:0000:CD30 + + 12AB::CD3/60 address to left of "/" expands to + 12AB:0000:0000:0000:0000:000:0000:0CD3 + + When writing both a node address and a prefix of that node address + (e.g., the node's subnet prefix), the two can combined as follows: + + the node address 12AB:0:0:CD30:123:4567:89AB:CDEF + and its subnet number 12AB:0:0:CD30::/60 + + can be abbreviated as 12AB:0:0:CD30:123:4567:89AB:CDEF/60 + +2.4 Address Type Identification + + The type of an IPv6 address is identified by the high-order bits of + the address, as follows: + + Address type Binary prefix IPv6 notation Section + ------------ ------------- ------------- ------- + Unspecified 00...0 (128 bits) ::/128 2.5.2 + Loopback 00...1 (128 bits) ::1/128 2.5.3 + Multicast 11111111 FF00::/8 2.7 + Link-local unicast 1111111010 FE80::/10 2.5.6 + Site-local unicast 1111111011 FEC0::/10 2.5.6 + Global unicast (everything else) + + Anycast addresses are taken from the unicast address spaces (of any + scope) and are not syntactically distinguishable from unicast + addresses. + + + + +Hinden & Deering Standards Track [Page 6] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + The general format of global unicast addresses is described in + section 2.5.4. Some special-purpose subtypes of global unicast + addresses which contain embedded IPv4 addresses (for the purposes of + IPv4-IPv6 interoperation) are described in section 2.5.5. + + Future specifications may redefine one or more sub-ranges of the + global unicast space for other purposes, but unless and until that + happens, implementations must treat all addresses that do not start + with any of the above-listed prefixes as global unicast addresses. + +2.5 Unicast Addresses + + IPv6 unicast addresses are aggregable with prefixes of arbitrary + bit-length similar to IPv4 addresses under Classless Interdomain + Routing. + + There are several types of unicast addresses in IPv6, in particular + global unicast, site-local unicast, and link-local unicast. There + are also some special-purpose subtypes of global unicast, such as + IPv6 addresses with embedded IPv4 addresses or encoded NSAP + addresses. Additional address types or subtypes can be defined in + the future. + + IPv6 nodes may have considerable or little knowledge of the internal + structure of the IPv6 address, depending on the role the node plays + (for instance, host versus router). At a minimum, a node may + consider that unicast addresses (including its own) have no internal + structure: + + | 128 bits | + +-----------------------------------------------------------------+ + | node address | + +-----------------------------------------------------------------+ + + A slightly sophisticated host (but still rather simple) may + additionally be aware of subnet prefix(es) for the link(s) it is + attached to, where different addresses may have different values for + n: + + | n bits | 128-n bits | + +------------------------------------------------+----------------+ + | subnet prefix | interface ID | + +------------------------------------------------+----------------+ + + Though a very simple router may have no knowledge of the internal + structure of IPv6 unicast addresses, routers will more generally have + knowledge of one or more of the hierarchical boundaries for the + operation of routing protocols. The known boundaries will differ + + + +Hinden & Deering Standards Track [Page 7] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + from router to router, depending on what positions the router holds + in the routing hierarchy. + +2.5.1 Interface Identifiers + + Interface identifiers in IPv6 unicast addresses are used to identify + interfaces on a link. They are required to be unique within a subnet + prefix. It is recommended that the same interface identifier not be + assigned to different nodes on a link. They may also be unique over + a broader scope. In some cases an interface's identifier will be + derived directly from that interface's link-layer address. The same + interface identifier may be used on multiple interfaces on a single + node, as long as they are attached to different subnets. + + Note that the uniqueness of interface identifiers is independent of + the uniqueness of IPv6 addresses. For example, a global unicast + address may be created with a non-global scope interface identifier + and a site-local address may be created with a global scope interface + identifier. + + For all unicast addresses, except those that start with binary value + 000, Interface IDs are required to be 64 bits long and to be + constructed in Modified EUI-64 format. + + Modified EUI-64 format based Interface identifiers may have global + scope when derived from a global token (e.g., IEEE 802 48-bit MAC or + IEEE EUI-64 identifiers [EUI64]) or may have local scope where a + global token is not available (e.g., serial links, tunnel end-points, + etc.) or where global tokens are undesirable (e.g., temporary tokens + for privacy [PRIV]). + + Modified EUI-64 format interface identifiers are formed by inverting + the "u" bit (universal/local bit in IEEE EUI-64 terminology) when + forming the interface identifier from IEEE EUI-64 identifiers. In + the resulting Modified EUI-64 format the "u" bit is set to one (1) to + indicate global scope, and it is set to zero (0) to indicate local + scope. The first three octets in binary of an IEEE EUI-64 identifier + are as follows: + + 0 0 0 1 1 2 + |0 7 8 5 6 3| + +----+----+----+----+----+----+ + |cccc|ccug|cccc|cccc|cccc|cccc| + +----+----+----+----+----+----+ + + written in Internet standard bit-order , where "u" is the + universal/local bit, "g" is the individual/group bit, and "c" are the + bits of the company_id. Appendix A: "Creating Modified EUI-64 format + + + +Hinden & Deering Standards Track [Page 8] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + Interface Identifiers" provides examples on the creation of Modified + EUI-64 format based interface identifiers. + + The motivation for inverting the "u" bit when forming an interface + identifier is to make it easy for system administrators to hand + configure non-global identifiers when hardware tokens are not + available. This is expected to be case for serial links, tunnel end- + points, etc. The alternative would have been for these to be of the + form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler 1, 2, + etc. + + The use of the universal/local bit in the Modified EUI-64 format + identifier is to allow development of future technology that can take + advantage of interface identifiers with global scope. + + The details of forming interface identifiers are defined in the + appropriate "IPv6 over " specification such as "IPv6 over + Ethernet" [ETHER], "IPv6 over FDDI" [FDDI], etc. + +2.5.2 The Unspecified Address + + The address 0:0:0:0:0:0:0:0 is called the unspecified address. It + must never be assigned to any node. It indicates the absence of an + address. One example of its use is in the Source Address field of + any IPv6 packets sent by an initializing host before it has learned + its own address. + + The unspecified address must not be used as the destination address + of IPv6 packets or in IPv6 Routing Headers. An IPv6 packet with a + source address of unspecified must never be forwarded by an IPv6 + router. + +2.5.3 The Loopback Address + + The unicast address 0:0:0:0:0:0:0:1 is called the loopback address. + It may be used by a node to send an IPv6 packet to itself. It may + never be assigned to any physical interface. It is treated as + having link-local scope, and may be thought of as the link-local + unicast address of a virtual interface (typically called "the + loopback interface") to an imaginary link that goes nowhere. + + The loopback address must not be used as the source address in IPv6 + packets that are sent outside of a single node. An IPv6 packet with + a destination address of loopback must never be sent outside of a + single node and must never be forwarded by an IPv6 router. A packet + received on an interface with destination address of loopback must be + dropped. + + + + +Hinden & Deering Standards Track [Page 9] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +2.5.4 Global Unicast Addresses + + The general format for IPv6 global unicast addresses is as follows: + + | n bits | m bits | 128-n-m bits | + +------------------------+-----------+----------------------------+ + | global routing prefix | subnet ID | interface ID | + +------------------------+-----------+----------------------------+ + + where the global routing prefix is a (typically hierarchically- + structured) value assigned to a site (a cluster of subnets/links), + the subnet ID is an identifier of a link within the site, and the + interface ID is as defined in section 2.5.1. + + All global unicast addresses other than those that start with binary + 000 have a 64-bit interface ID field (i.e., n + m = 64), formatted as + described in section 2.5.1. Global unicast addresses that start with + binary 000 have no such constraint on the size or structure of the + interface ID field. + + Examples of global unicast addresses that start with binary 000 are + the IPv6 address with embedded IPv4 addresses described in section + 2.5.5 and the IPv6 address containing encoded NSAP addresses + specified in [NSAP]. An example of global addresses starting with a + binary value other than 000 (and therefore having a 64-bit interface + ID field) can be found in [AGGR]. + +2.5.5 IPv6 Addresses with Embedded IPv4 Addresses + + The IPv6 transition mechanisms [TRAN] include a technique for hosts + and routers to dynamically tunnel IPv6 packets over IPv4 routing + infrastructure. IPv6 nodes that use this technique are assigned + special IPv6 unicast addresses that carry a global IPv4 address in + the low-order 32 bits. This type of address is termed an "IPv4- + compatible IPv6 address" and has the format: + + | 80 bits | 16 | 32 bits | + +--------------------------------------+--------------------------+ + |0000..............................0000|0000| IPv4 address | + +--------------------------------------+----+---------------------+ + + Note: The IPv4 address used in the "IPv4-compatible IPv6 address" + must be a globally-unique IPv4 unicast address. + + A second type of IPv6 address which holds an embedded IPv4 address is + also defined. This address type is used to represent the addresses + of IPv4 nodes as IPv6 addresses. This type of address is termed an + "IPv4-mapped IPv6 address" and has the format: + + + +Hinden & Deering Standards Track [Page 10] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + | 80 bits | 16 | 32 bits | + +--------------------------------------+--------------------------+ + |0000..............................0000|FFFF| IPv4 address | + +--------------------------------------+----+---------------------+ + +2.5.6 Local-Use IPv6 Unicast Addresses + + There are two types of local-use unicast addresses defined. These + are Link-Local and Site-Local. The Link-Local is for use on a single + link and the Site-Local is for use in a single site. Link-Local + addresses have the following format: + + | 10 | + | bits | 54 bits | 64 bits | + +----------+-------------------------+----------------------------+ + |1111111010| 0 | interface ID | + +----------+-------------------------+----------------------------+ + + Link-Local addresses are designed to be used for addressing on a + single link for purposes such as automatic address configuration, + neighbor discovery, or when no routers are present. + + Routers must not forward any packets with link-local source or + destination addresses to other links. + + Site-Local addresses have the following format: + + | 10 | + | bits | 54 bits | 64 bits | + +----------+-------------------------+----------------------------+ + |1111111011| subnet ID | interface ID | + +----------+-------------------------+----------------------------+ + + Site-local addresses are designed to be used for addressing inside of + a site without the need for a global prefix. Although a subnet ID + may be up to 54-bits long, it is expected that globally-connected + sites will use the same subnet IDs for site-local and global + prefixes. + + Routers must not forward any packets with site-local source or + destination addresses outside of the site. + + + + + + + + + + +Hinden & Deering Standards Track [Page 11] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +2.6 Anycast Addresses + + An IPv6 anycast address is an address that is assigned to more than + one interface (typically belonging to different nodes), with the + property that a packet sent to an anycast address is routed to the + "nearest" interface having that address, according to the routing + protocols' measure of distance. + + Anycast addresses are allocated from the unicast address space, using + any of the defined unicast address formats. Thus, anycast addresses + are syntactically indistinguishable from unicast addresses. When a + unicast address is assigned to more than one interface, thus turning + it into an anycast address, the nodes to which the address is + assigned must be explicitly configured to know that it is an anycast + address. + + For any assigned anycast address, there is a longest prefix P of that + address that identifies the topological region in which all + interfaces belonging to that anycast address reside. Within the + region identified by P, the anycast address must be maintained as a + separate entry in the routing system (commonly referred to as a "host + route"); outside the region identified by P, the anycast address may + be aggregated into the routing entry for prefix P. + + Note that in the worst case, the prefix P of an anycast set may be + the null prefix, i.e., the members of the set may have no topological + locality. In that case, the anycast address must be maintained as a + separate routing entry throughout the entire internet, which presents + a severe scaling limit on how many such "global" anycast sets may be + supported. Therefore, it is expected that support for global anycast + sets may be unavailable or very restricted. + + One expected use of anycast addresses is to identify the set of + routers belonging to an organization providing internet service. + Such addresses could be used as intermediate addresses in an IPv6 + Routing header, to cause a packet to be delivered via a particular + service provider or sequence of service providers. + + Some other possible uses are to identify the set of routers attached + to a particular subnet, or the set of routers providing entry into a + particular routing domain. + + There is little experience with widespread, arbitrary use of internet + anycast addresses, and some known complications and hazards when + using them in their full generality [ANYCST]. Until more experience + has been gained and solutions are specified, the following + restrictions are imposed on IPv6 anycast addresses: + + + + +Hinden & Deering Standards Track [Page 12] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + o An anycast address must not be used as the source address of an + IPv6 packet. + + o An anycast address must not be assigned to an IPv6 host, that is, + it may be assigned to an IPv6 router only. + +2.6.1 Required Anycast Address + + The Subnet-Router anycast address is predefined. Its format is as + follows: + + | n bits | 128-n bits | + +------------------------------------------------+----------------+ + | subnet prefix | 00000000000000 | + +------------------------------------------------+----------------+ + + The "subnet prefix" in an anycast address is the prefix which + identifies a specific link. This anycast address is syntactically + the same as a unicast address for an interface on the link with the + interface identifier set to zero. + + Packets sent to the Subnet-Router anycast address will be delivered + to one router on the subnet. All routers are required to support the + Subnet-Router anycast addresses for the subnets to which they have + interfaces. + + The subnet-router anycast address is intended to be used for + applications where a node needs to communicate with any one of the + set of routers. + +2.7 Multicast Addresses + + An IPv6 multicast address is an identifier for a group of interfaces + (typically on different nodes). An interface may belong to any + number of multicast groups. Multicast addresses have the following + format: + + | 8 | 4 | 4 | 112 bits | + +------ -+----+----+---------------------------------------------+ + |11111111|flgs|scop| group ID | + +--------+----+----+---------------------------------------------+ + + binary 11111111 at the start of the address identifies the + address as being a multicast address. + + +-+-+-+-+ + flgs is a set of 4 flags: |0|0|0|T| + +-+-+-+-+ + + + +Hinden & Deering Standards Track [Page 13] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + The high-order 3 flags are reserved, and must be initialized + to 0. + + T = 0 indicates a permanently-assigned ("well-known") + multicast address, assigned by the Internet Assigned Number + Authority (IANA). + + T = 1 indicates a non-permanently-assigned ("transient") + multicast address. + + scop is a 4-bit multicast scope value used to limit the scope + of the multicast group. The values are: + + 0 reserved + 1 interface-local scope + 2 link-local scope + 3 reserved + 4 admin-local scope + 5 site-local scope + 6 (unassigned) + 7 (unassigned) + 8 organization-local scope + 9 (unassigned) + A (unassigned) + B (unassigned) + C (unassigned) + D (unassigned) + E global scope + F reserved + + interface-local scope spans only a single interface on a + node, and is useful only for loopback transmission of + multicast. + + link-local and site-local multicast scopes span the same + topological regions as the corresponding unicast scopes. + + admin-local scope is the smallest scope that must be + administratively configured, i.e., not automatically derived + from physical connectivity or other, non- multicast-related + configuration. + + organization-local scope is intended to span multiple sites + belonging to a single organization. + + scopes labeled "(unassigned)" are available for + administrators to define additional multicast regions. + + + + +Hinden & Deering Standards Track [Page 14] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + group ID identifies the multicast group, either permanent or + transient, within the given scope. + + The "meaning" of a permanently-assigned multicast address is + independent of the scope value. For example, if the "NTP servers + group" is assigned a permanent multicast address with a group ID of + 101 (hex), then: + + FF01:0:0:0:0:0:0:101 means all NTP servers on the same interface + (i.e., the same node) as the sender. + + FF02:0:0:0:0:0:0:101 means all NTP servers on the same link as the + sender. + + FF05:0:0:0:0:0:0:101 means all NTP servers in the same site as the + sender. + + FF0E:0:0:0:0:0:0:101 means all NTP servers in the internet. + + Non-permanently-assigned multicast addresses are meaningful only + within a given scope. For example, a group identified by the non- + permanent, site-local multicast address FF15:0:0:0:0:0:0:101 at one + site bears no relationship to a group using the same address at a + different site, nor to a non-permanent group using the same group ID + with different scope, nor to a permanent group with the same group + ID. + + Multicast addresses must not be used as source addresses in IPv6 + packets or appear in any Routing header. + + Routers must not forward any multicast packets beyond of the scope + indicated by the scop field in the destination multicast address. + + Nodes must not originate a packet to a multicast address whose scop + field contains the reserved value 0; if such a packet is received, it + must be silently dropped. Nodes should not originate a packet to a + multicast address whose scop field contains the reserved value F; if + such a packet is sent or received, it must be treated the same as + packets destined to a global (scop E) multicast address. + +2.7.1 Pre-Defined Multicast Addresses + + The following well-known multicast addresses are pre-defined. The + group ID's defined in this section are defined for explicit scope + values. + + Use of these group IDs for any other scope values, with the T flag + equal to 0, is not allowed. + + + +Hinden & Deering Standards Track [Page 15] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + Reserved Multicast Addresses: FF00:0:0:0:0:0:0:0 + FF01:0:0:0:0:0:0:0 + FF02:0:0:0:0:0:0:0 + FF03:0:0:0:0:0:0:0 + FF04:0:0:0:0:0:0:0 + FF05:0:0:0:0:0:0:0 + FF06:0:0:0:0:0:0:0 + FF07:0:0:0:0:0:0:0 + FF08:0:0:0:0:0:0:0 + FF09:0:0:0:0:0:0:0 + FF0A:0:0:0:0:0:0:0 + FF0B:0:0:0:0:0:0:0 + FF0C:0:0:0:0:0:0:0 + FF0D:0:0:0:0:0:0:0 + FF0E:0:0:0:0:0:0:0 + FF0F:0:0:0:0:0:0:0 + + The above multicast addresses are reserved and shall never be + assigned to any multicast group. + + All Nodes Addresses: FF01:0:0:0:0:0:0:1 + FF02:0:0:0:0:0:0:1 + + The above multicast addresses identify the group of all IPv6 nodes, + within scope 1 (interface-local) or 2 (link-local). + + All Routers Addresses: FF01:0:0:0:0:0:0:2 + FF02:0:0:0:0:0:0:2 + FF05:0:0:0:0:0:0:2 + + The above multicast addresses identify the group of all IPv6 routers, + within scope 1 (interface-local), 2 (link-local), or 5 (site-local). + + Solicited-Node Address: FF02:0:0:0:0:1:FFXX:XXXX + + Solicited-node multicast address are computed as a function of a + node's unicast and anycast addresses. A solicited-node multicast + address is formed by taking the low-order 24 bits of an address + (unicast or anycast) and appending those bits to the prefix + FF02:0:0:0:0:1:FF00::/104 resulting in a multicast address in the + range + + FF02:0:0:0:0:1:FF00:0000 + + to + + FF02:0:0:0:0:1:FFFF:FFFF + + + + +Hinden & Deering Standards Track [Page 16] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + For example, the solicited node multicast address corresponding to + the IPv6 address 4037::01:800:200E:8C6C is FF02::1:FF0E:8C6C. IPv6 + addresses that differ only in the high-order bits, e.g., due to + multiple high-order prefixes associated with different aggregations, + will map to the same solicited-node address thereby, reducing the + number of multicast addresses a node must join. + + A node is required to compute and join (on the appropriate interface) + the associated Solicited-Node multicast addresses for every unicast + and anycast address it is assigned. + +2.8 A Node's Required Addresses + + A host is required to recognize the following addresses as + identifying itself: + + o Its required Link-Local Address for each interface. + o Any additional Unicast and Anycast Addresses that have been + configured for the node's interfaces (manually or + automatically). + o The loopback address. + o The All-Nodes Multicast Addresses defined in section 2.7.1. + o The Solicited-Node Multicast Address for each of its unicast + and anycast addresses. + o Multicast Addresses of all other groups to which the node + belongs. + + A router is required to recognize all addresses that a host is + required to recognize, plus the following addresses as identifying + itself: + + o The Subnet-Router Anycast Addresses for all interfaces for + which it is configured to act as a router. + o All other Anycast Addresses with which the router has been + configured. + o The All-Routers Multicast Addresses defined in section 2.7.1. + +3. Security Considerations + + IPv6 addressing documents do not have any direct impact on Internet + infrastructure security. Authentication of IPv6 packets is defined + in [AUTH]. + + + + + + + + + +Hinden & Deering Standards Track [Page 17] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +4. IANA Considerations + + The table and notes at http://www.isi.edu/in- + notes/iana/assignments/ipv6-address-space.txt should be replaced with + the following: + + INTERNET PROTOCOL VERSION 6 ADDRESS SPACE + + The initial assignment of IPv6 address space is as follows: + + Allocation Prefix Fraction of + (binary) Address Space + ----------------------------------- -------- ------------- + Unassigned (see Note 1 below) 0000 0000 1/256 + Unassigned 0000 0001 1/256 + Reserved for NSAP Allocation 0000 001 1/128 [RFC1888] + Unassigned 0000 01 1/64 + Unassigned 0000 1 1/32 + Unassigned 0001 1/16 + Global Unicast 001 1/8 [RFC2374] + Unassigned 010 1/8 + Unassigned 011 1/8 + Unassigned 100 1/8 + Unassigned 101 1/8 + Unassigned 110 1/8 + Unassigned 1110 1/16 + Unassigned 1111 0 1/32 + Unassigned 1111 10 1/64 + Unassigned 1111 110 1/128 + Unassigned 1111 1110 0 1/512 + Link-Local Unicast Addresses 1111 1110 10 1/1024 + Site-Local Unicast Addresses 1111 1110 11 1/1024 + Multicast Addresses 1111 1111 1/256 + + Notes: + + 1. The "unspecified address", the "loopback address", and the IPv6 + Addresses with Embedded IPv4 Addresses are assigned out of the + 0000 0000 binary prefix space. + + 2. For now, IANA should limit its allocation of IPv6 unicast address + space to the range of addresses that start with binary value 001. + The rest of the global unicast address space (approximately 85% of + the IPv6 address space) is reserved for future definition and use, + and is not to be assigned by IANA at this time. + + + + + + +Hinden & Deering Standards Track [Page 18] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +5. References + +5.1 Normative References + + [IPV6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 + (IPv6) Specification", RFC 2460, December 1998. + + [RFC2026] Bradner, S., "The Internet Standards Process -- Revision + 3", BCP 9 , RFC 2026, October 1996. + +5.2 Informative References + + [ANYCST] Partridge, C., Mendez, T. and W. Milliken, "Host Anycasting + Service", RFC 1546, November 1993. + + [AUTH] Kent, S. and R. Atkinson, "IP Authentication Header", RFC + 2402, November 1998. + + [AGGR] Hinden, R., O'Dell, M. and S. Deering, "An Aggregatable + Global Unicast Address Format", RFC 2374, July 1998. + + [CIDR] Fuller, V., Li, T., Yu, J. and K. Varadhan, "Classless + Inter-Domain Routing (CIDR): An Address Assignment and + Aggregation Strategy", RFC 1519, September 1993. + + [ETHER] Crawford, M., "Transmission of IPv6 Packets over Ethernet + Networks", RFC 2464, December 1998. + + [EUI64] IEEE, "Guidelines for 64-bit Global Identifier (EUI-64) + Registration Authority", + http://standards.ieee.org/regauth/oui/tutorials/EUI64.html, + March 1997. + + [FDDI] Crawford, M., "Transmission of IPv6 Packets over FDDI + Networks", RFC 2467, December 1998. + + [MASGN] Hinden, R. and S. Deering, "IPv6 Multicast Address + Assignments", RFC 2375, July 1998. + + [NSAP] Bound, J., Carpenter, B., Harrington, D., Houldsworth, J. + and A. Lloyd, "OSI NSAPs and IPv6", RFC 1888, August 1996. + + [PRIV] Narten, T. and R. Draves, "Privacy Extensions for Stateless + Address Autoconfiguration in IPv6", RFC 3041, January 2001. + + [TOKEN] Crawford, M., Narten, T. and S. Thomas, "Transmission of + IPv6 Packets over Token Ring Networks", RFC 2470, December + 1998. + + + +Hinden & Deering Standards Track [Page 19] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + [TRAN] Gilligan, R. and E. Nordmark, "Transition Mechanisms for + IPv6 Hosts and Routers", RFC 2893, August 2000. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 20] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +APPENDIX A: Creating Modified EUI-64 format Interface Identifiers + + Depending on the characteristics of a specific link or node there are + a number of approaches for creating Modified EUI-64 format interface + identifiers. This appendix describes some of these approaches. + +Links or Nodes with IEEE EUI-64 Identifiers + + The only change needed to transform an IEEE EUI-64 identifier to an + interface identifier is to invert the "u" (universal/local) bit. For + example, a globally unique IEEE EUI-64 identifier of the form: + + |0 1|1 3|3 4|4 6| + |0 5|6 1|2 7|8 3| + +----------------+----------------+----------------+----------------+ + |cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm|mmmmmmmmmmmmmmmm| + +----------------+----------------+----------------+----------------+ + + where "c" are the bits of the assigned company_id, "0" is the value + of the universal/local bit to indicate global scope, "g" is + individual/group bit, and "m" are the bits of the manufacturer- + selected extension identifier. The IPv6 interface identifier would + be of the form: + + |0 1|1 3|3 4|4 6| + |0 5|6 1|2 7|8 3| + +----------------+----------------+----------------+----------------+ + |cccccc1gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm|mmmmmmmmmmmmmmmm| + +----------------+----------------+----------------+----------------+ + + The only change is inverting the value of the universal/local bit. + +Links or Nodes with IEEE 802 48 bit MAC's + + [EUI64] defines a method to create a IEEE EUI-64 identifier from an + IEEE 48bit MAC identifier. This is to insert two octets, with + hexadecimal values of 0xFF and 0xFE, in the middle of the 48 bit MAC + (between the company_id and vendor supplied id). For example, the 48 + bit IEEE MAC with global scope: + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 21] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + |0 1|1 3|3 4| + |0 5|6 1|2 7| + +----------------+----------------+----------------+ + |cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm| + +----------------+----------------+----------------+ + + where "c" are the bits of the assigned company_id, "0" is the value + of the universal/local bit to indicate global scope, "g" is + individual/group bit, and "m" are the bits of the manufacturer- + selected extension identifier. The interface identifier would be of + the form: + + |0 1|1 3|3 4|4 6| + |0 5|6 1|2 7|8 3| + +----------------+----------------+----------------+----------------+ + |cccccc1gcccccccc|cccccccc11111111|11111110mmmmmmmm|mmmmmmmmmmmmmmmm| + +----------------+----------------+----------------+----------------+ + + When IEEE 802 48bit MAC addresses are available (on an interface or a + node), an implementation may use them to create interface identifiers + due to their availability and uniqueness properties. + +Links with Other Kinds of Identifiers + + There are a number of types of links that have link-layer interface + identifiers other than IEEE EIU-64 or IEEE 802 48-bit MACs. Examples + include LocalTalk and Arcnet. The method to create an Modified EUI- + 64 format identifier is to take the link identifier (e.g., the + LocalTalk 8 bit node identifier) and zero fill it to the left. For + example, a LocalTalk 8 bit node identifier of hexadecimal value 0x4F + results in the following interface identifier: + + |0 1|1 3|3 4|4 6| + |0 5|6 1|2 7|8 3| + +----------------+----------------+----------------+----------------+ + |0000000000000000|0000000000000000|0000000000000000|0000000001001111| + +----------------+----------------+----------------+----------------+ + + Note that this results in the universal/local bit set to "0" to + indicate local scope. + +Links without Identifiers + + There are a number of links that do not have any type of built-in + identifier. The most common of these are serial links and configured + tunnels. Interface identifiers must be chosen that are unique within + a subnet-prefix. + + + + +Hinden & Deering Standards Track [Page 22] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + When no built-in identifier is available on a link the preferred + approach is to use a global interface identifier from another + interface or one which is assigned to the node itself. When using + this approach no other interface connecting the same node to the same + subnet-prefix may use the same identifier. + + If there is no global interface identifier available for use on the + link the implementation needs to create a local-scope interface + identifier. The only requirement is that it be unique within a + subnet prefix. There are many possible approaches to select a + subnet-prefix-unique interface identifier. These include: + + Manual Configuration + Node Serial Number + Other node-specific token + + The subnet-prefix-unique interface identifier should be generated in + a manner that it does not change after a reboot of a node or if + interfaces are added or deleted from the node. + + The selection of the appropriate algorithm is link and implementation + dependent. The details on forming interface identifiers are defined + in the appropriate "IPv6 over " specification. It is strongly + recommended that a collision detection algorithm be implemented as + part of any automatic algorithm. + + + + + + + + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 23] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +APPENDIX B: Changes from RFC-2373 + + The following changes were made from RFC-2373 "IP Version 6 + Addressing Architecture": + + - Clarified text in section 2.2 to allow "::" to represent one or + more groups of 16 bits of zeros. + - Changed uniqueness requirement of Interface Identifiers from + unique on a link to unique within a subnet prefix. Also added a + recommendation that the same interface identifier not be assigned + to different machines on a link. + - Change site-local format to make the subnet ID field 54-bit long + and remove the 38-bit zero's field. + - Added description of multicast scop values and rules to handle the + reserved scop value 0. + - Revised sections 2.4 and 2.5.6 to simplify and clarify how + different address types are identified. This was done to insure + that implementations do not build in any knowledge about global + unicast format prefixes. Changes include: + o Removed Format Prefix (FP) terminology + o Revised list of address types to only include exceptions to + global unicast and a singe entry that identifies everything + else as Global Unicast. + o Removed list of defined prefix exceptions from section 2.5.6 + as it is now the main part of section 2.4. + - Clarified text relating to EUI-64 identifiers to distinguish + between IPv6's "Modified EUI-64 format" identifiers and IEEE EUI- + 64 identifiers. + - Combined the sections on the Global Unicast Addresses and NSAP + Addresses into a single section on Global Unicast Addresses, + generalized the Global Unicast format, and cited [AGGR] and [NSAP] + as examples. + - Reordered sections 2.5.4 and 2.5.5. + - Removed section 2.7.2 Assignment of New IPv6 Multicast Addresses + because this is being redefined elsewhere. + - Added an IANA considerations section that updates the IANA IPv6 + address allocations and documents the NSAP and AGGR allocations. + - Added clarification that the "IPv4-compatible IPv6 address" must + use global IPv4 unicast addresses. + - Divided references in to normative and non-normative sections. + - Added reference to [PRIV] in section 2.5.1 + - Added clarification that routers must not forward multicast + packets outside of the scope indicated in the multicast address. + - Added clarification that routers must not forward packets with + source address of the unspecified address. + - Added clarification that routers must drop packets received on an + interface with destination address of loopback. + - Clarified the definition of IPv4-mapped addresses. + + + +Hinden & Deering Standards Track [Page 24] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + + - Removed the ABNF Description of Text Representations Appendix. + - Removed the address block reserved for IPX addresses. + - Multicast scope changes: + o Changed name of scope value 1 from "node-local" to + "interface-local" + o Defined scope value 4 as "admin-local" + - Corrected reference to RFC1933 and updated references. + - Many small changes to clarify and make the text more consistent. + +Authors' Addresses + + Robert M. Hinden + Nokia + 313 Fairchild Drive + Mountain View, CA 94043 + USA + + Phone: +1 650 625-2004 + EMail: hinden@iprg.nokia.com + + + Stephen E. Deering + Cisco Systems, Inc. + 170 West Tasman Drive + San Jose, CA 95134-1706 + USA + + Phone: +1 408 527-8213 + EMail: deering@cisco.com + + + + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 25] + +RFC 3513 IPv6 Addressing Architecture April 2003 + + +Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. + + + + + + + + + + + + + + + + + + + +Hinden & Deering Standards Track [Page 26] + From 21f1794606dce19928cf455029e173321f166380 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 05:11:53 +0000 Subject: [PATCH 27/75] 1474. [port] Provide strtoul() and memmove() for platforms without them. --- CHANGES | 3 + bin/dig/host.c | 4 +- bin/tests/genrandom.c | 5 +- bin/tests/serial_test.c | 4 +- configure | 184 +++++++++++++++++++++++++++++- configure.in | 12 +- lib/dns/rdata.c | 3 +- lib/isc/Makefile.in | 8 +- lib/isc/include/isc/platform.h.in | 12 +- lib/isc/include/isc/stdlib.h | 38 ++++++ lib/isc/include/isc/string.h | 6 +- lib/isc/parseint.c | 4 +- lib/isc/print.c | 4 +- lib/isc/strtoul.c | 127 +++++++++++++++++++++ lib/isccc/cc.c | 9 +- util/copyrights | 2 + 16 files changed, 402 insertions(+), 23 deletions(-) create mode 100644 lib/isc/include/isc/stdlib.h create mode 100644 lib/isc/strtoul.c diff --git a/CHANGES b/CHANGES index 0819e9153b..55923de734 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1474. [port] Provide strtoul() and memmove() for platforms + without them. + 1473. [bug] free_map() and free_string() failed to handle out of memory cleanup. [RT #6813] diff --git a/bin/dig/host.c b/bin/dig/host.c index 366ca458f6..64c8e871aa 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -15,10 +15,9 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: host.c,v 1.91 2002/12/11 06:31:37 marka Exp $ */ +/* $Id: host.c,v 1.92 2003/06/24 05:10:31 marka Exp $ */ #include -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/bin/tests/genrandom.c b/bin/tests/genrandom.c index 800623ccaf..794ce785fc 100644 --- a/bin/tests/genrandom.c +++ b/bin/tests/genrandom.c @@ -15,14 +15,15 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: genrandom.c,v 1.9 2002/12/04 01:19:28 marka Exp $ */ +/* $Id: genrandom.c,v 1.10 2003/06/24 05:10:31 marka Exp $ */ #include #include -#include #include +#include + int main(int argc, char **argv) { unsigned int bytes; diff --git a/bin/tests/serial_test.c b/bin/tests/serial_test.c index 8dc209fb28..63520d05b4 100644 --- a/bin/tests/serial_test.c +++ b/bin/tests/serial_test.c @@ -15,14 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: serial_test.c,v 1.11 2001/11/27 01:55:22 gson Exp $ */ +/* $Id: serial_test.c,v 1.12 2003/06/24 05:10:31 marka Exp $ */ #include #include -#include #include +#include int main() { diff --git a/configure b/configure index 5f81358094..55af0318f6 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.342 . +# From configure.in Revision: 1.343 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -12946,6 +12946,186 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +if test "${ac_cv_func_memmove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* From autoconf 2.57 */ +/* Define memmove to an innocuous variant, in case declares memmove. + For example, HP-UX 11i declares gettimeofday. */ +#define memmove innocuous_memmove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char memmove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef memmove + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char memmove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_memmove) || defined (__stub___memmove) +choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f != memmove; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memmove=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_memmove=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 +if test $ac_cv_func_memmove = yes; then + ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE" +else + ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1" +fi + + + +echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 +if test "${ac_cv_func_strtoul+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* From autoconf 2.57 */ +/* Define strtoul to an innocuous variant, in case declares strtoul. + For example, HP-UX 11i declares gettimeofday. */ +#define strtoul innocuous_strtoul + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strtoul (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strtoul + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strtoul (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strtoul) || defined (__stub___strtoul) +choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f != strtoul; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strtoul=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_strtoul=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +if test $ac_cv_func_strtoul = yes; then + ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL" +else + ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1" +fi + + + echo "$as_me:$LINENO: checking for strlcpy" >&5 echo $ECHO_N "checking for strlcpy... $ECHO_C" >&6 if test "${ac_cv_func_strlcpy+set}" = set; then @@ -15406,6 +15586,8 @@ s,@ISC_LWRES_GETIPNODEPROTO@,$ISC_LWRES_GETIPNODEPROTO,;t t s,@ISC_LWRES_GETADDRINFOPROTO@,$ISC_LWRES_GETADDRINFOPROTO,;t t s,@ISC_LWRES_GETNAMEINFOPROTO@,$ISC_LWRES_GETNAMEINFOPROTO,;t t s,@ISC_PLATFORM_NEEDSTRSEP@,$ISC_PLATFORM_NEEDSTRSEP,;t t +s,@ISC_PLATFORM_NEEDMEMMOVE@,$ISC_PLATFORM_NEEDMEMMOVE,;t t +s,@ISC_PLATFORM_NEEDSTRTOUL@,$ISC_PLATFORM_NEEDSTRTOUL,;t t s,@ISC_PLATFORM_NEEDSTRLCPY@,$ISC_PLATFORM_NEEDSTRLCPY,;t t s,@ISC_PLATFORM_NEEDSTRLCAT@,$ISC_PLATFORM_NEEDSTRLCAT,;t t s,@ISC_PLATFORM_NEEDVSNPRINTF@,$ISC_PLATFORM_NEEDVSNPRINTF,;t t diff --git a/configure.in b/configure.in index 2ebfe3b30a..dd2624b289 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.342 $) +AC_REVISION($Revision: 1.343 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -1575,6 +1575,16 @@ AC_TRY_LINK([#include ], [char *sp; char *foo = strsep(&sp, ".");], [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"]) AC_SUBST(ISC_PLATFORM_NEEDSTRSEP) +AC_CHECK_FUNC(memmove, + [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"], + [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"]) +AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE) + +AC_CHECK_FUNC(strtoul, + [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"], + [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"]) +AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL) + AC_CHECK_FUNC(strlcpy, [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"], [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"]) diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index d2c9c2cd74..9ad903a670 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.174 2003/04/11 07:25:25 marka Exp $ */ +/* $Id: rdata.c,v 1.175 2003/06/24 05:10:32 marka Exp $ */ #include #include @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in index c5121505e1..e826ba7bf1 100644 --- a/lib/isc/Makefile.in +++ b/lib/isc/Makefile.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.76 2002/10/24 03:52:32 marka Exp $ +# $Id: Makefile.in,v 1.77 2003/06/24 05:10:32 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -57,8 +57,8 @@ OBJS = @ISC_EXTRA_OBJS@ \ mem.@O@ mutexblock.@O@ netaddr.@O@ netscope.@O@ ondestroy.@O@ \ parseint.@O@ quota.@O@ random.@O@ \ ratelimiter.@O@ region.@O@ result.@O@ rwlock.@O@ \ - serial.@O@ sha1.@O@ sockaddr.@O@ string.@O@ symtab.@O@ \ - task.@O@ taskpool.@O@ timer.@O@ version.@O@ \ + serial.@O@ sha1.@O@ sockaddr.@O@ string.@O@ strtoul.@O@ \ + symtab.@O@ task.@O@ taskpool.@O@ timer.@O@ version.@O@ \ ${UNIXOBJS} ${NLSOBJS} ${THREADOBJS} # Alphabetically @@ -70,7 +70,7 @@ SRCS = @ISC_EXTRA_SRCS@ \ md5.c mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ parseint.c quota.c random.c \ ratelimiter.c result.c rwlock.c \ - serial.c sha1.c sockaddr.c string.c symtab.c \ + serial.c sha1.c sockaddr.c string.c strtoul.c symtab.c \ task.c taskpool.c timer.c version.c LIBS = @LIBS@ diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index 836b372dc7..6c9edb46df 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.31 2003/04/10 04:46:27 marka Exp $ */ +/* $Id: platform.h.in,v 1.32 2003/06/24 05:10:33 marka Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -195,6 +195,16 @@ */ @ISC_PLATFORM_HAVEIFNAMETOINDEX@ +/* + * Define if this system needs strtoul. + */ +@ISC_PLATFORM_NEEDSTRTOUL@ + +/* + * Define if this system needs memmove. + */ +@ISC_PLATFORM_NEEDMEMMOVE@ + #ifndef ISC_PLATFORM_USEDECLSPEC #define LIBISC_EXTERNAL_DATA #define LIBDNS_EXTERNAL_DATA diff --git a/lib/isc/include/isc/stdlib.h b/lib/isc/include/isc/stdlib.h new file mode 100644 index 0000000000..afec1371be --- /dev/null +++ b/lib/isc/include/isc/stdlib.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: stdlib.h,v 1.1 2003/06/24 05:10:33 marka Exp $ */ + +#ifndef ISC_STDLIB_H +#define ISC_STDLIB_H 1 + +#include + +#include +#include + +#ifdef ISC_PLATFORM_NEEDSTRTOUL +#define strtoul isc_strtoul +#endif + +ISC_LANG_BEGINDECLS + +unsigned long isc_strtoul(const char *, char **, int); + +ISC_LANG_ENDDECLS + +#endif diff --git a/lib/isc/include/isc/string.h b/lib/isc/include/isc/string.h index 4c34629f75..dacacd90cf 100644 --- a/lib/isc/include/isc/string.h +++ b/lib/isc/include/isc/string.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: string.h,v 1.10 2003/04/10 04:46:27 marka Exp $ */ +/* $Id: string.h,v 1.11 2003/06/24 05:10:33 marka Exp $ */ #ifndef ISC_STRING_H #define ISC_STRING_H 1 @@ -51,6 +51,10 @@ isc_string_separate(char **stringp, const char *delim); #define strsep isc_string_separate #endif +#ifdef ISC_PLATFORM_NEEDMEMMOVE +#define memmove(a,b,c) bcopy(b,a,c) +#endif + size_t isc_string_strlcpy(char *dst, const char *src, size_t size); diff --git a/lib/isc/parseint.c b/lib/isc/parseint.c index 8450f0fdcb..1f6b2e46c3 100644 --- a/lib/isc/parseint.c +++ b/lib/isc/parseint.c @@ -15,17 +15,17 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: parseint.c,v 1.2 2002/02/28 20:08:05 bwelling Exp $ */ +/* $Id: parseint.c,v 1.3 2003/06/24 05:10:32 marka Exp $ */ #include #include #include #include -#include #include #include +#include isc_result_t isc_parse_uint32(isc_uint32_t *uip, const char *string, int base) { diff --git a/lib/isc/print.c b/lib/isc/print.c index d15b434625..ec953fd1ba 100644 --- a/lib/isc/print.c +++ b/lib/isc/print.c @@ -15,13 +15,12 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: print.c,v 1.23 2003/02/25 21:32:07 marka Exp $ */ +/* $Id: print.c,v 1.24 2003/06/24 05:10:32 marka Exp $ */ #include #include #include /* for sprintf */ -#include #define ISC__PRINT_SOURCE /* Used to get the isc_print_* prototypes. */ @@ -29,6 +28,7 @@ #include #include #include +#include #include /* diff --git a/lib/isc/strtoul.c b/lib/isc/strtoul.c new file mode 100644 index 0000000000..8c27f0d8ff --- /dev/null +++ b/lib/isc/strtoul.c @@ -0,0 +1,127 @@ +/* + * Portions Copyright (C) 2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; +#endif /* LIBC_SCCS and not lint */ + +/* $Id: strtoul.c,v 1.1 2003/06/24 05:10:32 marka Exp $ */ + +#include + +#include +#include +#include + +#include + +/* + * Convert a string to an unsigned long integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +unsigned long +isc_strtoul(const char *nptr, char **endptr, int base) { + const char *s = nptr; + unsigned long acc; + unsigned char c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * See strtol for comments as to the logic used. + */ + do { + c = *s++; + } while (isspace(c)); + if (c == '-') { + neg = 1; + c = *s++; + } else if (c == '+') + c = *s++; + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; + cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; + for (acc = 0, any = 0;; c = *s++) { + if (!isascii(c)) + break; + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = ULONG_MAX; + errno = ERANGE; + } else if (neg) + acc = -acc; + if (endptr != 0) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c index 5ddc4c7459..cd322a4c5a 100644 --- a/lib/isccc/cc.c +++ b/lib/isccc/cc.c @@ -16,20 +16,21 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cc.c,v 1.7 2003/04/11 07:25:28 marka Exp $ */ +/* $Id: cc.c,v 1.8 2003/06/24 05:10:34 marka Exp $ */ #include #include -#include #include #include -#include #include +#include +#include + +#include #include #include -#include #include #include #include diff --git a/util/copyrights b/util/copyrights index 6d8bb669c4..1692f450f0 100644 --- a/util/copyrights +++ b/util/copyrights @@ -1926,6 +1926,7 @@ ./lib/isc/include/isc/sockaddr.h C 1998,1999,2000,2001,2002 ./lib/isc/include/isc/socket.h C 1998,1999,2000,2001 ./lib/isc/include/isc/stdio.h C 2000,2001 +./lib/isc/include/isc/stdlib.h C 2003 ./lib/isc/include/isc/string.h C 2000,2001 ./lib/isc/include/isc/symtab.h C 1996,1997,1998,1999,2000,2001 ./lib/isc/include/isc/task.h C 1998,1999,2000,2001 @@ -1988,6 +1989,7 @@ ./lib/isc/sha1.c C 2000,2001 ./lib/isc/sockaddr.c C 1999,2000,2001,2002 ./lib/isc/string.c C 1999,2000,2001 +./lib/isc/strtoul.c C.PORTION 2003 ./lib/isc/symtab.c C 1996,1997,1998,1999,2000,2001 ./lib/isc/task.c C 1998,1999,2000,2001 ./lib/isc/task_p.h C 2000,2001 From 090f79c6c244078b18c9cd95787be1be30be184c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 05:18:39 +0000 Subject: [PATCH 28/75] 1474. [port] Provide strtoul() and memmove() for platforms without them. --- lib/isc/include/isc/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/isc/include/isc/Makefile.in b/lib/isc/include/isc/Makefile.in index dd1677920d..e594fde203 100644 --- a/lib/isc/include/isc/Makefile.in +++ b/lib/isc/include/isc/Makefile.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.52 2001/11/30 01:02:16 gson Exp $ +# $Id: Makefile.in,v 1.53 2003/06/24 05:18:39 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -36,8 +36,8 @@ HEADERS = app.h assertions.h base64.h bitstring.h boolean.h buffer.h \ print.h quota.h random.h ratelimiter.h \ refcount.h region.h resource.h \ result.h resultclass.h rwlock.h serial.h sha1.h sockaddr.h \ - socket.h stdio.h string.h symtab.h task.h taskpool.h timer.h \ - types.h util.h version.h + socket.h stdio.h stdlib.h string.h symtab.h task.h taskpool.h \ + timer.h types.h util.h version.h SUBDIRS = TARGETS = From f95231835fdcd8d5f58486c9f9993602f27fe157 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 06:24:44 +0000 Subject: [PATCH 29/75] 1475. [port] Probe for old sprintf(). --- CHANGES | 2 ++ configure | 59 +++++++++++++++++++++++++++++-- configure.in | 24 +++++++++++-- lib/isc/include/isc/platform.h.in | 7 +++- lib/isc/include/isc/print.h | 18 ++++++++-- lib/isc/print.c | 12 ++++++- 6 files changed, 111 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 55923de734..c64a4f20b3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1475. [port] Probe for old sprintf(). + 1474. [port] Provide strtoul() and memmove() for platforms without them. diff --git a/configure b/configure index 55af0318f6..577c7214bb 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.343 . +# From configure.in Revision: 1.344 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -13306,6 +13306,56 @@ fi +ISC_PRINT_OBJS= +ISC_PRINT_SRCS= +echo "$as_me:$LINENO: checking sprintf" >&5 +echo $ECHO_N "checking sprintf... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char buf[2]; return(*sprintf(buf,"x")); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +ISC_PRINT_OBJS="print.$O" +ISC_PRINT_SRCS="print.c" +ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF" + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for vsnprintf" >&5 echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6 if test "${ac_cv_func_vsnprintf+set}" = set; then @@ -13391,12 +13441,14 @@ echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6 if test $ac_cv_func_vsnprintf = yes; then ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF" else - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O" - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c" + ISC_EXTRA_OBJS="print.$O" + ISC_EXTRA_SRCS="print.c" ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" fi +ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" +ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS" echo "$as_me:$LINENO: checking for strerror" >&5 echo $ECHO_N "checking for strerror... $ECHO_C" >&6 @@ -15590,6 +15642,7 @@ s,@ISC_PLATFORM_NEEDMEMMOVE@,$ISC_PLATFORM_NEEDMEMMOVE,;t t s,@ISC_PLATFORM_NEEDSTRTOUL@,$ISC_PLATFORM_NEEDSTRTOUL,;t t s,@ISC_PLATFORM_NEEDSTRLCPY@,$ISC_PLATFORM_NEEDSTRLCPY,;t t s,@ISC_PLATFORM_NEEDSTRLCAT@,$ISC_PLATFORM_NEEDSTRLCAT,;t t +s,@ISC_PLATFORM_NEEDSPRINTF@,$ISC_PLATFORM_NEEDSPRINTF,;t t s,@ISC_PLATFORM_NEEDVSNPRINTF@,$ISC_PLATFORM_NEEDVSNPRINTF,;t t s,@ISC_EXTRA_OBJS@,$ISC_EXTRA_OBJS,;t t s,@ISC_EXTRA_SRCS@,$ISC_EXTRA_SRCS,;t t diff --git a/configure.in b/configure.in index dd2624b289..ff2a08d39b 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.343 $) +AC_REVISION($Revision: 1.344 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -1595,12 +1595,30 @@ AC_CHECK_FUNC(strlcat, [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"]) AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT) +ISC_PRINT_OBJS= +ISC_PRINT_SRCS= +AC_MSG_CHECKING(sprintf) +AC_TRY_COMPILE([ +#include +], +[ char buf[2]; return(*sprintf(buf,"x"));], +[ +ISC_PRINT_OBJS="print.$O" +ISC_PRINT_SRCS="print.c" +ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF" +], +[ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"] +) +AC_SUBST(ISC_PLATFORM_NEEDSPRINTF) + AC_CHECK_FUNC(vsnprintf, [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"], - [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O" - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c" + [ISC_EXTRA_OBJS="print.$O" + ISC_EXTRA_SRCS="print.c" ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"]) AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF) +ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" +ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS" AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR)) diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index 6c9edb46df..884e0883b2 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.32 2003/06/24 05:10:33 marka Exp $ */ +/* $Id: platform.h.in,v 1.33 2003/06/24 06:23:59 marka Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -143,6 +143,11 @@ */ @ISC_PLATFORM_NEEDVSNPRINTF@ +/* + * If this system need a modern sprintf() that returns (int) not (char*). + */ +@ISC_PLATFORM_NEEDSPRINTF@ + /* * The printf format string modifier to use with isc_uint64_t values. */ diff --git a/lib/isc/include/isc/print.h b/lib/isc/include/isc/print.h index 7a1bc83b67..55455b5b8c 100644 --- a/lib/isc/include/isc/print.h +++ b/lib/isc/include/isc/print.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: print.h,v 1.17 2001/02/27 02:19:33 gson Exp $ */ +/* $Id: print.h,v 1.18 2003/06/24 06:23:59 marka Exp $ */ #ifndef ISC_PRINT_H #define ISC_PRINT_H 1 @@ -38,6 +38,10 @@ #define ISC_PLATFORM_NEEDVSNPRINTF #endif +#if !defined(ISC_PLATFORM_NEEDSPRINTF) && defined(ISC__PRINT_SOURCE) +#define ISC_PLATFORM_NEEDSPRINTF +#endif + /*** *** Macros ***/ @@ -50,9 +54,11 @@ #ifdef ISC_PLATFORM_NEEDVSNPRINTF #include #include +#endif ISC_LANG_BEGINDECLS +#ifdef ISC_PLATFORM_NEEDVSNPRINTF int isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) ISC_FORMAT_PRINTF(3, 0); @@ -62,8 +68,14 @@ int isc_print_snprintf(char *str, size_t size, const char *format, ...) ISC_FORMAT_PRINTF(3, 4); #define snprintf isc_print_snprintf - -ISC_LANG_ENDDECLS #endif /* ISC_PLATFORM_NEEDVSNPRINTF */ +#ifdef ISC_PLATFORM_NEEDSPRINTF +int +isc_print_sprintf(char *str, const char *format, ...) ISC_FORMAT_PRINTF(2, 3); +#define sprintf isc_print_sprintf +#endif + +ISC_LANG_ENDDECLS + #endif /* ISC_PRINT_H */ diff --git a/lib/isc/print.c b/lib/isc/print.c index ec953fd1ba..c7042f3b00 100644 --- a/lib/isc/print.c +++ b/lib/isc/print.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: print.c,v 1.24 2003/06/24 05:10:32 marka Exp $ */ +/* $Id: print.c,v 1.25 2003/06/24 06:23:58 marka Exp $ */ #include @@ -31,6 +31,16 @@ #include #include +int +isc_print_sprintf(char *str, const char *format, ...) { + va_list ap; + + va_start(ap, format); + vsprintf(str, format, ap); + va_end(ap); + return (strlen(str)); +} + /* * Return length of string that would have been written if not truncated. */ From 734b3777705434fedc7eb4b4c5f51e9a606d86b7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 06:28:14 +0000 Subject: [PATCH 30/75] 1475. [port] Probe for old sprintf(). --- configure | 6 +++--- configure.in | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 577c7214bb..f089bf2794 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.344 . +# From configure.in Revision: 1.345 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -13441,8 +13441,8 @@ echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6 if test $ac_cv_func_vsnprintf = yes; then ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF" else - ISC_EXTRA_OBJS="print.$O" - ISC_EXTRA_SRCS="print.c" + ISC_PRINT_OBJS="print.$O" + ISC_PRINT_SRCS="print.c" ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" fi diff --git a/configure.in b/configure.in index ff2a08d39b..52505d3e3e 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.344 $) +AC_REVISION($Revision: 1.345 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -1613,8 +1613,8 @@ AC_SUBST(ISC_PLATFORM_NEEDSPRINTF) AC_CHECK_FUNC(vsnprintf, [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"], - [ISC_EXTRA_OBJS="print.$O" - ISC_EXTRA_SRCS="print.c" + [ISC_PRINT_OBJS="print.$O" + ISC_PRINT_SRCS="print.c" ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"]) AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF) ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" From edfcbabd60f8479b72d91bcc2d2082a36ace4003 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 24 Jun 2003 07:28:07 +0000 Subject: [PATCH 31/75] 1476. [placeholder] --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index c64a4f20b3..6f68dd7682 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1476. [placeholder] + 1475. [port] Probe for old sprintf(). 1474. [port] Provide strtoul() and memmove() for platforms From 9c1eb2279d715188bf631d98d103f6f81a3c76fb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Jul 2003 03:51:30 +0000 Subject: [PATCH 32/75] 1477. [bug] memory leak using stub zones and TSIG. --- CHANGES | 2 ++ lib/dns/zone.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6f68dd7682..39634ef383 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1477. [bug] memory leak using stub zones and TSIG. + 1476. [placeholder] 1475. [port] Probe for old sprintf(). diff --git a/lib/dns/zone.c b/lib/dns/zone.c index ab09bb8d44..0f09e9fd80 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.391 2003/06/06 06:09:39 marka Exp $ */ +/* $Id: zone.c,v 1.392 2003/07/01 03:51:30 marka Exp $ */ #include @@ -4108,6 +4108,8 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) { if (message != NULL) dns_message_destroy(&message); unlock: + if (key != NULL) + dns_tsigkey_detach(&key); UNLOCK_ZONE(zone); return; } From b589c679027849d3dcc34aa8dd4fc78f583be107 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Jul 2003 06:00:45 +0000 Subject: [PATCH 33/75] 1478. [port] ifconfig.sh didn't account for other virtual interfaces. It now takes a optional arguement to specify the first interface number. [RT #3907] --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index 39634ef383..0ea05c51a6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1478. [port] ifconfig.sh didn't account for other virtual + interfaces. It now takes a optional arguement + to specify the first interface number. [RT #3907] + 1477. [bug] memory leak using stub zones and TSIG. 1476. [placeholder] From 41e021027758c3e29f47da5e73a4aac78cd26a33 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Jul 2003 23:27:51 +0000 Subject: [PATCH 34/75] new draft --- ...t => draft-ietf-dnsext-dns-threats-03.txt} | 294 +++++++++++------- ...t => draft-ietf-dnsext-unknown-rrs-06.txt} | 68 ++-- 2 files changed, 208 insertions(+), 154 deletions(-) rename doc/draft/{draft-ietf-dnsext-dns-threats-02.txt => draft-ietf-dnsext-dns-threats-03.txt} (84%) rename doc/draft/{draft-ietf-dnsext-unknown-rrs-05.txt => draft-ietf-dnsext-unknown-rrs-06.txt} (91%) diff --git a/doc/draft/draft-ietf-dnsext-dns-threats-02.txt b/doc/draft/draft-ietf-dnsext-dns-threats-03.txt similarity index 84% rename from doc/draft/draft-ietf-dnsext-dns-threats-02.txt rename to doc/draft/draft-ietf-dnsext-dns-threats-03.txt index 694f85e510..7b52283b4e 100644 --- a/doc/draft/draft-ietf-dnsext-dns-threats-02.txt +++ b/doc/draft/draft-ietf-dnsext-dns-threats-03.txt @@ -5,10 +5,10 @@ Network Working Group D. Atkins -draft-ietf-dnsext-dns-threats-02.txt IHTFP Consulting +draft-ietf-dnsext-dns-threats-03.txt IHTFP Consulting R. Austein - Bourgeois Dilettant - November 2002 + Grunchweather Associates + June 2003 Threat Analysis Of The Domain Name System @@ -55,9 +55,9 @@ Abstract -Atkins & Austein Expires 10 May 2003 [Page 1] +Atkins & Austein Expires 29 December 2003 [Page 1] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 1. Introduction @@ -93,7 +93,7 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 While a number of detail decisions were yet to be made (and in some cases remade after implementation experience) over the subsequent - eight years, the basic model and design goals have remained fixed. + decade, the basic model and design goals have remained fixed. Nowhere, however, does any of the DNSSEC work attempt to specify in any detail the sorts of attacks against which DNSSEC is intended to @@ -103,17 +103,17 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 published until 1995, for reasons that Bellovin explained in the paper's epilogue [Bellovin95]. - While it may seem a bit strange to publish the threat analysis eight - years after starting work on the protocol designed to defend against + While it may seem a bit strange to publish the threat analysis a + decade after starting work on the protocol designed to defend against it, that is nevertheless what this note attempts to do. Better late than never. -Atkins & Austein Expires 10 May 2003 [Page 2] +Atkins & Austein Expires 29 December 2003 [Page 2] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 This note assumes that the reader is familiar with both the DNS and @@ -121,12 +121,12 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 For purposes of discussion, this note uses the term "DNSSEC" to refer to the core hierarchical public key and signature mechanism specified - in the DNSSEC documents, and refer to TKEY and TSIG as separate + in the DNSSEC documents, and refers to TKEY and TSIG as separate mechanisms, even though TKEY and TSIG are also part of the larger problem of "securing DNS" and thus are often considered part of the overall set of "DNS security extensions". This is an arbitrary distinction that in part reflects the way in which the protocol has - evolved (introduction of a putatively simpler transaction model + evolved (introduction of a putatively simpler transaction model for certain operations), and perhaps should be changed in a future revision of this note. @@ -153,8 +153,8 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 may just be a means to an end for the attacker: the attacker might even chose to return the correct result in the answer section of a reply message while using other parts of the message to set the stage - for something more complicated, for example, a name-based attack - (q.v., below). + for something more complicated, for example, a name-based attack (see + below). While it certainly would be possible to sign DNS messages using TSIG or IPsec, or even to encrypt them using IPsec, this would not be a @@ -167,9 +167,9 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 -Atkins & Austein Expires 10 May 2003 [Page 3] +Atkins & Austein Expires 29 December 2003 [Page 3] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 be prohibitively high. Even more important, however, is that the @@ -192,7 +192,7 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 Note that DNSSEC does not provide any protection against modification of the DNS message header, so any properly paranoid resolver must: - - Perform all all of the DNSSEC signature checking on its own, + - Perform all of the DNSSEC signature checking on its own, - Use TSIG (or some equivalent mechanism) to insure the integrity of its communication with whatever name servers it chooses to trust, @@ -223,9 +223,9 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 -Atkins & Austein Expires 10 May 2003 [Page 4] +Atkins & Austein Expires 29 December 2003 [Page 4] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 most likely to be successful when the victim is in a known state, @@ -268,22 +268,24 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 The general form of a name-based attack is something like this: - Victim issues a query, perhaps at the instigation of the attacker - or some third party; in some the query itself may be unrelated to - the name under attack (ie, the attacker is just using this query as - a means to inject false information about some other name). + or some third party; in some cases the query itself may be + unrelated to the name under attack (that is, the attacker is just + using this query as a means to inject false information about some + other name). - Attacker injects response, whether via packet interception, query guessing, or by being a legitimate name server that's involved at some point in the process of answering the query that the victim - issued. -Atkins & Austein Expires 10 May 2003 [Page 5] +Atkins & Austein Expires 29 December 2003 [Page 5] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 + issued. + - Attacker's response includes one or more RRs with DNS names in their RDATA; depending on which particular form this attack takes, the object may be to inject false data associated with those names @@ -330,16 +332,16 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 Another variation on the packet interception attack is the trusted server that turns out not to be so trustworthy, whether by accident or by intent. Many client machines are only configured with stub + + + +Atkins & Austein Expires 29 December 2003 [Page 6] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + resolvers, and use trusted servers to perform all of their DNS queries on their behalf. In many cases the trusted server is - - - -Atkins & Austein Expires 10 May 2003 [Page 6] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - furnished by the user's ISP and advertised to the client via DHCP or PPP options. Besides accidental betrayal of this trust relationship (via server bugs, successful server break-ins, etc), the server @@ -387,15 +389,14 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 some cases can also increase the number of messages needed to answer a query. TSIG (and similar mechanisms) have equivalent problems. - DNS servers are also at risk of being used as denial of service - -Atkins & Austein Expires 10 May 2003 [Page 7] +Atkins & Austein Expires 29 December 2003 [Page 7] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 + DNS servers are also at risk of being used as denial of service amplifiers, since DNS response packets tend to be significantly longer than DNS query packets. Unsurprisingly, DNSSEC doesn't help here either. @@ -414,9 +415,10 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 Arguably, in some cases, even the immediate failure of a missing RR might be considered a problem. The question remains: how serious is this threat? Clearly the threat does exist; general paranoia says - that some day it'll be on the front page of the New York Times, even - if we cannot conceive of a plausible scenario involving this attack - today. This implies that some mitigation of this risk is required. + that some day it'll be on the front page of some major newspaper, + even if we cannot conceive of a plausible scenario involving this + attack today. This implies that some mitigation of this risk is + required. Note that it's necessary to prove the non-existance of applicable wildcard RRs as part of the authenticated denial mechanism, and that, @@ -442,16 +444,17 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 - We need to prove the non-existance of any RRs which, if they existed, would make the wildcard RR irrelevant according to the + + + +Atkins & Austein Expires 29 December 2003 [Page 8] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + synthesis rules the way in which wildcards are used (that is, we need to prove that the synthesis rule is applicable). - - -Atkins & Austein Expires 10 May 2003 [Page 8] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - Note that this makes the wildcard proof mechanism dependent upon the authenticated denial mechanism described in the previous section. @@ -497,17 +500,17 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 come close to adequately specifying how the root key rolls over, or even how it's configured in the first place. + + + +Atkins & Austein Expires 29 December 2003 [Page 9] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + - DNSSEC creates a requirement of loose time synchronization between the resolver and the host creating the DNSSEC signatures. Prior to DNSSEC, all time-related actions in DNS could be performed by a - - - -Atkins & Austein Expires 10 May 2003 [Page 9] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - machine that only knew about "elapsed" or "relative" time. Because the validity period of a DNSSEC signature is based on "absolute" time, a resolver must have the same concept of absolute time in @@ -533,9 +536,10 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 make DNSSEC's wildcard proof mechanisms more or less fragile. -4. Other issues +4. Topics for Future Work - [Odds and ends that don't yet fit anywhere else, to be revised...] + This section lists a few subjects not covered above which probably + need additional study, additional mechanisms, or both. 4.1. Interactions With Other Protocols @@ -543,7 +547,7 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 the boundaries of the DNS protocol itself, since those are the problems against (some of) which DNSSEC was intended to protect. There are, however, other potential problems at the boundaries where - DNS interacts with other protocols. This topic needs further study. + DNS interacts with other protocols. 4.2. Securing DNS Dynamic Update @@ -552,18 +556,18 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 authenticate the updating client to the server. While TSIG does not scale very well (it requires manual configuration of shared keys between the DNS name server and each TSIG client), it works well in a + + + +Atkins & Austein Expires 29 December 2003 [Page 10] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + limited or closed environment such as a DHCP server updating a local DNS name server. Major issues arise when trying to use dynamic update on a secure - - - -Atkins & Austein Expires 10 May 2003 [Page 10] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - zone. TSIG can similarly be used in a limited fashion to authenticate the client to the server, but TSIG only protects DNS transactions, not the actual data, and the TSIG is not inserted into @@ -595,7 +599,7 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 to be able to remove zones but not add them; Carol may need to be able to add, remove, or modify nodes, but only A records. - NOTE: Scaling properties of the key management problem here is a + Scaling properties of the key management problem here are a particular concern that needs more study. 4.3. Securing DNS Zone Replication @@ -608,18 +612,18 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 DNSSEC does not provide object security, because zones include unsigned NS RRs and glue at delegation points. Use of TSIG to protect zone transfer (AXFR or IXFR) operations provides "channel + + + +Atkins & Austein Expires 29 December 2003 [Page 11] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + security", but still does not provide object security for complete zones, so the trust relationships involved in zone transfer are still very much a hop-by-hop matter of name server operators trusting other name server operators, rather than an end-to-end matter of name - - - -Atkins & Austein Expires 10 May 2003 [Page 11] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - server operators trusting zone administrators. Zone object security was not an explicit design goal of DNSSEC, so @@ -640,51 +644,24 @@ Security Considerations This entire document is about security considerations of the DNS. The authors believe that deploying DNSSEC will help to address some, - but not all, of the known threats to with DNS. + but not all, of the known threats to the DNS. IANA Considerations - None known. + None. Acknowledgments This note is based both previous published works by others and on a number of discussions both public and private over a period of many - years, but particular thanks go to Steve Bellovin, Dan Bernstein, - Randy Bush, Olafur Gudmundsson, Allison Mankin, Paul Vixie, and any - other members of the DNS, DNSSEC, DNSIND, and DNSEXT working groups - whose names and contributions the authors have forgotten, none of - whom are responsible for what the authors did with their ideas. + years, but particular thanks go to Jaap Akkerhuis, Steve Bellovin, + Dan Bernstein, Randy Bush, Olafur Gudmundsson, Rip Loomis, Allison + Mankin, Paul Mockapetris, Mans Nilsson, Paul Vixie, Xunhua Wang, and + any other members of the DNS, DNSSEC, DNSIND, and DNSEXT working + groups whose names and contributions the authors have forgotten, none + of whom are responsible for what the authors did with their ideas. - The authors would also like to thank Paul Mockapetris and Xunhua - Wang, both of whom sent useful information to the authors, about - which the authors have, as yet, done absolutely nothing. We were - listening, really, we just ran out of time before the draft deadline. - -References - - [Bellovin95] Bellovin, S., "Using the Domain Name System for System - Break-Ins", Proceedings of the Fifth Usenix Unix Security - Symposium, June 1995. - - - - - -Atkins & Austein Expires 10 May 2003 [Page 12] - -draft-ietf-dnsext-dns-threats-02.txt November 2002 - - - [Galvin93] Design team meeting summary message posted to dns- - security@tis.com mailing list by Jim Galvin on 19 November 1993. - - [Schuba93] Schuba, C., "Addressing Weaknesses in the Domain Name - System Protocol", Master's thesis, Purdue University Department - of Computer Sciences, August 1993. - - [Vixie95] Vixie, P, "DNS and BIND Security Issues", Proceedings of - the Fifth Usenix Unix Security Symposium, June 1995. +Normative References [DNS-CONCEPTS] Mockapetris, P., "Domain names - concepts and facilities", RFC 1034, November 1987. @@ -692,10 +669,17 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 [DNS-IMPLEMENTATION] Mockapetris, P., "Domain names - implementation and specification", RFC 1035, November 1987. + + +Atkins & Austein Expires 29 December 2003 [Page 12] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + [HOST-REQUIREMENTS] Braden, R., Editor, "Requirements for Internet Hosts - Application and Support", RFC 1123, October 1989. - [DNS-CLARIFY] Elz, R., and Bush, R., "Clarifications to the DNS + [DNS-CLARIFY] Elz, R., and R. Bush, "Clarifications to the DNS Specification" RFC 2181, July 1997. [NCACHE] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)" @@ -707,7 +691,7 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 [EDNS0] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC 2671, August 1999. - [TSIG] Vixie, P., Gudmundsson, O., Eastlake, D., and Wellington, B., + [TSIG] Vixie, P., Gudmundsson, O., Eastlake, D., and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)" RFC 2845, May 2000. @@ -723,24 +707,40 @@ draft-ietf-dnsext-dns-threats-02.txt November 2002 [DNSSEC-ZONE-STATUS] Lewis, E., "DNS Security Extension Clarification on Zone Status" RFC 3090, March 2001. +Informative References + + [Bellovin95] Bellovin, S., "Using the Domain Name System for System + Break-Ins", Proceedings of the Fifth Usenix Unix Security + Symposium, June 1995. + + [Galvin93] Design team meeting summary message posted to dns- + security@tis.com mailing list by Jim Galvin on 19 November 1993. + + [Schuba93] Schuba, C., "Addressing Weaknesses in the Domain Name + System Protocol", Master's thesis, Purdue University Department + of Computer Sciences, August 1993. + + [Vixie95] Vixie, P, "DNS and BIND Security Issues", Proceedings of + the Fifth Usenix Unix Security Symposium, June 1995. -Atkins & Austein Expires 10 May 2003 [Page 13] + +Atkins & Austein Expires 29 December 2003 [Page 13] -draft-ietf-dnsext-dns-threats-02.txt November 2002 +draft-ietf-dnsext-dns-threats-03.txt June 2003 [SEC-CONS] Rescorla, E., Korver, B., and the Internet Architecture Board, "Guidelines for Writing RFC Text on Security - Considerations", work in progress (draft-iab-sec-cons-01.txt), - October 2002. + Considerations", work in progress (draft-iab-sec-cons-03.txt), + January 2003. Author's addresses: Derek Atkins - IHTFP Consulting + IHTFP Consulting, Inc. 6 Farragut Ave Somerville, MA 02144 USA @@ -748,9 +748,50 @@ Author's addresses: Email: derek@ihtfp.com Rob Austein + Grunchweather Associates Email: sra@hactrn.net +Full Copyright Statement + + Copyright (C) The Internet Society (2003). All Rights Reserved. + + This document and translations of it may be copied and furnished to + others, and derivative works that comment on or otherwise explain it + or assist in its implementation may be prepared, copied, published + and distributed, in whole or in part, without restriction of any + kind, provided that the above copyright notice and this paragraph are + included on all such copies and derivative works. However, this + document itself may not be modified in any way, such as by removing + the copyright notice or references to the Internet Society or other + Internet organizations, except as needed for the purpose of + developing Internet standards in which case the procedures for + copyrights defined in the Internet Standards process must be + followed, or as required to translate it into languages other than + English. + + The limited permissions granted above are perpetual and will not be + revoked by the Internet Society or its successors or assigns. + + This document and the information contained herein is provided on an + "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING + TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION + HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + + + + +Atkins & Austein Expires 29 December 2003 [Page 14] + +draft-ietf-dnsext-dns-threats-03.txt June 2003 + + +Acknowledgement + + Funding for the RFC Editor function is currently provided by the + Internet Society. @@ -783,4 +824,19 @@ Author's addresses: -Atkins & Austein Expires 10 May 2003 [Page 14] + + + + + + + + + + + + + + + +Atkins & Austein Expires 29 December 2003 [Page 15] diff --git a/doc/draft/draft-ietf-dnsext-unknown-rrs-05.txt b/doc/draft/draft-ietf-dnsext-unknown-rrs-06.txt similarity index 91% rename from doc/draft/draft-ietf-dnsext-unknown-rrs-05.txt rename to doc/draft/draft-ietf-dnsext-unknown-rrs-06.txt index 54412bb008..23d45e99e1 100644 --- a/doc/draft/draft-ietf-dnsext-unknown-rrs-05.txt +++ b/doc/draft/draft-ietf-dnsext-unknown-rrs-06.txt @@ -1,7 +1,7 @@ INTERNET-DRAFT Andreas Gustafsson -draft-ietf-dnsext-unknown-rrs-05.txt Nominum Inc. - March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt Nominum Inc. + June 2003 Updates: RFC 1034, RFC 2163, RFC 2535 @@ -50,9 +50,9 @@ Abstract -Expires September 2003 [Page 1] +Expires December 2003 [Page 1] -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 Because the deployment of new server software is slow and expensive, @@ -106,9 +106,9 @@ draft-ietf-dnsext-unknown-rrs-05.txt March 2003 -Expires September 2003 [Page 2] +Expires December 2003 [Page 2] -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 To avoid such corruption, servers MUST NOT compress domain names @@ -162,9 +162,9 @@ draft-ietf-dnsext-unknown-rrs-05.txt March 2003 -Expires September 2003 [Page 3] +Expires December 2003 [Page 3] -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 An unsigned decimal integer specifying the @@ -218,9 +218,9 @@ draft-ietf-dnsext-unknown-rrs-05.txt March 2003 -Expires September 2003 [Page 4] +Expires December 2003 [Page 4] -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 As a result, when a new RR type contains one or more embedded domain @@ -274,9 +274,9 @@ draft-ietf-dnsext-unknown-rrs-05.txt March 2003 -Expires September 2003 [Page 5] +Expires December 2003 [Page 5] -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 8. Additional Section Processing @@ -288,10 +288,7 @@ draft-ietf-dnsext-unknown-rrs-05.txt March 2003 9. IANA Considerations - The IANA is hereby requested to verify that specifications for new RR - types requesting an RR type number comply with this specification. - In particular, the IANA MUST NOT assign numbers to new RR types whose - specification allows embedded domain names to be compressed. + This document does not require any IANA actions. 10. Security Considerations @@ -327,17 +324,17 @@ Non-normative References Name System, C. Davis, P. Vixie, T. Goodwin, I. Dickinson, January 1996. - - - -Expires September 2003 [Page 6] - -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 - - [RFC2052] - A DNS RR for specifying the location of services (DNS SRV), A. Gulbrandsen, P. Vixie, October 1996. Obsoleted by RFC2782. + + + +Expires December 2003 [Page 6] + +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 + + [RFC2136] - Dynamic Updates in the Domain Name System (DNS UPDATE), P. Vixie, Ed., S. Thomson, Y. Rekhter, J. Bound, April 1997. @@ -359,7 +356,7 @@ Author's Address Full Copyright Statement - Copyright (C) The Internet Society (2001 - 2002). All Rights Reserved. + Copyright (C) The Internet Society (2001 - 2003). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it @@ -383,18 +380,17 @@ Full Copyright Statement TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - - - -Expires September 2003 [Page 7] - -draft-ietf-dnsext-unknown-rrs-05.txt March 2003 - - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." Intellectual Property Statement + + +Expires December 2003 [Page 7] + +draft-ietf-dnsext-unknown-rrs-06.txt June 2003 + + The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this @@ -442,6 +438,8 @@ Intellectual Property Statement -Expires September 2003 [Page 8] - + + + +Expires December 2003 [Page 8] From edc6991f4be00dc2692e6f0fd58c3950a4f050ab Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 2 Jul 2003 04:00:40 +0000 Subject: [PATCH 35/75] 1471. [bug] libbind: updated to BIND 8.4.0. --- lib/bind/resolv/res_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/bind/resolv/res_init.c b/lib/bind/resolv/res_init.c index 703eb4db4d..fd5eb91131 100644 --- a/lib/bind/resolv/res_init.c +++ b/lib/bind/resolv/res_init.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.13 2003/06/03 04:39:34 marka Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.14 2003/07/02 04:00:40 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -661,6 +661,7 @@ res_setservers(res_state statp, const union res_sockaddr_union *set, int cnt) { nserv++; break; +#ifdef HAS_INET6_STRUCTS case AF_INET6: size = sizeof(set->sin6); if (statp->_u._ext.ext) @@ -673,6 +674,7 @@ res_setservers(res_state statp, const union res_sockaddr_union *set, int cnt) { statp->nsaddr_list[nserv].sin_family = 0; nserv++; break; +#endif default: break; @@ -707,6 +709,7 @@ res_getservers(res_state statp, union res_sockaddr_union *set, int cnt) { size); break; +#ifdef HAS_INET6_STRUCTS case AF_INET6: size = sizeof(set->sin6); if (statp->_u._ext.ext) @@ -717,6 +720,7 @@ res_getservers(res_state statp, union res_sockaddr_union *set, int cnt) { memcpy(&set->sin6, &statp->nsaddr_list[i], size); break; +#endif default: set->sin.sin_family = 0; From 3425cd6803ca599c4c1ebf7cab7399f0b6913842 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 3 Jul 2003 00:43:28 +0000 Subject: [PATCH 36/75] 1473. [bug] create_map() and create_string() failed to handle out of memory cleanup. [RT #6813] --- CHANGES | 2 +- lib/isccfg/parser.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 0ea05c51a6..b48773d455 100644 --- a/CHANGES +++ b/CHANGES @@ -11,7 +11,7 @@ 1474. [port] Provide strtoul() and memmove() for platforms without them. -1473. [bug] free_map() and free_string() failed to handle out +1473. [bug] create_map() and create_string() failed to handle out of memory cleanup. [RT #6813] 1472. [contrib] idnkit-1.0 from JPNIC, replaces mdnkit. diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 36ca35c0a9..2c4e435573 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: parser.c,v 1.108 2003/06/20 02:50:48 marka Exp $ */ +/* $Id: parser.c,v 1.109 2003/07/03 00:43:28 marka Exp $ */ #include @@ -674,7 +674,7 @@ create_string(cfg_parser_t *pctx, const char *contents, const cfg_type_t *type, obj->value.string.length = len; obj->value.string.base = isc_mem_get(pctx->mctx, len + 1); if (obj->value.string.base == 0) { - CLEANUP_OBJ(obj); + isc_mem_put(pctx->mctx, obj, sizeof(*obj)); return (ISC_R_NOMEMORY); } memcpy(obj->value.string.base, contents, len); @@ -793,9 +793,8 @@ print_qstring(cfg_printer_t *pctx, cfg_obj_t *obj) { static void free_string(cfg_parser_t *pctx, cfg_obj_t *obj) { - if (obj->value.string.base != NULL) - isc_mem_put(pctx->mctx, obj->value.string.base, - obj->value.string.length + 1); + isc_mem_put(pctx->mctx, obj->value.string.base, + obj->value.string.length + 1); } isc_boolean_t @@ -2226,14 +2225,14 @@ create_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { return (ISC_R_SUCCESS); cleanup: - CLEANUP_OBJ(obj); + if (obj != NULL) + isc_mem_put(pctx->mctx, obj, sizeof(*obj)); return (result); } static void free_map(cfg_parser_t *pctx, cfg_obj_t *obj) { - if (obj->value.map.id != NULL) - CLEANUP_OBJ(obj->value.map.id); + CLEANUP_OBJ(obj->value.map.id); isc_symtab_destroy(&obj->value.map.symtab); } From ad4b2f37e0f51a90c160edbe8633589ce42e60b9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 3 Jul 2003 01:50:25 +0000 Subject: [PATCH 37/75] 1479. [bug] cfg_create_tuple() failed to handle out of memory cleanup. parse_list() would leak memory on syntax errors. --- CHANGES | 4 ++++ lib/isccfg/parser.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index b48773d455..7c0c114e9a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1479. [bug] cfg_create_tuple() failed to handle out of + memory cleanup. parse_list() would leak memory + on syntax errors. + 1478. [port] ifconfig.sh didn't account for other virtual interfaces. It now takes a optional arguement to specify the first interface number. [RT #3907] diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 2c4e435573..903c684d7a 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: parser.c,v 1.109 2003/07/03 00:43:28 marka Exp $ */ +/* $Id: parser.c,v 1.110 2003/07/03 01:50:25 marka Exp $ */ #include @@ -216,7 +216,8 @@ cfg_create_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { return (ISC_R_SUCCESS); cleanup: - CLEANUP_OBJ(obj); + if (obj != NULL) + isc_mem_put(pctx->mctx, obj, sizeof(*obj)); return (result); } @@ -973,24 +974,26 @@ parse_list(cfg_parser_t *pctx, const cfg_type_t *listtype, cfg_obj_t **ret) cfg_obj_t *listobj = NULL; const cfg_type_t *listof = listtype->of; isc_result_t result; + cfg_listelt_t *elt = NULL; CHECK(cfg_create_list(pctx, listtype, &listobj)); for (;;) { - cfg_listelt_t *elt = NULL; - CHECK(cfg_peektoken(pctx, 0)); if (pctx->token.type == isc_tokentype_special && - pctx->token.value.as_char == '}') + pctx->token.value.as_char == /*{*/ '}') break; CHECK(cfg_parse_listelt(pctx, listof, &elt)); CHECK(parse_semicolon(pctx)); ISC_LIST_APPEND(listobj->value.list, elt, link); + elt = NULL; } *ret = listobj; return (ISC_R_SUCCESS); cleanup: + if (elt != NULL) + free_list_elt(pctx, elt); CLEANUP_OBJ(listobj); return (result); } @@ -1303,7 +1306,6 @@ parse_symtab_elt(cfg_parser_t *pctx, const char *name, CHECK(isc_symtab_define(symtab, name, 1, symval, isc_symexists_reject)); - obj = NULL; return (ISC_R_SUCCESS); cleanup: From 5e4f63dbc118e143316c9a7759446c8d426148e4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 4 Jul 2003 04:38:54 +0000 Subject: [PATCH 38/75] error path could trigger a REQUIRE failure in ns_client_next. --- bin/named/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/named/client.c b/bin/named/client.c index df14047736..9ac61d7772 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: client.c,v 1.215 2003/02/26 02:03:57 marka Exp $ */ +/* $Id: client.c,v 1.216 2003/07/04 04:38:54 marka Exp $ */ #include @@ -613,7 +613,8 @@ ns_client_next(ns_client_t *client, isc_result_t result) { int newstate; REQUIRE(NS_CLIENT_VALID(client)); - REQUIRE(client->state == NS_CLIENTSTATE_WORKING); + REQUIRE(client->state == NS_CLIENTSTATE_WORKING || + client->state == NS_CLIENTSTATE_READING); CTRACE("next"); From 5798e5b3d452ece4494aa64cecfc553efa27ba11 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 4 Jul 2003 05:21:47 +0000 Subject: [PATCH 39/75] update WIDE copyright notice. --- lib/lwres/getnameinfo.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/lwres/getnameinfo.c b/lib/lwres/getnameinfo.c index 473fcf3ca5..0fd6aa1e65 100644 --- a/lib/lwres/getnameinfo.c +++ b/lib/lwres/getnameinfo.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getnameinfo.c,v 1.31 2003/04/11 07:25:29 marka Exp $ */ +/* $Id: getnameinfo.c,v 1.32 2003/07/04 05:21:47 marka Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -29,11 +29,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by WIDE Project and - * its contributors. - * 4. Neither the name of the project nor the names of its contributors + * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From 09d793b97d5b35c7623815214ea9d04c9fce5cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatuya=20JINMEI=20=E7=A5=9E=E6=98=8E=E9=81=94=E5=93=89?= Date: Fri, 4 Jul 2003 08:24:29 +0000 Subject: [PATCH 40/75] Name Status Whom rt6539 review ??? (I'm not sure if this system is still alive...) --- doc/private/branches | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/private/branches b/doc/private/branches index c995b10c42..1c8675fac9 100644 --- a/doc/private/branches +++ b/doc/private/branches @@ -1,5 +1,6 @@ Name Status Whom ------------------------------------ +rt6539 review ??? libbind_clean open jinmei rt3746 open marka v6source From a947b0145f388e5469f261c4292c4c2ac624fc1b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 8 Jul 2003 05:17:20 +0000 Subject: [PATCH 41/75] convert bit-string labels to nibbles. --- bin/tests/system/lwresd/ns1/example1.db | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/lwresd/ns1/example1.db b/bin/tests/system/lwresd/ns1/example1.db index 92f60f27ab..939fb6c5c7 100644 --- a/bin/tests/system/lwresd/ns1/example1.db +++ b/bin/tests/system/lwresd/ns1/example1.db @@ -13,7 +13,7 @@ ; NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION ; WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -; $Id: example1.db,v 1.12 2002/11/27 09:52:46 marka Exp $ +; $Id: example1.db,v 1.13 2003/07/08 05:17:20 marka Exp $ $TTL 300 ; 5 minutes @ IN SOA mname1. . ( @@ -30,8 +30,8 @@ a A 10.0.1.1 a2 CNAME a a3 CNAME nowhere b AAAA eeee:eeee:eeee:eeee:ffff:ffff:ffff:ffff -\[x7788/16] DNAME net -\[x99aabbccddeeff00/64].net PTR dname +8.8.7.7 DNAME net +0.0.f.f.e.e.d.d.c.c.b.b.a.a.9.9.net PTR dname e A 10.0.1.1 SIG A 1 1 300 20001202003412 ( 20001102003412 1 example. abcd ) From dbd34ac1d053d04a0271ef7a12bd47c8c7c415e1 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 9 Jul 2003 03:28:44 +0000 Subject: [PATCH 42/75] remove potential file descriptor leak --- lib/isc/win32/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 25c00101a2..fa9da80d86 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.21 2002/08/06 03:32:53 mayer Exp $ */ +/* $Id: socket.c,v 1.22 2003/07/09 03:28:44 marka Exp $ */ /* This code has been rewritten to take advantage of Windows Sockets * I/O Completion Ports and Events. I/O Completion Ports is ONLY @@ -1805,6 +1805,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, case isc_sockettype_udp: sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP); if (connection_reset_fix(sock->fd) != ISC_R_SUCCESS) { + closesocket(sock->fd); free_socket(&sock); return (ISC_R_UNEXPECTED); } From d8014b55f2b8f8acf836dfa4d074c747fd036ae3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 9 Jul 2003 21:58:32 +0000 Subject: [PATCH 43/75] new draft --- ...-dnsext-dnssec-2535typecode-change-03.txt} | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) rename doc/draft/{draft-ietf-dnsext-dnssec-2535typecode-change-02.txt => draft-ietf-dnsext-dnssec-2535typecode-change-03.txt} (87%) diff --git a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-03.txt similarity index 87% rename from doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt rename to doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-03.txt index daea79c59a..dd2170b2ee 100644 --- a/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-02.txt +++ b/doc/draft/draft-ietf-dnsext-dnssec-2535typecode-change-03.txt @@ -1,10 +1,11 @@ INTERNET-DRAFT Samuel Weiler -Expires: December 2003 June 12, 2003 +Expires: December 2003 June 29, 2003 Updates: RFC 2535, [DS] Legacy Resolver Compatibility for Delegation Signer - draft-ietf-dnsext-dnssec-2535typecode-change-02.txt + draft-ietf-dnsext-dnssec-2535typecode-change-03.txt + Status of this Memo @@ -44,12 +45,16 @@ Abstract these interactions be avoided by changing the type codes and mnemonics of the DNSSEC RRs (SIG, KEY, and NXT). +Changes between 02 and 03: + + KEY (as well as SIG) retained for SIG(0) use only. + Changes between 01 and 02: SIG(0) still uses SIG, not RRSIG. Added 2931 reference. Domain names embedded in NSECs and RRSIGs are not compressible and - are not downcased. Added unknown-rrs reference. + are not downcased. Added unknown-rrs reference (as informative). Simplified the last paragraph of section 3 (NSEC doesn't always signal a negative answer). @@ -89,11 +94,11 @@ Changes between 01 and 02: This document addresses a specific problem caused by Delegation Signer's [DS] introduction of new semantics for the NXT RR that are - incompatible with the semantics in [RFC2535]. Answers provided by - DS-aware servers can trigger an unacceptable failure mode in some - resolvers that implement RFC 2535, which provides a great - disincentive to sign zones with DS. The proposed solution allows - for the incremental deployment of DS. + incompatible with the semantics in RFC 2535 [RFC2535]. Answers + provided by DS-aware servers can trigger an unacceptable failure + mode in some resolvers that implement RFC 2535, which provides a + great disincentive to sign zones with DS. The proposed solution + allows for the incremental deployment of DS. 1.1 Terminology @@ -108,15 +113,15 @@ Changes between 01 and 02: 1.2 The Problem - Delegation Signer [DS] introduces new semantics for the NXT RR that - are incompatible with the semantics in [RFC2535]. In [RFC2535], - NXT records were only required to be returned as part of a + Delegation Signer introduces new semantics for the NXT RR that are + incompatible with the semantics in RFC 2535. In RFC 2535, NXT + records were only required to be returned as part of a non-existence proof. With DS, an unsecure referral returns, in addition to the NS, a proof of non-existence of a DS RR in the form of an NXT and SIG(NXT). RFC 2535 didn't specify how a resolver was to interpret a response with both an NS and an NXT in the authority - section and with NOERROR or NODATA set. Some widely deployed - 2535-aware resolvers interpret any answer with an NXT as a proof of + section, RCODE=0, and AA=0. Some widely deployed 2535-aware + resolvers interpret any answer with an NXT as a proof of non-existence of the requested record. This results in unsecure delegations being invisible to 2535-aware resolvers and violates the basic architectural principle that DNSSEC must do no harm -- @@ -164,7 +169,7 @@ Changes between 01 and 02: called "DA"), and having authoritative servers send DNSSEC data only in response to queries with the DA bit set, would accomplish this. This bit would presumably supplant the DO bit described in - [RFC3225]. + RFC 3225. This solution is sufficient only if all 2535-aware resolvers zero out EDNS0 flags that they don't understand. If one passed through @@ -177,16 +182,16 @@ Changes between 01 and 02: 2.4. Increment the EDNS version Another proposed solution is to increment the EDNS version number - as defined in [RFC2671], on the assumption that all existing - implementations will reject higher versions than they support, - and retain the DO bit as the signal for DNSSEC awareness. This - approach has not been tested. + as defined in RFC 2671 [RFC2671], on the assumption that all + existing implementations will reject higher versions than they + support, and retain the DO bit as the signal for DNSSEC awareness. + This approach has not been tested. 2.5. Do nothing There is a large deployed base of DNS resolvers that understand - DNSSEC as defined by the standards track [RFC2535] and [RFC2065] - and, due to underspecification in those documents, interpret any + DNSSEC as defined by the standards track RFC 2535 and RFC 2065 + and, due to under specification in those documents, interpret any answer with an NXT as a non-existence proof. So long as that is the case, zone owners will have a strong incentive to not sign any zones that contain unsecure delegations, lest those delegations be @@ -219,10 +224,10 @@ Changes between 01 and 02: application use, per [RFC3445]. RRSIG (Resource Record SIGnature) will replace SIG, and NSEC (Next SECure) will replace NXT. These new types completely replace the old types, except that SIG(0) - [RFC2931] will continue to use SIG. + [RFC2931] will continue to use SIG and KEY. The new types will have exactly the same syntax and semantics as - specified for SIG, KEY, and NXT in [RFC2535] and [DS] except for + specified for SIG, KEY, and NXT in RFC 2535 and [DS] except for the following: 1) Consistent with [UNKNOWN-RRs], domain names embedded in @@ -239,11 +244,12 @@ Changes between 01 and 02: unknown RRs and SHOULD NOT assign any special semantic value to them. It MUST NOT use them for DNSSEC validations or other DNS operational decision making. For example, a resolver MUST NOT use - DNSKEYs to validate SIGs or use KEYs to validate RRSIGs. - Authoritative servers SHOULD NOT serve SIG, KEY, or NXT records. - If those records are included, they MUST NOT receive special - treatment. As an example, if a SIG is included in a signed zone, - there MUST be an RRSIG for it. + DNSKEYs to validate SIGs or use KEYs to validate RRSIGs. If SIG, + KEY, or NXT RRs are included in a zone, they MUST NOT receive + special treatment. As an example, if a SIG is included in a signed + zone, there MUST be an RRSIG for it. Authoritative servers may + wish to give error messages when loading zones containing SIG or + NXT records (KEY records may be included for SIG(0)). As a clarification to previous documents, some positive responses, particularly wildcard proofs and unsecure referrals, will contain @@ -256,8 +262,8 @@ Changes between 01 and 02: Types by assigning types 46, 47, and 48 to the RRSIG, NSEC, and DNSKEY RRs, respectively. - Types 24 (SIG) is retained for SIG(0) [RFC2931] use only. Types 25 - and 30 (KEY and NXT) should be marked as Obsolete. + Types 24 and 25 (SIG and KEY) are retained for SIG(0) [RFC2931] + use only. Type 30 (NXT) should be marked as Obsolete. 5. Security Considerations @@ -312,7 +318,6 @@ Changes between 01 and 02: Record Types. draft-ietf-dnsext-unknown-rrs-05.txt Publication as RFC pending. - 8. Acknowledgments The proposed solution and the analysis of alternatives had many @@ -330,9 +335,9 @@ Changes between 01 and 02: 9. Author's Address Samuel Weiler - Network Associates Laboratories - 15204 Omega Dr., Suite 300 - Rockville, MD 20850 + SPARTA, Inc. + 7075 Samuel Morse Drive + Columbia, MD 21046 USA weiler@tislabs.com From a60f32928e486c147fa66d74ba02eda74a5d1d42 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 16 Jul 2003 00:03:45 +0000 Subject: [PATCH 44/75] add support for making snapshots of branches --- util/kit.sh | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/util/kit.sh b/util/kit.sh index f38a300722..497be31aa8 100644 --- a/util/kit.sh +++ b/util/kit.sh @@ -15,7 +15,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: kit.sh,v 1.24 2003/04/08 05:55:21 marka Exp $ +# $Id: kit.sh,v 1.25 2003/07/16 00:03:45 marka Exp $ # Make a release kit # @@ -30,16 +30,31 @@ arg=-r case $# in - 2) tag=$1; tmpdir=$2 ;; - *) echo "usage: sh kit.sh cvstag tmpdir" >&2 + 3) + case "$1" in + snapshot) ;; + *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2 + exit 1 + ;; + esac + snapshot=true; + releasetag=$2 + tag=$2 + tmpdir=$3 + ;; + 2) + tag=$1 + tmpdir=$2 + case $tag in + snapshot) tag=HEAD; snapshot=true ; releasetag="" ;; + *) snapshot=false ;; + esac + ;; + *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2 exit 1 ;; esac -case $tag in - snapshot) tag=HEAD; snapshot=true ;; - *) snapshot=false ;; -esac test -d $tmpdir || @@ -59,7 +74,7 @@ then set `date -u +'%Y%m%d%H%M%S %Y/%m/%d %H:%M:%S UTC'` dstamp=$1 RELEASETYPE=s - RELEASEVER=$dstamp + RELEASEVER=${dstamp}${releasetag} shift tag="$@" arg=-D From 5585e5da649f170b57a6b70d2014729956c621a7 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Wed, 16 Jul 2003 15:48:21 +0000 Subject: [PATCH 45/75] add a bit of ADB background --- doc/dev/HOW-ADB-WORKS.txt | 130 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 doc/dev/HOW-ADB-WORKS.txt diff --git a/doc/dev/HOW-ADB-WORKS.txt b/doc/dev/HOW-ADB-WORKS.txt new file mode 100644 index 0000000000..9dc80c7cf8 --- /dev/null +++ b/doc/dev/HOW-ADB-WORKS.txt @@ -0,0 +1,130 @@ +$Id: HOW-ADB-WORKS.txt,v 1.1 2003/07/16 15:48:21 explorer Exp $ + +Recently, several groups have expressed concern over potential +denial of service attacks within BIND 9, specifically within the ADB +(address database.) This document hopes to provide a more clear +picture of how the ADB works, and what sort of attacks are less likely +due to its use. + +We will describe two scenarios, one with two CPUs (and therefore two +worker threads in BIND 9) and one with a single CPU (and therefore one +worker thread.) The two CPU scenario scales to N CPUs. + +ADB OVERVIEW +============ + +The ADB acts as a cache for nameserver lookups. If BIND 9 wishes to +contact host ns1.example.com, it looks this name up in the ADB. It +will either return a set of addresses (if known) or return a result +indicating a callback will occur when the data is found. + +ADB query, data not found, no fetches pending +--------------------------------------------- + +The name is hashed to find the "bucket" the name exists in. Each +bucket is a linked list of names. There are 1009 buckets in the ADB. + +Once the bucket is found, it is locked. + +The linked list is searched to see if any addresses are known for the +name. If no information is found, a new fetch is started to find the +addresses for this name. + +The bucket is unlocked. + +At some point, a callback occurs. The end result is either a set of +addresses for this name, or failure. + +NOTE: The bucket is NOT locked while the fetch is in progress. + +ADB query, no data found, fetches pending +----------------------------------------- + +The name is hashed to find the "bucket" the name exists in. Each +bucket is a linked list of names. There are 1009 buckets in the ADB. + +Once the bucket is found, it is locked. + +The linked list is searched to see if any addresses are known for the +name. If an in-progress fetch is found, we schedule a callback when +the fetch completes. This means ONE fetch is in progress for any +specific name. + +The bucket is unlocked. + +At some point, a callback occurs. The end result is either a set of +addresses for this name, or failure. + +NOTE: The bucket is NOT locked while the fetch is in progress. + +ADB query, addresses found +-------------------------- + +The name is hashed to find the "bucket" the name exists in. Each +bucket is a linked list of names. There are 1009 buckets in the ADB. + +Once the bucket is found, it is locked. + +The linked list is searched. Since addresses are found, they are +copied (referenced, actually) for the caller. + +The bucket is unlocked. + +NOTE: The bucket is NOT locked while the addresses are used by the +caller. + +Summary +------- + +For any single ADB lookup, at most one bucket is locked. If there are +10 worker threads, at most 10 buckets will be locked, and at most 9 +CPUs will be waiting for a lock if they all happen to want the same +bucket. The wait time is fairly small, however, since it consists of: + + a lock + linked list search + perhaps starting a fetch + perhaps copying addresses + an unlock + + +TWO CPUS +======== + +When BIND 9 is told to use two worker threads, each runs independently +of one another until shared data needs to be accessed. One place this +occurs is in the ADB. + +If both worker threads are trying to look up the same name (or two +names that hash to the same ADB bucket) one will have to wait for the +ADB lookup to complete. Note that the lock is NOT held while the +actual DNS fetch for the data is performed. + +If they are looking up different names (that hash to different +buckets) each runs independently. + +This reduces the two CPU case to (at worse) a single CPU performance. + +ONE CPU +======= + +One CPU means one worker thread in operation, so there is no lock +contention. + +N-CPUs +====== + +As described above, a N-CPU configuration will at worse fall back to a +one-CPU scenario while trying to access the same ADB bucket. However, +while the packet is decoded, data is retrieved from authority or cache +data, and while the result is encoded into wire format and transmitted +to the caller, no ADB locks are held, and other CPUs are free to use +it. + +At worse, all the CPUs but one will be blocking on an ADB lock. +However, the time it takes to search authority and cache, decode and +encode a DNS packet is likely larger than the time taken in the ADB +lock, so the worse case is unlikely to occur in practice. + +Also, note that one the data is cached for a given query, the ADB is +not even used until that cache data expires. From 72ddc4cef9c6a6de53aae530dea1ddbb90631131 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 06:24:44 +0000 Subject: [PATCH 46/75] 1480. [bug] Provide replay protection for rndc commands. Full replay protection requires both rndc and named to be updated. Partial replay protection (limited exposure after restart) is provided if just named is updated. --- CHANGES | 6 ++ bin/named/control.c | 4 +- bin/named/controlconf.c | 83 +++++++++++++++++++++++++++- bin/named/include/named/control.h | 3 +- bin/rndc/rndc.c | 91 +++++++++++++++++++++++++++++-- lib/isccc/include/isccc/result.h | 7 ++- lib/isccc/result.c | 5 +- 7 files changed, 186 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index 7c0c114e9a..ce8a7c244c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +1480. [bug] Provide replay protection for rndc commands. Full + replay protection requires both rndc and named to + be updated. Partial replay protection (limited + exposure after restart) is provided if just named + is updated. + 1479. [bug] cfg_create_tuple() failed to handle out of memory cleanup. parse_list() would leak memory on syntax errors. diff --git a/bin/named/control.c b/bin/named/control.c index 914207fa6d..ed7a4cdc43 100644 --- a/bin/named/control.c +++ b/bin/named/control.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: control.c,v 1.17 2002/09/10 05:07:56 marka Exp $ */ +/* $Id: control.c,v 1.18 2003/07/17 06:24:43 marka Exp $ */ #include @@ -127,6 +127,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) { } else if (command_compare(command, NS_COMMAND_TIMERPOKE)) { result = ISC_R_SUCCESS; isc_timermgr_poke(ns_g_timermgr); + } else if (command_compare(command, NS_COMMAND_NULL)) { + result = ISC_R_SUCCESS; } else { isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_CONTROL, ISC_LOG_WARNING, diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 6b57e14651..0b8df3e481 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: controlconf.c,v 1.38 2002/02/20 03:33:14 marka Exp $ */ +/* $Id: controlconf.c,v 1.39 2003/07/17 06:24:43 marka Exp $ */ #include @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include #include @@ -79,6 +81,7 @@ struct controlconnection { isc_timer_t * timer; unsigned char buffer[2048]; controllistener_t * listener; + isc_uint32_t nonce; ISC_LINK(controlconnection_t) link; }; @@ -100,11 +103,14 @@ struct ns_controls { ns_server_t *server; controllistenerlist_t listeners; isc_boolean_t shuttingdown; + isccc_symtab_t *symtab; }; static void control_newconn(isc_task_t *task, isc_event_t *event); static void control_recvmessage(isc_task_t *task, isc_event_t *event); +#define CLOCKSKEW 300 + static void free_controlkey(controlkey_t *key, isc_mem_t *mctx) { if (key->keyname != NULL) @@ -320,6 +326,10 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) { char textarray[1024]; isc_result_t result; isc_result_t eresult; + isccc_sexpr_t *_ctrl; + isccc_time_t sent; + isccc_time_t exp; + isc_uint32_t nonce; REQUIRE(event->ev_type == ISCCC_EVENT_CCMSG); @@ -380,10 +390,64 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) { goto cleanup; } + isc_stdtime_get(&now); + + /* + * Limit exposure to replay attacks. + */ + _ctrl = isccc_alist_lookup(request, "_ctrl"); + if (_ctrl == NULL) { + log_invalid(&conn->ccmsg, ISC_R_FAILURE); + goto cleanup; + } + + if (isccc_cc_lookupuint32(_ctrl, "_tim", &sent) == ISC_R_SUCCESS) { + if ((sent + CLOCKSKEW) < now || (sent - CLOCKSKEW) > now) { + log_invalid(&conn->ccmsg, ISCCC_R_CLOCKSKEW); + goto cleanup; + } + } else { + log_invalid(&conn->ccmsg, ISC_R_FAILURE); + goto cleanup; + } + + /* + * Expire messages that are too old. + */ + if (isccc_cc_lookupuint32(_ctrl, "_exp", &exp) == ISC_R_SUCCESS && + now > exp) { + log_invalid(&conn->ccmsg, ISCCC_R_EXPIRED); + goto cleanup; + } + + /* + * Duplicate suppression (required for UDP). + */ + isccc_cc_cleansymtab(listener->controls->symtab, now); + result = isccc_cc_checkdup(listener->controls->symtab, request, now); + if (result != ISC_R_SUCCESS) { + if (result == ISC_R_EXISTS) + result = ISCCC_R_DUPLICATE; + log_invalid(&conn->ccmsg, result); + goto cleanup; + } + + if (conn->nonce != 0 && + (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS || + conn->nonce != nonce)) { + log_invalid(&conn->ccmsg, ISCCC_R_BADAUTH); + goto cleanup; + } + + /* + * Establish nonce. + */ + while (conn->nonce == 0) + isc_random_get(&conn->nonce); + isc_buffer_init(&text, textarray, sizeof(textarray)); eresult = ns_control_docommand(request, &text); - isc_stdtime_get(&now); result = isccc_cc_createresponse(request, now, now + 60, &response); if (result != ISC_R_SUCCESS) goto cleanup; @@ -409,6 +473,11 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) { } } + _ctrl = isccc_alist_lookup(response, "_ctrl"); + if (_ctrl == NULL || + isccc_cc_defineuint32(_ctrl, "_nonce", conn->nonce) == NULL) + goto cleanup; + ccregion.rstart = conn->buffer + 4; ccregion.rend = conn->buffer + sizeof(conn->buffer); result = isccc_cc_towire(response, &ccregion, &secret); @@ -484,6 +553,7 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) { goto cleanup; conn->listener = listener; + conn->nonce = 0; ISC_LINK_INIT(conn, link); result = isccc_ccmsg_readmessage(&conn->ccmsg, listener->task, @@ -1223,12 +1293,20 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config, isc_result_t ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp) { isc_mem_t *mctx = server->mctx; + isc_result_t result; ns_controls_t *controls = isc_mem_get(mctx, sizeof(*controls)); + if (controls == NULL) return (ISC_R_NOMEMORY); controls->server = server; ISC_LIST_INIT(controls->listeners); controls->shuttingdown = ISC_FALSE; + controls->symtab = NULL; + result = isccc_cc_createsymtab(&controls->symtab); + if (result != ISC_R_SUCCESS) { + isc_mem_put(server->mctx, controls, sizeof(*controls)); + return (result); + } *ctrlsp = controls; return (ISC_R_SUCCESS); } @@ -1239,6 +1317,7 @@ ns_controls_destroy(ns_controls_t **ctrlsp) { REQUIRE(ISC_LIST_EMPTY(controls->listeners)); + isccc_symtab_destroy(&controls->symtab); isc_mem_put(controls->server->mctx, controls, sizeof(*controls)); *ctrlsp = NULL; } diff --git a/bin/named/include/named/control.h b/bin/named/include/named/control.h index 43b26125aa..44049d1546 100644 --- a/bin/named/include/named/control.h +++ b/bin/named/include/named/control.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: control.h,v 1.12 2002/09/10 04:45:54 marka Exp $ */ +/* $Id: control.h,v 1.13 2003/07/17 06:24:43 marka Exp $ */ #ifndef NAMED_CONTROL_H #define NAMED_CONTROL_H 1 @@ -49,6 +49,7 @@ #define NS_COMMAND_UNFREEZE "unfreeze" #define NS_COMMAND_TIMERPOKE "timerpoke" #define NS_COMMAND_RECURSING "recursing" +#define NS_COMMAND_NULL "null" isc_result_t ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp); diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 9a50816146..f5be1d0451 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.94 2002/09/19 02:40:15 marka Exp $ */ +/* $Id: rndc.c,v 1.95 2003/07/17 06:24:43 marka Exp $ */ /* * Principal Author: DCL @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -77,6 +78,7 @@ static char *command; static char *args; static char program[256]; static isc_socket_t *sock = NULL; +static isc_uint32_t serial; static void rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task); @@ -206,6 +208,83 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) { RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS); } +static void +rndc_recvnonce(isc_task_t *task, isc_event_t *event) { + isccc_sexpr_t *response = NULL; + isccc_sexpr_t *_ctrl; + isccc_region_t source; + isc_result_t result; + isc_uint32_t nonce; + isccc_sexpr_t *request = NULL; + isccc_time_t now; + isc_region_t r; + isccc_sexpr_t *data; + isccc_region_t message; + isc_uint32_t len; + isc_buffer_t b; + + recvs--; + + if (ccmsg.result == ISC_R_EOF) + fatal("connection to remote host closed\n" + "This may indicate that the remote server is using " + "an older version of \n" + "the command protocol, this host is not authorized " + "to connect,\nor the key is invalid."); + + if (ccmsg.result != ISC_R_SUCCESS) + fatal("recv failed: %s", isc_result_totext(ccmsg.result)); + + source.rstart = isc_buffer_base(&ccmsg.buffer); + source.rend = isc_buffer_used(&ccmsg.buffer); + + DO("parse message", isccc_cc_fromwire(&source, &response, &secret)); + + _ctrl = isccc_alist_lookup(response, "_ctrl"); + if (_ctrl == NULL) + fatal("_ctrl section missing"); + nonce = 0; + if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS) + nonce = 0; + + isc_stdtime_get(&now); + + DO("create message", isccc_cc_createmessage(1, NULL, NULL, ++serial, + now, now + 60, &request)); + data = isccc_alist_lookup(request, "_data"); + if (data == NULL) + fatal("_data section missing"); + if (isccc_cc_definestring(data, "type", args) == NULL) + fatal("out of memory"); + if (nonce != 0) { + _ctrl = isccc_alist_lookup(request, "_ctrl"); + if (_ctrl == NULL) + fatal("_ctrl section missing"); + if (isccc_cc_defineuint32(_ctrl, "_nonce", nonce) == NULL) + fatal("out of memory"); + } + message.rstart = databuf + 4; + message.rend = databuf + sizeof(databuf); + DO("render message", isccc_cc_towire(request, &message, &secret)); + len = sizeof(databuf) - REGION_SIZE(message); + isc_buffer_init(&b, databuf, 4); + isc_buffer_putuint32(&b, len - 4); + r.length = len; + r.base = databuf; + + isccc_ccmsg_cancelread(&ccmsg); + DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task, + rndc_recvdone, NULL)); + recvs++; + DO("send message", isc_socket_send(sock, &r, task, rndc_senddone, + NULL)); + sends++; + + isc_event_free(&event); + isccc_sexpr_free(&response); + return; +} + static void rndc_connected(isc_task_t *task, isc_event_t *event) { isc_socketevent_t *sevent = (isc_socketevent_t *)event; @@ -236,13 +315,12 @@ rndc_connected(isc_task_t *task, isc_event_t *event) { } isc_stdtime_get(&now); - srandom(now + isc_thread_self()); - DO("create message", isccc_cc_createmessage(1, NULL, NULL, random(), + DO("create message", isccc_cc_createmessage(1, NULL, NULL, ++serial, now, now + 60, &request)); data = isccc_alist_lookup(request, "_data"); if (data == NULL) fatal("_data section missing"); - if (isccc_cc_definestring(data, "type", args) == NULL) + if (isccc_cc_definestring(data, "type", "null") == NULL) fatal("out of memory"); message.rstart = databuf + 4; message.rend = databuf + sizeof(databuf); @@ -257,13 +335,12 @@ rndc_connected(isc_task_t *task, isc_event_t *event) { isccc_ccmsg_setmaxsize(&ccmsg, 1024); DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task, - rndc_recvdone, NULL)); + rndc_recvnonce, NULL)); recvs++; DO("send message", isc_socket_send(sock, &r, task, rndc_senddone, NULL)); sends++; isc_event_free(&event); - } static void @@ -520,6 +597,8 @@ main(int argc, char **argv) { if (argc < 1) usage(1); + isc_random_get(&serial); + DO("create memory context", isc_mem_create(0, 0, &mctx)); DO("create socket manager", isc_socketmgr_create(mctx, &socketmgr)); DO("create task manager", isc_taskmgr_create(mctx, 1, 0, &taskmgr)); diff --git a/lib/isccc/include/isccc/result.h b/lib/isccc/include/isccc/result.h index 1cd3a8d232..9628ae8dda 100644 --- a/lib/isccc/include/isccc/result.h +++ b/lib/isccc/include/isccc/result.h @@ -16,7 +16,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.3 2001/03/28 23:11:41 bwelling Exp $ */ +/* $Id: result.h,v 1.4 2003/07/17 06:24:44 marka Exp $ */ #ifndef ISCCC_RESULT_H #define ISCCC_RESULT_H 1 @@ -30,8 +30,11 @@ #define ISCCC_R_UNKNOWNVERSION (ISC_RESULTCLASS_ISCCC + 0) #define ISCCC_R_SYNTAX (ISC_RESULTCLASS_ISCCC + 1) #define ISCCC_R_BADAUTH (ISC_RESULTCLASS_ISCCC + 2) +#define ISCCC_R_EXPIRED (ISC_RESULTCLASS_ISCCC + 3) +#define ISCCC_R_CLOCKSKEW (ISC_RESULTCLASS_ISCCC + 4) +#define ISCCC_R_DUPLICATE (ISC_RESULTCLASS_ISCCC + 5) -#define ISCCC_R_NRESULTS 3 /* Number of results */ +#define ISCCC_R_NRESULTS 6 /* Number of results */ ISC_LANG_BEGINDECLS diff --git a/lib/isccc/result.c b/lib/isccc/result.c index 529e0fe283..58e6f432ca 100644 --- a/lib/isccc/result.c +++ b/lib/isccc/result.c @@ -16,7 +16,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.3 2001/03/28 23:11:40 bwelling Exp $ */ +/* $Id: result.c,v 1.4 2003/07/17 06:24:44 marka Exp $ */ #include @@ -30,6 +30,9 @@ static const char *text[ISCCC_R_NRESULTS] = { "unknown version", /* 1 */ "syntax error", /* 2 */ "bad auth", /* 3 */ + "expired", /* 4 */ + "clock skew", /* 5 */ + "duplicate" /* 6 */ }; #define ISCCC_RESULT_RESULTSET 2 From 3ca4b8062f845489a9c7e33a4af63cf9c863c1d4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 07:05:12 +0000 Subject: [PATCH 47/75] 1481. [bug] Refresh and stub queries failed to use masters keys if specified. [RT #7391] --- CHANGES | 3 +++ lib/dns/zone.c | 40 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index ce8a7c244c..ecbb40eedc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1481. [bug] Refresh and stub queries failed to use masters keys + if specified. [RT #7391] + 1480. [bug] Provide replay protection for rndc commands. Full replay protection requires both rndc and named to be updated. Partial replay protection (limited diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 0f09e9fd80..ef8b77d100 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.392 2003/07/01 03:51:30 marka Exp $ */ +/* $Id: zone.c,v 1.393 2003/07/17 07:05:12 marka Exp $ */ #include @@ -3876,7 +3876,24 @@ soa_query(isc_task_t *task, isc_event_t *event) { } isc_netaddr_fromsockaddr(&masterip, &zone->masteraddr); - (void)dns_view_getpeertsig(zone->view, &masterip, &key); + /* + * First, look for a tsig key in the master statement, then + * try for a server key. + */ + if ((zone->masterkeynames != NULL) && + (zone->masterkeynames[zone->curmaster] != NULL)) { + dns_view_t *view = dns_zone_getview(zone); + dns_name_t *keyname = zone->masterkeynames[zone->curmaster]; + result = dns_view_gettsig(view, keyname, &key); + if (result != ISC_R_SUCCESS) { + char namebuf[DNS_NAME_FORMATSIZE]; + dns_name_format(keyname, namebuf, sizeof(namebuf)); + dns_zone_log(zone, ISC_LOG_ERROR, + "unable to find key: %s", namebuf); + } + } + if (key == NULL) + (void)dns_view_getpeertsig(zone->view, &masterip, &key); if (zone->view->peers != NULL) { dns_peer_t *peer = NULL; @@ -4035,7 +4052,24 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) { zone->masteraddr = zone->masters[zone->curmaster]; isc_netaddr_fromsockaddr(&masterip, &zone->masteraddr); - (void)dns_view_getpeertsig(zone->view, &masterip, &key); + /* + * First, look for a tsig key in the master statement, then + * try for a server key. + */ + if ((zone->masterkeynames != NULL) && + (zone->masterkeynames[zone->curmaster] != NULL)) { + dns_view_t *view = dns_zone_getview(zone); + dns_name_t *keyname = zone->masterkeynames[zone->curmaster]; + result = dns_view_gettsig(view, keyname, &key); + if (result != ISC_R_SUCCESS) { + char namebuf[DNS_NAME_FORMATSIZE]; + dns_name_format(keyname, namebuf, sizeof(namebuf)); + dns_zone_log(zone, ISC_LOG_ERROR, + "unable to find key: %s", namebuf); + } + } + if (key == NULL) + (void)dns_view_getpeertsig(zone->view, &masterip, &key); if (zone->view->peers != NULL) { dns_peer_t *peer = NULL; From ca18417083383060354c1d2e053c385ac0173d97 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 07:22:21 +0000 Subject: [PATCH 48/75] 1482. [bug] Named could fail to start if the kernel supports IPv6 but no interfaces are configured. Similarly for IPv4. [RT #6229] --- CHANGES | 4 ++++ bin/named/server.c | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ecbb40eedc..4a0b1357d7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1482. [bug] Named could fail to start if the kernel supports + IPv6 but no interfaces are configured. Similarly + for IPv4. [RT #6229] + 1481. [bug] Refresh and stub queries failed to use masters keys if specified. [RT #7391] diff --git a/bin/named/server.c b/bin/named/server.c index 656aeb059b..7f06696ff3 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.398 2003/04/22 04:14:14 marka Exp $ */ +/* $Id: server.c,v 1.399 2003/07/17 07:22:21 marka Exp $ */ #include @@ -413,9 +413,24 @@ get_view_querysource_dispatch(cfg_obj_t **maps, 1000, 32768, 16411, 16433, attrs, attrmask, &disp); if (result != ISC_R_SUCCESS) { + isc_sockaddr_t any; + char buf[ISC_SOCKADDR_FORMATSIZE]; + + switch (af) { + case AF_INET: + isc_sockaddr_any(&any); + break; + case AF_INET6: + isc_sockaddr_any6(&any); + break; + } + if (isc_sockaddr_equal(&sa, &any)) + return (ISC_R_SUCCESS); + isc_sockaddr_format(&sa, buf, sizeof(buf)); isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, ISC_LOG_ERROR, - "could not get query source dispatcher"); + "could not get query source dispatcher (%s)", + buf); return (result); } From 743ffc91bdd462be6f91b3bab8f440c6a69f0770 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 07:42:00 +0000 Subject: [PATCH 49/75] 1484. [bug] The number of records reported after a AXFR was wrong. [RT #6229] 1483. [bug] dig axfr failed if the message id failed to match that in the request. Only the id in the first message is require to match. [RT #8138] --- CHANGES | 7 +++++++ bin/dig/dighost.c | 44 +++++++++++++++++++++++++-------------- bin/dig/include/dig/dig.h | 5 +++-- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/CHANGES b/CHANGES index 4a0b1357d7..6fa0d091ef 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +1484. [bug] The number of records reported after a AXFR was wrong. + [RT #6229] + +1483. [bug] dig axfr failed if the message id failed to match + that in the request. Only the id in the first message + is require to match. [RT #8138] + 1482. [bug] Named could fail to start if the kernel supports IPv6 but no interfaces are configured. Similarly for IPv4. [RT #6229] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 5f27ef22f3..5dbf596a6a 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.255 2002/11/12 23:08:27 explorer Exp $ */ +/* $Id: dighost.c,v 1.256 2003/07/17 07:42:00 marka Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -1490,6 +1490,7 @@ setup_lookup(dig_lookup_t *lookup) { query->first_soa_rcvd = ISC_FALSE; query->second_rr_rcvd = ISC_FALSE; query->first_repeat_rcvd = ISC_FALSE; + query->warn_id = ISC_TRUE; query->first_rr_serial = 0; query->second_rr_serial = 0; query->servname = serv->servername; @@ -1795,14 +1796,15 @@ connect_timeout(isc_task_t *task, isc_event_t *event) { l->retries); l->retries--; n = requeue_lookup(l, ISC_TRUE); - n->origin = query->lookup->origin; cancel_lookup(l); + check_next_lookup(l); } } else { fputs(l->cmdline, stdout); printf(";; connection timed out; no servers could be " "reached\n"); cancel_lookup(l); + check_next_lookup(l); if (exitcode < 9) exitcode = 9; } @@ -2098,7 +2100,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg, query->second_rr_rcvd = ISC_TRUE; query->second_rr_serial = 0; debug("got the second rr as nonsoa"); - continue; + goto next_rdata; } /* @@ -2282,25 +2284,35 @@ recv_done(isc_task_t *task, isc_event_t *event) { result = dns_message_peekheader(b, &id, &msgflags); if (result != ISC_R_SUCCESS || l->sendmsg->id != id) { + match = ISC_FALSE; if (l->tcp_mode) { - if (result == ISC_R_SUCCESS) - printf(";; ERROR: ID mismatch: " - "expected ID %u, got %u\n", - l->sendmsg->id, id); - else + isc_boolean_t fail = ISC_TRUE; + if (result == ISC_R_SUCCESS) { + if (!query->first_soa_rcvd || + query->warn_id) + printf(";; %s: ID mismatch: " + "expected ID %u, got %u\n", + query->first_soa_rcvd ? + "WARNING" : "ERROR", + l->sendmsg->id, id); + if (query->first_soa_rcvd) + fail = ISC_FALSE; + query->warn_id = ISC_FALSE; + } else printf(";; ERROR: short (< header size) message\n"); - isc_event_free(&event); - clear_query(query); - check_next_lookup(l); - UNLOCK_LOOKUP; - return; - } - if (result == ISC_R_SUCCESS) + if (fail) { + isc_event_free(&event); + clear_query(query); + check_next_lookup(l); + UNLOCK_LOOKUP; + return; + } + match = ISC_TRUE; + } else if (result == ISC_R_SUCCESS) printf(";; Warning: ID mismatch: " "expected ID %u, got %u\n", l->sendmsg->id, id); else printf(";; Warning: short (< header size) message received\n"); - match = ISC_FALSE; } if (!match) { diff --git a/bin/dig/include/dig/dig.h b/bin/dig/include/dig/dig.h index 842b0deefe..df8ea5bc09 100644 --- a/bin/dig/include/dig/dig.h +++ b/bin/dig/include/dig/dig.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.h,v 1.79 2002/08/12 18:25:25 mayer Exp $ */ +/* $Id: dig.h,v 1.80 2003/07/17 07:42:00 marka Exp $ */ #ifndef DIG_H #define DIG_H @@ -152,7 +152,8 @@ struct dig_query { first_soa_rcvd, second_rr_rcvd, first_repeat_rcvd, - recv_made; + recv_made, + warn_id; isc_uint32_t first_rr_serial; isc_uint32_t second_rr_serial; isc_uint32_t msg_count; From e0557d5e689c2fda8a925d2627c029e947ed2656 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 07:44:05 +0000 Subject: [PATCH 50/75] grammar --- CHANGES | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 6fa0d091ef..59aa8c45da 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,11 @@ 1484. [bug] The number of records reported after a AXFR was wrong. [RT #6229] -1483. [bug] dig axfr failed if the message id failed to match - that in the request. Only the id in the first message - is require to match. [RT #8138] +1483. [bug] dig axfr failed if the message id in the answer failed + to match that in the request. Only the id in the first + message is required to match. [RT #8138] -1482. [bug] Named could fail to start if the kernel supports +1482. [bug] named could fail to start if the kernel supports IPv6 but no interfaces are configured. Similarly for IPv4. [RT #6229] From 471e0563c7965c556c759775882cd3448dae78ea Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Jul 2003 08:05:15 +0000 Subject: [PATCH 51/75] 1485. [bug] gen failed to handle high type values. [RT #6225] --- CHANGES | 2 ++ lib/dns/gen.c | 92 ++++++++++++++++++++++++++++++------------------- lib/dns/rdata.c | 25 ++++++-------- 3 files changed, 70 insertions(+), 49 deletions(-) diff --git a/CHANGES b/CHANGES index 59aa8c45da..8c293f19eb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1485. [bug] gen failed to handle high type values. [RT #6225] + 1484. [bug] The number of records reported after a AXFR was wrong. [RT #6229] diff --git a/lib/dns/gen.c b/lib/dns/gen.c index dae8b15b0e..93a7c19dbc 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: gen.c,v 1.68 2002/03/20 17:12:28 marka Exp $ */ +/* $Id: gen.c,v 1.69 2003/07/17 08:05:15 marka Exp $ */ #include @@ -110,6 +110,8 @@ const char copyright[] = " ***************/\n" "\n"; +#define TYPENAMES 256 + struct cc { struct cc *next; int rdclass; @@ -130,7 +132,10 @@ struct ttnam { char macroname[11]; char attr[256]; unsigned int sorted; -} typenames[256]; + int type; +} typenames[TYPENAMES]; + +int maxtype = -1; char * upper(char *); @@ -274,25 +279,48 @@ dodecl(char *type, char *function, char *args) { funname(tt->typename, buf1), args); } +static struct ttnam * +find_typename(int type) { + int i; + + for (i = 0; i < TYPENAMES; i++) { + if (typenames[i].typename[0] != 0 && + typenames[i].type == type) + return (&typenames[i]); + } + return (NULL); +} + void insert_into_typenames(int type, const char *typename, const char *attr) { - struct ttnam *ttn; - int c; + struct ttnam *ttn = NULL; + int c, i; char tmp[256]; - ttn = &typenames[type]; - if (ttn->typename[0] == 0) { - if (strlen(typename) > sizeof(ttn->typename) - 1) { - fprintf(stderr, "Error: type name %s is too long\n", - typename); + for (i = 0; i < TYPENAMES; i++) { + if (typenames[i].typename[0] != 0 && + typenames[i].type == type && + strcmp(typename, typenames[i].typename) != 0) { + fprintf(stderr, + "Error: type %d has two names: %s, %s\n", + type, typenames[i].typename, typename); exit(1); } - strcpy(ttn->typename, typename); - } else if (strcmp(typename, ttn->typename) != 0) { - fprintf(stderr, "Error: type %d has two names: %s, %s\n", - type, ttn->typename, typename); + if (typenames[i].typename[0] == 0 && ttn == NULL) + ttn = &typenames[i]; + } + if (ttn == NULL) { + fprintf(stderr, "Error: typenames array too small\n"); exit(1); } + + if (strlen(typename) > sizeof(ttn->typename) - 1) { + fprintf(stderr, "Error: type name %s is too long\n", + typename); + exit(1); + } + strcpy(ttn->typename, typename); + ttn->type = type; strcpy(ttn->macroname, ttn->typename); c = strlen(ttn->macroname); @@ -320,6 +348,8 @@ insert_into_typenames(int type, const char *typename, const char *attr) { } strcpy(ttn->attr, attr); ttn->sorted = 0; + if (maxtype < type) + maxtype = type; } void @@ -469,7 +499,7 @@ main(int argc, char **argv) { char *file = NULL; isc_dir_t dir; - for (i = 0; i <= 255; i++) + for (i = 0; i < TYPENAMES; i++) memset(&typenames[i], 0, sizeof(typenames[i])); strcpy(srcdir, ""); @@ -596,7 +626,7 @@ main(int argc, char **argv) { * attributes. */ -#define PRINT_COMMA(x) (x == 255 ? "" : ",") +#define PRINT_COMMA(x) (x == maxtype ? "" : ",") #define METANOTQUESTION "DNS_RDATATYPEATTR_META | " \ "DNS_RDATATYPEATTR_NOTQUESTION" @@ -626,9 +656,9 @@ main(int argc, char **argv) { fprintf(stdout, "\tunsigned int flags;\n"); fprintf(stdout, "} typeattr_t;\n"); fprintf(stdout, "static typeattr_t typeattr[] = {\n"); - for (i = 0; i <= 255; i++) { - ttn = &typenames[i]; - if (ttn->typename[0] == 0) { + for (i = 0; i <= maxtype; i++) { + ttn = find_typename(i); + if (ttn == NULL) { const char *attrs; if (i >= 128 && i < 255) attrs = "DNS_RDATATYPEATTR_UNKNOWN | " @@ -636,7 +666,7 @@ main(int argc, char **argv) { else attrs = "DNS_RDATATYPEATTR_UNKNOWN"; fprintf(stdout, "\t{ \"TYPE%d\", %s}%s\n", - i, attrs, PRINT_COMMA(i)); + i, attrs, PRINT_COMMA(i)); } else { fprintf(stdout, "\t{ \"%s\", %s }%s\n", upper(ttn->typename), @@ -646,16 +676,6 @@ main(int argc, char **argv) { } fprintf(stdout, "};\n"); - /* - * Run through the list of types and pre-mark the unused - * ones as "sorted" so we simply ignore them below. - */ - for (i = 0; i <= 255; i++) { - ttn = &typenames[i]; - if (ttn->typename[0] == 0) - ttn->sorted = 1; - } - /* * Spit out a quick and dirty hash function. Here, * we walk through the list of type names, and calculate @@ -682,8 +702,10 @@ main(int argc, char **argv) { fprintf(stdout, "#define RDATATYPE_FROMTEXT_SW(_hash," "_typename,_length,_typep) \\\n"); fprintf(stdout, "\tswitch (_hash) { \\\n"); - for (i = 0; i <= 255; i++) { - ttn = &typenames[i]; + for (i = 0; i <= maxtype; i++) { + ttn = find_typename(i); + if (ttn == NULL) + continue; /* * Skip entries we already processed. @@ -698,15 +720,15 @@ main(int argc, char **argv) { * Find all other entries that happen to match * this hash. */ - for (j = 0; j <= 255; j++) { - ttn2 = &typenames[j]; - if (ttn2->sorted != 0) + for (j = 0; j <= maxtype; j++) { + ttn2 = find_typename(j); + if (ttn2 == NULL) continue; if (hash == HASH(ttn2->typename)) { fprintf(stdout, "\t\t\tRDATATYPE_COMPARE" "(\"%s\", %u, " "_typename, _length, _typep); \\\n", - ttn2->typename, j); + ttn2->typename, ttn2->type); ttn2->sorted = 1; } } diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 9ad903a670..fb4c3ebc59 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.175 2003/06/24 05:10:32 marka Exp $ */ +/* $Id: rdata.c,v 1.176 2003/07/17 08:05:15 marka Exp $ */ #include #include @@ -765,7 +765,7 @@ rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, { isc_result_t result = ISC_R_NOTIMPLEMENTED; isc_boolean_t use_default = ISC_FALSE; - char buf[sizeof("65536")]; + char buf[sizeof("65535")]; isc_region_t sr; REQUIRE(rdata != NULL); @@ -958,10 +958,9 @@ dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) { unsigned int dns_rdatatype_attributes(dns_rdatatype_t type) { - if (type > 255) - return (DNS_RDATATYPEATTR_UNKNOWN); - - return (typeattr[type].flags); + if (type < (sizeof(typeattr)/sizeof(typeattr[0]))) + return (typeattr[type].flags); + return (DNS_RDATATYPEATTR_UNKNOWN); } #define NUMBERSIZE sizeof("037777777777") /* 2^32-1 octal + NUL */ @@ -1107,7 +1106,7 @@ dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) { isc_result_t dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target) { - char buf[sizeof("CLASS65536")]; + char buf[sizeof("CLASS65535")]; switch (rdclass) { case dns_rdataclass_any: @@ -1195,14 +1194,12 @@ dns_rdatatype_fromtext(dns_rdatatype_t *typep, isc_textregion_t *source) { isc_result_t dns_rdatatype_totext(dns_rdatatype_t type, isc_buffer_t *target) { - char buf[sizeof("TYPE65536")]; + char buf[sizeof("TYPE65535")]; - if (type > 255) { - snprintf(buf, sizeof buf, "TYPE%u", type); - return (str_totext(buf, target)); - } - - return (str_totext(typeattr[type].name, target)); + if (type < (sizeof(typeattr)/sizeof(typeattr[0]))) + return (str_totext(typeattr[type].name, target)); + snprintf(buf, sizeof buf, "TYPE%u", type); + return (str_totext(buf, target)); } void From ffdfae8e4188c143297393f80f22134503372452 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 02:27:40 +0000 Subject: [PATCH 52/75] 1486. [bug] isc_print_snprintf() '%%' consumed one too many format characters. [RT# 8230] --- CHANGES | 3 +++ lib/isc/print.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 8c293f19eb..5f5bda2861 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1486. [bug] isc_print_snprintf() '%%' consumed one too many format + characters. [RT# 8230] + 1485. [bug] gen failed to handle high type values. [RT #6225] 1484. [bug] The number of records reported after a AXFR was wrong. diff --git a/lib/isc/print.c b/lib/isc/print.c index c7042f3b00..45c23c6c32 100644 --- a/lib/isc/print.c +++ b/lib/isc/print.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: print.c,v 1.25 2003/06/24 06:23:58 marka Exp $ */ +/* $Id: print.c,v 1.26 2003/07/18 02:27:40 marka Exp $ */ #include @@ -176,7 +176,6 @@ isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) { *str++ = *format; size--; } - format++; count++; break; case 'q': From c676c1b4978bfe2d00bdf5085fd44544067f9de4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 02:54:23 +0000 Subject: [PATCH 53/75] 1487. [bug] A REQUIRE() failure could be triggered if a zone was queued for transfer and the zone was then removed. [RT #6189] --- CHANGES | 4 ++++ lib/dns/zone.c | 30 +++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index 5f5bda2861..1386f3fe94 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1487. [bug] A REQUIRE() failure could be triggered if a zone was + queued for transfer and the zone was then removed. + [RT #6189] + 1486. [bug] isc_print_snprintf() '%%' consumed one too many format characters. [RT# 8230] diff --git a/lib/dns/zone.c b/lib/dns/zone.c index ef8b77d100..08bf5e177a 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.393 2003/07/17 07:05:12 marka Exp $ */ +/* $Id: zone.c,v 1.394 2003/07/18 02:54:23 marka Exp $ */ #include @@ -4155,7 +4155,7 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) { static void zone_shutdown(isc_task_t *task, isc_event_t *event) { dns_zone_t *zone = (dns_zone_t *) event->ev_arg; - isc_boolean_t free_needed; + isc_boolean_t free_needed, linked = ISC_FALSE; UNUSED(task); REQUIRE(DNS_ZONE_VALID(zone)); @@ -4181,6 +4181,7 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) { if (zone->statelist == &zone->zmgr->waiting_for_xfrin) { ISC_LIST_UNLINK(zone->zmgr->waiting_for_xfrin, zone, statelink); + linked = ISC_TRUE; zone->statelist = NULL; } RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write); @@ -4193,6 +4194,10 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) { dns_xfrin_shutdown(zone->xfr); LOCK_ZONE(zone); + if (linked) { + INSIST(zone->irefs > 0); + zone->irefs--; + } if (zone->request != NULL) { dns_request_cancel(zone->request); } @@ -5226,6 +5231,7 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) { unsigned int nscount; isc_uint32_t serial, refresh, retry, expire, minimum; isc_result_t xfrresult = result; + isc_boolean_t free_needed; REQUIRE(DNS_ZONE_VALID(zone)); @@ -5389,7 +5395,13 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) { */ if (again && !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) queue_soa_query(zone); + + INSIST(zone->irefs > 0); + zone->irefs--; + free_needed = exit_check(zone); UNLOCK_ZONE(zone); + if (free_needed) + zone_free(zone); } static void @@ -5473,6 +5485,9 @@ queue_xfrin(dns_zone_t *zone) { RWLOCK(&zmgr->rwlock, isc_rwlocktype_write); ISC_LIST_APPEND(zmgr->waiting_for_xfrin, zone, statelink); + LOCK_ZONE(zone); + zone->irefs++; + UNLOCK_ZONE(zone); zone->statelist = &zmgr->waiting_for_xfrin; result = zmgr_start_xfrin_ifquota(zmgr, zone); RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write); @@ -5607,9 +5622,6 @@ got_transfer_quota(isc_task_t *task, isc_event_t *event) { zone_xfrdone(zone, result); isc_event_free(&event); - - dns_zone_detach(&zone); /* XXXAG */ - return; } /* @@ -6265,14 +6277,6 @@ zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) { ISC_LIST_UNLINK(zmgr->waiting_for_xfrin, zone, statelink); ISC_LIST_APPEND(zmgr->xfrin_in_progress, zone, statelink); zone->statelist = &zmgr->xfrin_in_progress; - /* - * Make sure the zone does not go away before it has processed - * the event; in effect, the event is attached to the zone. - * - * XXXAG This should be done as soon as the zone goes on the - * queue, using irefs. - */ - isc_refcount_increment(&zone->erefs, NULL); isc_task_send(zone->task, &e); dns_zone_log(zone, ISC_LOG_INFO, "Transfer started."); UNLOCK_ZONE(zone); From 4bb16c5856e5c6b05ac43c60f9f9376641bdcccf Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 04:30:01 +0000 Subject: [PATCH 54/75] 1488. [bug] Don't override trust levels for glue addresses. [RT #5764] --- CHANGES | 3 +++ lib/dns/adb.c | 15 ++++++++++++--- lib/dns/resolver.c | 7 +++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 1386f3fe94..766a01d4d7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1488. [bug] Don't override trust levels for glue addresses. + [RT #5764] + 1487. [bug] A REQUIRE() failure could be triggered if a zone was queued for transfer and the zone was then removed. [RT #6189] diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 539c535ee6..d02ee2ecc6 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.c,v 1.203 2003/02/27 02:20:15 marka Exp $ */ +/* $Id: adb.c,v 1.204 2003/07/18 04:30:01 marka Exp $ */ /* * Implementation notes @@ -86,6 +86,7 @@ */ #define ADB_CACHE_MINIMUM 10 /* seconds */ #define ADB_CACHE_MAXIMUM 86400 /* seconds (86400 = 24 hours) */ +#define ADB_ENTRY_WINDOW 1800 /* seconds */ /* * Wake up every CLEAN_SECONDS and clean CLEAN_BUCKETS buckets, so that all @@ -572,7 +573,11 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset, if (addr_bucket != DNS_ADB_INVALIDBUCKET) UNLOCK(&adb->entrylocks[addr_bucket]); - rdataset->ttl = ttlclamp(rdataset->ttl); + if (rdataset->trust == dns_trust_glue || + rdataset->trust == dns_trust_additional) + rdataset->ttl = ADB_CACHE_MINIMUM; + else + rdataset->ttl = ttlclamp(rdataset->ttl); if (rdtype == dns_rdatatype_a) { DP(NCACHE_LEVEL, "expire_v4 set to MIN(%u,%u) import_rdataset", @@ -3336,6 +3341,7 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr, { int bucket; unsigned int new_srtt; + isc_stdtime_t now; REQUIRE(DNS_ADB_VALID(adb)); REQUIRE(DNS_ADBADDRINFO_VALID(addr)); @@ -3353,6 +3359,9 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr, addr->entry->srtt = new_srtt; addr->srtt = new_srtt; + isc_stdtime_get(&now); + addr->entry->expires = now + ADB_ENTRY_WINDOW; + UNLOCK(&adb->entrylocks[bucket]); } @@ -3450,7 +3459,7 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) { bucket = addr->entry->lock_bucket; LOCK(&adb->entrylocks[bucket]); - entry->expires = now + 1800; /* XXXRTH */ + entry->expires = now + ADB_ENTRY_WINDOW; want_check_exit = dec_entry_refcnt(adb, entry, ISC_FALSE); diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 4e92ec1d22..6d73b8883b 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resolver.c,v 1.263 2003/04/11 07:25:25 marka Exp $ */ +/* $Id: resolver.c,v 1.264 2003/07/18 04:30:01 marka Exp $ */ #include @@ -3304,7 +3304,10 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) { eresult = DNS_R_DNAME; } } - if (rdataset->trust == dns_trust_glue) { + if (rdataset->trust == dns_trust_glue && + (rdataset->type == dns_rdatatype_ns || + (rdataset->type == dns_rdatatype_sig && + rdataset->covers == dns_rdatatype_ns))) { /* * If the trust level is 'dns_trust_glue' * then we are adding data from a referral From f488b1c311f2fc09ae8e45f7893185e608b17ede Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 06:00:41 +0000 Subject: [PATCH 55/75] 1487. [compat] Treat 'allow-update' on slave zones as a warning. [RT #3469] --- CHANGES | 3 +++ lib/bind9/check.c | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 766a01d4d7..0a66eb61bb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1487. [compat] Treat 'allow-update' on slave zones as a warning. + [RT #3469] + 1488. [bug] Don't override trust levels for glue addresses. [RT #5764] diff --git a/lib/bind9/check.c b/lib/bind9/check.c index aac268a589..9e273e5096 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.36 2003/03/20 00:43:08 marka Exp $ */ +/* $Id: check.c,v 1.37 2003/07/18 06:00:41 marka Exp $ */ #include @@ -586,11 +586,18 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab, cfg_map_get(zoptions, options[i].name, &obj) == ISC_R_SUCCESS) { - cfg_obj_log(obj, logctx, ISC_LOG_ERROR, - "option '%s' is not allowed in '%s' " - "zone '%s'", - options[i].name, typestr, zname); - result = ISC_R_FAILURE; + if (strcmp(options[i].name, "allow-update") != 0 || + ztype != SLAVEZONE) { + cfg_obj_log(obj, logctx, ISC_LOG_ERROR, + "option '%s' is not allowed " + "in '%s' zone '%s'", + options[i].name, typestr, zname); + result = ISC_R_FAILURE; + } else + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "option '%s' is not allowed " + "in '%s' zone '%s'", + options[i].name, typestr, zname); } } From 661868027cb905052cae5721f2551701b3ed81a3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 06:05:14 +0000 Subject: [PATCH 56/75] wrong change number 1487->1489 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0a66eb61bb..3149101c40 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -1487. [compat] Treat 'allow-update' on slave zones as a warning. +1489. [compat] Treat 'allow-update' on slave zones as a warning. [RT #3469] 1488. [bug] Don't override trust levels for glue addresses. From 1fc93ac506b0d20ca7b94b6d64e1b8d67516e3c4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 06:11:28 +0000 Subject: [PATCH 57/75] 1490. [bug] Accept reading state as well as working state in ns_client_next(). [RT #6813] cvs diff -r 1.215 -r 1.216 bin/named/client.c --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 3149101c40..3b76a37005 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1490. [bug] Accept reading state as well as working state in + ns_client_next(). [RT #6813] + 1489. [compat] Treat 'allow-update' on slave zones as a warning. [RT #3469] From 7969572891fbaf3e6d34998b80978e6520f4f823 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 07:44:52 +0000 Subject: [PATCH 58/75] update ms zone transfer bug info --- doc/misc/migration | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/misc/migration b/doc/misc/migration index 125d18b131..2adf80fcd4 100644 --- a/doc/misc/migration +++ b/doc/misc/migration @@ -154,13 +154,12 @@ You can work around this problem using the option "transfer-format one-answer;", but since these old versions all have known security problems, the correct fix is to upgrade the slave servers. -Zone transfers to Windows 2000 DNS servers sometimes fail due to a bug -in the Windows 2000 DNS server where DNS messages larger than 16K are -not handled properly. There will be a hot fix available from -Microsoft to address this issue. In the meantime, the problem can -be worked around by setting "transfer-format one-answer;". -[As of May 4 2001 the hotfix was still being prepared] - +Zone transfers to Windows 2000 DNS servers sometimes fail due to a +bug in the Windows 2000 DNS server where DNS messages larger than +16K are not handled properly. Obtain the latest service pack for +Windows 2000 from Microsoft to address this issue. In the meantime, +the problem can be worked around by setting "transfer-format one-answer;". +http://support.microsoft.com/default.aspx?scid=kb;en-us;297936 4. Unrestricted Character Set @@ -243,4 +242,4 @@ necessary, the umask should be set explicitly in the script used to start the named process. -$Id: migration,v 1.43 2003/04/22 04:23:17 marka Exp $ +$Id: migration,v 1.44 2003/07/18 07:44:52 marka Exp $ From a4b3e51a8f1c9742c0f7d9f7d70f1ad926985145 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 21 Jul 2003 00:28:16 +0000 Subject: [PATCH 59/75] 1491. [bug] dns_master_dump*() would produce extraneous $ORIGIN lines. [RT #6206] cvs rdiff -r 1.67 -r 1.68 bind9/lib/dns/masterdump.c --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 3b76a37005..8e49dce8e5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1491. [bug] dns_master_dump*() would produce extraneous $ORIGIN + lines. [RT #6206] + 1490. [bug] Accept reading state as well as working state in ns_client_next(). [RT #6813] From afbb7b15aeeef907296aa41890ac17f64c1832ed Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 21 Jul 2003 01:11:29 +0000 Subject: [PATCH 60/75] Only fall back to TCP for slave zones if UDP refresh queries fail. [RT #8253] --- lib/dns/zone.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 08bf5e177a..fd17ea88e1 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.394 2003/07/18 02:54:23 marka Exp $ */ +/* $Id: zone.c,v 1.395 2003/07/21 01:11:29 marka Exp $ */ #include @@ -3402,8 +3402,9 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { "refresh: retry limit for " "master %s exceeded (source %s)", master, source); - /* Try with TCP. */ - goto tcp_transfer; + /* Try with slave with TCP. */ + if (zone->type == dns_zone_slave) + goto tcp_transfer; } else dns_zone_log(zone, ISC_LOG_INFO, "refresh: failure trying master " From 17a14e451df80b3d82278e5c925682ade3263dbc Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 21 Jul 2003 01:14:18 +0000 Subject: [PATCH 61/75] 1492. [cleanup] Preserve rwlock quota context when upgrading / downgrading. [RT #5599] --- CHANGES | 3 +++ lib/isc/include/isc/rwlock.h | 3 ++- lib/isc/rwlock.c | 22 +++++++++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 8e49dce8e5..77314c1c6b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1492. [cleanup] Preserve rwlock quota context when upgrading / + downgrading. [RT #5599] + 1491. [bug] dns_master_dump*() would produce extraneous $ORIGIN lines. [RT #6206] diff --git a/lib/isc/include/isc/rwlock.h b/lib/isc/include/isc/rwlock.h index d84d4db210..252bcc3707 100644 --- a/lib/isc/include/isc/rwlock.h +++ b/lib/isc/include/isc/rwlock.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rwlock.h,v 1.19 2003/04/17 01:56:35 marka Exp $ */ +/* $Id: rwlock.h,v 1.20 2003/07/21 01:14:18 marka Exp $ */ #ifndef ISC_RWLOCK_H #define ISC_RWLOCK_H 1 @@ -57,6 +57,7 @@ struct isc_rwlock { unsigned int writers_waiting; unsigned int read_quota; unsigned int write_quota; + isc_rwlocktype_t original; }; #else /* ISC_PLATFORM_USETHREADS */ struct isc_rwlock { diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 25172dcdd3..73c4ae6a72 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rwlock.c,v 1.34 2003/04/17 01:56:34 marka Exp $ */ +/* $Id: rwlock.c,v 1.35 2003/07/21 01:14:18 marka Exp $ */ #include @@ -82,6 +82,7 @@ isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota, rwl->magic = 0; rwl->type = isc_rwlocktype_read; + rwl->original = isc_rwlocktype_none; rwl->active = 0; rwl->granted = 0; rwl->readers_waiting = 0; @@ -215,9 +216,11 @@ isc_rwlock_tryupgrade(isc_rwlock_t *rwl) { REQUIRE(rwl->active != 0); /* If we are the only reader then succeed. */ - if (rwl->active == 1) + if (rwl->active == 1) { + rwl->original = (rwl->original == isc_rwlocktype_none) ? + isc_rwlocktype_read : isc_rwlocktype_none; rwl->type = isc_rwlocktype_write; - else + } else result = ISC_R_LOCKBUSY; UNLOCK(&rwl->lock); @@ -233,10 +236,14 @@ isc_rwlock_downgrade(isc_rwlock_t *rwl) { REQUIRE(rwl->active == 1); rwl->type = isc_rwlocktype_read; + rwl->original = (rwl->original == isc_rwlocktype_none) ? + isc_rwlocktype_write : isc_rwlocktype_none; /* - * Wake up waiting readers if there are no waiting writers. + * Resume processing any read request that were blocked when + * we upgraded. */ - if ((rwl->writers_waiting == 0 || rwl->granted < rwl->read_quota) && + if (rwl->original == isc_rwlocktype_none && + (rwl->writers_waiting == 0 || rwl->granted < rwl->read_quota) && rwl->readers_waiting > 0) BROADCAST(&rwl->readable); @@ -260,6 +267,10 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { INSIST(rwl->active > 0); rwl->active--; if (rwl->active == 0) { + if (rwl->original != isc_rwlocktype_none) { + rwl->type = rwl->original; + rwl->original = isc_rwlocktype_none; + } if (rwl->type == isc_rwlocktype_read) { rwl->granted = 0; if (rwl->writers_waiting > 0) { @@ -287,6 +298,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { } } } + INSIST(rwl->original == isc_rwlock_none); #ifdef ISC_RWLOCK_TRACE print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK, From 1e730144b4cbb0767510f5f6adef6666bf861bbb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 22 Jul 2003 06:03:54 +0000 Subject: [PATCH 62/75] update for idnkit --- doc/dev/release | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/dev/release b/doc/dev/release index 2cabedeae9..d2f74ef2d5 100644 --- a/doc/dev/release +++ b/doc/dev/release @@ -1,7 +1,7 @@ Copyright (C) 2000-2002 Internet Software Consortium. See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. -$Id: release,v 1.55 2002/05/28 00:25:12 marka Exp $ +$Id: release,v 1.56 2003/07/22 06:03:54 marka Exp $ Preparing a bind9 release @@ -116,7 +116,7 @@ release. If all succeeded but some were offset or had fuzz, the patch will be regenerated at the end of this stage. - $ cd contrib/idn/mdnkit + $ cd contrib/idn/idnkit-1.0-src [ Sample on netbsd ... ] $ CFLAGS=-I/usr/local/include ./configure '--with-iconv=-L/usr/local/lib -liconv' @@ -133,20 +133,20 @@ release. $ make ... should cleanly compile $ make distclean - $ rm -rf /tmp/mdn - $ mkdir -p /tmp/mdn/lib /tmp/mdn/include - $ mdn=contrib/idn/mdnkit - $ cp $mdn/lib/.libs/libmdn.so* /tmp/mdn/lib - $ cp -r $mdn/include/mdn /tmp/mdn/include - $ ./configure --with-mdn=/tmp/mdn --with-iconv="-L/usr/local/lib -liconv" - $ LD_LIBRARY_PATH=/usr/local/lib:/tmp/mdn/lib:/usr/lib make + $ rm -rf /tmp/idn + $ mkdir -p /tmp/idn/lib /tmp/idn/include + $ idn=contrib/idn/idnkit-1.0-src + $ cp $idn/lib/.libs/libidnkit.so* /tmp/idn/lib + $ cp -r $idn/include/mdn $idn/include/idn /tmp/idn/include + $ ./configure --with-idn=/tmp/idn --with-iconv="-L/usr/local/lib -liconv" + $ LD_LIBRARY_PATH=/usr/local/lib:/tmp/idn/lib:/usr/lib make ... should cleanly compile [ Some tests will be added to bin/tests/system to validate operation. ] Generate a fresh copy of the diffs: - $ patchd=$mdn/patch/bind9 + $ patchd=$idn/patch/bind9 $ awk '/^\+\+\+ / {print $2}' $patchd/patch.most | while read i; do diff -u2 $i.orig $i From ce08911be8c890c9dc086a64b9e0712db1a9de26 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 23 Jul 2003 03:18:56 +0000 Subject: [PATCH 63/75] typo --- lib/isc/rwlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 73c4ae6a72..8668414ad4 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rwlock.c,v 1.35 2003/07/21 01:14:18 marka Exp $ */ +/* $Id: rwlock.c,v 1.36 2003/07/23 03:18:56 marka Exp $ */ #include @@ -298,7 +298,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { } } } - INSIST(rwl->original == isc_rwlock_none); + INSIST(rwl->original == isc_rwlocktype_none); #ifdef ISC_RWLOCK_TRACE print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK, From fcd4c81df6a3e615eb31800c05fe88be9d030a57 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 23 Jul 2003 22:10:41 +0000 Subject: [PATCH 64/75] new draft --- ...s-20.txt => draft-ietf-dnsext-mdns-22.txt} | 448 +++++++++--------- 1 file changed, 224 insertions(+), 224 deletions(-) rename doc/draft/{draft-ietf-dnsext-mdns-20.txt => draft-ietf-dnsext-mdns-22.txt} (91%) diff --git a/doc/draft/draft-ietf-dnsext-mdns-20.txt b/doc/draft/draft-ietf-dnsext-mdns-22.txt similarity index 91% rename from doc/draft/draft-ietf-dnsext-mdns-20.txt rename to doc/draft/draft-ietf-dnsext-mdns-22.txt index 42cec61dac..b11b3f731d 100644 --- a/doc/draft/draft-ietf-dnsext-mdns-20.txt +++ b/doc/draft/draft-ietf-dnsext-mdns-22.txt @@ -7,8 +7,8 @@ DNSEXT Working Group Levon Esibov INTERNET-DRAFT Bernard Aboba Category: Standards Track Dave Thaler - Microsoft -21 May 2003 + Microsoft +23 July 2003 Linklocal Multicast Name Resolution (LLMNR) @@ -61,7 +61,7 @@ Esibov, Aboba & Thaler Standards Track [Page 1] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 Table of Contents @@ -77,19 +77,20 @@ Table of Contents 2.5 Off-link detection .............................. 7 2.6 Retransmissions ................................. 8 2.7 DNS TTL ......................................... 9 + 2.8 Use of the authority and additional sections .... 9 3. Usage model ........................................... 9 3.1 Unqualified names ............................... 10 3.2 LLMNR configuration ............................. 10 4. Conflict resolution ................................... 12 4.1 Considerations for multiple interfaces .......... 13 - 4.2 API issues ...................................... 14 + 4.2 API issues ...................................... 15 5. Security considerations ............................... 15 - 5.1 Scope restriction ............................... 15 + 5.1 Scope restriction ............................... 16 5.2 Usage restriction ............................... 16 - 5.3 Cache and port separation ....................... 16 + 5.3 Cache and port separation ....................... 17 5.4 Authentication .................................. 17 6. IANA considerations ................................... 17 -7. Normative References .................................. 17 +7. Normative References .................................. 18 8. Informative References ................................ 18 Acknowledgments .............................................. 19 Authors' Addresses ........................................... 19 @@ -114,14 +115,13 @@ Full Copyright Statement ..................................... 20 - Esibov, Aboba & Thaler Standards Track [Page 2] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 1. Introduction @@ -181,7 +181,7 @@ Esibov, Aboba & Thaler Standards Track [Page 3] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be @@ -198,9 +198,9 @@ Sender A host that sends an LLMNR query. Typically a host is or as a responder, but not a sender. Routable address - An address other than a linklocal address. This includes - site local and globally routable addresses, as well as - private addresses. + An address other than a Link-Local address. This + includes globally routable addresses, as well as private + addresses. 2. Name resolution using LLMNR @@ -241,7 +241,7 @@ Esibov, Aboba & Thaler Standards Track [Page 4] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 The sender MUST anticipate receiving no replies to some LLMNR queries, @@ -301,7 +301,7 @@ Esibov, Aboba & Thaler Standards Track [Page 5] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 "child.host.example.com.". As a result, "host" cannot reply to a query @@ -339,11 +339,7 @@ Unicast queries SHOULD be sent when: a. A sender repeats a query after it received a response with the TC bit set to the previous LLMNR multicast query, or - b. The sender's LLMNR cache contains an NS resource record that - enables the sender to send a query directly to the hosts - authoritative for the name in the query, or - - c. The sender queries for a PTR RR. + b. The sender queries for a PTR RR. If a TC (truncation) bit is set in the response, then the sender MAY use the response if it contains all necessary information, or the sender MAY @@ -352,6 +348,10 @@ address of the responder. The RA (Recursion Available) bit in the header of the response MUST NOT be set. If the RA bit is set in the response header, the sender MUST ignore the RA bit. +Unicast LLMNR queries SHOULD be sent using TCP. Responses to TCP +unicast LLMNR queries MUST be sent using TCP, using the same connection +as the query. If the sender of a TCP query receives a response not +using TCP, the response MUST be silently discarded. Unicast UDP queries @@ -361,13 +361,9 @@ Esibov, Aboba & Thaler Standards Track [Page 6] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 -Unicast LLMNR queries SHOULD be sent using TCP. Responses to TCP -unicast LLMNR queries MUST be sent using TCP, using the same connection -as the query. If the sender of a TCP query receives a response not -using TCP, the response MUST be silently discarded. Unicast UDP queries MAY be responded to with an empty answer section and the TC bit set, so as to require the sender to resend the query using TCP. Senders MUST support sending TCP queries, and Responders MUST support listening for @@ -412,6 +408,10 @@ For IPv4, an "on link" address is defined as a link-local address or an address whose prefix belongs to a subnet on the local link; for IPv6 [RFC2460] an "on link" address is either a link-local address, defined in [RFC2373], or an address whose prefix belongs to a subnet on the +local link. A sender SHOULD prefer RRs including reachable addresses +where RRs involving both reachable and unreachable addresses are +returned in response to a query. + @@ -421,13 +421,9 @@ Esibov, Aboba & Thaler Standards Track [Page 7] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 -local link. A sender SHOULD prefer RRs including reachable addresses -where RRs involving both reachable and unreachable addresses are -returned in response to a query. - In composing LLMNR queries, the sender MUST set the Hop Limit field in the IPv6 header and the TTL field in IPv4 header of the response to one (1). Even when LLMNR queries are sent to a link-scope multicast @@ -472,6 +468,10 @@ LLMNR implementations SHOULD dynamically estimate the timeout value basis. The algorithms described in [RFC2988] are suggested, with a minimum timeout value of 300 ms. Retransmission of UDP queries SHOULD NOT be attempted more than 3 times. Where LLMNR queries are sent using +TCP, retransmission is handled by the transport layer. + + + @@ -481,19 +481,36 @@ Esibov, Aboba & Thaler Standards Track [Page 8] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 -TCP, retransmission is handled by the transport layer. - 2.7. DNS TTL The responder should use a pre-configured TTL value in the records returned in the LLMNR query response. Due to the TTL minimalization necessary when caching an RRset, all TTLs in an RRset MUST be set to the -same value. In the additional and authority section of the response the -responder includes the same records as a DNS server would insert in the -response to the unicast DNS query. +same value. + +2.8. Use of the authority and additional sections + +Unlike the DNS, LLMNR is a peer-to-peer protocol and does not have a +concept of delegation. In LLMNR, the NS resource record type may be +stored and queried for like any other type, but it has no special +delegation semantics as it does in the DNS. Responders MAY have NS +records associated with the names for which they are authoritative, but +they SHOULD NOT include these NS records in the authority sections of +responses. + +Responders SHOULD insert an SOA record into the authority section of a +negative response, to facilitate negative caching as specified in +RFC2308. The owner name of of this SOA record MUST be equal to the +query name. + +Responders SHOULD NOT perform DNS additional section processing. + +Senders MUST NOT cache RRs from the authority or additional section of a +response as answers, though they may be used for other purposes such as +negative caching. 3. Usage model @@ -505,9 +522,9 @@ DNS servers do not respond, or when they respond to a query with RCODE=3 As noted in [DNSPerf], even when DNS servers are configured, a significant fraction of DNS queries do not receive a response, or result -in a negative responses due to missing inverse mappings or NS records -that point to nonexistent or inappropriate hosts. Given this, support -for LLMNR as a secondary name resolution mechanism has the potential to +in negative responses due to missing inverse mappings or NS records that +point to nonexistent or inappropriate hosts. Given this, support for +LLMNR as a secondary name resolution mechanism has the potential to result in a large number of inappropriate queries without the following additional restrictions: @@ -515,6 +532,18 @@ additional restrictions: back to LLMNR, the query SHOULD be retransmitted at least once. + + + +Esibov, Aboba & Thaler Standards Track [Page 9] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + [2] Where a DNS server is configured, by default a sender SHOULD send LLMNR queries only for names that are either unqualified or exist within the default domain. Where no @@ -532,18 +561,6 @@ additional restrictions: RRs returned in LLMNR responses MUST only include values that are valid on the local interface, such as IPv4 or IPv6 addresses valid on the local link or names defended using the mechanism described in Section 4. - - - -Esibov, Aboba & Thaler Standards Track [Page 9] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - In particular: [1] If a link-scope IPv6 address is returned in a AAAA RR, that @@ -575,6 +592,18 @@ to resolve unqualified host names. LLMNR usage MAY be configured manually or automatically on a per interface basis. By default, LLMNR Responders SHOULD be enabled on all + + + +Esibov, Aboba & Thaler Standards Track [Page 10] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + interfaces, at all times. Since IPv4 and IPv6 utilize distinct configuration mechanisms, it is @@ -591,19 +620,6 @@ all DNS servers support IPv6. Therefore lack of IPv6 DNS configuration may be a common problem in the short term, and LLMNR may prove useful in enabling linklocal name resolution over IPv6. - - - - -Esibov, Aboba & Thaler Standards Track [Page 10] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - Where a DHCPv4 server is available but not a DHCPv6 server [DHCPv6DNS], IPv6-only hosts may not be configured with a DNS server. Where there is no DNS server authoritative for the names of hosts on the local network @@ -637,6 +653,17 @@ It is possible that DNS configuration mechanisms will go in and out of service. In these circumstances, it is possible for hosts within an administrative domain to be inconsistent in their DNS configuration. + + +Esibov, Aboba & Thaler Standards Track [Page 11] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + For example, where DHCP is used for configuring DNS servers, one or more DHCP servers can fail. As a result, hosts configured prior to the outage will be configured with a DNS server, while hosts configured @@ -652,18 +679,6 @@ capabilities. As a result, it is recommended that hosts without a configured DNS server periodically attempt to obtain DNS configuration. A default retry interval of two (2) minutes is RECOMMENDED. - - - -Esibov, Aboba & Thaler Standards Track [Page 11] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - 4. Conflict resolution The sender MUST anticipate receiving multiple replies to the same LLMNR @@ -697,21 +712,6 @@ record in the response: Where a host is configured to respond to LLMNR queries on more than one interface, each interface should have its own independent LLMNR cache. -For each UNIQUE resource record in a given interface's configuration, -the host MUST verify resource record uniqueness on that interface. To -accomplish this, the host MUST send an LLMNR query for each UNIQUE -resource record. - -By default, a host SHOULD be configured to behave as though all RRs are -UNIQUE. Uniqueness verification is carried out when the host: - - - starts up or - - is configured to respond to the LLMNR queries on an interface or - - is configured to respond to the LLMNR queries using additional - UNIQUE resource records. - -When a host that owns a UNIQUE record receives an LLMNR query for that -record, the host MUST respond. After the client receives a response, it @@ -721,9 +721,30 @@ Esibov, Aboba & Thaler Standards Track [Page 12] -INTERNET-DRAFT LLMNR 21 May 2003 +INTERNET-DRAFT LLMNR 23 July 2003 +For each UNIQUE resource record in a given interface's configuration, +the host MUST verify resource record uniqueness on that interface. To +accomplish this, the host MUST send an LLMNR query for each UNIQUE +resource record. + +By default, a host SHOULD be configured to behave as though all RRs are +UNIQUE. Uniqueness verification is carried out when the host: + + - starts up or is rebooted + - wakes from sleep (if the network interface was inactive during sleep) + - is configured to respond to the LLMNR queries on an interface + - is configured to respond to the LLMNR queries using additional + UNIQUE resource records + - detects that an interface is connected and is usable + (e.g. an IEEE 802 hardware link-state change indicating that a + cable was attached or that an association has occurred with a + wireless base station and that any required authentication has + completed) + +When a host that owns a UNIQUE record receives an LLMNR query for that +record, the host MUST respond. After the client receives a response, it MUST check whether the response arrived on another interface. If this is the case, then the client can use the UNIQUE resource record in response to LLMNR queries. If not, then it MUST NOT use the UNIQUE @@ -737,6 +758,13 @@ example, the hostname could be chosen randomly from a large pool of potential names, or the hostname could be assigned via a process designed to guarantee uniqueness. +When name conflicts are detected, they SHOULD be logged. To detect +duplicate use of a name, an administrator can use a name resolution +utility which employs LLMNR and lists both responses and responders. +This would allow an administrator to diagnose behavior and potentially +to intervene and reconfigure LLMNR responders who should not be +configured to respond to the same name. + 4.1. Considerations for Multiple Interfaces A multi-homed host may elect to configure LLMNR on only one of its @@ -744,6 +772,18 @@ active interfaces. In many situations this will be adequate. However, should a host need to configure LLMNR on more than one of its active interfaces, there are some additional precautions it MUST take. Implementers who are not planning to support LLMNR on multiple + + + +Esibov, Aboba & Thaler Standards Track [Page 13] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + interfaces simultaneously may skip this section. A multi-homed host checks the uniqueness of UNIQUE records as described @@ -768,22 +808,6 @@ interfaces, and receives replies from more than one, the result returned to the client is defined by the implementation. The situation is illustrated in figure 2. - - - - - - - -Esibov, Aboba & Thaler Standards Track [Page 13] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - ---------- ---------- | | | | [A] [myhost] [A] @@ -808,6 +832,18 @@ and that shown in Figure 3 where no conflict exists. Figure 3. Multiple paths to same host This illustrates that the proposed name conflict resolution mechanism + + + +Esibov, Aboba & Thaler Standards Track [Page 14] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + does not support detection or resolution of conflicts between hosts on different links. This problem can also occur with unicast DNS when a multi-homed host is connected to two different networks with separated @@ -832,18 +868,6 @@ both hosts responding to the name 'A'. Link-local addresses will have a sin6_scope_id value that disambiguates which interface is used to reach the address. Of course, to the application, Figures 2 and 3 are still indistinguishable, but this API allows the application to communicate - - - -Esibov, Aboba & Thaler Standards Track [Page 14] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - successfully with any address in the list. 5. Security Considerations @@ -867,6 +891,19 @@ mechanisms are contemplated: These techniques are described in the following sections. + + + + +Esibov, Aboba & Thaler Standards Track [Page 15] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + 5.1. Scope restriction With LLMNR it is possible that hosts will allocate conflicting names for @@ -892,18 +929,6 @@ attackers can be present on the same link. These threats are most serious in wireless networks such as 802.11, since attackers on a wired network will require physical access to the home network, while wireless attackers may reside outside the home. - - - -Esibov, Aboba & Thaler Standards Track [Page 15] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - Link-layer security can be of assistance against these threats if it is available. @@ -927,6 +952,18 @@ will it send queries to that address. Use of LLMNR as a name resolution mechanism increases security vulnerabilities. For example, if an LLMNR query is sent whenever a DNS + + + +Esibov, Aboba & Thaler Standards Track [Page 16] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + server does not respond in a timely way, then an attacker can execute a denial of service attack on the DNS server(s) and then poison the LLMNR cache by responding to the resulting LLMNR queries with incorrect @@ -953,17 +990,6 @@ decreases reliance on it. LLMNR operates on a separate port from DNS, reducing the likelihood that a DNS server will unintentionally respond to an LLMNR query. - - -Esibov, Aboba & Thaler Standards Track [Page 16] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - 5.4. Authentication LLMNR does not require use of DNSSEC, and as a result, responses to @@ -983,6 +1009,21 @@ LLMNR utilizes a link-scope multicast IPv4 address (224.0.0.251) that has been previously allocated to LLMNR by IANA. It also requires allocation of a link-scope multicast IPv6 address. + + + + + + +Esibov, Aboba & Thaler Standards Track [Page 17] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + 7. Normative References [RFC1035] Mockapetris, P., "Domain Names - Implementation and @@ -1012,18 +1053,6 @@ allocation of a link-scope multicast IPv6 address. [RFC2988] Paxson, V. and M. Allman, "Computing TCP's Retransmission Timer", RFC 2988, November 2000. - - - -Esibov, Aboba & Thaler Standards Track [Page 17] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - 8. Informative References [RFC1536] Kumar, A., et. al., "DNS Implementation Errors and @@ -1043,6 +1072,18 @@ INTERNET-DRAFT LLMNR 21 May 2003 [RFC2937] Smith, C., "The Name Service Search Option for DHCP", RFC 2937, September 2000. + + + +Esibov, Aboba & Thaler Standards Track [Page 18] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + [DHCPv6DNS] Droms, R., "A Guide to Implementing Stateless DHCPv6 Service", Internet draft (work in progress), draft-droms- dhcpv6-stateless-guide-01.txt, October 2002. @@ -1059,7 +1100,7 @@ INTERNET-DRAFT LLMNR 21 May 2003 [IPV4Link] Cheshire, S., Aboba, B. and E. Guttman, "Dynamic Configuration of IPv4 Link-Local Addresses", Internet draft (work in progress), draft-ietf-zeroconf- - ipv4-linklocal-07.txt, August 2002. + ipv4-linklocal-08.txt, June 2003. [LLMNREnable] Guttman, E., "DHCP LLMNR Enable Option", Internet draft (work in progress), draft-guttman-mdns-enable-02.txt, @@ -1069,21 +1110,6 @@ INTERNET-DRAFT LLMNR 21 May 2003 draft (work in progress), draft-ietf-ipn-gwg-icmp-name- lookups-09.txt, May 2002. - - - - - - -Esibov, Aboba & Thaler Standards Track [Page 18] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - Acknowledgments This work builds upon original work done on multicast DNS by Bill @@ -1105,6 +1131,19 @@ Redmond, WA 98052 EMail: levone@microsoft.com + + + + +Esibov, Aboba & Thaler Standards Track [Page 19] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + Bernard Aboba Microsoft Corporation One Microsoft Way @@ -1121,29 +1160,6 @@ Redmond, WA 98052 Phone: +1 425 703 8835 EMail: dthaler@microsoft.com - - - - - - - - - - - - - - -Esibov, Aboba & Thaler Standards Track [Page 19] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - Intellectual Property Statement The IETF takes no position regarding the validity or scope of any @@ -1176,6 +1192,18 @@ distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice + + + +Esibov, Aboba & Thaler Standards Track [Page 20] + + + + + +INTERNET-DRAFT LLMNR 23 July 2003 + + or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet @@ -1189,21 +1217,6 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - -Esibov, Aboba & Thaler Standards Track [Page 20] - - - - - -INTERNET-DRAFT LLMNR 21 May 2003 - - Open Issues Open issues with this specification are tracked on the following web @@ -1213,21 +1226,8 @@ http://www.drizzle.com/~aboba/DNSEXT/llmnrissues.html Expiration Date -This memo is filed as , and expires -November 22, 2003. - - - - - - - - - - - - - +This memo is filed as , and expires +January 22, 2004. From dad01e16fbc98137a35bf96ffcfdbebcf1a65d7c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 02:41:31 +0000 Subject: [PATCH 65/75] remove A6 reference remove bitstring reference --- README | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README b/README index 12a5e0f80d..de78b6dae3 100644 --- a/README +++ b/README @@ -10,8 +10,7 @@ BIND 9 - IP version 6 Answers DNS queries on IPv6 sockets - IPv6 resource records (A6, DNAME, etc.) - Bitstring Labels + IPv6 resource records (AAAA) Experimental IPv6 Resolver Library - DNS Protocol Enhancements From 87c7b822b7bcdd8bec7ba1c01937286308b4847c Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 06:05:00 +0000 Subject: [PATCH 66/75] 1493. [placeholder] --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 77314c1c6b..9b05d6e0b7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1493. [placeholder] + 1492. [cleanup] Preserve rwlock quota context when upgrading / downgrading. [RT #5599] From cc6271e46c775592f39a1e8b4e2cb1ff457e2f89 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 06:08:20 +0000 Subject: [PATCH 67/75] 1494. [security] Turn on RSA BLINDING as a precaution. --- CHANGES | 2 ++ lib/dns/sec/dst/opensslrsa_link.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 9b05d6e0b7..6e6a510874 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1494. [security] Turn on RSA BLINDING as a precaution. + 1493. [placeholder] 1492. [cleanup] Preserve rwlock quota context when upgrading / diff --git a/lib/dns/sec/dst/opensslrsa_link.c b/lib/dns/sec/dst/opensslrsa_link.c index 2214fc3e27..b9e19e6eca 100644 --- a/lib/dns/sec/dst/opensslrsa_link.c +++ b/lib/dns/sec/dst/opensslrsa_link.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.25 2002/12/13 02:51:41 marka Exp $ + * $Id: opensslrsa_link.c,v 1.26 2003/07/24 06:08:20 marka Exp $ */ #ifdef OPENSSL @@ -42,9 +42,15 @@ #if OPENSSL_VERSION_NUMBER < 0x0090601fL #define SET_FLAGS(rsa) \ - (rsa)->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); + do { \ + (rsa)->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); \ + (rsa)->flags |= RSA_FLAG_BLINDING; \ + } while (0) #else -#define SET_FLAGS(rsa) do { } while (0); +#define SET_FLAGS(rsa) \ + do { \ + (rsa)->flags |= RSA_FLAG_BLINDING; \ + } while (0) #endif static isc_result_t opensslrsa_todns(const dst_key_t *key, isc_buffer_t *data); From f2d11f4c11cff145143d58531ba35f827478b721 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 06:18:42 +0000 Subject: [PATCH 68/75] 1494. [security] Turn on RSA BLINDING as a precaution. --- CHANGES | 2 ++ lib/dns/sec/dst/opensslrsa_link.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 77dcf12c54..880c62eaca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1494. [security] Turn on RSA BLINDING as a precaution. + 1493. [doc] A6 and "bitstring" labels are now experimental. 1492. [cleanup] Preserve rwlock quota context when upgrading / diff --git a/lib/dns/sec/dst/opensslrsa_link.c b/lib/dns/sec/dst/opensslrsa_link.c index b13a6c1b2a..cebb904502 100644 --- a/lib/dns/sec/dst/opensslrsa_link.c +++ b/lib/dns/sec/dst/opensslrsa_link.c @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.12.2.3 2001/12/19 01:29:31 marka Exp $ + * $Id: opensslrsa_link.c,v 1.12.2.4 2003/07/24 06:18:42 marka Exp $ */ #ifdef OPENSSL @@ -217,6 +217,7 @@ opensslrsa_generate(dst_key_t *key, int exp) { } rsa->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); + rsa->flags |= RSA_FLAG_BLINDING; key->opaque = rsa; @@ -296,6 +297,7 @@ opensslrsa_fromdns(dst_key_t *key, isc_buffer_t *data) { if (rsa == NULL) return (ISC_R_NOMEMORY); rsa->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); + rsa->flags |= RSA_FLAG_BLINDING; if (r.length < 1) { RSA_free(rsa); @@ -434,6 +436,7 @@ opensslrsa_fromfile(dst_key_t *key, const char *filename) { if (rsa == NULL) DST_RET(ISC_R_NOMEMORY); rsa->flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); + rsa->flags |= RSA_FLAG_BLINDING; key->opaque = rsa; for (i = 0; i < priv.nelements; i++) { From bfee2789a63e62416d694c6389809974c04cc8e5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 06:31:55 +0000 Subject: [PATCH 69/75] silence compiler warning (HPUX/11i) --- lib/isc/include/isc/refcount.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h index 265ed8cead..2b3ee287e2 100644 --- a/lib/isc/include/isc/refcount.h +++ b/lib/isc/include/isc/refcount.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: refcount.h,v 1.3 2001/02/09 00:26:20 gson Exp $ */ +/* $Id: refcount.h,v 1.3.2.1 2003/07/24 06:31:55 marka Exp $ */ #ifndef ISC_REFCOUNT_H #define ISC_REFCOUNT_H 1 @@ -111,21 +111,23 @@ typedef struct isc_refcount { #define isc_refcount_increment(rp, tp) \ do { \ + unsigned int _tmp = (unsigned int *)(tp); \ LOCK(&(rp)->lock); \ REQUIRE((rp)->refs > 0); \ ++((rp)->refs); \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = ((rp)->refs); \ + if (_tmp != NULL) \ + *_tmp = ((rp)->refs); \ UNLOCK(&(rp)->lock); \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ + unsigned int _tmp = (unsigned int *)(tp); \ LOCK(&(rp)->lock); \ REQUIRE((rp)->refs > 0); \ --((rp)->refs); \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = ((rp)->refs); \ + if (_tmp != NULL) \ + *_tmp = ((rp)->refs); \ UNLOCK(&(rp)->lock); \ } while (0) From 4c54e122fec2e1c351e679b907c17684c18e6ded Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 06:41:20 +0000 Subject: [PATCH 70/75] silence compiler warning (HPUX/11i) --- lib/isc/include/isc/refcount.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h index 265ed8cead..1b4e08ad82 100644 --- a/lib/isc/include/isc/refcount.h +++ b/lib/isc/include/isc/refcount.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: refcount.h,v 1.3 2001/02/09 00:26:20 gson Exp $ */ +/* $Id: refcount.h,v 1.4 2003/07/24 06:41:20 marka Exp $ */ #ifndef ISC_REFCOUNT_H #define ISC_REFCOUNT_H 1 @@ -111,21 +111,23 @@ typedef struct isc_refcount { #define isc_refcount_increment(rp, tp) \ do { \ + unsigned int _tmp = (unsigned int *)(tp); \ LOCK(&(rp)->lock); \ REQUIRE((rp)->refs > 0); \ ++((rp)->refs); \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = ((rp)->refs); \ + if (_tmp != NULL) \ + *_tmp = ((rp)->refs); \ UNLOCK(&(rp)->lock); \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ + unsigned int _tmp = (unsigned int *)(tp); \ LOCK(&(rp)->lock); \ REQUIRE((rp)->refs > 0); \ --((rp)->refs); \ - if ((tp) != NULL) \ - *(unsigned int *)(tp) = ((rp)->refs); \ + if (_tmp != NULL) \ + *_tmp = ((rp)->refs); \ UNLOCK(&(rp)->lock); \ } while (0) From 1814603e8aced963f4d42691a0d084996c2a6956 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 24 Jul 2003 23:05:02 +0000 Subject: [PATCH 71/75] new draft --- ...ietf-dnsext-keyrr-key-signing-flag-08.txt} | 206 +++++++++--------- 1 file changed, 102 insertions(+), 104 deletions(-) rename doc/draft/{draft-ietf-dnsext-keyrr-key-signing-flag-07.txt => draft-ietf-dnsext-keyrr-key-signing-flag-08.txt} (85%) diff --git a/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt b/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-08.txt similarity index 85% rename from doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt rename to doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-08.txt index c360faf9dc..f7600586b6 100644 --- a/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-07.txt +++ b/doc/draft/draft-ietf-dnsext-keyrr-key-signing-flag-08.txt @@ -1,19 +1,16 @@ - - DNS Extensions O. Kolkman Internet-Draft RIPE NCC -Expires: July 2, 2003 J. Schlyter - Carlstedt Research & - Technology +Expires: January 16, 2004 J. Schlyter + E. Lewis ARIN - January 2003 + July 18, 2003 KEY RR Secure Entry Point (SEP) Flag - draft-ietf-dnsext-keyrr-key-signing-flag-07 + draft-ietf-dnsext-keyrr-key-signing-flag-08 Status of this Memo @@ -36,7 +33,7 @@ Status of this Memo The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. - This Internet-Draft will expire on July 2, 2003. + This Internet-Draft will expire on January 16, 2004. Copyright Notice @@ -54,9 +51,10 @@ Abstract -Kolkman, et al. Expires July 2, 2003 [Page 1] + +Kolkman, et al. Expires January 16, 2004 [Page 1] -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 Table of Contents @@ -66,20 +64,21 @@ Table of Contents 3. DNSSEC Protocol Changes . . . . . . . . . . . . . . . . . . . 4 4. Operational Guidelines . . . . . . . . . . . . . . . . . . . . 4 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 - 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 + 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 7. Internationalization Considerations . . . . . . . . . . . . . 6 8. Document Changes . . . . . . . . . . . . . . . . . . . . . . . 6 8.1 draft version 00 -> 01 . . . . . . . . . . . . . . . . . . . . 6 8.2 draft version 01 -> 02 . . . . . . . . . . . . . . . . . . . . 6 8.3 draft version 02 -> 03 . . . . . . . . . . . . . . . . . . . . 6 - 8.4 draft version 03 -> 04 . . . . . . . . . . . . . . . . . . . . 6 + 8.4 draft version 03 -> 04 . . . . . . . . . . . . . . . . . . . . 7 8.5 draft version 04 -> 05 . . . . . . . . . . . . . . . . . . . . 7 8.6 draft version 05 -> 06 . . . . . . . . . . . . . . . . . . . . 7 8.7 draft version 06 -> 07 . . . . . . . . . . . . . . . . . . . . 7 - 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 - Normative References . . . . . . . . . . . . . . . . . . . . . 7 + 8.8 draft version 07 -> 08 . . . . . . . . . . . . . . . . . . . . 7 + 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 + Normative References . . . . . . . . . . . . . . . . . . . . . 8 Informative References . . . . . . . . . . . . . . . . . . . . 8 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 8 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 9 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 10 @@ -109,10 +108,9 @@ Table of Contents - -Kolkman, et al. Expires July 2, 2003 [Page 2] +Kolkman, et al. Expires January 16, 2004 [Page 2] -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 1. Introduction @@ -142,6 +140,11 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 schemes. Given that the distinction has proven helpful, the labels KSK and ZSK have begun to stick. + There is a need to differentiate between a KSK and a ZSK by the zone + administrator. This need is driven by knowing which keys are to be + sent for DS RRs, which keys are to be distributed to resolvers, and + which keys are fed to the signer application at the appropriate time. + The reason for the term "SEP" is a result of the observation that the distinction between KSK and ZSK is only significant to the signer element of the DNS. Servers, resolvers and verifiers do not need to @@ -152,25 +155,24 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 generate DS RRs, or to indicate what keys are intended for static configuration. + In the flow between signer and (parental) key-collector and in the + flow between the signer and the resolver configuration it is + important to be able to differentiate the SEP keys from the other + keys in a KEY RR set. The SEP flag is to be of no interest to the + flow between the verifier and the authoritative data store. + + + + +Kolkman, et al. Expires January 16, 2004 [Page 3] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + The key words "MAY","MAY NOT", "MUST", "MUST NOT", "REQUIRED", "RECOMMENDED", "SHOULD", and "SHOULD NOT" in this document are to be interpreted as described in RFC2119. - - - - - - - - - - -Kolkman, et al. Expires July 2, 2003 [Page 3] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - 2. The Secure Entry Point (SEP) Flag @@ -215,18 +217,19 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 change the identity of the key within DNS. When a key pair is created, the operator needs to indicate whether + + + +Kolkman, et al. Expires January 16, 2004 [Page 4] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + the SEP bit is to be set in the KEY RR. The SEP bit is recommended whenever the public key of the key pair will be distributed to the parent zone to build the authentication chain or if the public key is to be distributed for static configuration in verifiers. - - -Kolkman, et al. Expires July 2, 2003 [Page 4] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - When signing a zone, it is intended that the key(s) with the SEP bit set (if such keys exist) are used to sign the KEY RR set of the zone. The same key can be used to sign the rest of the zone data too. It @@ -269,6 +272,15 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 generate DS RRs during the most recent roll over. These same considerations apply to entities that configure keys in resolvers. + + + + +Kolkman, et al. Expires January 16, 2004 [Page 5] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + 6. IANA Considerations draft-ietf-dnsext-restrict-key-for-dnssec [4] eliminates all flags @@ -276,13 +288,6 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 the 15'th bit as the SEP bit; the decimal representation of the flagfield will then be odd for key-signing keys. - - -Kolkman, et al. Expires July 2, 2003 [Page 5] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - 7. Internationalization Considerations Although SEP is a popular acronym in many different languages, there @@ -323,6 +328,15 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 Spelling and style corrections. + + + + +Kolkman, et al. Expires January 16, 2004 [Page 6] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + 8.4 draft version 03 -> 04 Text has been made consistent with the statement: ' No special @@ -331,14 +345,6 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 Made explicit that the key tag changes in SIG RR. - - - -Kolkman, et al. Expires July 2, 2003 [Page 6] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - 8.5 draft version 04 -> 05 One occurrence of must and one occurrence of should uppercased @@ -374,6 +380,24 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 is not relevant to the signer process. +8.8 draft version 07 -> 08 + + During the edit of version 07, a paragraph got dropped from the + introduction (See message by Lewis dd June 19, subject " Fwd: Re: + NOTIFY + SIG(0) + DS => secure parent update?" (http:// + + + +Kolkman, et al. Expires January 16, 2004 [Page 7] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + + ops.ietf.org/lists/nhamedroppers/namedroppers.2003/msg01336.html). + This version re-introduces the paragraph, which caused some + reordering and style changes in the introduction. + + 9. Acknowledgments The ideas documented in this document are inspired by communications @@ -387,14 +411,6 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 Normative References - - - -Kolkman, et al. Expires July 2, 2003 [Page 7] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. @@ -416,6 +432,23 @@ Informative References Story"", ISBN 0151002177 (50th anniversery edition), April 1996. + + + + + + + + + + + + +Kolkman, et al. Expires January 16, 2004 [Page 8] + +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 + + Authors' Addresses Olaf M. Kolkman @@ -430,25 +463,11 @@ Authors' Addresses Jakob Schlyter - Carlstedt Research & Technology - Stora Badhusgatan 18-20 - Goteborg SE-411 21 + Karl Gustavsgatan 15 + Goteborg SE-411 25 Sweden - EMail: jakob@crt.se - URI: http://www.crt.se/~jakob/ - - - - - - - - - -Kolkman, et al. Expires July 2, 2003 [Page 8] - -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 + EMail: jakob@schlyter.se Edward P. Lewis @@ -481,30 +500,9 @@ Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 - - - - - - - - - - - - - - - - - - - - - -Kolkman, et al. Expires July 2, 2003 [Page 9] +Kolkman, et al. Expires January 16, 2004 [Page 9] -Internet-Draft KEY RR Secure Entry Point (SEP) Flag January 2003 +Internet-Draft KEY RR Secure Entry Point (SEP) Flag July 2003 Full Copyright Statement @@ -558,5 +556,5 @@ Acknowledgement -Kolkman, et al. Expires July 2, 2003 [Page 10] +Kolkman, et al. Expires January 16, 2004 [Page 10] From 5eb91bd90e3ad3426e5e3213031556a737cf3809 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 25 Jul 2003 00:01:16 +0000 Subject: [PATCH 72/75] silence compiler warnings (HPUX/11i) --- bin/dig/dig.c | 4 ++-- bin/dnssec/dnssec-signkey.c | 4 ++-- bin/dnssec/dnssectool.c | 4 ++-- bin/nsupdate/nsupdate.c | 6 +++--- lib/dns/gen.c | 4 ++-- lib/dns/rdata.c | 6 +++--- lib/dns/rdata/any_255/tsig_250.c | 10 +++++----- lib/dns/rdata/generic/afsdb_18.c | 4 ++-- lib/dns/rdata/generic/cert_37.c | 4 ++-- lib/dns/rdata/generic/loc_29.c | 8 ++++---- lib/dns/rdata/generic/mx_15.c | 4 ++-- lib/dns/rdata/generic/rt_21.c | 4 ++-- lib/dns/rdata/generic/sig_24.c | 4 ++-- lib/dns/rdata/generic/tkey_249.c | 10 +++++----- lib/dns/rdata/in_1/a6_38.c | 4 ++-- lib/dns/rdata/in_1/kx_36.c | 4 ++-- lib/dns/rdata/in_1/naptr_35.c | 6 +++--- lib/dns/rdata/in_1/px_26.c | 4 ++-- lib/dns/rdata/in_1/srv_33.c | 8 ++++---- lib/dns/sec/dst/dst_api.c | 4 ++-- lib/dns/time.c | 4 ++-- lib/dns/zone.c | 4 ++-- lib/isc/entropy.c | 4 ++-- lib/isc/lex.c | 16 ++++++++-------- lib/isc/mem.c | 22 +++++++++++----------- lib/isc/pthreads/thread.c | 4 ++-- lib/isc/unix/socket.c | 8 ++++---- lib/isc/unix/time.c | 6 +++--- lib/isccc/cc.c | 8 ++++---- lib/lwres/context.c | 8 ++++---- lib/lwres/getipnode.c | 6 +++--- lib/lwres/getnameinfo.c | 6 +++--- lib/lwres/getrrset.c | 4 ++-- lib/lwres/lwconfig.c | 28 ++++++++++++++-------------- lib/lwres/lwinetaton.c | 10 +++++----- lib/tests/t_api.c | 6 +++--- 36 files changed, 125 insertions(+), 125 deletions(-) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index d988a0a605..927e06ea00 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.181 2003/02/26 05:05:13 marka Exp $ */ +/* $Id: dig.c,v 1.182 2003/07/25 00:01:03 marka Exp $ */ #include #include @@ -1000,7 +1000,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, char *hash; cmd = option[0]; - if (strlen(option) > 1) { + if (strlen(option) > 1U) { value_from_next = ISC_FALSE; value = &option[1]; } else { diff --git a/bin/dnssec/dnssec-signkey.c b/bin/dnssec/dnssec-signkey.c index 366e887b20..f348e25afa 100644 --- a/bin/dnssec/dnssec-signkey.c +++ b/bin/dnssec/dnssec-signkey.c @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-signkey.c,v 1.58 2002/12/03 05:01:34 marka Exp $ */ +/* $Id: dnssec-signkey.c,v 1.59 2003/07/25 00:01:04 marka Exp $ */ #include @@ -260,7 +260,7 @@ main(int argc, char *argv[]) { setup_logging(verbose, mctx, &log); - if (strlen(argv[0]) < 8 || strncmp(argv[0], "keyset-", 7) != 0) + if (strlen(argv[0]) < 8U || strncmp(argv[0], "keyset-", 7) != 0) fatal("keyset file '%s' must start with keyset-", argv[0]); db = NULL; diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 9ececf6ec1..f25783d743 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.36 2001/11/27 22:08:58 bwelling Exp $ */ +/* $Id: dnssectool.c,v 1.37 2003/07/25 00:01:04 marka Exp $ */ #include @@ -273,7 +273,7 @@ strtotime(const char *str, isc_int64_t now, isc_int64_t base) { if (*endp != '\0') fatal("time value %s is invalid", str); val = now + offset; - } else if (strlen(str) == 8) { + } else if (strlen(str) == 8U) { char timestr[15]; sprintf(timestr, "%s000000", str); result = dns_time64_fromtext(timestr, &val); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 0cdbc96d45..dc66d5ecaf 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.121 2002/11/12 23:58:13 explorer Exp $ */ +/* $Id: nsupdate.c,v 1.122 2003/07/25 00:01:05 marka Exp $ */ #include @@ -89,7 +89,7 @@ extern int h_errno; #define INITTEXT (2 * 1024) #define MAXTEXT (128 * 1024) #define FIND_TIMEOUT 5 -#define TTL_MAX 2147483647 /* Maximum signed 32 bit integer. */ +#define TTL_MAX 2147483647U /* Maximum signed 32 bit integer. */ #define DNSDEFAULTPORT 53 @@ -1156,7 +1156,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) { if (isdelete) ttl = 0; else if (ttl > TTL_MAX) { - fprintf(stderr, "ttl '%s' is out of range (0 to %d)\n", + fprintf(stderr, "ttl '%s' is out of range (0 to %u)\n", word, TTL_MAX); goto failure; } diff --git a/lib/dns/gen.c b/lib/dns/gen.c index 93a7c19dbc..ddfc952e23 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: gen.c,v 1.69 2003/07/17 08:05:15 marka Exp $ */ +/* $Id: gen.c,v 1.70 2003/07/25 00:01:05 marka Exp $ */ #include @@ -772,7 +772,7 @@ main(int argc, char **argv) { "#define dns_rdatatype_%s\t%s" "((dns_rdatatype_t)dns_rdatatype_%s)" "\n", - s, strlen(s) < 2 ? "\t" : "", s); + s, strlen(s) < 2U ? "\t" : "", s); lasttype = tt->type; } diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index fb4c3ebc59..a3f0a22d39 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.176 2003/07/17 08:05:15 marka Exp $ */ +/* $Id: rdata.c,v 1.177 2003/07/25 00:01:05 marka Exp $ */ #include #include @@ -626,7 +626,7 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type, result = isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE); - if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535) + if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535U) return (ISC_R_RANGE); result = isc_buffer_allocate(mctx, &buf, token.value.as_ulong); if (result != ISC_R_SUCCESS) @@ -1812,7 +1812,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if ((token.value.as_ulong % 4) != 0) + if ((token.value.as_ulong % 4) != 0U) isc_buffer_subtract(target, 4 - (token.value.as_ulong % 4)); /* diff --git a/lib/dns/rdata/any_255/tsig_250.c b/lib/dns/rdata/any_255/tsig_250.c index b8cb03aa83..8545690aca 100644 --- a/lib/dns/rdata/any_255/tsig_250.c +++ b/lib/dns/rdata/any_255/tsig_250.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tsig_250.c,v 1.56 2002/02/20 03:34:44 marka Exp $ */ +/* $Id: tsig_250.c,v 1.57 2003/07/25 00:01:07 marka Exp $ */ /* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */ @@ -70,7 +70,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -79,7 +79,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -93,7 +93,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -119,7 +119,7 @@ fromtext_any_tsig(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/generic/afsdb_18.c b/lib/dns/rdata/generic/afsdb_18.c index eab333f449..8b0194d19b 100644 --- a/lib/dns/rdata/generic/afsdb_18.c +++ b/lib/dns/rdata/generic/afsdb_18.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: afsdb_18.c,v 1.40 2001/11/27 01:55:34 gson Exp $ */ +/* $Id: afsdb_18.c,v 1.41 2003/07/25 00:01:08 marka Exp $ */ /* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */ @@ -43,7 +43,7 @@ fromtext_afsdb(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/generic/cert_37.c b/lib/dns/rdata/generic/cert_37.c index cc3928e0d2..575e4c3dae 100644 --- a/lib/dns/rdata/generic/cert_37.c +++ b/lib/dns/rdata/generic/cert_37.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cert_37.c,v 1.43 2002/02/20 03:34:46 marka Exp $ */ +/* $Id: cert_37.c,v 1.44 2003/07/25 00:01:08 marka Exp $ */ /* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */ @@ -53,7 +53,7 @@ fromtext_cert(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index d03472e87f..0150541de2 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: loc_29.c,v 1.38 2002/06/14 23:40:14 marka Exp $ */ +/* $Id: loc_29.c,v 1.39 2003/07/25 00:01:08 marka Exp $ */ /* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */ @@ -72,7 +72,7 @@ fromtext_loc(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 90) + if (token.value.as_ulong > 90U) RETTOK(ISC_R_RANGE); d1 = (int)token.value.as_ulong; /* @@ -156,7 +156,7 @@ fromtext_loc(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 180) + if (token.value.as_ulong > 180U) RETTOK(ISC_R_RANGE); d2 = (int)token.value.as_ulong; @@ -534,7 +534,7 @@ totext_loc(ARGS_TOTEXT) { altitude = uint32_fromregion(&sr); isc_region_consume(&sr, 4); - if (altitude < 10000000) { + if (altitude < 10000000U) { below = ISC_TRUE; altitude = 10000000 - altitude; } else { diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c index 3a3206f765..a94c94ed57 100644 --- a/lib/dns/rdata/generic/mx_15.c +++ b/lib/dns/rdata/generic/mx_15.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mx_15.c,v 1.49 2001/11/27 01:55:37 gson Exp $ */ +/* $Id: mx_15.c,v 1.50 2003/07/25 00:01:08 marka Exp $ */ /* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */ @@ -38,7 +38,7 @@ fromtext_mx(ARGS_FROMTEXT) { RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c index aaec8f933a..767207c789 100644 --- a/lib/dns/rdata/generic/rt_21.c +++ b/lib/dns/rdata/generic/rt_21.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rt_21.c,v 1.38 2001/11/27 01:55:39 gson Exp $ */ +/* $Id: rt_21.c,v 1.39 2003/07/25 00:01:08 marka Exp $ */ /* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */ @@ -40,7 +40,7 @@ fromtext_rt(ARGS_FROMTEXT) { RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c index 7f87b1bbee..490cca652e 100644 --- a/lib/dns/rdata/generic/sig_24.c +++ b/lib/dns/rdata/generic/sig_24.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sig_24.c,v 1.58 2002/02/20 03:35:00 marka Exp $ */ +/* $Id: sig_24.c,v 1.59 2003/07/25 00:01:09 marka Exp $ */ /* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */ @@ -73,7 +73,7 @@ fromtext_sig(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xff) + if (token.value.as_ulong > 0xffU) RETTOK(ISC_R_RANGE); c = (unsigned char)token.value.as_ulong; RETERR(mem_tobuffer(target, &c, 1)); diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c index 86143a8a72..79c911ec21 100644 --- a/lib/dns/rdata/generic/tkey_249.c +++ b/lib/dns/rdata/generic/tkey_249.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tkey_249.c,v 1.52 2002/02/20 03:35:02 marka Exp $ */ +/* $Id: tkey_249.c,v 1.53 2003/07/25 00:01:09 marka Exp $ */ /* * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. @@ -73,7 +73,7 @@ fromtext_tkey(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -99,7 +99,7 @@ fromtext_tkey(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -113,7 +113,7 @@ fromtext_tkey(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -221,7 +221,7 @@ totext_tkey(ARGS_TOTEXT) { * Other Data. */ REQUIRE(n <= sr.length); - if (n != 0) { + if (n != 0U) { dr = sr; dr.length = n; if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) diff --git a/lib/dns/rdata/in_1/a6_38.c b/lib/dns/rdata/in_1/a6_38.c index 0d013add08..1ec3532468 100644 --- a/lib/dns/rdata/in_1/a6_38.c +++ b/lib/dns/rdata/in_1/a6_38.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a6_38.c,v 1.49 2002/02/20 03:35:09 marka Exp $ */ +/* $Id: a6_38.c,v 1.50 2003/07/25 00:01:10 marka Exp $ */ /* RFC2874 */ @@ -48,7 +48,7 @@ fromtext_in_a6(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 128) + if (token.value.as_ulong > 128U) RETTOK(ISC_R_RANGE); prefixlen = (unsigned char)token.value.as_ulong; diff --git a/lib/dns/rdata/in_1/kx_36.c b/lib/dns/rdata/in_1/kx_36.c index e1b96a54c3..2d6952f3cc 100644 --- a/lib/dns/rdata/in_1/kx_36.c +++ b/lib/dns/rdata/in_1/kx_36.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: kx_36.c,v 1.38 2001/11/27 01:55:45 gson Exp $ */ +/* $Id: kx_36.c,v 1.39 2003/07/25 00:01:10 marka Exp $ */ /* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */ @@ -41,7 +41,7 @@ fromtext_in_kx(ARGS_FROMTEXT) { RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/in_1/naptr_35.c b/lib/dns/rdata/in_1/naptr_35.c index c2bcea7ef2..6c76496d29 100644 --- a/lib/dns/rdata/in_1/naptr_35.c +++ b/lib/dns/rdata/in_1/naptr_35.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: naptr_35.c,v 1.44 2001/11/27 01:55:46 gson Exp $ */ +/* $Id: naptr_35.c,v 1.45 2003/07/25 00:01:10 marka Exp $ */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ @@ -44,7 +44,7 @@ fromtext_in_naptr(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -53,7 +53,7 @@ fromtext_in_naptr(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/in_1/px_26.c b/lib/dns/rdata/in_1/px_26.c index d487a1dfd6..f8d56a72e7 100644 --- a/lib/dns/rdata/in_1/px_26.c +++ b/lib/dns/rdata/in_1/px_26.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: px_26.c,v 1.35 2001/11/27 01:55:49 gson Exp $ */ +/* $Id: px_26.c,v 1.36 2003/07/25 00:01:10 marka Exp $ */ /* Reviewed: Mon Mar 20 10:44:27 PST 2000 */ @@ -44,7 +44,7 @@ fromtext_in_px(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/rdata/in_1/srv_33.c b/lib/dns/rdata/in_1/srv_33.c index 681cc32ee2..81ef373ab1 100644 --- a/lib/dns/rdata/in_1/srv_33.c +++ b/lib/dns/rdata/in_1/srv_33.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: srv_33.c,v 1.37 2001/11/27 01:55:50 gson Exp $ */ +/* $Id: srv_33.c,v 1.38 2003/07/25 00:01:10 marka Exp $ */ /* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */ @@ -44,7 +44,7 @@ fromtext_in_srv(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -53,7 +53,7 @@ fromtext_in_srv(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); @@ -62,7 +62,7 @@ fromtext_in_srv(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); RETERR(uint16_tobuffer(token.value.as_ulong, target)); diff --git a/lib/dns/sec/dst/dst_api.c b/lib/dns/sec/dst/dst_api.c index d00fc518b3..1d2539617c 100644 --- a/lib/dns/sec/dst/dst_api.c +++ b/lib/dns/sec/dst/dst_api.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.106 2002/12/13 02:51:40 marka Exp $ + * $Id: dst_api.c,v 1.107 2003/07/25 00:01:11 marka Exp $ */ #include @@ -1054,7 +1054,7 @@ buildfilename(dns_name_t *name, dns_keytag_t id, if (isc_buffer_availablelength(out) < strlen(directory)) return (ISC_R_NOSPACE); isc_buffer_putstr(out, directory); - if (strlen(directory) > 0 && + if (strlen(directory) > 0U && directory[strlen(directory) - 1] != '/') isc_buffer_putstr(out, "/"); } diff --git a/lib/dns/time.c b/lib/dns/time.c index d6d93cc184..7c6f69bc8f 100644 --- a/lib/dns/time.c +++ b/lib/dns/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.23 2003/04/11 07:25:27 marka Exp $ */ +/* $Id: time.c,v 1.24 2003/07/25 00:01:06 marka Exp $ */ #include @@ -127,7 +127,7 @@ dns_time64_fromtext(const char *source, isc_int64_t *target) { return (ISC_R_RANGE); \ } while (0) - if (strlen(source) != 14) + if (strlen(source) != 14U) return (DNS_R_SYNTAX); if (sscanf(source, "%4d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) != 6) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index fd17ea88e1..1a1414c9bb 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.395 2003/07/21 01:11:29 marka Exp $ */ +/* $Id: zone.c,v 1.396 2003/07/25 00:01:06 marka Exp $ */ #include @@ -4847,7 +4847,7 @@ zone_tostr(dns_zone_t *zone, char *buf, size_t length) { isc_buffer_t buffer; REQUIRE(buf != NULL); - REQUIRE(length > 1); + REQUIRE(length > 1U); /* * Leave space for terminating '\0'. diff --git a/lib/isc/entropy.c b/lib/isc/entropy.c index 2f08bd55fd..2b8998db76 100644 --- a/lib/isc/entropy.c +++ b/lib/isc/entropy.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: entropy.c,v 1.9 2002/05/30 04:21:14 marka Exp $ */ +/* $Id: entropy.c,v 1.10 2003/07/25 00:01:12 marka Exp $ */ /* * This is the system independent part of the entropy module. It is @@ -308,7 +308,7 @@ entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len, addr = (unsigned long)p; buf = p; - if ((addr & 0x03) != 0) { + if ((addr & 0x03U) != 0U) { val = 0; switch (len) { case 3: diff --git a/lib/isc/lex.c b/lib/isc/lex.c index b8ea8ac1e6..26c7c0c52c 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lex.c,v 1.76 2003/04/11 07:25:27 marka Exp $ */ +/* $Id: lex.c,v 1.77 2003/07/25 00:01:12 marka Exp $ */ #include @@ -92,7 +92,7 @@ isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp) { */ REQUIRE(lexp != NULL && *lexp == NULL); - REQUIRE(max_token > 0); + REQUIRE(max_token > 0U); lex = isc_mem_get(mctx, sizeof(*lex)); if (lex == NULL) @@ -620,13 +620,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { state = lexstate_string; } } - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); *curr++ = c; *curr = '\0'; remaining--; @@ -650,13 +650,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { if ((options & ISC_LEXOPT_ESCAPE) != 0) escaped = (!escaped && c == '\\') ? ISC_TRUE : ISC_FALSE; - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); *curr++ = c; *curr = '\0'; remaining--; @@ -747,13 +747,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { escaped = ISC_TRUE; else escaped = ISC_FALSE; - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); prev = curr; *curr++ = c; *curr = '\0'; diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 12021682b4..8b41992801 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.113 2002/05/23 04:32:30 marka Exp $ */ +/* $Id: mem.c,v 1.114 2003/07/25 00:01:12 marka Exp $ */ #include @@ -663,10 +663,10 @@ mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { ctx->inuse -= size; if (size > ctx->max_size) { - INSIST(ctx->stats[ctx->max_size].gets > 0); + INSIST(ctx->stats[ctx->max_size].gets > 0U); ctx->stats[ctx->max_size].gets--; } else { - INSIST(ctx->stats[size].gets > 0); + INSIST(ctx->stats[size].gets > 0U); ctx->stats[size].gets--; } } @@ -680,7 +680,7 @@ mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { static void * default_memalloc(void *arg, size_t size) { UNUSED(arg); - if (size == 0) + if (size == 0U) size = 1; return (malloc(size)); } @@ -717,7 +717,7 @@ isc_mem_createx(size_t init_max_size, size_t target_size, if (ctx == NULL) return (ISC_R_NOMEMORY); - if (init_max_size == 0) + if (init_max_size == 0U) ctx->max_size = DEF_MAX_SIZE; else ctx->max_size = init_max_size; @@ -873,7 +873,7 @@ destroy(isc_mem_t *ctx) { if (ctx->stats[i].gets != 0) print_active(ctx, stderr); #endif - INSIST(ctx->stats[i].gets == 0); + INSIST(ctx->stats[i].gets == 0U); } } @@ -1032,14 +1032,14 @@ isc__mem_get(isc_mem_t *ctx, size_t size FLARG) { #endif /* ISC_MEM_USE_INTERNAL_MALLOC */ ADD_TRACE(ctx, ptr, size, file, line); - if (ctx->hi_water != 0 && !ctx->hi_called && + if (ctx->hi_water != 0U && !ctx->hi_called && ctx->inuse > ctx->hi_water) { ctx->hi_called = ISC_TRUE; call_water = ISC_TRUE; } if (ctx->inuse > ctx->maxinuse) { ctx->maxinuse = ctx->inuse; - if (ctx->hi_water != 0 && ctx->inuse > ctx->hi_water && + if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water && (isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0) fprintf(stderr, "maxinuse = %lu\n", (unsigned long)ctx->inuse); @@ -1077,7 +1077,7 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG) * isc_mem_setwater() called with 0 for hi_water and lo_water. */ if (ctx->hi_called && - (ctx->inuse < ctx->lo_water || ctx->lo_water == 0)) { + (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) { ctx->hi_called = ISC_FALSE; if (ctx->water != NULL) @@ -1145,7 +1145,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) { for (i = 0; i <= ctx->max_size; i++) { s = &ctx->stats[i]; - if (s->totalgets == 0 && s->gets == 0) + if (s->totalgets == 0U && s->gets == 0U) continue; fprintf(out, "%s%5lu: %11lu gets, %11lu rem", (i == ctx->max_size) ? ">=" : " ", @@ -1384,7 +1384,7 @@ isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) { isc_mempool_t *mpctx; REQUIRE(VALID_CONTEXT(mctx)); - REQUIRE(size > 0); + REQUIRE(size > 0U); REQUIRE(mpctxp != NULL && *mpctxp == NULL); /* diff --git a/lib/isc/pthreads/thread.c b/lib/isc/pthreads/thread.c index 7e24cedc62..78ae4a5a64 100644 --- a/lib/isc/pthreads/thread.c +++ b/lib/isc/pthreads/thread.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: thread.c,v 1.9 2001/01/09 21:58:02 bwelling Exp $ */ +/* $Id: thread.c,v 1.10 2003/07/25 00:01:13 marka Exp $ */ #include @@ -23,7 +23,7 @@ #include #ifndef THREAD_MINSTACKSIZE -#define THREAD_MINSTACKSIZE (64 * 1024) +#define THREAD_MINSTACKSIZE (64U * 1024) #endif isc_result_t diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 6427305d33..560b591b08 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.231 2003/03/03 01:41:27 marka Exp $ */ +/* $Id: socket.c,v 1.232 2003/07/25 00:01:13 marka Exp $ */ #include @@ -648,7 +648,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev, buffer = ISC_LIST_NEXT(buffer, link); } - INSIST(skip_count == 0); + INSIST(skip_count == 0U); config: msg->msg_iov = iov; @@ -990,7 +990,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) { dev->n += cc; actual_count = cc; buffer = ISC_LIST_HEAD(dev->bufferlist); - while (buffer != NULL && actual_count > 0) { + while (buffer != NULL && actual_count > 0U) { REQUIRE(ISC_BUFFER_VALID(buffer)); if (isc_buffer_availablelength(buffer) <= actual_count) { actual_count -= isc_buffer_availablelength(buffer); @@ -1003,7 +1003,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) { } buffer = ISC_LIST_NEXT(buffer, link); if (buffer == NULL) { - INSIST(actual_count == 0); + INSIST(actual_count == 0U); } } diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c index 9406cd94e0..ddb7abd4af 100644 --- a/lib/isc/unix/time.c +++ b/lib/isc/unix/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.45 2001/12/19 03:46:52 mayer Exp $ */ +/* $Id: time.c,v 1.46 2003/07/25 00:01:14 marka Exp $ */ #include @@ -173,7 +173,7 @@ isc_time_now(isc_time_t *t) { * Ensure the tv_sec value fits in t->seconds. */ if (sizeof(tv.tv_sec) > sizeof(t->seconds) && - ((tv.tv_sec | (unsigned int)-1) ^ (unsigned int)-1) != 0) + ((tv.tv_sec | (unsigned int)-1) ^ (unsigned int)-1) != 0U) return (ISC_R_RANGE); t->seconds = tv.tv_sec; @@ -369,7 +369,7 @@ isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) { (time_t)0.5 != 0.5 && /* Not a floating point type. */ (i = (time_t)-1) != 4294967295u && /* Is signed. */ (seconds & - (1U << (sizeof(time_t) * CHAR_BIT - 1))) != 0) { /* Negative. */ + (1U << (sizeof(time_t) * CHAR_BIT - 1))) != 0U) { /* Negative. */ /* * This UNUSED() is here to shut up the IRIX compiler: * variable "i" was set but never used diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c index cd322a4c5a..45fcbfb57b 100644 --- a/lib/isccc/cc.c +++ b/lib/isccc/cc.c @@ -16,7 +16,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cc.c,v 1.8 2003/06/24 05:10:34 marka Exp $ */ +/* $Id: cc.c,v 1.9 2003/07/25 00:01:14 marka Exp $ */ #include @@ -106,7 +106,7 @@ value_towire(isccc_sexpr_t *elt, isccc_region_t *target) * the placeholder length too. Adjust and * emit. */ - INSIST(len >= 4); + INSIST(len >= 4U); len -= 4; PUT32(len, lenp); } else if (isccc_sexpr_listp(elt)) { @@ -129,7 +129,7 @@ value_towire(isccc_sexpr_t *elt, isccc_region_t *target) * 'len' is 4 bytes too big, since it counts * the placeholder length. Adjust and emit. */ - INSIST(len >= 4); + INSIST(len >= 4U); len -= 4; PUT32(len, lenp); } @@ -153,7 +153,7 @@ table_towire(isccc_sexpr_t *alist, isccc_region_t *target) ks = isccc_sexpr_tostring(k); v = ISCCC_SEXPR_CDR(kv); len = strlen(ks); - INSIST(len <= 255); + INSIST(len <= 255U); /* * Emit the key name. */ diff --git a/lib/lwres/context.c b/lib/lwres/context.c index 7e38cf52e0..eb647ac649 100644 --- a/lib/lwres/context.c +++ b/lib/lwres/context.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: context.c,v 1.43 2001/11/30 01:59:49 gson Exp $ */ +/* $Id: context.c,v 1.44 2003/07/25 00:01:15 marka Exp $ */ #include @@ -152,14 +152,14 @@ lwres_context_initserial(lwres_context_t *ctx, lwres_uint32_t serial) { void lwres_context_freemem(lwres_context_t *ctx, void *mem, size_t len) { REQUIRE(mem != NULL); - REQUIRE(len != 0); + REQUIRE(len != 0U); CTXFREE(mem, len); } void * lwres_context_allocmem(lwres_context_t *ctx, size_t len) { - REQUIRE(len != 0); + REQUIRE(len != 0U); return (CTXMALLOC(len)); } @@ -349,7 +349,7 @@ lwres_context_sendrecv(lwres_context_t *ctx, * Type of tv_sec is long, so make sure the unsigned long timeout * does not overflow it. */ - if (ctx->timeout <= LONG_MAX) + if (ctx->timeout <= (unsigned int)LONG_MAX) timeout.tv_sec = (long)ctx->timeout; else timeout.tv_sec = LONG_MAX; diff --git a/lib/lwres/getipnode.c b/lib/lwres/getipnode.c index c3e708f5fe..de12c923ac 100644 --- a/lib/lwres/getipnode.c +++ b/lib/lwres/getipnode.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getipnode.c,v 1.35 2002/08/08 21:14:13 marka Exp $ */ +/* $Id: getipnode.c,v 1.36 2003/07/25 00:01:15 marka Exp $ */ #include @@ -243,13 +243,13 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) { switch (af) { case AF_INET: - if (len != INADDRSZ) { + if (len != (unsigned int)INADDRSZ) { *error_num = NO_RECOVERY; return (NULL); } break; case AF_INET6: - if (len != IN6ADDRSZ) { + if (len != (unsigned int)IN6ADDRSZ) { *error_num = NO_RECOVERY; return (NULL); } diff --git a/lib/lwres/getnameinfo.c b/lib/lwres/getnameinfo.c index 0fd6aa1e65..0e38cbdbf5 100644 --- a/lib/lwres/getnameinfo.c +++ b/lib/lwres/getnameinfo.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getnameinfo.c,v 1.32 2003/07/04 05:21:47 marka Exp $ */ +/* $Id: getnameinfo.c,v 1.33 2003/07/25 00:01:16 marka Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -162,7 +162,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, } proto = (flags & NI_DGRAM) ? "udp" : "tcp"; - if (serv == NULL || servlen == 0) { + if (serv == NULL || servlen == 0U) { /* * Caller does not want service. */ @@ -197,7 +197,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, } #endif - if (host == NULL || hostlen == 0) { + if (host == NULL || hostlen == 0U) { /* * What should we do? */ diff --git a/lib/lwres/getrrset.c b/lib/lwres/getrrset.c index 96ae4c5edf..4df55cf259 100644 --- a/lib/lwres/getrrset.c +++ b/lib/lwres/getrrset.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getrrset.c,v 1.12 2002/06/20 02:31:17 marka Exp $ */ +/* $Id: getrrset.c,v 1.13 2003/07/25 00:01:16 marka Exp $ */ #include @@ -48,7 +48,7 @@ lwresult_to_result(lwres_result_t lwresult) { static void * sane_malloc(size_t size) { - if (size == 0) + if (size == 0U) size = 1; return (malloc(size)); } diff --git a/lib/lwres/lwconfig.c b/lib/lwres/lwconfig.c index 09358f351f..c8c19e44e2 100644 --- a/lib/lwres/lwconfig.c +++ b/lib/lwres/lwconfig.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwconfig.c,v 1.36 2002/08/11 03:26:26 mayer Exp $ */ +/* $Id: lwconfig.c,v 1.37 2003/07/25 00:01:16 marka Exp $ */ /*** *** Module for parsing resolv.conf files. @@ -156,7 +156,7 @@ getword(FILE *fp, char *buffer, size_t size) { char *p = buffer; REQUIRE(buffer != NULL); - REQUIRE(size > 0); + REQUIRE(size > 0U); *p = '\0'; @@ -194,7 +194,7 @@ lwres_strdup(lwres_context_t *ctx, const char *str) { char *p; REQUIRE(str != NULL); - REQUIRE(strlen(str) > 0); + REQUIRE(strlen(str) > 0U); p = CTXMALLOC(strlen(str) + 1); if (p != NULL) @@ -284,7 +284,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) { return (LWRES_R_SUCCESS); res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -312,7 +312,7 @@ lwres_conf_parselwserver(lwres_context_t *ctx, FILE *fp) { return (LWRES_R_SUCCESS); res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -337,7 +337,7 @@ lwres_conf_parsedomain(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing else on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -399,11 +399,11 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) { confdata->searchnxt = 0; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing else on line. */ idx = 0; - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (confdata->searchnxt == LWRES_CONFMAXSEARCH) goto ignore; /* Too many domains. */ @@ -460,10 +460,10 @@ lwres_conf_parsesortlist(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Empty line after keyword. */ - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (confdata->sortlistnxt == LWRES_CONFMAXSORTLIST) return (LWRES_R_FAILURE); /* Too many values. */ @@ -516,10 +516,10 @@ lwres_conf_parseoption(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Empty line after keyword. */ - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (strcmp("debug", word) == 0) { confdata->resdebug = 1; } else if (strcmp("no_tld_query", word) == 0) { @@ -554,7 +554,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) { confdata = &ctx->confdata; REQUIRE(filename != NULL); - REQUIRE(strlen(filename) > 0); + REQUIRE(strlen(filename) > 0U); REQUIRE(confdata != NULL); errno = 0; @@ -569,7 +569,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) { break; } - if (strlen(word) == 0) + if (strlen(word) == 0U) rval = LWRES_R_SUCCESS; else if (strcmp(word, "nameserver") == 0) rval = lwres_conf_parsenameserver(ctx, fp); diff --git a/lib/lwres/lwinetaton.c b/lib/lwres/lwinetaton.c index b95bbe078e..5be7618949 100644 --- a/lib/lwres/lwinetaton.c +++ b/lib/lwres/lwinetaton.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$Id: lwinetaton.c,v 1.10 2001/01/09 21:59:25 bwelling Exp $"; +static char rcsid[] = "$Id: lwinetaton.c,v 1.11 2003/07/25 00:01:16 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -152,7 +152,7 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ - if (pp >= parts + 3 || val > 0xff) + if (pp >= parts + 3 || val > 0xffU) return (0); *pp++ = (lwres_uint8_t)val; c = *++cp; @@ -179,19 +179,19 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { break; case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffff) + if (val > 0xffffffU) return (0); val |= parts[0] << 24; break; case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) + if (val > 0xffffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16); break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) + if (val > 0xffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); break; diff --git a/lib/tests/t_api.c b/lib/tests/t_api.c index f68eaffe9f..f55d547897 100644 --- a/lib/tests/t_api.c +++ b/lib/tests/t_api.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_api.c,v 1.50 2003/04/11 07:25:31 marka Exp $ */ +/* $Id: t_api.c,v 1.51 2003/07/25 00:01:16 marka Exp $ */ #include @@ -534,7 +534,7 @@ t_fgetbs(FILE *fp) { } } *p = '\0'; - return(((c == EOF) && (n == 0)) ? NULL : buf); + return(((c == EOF) && (n == 0U)) ? NULL : buf); } else { fprintf(stderr, "malloc failed %d", errno); return(NULL); @@ -569,7 +569,7 @@ t_getdate(char *buf, size_t buflen) { t = time(NULL); p = localtime(&t); n = strftime(buf, buflen - 1, "%A %d %B %H:%M:%S %Y\n", p); - return(n != 0 ? buf : NULL); + return(n != 0U ? buf : NULL); } /* From 4691e18ca0c900a432bd1e1b6f65f97ee1f3ebcf Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 25 Jul 2003 02:04:28 +0000 Subject: [PATCH 73/75] deconst --- lib/isc/strtoul.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/isc/strtoul.c b/lib/isc/strtoul.c index 8c27f0d8ff..875b425cac 100644 --- a/lib/isc/strtoul.c +++ b/lib/isc/strtoul.c @@ -52,7 +52,7 @@ static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ -/* $Id: strtoul.c,v 1.1 2003/06/24 05:10:32 marka Exp $ */ +/* $Id: strtoul.c,v 1.2 2003/07/25 02:04:28 marka Exp $ */ #include @@ -61,6 +61,7 @@ static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; #include #include +#include /* * Convert a string to an unsigned long integer. @@ -122,6 +123,6 @@ isc_strtoul(const char *nptr, char **endptr, int base) { } else if (neg) acc = -acc; if (endptr != 0) - *endptr = (char *)(any ? s - 1 : nptr); + DE_CONST(any ? s - 1 : nptr, *endptr); return (acc); } From 1e107b3d7b54de5022c3328423164e533afcc15e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 25 Jul 2003 02:22:26 +0000 Subject: [PATCH 74/75] 1495. [cleanup] Replace hash functions with universal hash. --- CHANGES | 2 + bin/named/include/named/globals.h | 2 +- bin/named/main.c | 13 +- bin/named/server.c | 5 +- bin/nsupdate/nsupdate.c | 10 +- lib/dns/adb.c | 4 +- lib/dns/dispatch.c | 2 +- lib/dns/include/dns/adb.h | 2 +- lib/dns/include/dns/name.h | 18 +- lib/dns/include/dns/view.h | 2 +- lib/dns/name.c | 17 +- lib/dns/view.c | 3 +- lib/isc/Makefile.in | 4 +- lib/isc/hash.c | 384 ++++++++++++++++++++++++++++++ lib/isc/include/isc/hash.h | 175 ++++++++++++++ lib/isc/include/isc/sockaddr.h | 2 +- lib/isc/include/isc/types.h | 3 +- lib/isc/sockaddr.c | 35 +-- 18 files changed, 645 insertions(+), 38 deletions(-) create mode 100644 lib/isc/hash.c create mode 100644 lib/isc/include/isc/hash.h diff --git a/CHANGES b/CHANGES index 6e6a510874..fa2702716d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1495. [cleanup] Replace hash functions with universal hash. + 1494. [security] Turn on RSA BLINDING as a precaution. 1493. [placeholder] diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h index 0c07831d6a..567ae9c66a 100644 --- a/bin/named/include/named/globals.h +++ b/bin/named/include/named/globals.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: globals.h,v 1.61 2003/02/26 02:03:58 marka Exp $ */ +/* $Id: globals.h,v 1.62 2003/07/25 02:22:23 marka Exp $ */ #ifndef NAMED_GLOBALS_H #define NAMED_GLOBALS_H 1 diff --git a/bin/named/main.c b/bin/named/main.c index ac7bae91e8..ba97646f5d 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.129 2003/01/16 03:59:23 marka Exp $ */ +/* $Id: main.c,v 1.130 2003/07/25 02:22:23 marka Exp $ */ #include @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include +#include #include #include @@ -493,6 +495,14 @@ create_managers(void) { return (ISC_R_UNEXPECTED); } + result = isc_hash_create(ns_g_mctx, ns_g_entropy, DNS_NAME_MAXWIRE); + if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "isc_hash_create() failed: %s", + isc_result_totext(result)); + return (ISC_R_UNEXPECTED); + } + return (ISC_R_SUCCESS); } @@ -500,6 +510,7 @@ static void destroy_managers(void) { ns_lwresd_shutdown(); + isc_hash_destroy(); isc_entropy_detach(&ns_g_entropy); /* * isc_taskmgr_destroy() will block until all tasks have exited, diff --git a/bin/named/server.c b/bin/named/server.c index 7f06696ff3..791d8b691a 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.399 2003/07/17 07:22:21 marka Exp $ */ +/* $Id: server.c,v 1.400 2003/07/25 02:22:23 marka Exp $ */ #include @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -2511,6 +2512,8 @@ run_server(isc_task_t *task, isc_event_t *event) { CHECKFATAL(load_configuration(ns_g_conffile, server, ISC_TRUE), "loading configuration"); + isc_hash_init(); + CHECKFATAL(load_zones(server, ISC_FALSE), "loading zones"); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index dc66d5ecaf..26cb9608cc 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.122 2003/07/25 00:01:05 marka Exp $ */ +/* $Id: nsupdate.c,v 1.123 2003/07/25 02:22:23 marka Exp $ */ #include @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -503,6 +504,10 @@ setup_system(void) { result = isc_entropy_create(mctx, &entp); check_result(result, "isc_entropy_create"); + result = isc_hash_create(mctx, entp, DNS_NAME_MAXWIRE); + check_result(result, "isc_hash_create"); + isc_hash_init(); + result = dns_dispatchmgr_create(mctx, entp, &dispatchmgr); check_result(result, "dns_dispatchmgr_create"); @@ -1823,6 +1828,9 @@ cleanup(void) { ddebug("Shutting down timer manager"); isc_timermgr_destroy(&timermgr); + ddebug("Destroying hash context"); + isc_hash_destroy(); + ddebug("Destroying memory context"); if (memdebugging) isc_mem_stats(mctx, stderr); diff --git a/lib/dns/adb.c b/lib/dns/adb.c index d02ee2ecc6..feebc865ad 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.c,v 1.204 2003/07/18 04:30:01 marka Exp $ */ +/* $Id: adb.c,v 1.205 2003/07/25 02:22:24 marka Exp $ */ /* * Implementation notes @@ -1586,7 +1586,7 @@ find_name_and_lock(dns_adb_t *adb, dns_name_t *name, dns_adbname_t *adbname; int bucket; - bucket = dns_name_hash(name, ISC_FALSE) % NBUCKETS; + bucket = dns_fullname_hash(name, ISC_FALSE) % NBUCKETS; if (*bucketp == DNS_ADB_INVALIDBUCKET) { LOCK(&adb->namelocks[bucket]); diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index 810c3970c5..03d8eb41d2 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dispatch.c,v 1.112 2003/02/26 05:05:15 marka Exp $ */ +/* $Id: dispatch.c,v 1.113 2003/07/25 02:22:24 marka Exp $ */ #include diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index 911888b90d..dca88427ce 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.h,v 1.73 2003/02/26 22:54:29 marka Exp $ */ +/* $Id: adb.h,v 1.74 2003/07/25 02:22:25 marka Exp $ */ #ifndef DNS_ADB_H #define DNS_ADB_H 1 diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h index d61d0c697c..c875f72f0d 100644 --- a/lib/dns/include/dns/name.h +++ b/lib/dns/include/dns/name.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.h,v 1.102 2002/08/27 04:53:43 marka Exp $ */ +/* $Id: name.h,v 1.103 2003/07/25 02:22:25 marka Exp $ */ #ifndef DNS_NAME_H #define DNS_NAME_H 1 @@ -321,6 +321,22 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive); * A hash value */ +unsigned int +dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive); +/* + * Provide a hash value for 'name'. Unlike dns_name_hash(), this function + * always takes into account of the entire name to calculate the hash value. + * + * Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in + * case will have the same hash value. + * + * Requires: + * 'name' is a valid name + * + * Returns: + * A hash value + */ + unsigned int dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive); /* diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index dc8572b7c4..af43f114af 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.h,v 1.81 2003/02/26 22:54:29 marka Exp $ */ +/* $Id: view.h,v 1.82 2003/07/25 02:22:25 marka Exp $ */ #ifndef DNS_VIEW_H #define DNS_VIEW_H 1 diff --git a/lib/dns/name.c b/lib/dns/name.c index 86a6c45224..f43b79544e 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -15,13 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.c,v 1.139 2003/04/11 07:25:25 marka Exp $ */ +/* $Id: name.c,v 1.140 2003/07/25 02:22:24 marka Exp $ */ #include #include #include +#include #include #include #include @@ -339,6 +340,20 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive) { return (name_hash(name, case_sensitive)); } +unsigned int +dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) { + /* + * Provide a hash value for 'name'. + */ + REQUIRE(VALID_NAME(name)); + + if (name->labels == 0) + return (0); + + return (isc_hash_calc((const unsigned char *)name->ndata, + name->length, case_sensitive)); +} + unsigned int dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive) { unsigned char *offsets; diff --git a/lib/dns/view.c b/lib/dns/view.c index 975697723f..322a55ab74 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -15,10 +15,11 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.c,v 1.115 2003/02/26 22:54:28 marka Exp $ */ +/* $Id: view.c,v 1.116 2003/07/25 02:22:24 marka Exp $ */ #include +#include #include #include /* Required for HP/UX (and others?) */ #include diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in index e826ba7bf1..9c539e4834 100644 --- a/lib/isc/Makefile.in +++ b/lib/isc/Makefile.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.77 2003/06/24 05:10:32 marka Exp $ +# $Id: Makefile.in,v 1.78 2003/07/25 02:22:26 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -52,7 +52,7 @@ WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/file.@O@ \ OBJS = @ISC_EXTRA_OBJS@ \ assertions.@O@ base64.@O@ bitstring.@O@ buffer.@O@ \ bufferlist.@O@ commandline.@O@ error.@O@ event.@O@ \ - heap.@O@ hex.@O@ hmacmd5.@O@ \ + hash.@O@ heap.@O@ hex.@O@ hmacmd5.@O@ \ lex.@O@ lfsr.@O@ lib.@O@ log.@O@ md5.@O@ \ mem.@O@ mutexblock.@O@ netaddr.@O@ netscope.@O@ ondestroy.@O@ \ parseint.@O@ quota.@O@ random.@O@ \ diff --git a/lib/isc/hash.c b/lib/isc/hash.c new file mode 100644 index 0000000000..0971b8dff1 --- /dev/null +++ b/lib/isc/hash.c @@ -0,0 +1,384 @@ +/* + * Copyright (C) 2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: hash.c,v 1.2 2003/07/25 02:22:26 marka Exp $ */ + +/* + * Some portion of this code was derived from universal hash function + * libraries of Rice University. + */ + +/* "UH Universal Hashing Library" + +Copyright ((c)) 2002, Rice University +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Rice University (RICE) nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + +This software is provided by RICE and the contributors on an "as is" +basis, without any representations or warranties of any kind, express +or implied including, but not limited to, representations or +warranties of non-infringement, merchantability or fitness for a +particular purpose. In no event shall RICE or contributors be liable +for any direct, indirect, incidental, special, exemplary, or +consequential damages (including, but not limited to, procurement of +substitute goods or services; loss of use, data, or profits; or +business interruption) however caused and on any theory of liability, +whether in contract, strict liability, or tort (including negligence +or otherwise) arising in any way out of the use of this software, even +if advised of the possibility of such damage. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define HASH_MAGIC ISC_MAGIC('H', 'a', 's', 'h') +#define VALID_HASH(h) ISC_MAGIC_VALID((h), HASH_MAGIC) + +/* + * A large 32-bit prime number that specifies the range of the hash output. + */ +#define PRIME32 0xFFFFFFFB /* 2^32 - 5 */ + +/* + * Types of random seed and hash accumulator. Perhaps they can be system + * dependent. + */ +typedef isc_uint32_t hash_accum_t; +typedef isc_uint16_t hash_random_t; + +struct isc_hash { + unsigned int magic; + isc_mem_t *mctx; + isc_mutex_t lock; + isc_boolean_t initialized; + isc_refcount_t refcnt; + isc_entropy_t *entropy; /* entropy source */ + unsigned int limit; /* upper limit of key length */ + size_t vectorlen; /* size of the vector below */ + hash_random_t *rndvector; /* random vector for universal hashing */ +}; + +static isc_rwlock_t createlock; +static isc_once_t once = ISC_ONCE_INIT; +static isc_hash_t *hash = NULL; + +static unsigned char maptolower[] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff +}; + +isc_result_t +isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy, + unsigned int limit, isc_hash_t **hctxp) +{ + isc_result_t ret; + isc_hash_t *hctx; + size_t vlen; + hash_random_t *rv; + hash_accum_t overflow_limit; + + REQUIRE(mctx != NULL); + REQUIRE(hctxp != NULL && *hctxp == NULL); + + /* + * Overflow check. Since our implementation only does a modulo + * operation at the last stage of hash calculation, the accumulator + * must not overflow. + */ + overflow_limit = + 1 << (((sizeof(hash_accum_t) - sizeof(hash_random_t))) * 8); + if (overflow_limit < (limit + 1) * 0xff) + return (ISC_R_RANGE); + + hctx = isc_mem_get(mctx, sizeof(isc_hash_t)); + if (hctx == NULL) + return (ISC_R_NOMEMORY); + + vlen = sizeof(hash_random_t) * (limit + 1); + rv = isc_mem_get(mctx, vlen); + if (rv == NULL) { + ret = ISC_R_NOMEMORY; + goto errout; + } + + /* + * We need a lock. + */ + if (isc_mutex_init(&hctx->lock) != ISC_R_SUCCESS) { + ret = ISC_R_UNEXPECTED; + goto errout; + } + + /* + * From here down, no failures will/can occur. + */ + hctx->magic = HASH_MAGIC; + hctx->mctx = NULL; + isc_mem_attach(mctx, &hctx->mctx); + hctx->initialized = ISC_FALSE; + isc_refcount_init(&hctx->refcnt, 1); + hctx->entropy = NULL; + hctx->limit = limit; + hctx->vectorlen = vlen; + hctx->rndvector = rv; + + if (entropy != NULL) + isc_entropy_attach(entropy, &hctx->entropy); + + *hctxp = hctx; + return (ISC_R_SUCCESS); + + errout: + isc_mem_put(mctx, hctx, sizeof(isc_hash_t)); + if (rv != NULL) + isc_mem_put(mctx, rv, vlen); + + return (ret); +} + +static void +initialize_lock(void) { + RUNTIME_CHECK(isc_rwlock_init(&createlock, 0, 0) == ISC_R_SUCCESS); +} + +isc_result_t +isc_hash_create(isc_mem_t *mctx, isc_entropy_t *entropy, size_t limit) { + isc_result_t result = ISC_R_SUCCESS; + + REQUIRE(mctx != NULL); + INSIST(hash == NULL); + + RUNTIME_CHECK(isc_once_do(&once, initialize_lock) == ISC_R_SUCCESS); + + RWLOCK(&createlock, isc_rwlocktype_write); + + if (hash == NULL) + result = isc_hash_ctxcreate(mctx, entropy, limit, &hash); + + RWUNLOCK(&createlock, isc_rwlocktype_write); + + return (result); +} + +void +isc_hash_ctxinit(isc_hash_t *hctx) { + isc_result_t result; + + LOCK(&hctx->lock); + + if (hctx->initialized == ISC_TRUE) + goto out; + + if (hctx->entropy) { + result = isc_entropy_getdata(hctx->entropy, + hctx->rndvector, hctx->vectorlen, + NULL, 0); + INSIST(result == ISC_R_SUCCESS); + } else { + isc_int32_t pr; + unsigned int i, copylen; + unsigned char *p; + + p = (unsigned char *)hctx->rndvector; + for (i = 0; i < hctx->vectorlen; i += copylen, p += copylen) { + isc_random_get(&pr); + if (i + sizeof(pr) <= hctx->vectorlen) + copylen = sizeof(pr); + else + copylen = hctx->vectorlen - i; + + memcpy(p, &pr, copylen); + } + INSIST(p == (unsigned char *)hctx->rndvector + + hctx->vectorlen); + } + + hctx->initialized = ISC_TRUE; + + out: + UNLOCK(&hctx->lock); +} + +void +isc_hash_init() { + INSIST(hash != NULL && VALID_HASH(hash)); + + isc_hash_ctxinit(hash); +} + +void +isc_hash_ctxattach(isc_hash_t *hctx, isc_hash_t **hctxp) { + REQUIRE(VALID_HASH(hctx)); + REQUIRE(hctxp != NULL && *hctxp == NULL); + + isc_refcount_increment(&hctx->refcnt, NULL); + *hctxp = hctx; +} + +static void +destroy(isc_hash_t **hctxp) { + isc_hash_t *hctx; + isc_mem_t *mctx; + + REQUIRE(hctxp != NULL && *hctxp != NULL); + hctx = *hctxp; + *hctxp = NULL; + + LOCK(&hctx->lock); + + isc_refcount_destroy(&hctx->refcnt); + + mctx = hctx->mctx; + if (hctx->entropy != NULL) + isc_entropy_detach(&hctx->entropy); + if (hctx->rndvector != NULL) + isc_mem_put(mctx, hctx->rndvector, hctx->vectorlen); + + UNLOCK(&hctx->lock); + + DESTROYLOCK(&hctx->lock); + + memset(hctx, 0, sizeof(isc_hash_t)); + isc_mem_put(mctx, hctx, sizeof(isc_hash_t)); + isc_mem_detach(&mctx); +} + +void +isc_hash_ctxdetach(isc_hash_t **hctxp) { + isc_hash_t *hctx; + unsigned int refs; + + REQUIRE(hctxp != NULL && VALID_HASH(*hctxp)); + hctx = *hctxp; + + isc_refcount_decrement(&hctx->refcnt, &refs); + if (refs == 0) + destroy(&hctx); + + *hctxp = NULL; +} + +void +isc_hash_destroy() { + unsigned int refs; + + INSIST(hash != NULL && VALID_HASH(hash)); + + isc_refcount_decrement(&hash->refcnt, &refs); + INSIST(refs == 0); + + destroy(&hash); +} + +static inline unsigned int +hash_calc(isc_hash_t *hctx, const unsigned char *key, unsigned int keylen, + isc_boolean_t case_sensitive) +{ + hash_accum_t partial_sum = 0; + hash_random_t *p = hctx->rndvector; + unsigned int i = 0; + + /* Make it sure that the hash context is initialized. */ + if (hctx->initialized == ISC_FALSE) + isc_hash_ctxinit(hctx); + + if (case_sensitive) { + for (i = 0; i < keylen; i++) + partial_sum += key[i] * (hash_accum_t)p[i]; + } else { + for (i = 0; i < keylen; i++) + partial_sum += maptolower[key[i]] * (hash_accum_t)p[i]; + } + + partial_sum += p[i]; + + return ((unsigned int)(partial_sum % PRIME32)); +} + +unsigned int +isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key, + unsigned int keylen, isc_boolean_t case_sensitive) +{ + REQUIRE(hctx != NULL && VALID_HASH(hctx)); + REQUIRE(keylen <= hctx->limit); + + return (hash_calc(hctx, key, keylen, case_sensitive)); +} + +unsigned int +isc_hash_calc(const unsigned char *key, unsigned int keylen, + isc_boolean_t case_sensitive) +{ + INSIST(hash != NULL && VALID_HASH(hash)); + REQUIRE(keylen <= hash->limit); + + return (hash_calc(hash, key, keylen, case_sensitive)); +} diff --git a/lib/isc/include/isc/hash.h b/lib/isc/include/isc/hash.h new file mode 100644 index 0000000000..75484ed0eb --- /dev/null +++ b/lib/isc/include/isc/hash.h @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: hash.h,v 1.2 2003/07/25 02:22:26 marka Exp $ */ + +#ifndef ISC_HASH_H +#define ISC_HASH_H 1 + +/***** + ***** Module Info + *****/ + +/* + * Hash + * + * The hash API + * + * Provides an unpredictable hash value for variable length data. + * A hash object contains a random vector (which is hidden from clients + * of this API) to make the actual hash value unpredictable. + * + * The algorithm used in the API guarantees the probability of hash + * collision; in the current implementation, as long as the values stored + * in the random vector are unpredictable, the probability of hash + * collision between arbitrary two different values is at most 1/2^16. + * + * Altough the API is generic about the hash keys, it mainly expects + * DNS names (and sometimes IPv4/v6 addresses) as inputs. It has an + * upper limit of the input length, and may run slow to calculaate the + * has values for large inputs. + * + * This API is designed to be general so that it can provide multiple + * different hash contexts that have different random vectors. However, + * it should be typical to have a single context for an entire system. + * To support such cases, the API also provides a single-context mode. + * + * MP: + * The hash object is almost read-only. Once the internal random vector + * is initialized, no write operation will occur, and there will be no + * need to lock the object to calculate actual hash values. + * + * Reliability: + * In some cases this module uses low-level data copy to initialize the + * random vector. Errors in this part are likely to crash the server or + * corrupt memory. + * + * Resources: + * A buffer, used as a random vector for calculating hash values. + * + * Security: + * This module intends to provide unpredictable hash values in + * adversarial environments in order to avoid denial of service attacks + * to hash buckets. + * Its unpredictability relies on the quality of entropy to build the + * random vector. + * + * Standards: + * None. + */ + +/*** + *** Imports + ***/ + +#include + +/*** + *** Functions + ***/ +ISC_LANG_BEGINDECLS + +isc_result_t +isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy, unsigned int limit, + isc_hash_t **hctx); +isc_result_t +isc_hash_create(isc_mem_t *mctx, isc_entropy_t *entropy, size_t limit); +/* + * Create a new hash object. + * + * isc_hash_ctxcreate() creates a different object. + * isc_hash_create() creates a module-internal object to support the + * single-context mode. It should be called only once. + * + * 'entropy' must be NULL or a valid entropy object. If 'entropy' is NULL, + * pseudo random values will be used to build the random vector, which may + * weaken security. + * + * 'limit' specifies the maximum number of hash keys. If it is too large, + * these functions may fail. + */ + +void +isc_hash_ctxattach(isc_hash_t *hctx, isc_hash_t **hctxp); +/* + * Attach to a hash object. + * This function is only necessary for the multiple-context mode. + */ + +void +isc_hash_ctxdetach(isc_hash_t **hctxp); +/* + * Detach from a hash object. + * + * This function is for the multiple-context mode, and takes a valid + * hash object as an argument. + */ + +void +isc_hash_destroy(void); +/* + * This function is for the single-context mode, and is expected to be used + * as a counterpart of isc_hash_create(). + * A valid module-internal hash object must have been created, and this + * function should be called only once. + */ + +void +isc_hash_ctxinit(isc_hash_t *hctx); +void +isc_hash_init(void); +/* + * Initialize a hash object. It fills in the random vector with a proper + * source of entropy, which is typically from the entropy object specified + * at the creation. Thus, it is desirable to call these functions after + * initializing the entropy object with some good entropy sources. + * + * These functions should be called before the first hash calculation. + * + * isc_hash_ctxinit() is for the multiple-context mode, and takes a valid hash + * object as an argument. + * isc_hash_init() is for the single-context mode. A valid module-internal + * hash object must have been created, and this function should be called only + * once. + */ + +unsigned int +isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key, + unsigned int keylen, isc_boolean_t case_sensitive); +unsigned int +isc_hash_calc(const unsigned char *key, unsigned int keylen, + isc_boolean_t case_sensitive); +/* + * Calculate a hash value. + * + * isc_hash_ctxinit() is for the multiple-context mode, and takes a valid hash + * object as an argument. + * isc_hash_init() is for the single-context mode. A valid module-internal + * hash object must have been created. + * + * 'key' is the hash key, which is a variable length buffer. + * 'keylen' specifies the key length, which must not be larger than the limit + * specified for the corresponding hash object. + * + * 'case_sensitive' specifies whether the hash key should be treated as + * case_sensitive values. It should typically be ISC_FALSE if the hash key + * is a DNS name. + */ + +ISC_LANG_ENDDECLS + +#endif /* ISC_HASH_H */ diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h index 5257b059de..8fbd06ac03 100644 --- a/lib/isc/include/isc/sockaddr.h +++ b/lib/isc/include/isc/sockaddr.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.h,v 1.39 2002/04/03 06:38:36 marka Exp $ */ +/* $Id: sockaddr.h,v 1.40 2003/07/25 02:22:26 marka Exp $ */ #ifndef ISC_SOCKADDR_H #define ISC_SOCKADDR_H 1 diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index b30f55ee7f..2ad31572d7 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: types.h,v 1.33 2002/07/19 03:39:44 marka Exp $ */ +/* $Id: types.h,v 1.34 2003/07/25 02:22:26 marka Exp $ */ #ifndef ISC_TYPES_H #define ISC_TYPES_H 1 @@ -52,6 +52,7 @@ typedef struct isc_event isc_event_t; typedef ISC_LIST(isc_event_t) isc_eventlist_t; typedef unsigned int isc_eventtype_t; typedef isc_uint32_t isc_fsaccess_t; +typedef struct isc_hash isc_hash_t; typedef struct isc_interface isc_interface_t; typedef struct isc_interfaceiter isc_interfaceiter_t; typedef struct isc_interval isc_interval_t; diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c index 89754059bb..9dbc718362 100644 --- a/lib/isc/sockaddr.c +++ b/lib/isc/sockaddr.c @@ -15,13 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.c,v 1.56 2003/04/11 07:25:28 marka Exp $ */ +/* $Id: sockaddr.c,v 1.57 2003/07/25 02:22:26 marka Exp $ */ #include #include #include +#include #include #include #include @@ -186,19 +187,17 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) { switch (sockaddr->type.sa.sa_family) { case AF_INET: - h = ntohl(sockaddr->type.sin.sin_addr.s_addr); + s = (const unsigned char *)&sockaddr->type.sin.sin_addr; p = ntohs(sockaddr->type.sin.sin_port); + length = sizeof(sockaddr->type.sin.sin_addr.s_addr); break; case AF_INET6: in6 = &sockaddr->type.sin6.sin6_addr; if (IN6_IS_ADDR_V4MAPPED(in6)) { - h = (in6->s6_addr[12] << 24) | - (in6->s6_addr[13] << 16) | - (in6->s6_addr[14] << 8) | - in6->s6_addr[15]; + s = (const unsigned char *)&in6[12]; + length = sizeof(sockaddr->type.sin.sin_addr.s_addr); } else { - s = (const unsigned char *)&sockaddr-> - type.sin6.sin6_addr; + s = (const unsigned char *)in6; length = sizeof(sockaddr->type.sin6.sin6_addr); } p = ntohs(sockaddr->type.sin6.sin6_port); @@ -214,22 +213,14 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) { length = sockaddr->length; p = 0; } - while (length > 0) { - h = ( h << 4 ) + *s; - if ((g = ( h & 0xf0000000 )) != 0) { - h = h ^ (g >> 24); - h = h ^ g; - } - s++; - length--; - } + + h = isc_hash_calc(s, length, ISC_TRUE); if (!address_only) { - h = h ^ (p << 4); - if ((g = ( h & 0xf0000000 )) != 0) { - h = h ^ (g >> 24); - h = h ^ g; - } + g = isc_hash_calc((const unsigned char *)&p, sizeof(p), + ISC_TRUE); + h = h ^ g; /* XXX: we should concatenate h and p first */ } + return (h); } From 1d04b5105d5fb873c9c2aa1e9fd2798ba463100e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 25 Jul 2003 03:31:45 +0000 Subject: [PATCH 75/75] 1495. [cleanup] Replace hash functions with universal hash. --- CHANGES | 2 ++ bin/named/main.c | 13 ++++++- bin/named/server.c | 5 ++- bin/nsupdate/nsupdate.c | 10 +++++- lib/dns/adb.c | 4 +-- lib/dns/include/dns/name.h | 18 +++++++++- lib/dns/name.c | 17 +++++++++- lib/dns/view.c | 3 +- lib/isc/Makefile.in | 4 +-- lib/isc/include/isc/types.h | 3 +- lib/isc/sockaddr.c | 68 ++++++++++++++++++++----------------- lib/isc/win32/libisc.def | 9 +++++ lib/isc/win32/libisc.dsp | 8 +++++ lib/isc/win32/libisc.mak | 24 +++++++++++++ 14 files changed, 145 insertions(+), 43 deletions(-) diff --git a/CHANGES b/CHANGES index 880c62eaca..e1679bdb93 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1495. [cleanup] Replace hash functions with universal hash. + 1494. [security] Turn on RSA BLINDING as a precaution. 1493. [doc] A6 and "bitstring" labels are now experimental. diff --git a/bin/named/main.c b/bin/named/main.c index 60067d73ae..73c2698daf 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.119.2.2 2002/08/05 06:57:01 marka Exp $ */ +/* $Id: main.c,v 1.119.2.3 2003/07/25 03:31:41 marka Exp $ */ #include @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -38,6 +39,7 @@ #include #include +#include #include #include @@ -433,6 +435,14 @@ create_managers(void) { return (ISC_R_UNEXPECTED); } + result = isc_hash_create(ns_g_mctx, ns_g_entropy, DNS_NAME_MAXWIRE); + if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "isc_hash_create() failed: %s", + isc_result_totext(result)); + return (ISC_R_UNEXPECTED); + } + return (ISC_R_SUCCESS); } @@ -440,6 +450,7 @@ static void destroy_managers(void) { ns_lwresd_shutdown(); + isc_hash_destroy(); isc_entropy_detach(&ns_g_entropy); /* * isc_taskmgr_destroy() will block until all tasks have exited, diff --git a/bin/named/server.c b/bin/named/server.c index bc62686604..cb4a78b8a7 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.339.2.14 2003/07/23 06:57:58 marka Exp $ */ +/* $Id: server.c,v 1.339.2.15 2003/07/25 03:31:41 marka Exp $ */ #include @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -2229,6 +2230,8 @@ run_server(isc_task_t *task, isc_event_t *event) { CHECKFATAL(load_configuration(ns_g_conffile, server, ISC_TRUE), "loading configuration"); + isc_hash_init(); + CHECKFATAL(load_zones(server, ISC_FALSE), "loading zones"); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 72068352ed..7e36682e24 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.103.2.14 2003/07/23 06:57:59 marka Exp $ */ +/* $Id: nsupdate.c,v 1.103.2.15 2003/07/25 03:31:42 marka Exp $ */ #include @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -490,6 +491,10 @@ setup_system(void) { result = isc_entropy_create(mctx, &entp); check_result(result, "isc_entropy_create"); + result = isc_hash_create(mctx, entp, DNS_NAME_MAXWIRE); + check_result(result, "isc_hash_create"); + isc_hash_init(); + result = dns_dispatchmgr_create(mctx, entp, &dispatchmgr); check_result(result, "dns_dispatchmgr_create"); @@ -1824,6 +1829,9 @@ cleanup(void) { ddebug("Shutting down timer manager"); isc_timermgr_destroy(&timermgr); + ddebug("Destroying hash context"); + isc_hash_destroy(); + ddebug("Destroying memory context"); if (memdebugging) isc_mem_stats(mctx, stderr); diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 6051d3f572..0fbb289ad5 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.c,v 1.181.2.9 2003/07/18 04:35:50 marka Exp $ */ +/* $Id: adb.c,v 1.181.2.10 2003/07/25 03:31:42 marka Exp $ */ /* * Implementation notes @@ -1792,7 +1792,7 @@ find_name_and_lock(dns_adb_t *adb, dns_name_t *name, dns_adbname_t *adbname; int bucket; - bucket = dns_name_hash(name, ISC_FALSE) % NBUCKETS; + bucket = dns_fullname_hash(name, ISC_FALSE) % NBUCKETS; if (*bucketp == DNS_ADB_INVALIDBUCKET) { LOCK(&adb->namelocks[bucket]); diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h index 8995b53ba6..14781d0bed 100644 --- a/lib/dns/include/dns/name.h +++ b/lib/dns/include/dns/name.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.h,v 1.95.2.2 2002/04/23 02:28:51 marka Exp $ */ +/* $Id: name.h,v 1.95.2.3 2003/07/25 03:31:44 marka Exp $ */ #ifndef DNS_NAME_H #define DNS_NAME_H 1 @@ -390,6 +390,22 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive); * A hash value */ +unsigned int +dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive); +/* + * Provide a hash value for 'name'. Unlike dns_name_hash(), this function + * always takes into account of the entire name to calculate the hash value. + * + * Note: if 'case_sensitive' is ISC_FALSE, then names which differ only in + * case will have the same hash value. + * + * Requires: + * 'name' is a valid name + * + * Returns: + * A hash value + */ + /*** *** Comparisons ***/ diff --git a/lib/dns/name.c b/lib/dns/name.c index e31c1699c4..5d71783e57 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -15,13 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.c,v 1.127.2.6 2003/07/23 06:57:48 marka Exp $ */ +/* $Id: name.c,v 1.127.2.7 2003/07/25 03:31:43 marka Exp $ */ #include #include #include +#include #include #include #include @@ -461,6 +462,20 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive) { return (h); } +unsigned int +dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) { + /* + * Provide a hash value for 'name'. + */ + REQUIRE(VALID_NAME(name)); + + if (name->labels == 0) + return (0); + + return (isc_hash_calc((const unsigned char *)name->ndata, + name->length, case_sensitive)); +} + dns_namereln_t dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2, int *orderp, diff --git a/lib/dns/view.c b/lib/dns/view.c index 170b23b69f..6c2348fb90 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -15,10 +15,11 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: view.c,v 1.103.2.4 2003/07/22 04:03:45 marka Exp $ */ +/* $Id: view.c,v 1.103.2.5 2003/07/25 03:31:43 marka Exp $ */ #include +#include #include #include /* Required for HP/UX (and others?) */ #include diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in index 40a2ee6ebb..2345ff4881 100644 --- a/lib/isc/Makefile.in +++ b/lib/isc/Makefile.in @@ -13,7 +13,7 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.71.2.1 2001/10/22 23:28:13 gson Exp $ +# $Id: Makefile.in,v 1.71.2.2 2003/07/25 03:31:44 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -52,7 +52,7 @@ WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/file.@O@ \ OBJS = @ISC_EXTRA_OBJS@ \ assertions.@O@ base64.@O@ bitstring.@O@ buffer.@O@ \ bufferlist.@O@ commandline.@O@ error.@O@ event.@O@ \ - heap.@O@ hex.@O@ hmacmd5.@O@ \ + hash.@O@ heap.@O@ hex.@O@ hmacmd5.@O@ \ lex.@O@ lfsr.@O@ lib.@O@ log.@O@ \ md5.@O@ mem.@O@ mutexblock.@O@ netaddr.@O@ ondestroy.@O@ \ quota.@O@ random.@O@ \ diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index f0399d15bd..54eb868f84 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: types.h,v 1.32.2.2 2002/08/06 06:09:07 marka Exp $ */ +/* $Id: types.h,v 1.32.2.3 2003/07/25 03:31:45 marka Exp $ */ #ifndef ISC_TYPES_H #define ISC_TYPES_H 1 @@ -52,6 +52,7 @@ typedef struct isc_event isc_event_t; typedef ISC_LIST(isc_event_t) isc_eventlist_t; typedef unsigned int isc_eventtype_t; typedef isc_uint32_t isc_fsaccess_t; +typedef struct isc_hash isc_hash_t; typedef struct isc_interface isc_interface_t; typedef struct isc_interfaceiter isc_interfaceiter_t; typedef struct isc_interval isc_interval_t; diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c index 84d3f68d8e..eae1424936 100644 --- a/lib/isc/sockaddr.c +++ b/lib/isc/sockaddr.c @@ -15,13 +15,14 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.c,v 1.48 2001/01/09 21:56:29 bwelling Exp $ */ +/* $Id: sockaddr.c,v 1.48.2.1 2003/07/25 03:31:44 marka Exp $ */ #include #include #include +#include #include #include #include @@ -175,47 +176,50 @@ isc_sockaddr_format(isc_sockaddr_t *sa, char *array, unsigned int size) { unsigned int isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) { - unsigned int length; - const unsigned char *s; + unsigned int length = 0; + const unsigned char *s = NULL; unsigned int h = 0; unsigned int g; + unsigned int p = 0; + const struct in6_addr *in6; REQUIRE(sockaddr != NULL); - - if (address_only) { - switch (sockaddr->type.sa.sa_family) { - case AF_INET: - return (ntohl(sockaddr->type.sin.sin_addr.s_addr)); - case AF_INET6: - s = (const unsigned char *)&sockaddr-> - type.sin6.sin6_addr; - length = sizeof sockaddr->type.sin6.sin6_addr; - break; - default: - UNEXPECTED_ERROR(__FILE__, __LINE__, - isc_msgcat_get(isc_msgcat, - ISC_MSGSET_SOCKADDR, - ISC_MSG_UNKNOWNFAMILY, - "unknown " - "address family: %d"), - (int)sockaddr->type.sa.sa_family); - s = (const unsigned char *)&sockaddr->type; - length = sockaddr->length; + switch (sockaddr->type.sa.sa_family) { + case AF_INET: + s = (const unsigned char *)&sockaddr->type.sin.sin_addr; + p = ntohs(sockaddr->type.sin.sin_port); + length = sizeof(sockaddr->type.sin.sin_addr.s_addr); + break; + case AF_INET6: + in6 = &sockaddr->type.sin6.sin6_addr; + if (IN6_IS_ADDR_V4MAPPED(in6)) { + s = (const unsigned char *)&in6[12]; + length = sizeof(sockaddr->type.sin.sin_addr.s_addr); + } else { + s = (const unsigned char *)in6; + length = sizeof(sockaddr->type.sin6.sin6_addr); } - } else { + p = ntohs(sockaddr->type.sin6.sin6_port); + break; + default: + UNEXPECTED_ERROR(__FILE__, __LINE__, + isc_msgcat_get(isc_msgcat, + ISC_MSGSET_SOCKADDR, + ISC_MSG_UNKNOWNFAMILY, + "unknown address family: %d"), + (int)sockaddr->type.sa.sa_family); s = (const unsigned char *)&sockaddr->type; length = sockaddr->length; + p = 0; } - while (length > 0) { - h = ( h << 4 ) + *s; - if ((g = ( h & 0xf0000000 )) != 0) { - h = h ^ (g >> 24); - h = h ^ g; - } - s++; - length--; + h = isc_hash_calc(s, length, ISC_TRUE); + if (!address_only) { + g = isc_hash_calc((const unsigned char *)&p, sizeof(p), + ISC_TRUE); + h = h ^ g; /* XXX: we should concatenate h and p first */ } + return (h); } diff --git a/lib/isc/win32/libisc.def b/lib/isc/win32/libisc.def index e2e670a567..832d99e262 100644 --- a/lib/isc/win32/libisc.def +++ b/lib/isc/win32/libisc.def @@ -83,6 +83,15 @@ isc_file_absolutepath isc_fsaccess_add isc_fsaccess_remove isc_fsaccess_set +isc_hash_calc +isc_hash_create +isc_hash_ctxattach +isc_hash_ctxcalc +isc_hash_ctxcreate +isc_hash_ctxdetach +isc_hash_ctxinit +isc_hash_destroy +isc_hash_init isc_hex_totext isc_hex_decodestring isc_hex_tobuffer diff --git a/lib/isc/win32/libisc.dsp b/lib/isc/win32/libisc.dsp index d1d448554d..0cfc45228e 100644 --- a/lib/isc/win32/libisc.dsp +++ b/lib/isc/win32/libisc.dsp @@ -281,6 +281,10 @@ SOURCE=..\include\isc\fsaccess.h # End Source File # Begin Source File +SOURCE=..\include\isc\hash.h +# End Source File +# Begin Source File + SOURCE=..\include\isc\heap.h # End Source File # Begin Source File @@ -565,6 +569,10 @@ SOURCE=..\event.c # End Source File # Begin Source File +SOURCE=..\hash.c +# End Source File +# Begin Source File + SOURCE=..\heap.c # End Source File # Begin Source File diff --git a/lib/isc/win32/libisc.mak b/lib/isc/win32/libisc.mak index e5d6913cb2..6f4e5f19a1 100644 --- a/lib/isc/win32/libisc.mak +++ b/lib/isc/win32/libisc.mak @@ -50,6 +50,7 @@ CLEAN : -@erase "$(INTDIR)\event.obj" -@erase "$(INTDIR)\file.obj" -@erase "$(INTDIR)\fsaccess.obj" + -@erase "$(INTDIR)\hash.obj" -@erase "$(INTDIR)\heap.obj" -@erase "$(INTDIR)\hex.obj" -@erase "$(INTDIR)\hmacmd5.obj" @@ -183,6 +184,7 @@ LINK32_OBJS= \ "$(INTDIR)\commandline.obj" \ "$(INTDIR)\error.obj" \ "$(INTDIR)\event.obj" \ + "$(INTDIR)\hash.obj" \ "$(INTDIR)\heap.obj" \ "$(INTDIR)\hex.obj" \ "$(INTDIR)\hmacmd5.obj" \ @@ -263,6 +265,8 @@ CLEAN : -@erase "$(INTDIR)\file.sbr" -@erase "$(INTDIR)\fsaccess.obj" -@erase "$(INTDIR)\fsaccess.sbr" + -@erase "$(INTDIR)\hash.obj" + -@erase "$(INTDIR)\hash.sbr" -@erase "$(INTDIR)\heap.obj" -@erase "$(INTDIR)\heap.sbr" -@erase "$(INTDIR)\hex.obj" @@ -442,6 +446,7 @@ BSC32_SBRS= \ "$(INTDIR)\commandline.sbr" \ "$(INTDIR)\error.sbr" \ "$(INTDIR)\event.sbr" \ + "$(INTDIR)\hash.sbr" \ "$(INTDIR)\heap.sbr" \ "$(INTDIR)\hex.sbr" \ "$(INTDIR)\hmacmd5.sbr" \ @@ -516,6 +521,7 @@ LINK32_OBJS= \ "$(INTDIR)\commandline.obj" \ "$(INTDIR)\error.obj" \ "$(INTDIR)\event.obj" \ + "$(INTDIR)\hash.obj" \ "$(INTDIR)\heap.obj" \ "$(INTDIR)\hex.obj" \ "$(INTDIR)\hmacmd5.obj" \ @@ -1107,6 +1113,24 @@ SOURCE=..\event.c $(CPP) $(CPP_PROJ) $(SOURCE) +!ENDIF + +SOURCE=..\hash.c + +!IF "$(CFG)" == "libisc - Win32 Release" + + +"$(INTDIR)\hash.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +!ELSEIF "$(CFG)" == "libisc - Win32 Debug" + + +"$(INTDIR)\hash.obj" "$(INTDIR)\hash.sbr" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + !ENDIF SOURCE=..\heap.c