a9da3307db733eb1739ba859952610bba3d894abnpstatic char *rcsid = "$Id: unormalize.c,v 1.1 2003/06/04 00:26:43 marka Exp $";
a9da3307db733eb1739ba859952610bba3d894abnp * Copyright (c) 2000,2001,2002 Japan Network Information Center.
a9da3307db733eb1739ba859952610bba3d894abnp * All rights reserved.
a9da3307db733eb1739ba859952610bba3d894abnp * By using this file, you agree to the terms and conditions set forth bellow.
a9da3307db733eb1739ba859952610bba3d894abnp * LICENSE TERMS AND CONDITIONS
a9da3307db733eb1739ba859952610bba3d894abnp * The following License Terms and Conditions apply, unless a different
a9da3307db733eb1739ba859952610bba3d894abnp * license is obtained from Japan Network Information Center ("JPNIC"),
a9da3307db733eb1739ba859952610bba3d894abnp * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
a9da3307db733eb1739ba859952610bba3d894abnp * Chiyoda-ku, Tokyo 101-0047, Japan.
a9da3307db733eb1739ba859952610bba3d894abnp * 1. Use, Modification and Redistribution (including distribution of any
a9da3307db733eb1739ba859952610bba3d894abnp * modified or derived work) in source and/or binary forms is permitted
a9da3307db733eb1739ba859952610bba3d894abnp * under this License Terms and Conditions.
a9da3307db733eb1739ba859952610bba3d894abnp * 2. Redistribution of source code must retain the copyright notices as they
a9da3307db733eb1739ba859952610bba3d894abnp * appear in each source code file, this License Terms and Conditions.
a9da3307db733eb1739ba859952610bba3d894abnp * 3. Redistribution in binary form must reproduce the Copyright Notice,
a9da3307db733eb1739ba859952610bba3d894abnp * this License Terms and Conditions, in the documentation and/or other
a9da3307db733eb1739ba859952610bba3d894abnp * materials provided with the distribution. For the purposes of binary
a9da3307db733eb1739ba859952610bba3d894abnp * distribution the "Copyright Notice" refers to the following language:
a9da3307db733eb1739ba859952610bba3d894abnp * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
a9da3307db733eb1739ba859952610bba3d894abnp * 4. The name of JPNIC may not be used to endorse or promote products
a9da3307db733eb1739ba859952610bba3d894abnp * derived from this Software without specific prior written approval of
a9da3307db733eb1739ba859952610bba3d894abnp * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
a9da3307db733eb1739ba859952610bba3d894abnp * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
a9da3307db733eb1739ba859952610bba3d894abnp * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
a9da3307db733eb1739ba859952610bba3d894abnp * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
#include <config.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
const unsigned long *from,
static idn_result_t
c = *from++;
goto ret;
* reordering/composition for them are blocked
if (r != idn_success)
goto ret;
if (r == idn_success) {
if (r != idn_success)
goto ret;
if (tolen <= 0) {
r = idn_buffer_overflow;
goto ret;
ret:
static idn_result_t
idn_result_t r;
case idn_success:
return (idn_success);
case idn_notfound:
case idn_buffer_overflow:
return (idn_nomemory);
goto again;
last_class = 0;
nvoids = 0;
&c) == idn_success) {
ucs4[0] = c;
nvoids++;
if (nvoids > 0)
static idn_result_t
return (idn_buffer_overflow);
return (idn_success);
static idn_result_t
return (idn_nomemory);
return (idn_success);
static idn_result_t
idn_result_t r;
return (idn_success);
for (i = j = 0; i < last; i++) {