URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/gnu-stable/newlib-1.18.0/newlib/testsuite
- from Rev 816 to Rev 829
- ↔ Reverse comparison
Rev 816 → Rev 829
/lib/newlibprocs.exp
0,0 → 1,106
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. |
# |
# Permission to use, copy, modify, and distribute this software |
# is freely granted, provided that this notice is preserved. |
# |
|
send_user "Loaded newlib.exp\n" |
|
# flags.exp overrides the dejagnu versions of libgloss_link_flags, |
# newlib_link_flags, and newlib_include_flags. |
load_lib flags.exp |
|
proc newlib_version { } { |
global tool_version |
|
verbose "In newlib version...\n" |
|
return $tool_version |
} |
|
set newlib_initialized 0 |
|
proc newlib_init { args } { |
global gluefile wrap_flags |
global newlib_initialized |
global target_info |
# These values are initialized in the local site.exp file. |
global srcdir objdir tmpdir |
global host_triplet target_triplet |
global old_ld_library_path |
|
verbose "In newlib_init...\n" |
|
if { $newlib_initialized == 1 } { return; } |
|
if {[target_info needs_status_wrapper] != "" && \ |
[target_info needs_status_wrapper] != "0" && \ |
![info exists gluefile]} { |
set gluefile ${tmpdir}/testglue.o; |
set result [build_wrapper $gluefile]; |
if { $result != "" } { |
set gluefile [lindex $result 0]; |
set wrap_flags [lindex $result 1]; |
} else { |
unset gluefile |
} |
} |
|
if [string match $host_triplet $target_triplet] then { |
if [string match "i686-pc-linux-gnu" $host_triplet] then { |
set old_ld_library_path [getenv LD_LIBRARY_PATH] |
setenv LD_LIBRARY_PATH "$objdir/.libs" |
} |
} |
} |
|
proc newlib_target_compile { source dest type options } { |
global gluefile wrap_flags |
global srcdir objdir |
global host_triplet target_triplet |
|
verbose "In newlib_target_compile...\n" |
|
lappend options "libs=-I$srcdir/include" |
verbose "srcdir is $srcdir" |
|
if {[target_info needs_status_wrapper] != "" && \ |
[target_info needs_status_wrapper] != "0" && \ |
[info exists gluefile] } { |
lappend options "libs=$gluefile" |
lappend options "ldflags=$wrap_flags" |
} |
|
if [string match $host_triplet $target_triplet] then { |
if [string match "i686-pc-linux-gnu" $host_triplet] then { |
lappend options "libs=$objdir/crt0.o -lc -lgcc" |
lappend options "ldflags=-nostdlib -L$objdir/.libs [newlib_include_flags]" |
} |
} |
|
return [target_compile $source $dest $type $options] |
} |
|
proc newlib_finish { } { |
global old_ld_library_path |
global host_triplet target_triplet |
|
verbose "In newlib_finish...\n" |
|
if [string match $host_triplet $target_triplet] then { |
if [string match "i686-pc-linux-gnu" $host_triplet] then { |
setenv LD_LIBRARY_PATH "$old_ld_library_path" |
} |
} |
} |
|
proc newlib_exit { } { |
global gluefile; |
|
verbose "In newlib_exit...\n" |
|
if [info exists gluefile] { |
file_on_build delete $gluefile; |
unset gluefile; |
} |
} |
/lib/passfail.exp
0,0 → 1,54
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. |
# |
# Permission to use, copy, modify, and distribute this software |
# is freely granted, provided that this notice is preserved. |
# |
|
load_lib newlibprocs.exp |
|
# newlib_pass_fail_all compiles and runs all the source files in the |
# test directory. If flag is -x, then the sources whose basenames are |
# listed in exclude_list are not compiled and run. |
|
proc newlib_pass_fail_all { flag exclude_list } { |
global srcdir objdir subdir runtests |
|
foreach fullsrcfile [glob -nocomplain $srcdir/$subdir/*.c] { |
set srcfile "[file tail $fullsrcfile]" |
# If we're only testing specific files and this isn't one of them, skip it. |
if ![runtest_file_p $runtests $srcfile] then { |
continue |
} |
|
# Exclude tests listed in exclude_list. |
if { $flag == "-x" } then { |
if {[lsearch $exclude_list "$srcfile"] != -1} then { |
continue |
} |
} |
newlib_pass_fail "$srcfile" |
} |
} |
|
# newlib_pass_fail takes the basename of a test source file, which it |
# compiles and runs. |
|
proc newlib_pass_fail { srcfile } { |
global srcdir tmpdir subdir |
|
set fullsrcfile "$srcdir/$subdir/$srcfile" |
|
set test_driver "$tmpdir/[file rootname $srcfile].x" |
|
set comp_output [newlib_target_compile "$fullsrcfile" "$test_driver" "executable" ""] |
|
if { $comp_output != "" } { |
fail "$subdir/$srcfile compilation" |
unresolved "$subdir/$srcfile execution" |
} else { |
pass "$subdir/$srcfile compilation" |
set result [newlib_load $test_driver ""] |
set status [lindex $result 0] |
$status "$subdir/$srcfile execution" |
} |
} |
/lib/flags.exp
0,0 → 1,86
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. |
# |
# Permission to use, copy, modify, and distribute this software |
# is freely granted, provided that this notice is preserved. |
# |
|
# flags.exp: overrides the dejagnu versions of libgloss_link_flags, |
# newlib_link_flags, and newlib_include_flags. |
|
# These versions of the procedures generate link and include flags |
# by searching for the needed files in the current build and source |
# directories, rather than in the build and source paths of the |
# compiler being used. |
|
if {![llength [info procs saved_libgloss_link_flags]]} { |
rename libgloss_link_flags saved_libgloss_link_flags |
} |
|
proc libgloss_link_flags { args } { |
global target_cpu |
# These values come from the local site.exp. |
global srcdir objdir |
global multibuildtop |
|
if {![info exists multibuildtop]} { |
return [saved_libgloss_link_flags $args] |
} |
|
verbose "In newlib version of libgloss_link_flags...\n" |
|
if [isnative] { |
return "" |
} |
|
if [is_remote host] { |
return "" |
} |
|
set target_build_path "$objdir/$multibuildtop.." |
|
set gloss_srcdir [lookfor_file ${srcdir} libgloss/$target_cpu] |
|
if { $gloss_srcdir == "" } { |
return "" |
} |
|
if [file exists $target_build_path/libgloss/$target_cpu] { |
verbose "libgloss path is $target_build_path/libgloss/$target_cpu" 2 |
return "-B$target_build_path/libgloss/$target_cpu/ -L$target_build_path/libgloss/$target_cpu -L$gloss_srcdir" |
} else { |
verbose -log "No libgloss support for this target." 2 |
return "" |
} |
} |
|
proc newlib_link_flags { args } { |
global tool_root_dir |
global srcdir objdir |
|
verbose "In newlib version of newlib_link_flags...\n" |
|
if [is_remote host] { |
return "" |
} |
|
set ld_script_path [lookfor_file ${tool_root_dir} "ld/ldscripts"]; |
if { $ld_script_path != "" } { |
set result "-L[file dirname $ld_script_path]" |
} else { |
set result "" |
} |
|
return "$result -B$objdir -L$objdir" |
} |
|
proc newlib_include_flags { args } { |
global srcdir objdir |
|
verbose "In newlib version of newlib_include_flags...\n" |
|
if [is_remote host] { |
return "" |
} |
|
return " -I$objdir/targ-include" |
} |
/lib/checkoutput.exp
0,0 → 1,43
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. |
# |
# Permission to use, copy, modify, and distribute this software |
# is freely granted, provided that this notice is preserved. |
# |
|
# newlib_check_output takes the basename of the test source file, and |
# a list of TCL regular expressions representing the expected output. |
# It assumes one line of output per test. |
|
proc newlib_check_output { srcfile expectlist } { |
global subdir srcdir tmpdir |
|
set srcfullname "$srcdir/$subdir/$srcfile" |
set test_driver "$tmpdir/[file tail [file rootname $srcfullname].x]" |
|
set comp_output [newlib_target_compile "$srcfullname" "$test_driver" "executable" ""] |
|
if { $comp_output != "" } { |
fail "$subdir/$srcfile compilation" |
unresolved "$subdir/$srcfile output" |
return |
} |
pass "$subdir/$srcfile compilation" |
|
set result [newlib_load $test_driver ""] |
set status [lindex $result 0] |
set output [lindex $result 1] |
|
set output_lines [split $output "\n"] |
|
foreach { expectedval } $expectlist { |
set gotval [string trim [lindex $output_lines 0] "\r"] |
if { ! [string match $expectedval $gotval] } { |
verbose -log "$subdir/$srcfile: Expected: $expectedval Got: $gotval " |
fail "$subdir/$srcfile output" |
return |
} |
set output_lines [lrange $output_lines 1 end] |
} |
|
pass "$subdir/$srcfile output" |
} |
/newlib.elix/tmmap.c
0,0 → 1,42
#include <sys/types.h> |
#include <sys/mman.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <fcntl.h> |
#include "check.h" |
|
int main() |
{ |
int fd; |
char *x; |
FILE *fp; |
char buf[40]; |
|
fd = open("my.file", O_CREAT | O_TRUNC | O_RDWR, 0644); |
|
CHECK (fd != -1); |
|
CHECK (write (fd, "abcdefgh", 8) == 8); |
|
x = (char *)mmap (0, 20, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); |
|
CHECK (x != MAP_FAILED); |
|
x[3] = 'j'; |
|
CHECK (munmap (x, 20) == 0); |
|
CHECK (close(fd) != -1); |
|
fp = fopen("my.file","r"); |
|
CHECK (fp != NULL); |
|
CHECK (fread(buf, 1, 20, fp) == 8); |
|
CHECK (strncmp (buf, "abcjefgh", 8) == 0); |
|
exit (0); |
} |
|
newlib.elix/tmmap.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.elix/elix.exp
===================================================================
--- newlib.elix/elix.exp (nonexistent)
+++ newlib.elix/elix.exp (revision 829)
@@ -0,0 +1,19 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+global host_triplet target_triplet
+
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+verbose $host_triplet
+verbose $target_triplet
+
+if [string match "i\[3456\]86-pc-linux-gnu" $target_triplet] then {
+ newlib_pass_fail_all -x $exclude_list
+}
Index: newlib.stdlib/atexit.c
===================================================================
--- newlib.stdlib/atexit.c (nonexistent)
+++ newlib.stdlib/atexit.c (revision 829)
@@ -0,0 +1,48 @@
+#include
+#include
+
+void a(void);
+void b(void);
+void c(int, void *);
+static void newline(void);
+
+void a (void)
+{
+ printf("a");
+}
+
+void b (void)
+{
+ printf("b");
+}
+
+void c (int code, void *k)
+{
+ char *x = (char *)k;
+ printf("%d%c",code,x[0]);
+}
+
+static void newline (void)
+{
+ printf("\n");
+}
+
+int main()
+{
+ if (atexit(newline) != 0)
+ abort();
+
+ if (atexit(a) != 0)
+ abort();
+
+ if (atexit(b) != 0)
+ abort();
+
+ if (on_exit(c,(void *)"c") != 0)
+ abort();
+
+ if (atexit(a) != 0)
+ abort();
+
+ exit(0);
+}
newlib.stdlib/atexit.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.stdlib/size_max.c
===================================================================
--- newlib.stdlib/size_max.c (nonexistent)
+++ newlib.stdlib/size_max.c (revision 829)
@@ -0,0 +1,18 @@
+#include
+#include
+#include
+
+int main () {
+ size_t s;
+
+ s = SIZE_MAX;
+ /* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
+ too big. */
+ if (s != SIZE_MAX)
+ abort ();
+ /* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */
+ if (++s != 0)
+ abort ();
+
+ return 0;
+}
newlib.stdlib/size_max.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.stdlib/atexit.exp
===================================================================
--- newlib.stdlib/atexit.exp (nonexistent)
+++ newlib.stdlib/atexit.exp (revision 829)
@@ -0,0 +1,13 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib checkoutput.exp
+
+set output {
+"a0cba"
+}
+
+newlib_check_output "atexit.c" "$output"
Index: newlib.stdlib/stdlib.exp
===================================================================
--- newlib.stdlib/stdlib.exp (nonexistent)
+++ newlib.stdlib/stdlib.exp (revision 829)
@@ -0,0 +1,10 @@
+# Copyright (C) 2008 by CodeSourcery, Inc. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+
+load_lib passfail.exp
+
+set exclude_list [list "atexit.c"]
+
+newlib_pass_fail_all -x $exclude_list
Index: include/check.h
===================================================================
--- include/check.h (nonexistent)
+++ include/check.h (revision 829)
@@ -0,0 +1,11 @@
+#include
+#include
+
+#define CHECK(a) { \
+ if (!(a)) \
+ { \
+ printf ("Failed " #a " in <%s> at line %d\n", __FILE__, __LINE__); \
+ fflush(stdout); \
+ abort(); \
+ } \
+}
include/check.h
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.search/hsearchtest.exp
===================================================================
--- newlib.search/hsearchtest.exp (nonexistent)
+++ newlib.search/hsearchtest.exp (revision 829)
@@ -0,0 +1,12 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+newlib_pass_fail_all -x $exclude_list
Index: newlib.search/hsearchtest.c
===================================================================
--- newlib.search/hsearchtest.c (nonexistent)
+++ newlib.search/hsearchtest.c (revision 829)
@@ -0,0 +1,125 @@
+/* $NetBSD: hsearchtest.c,v 1.4 2002/02/21 07:38:15 itojun Exp $ */
+
+/*
+ * Copyright (c) 2001 Christopher G. Demetriou
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * 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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 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.
+ *
+ * <>
+ */
+
+/*
+ * Test program for hsearch() et al.
+ */
+
+#include
+#if 0
+#if !defined(lint)
+__RCSID("$NetBSD: hsearchtest.c,v 1.4 2002/02/21 07:38:15 itojun Exp $");
+__COPYRIGHT(
+"@(#) Copyright (c) 2001 Christopher G. Demetriou. All rights reserved.\n");
+#endif /* not lint */
+#endif
+
+#include
+#include
+#include
+#include
+
+#define TEST(e) ((e) ? (void)0 : testfail(__FILE__, __LINE__, #e))
+
+static void
+testfail(const char *file, unsigned long line, const char *expression)
+{
+
+ fprintf(stderr, "TEST FAILED: %s: file %s, line %ld\n",
+ expression, file, line);
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ ENTRY e, *ep, *ep2;
+ int created_ok;
+ char ch[2];
+ int i;
+
+ created_ok = hcreate(16);
+ TEST(created_ok);
+
+ /* ch[1] should be constant from here on down. */
+ ch[1] = '\0';
+
+ /* Basic insertions. Check enough that there'll be collisions. */
+ for (i = 0; i < 26; i++) {
+ ch[0] = 'a' + i;
+ e.key = strdup(ch); /* ptr to provided key is kept! */
+ TEST(e.key != NULL);
+ e.data = (void *)(long)i;
+ ep = hsearch(e, ENTER);
+ TEST(ep != NULL);
+ TEST(strcmp(ep->key, ch) == 0);
+ TEST((long)ep->data == i);
+ }
+
+ /* e.key should be constant from here on down. */
+ e.key = ch;
+
+ /* Basic lookups. */
+ for (i = 0; i < 26; i++) {
+ ch[0] = 'a' + i;
+ ep = hsearch(e, FIND);
+ TEST(ep != NULL);
+ TEST(strcmp(ep->key, ch) == 0);
+ TEST((long)ep->data == i);
+ }
+
+ /* Check duplicate entry. Should _not_ overwrite existing data. */
+ ch[0] = 'a';
+ e.data = (void *)(long)12345;
+ ep = hsearch(e, FIND);
+ TEST(ep != NULL);
+ TEST(strcmp(ep->key, ch) == 0);
+ TEST((long)ep->data == 0);
+
+ /* Check for something that's not there. */
+ ch[0] = 'A';
+ ep = hsearch(e, FIND);
+ TEST(ep == NULL);
+
+ /* Check two at once. */
+ ch[0] = 'a';
+ ep = hsearch(e, FIND);
+ ch[0] = 'b';
+ ep2 = hsearch(e, FIND);
+ TEST(ep != NULL);
+ TEST(strcmp(ep->key, "a") == 0 && (long)ep->data == 0);
+ TEST(ep2 != NULL);
+ TEST(strcmp(ep2->key, "b") == 0 && (long)ep2->data == 1);
+
+ hdestroy();
+
+ exit(0);
+}
newlib.search/hsearchtest.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: config/default.exp
===================================================================
--- config/default.exp (nonexistent)
+++ config/default.exp (revision 829)
@@ -0,0 +1,7 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib standard.exp
Index: newlib.string/string.exp
===================================================================
--- newlib.string/string.exp (nonexistent)
+++ newlib.string/string.exp (revision 829)
@@ -0,0 +1,12 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+newlib_pass_fail_all -x $exclude_list
Index: newlib.string/memmove1.c
===================================================================
--- newlib.string/memmove1.c (nonexistent)
+++ newlib.string/memmove1.c (revision 829)
@@ -0,0 +1,184 @@
+/* A minor test-program for memmove.
+ Copyright (C) 2005 Axis Communications.
+ 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. Neither the name of Axis Communications 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 AXIS COMMUNICATIONS AND ITS 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 AXIS
+ COMMUNICATIONS OR ITS 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. */
+
+/* Test moves of 0..MAX bytes; overlapping-src-higher,
+ overlapping-src-lower and non-overlapping. The overlap varies with
+ 1..N where N is the size moved. This means an order of MAX**2
+ iterations. The size of an octet may seem appropriate for MAX and
+ makes an upper limit for simple testing. For the CRIS simulator,
+ making this 256 added 90s to the test-run (2GHz P4) while 64 (4s) was
+ enough to spot the bugs that had crept in, hence the number chosen. */
+#define MAX 64
+
+#include
+#include
+#include
+
+#define TOO_MANY_ERRORS 11
+int errors = 0;
+
+#define DEBUGP \
+ if (errors == TOO_MANY_ERRORS) \
+ printf ("Further errors omitted\n"); \
+ else if (errors < TOO_MANY_ERRORS) \
+ printf
+
+/* A safe target-independent memmove. */
+
+void
+mymemmove (unsigned char *dest, unsigned char *src, size_t n)
+{
+ size_t i;
+
+ if ((src <= dest && src + n <= dest)
+ || src >= dest)
+ while (n-- > 0)
+ *dest++ = *src++;
+ else
+ {
+ dest += n;
+ src += n;
+ while (n-- > 0)
+ *--dest = *--src;
+ }
+}
+
+/* It's either the noinline attribute or forcing the test framework to
+ pass -fno-builtin-memmove. */
+void
+xmemmove (unsigned char *dest, unsigned char *src, size_t n)
+ __attribute__ ((__noinline__));
+
+void
+xmemmove (unsigned char *dest, unsigned char *src, size_t n)
+{
+ void *retp;
+ retp = memmove (dest, src, n);
+
+ if (retp != dest)
+ {
+ errors++;
+ DEBUGP ("memmove of n bytes returned %p instead of dest=%p\n",
+ retp, dest);
+ }
+}
+
+
+/* Fill the array with something we can associate with a position, but
+ not exactly the same as the position index. */
+
+void
+fill (unsigned char dest[MAX*3])
+{
+ size_t i;
+ for (i = 0; i < MAX*3; i++)
+ dest[i] = (10 + i) % MAX;
+}
+
+int
+main (void)
+{
+ size_t i;
+ int errors = 0;
+
+ /* Leave some room before and after the area tested, so we can detect
+ overwrites of up to N bytes, N being the amount tested. If you
+ want to test using valgrind, make these malloced instead. */
+ unsigned char from_test[MAX*3];
+ unsigned char to_test[MAX*3];
+ unsigned char from_known[MAX*3];
+ unsigned char to_known[MAX*3];
+
+ /* Non-overlap. */
+ for (i = 0; i < MAX; i++)
+ {
+ /* Do the memmove first before setting the known array, so we know
+ it didn't change any of the known array. */
+ fill (from_test);
+ fill (to_test);
+ xmemmove (to_test + MAX, 1 + from_test + MAX, i);
+
+ fill (from_known);
+ fill (to_known);
+ mymemmove (to_known + MAX, 1 + from_known + MAX, i);
+
+ if (memcmp (to_known, to_test, sizeof (to_known)) != 0)
+ {
+ errors++;
+ DEBUGP ("memmove failed non-overlap test for %d bytes\n", i);
+ }
+ }
+
+ /* Overlap-from-before. */
+ for (i = 0; i < MAX; i++)
+ {
+ size_t j;
+ for (j = 0; j < i; j++)
+ {
+ fill (to_test);
+ xmemmove (to_test + MAX * 2 - i, to_test + MAX * 2 - i - j, i);
+
+ fill (to_known);
+ mymemmove (to_known + MAX * 2 - i, to_known + MAX * 2 - i - j, i);
+
+ if (memcmp (to_known, to_test, sizeof (to_known)) != 0)
+ {
+ errors++;
+ DEBUGP ("memmove failed for %d bytes,"
+ " with src %d bytes before dest\n",
+ i, j);
+ }
+ }
+ }
+
+ /* Overlap-from-after. */
+ for (i = 0; i < MAX; i++)
+ {
+ size_t j;
+ for (j = 0; j < i; j++)
+ {
+ fill (to_test);
+ xmemmove (to_test + MAX, to_test + MAX + j, i);
+
+ fill (to_known);
+ mymemmove (to_known + MAX, to_known + MAX + j, i);
+
+ if (memcmp (to_known, to_test, sizeof (to_known)) != 0)
+ {
+ errors++;
+ DEBUGP ("memmove failed when moving %d bytes,"
+ " with src %d bytes after dest\n",
+ i, j);
+ }
+ }
+ }
+
+ if (errors != 0)
+ abort ();
+ exit (0);
+}
newlib.string/memmove1.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.string/tstring.c
===================================================================
--- newlib.string/tstring.c (nonexistent)
+++ newlib.string/tstring.c (revision 829)
@@ -0,0 +1,353 @@
+/*
+ * Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include
+#include
+#include
+
+#ifndef MAX_1
+#ifdef __SPU__
+#define MAX_1 11000
+#else
+#define MAX_1 33000
+#endif
+#endif
+
+#define MAX_2 (2 * MAX_1 + MAX_1 / 10)
+
+void eprintf (int line, char *result, char *expected, int size)
+{
+ if (size != 0)
+ printf ("Failure at line %d, result is <%.*s>, should be <%s> of size %d\n",
+ line, size, result, expected, size);
+ else
+ printf ("Failure at line %d, result is <%s>, should be <%s>\n",
+ line, result, expected);
+}
+
+void mycopy (char *target, char *source, int size)
+{
+ int i;
+
+ for (i = 0; i < size; ++i)
+ {
+ target[i] = source[i];
+ }
+}
+
+void myset (char *target, char ch, int size)
+{
+ int i;
+
+ for (i = 0; i < size; ++i)
+ {
+ target[i] = ch;
+ }
+}
+
+int main()
+{
+ char target[MAX_1] = "A";
+ char first_char;
+ char second_char;
+ char array[] = "abcdefghijklmnopqrstuvwxz";
+ char array2[] = "0123456789!@#$%^&*(";
+ char buffer2[MAX_1];
+ char buffer3[MAX_1];
+ char buffer4[MAX_1];
+ char buffer5[MAX_2];
+ char buffer6[MAX_2];
+ char buffer7[MAX_2];
+ char expected[MAX_1];
+ char *tmp1, *tmp2, *tmp3, *tmp4, *tmp5, *tmp6, *tmp7;
+ int i, j, k, x, z, align_test_iterations;
+
+ int test_failed = 0;
+
+ tmp1 = target;
+ tmp2 = buffer2;
+ tmp3 = buffer3;
+ tmp4 = buffer4;
+ tmp5 = buffer5;
+ tmp6 = buffer6;
+ tmp7 = buffer7;
+
+ tmp2[0] = 'Z';
+ tmp2[1] = '\0';
+
+ if (memset (target, 'X', 0) != target ||
+ memcpy (target, "Y", 0) != target ||
+ memmove (target, "K", 0) != target ||
+ strncpy (tmp2, "4", 0) != tmp2 ||
+ strncat (tmp2, "123", 0) != tmp2 ||
+ strcat (target, "") != target)
+ {
+ eprintf (__LINE__, target, "A", 0);
+ test_failed = 1;
+ }
+
+ if (strcmp (target, "A") || strlen(target) != 1 || memchr (target, 'A', 0) != NULL
+ || memcmp (target, "J", 0) || strncmp (target, "A", 1) || strncmp (target, "J", 0) ||
+ tmp2[0] != 'Z' || tmp2[1] != '\0')
+ {
+ eprintf (__LINE__, target, "A", 0);
+ test_failed = 1;
+ }
+
+ tmp2[2] = 'A';
+ if (strcpy (target, "") != target ||
+ strncpy (tmp2, "", 4) != tmp2 ||
+ strcat (target, "") != target)
+ {
+ eprintf (__LINE__, target, "", 0);
+ test_failed = 1;
+ }
+
+ if (target[0] != '\0' || strncmp (target, "", 1) ||
+ memcmp (tmp2, "\0\0\0\0", 4))
+ {
+ eprintf (__LINE__, target, "", 0);
+ test_failed = 1;
+ }
+
+ tmp2[2] = 'A';
+ if (strncat (tmp2, "1", 3) != tmp2 ||
+ memcmp (tmp2, "1\0A", 3))
+ {
+ eprintf (__LINE__, tmp2, "1\0A", 3);
+ test_failed = 1;
+ }
+
+ if (strcpy (tmp3, target) != tmp3 ||
+ strcat (tmp3, "X") != tmp3 ||
+ strncpy (tmp2, "X", 2) != tmp2 ||
+ memset (target, tmp2[0], 1) != target)
+ {
+ eprintf (__LINE__, target, "X", 0);
+ test_failed = 1;
+ }
+
+ if (strcmp (target, "X") || strlen (target) != 1 ||
+ memchr (target, 'X', 2) != target ||
+ strchr (target, 'X') != target ||
+ memchr (target, 'Y', 2) != NULL ||
+ strchr (target, 'Y') != NULL ||
+ strcmp (tmp3, target) ||
+ strncmp (tmp3, target, 2) ||
+ memcmp (target, "K", 0) ||
+ strncmp (target, tmp3, 3))
+ {
+ eprintf (__LINE__, target, "X", 0);
+ test_failed = 1;
+ }
+
+ if (strcpy (tmp3, "Y") != tmp3 ||
+ strcat (tmp3, "Y") != tmp3 ||
+ memset (target, 'Y', 2) != target)
+ {
+ eprintf (__LINE__, target, "Y", 0);
+ test_failed = 1;
+ }
+
+ target[2] = '\0';
+ if (memcmp (target, "YY", 2) || strcmp (target, "YY") ||
+ strlen (target) != 2 || memchr (target, 'Y', 2) != target ||
+ strcmp (tmp3, target) ||
+ strncmp (target, tmp3, 3) ||
+ strncmp (target, tmp3, 4) ||
+ strncmp (target, tmp3, 2) ||
+ strchr (target, 'Y') != target)
+ {
+ eprintf (__LINE__, target, "YY", 2);
+ test_failed = 1;
+ }
+
+ strcpy (target, "WW");
+ if (memcmp (target, "WW", 2) || strcmp (target, "WW") ||
+ strlen (target) != 2 || memchr (target, 'W', 2) != target ||
+ strchr (target, 'W') != target)
+ {
+ eprintf (__LINE__, target, "WW", 2);
+ test_failed = 1;
+ }
+
+ if (strncpy (target, "XX", 16) != target ||
+ memcmp (target, "XX\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16))
+ {
+ eprintf (__LINE__, target, "XX\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16);
+ test_failed = 1;
+ }
+
+ if (strcpy (tmp3, "ZZ") != tmp3 ||
+ strcat (tmp3, "Z") != tmp3 ||
+ memcpy (tmp4, "Z", 2) != tmp4 ||
+ strcat (tmp4, "ZZ") != tmp4 ||
+ memset (target, 'Z', 3) != target)
+ {
+ eprintf (__LINE__, target, "ZZZ", 3);
+ test_failed = 1;
+ }
+
+ target[3] = '\0';
+ tmp5[0] = '\0';
+ strncat (tmp5, "123", 2);
+ if (memcmp (target, "ZZZ", 3) || strcmp (target, "ZZZ") ||
+ strcmp (tmp3, target) || strcmp (tmp4, target) ||
+ strncmp (target, "ZZZ", 4) || strncmp (target, "ZZY", 3) <= 0 ||
+ strncmp ("ZZY", target, 4) >= 0 ||
+ memcmp (tmp5, "12", 3) ||
+ strlen (target) != 3)
+ {
+ eprintf (__LINE__, target, "ZZZ", 3);
+ test_failed = 1;
+ }
+
+ target[2] = 'K';
+ if (memcmp (target, "ZZZ", 2) || strcmp (target, "ZZZ") >= 0 ||
+ memcmp (target, "ZZZ", 3) >= 0 || strlen (target) != 3 ||
+ memchr (target, 'K', 3) != target + 2 ||
+ strncmp (target, "ZZZ", 2) || strncmp (target, "ZZZ", 4) >= 0 ||
+ strchr (target, 'K') != target + 2)
+ {
+ eprintf (__LINE__, target, "ZZK", 3);
+ test_failed = 1;
+ }
+
+ strcpy (target, "AAA");
+ if (memcmp (target, "AAA", 3) || strcmp (target, "AAA") ||
+ strncmp (target, "AAA", 3) ||
+ strlen (target) != 3)
+ {
+ eprintf (__LINE__, target, "AAA", 3);
+ test_failed = 1;
+ }
+
+ j = 5;
+ while (j < MAX_1)
+ {
+ for (i = j-1; i <= j+1; ++i)
+ {
+ /* don't bother checking unaligned data in the larger
+ sizes since it will waste time without performing additional testing */
+ if (i <= 16 * sizeof(long))
+ {
+ align_test_iterations = 2*sizeof(long);
+ if (i <= 2 * sizeof(long) + 1)
+ z = 2;
+ else
+ z = 2 * sizeof(long);
+ }
+ else
+ {
+ align_test_iterations = 1;
+ }
+
+ for (x = 0; x < align_test_iterations; ++x)
+ {
+ tmp1 = target + x;
+ tmp2 = buffer2 + x;
+ tmp3 = buffer3 + x;
+ tmp4 = buffer4 + x;
+ tmp5 = buffer5 + x;
+ tmp6 = buffer6 + x;
+
+ first_char = array[i % (sizeof(array) - 1)];
+ second_char = array2[i % (sizeof(array2) - 1)];
+ memset (tmp1, first_char, i);
+ mycopy (tmp2, tmp1, i);
+ myset (tmp2 + z, second_char, i - z - 1);
+ if (memcpy (tmp1 + z, tmp2 + z, i - z - 1) != tmp1 + z)
+ {
+ printf ("error at line %d\n", __LINE__);
+ test_failed = 1;
+ }
+
+ tmp1[i] = '\0';
+ tmp2[i] = '\0';
+ if (strcpy (expected, tmp2) != expected)
+ {
+ printf ("error at line %d\n", __LINE__);
+ test_failed = 1;
+ }
+ tmp2[i-z] = first_char + 1;
+ if (memmove (tmp2 + z + 1, tmp2 + z, i - z - 1) != tmp2 + z + 1 ||
+ memset (tmp3, first_char, i) != tmp3)
+ {
+ printf ("error at line %d\n", __LINE__);
+ test_failed = 1;
+ }
+
+ myset (tmp4, first_char, i);
+ tmp5[0] = '\0';
+ if (strncpy (tmp5, tmp1, i+1) != tmp5 ||
+ strcat (tmp5, tmp1) != tmp5)
+ {
+ printf ("error at line %d\n", __LINE__);
+ test_failed = 1;
+ }
+ mycopy (tmp6, tmp1, i);
+ mycopy (tmp6 + i, tmp1, i + 1);
+
+ tmp7[2*i+z] = second_char;
+ strcpy (tmp7, tmp1);
+
+ strchr (tmp1, second_char);
+
+ if (memcmp (tmp1, expected, i) || strcmp (tmp1, expected) ||
+ strncmp (tmp1, expected, i) ||
+ strncmp (tmp1, expected, i+1) ||
+ strcmp (tmp1, tmp2) >= 0 || memcmp (tmp1, tmp2, i) >= 0 ||
+ strncmp (tmp1, tmp2, i+1) >= 0 ||
+ strlen (tmp1) != i || memchr (tmp1, first_char, i) != tmp1 ||
+ strchr (tmp1, first_char) != tmp1 ||
+ memchr (tmp1, second_char, i) != tmp1 + z ||
+ strchr (tmp1, second_char) != tmp1 + z ||
+ strcmp (tmp5, tmp6) ||
+ strncat (tmp7, tmp1, i+2) != tmp7 ||
+ strcmp (tmp7, tmp6) ||
+ tmp7[2*i+z] != second_char)
+ {
+ eprintf (__LINE__, tmp1, expected, 0);
+ printf ("x is %d\n",x);
+ printf ("i is %d\n", i);
+ printf ("tmp1 is <%p>\n", tmp1);
+ printf ("tmp5 is <%p> <%s>\n", tmp5, tmp5);
+ printf ("tmp6 is <%p> <%s>\n", tmp6, tmp6);
+ test_failed = 1;
+ }
+
+ for (k = 1; k <= align_test_iterations && k <= i; ++k)
+ {
+ if (memcmp (tmp3, tmp4, i - k + 1) != 0 ||
+ strncmp (tmp3, tmp4, i - k + 1) != 0)
+ {
+ printf ("Failure at line %d, comparing %.*s with %.*s\n",
+ __LINE__, i, tmp3, i, tmp4);
+ test_failed = 1;
+ }
+ tmp4[i-k] = first_char + 1;
+ if (memcmp (tmp3, tmp4, i) >= 0 ||
+ strncmp (tmp3, tmp4, i) >= 0 ||
+ memcmp (tmp4, tmp3, i) <= 0 ||
+ strncmp (tmp4, tmp3, i) <= 0)
+ {
+ printf ("Failure at line %d, comparing %.*s with %.*s\n",
+ __LINE__, i, tmp3, i, tmp4);
+ test_failed = 1;
+ }
+ tmp4[i-k] = first_char;
+ }
+ }
+ }
+ j = ((2 * j) >> 2) << 2;
+ }
+
+ if (test_failed)
+ abort();
+ else
+ exit(0);
+}
newlib.string/tstring.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.wctype/twctype.c
===================================================================
--- newlib.wctype/twctype.c (nonexistent)
+++ newlib.wctype/twctype.c (revision 829)
@@ -0,0 +1,64 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include "check.h"
+
+int main()
+{
+#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL > 1
+ if (_MB_LEN_MAX == 1)
+ {
+ CHECK (iswalpha(L'a'));
+ CHECK (!iswalpha(L'3'));
+ CHECK (iswalnum(L'9'));
+ CHECK (!iswalnum(L'$'));
+ CHECK (iswcntrl(L'\n'));
+ CHECK (!iswcntrl(L'#'));
+ CHECK (iswdigit(L'2'));
+ CHECK (!iswdigit(L'a'));
+ CHECK (iswgraph(L'2'));
+ CHECK (!iswgraph(L' '));
+ CHECK (iswlower(L'g'));
+ CHECK (!iswlower(L'G'));
+ CHECK (iswprint(L'*'));
+ CHECK (!iswprint(L'\n'));
+ CHECK (iswpunct(L','));
+ CHECK (!iswpunct(L'\n'));
+ CHECK (iswspace(L'\t'));
+ CHECK (!iswspace(L':'));
+ CHECK (iswupper(L'G'));
+ CHECK (!iswupper(L'g'));
+ CHECK (iswxdigit(L'A'));
+ CHECK (!iswxdigit(L'g'));
+ }
+ else
+ {
+ setlocale (LC_CTYPE, "C-UTF-8");
+ CHECK (iswalpha(0x0967));
+ CHECK (!iswalpha(0x128e));
+ CHECK (iswalnum(0x1d7ce));
+ CHECK (!iswalnum(0x1d800));
+ CHECK (iswcntrl(0x007f));
+ CHECK (!iswcntrl(0x2027));
+ CHECK (iswdigit(L'2'));
+ CHECK (!iswdigit(0x0009));
+ CHECK (iswlower(0x03b3));
+ CHECK (!iswlower(0x04aa));
+ CHECK (iswprint(0x0b13));
+ CHECK (!iswprint(0x0ce2));
+ CHECK (iswpunct(0x002d));
+ CHECK (!iswpunct(0x0a84));
+ CHECK (iswspace(0x000a));
+ CHECK (!iswspace(0x2060));
+ CHECK (iswupper(0x01a4));
+ CHECK (!iswupper(0x1e6d));
+ CHECK (iswxdigit(L'A'));
+ CHECK (!iswxdigit(0x1f48));
+ }
+#endif
+
+ exit (0);
+}
newlib.wctype/twctype.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.wctype/twctrans.c
===================================================================
--- newlib.wctype/twctrans.c (nonexistent)
+++ newlib.wctype/twctrans.c (revision 829)
@@ -0,0 +1,23 @@
+#include
+#include
+#include "check.h"
+
+int main()
+{
+ wctrans_t x;
+
+ x = wctrans ("tolower");
+ CHECK (x != 0);
+ CHECK (towctrans (L'A', x) == tolower ('A'));
+ CHECK (towctrans (L'5', x) == tolower ('5'));
+
+ x = wctrans ("toupper");
+ CHECK (x != 0);
+ CHECK (towctrans (L'c', x) == toupper ('c'));
+ CHECK (towctrans (L'9', x) == toupper ('9'));
+
+ x = wctrans ("unknown");
+ CHECK (x == 0);
+
+ exit (0);
+}
newlib.wctype/twctrans.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.wctype/wctype.exp
===================================================================
--- newlib.wctype/wctype.exp (nonexistent)
+++ newlib.wctype/wctype.exp (revision 829)
@@ -0,0 +1,12 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+newlib_pass_fail_all -x $exclude_list
Index: newlib.wctype/tiswctype.c
===================================================================
--- newlib.wctype/tiswctype.c (nonexistent)
+++ newlib.wctype/tiswctype.c (revision 829)
@@ -0,0 +1,61 @@
+#include
+#include
+#include "check.h"
+
+int main()
+{
+ wctype_t x;
+
+ x = wctype ("alpha");
+ CHECK (x != 0);
+ CHECK (iswctype (L'a', x) && isalpha ('a'));
+
+ x = wctype ("alnum");
+ CHECK (x != 0);
+ CHECK (iswctype (L'0', x) && isalnum ('0'));
+
+ x = wctype ("blank");
+ CHECK (x != 0);
+ CHECK (iswctype (L' ', x) && isblank (' '));
+
+ x = wctype ("cntrl");
+ CHECK (x != 0);
+ CHECK (iswctype (L'\n', x) && iscntrl ('\n'));
+
+ x = wctype ("digit");
+ CHECK (x != 0);
+ CHECK (iswctype (L'7', x) && isdigit ('7'));
+
+ x = wctype ("graph");
+ CHECK (x != 0);
+ CHECK (iswctype (L'!', x) && isgraph ('!'));
+
+ x = wctype ("lower");
+ CHECK (x != 0);
+ CHECK (iswctype (L'k', x) && islower ('k'));
+
+ x = wctype ("print");
+ CHECK (x != 0);
+ CHECK (iswctype (L'@', x) && isprint ('@'));
+
+ x = wctype ("punct");
+ CHECK (x != 0);
+ CHECK (iswctype (L'.', x) && ispunct ('.'));
+
+ x = wctype ("space");
+ CHECK (x != 0);
+ CHECK (iswctype (L'\t', x) && isspace ('\t'));
+
+ x = wctype ("upper");
+ CHECK (x != 0);
+ CHECK (iswctype (L'T', x) && isupper ('T'));
+
+ x = wctype ("xdigit");
+ CHECK (x != 0);
+ CHECK (iswctype (L'B', x) && isxdigit ('B'));
+
+ x = wctype ("unknown");
+ CHECK (x == 0);
+
+ exit (0);
+}
newlib.wctype/tiswctype.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.iconv/iconvru.c
===================================================================
--- newlib.iconv/iconvru.c (nonexistent)
+++ newlib.iconv/iconvru.c (revision 829)
@@ -0,0 +1,489 @@
+/*
+ * Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
+ * Rights transferred to Franklin Electronic Publishers.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 "check.h"
+
+#ifdef _ICONV_ENABLED
+
+#if defined(_ICONV_CONVERTER_UTF_8) || \
+ defined(_ICONV_CONVERTER_ISO_8859_5) || \
+ defined(_ICONV_CONVERTER_KOI8_R)
+
+#ifdef _ICONV_CONVERTER_ISO_8859_5
+char iso_8859_5[] =
+{
+ 0xbe,0xdf,0xd5,0xe0,0xd0,0xe2,0xde,0xe0,0xeb,0x20,
+ 0xd2,0x20,0xde,0xd4,0xdd,0xde,0xd9,0x20,0xe1,0xe2,
+ 0xe0,0xde,0xda,0xd5,0x20,0xd8,0xdc,0xd5,0xee,0xe2,
+ 0x20,0xde,0xd4,0xd8,0xdd,0xd0,0xda,0xde,0xd2,0xeb,
+ 0xd9,0x20,0xdf,0xe0,0xd8,0xde,0xe0,0xd8,0xe2,0xd5,
+ 0xe2,0x0a,0xc1,0xe2,0xe0,0xde,0xda,0xd8,0x20,0xe3,
+ 0xdf,0xde,0xe0,0xef,0xd4,0xde,0xe7,0xd5,0xdd,0xeb,
+ 0x20,0xdf,0xde,0x20,0xe3,0xd1,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20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x3e,0x0a,0x2b,0x20,0x20,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x3c,0x3c,
+ 0x20,0x20,0x3e,0x3e,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,
+ 0x0a,0x3c,0x20,0x20,0x3c,0x3d,0x20,0x20,0x3e,0x20,
+ 0x20,0x3e,0x3d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x2d,0x3e,0x0a,0x3d,0x3d,0x20,0x20,0x21,0x3d,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x26,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,
+ 0x5e,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x2d,0x3e,0x0a,0x7c,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x26,0x26,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x7c,
+ 0x7c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x3e,0x0a,0x3f,0x3a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x3c,0x2d,0x2d,0x2d,0x20,0x20,0x20,0x0a,0x3d,0x20,
+ 0x20,0x2b,0x3d,0x20,0x20,0x2d,0x3d,0x20,0x20,0x2f,
+ 0x3d,0x20,0x20,0x25,0x3d,0x20,0x20,0x26,0x3d,0x20,
+ 0x20,0x5e,0x3d,0x20,0x20,0x7c,0x3d,0x20,0x20,0x3c,
+ 0x3c,0x3d,0x20,0x20,0x3e,0x3e,0x3d,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2d,0x2d,0x2d,
+ 0x0a,0x2c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0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d,0x3e,0x20,0x20,0x2e,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x21,
+ 0x20,0x20,0x20,0x7e,0x20,0x20,0x20,0x2b,0x2b,0x20,
+ 0x20,0x2d,0x2d,0x20,0x20,0x2b,0x20,0x20,0x2d,0x20,
+ 0x20,0x2a,0x20,0x20,0x26,0x20,0x20,0x28,0x74,0x79,
+ 0x70,0x65,0x29,0x20,0x20,0x73,0x69,0x7a,0x65,0x6f,
+ 0x66,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x3e,0x0a,0x2a,0x20,0x20,0x2f,0x20,0x20,0x25,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x3e,0x0a,0x2b,0x20,0x20,0x2d,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x3c,0x3c,
+ 0x20,0x20,0x3e,0x3e,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,
+ 0x0a,0x3c,0x20,0x20,0x3c,0x3d,0x20,0x20,0x3e,0x20,
+ 0x20,0x3e,0x3d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x2d,0x3e,0x0a,0x3d,0x3d,0x20,0x20,0x21,0x3d,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x26,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,
+ 0x5e,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x2d,0x3e,0x0a,0x7c,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x26,0x26,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x7c,
+ 0x7c,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x3e,0x0a,0x3f,0x3a,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x3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0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x3e,0x0a,0x21,0x20,0x20,0x20,0x7e,0x20,0x20,0x20,
+ 0x2b,0x2b,0x20,0x20,0x2d,0x2d,0x20,0x20,0x2b,0x20,
+ 0x20,0x2d,0x20,0x20,0x2a,0x20,0x20,0x26,0x20,0x20,
+ 0x28,0x74,0x79,0x70,0x65,0x29,0x20,0x20,0x73,0x69,
+ 0x7a,0x65,0x6f,0x66,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x3e,0x0a,0x2a,0x20,0x20,0x2f,0x20,
+ 0x20,0x25,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x2b,0x20,
+ 0x20,0x2d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,
+ 0x0a,0x3c,0x3c,0x20,0x20,0x3e,0x3e,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,
+ 0x2d,0x2d,0x3e,0x0a,0x3c,0x20,0x20,0x3c,0x3d,0x20,
+ 0x20,0x3e,0x20,0x20,0x3e,0x3d,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x3d,0x3d,0x20,
+ 0x20,0x21,0x3d,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,
+ 0x26,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,
+ 0x2d,0x3e,0x0a,0x5e,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x7c,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a,0x26,
+ 0x26,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x2d,0x2d,0x2d,
+ 0x3e,0x0a,0x7c,0x7c,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x2d,0x2d,0x2d,0x3e,0x0a,0x3f,0x3a,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x3c,0x2d,0x2d,0x2d,0x20,0x20,0x20,
+ 0x0a,0x3d,0x20,0x20,0x2b,0x3d,0x20,0x20,0x2d,0x3d,
+ 0x20,0x20,0x2f,0x3d,0x20,0x20,0x25,0x3d,0x20,0x20,
+ 0x26,0x3d,0x20,0x20,0x5e,0x3d,0x20,0x20,0x7c,0x3d,
+ 0x20,0x20,0x3c,0x3c,0x3d,0x20,0x20,0x3e,0x3e,0x3d,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
+ 0x2d,0x2d,0x2d,0x0a,0x2c,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x2d,0x2d,0x2d,0x3e,0x0a
+};
+#endif
+
+struct iconv_data
+{
+ int len;
+ char *name;
+ char *data;
+};
+
+#define CONVERSIONS 3
+
+struct iconv_data data[] =
+{
+#ifdef _ICONV_CONVERTER_ISO_8859_5
+ {sizeof(iso_8859_5), "ISO-8859-5", (char *)iso_8859_5},
+#endif
+#ifdef _ICONV_CONVERTER_KOI8_R
+ {sizeof(koi8_r), "KOI8-R", (char *)koi8_r},
+#endif
+#ifdef _ICONV_CONVERTER_UTF_8
+ {sizeof(utf8), "UTF-8", (char *)utf8},
+#endif
+ {0, NULL, NULL}
+};
+
+#define OUTBUF_LEN 1500
+char ob[OUTBUF_LEN];
+
+iconv_t descs[CONVERSIONS*CONVERSIONS];
+
+#define ERROR 0
+
+int main(int argc, char **argv)
+{
+ int i, j, k, d = 0;
+ size_t n;
+ char *outbuf, *inbuf;
+ int conversions = sizeof(data)/sizeof(struct iconv_data) - 1;
+
+ puts("RU iconv test");
+
+ for (i = 0; i < conversions; i++)
+ {
+ for (j = 0; j < conversions; j++)
+ {
+ descs[d] = iconv_open(data[j].name, data[i].name);
+ if (descs[d++] == (iconv_t)-1)
+ {
+ printf("iconv_open(%s, %s)\n", data[i].name, data[j].name);
+ perror("");
+ CHECK(ERROR);
+ }
+ }
+ }
+
+ d = 0;
+ for (i = 0; i < conversions; i++)
+ {
+ for (j = 0; j < conversions; j++)
+ {
+ size_t inbytes = data[i].len;
+ size_t outbytes = OUTBUF_LEN;
+ inbuf = data[i].data;
+ outbuf = (char *)ob;
+
+ if (iconv(descs[d], NULL, NULL, (char **)&outbuf, &outbytes) == (size_t)-1)
+ {
+ perror("Can't reset shift state");
+ CHECK(ERROR);
+ }
+
+ n = iconv(descs[d++], (const char **)&(inbuf), &inbytes,
+ (char **)&outbuf, &outbytes);
+ if (n == (size_t)-1)
+ {
+ printf("Conversion from %s to %s FAILED - iconv() "
+ "returned -1\n", data[i].name, data[j].name);
+ perror("");
+ CHECK(ERROR);
+ }
+
+ if (data[j].len != OUTBUF_LEN - outbytes)
+ {
+ printf("Conversion from %s to %s FAILED",
+ data[i].name, data[j].name);
+ printf(" - bad output buffer length (%d instead of %d)\n",
+ OUTBUF_LEN - outbytes, data[j].len);
+ CHECK(ERROR);
+ }
+
+ for (k = 0; k < data[j].len; k++)
+ {
+ if (ob[k] != data[j].data[k])
+ {
+ printf("Conversion from %s to %s FAILED",
+ data[i].name, data[j].name);
+ printf("Error: byte %d is wrong\n", k);
+ printf("outbuf value: %#x, inbuf value %#x, "
+ "right value: %#x\n",
+ (int)ob[k], (int)(data[i].data[k]),
+ (int)(data[j].data[k]));
+ CHECK(ERROR);
+ }
+ }
+
+ printf("iconv from %s to %s was successfully done\n",
+ data[i].name, data[j].name);
+
+ }
+ }
+
+ d = 0;
+ for (i = 0; i < conversions; i++)
+ for (j = 0; j < conversions; j++)
+ CHECK(iconv_close(descs[d++]) != -1);
+
+ exit(0);
+}
+
+#else /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */
+int main(int argc, char **argv)
+{
+ puts("None of ISO-8859-5, KOI8-R and UTF-8 converters linked, SKIP test");
+ exit(0);
+}
+#endif /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */
+
+#else /* #ifdef _ICONV_ENABLED */
+int main(int argc, char **argv)
+{
+ puts("iconv library is disabled, SKIP test");
+ exit(0);
+}
+#endif /* #ifdef _ICONV_ENABLED */
+
newlib.iconv/iconvru.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.iconv/iconv.exp
===================================================================
--- newlib.iconv/iconv.exp (nonexistent)
+++ newlib.iconv/iconv.exp (revision 829)
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
+# Rights transferred to Franklin Electronic Publishers.
+#
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+#
+load_lib passfail.exp
+
+set exclude_list {
+}
+
+newlib_pass_fail_all -x $exclude_list
+
Index: newlib.iconv/iconvjp.c
===================================================================
--- newlib.iconv/iconvjp.c (nonexistent)
+++ newlib.iconv/iconvjp.c (revision 829)
@@ -0,0 +1,979 @@
+/*
+ * Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
+ * Rights transferred to Franklin Electronic Publishers.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 "check.h"
+
+#ifdef _ICONV_ENABLED
+
+#if defined(_ICONV_CONVERTER_UTF_8) || \
+ defined(_ICONV_CONVERTER_EUC_JP) || \
+ defined(_ICONV_CONVERTER_SHIFT_JIS) || \
+ defined(_ICONV_CONVERTER_UCS_2_INTERNAL)
+
+#ifdef _ICONV_CONVERTER_UTF_8
+char utf8[] =
+{
+ 0xe8,0x89,0xb2,0xe3,0x80,0x85,0xe3,0x83,0x86,0xe3,
+ 0x82,0xad,0xe3,0x82,0xb9,0xe3,0x83,0x88,0xe3,0x83,
+ 0x95,0xe3,0x82,0xa1,0xe3,0x82,0xa4,0xe3,0x83,0xab,
+ 0xe9,0x9b,0x86,0x20,0x56,0x65,0x72,0x33,0x2e,0x33,
+ 0x20,0x28,0x43,0x29,0x48,0x41,0x54,0x0d,0x0a,0x0d,
+ 0x0a,0xe3,0x81,0x93,0xe3,0x81,0xae,0xe3,0x82,0xa2,
+ 0xe3,0x83,0xbc,0xe3,0x82,0xab,0xe3,0x82,0xa4,0xe3,
+ 0x83,0x96,0xe3,0x81,0xae,0xe6,0x9c,0x80,0xe6,0x96,
+ 0xb0,0xe7,0x89,0x88,0xe3,0x81,0xaf,0xe3,0x81,0x93,
+ 0xe3,0x81,0x93,0xe3,0x81,0xab,0xe3,0x81,0x82,0xe3,
+ 0x82,0x8a,0xe3,0x81,0xbe,0xe3,0x81,0x99,0xe3,0x80,
+ 0x82,0x0d,0x0a,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
+ 0x77,0x77,0x77,0x30,0x32,0x2e,0x73,0x6f,0x2d,0x6e,
+ 0x65,0x74,0x2e,0x6e,0x65,0x2e,0x6a,0x70,0x2f,0x25,
+ 0x37,0x45,0x68,0x61,0x74,0x2f,0x66,0x69,0x6c,0x65,
+ 0x73,0x2f,0x69,0x6e,0x64,0x65,0x78,0x2d,0x6a,0x2e,
+ 0x68,0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a,0x63,0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,0x45,0x41,
+ 0x44,0x4d,0x45,0x20,0x20,0x20,0x20,0x20,0x28,0x41,
+ 0x53,0x43,0x49,0x49,0x29,0x0d,0x0a,0x20,0x20,0x72,
+ 0x65,0x61,0x64,0x6d,0x65,0x2e,0x65,0x75,0x63,0x20,
+ 0x2d,0x2d,0x2d,0x20,0xe3,0x81,0x93,0xe3,0x81,0xae,
+ 0xe3,0x83,0x95,0xe3,0x82,0xa1,0xe3,0x82,0xa4,0xe3,
+ 0x83,0xab,0x20,0x20,0x20,0x28,0x45,0x55,0x43,0x2d,
+ 0x4a,0x50,0x29,0x0d,0x0a,0x20,0x20,0x72,0x65,0x61,
+ 0x64,0x6d,0x65,0x2e,0x6a,0x69,0x73,0x20,0x2d,0x2d,
+ 0x2d,0x20,0xe6,0x97,0xa5,0xe6,0x9c,0xac,0xe8,0xaa,
+ 0x9e,0x52,0x45,0x41,0x44,0x4d,0x45,0x20,0x20,0x20,
+ 0x28,0x4a,0x49,0x53,0x29,0x0d,0x0a,0x20,0x20,0x72,
+ 0x65,0x61,0x64,0x6d,0x65,0x2e,0x73,0x6a,0x73,0x20,
+ 0x2d,0x2d,0x2d,0x20,0xe6,0x97,0xa5,0xe6,0x9c,0xac,
+ 0xe8,0xaa,0x9e,0x52,0x45,0x41,0x44,0x4d,0x45,0x20,
+ 0x20,0x20,0x28,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,
+ 0x49,0x53,0x29,0x0d,0x0a,0x0d,0x0a,0x6a,0x74,0x65,
+ 0x78,0x74,0x2f,0x63,0x72,0x2f,0x0d,0x0a,0x6a,0x74,
+ 0x65,0x78,0x74,0x2f,0x63,0x72,0x6c,0x66,0x2f,0x0d,
+ 0x0a,0x6a,0x74,0x65,0x78,0x74,0x2f,0x6c,0x66,0x2f,
+ 0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x61,0x73,0x63,0x69,
+ 0x69,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,
+ 0x20,0x41,0x53,0x43,0x49,0x49,0xe3,0x81,0xa7,0xe6,
+ 0x9b,0xb8,0xe3,0x81,0x84,0xe3,0x81,0x9f,0xe6,0x97,
+ 0xa5,0xe6,0x9c,0xac,0xe8,0xaa,0x9e,0x28,0xe3,0x83,
+ 0xad,0xe3,0x83,0xbc,0xe3,0x83,0x9e,0xe5,0xad,0x97,
+ 0x29,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x6a,0x30,0x32,
+ 0x30,0x31,0x2d,0x38,0x62,0x2e,0x74,0x78,0x74,0x20,
+ 0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
+ 0x31,0xe3,0x81,0xae,0xe7,0x89,0x87,0xe4,0xbb,0xae,
+ 0xe5,0x90,0x8d,0x20,0xe3,0x82,0x92,0x20,0x38,0xe5,
+ 0x8d,0x98,0xe4,0xbd,0x8d,0xe7,0xac,0xa6,0xe5,0x8f,
+ 0xb7,0xe5,0x8c,0x96,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,
+ 0xe3,0x81,0xa8,0xe5,0x90,0x8c,0xe3,0x81,0x98,0x0d,
+ 0x0a,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,0x65,
+ 0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,
+ 0x53,0x20,0x58,0x30,0x32,0x30,0x31,0xe3,0x81,0xae,
+ 0xe7,0x89,0x87,0xe4,0xbb,0xae,0xe5,0x90,0x8d,0x20,
+ 0xe3,0x82,0x92,0x20,0x45,0x53,0x43,0x28,0x49,0xe3,
+ 0x81,0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,0xe5,0x8c,
+ 0x96,0x0d,0x0a,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,
+ 0x2d,0x73,0x6f,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,
+ 0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x31,0xe3,
+ 0x81,0xae,0xe7,0x89,0x87,0xe4,0xbb,0xae,0xe5,0x90,
+ 0x8d,0x20,0xe3,0x82,0x92,0x20,0x53,0x4f,0x2f,0x53,
+ 0x49,0xe3,0x81,0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,
+ 0xe5,0x8c,0x96,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x38,0x62,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0xe3,0x82,0x92,0x20,0x38,0xe5,0x8d,0x98,
+ 0xe4,0xbd,0x8d,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,0xe5,
+ 0x8c,0x96,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x45,
+ 0x55,0x43,0x2d,0x4a,0x50,0xe3,0x81,0xa8,0xe5,0x90,
+ 0x8c,0xe3,0x81,0x98,0x0d,0x0a,0x20,0x20,0x6a,0x30,
+ 0x32,0x30,0x38,0x2d,0x37,0x38,0x2e,0x74,0x78,0x74,
+ 0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
+ 0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0xe3,0x82,0x92,0x20,0x45,0x53,0x43,0x24,0x40,
+ 0xe3,0x81,0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,0xe5,
+ 0x8c,0x96,0x20,0x20,0x20,0x20,0x20,0xe3,0x81,0x84,
+ 0xe3,0x82,0x8f,0xe3,0x82,0x86,0xe3,0x82,0x8b,0xe6,
+ 0x97,0xa7,0x4a,0x49,0x53,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x38,0x33,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0xe3,0x82,0x92,0x20,0x45,0x53,0x43,0x24,
+ 0x42,0xe3,0x81,0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,
+ 0xe5,0x8c,0x96,0x20,0x20,0x20,0x20,0x20,0xe3,0x81,
+ 0x84,0xe3,0x82,0x8f,0xe3,0x82,0x86,0xe3,0x82,0x8b,
+ 0xe6,0x96,0xb0,0x4a,0x49,0x53,0x0d,0x0a,0x0d,0x0a,
+ 0x20,0x20,0x65,0x30,0x32,0x30,0x31,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x4a,0x49,0x53,
+ 0x20,0x58,0x30,0x32,0x30,0x31,0xe3,0x81,0xae,0xe7,
+ 0x89,0x87,0xe4,0xbb,0xae,0xe5,0x90,0x8d,0x20,0xe3,
+ 0x82,0x92,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0xe3,
+ 0x81,0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,0xe5,0x8c,
+ 0x96,0x0d,0x0a,0x20,0x20,0x65,0x30,0x32,0x30,0x38,
+ 0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,
+ 0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x38,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0xe3,0x82,
+ 0x92,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0xe3,0x81,
+ 0xa7,0xe7,0xac,0xa6,0xe5,0x8f,0xb7,0xe5,0x8c,0x96,
+ 0x20,0x20,0x20,0x20,0x38,0xe3,0x83,0x93,0xe3,0x83,
+ 0x83,0xe3,0x83,0x88,0x4a,0x49,0x53,0x58,0x30,0x32,
+ 0x30,0x38,0xe3,0x81,0xa8,0xe5,0x90,0x8c,0xe3,0x81,
+ 0x98,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x73,0x30,0x32,
+ 0x30,0x31,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
+ 0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0xe3,0x82,0x92,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,
+ 0x4a,0x49,0x53,0xe3,0x81,0xa7,0xe7,0xac,0xa6,0xe5,
+ 0x8f,0xb7,0xe5,0x8c,0x96,0x20,0x38,0xe3,0x83,0x93,
+ 0xe3,0x83,0x83,0xe3,0x83,0x88,0x4a,0x49,0x53,0x58,
+ 0x30,0x32,0x30,0x31,0xe3,0x81,0xa8,0xe5,0x90,0x8c,
+ 0xe3,0x81,0x98,0x0d,0x0a,0x20,0x20,0x73,0x30,0x32,
+ 0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
+ 0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0xe3,0x82,0x92,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,
+ 0x4a,0x49,0x53,0xe3,0x81,0xa7,0xe7,0xac,0xa6,0xe5,
+ 0x8f,0xb7,0xe5,0x8c,0x96,0x0d,0x0a,0x0d,0x0a,0x6a,
+ 0x74,0x65,0x78,0x74,0x2f,0x6f,0x74,0x68,0x65,0x72,
+ 0x73,0x2f,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x62,0x36,
+ 0x34,0x6a,0x69,0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,
+ 0x2d,0x2d,0x20,0x49,0x53,0x4f,0x2d,0x32,0x30,0x32,
+ 0x32,0x2d,0x4a,0x50,0x20,0x28,0x4a,0x49,0x53,0x29,
+ 0x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,0xe6,0xac,0xa0,0xe3,0x81,0x91,0xe3,
+ 0x81,0x9f,0x0d,0x0a,0x20,0x20,0x62,0x6b,0x73,0x6a,
+ 0x69,0x73,0x2e,0x74,0x78,0x74,0x2d,0x2d,0x2d,0x2d,
+ 0x20,0xe5,0xa3,0x8a,0xe3,0x82,0x8c,0xe3,0x81,0x9f,
+ 0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,
+ 0x20,0x20,0xe5,0x85,0x88,0xe9,0xa0,0xad,0xe3,0x83,
+ 0x93,0xe3,0x83,0x83,0xe3,0x83,0x88,0xe3,0x81,0x8c,
+ 0xe3,0x82,0xbc,0xe3,0x83,0xad,0x0d,0x0a,0x0d,0x0a,
+ 0x20,0x20,0x63,0x74,0x72,0x6c,0x5f,0x7a,0x2e,0x74,
+ 0x78,0x74,0x20,0x20,0x20,0x20,0x20,0x53,0x68,0x69,
+ 0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x5e,0x5a,0xe3,0x82,0xad,0xe3,0x83,0xa3,
+ 0xe3,0x83,0xa9,0xe3,0x82,0xaf,0xe3,0x82,0xbf,0xe4,
+ 0xbb,0x98,0xe3,0x81,0x8d,0x20,0x20,0x20,0x28,0x44,
+ 0x4f,0x53,0xe9,0xa2,0xa8,0x29,0x0d,0x0a,0x20,0x20,
+ 0x6d,0x61,0x63,0x74,0x78,0x74,0x2e,0x62,0x69,0x6e,
+ 0x20,0x20,0x20,0x20,0x20,0xe3,0x83,0x9e,0xe3,0x83,
+ 0x83,0xe3,0x82,0xaf,0xe3,0x83,0x90,0xe3,0x82,0xa4,
+ 0xe3,0x83,0x8a,0xe3,0x83,0xaa,0x49,0x49,0xe3,0x83,
+ 0x95,0xe3,0x82,0xa9,0xe3,0x83,0xbc,0xe3,0x83,0x9e,
+ 0xe3,0x83,0x83,0xe3,0x83,0x88,0x0d,0xa
+ };
+#endif /* ifdef _ICONV_CONVERTER_UTF_8 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x30,0x32,0x30,0x31,0x2d,0x65,0x73,0x2e,
+ 0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,
+ 0x58,0x30,0x32,0x30,0x31,0xa4,0xce,0xca,0xd2,0xb2,
+ 0xbe,0xcc,0xbe,0x20,0xa4,0xf2,0x20,0x45,0x53,0x43,
+ 0x28,0x49,0xa4,0xc7,0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,
+ 0x0d,0x0a,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,
+ 0x73,0x6f,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,
+ 0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x31,0xa4,0xce,
+ 0xca,0xd2,0xb2,0xbe,0xcc,0xbe,0x20,0xa4,0xf2,0x20,
+ 0x53,0x4f,0x2f,0x53,0x49,0xa4,0xc7,0xc9,0xe4,0xb9,
+ 0xe6,0xb2,0xbd,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x38,0x62,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0xa4,0xf2,0x20,0x38,0xc3,0xb1,0xb0,0xcc,
+ 0xc9,0xe4,0xb9,0xe6,0xb2,0xbd,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0xa4,
+ 0xc8,0xc6,0xb1,0xa4,0xb8,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x37,0x38,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0xa4,0xf2,0x20,0x45,0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 0x2d,0x2d,0x2d,0x2d,0x20,0xb2,0xf5,0xa4,0xec,0xa4,
+ 0xbf,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,
+ 0x20,0x20,0x20,0xc0,0xe8,0xc6,0xac,0xa5,0xd3,0xa5,
+ 0xc3,0xa5,0xc8,0xa4,0xac,0xa5,0xbc,0xa5,0xed,0x0d,
+ 0x0a,0x0d,0x0a,0x20,0x20,0x63,0x74,0x72,0x6c,0x5f,
+ 0x7a,0x2e,0x74,0x78,0x74,0x20,0x20,0x20,0x20,0x20,
+ 0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x5e,0x5a,0xa5,0xad,0xa5,
+ 0xe3,0xa5,0xe9,0xa5,0xaf,0xa5,0xbf,0xc9,0xd5,0xa4,
+ 0xad,0x20,0x20,0x20,0x28,0x44,0x4f,0x53,0xc9,0xf7,
+ 0x29,0x0d,0x0a,0x20,0x20,0x6d,0x61,0x63,0x74,0x78,
+ 0x74,0x2e,0x62,0x69,0x6e,0x20,0x20,0x20,0x20,0x20,
+ 0xa5,0xde,0xa5,0xc3,0xa5,0xaf,0xa5,0xd0,0xa5,0xa4,
+ 0xa5,0xca,0xa5,0xea,0x49,0x49,0xa5,0xd5,0xa5,0xa9,
+ 0xa1,0xbc,0xa5,0xde,0xa5,0xc3,0xa5,0xc8,0x0d,0x0a
+};
+#endif /* #ifdef _ICONV_CONVERTER_EUC_JP */
+
+#ifdef _ICONV_CONVERTER_SHIFT_JIS
+char shift_jis[] =
+{
+ 0x90,0x46,0x81,0x58,0x83,0x65,0x83,0x4c,0x83,0x58,
+ 0x83,0x67,0x83,0x74,0x83,0x40,0x83,0x43,0x83,0x8b,
+ 0x8f,0x57,0x20,0x56,0x65,0x72,0x33,0x2e,0x33,0x20,
+ 0x28,0x43,0x29,0x48,0x41,0x54,0x0d,0x0a,0x0d,0x0a,
+ 0x82,0xb1,0x82,0xcc,0x83,0x41,0x81,0x5b,0x83,0x4a,
+ 0x83,0x43,0x83,0x75,0x82,0xcc,0x8d,0xc5,0x90,0x56,
+ 0x94,0xc5,0x82,0xcd,0x82,0xb1,0x82,0xb1,0x82,0xc9,
+ 0x82,0xa0,0x82,0xe8,0x82,0xdc,0x82,0xb7,0x81,0x42,
+ 0x0d,0x0a,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
+ 0x77,0x77,0x30,0x32,0x2e,0x73,0x6f,0x2d,0x6e,0x65,
+ 0x74,0x2e,0x6e,0x65,0x2e,0x6a,0x70,0x2f,0x25,0x37,
+ 0x45,0x68,0x61,0x74,0x2f,0x66,0x69,0x6c,0x65,0x73,
+ 0x2f,0x69,0x6e,0x64,0x65,0x78,0x2d,0x6a,0x2e,0x68,
+ 0x74,0x6d,0x6c,0x0d,0x0a,0x0d,0x0a,0x63,0x72,0x2c,
+ 0x20,0x63,0x72,0x6c,0x66,0x2c,0x20,0x6c,0x66,0x83,
+ 0x66,0x83,0x42,0x83,0x8c,0x83,0x4e,0x83,0x67,0x83,
+ 0x8a,0x28,0x83,0x74,0x83,0x48,0x83,0x8b,0x83,0x5f,
+ 0x29,0x82,0xcc,0x93,0xe0,0x97,0x65,0x82,0xcd,0x93,
+ 0xaf,0x82,0xb6,0x82,0xc5,0x82,0xb7,0x82,0xaa,0x81,
+ 0x41,0x8d,0x73,0x82,0xcc,0x8b,0xe6,0x90,0xd8,0x82,
+ 0xe8,0x82,0xaa,0x82,0xbb,0x82,0xea,0x82,0xbc,0x82,
+ 0xea,0x0d,0x0a,0x43,0x52,0x28,0x4d,0x61,0x63,0x95,
+ 0x97,0x29,0x81,0x41,0x43,0x52,0x2b,0x4c,0x46,0x28,
+ 0x44,0x4f,0x53,0x95,0x97,0x29,0x81,0x41,0x4c,0x46,
+ 0x28,0x55,0x4e,0x49,0x58,0x95,0x97,0x29,0x82,0xc9,
+ 0x82,0xc8,0x82,0xc1,0x82,0xc4,0x82,0xa2,0x82,0xdc,
+ 0x82,0xb7,0x81,0x42,0x0d,0x0a,0x0d,0x0a,0x0d,0x0a,
+ 0x6a,0x74,0x65,0x78,0x74,0x2f,0x0d,0x0a,0x0d,0x0a,
+ 0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,0x74,
+ 0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0x89,0x70,0x8c,
+ 0xea,0x52,0x45,0x41,0x44,0x4d,0x45,0x20,0x20,0x20,
+ 0x20,0x20,0x28,0x41,0x53,0x43,0x49,0x49,0x29,0x0d,
+ 0x0a,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,0x2e,
+ 0x65,0x75,0x63,0x20,0x2d,0x2d,0x2d,0x20,0x82,0xb1,
+ 0x82,0xcc,0x83,0x74,0x83,0x40,0x83,0x43,0x83,0x8b,
+ 0x20,0x20,0x20,0x28,0x45,0x55,0x43,0x2d,0x4a,0x50,
+ 0x29,0x0d,0x0a,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,
+ 0x65,0x2e,0x6a,0x69,0x73,0x20,0x2d,0x2d,0x2d,0x20,
+ 0x93,0xfa,0x96,0x7b,0x8c,0xea,0x52,0x45,0x41,0x44,
+ 0x4d,0x45,0x20,0x20,0x20,0x28,0x4a,0x49,0x53,0x29,
+ 0x0d,0x0a,0x20,0x20,0x72,0x65,0x61,0x64,0x6d,0x65,
+ 0x2e,0x73,0x6a,0x73,0x20,0x2d,0x2d,0x2d,0x20,0x93,
+ 0xfa,0x96,0x7b,0x8c,0xea,0x52,0x45,0x41,0x44,0x4d,
+ 0x45,0x20,0x20,0x20,0x28,0x53,0x68,0x69,0x66,0x74,
+ 0x5f,0x4a,0x49,0x53,0x29,0x0d,0x0a,0x0d,0x0a,0x6a,
+ 0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x2f,0x0d,0x0a,
+ 0x6a,0x74,0x65,0x78,0x74,0x2f,0x63,0x72,0x6c,0x66,
+ 0x2f,0x0d,0x0a,0x6a,0x74,0x65,0x78,0x74,0x2f,0x6c,
+ 0x66,0x2f,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x61,0x73,
+ 0x63,0x69,0x69,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
+ 0x2d,0x2d,0x20,0x41,0x53,0x43,0x49,0x49,0x82,0xc5,
+ 0x8f,0x91,0x82,0xa2,0x82,0xbd,0x93,0xfa,0x96,0x7b,
+ 0x8c,0xea,0x28,0x83,0x8d,0x81,0x5b,0x83,0x7d,0x8e,
+ 0x9a,0x29,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x6a,0x30,
+ 0x32,0x30,0x31,0x2d,0x38,0x62,0x2e,0x74,0x78,0x74,
+ 0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
+ 0x30,0x31,0x82,0xcc,0x95,0xd0,0x89,0xbc,0x96,0xbc,
+ 0x20,0x82,0xf0,0x20,0x38,0x92,0x50,0x88,0xca,0x95,
+ 0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,
+ 0x53,0x82,0xc6,0x93,0xaf,0x82,0xb6,0x0d,0x0a,0x20,
+ 0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,0x65,0x73,0x2e,
+ 0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,
+ 0x58,0x30,0x32,0x30,0x31,0x82,0xcc,0x95,0xd0,0x89,
+ 0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,
+ 0x28,0x49,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,
+ 0x0d,0x0a,0x20,0x20,0x6a,0x30,0x32,0x30,0x31,0x2d,
+ 0x73,0x6f,0x2e,0x74,0x78,0x74,0x20,0x2d,0x20,0x4a,
+ 0x49,0x53,0x20,0x58,0x30,0x32,0x30,0x31,0x82,0xcc,
+ 0x95,0xd0,0x89,0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,
+ 0x53,0x4f,0x2f,0x53,0x49,0x82,0xc5,0x95,0x84,0x8d,
+ 0x86,0x89,0xbb,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x38,0x62,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x82,0xf0,0x20,0x38,0x92,0x50,0x88,0xca,
+ 0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0x82,
+ 0xc6,0x93,0xaf,0x82,0xb6,0x0d,0x0a,0x20,0x20,0x6a,
+ 0x30,0x32,0x30,0x38,0x2d,0x37,0x38,0x2e,0x74,0x78,
+ 0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,
+ 0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,0x24,0x40,
+ 0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,
+ 0x20,0x20,0x20,0x82,0xa2,0x82,0xed,0x82,0xe4,0x82,
+ 0xe9,0x8b,0x8c,0x4a,0x49,0x53,0x0d,0x0a,0x20,0x20,
+ 0x6a,0x30,0x32,0x30,0x38,0x2d,0x38,0x33,0x2e,0x74,
+ 0x78,0x74,0x20,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,
+ 0x30,0x32,0x30,0x38,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x20,0x20,0x82,0xf0,0x20,0x45,0x53,0x43,0x24,
+ 0x42,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,
+ 0x20,0x20,0x20,0x20,0x82,0xa2,0x82,0xed,0x82,0xe4,
+ 0x82,0xe9,0x90,0x56,0x4a,0x49,0x53,0x0d,0x0a,0x0d,
+ 0x0a,0x20,0x20,0x65,0x30,0x32,0x30,0x31,0x2e,0x74,
+ 0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x4a,0x49,
+ 0x53,0x20,0x58,0x30,0x32,0x30,0x31,0x82,0xcc,0x95,
+ 0xd0,0x89,0xbc,0x96,0xbc,0x20,0x82,0xf0,0x20,0x45,
+ 0x55,0x43,0x2d,0x4a,0x50,0x82,0xc5,0x95,0x84,0x8d,
+ 0x86,0x89,0xbb,0x0d,0x0a,0x20,0x20,0x65,0x30,0x32,
+ 0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
+ 0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x82,0xf0,0x20,0x45,0x55,0x43,0x2d,0x4a,0x50,0x82,
+ 0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x20,0x20,0x20,
+ 0x20,0x38,0x83,0x72,0x83,0x62,0x83,0x67,0x4a,0x49,
+ 0x53,0x58,0x30,0x32,0x30,0x38,0x82,0xc6,0x93,0xaf,
+ 0x82,0xb6,0x0d,0x0a,0x0d,0x0a,0x20,0x20,0x73,0x30,
+ 0x32,0x30,0x31,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,
+ 0x2d,0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,
+ 0x30,0x31,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x20,0x82,0xf0,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,
+ 0x4a,0x49,0x53,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,
+ 0xbb,0x20,0x38,0x83,0x72,0x83,0x62,0x83,0x67,0x4a,
+ 0x49,0x53,0x58,0x30,0x32,0x30,0x31,0x82,0xc6,0x93,
+ 0xaf,0x82,0xb6,0x0d,0x0a,0x20,0x20,0x73,0x30,0x32,
+ 0x30,0x38,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x20,0x4a,0x49,0x53,0x20,0x58,0x30,0x32,0x30,
+ 0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+ 0x82,0xf0,0x20,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,
+ 0x49,0x53,0x82,0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,
+ 0x0d,0x0a,0x0d,0x0a,0x6a,0x74,0x65,0x78,0x74,0x2f,
+ 0x6f,0x74,0x68,0x65,0x72,0x73,0x2f,0x0d,0x0a,0x0d,
+ 0x0a,0x20,0x20,0x62,0x36,0x34,0x6a,0x69,0x73,0x2e,
+ 0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x20,0x49,0x53,
+ 0x4f,0x2d,0x32,0x30,0x32,0x32,0x2d,0x4a,0x50,0x20,
+ 0x28,0x4a,0x49,0x53,0x29,0x20,0x82,0xf0,0x20,0x62,
+ 0x61,0x73,0x65,0x36,0x34,0x82,0xc5,0x95,0x84,0x8d,
+ 0x86,0x89,0xbb,0x0d,0x0a,0x20,0x20,0x71,0x74,0x6a,
+ 0x69,0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,
+ 0x2d,0x20,0x49,0x53,0x4f,0x2d,0x32,0x30,0x32,0x32,
+ 0x2d,0x4a,0x50,0x20,0x28,0x4a,0x49,0x53,0x29,0x20,
+ 0x82,0xf0,0x20,0x71,0x75,0x6f,0x74,0x65,0x64,0x2d,
+ 0x70,0x72,0x69,0x6e,0x74,0x61,0x62,0x6c,0x65,0x82,
+ 0xc5,0x95,0x84,0x8d,0x86,0x89,0xbb,0x0d,0x0a,0x0d,
+ 0x0a,0x20,0x20,0x62,0x6b,0x65,0x75,0x63,0x2e,0x74,
+ 0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,0x20,0x89,0xf3,
+ 0x82,0xea,0x82,0xbd,0x45,0x55,0x43,0x2d,0x4a,0x50,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x90,0xe6,0x93,0xaa,
+ 0x83,0x72,0x83,0x62,0x83,0x67,0x82,0xaa,0x83,0x5b,
+ 0x83,0x8d,0x0d,0x0a,0x20,0x20,0x62,0x6b,0x6a,0x69,
+ 0x73,0x2e,0x74,0x78,0x74,0x20,0x2d,0x2d,0x2d,0x2d,
+ 0x20,0x89,0xf3,0x82,0xea,0x82,0xbd,0x4a,0x49,0x53,
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x45,
+ 0x53,0x43,0x83,0x52,0x81,0x5b,0x83,0x68,0x82,0xaa,
+ 0x8c,0x87,0x82,0xaf,0x82,0xbd,0x0d,0x0a,0x20,0x20,
+ 0x62,0x6b,0x73,0x6a,0x69,0x73,0x2e,0x74,0x78,0x74,
+ 0x2d,0x2d,0x2d,0x2d,0x20,0x89,0xf3,0x82,0xea,0x82,
+ 0xbd,0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,
+ 0x20,0x20,0x20,0x90,0xe6,0x93,0xaa,0x83,0x72,0x83,
+ 0x62,0x83,0x67,0x82,0xaa,0x83,0x5b,0x83,0x8d,0x0d,
+ 0x0a,0x0d,0x0a,0x20,0x20,0x63,0x74,0x72,0x6c,0x5f,
+ 0x7a,0x2e,0x74,0x78,0x74,0x20,0x20,0x20,0x20,0x20,
+ 0x53,0x68,0x69,0x66,0x74,0x5f,0x4a,0x49,0x53,0x20,
+ 0x20,0x20,0x20,0x20,0x20,0x5e,0x5a,0x83,0x4c,0x83,
+ 0x83,0x83,0x89,0x83,0x4e,0x83,0x5e,0x95,0x74,0x82,
+ 0xab,0x20,0x20,0x20,0x28,0x44,0x4f,0x53,0x95,0x97,
+ 0x29,0x0d,0x0a,0x20,0x20,0x6d,0x61,0x63,0x74,0x78,
+ 0x74,0x2e,0x62,0x69,0x6e,0x20,0x20,0x20,0x20,0x20,
+ 0x83,0x7d,0x83,0x62,0x83,0x4e,0x83,0x6f,0x83,0x43,
+ 0x83,0x69,0x83,0x8a,0x49,0x49,0x83,0x74,0x83,0x48,
+ 0x81,0x5b,0x83,0x7d,0x83,0x62,0x83,0x67,0x0d,0x0a
+};
+#endif /* _ICONV_CONVERTER_SHIFT_JIS */
+
+#ifdef _ICONV_CONVERTER_UCS_2_INTERNAL
+short ucs2[] =
+{
+ 0x8272,0x3005,0x30c6,0x30ad,0x30b9,
+ 0x30c8,0x30d5,0x30a1,0x30a4,0x30eb,
+ 0x96c6,0x0020,0x0056,0x0065,0x0072,
+ 0x0033,0x002e,0x0033,0x0020,0x0028,
+ 0x0043,0x0029,0x0048,0x0041,0x0054,
+ 0x000d,0x000a,0x000d,0x000a,0x3053,
+ 0x306e,0x30a2,0x30fc,0x30ab,0x30a4,
+ 0x30d6,0x306e,0x6700,0x65b0,0x7248,
+ 0x306f,0x3053,0x3053,0x306b,0x3042,
+ 0x308a,0x307e,0x3059,0x3002,0x000d,
+ 0x000a,0x0068,0x0074,0x0074,0x0070,
+ 0x003a,0x002f,0x002f,0x0077,0x0077,
+ 0x0077,0x0030,0x0032,0x002e,0x0073,
+ 0x006f,0x002d,0x006e,0x0065,0x0074,
+ 0x002e,0x006e,0x0065,0x002e,0x006a,
+ 0x0070,0x002f,0x0025,0x0037,0x0045,
+ 0x0068,0x0061,0x0074,0x002f,0x0066,
+ 0x0069,0x006c,0x0065,0x0073,0x002f,
+ 0x0069,0x006e,0x0064,0x0065,0x0078,
+ 0x002d,0x006a,0x002e,0x0068,0x0074,
+ 0x006d,0x006c,0x000d,0x000a,0x000d,
+ 0x000a,0x0063,0x0072,0x002c,0x0020,
+ 0x0063,0x0072,0x006c,0x0066,0x002c,
+ 0x0020,0x006c,0x0066,0x30c7,0x30a3,
+ 0x30ec,0x30af,0x30c8,0x30ea,0x0028,
+ 0x30d5,0x30a9,0x30eb,0x30c0,0x0029,
+ 0x306e,0x5185,0x5bb9,0x306f,0x540c,
+ 0x3058,0x3067,0x3059,0x304c,0x3001,
+ 0x884c,0x306e,0x533a,0x5207,0x308a,
+ 0x304c,0x305d,0x308c,0x305e,0x308c,
+ 0x000d,0x000a,0x0043,0x0052,0x0028,
+ 0x004d,0x0061,0x0063,0x98a8,0x0029,
+ 0x3001,0x0043,0x0052,0x002b,0x004c,
+ 0x0046,0x0028,0x0044,0x004f,0x0053,
+ 0x98a8,0x0029,0x3001,0x004c,0x0046,
+ 0x0028,0x0055,0x004e,0x0049,0x0058,
+ 0x98a8,0x0029,0x306b,0x306a,0x3063,
+ 0x3066,0x3044,0x307e,0x3059,0x3002,
+ 0x000d,0x000a,0x000d,0x000a,0x000d,
+ 0x000a,0x006a,0x0074,0x0065,0x0078,
+ 0x0074,0x002f,0x000d,0x000a,0x000d,
+ 0x000a,0x0020,0x0020,0x0072,0x0065,
+ 0x0061,0x0064,0x006d,0x0065,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x002d,0x002d,0x0020,0x82f1,0x8a9e,
+ 0x0052,0x0045,0x0041,0x0044,0x004d,
+ 0x0045,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0028,0x0041,0x0053,0x0043,
+ 0x0049,0x0049,0x0029,0x000d,0x000a,
+ 0x0020,0x0020,0x0072,0x0065,0x0061,
+ 0x0064,0x006d,0x0065,0x002e,0x0065,
+ 0x0075,0x0063,0x0020,0x002d,0x002d,
+ 0x002d,0x0020,0x3053,0x306e,0x30d5,
+ 0x30a1,0x30a4,0x30eb,0x0020,0x0020,
+ 0x0020,0x0028,0x0045,0x0055,0x0043,
+ 0x002d,0x004a,0x0050,0x0029,0x000d,
+ 0x000a,0x0020,0x0020,0x0072,0x0065,
+ 0x0061,0x0064,0x006d,0x0065,0x002e,
+ 0x006a,0x0069,0x0073,0x0020,0x002d,
+ 0x002d,0x002d,0x0020,0x65e5,0x672c,
+ 0x8a9e,0x0052,0x0045,0x0041,0x0044,
+ 0x004d,0x0045,0x0020,0x0020,0x0020,
+ 0x0028,0x004a,0x0049,0x0053,0x0029,
+ 0x000d,0x000a,0x0020,0x0020,0x0072,
+ 0x0065,0x0061,0x0064,0x006d,0x0065,
+ 0x002e,0x0073,0x006a,0x0073,0x0020,
+ 0x002d,0x002d,0x002d,0x0020,0x65e5,
+ 0x672c,0x8a9e,0x0052,0x0045,0x0041,
+ 0x0044,0x004d,0x0045,0x0020,0x0020,
+ 0x0020,0x0028,0x0053,0x0068,0x0069,
+ 0x0066,0x0074,0x005f,0x004a,0x0049,
+ 0x0053,0x0029,0x000d,0x000a,0x000d,
+ 0x000a,0x006a,0x0074,0x0065,0x0078,
+ 0x0074,0x002f,0x0063,0x0072,0x002f,
+ 0x000d,0x000a,0x006a,0x0074,0x0065,
+ 0x0078,0x0074,0x002f,0x0063,0x0072,
+ 0x006c,0x0066,0x002f,0x000d,0x000a,
+ 0x006a,0x0074,0x0065,0x0078,0x0074,
+ 0x002f,0x006c,0x0066,0x002f,0x000d,
+ 0x000a,0x000d,0x000a,0x0020,0x0020,
+ 0x0061,0x0073,0x0063,0x0069,0x0069,
+ 0x002e,0x0074,0x0078,0x0074,0x0020,
+ 0x002d,0x002d,0x002d,0x002d,0x0020,
+ 0x0041,0x0053,0x0043,0x0049,0x0049,
+ 0x3067,0x66f8,0x3044,0x305f,0x65e5,
+ 0x672c,0x8a9e,0x0028,0x30ed,0x30fc,
+ 0x30de,0x5b57,0x0029,0x000d,0x000a,
+ 0x000d,0x000a,0x0020,0x0020,0x006a,
+ 0x0030,0x0032,0x0030,0x0031,0x002d,
+ 0x0038,0x0062,0x002e,0x0074,0x0078,
+ 0x0074,0x0020,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0031,0x306e,0x7247,
+ 0x4eee,0x540d,0x0020,0x3092,0x0020,
+ 0x0038,0x5358,0x4f4d,0x7b26,0x53f7,
+ 0x5316,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0053,0x0068,
+ 0x0069,0x0066,0x0074,0x005f,0x004a,
+ 0x0049,0x0053,0x3068,0x540c,0x3058,
+ 0x000d,0x000a,0x0020,0x0020,0x006a,
+ 0x0030,0x0032,0x0030,0x0031,0x002d,
+ 0x0065,0x0073,0x002e,0x0074,0x0078,
+ 0x0074,0x0020,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0031,0x306e,0x7247,
+ 0x4eee,0x540d,0x0020,0x3092,0x0020,
+ 0x0045,0x0053,0x0043,0x0028,0x0049,
+ 0x3067,0x7b26,0x53f7,0x5316,0x000d,
+ 0x000a,0x0020,0x0020,0x006a,0x0030,
+ 0x0032,0x0030,0x0031,0x002d,0x0073,
+ 0x006f,0x002e,0x0074,0x0078,0x0074,
+ 0x0020,0x002d,0x0020,0x004a,0x0049,
+ 0x0053,0x0020,0x0058,0x0030,0x0032,
+ 0x0030,0x0031,0x306e,0x7247,0x4eee,
+ 0x540d,0x0020,0x3092,0x0020,0x0053,
+ 0x004f,0x002f,0x0053,0x0049,0x3067,
+ 0x7b26,0x53f7,0x5316,0x000d,0x000a,
+ 0x000d,0x000a,0x0020,0x0020,0x006a,
+ 0x0030,0x0032,0x0030,0x0038,0x002d,
+ 0x0038,0x0062,0x002e,0x0074,0x0078,
+ 0x0074,0x0020,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0038,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x3092,0x0020,0x0038,
+ 0x5358,0x4f4d,0x7b26,0x53f7,0x5316,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0045,0x0055,0x0043,
+ 0x002d,0x004a,0x0050,0x3068,0x540c,
+ 0x3058,0x000d,0x000a,0x0020,0x0020,
+ 0x006a,0x0030,0x0032,0x0030,0x0038,
+ 0x002d,0x0037,0x0038,0x002e,0x0074,
+ 0x0078,0x0074,0x0020,0x002d,0x0020,
+ 0x004a,0x0049,0x0053,0x0020,0x0058,
+ 0x0030,0x0032,0x0030,0x0038,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x3092,0x0020,
+ 0x0045,0x0053,0x0043,0x0024,0x0040,
+ 0x3067,0x7b26,0x53f7,0x5316,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x3044,
+ 0x308f,0x3086,0x308b,0x65e7,0x004a,
+ 0x0049,0x0053,0x000d,0x000a,0x0020,
+ 0x0020,0x006a,0x0030,0x0032,0x0030,
+ 0x0038,0x002d,0x0038,0x0033,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x0020,0x004a,0x0049,0x0053,0x0020,
+ 0x0058,0x0030,0x0032,0x0030,0x0038,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x3092,
+ 0x0020,0x0045,0x0053,0x0043,0x0024,
+ 0x0042,0x3067,0x7b26,0x53f7,0x5316,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x3044,0x308f,0x3086,0x308b,0x65b0,
+ 0x004a,0x0049,0x0053,0x000d,0x000a,
+ 0x000d,0x000a,0x0020,0x0020,0x0065,
+ 0x0030,0x0032,0x0030,0x0031,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x002d,0x002d,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0031,0x306e,0x7247,
+ 0x4eee,0x540d,0x0020,0x3092,0x0020,
+ 0x0045,0x0055,0x0043,0x002d,0x004a,
+ 0x0050,0x3067,0x7b26,0x53f7,0x5316,
+ 0x000d,0x000a,0x0020,0x0020,0x0065,
+ 0x0030,0x0032,0x0030,0x0038,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x002d,0x002d,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0038,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x3092,0x0020,0x0045,
+ 0x0055,0x0043,0x002d,0x004a,0x0050,
+ 0x3067,0x7b26,0x53f7,0x5316,0x0020,
+ 0x0020,0x0020,0x0020,0x0038,0x30d3,
+ 0x30c3,0x30c8,0x004a,0x0049,0x0053,
+ 0x0058,0x0030,0x0032,0x0030,0x0038,
+ 0x3068,0x540c,0x3058,0x000d,0x000a,
+ 0x000d,0x000a,0x0020,0x0020,0x0073,
+ 0x0030,0x0032,0x0030,0x0031,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x002d,0x002d,0x002d,0x0020,0x004a,
+ 0x0049,0x0053,0x0020,0x0058,0x0030,
+ 0x0032,0x0030,0x0031,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x3092,0x0020,0x0053,
+ 0x0068,0x0069,0x0066,0x0074,0x005f,
+ 0x004a,0x0049,0x0053,0x3067,0x7b26,
+ 0x53f7,0x5316,0x0020,0x0038,0x30d3,
+ 0x30c3,0x30c8,0x004a,0x0049,0x0053,
+ 0x0058,0x0030,0x0032,0x0030,0x0031,
+ 0x3068,0x540c,0x3058,0x000d,0x000a,
+ 0x0020,0x0020,0x0073,0x0030,0x0032,
+ 0x0030,0x0038,0x002e,0x0074,0x0078,
+ 0x0074,0x0020,0x002d,0x002d,0x002d,
+ 0x002d,0x0020,0x004a,0x0049,0x0053,
+ 0x0020,0x0058,0x0030,0x0032,0x0030,
+ 0x0038,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x3092,0x0020,0x0053,0x0068,0x0069,
+ 0x0066,0x0074,0x005f,0x004a,0x0049,
+ 0x0053,0x3067,0x7b26,0x53f7,0x5316,
+ 0x000d,0x000a,0x000d,0x000a,0x006a,
+ 0x0074,0x0065,0x0078,0x0074,0x002f,
+ 0x006f,0x0074,0x0068,0x0065,0x0072,
+ 0x0073,0x002f,0x000d,0x000a,0x000d,
+ 0x000a,0x0020,0x0020,0x0062,0x0036,
+ 0x0034,0x006a,0x0069,0x0073,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x002d,
+ 0x002d,0x002d,0x0020,0x0049,0x0053,
+ 0x004f,0x002d,0x0032,0x0030,0x0032,
+ 0x0032,0x002d,0x004a,0x0050,0x0020,
+ 0x0028,0x004a,0x0049,0x0053,0x0029,
+ 0x0020,0x3092,0x0020,0x0062,0x0061,
+ 0x0073,0x0065,0x0036,0x0034,0x3067,
+ 0x7b26,0x53f7,0x5316,0x000d,0x000a,
+ 0x0020,0x0020,0x0071,0x0074,0x006a,
+ 0x0069,0x0073,0x002e,0x0074,0x0078,
+ 0x0074,0x0020,0x002d,0x002d,0x002d,
+ 0x002d,0x0020,0x0049,0x0053,0x004f,
+ 0x002d,0x0032,0x0030,0x0032,0x0032,
+ 0x002d,0x004a,0x0050,0x0020,0x0028,
+ 0x004a,0x0049,0x0053,0x0029,0x0020,
+ 0x3092,0x0020,0x0071,0x0075,0x006f,
+ 0x0074,0x0065,0x0064,0x002d,0x0070,
+ 0x0072,0x0069,0x006e,0x0074,0x0061,
+ 0x0062,0x006c,0x0065,0x3067,0x7b26,
+ 0x53f7,0x5316,0x000d,0x000a,0x000d,
+ 0x000a,0x0020,0x0020,0x0062,0x006b,
+ 0x0065,0x0075,0x0063,0x002e,0x0074,
+ 0x0078,0x0074,0x0020,0x002d,0x002d,
+ 0x002d,0x002d,0x0020,0x58ca,0x308c,
+ 0x305f,0x0045,0x0055,0x0043,0x002d,
+ 0x004a,0x0050,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x5148,0x982d,
+ 0x30d3,0x30c3,0x30c8,0x304c,0x30bc,
+ 0x30ed,0x000d,0x000a,0x0020,0x0020,
+ 0x0062,0x006b,0x006a,0x0069,0x0073,
+ 0x002e,0x0074,0x0078,0x0074,0x0020,
+ 0x002d,0x002d,0x002d,0x002d,0x0020,
+ 0x58ca,0x308c,0x305f,0x004a,0x0049,
+ 0x0053,0x0020,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x0045,0x0053,0x0043,0x30b3,0x30fc,
+ 0x30c9,0x304c,0x6b20,0x3051,0x305f,
+ 0x000d,0x000a,0x0020,0x0020,0x0062,
+ 0x006b,0x0073,0x006a,0x0069,0x0073,
+ 0x002e,0x0074,0x0078,0x0074,0x002d,
+ 0x002d,0x002d,0x002d,0x0020,0x58ca,
+ 0x308c,0x305f,0x0053,0x0068,0x0069,
+ 0x0066,0x0074,0x005f,0x004a,0x0049,
+ 0x0053,0x0020,0x0020,0x0020,0x5148,
+ 0x982d,0x30d3,0x30c3,0x30c8,0x304c,
+ 0x30bc,0x30ed,0x000d,0x000a,0x000d,
+ 0x000a,0x0020,0x0020,0x0063,0x0074,
+ 0x0072,0x006c,0x005f,0x007a,0x002e,
+ 0x0074,0x0078,0x0074,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x0053,0x0068,
+ 0x0069,0x0066,0x0074,0x005f,0x004a,
+ 0x0049,0x0053,0x0020,0x0020,0x0020,
+ 0x0020,0x0020,0x0020,0x005e,0x005a,
+ 0x30ad,0x30e3,0x30e9,0x30af,0x30bf,
+ 0x4ed8,0x304d,0x0020,0x0020,0x0020,
+ 0x0028,0x0044,0x004f,0x0053,0x98a8,
+ 0x0029,0x000d,0x000a,0x0020,0x0020,
+ 0x006d,0x0061,0x0063,0x0074,0x0078,
+ 0x0074,0x002e,0x0062,0x0069,0x006e,
+ 0x0020,0x0020,0x0020,0x0020,0x0020,
+ 0x30de,0x30c3,0x30af,0x30d0,0x30a4,
+ 0x30ca,0x30ea,0x0049,0x0049,0x30d5,
+ 0x30a9,0x30fc,0x30de,0x30c3,0x30c8,
+ 0x000d,0x000a
+};
+#endif
+
+struct iconv_data
+{
+ int len;
+ char *name;
+ char *data;
+};
+
+#define CONVERSIONS 4
+
+struct iconv_data data[] =
+{
+#ifdef _ICONV_CONVERTER_EUC_JP
+ {sizeof(euc_jp), "EUC-JP", (char *)euc_jp},
+#endif
+#ifdef _ICONV_CONVERTER_SHIFT_JIS
+ {sizeof(shift_jis), "SHIFT-JIS", (char *)shift_jis},
+#endif
+#ifdef _ICONV_CONVERTER_UTF_8
+ {sizeof(utf8), "UTF-8", (char *)utf8},
+#endif
+#ifdef _ICONV_CONVERTER_UCS_2_INTERNAL
+ {sizeof(ucs2), "UCS-2-INTERNAL", (char *)ucs2},
+#endif
+ {0, NULL, NULL}
+};
+
+#define OUTBUF_LEN 2800
+char ob[OUTBUF_LEN];
+
+iconv_t descs[CONVERSIONS*CONVERSIONS];
+
+#define ERROR 0
+
+int main(int argc, char **argv)
+{
+ int i, j, k, d = 0;
+ size_t n;
+ char *outbuf, *inbuf;
+ int conversions = sizeof(data)/sizeof(struct iconv_data) - 1;
+
+ puts("JP iconv test");
+
+ for (i = 0; i < conversions; i++)
+ {
+ for (j = 0; j < conversions; j++)
+ {
+ descs[d] = iconv_open(data[j].name, data[i].name);
+ if (descs[d++] == (iconv_t)-1)
+ {
+ printf("iconv_open(%s, %s)\n", data[i].name, data[j].name);
+ perror("");
+ CHECK(ERROR);
+ }
+ }
+ }
+
+ d = 0;
+ for (i = 0; i < conversions; i++)
+ {
+ for (j = 0; j < conversions; j++)
+ {
+ size_t inbytes = data[i].len;
+ size_t outbytes = OUTBUF_LEN;
+ inbuf = data[i].data;
+ outbuf = (char *)ob;
+
+ if (iconv(descs[d], NULL, NULL, (char **)&outbuf, &outbytes) == (size_t)-1)
+ {
+ perror("Can't reset shift state");
+ CHECK(ERROR);
+ }
+
+ n = iconv(descs[d++], (const char **)&(inbuf), &inbytes,
+ (char **)&outbuf, &outbytes);
+ if (n == (size_t)-1)
+ {
+ printf("Conversion from %s to %s FAILED - iconv() "
+ "returned -1\n", data[i].name, data[j].name);
+ perror("");
+ CHECK(ERROR);
+ }
+
+ if (data[j].len != OUTBUF_LEN - outbytes)
+ {
+ printf("Conversion from %s to %s FAILED",
+ data[i].name, data[j].name);
+ printf(" - bad output buffer length (%d instead of %d)\n",
+ OUTBUF_LEN - outbytes, data[j].len);
+ CHECK(ERROR);
+ }
+
+ for (k = 0; k < data[j].len; k++)
+ {
+ if (ob[k] != data[j].data[k])
+ {
+ printf("Conversion from %s to %s FAILED",
+ data[i].name, data[j].name);
+ printf("Error: byte %d is wrong\n", k);
+ printf("outbuf value: %#x, inbuf value %#x, "
+ "right value: %#x\n",
+ (int)ob[k], (int)(data[i].data[k]),
+ (int)(data[j].data[k]));
+ CHECK(ERROR);
+ }
+ }
+
+ printf("iconv from %s to %s was successfully done\n",
+ data[i].name, data[j].name);
+
+ }
+ }
+
+ d = 0;
+ for (i = 0; i < conversions; i++)
+ for (j = 0; j < conversions; j++)
+ CHECK(iconv_close(descs[d++]) != -1);
+
+ exit(0);
+}
+
+#else /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */
+int main(int argc, char **argv)
+{
+ puts("None of UTF-8, EUC-JP, SHIFT-JIS and UCS-2_INTERNAL converters "
+ "linked, SKIP test");
+ exit(0);
+}
+#endif /* #if defined(_ICONV_CONVERTER_UTF_8) || ... */
+
+#else /* #ifdef _ICONV_ENABLED */
+int main(int argc, char **argv)
+{
+ puts("iconv library is disabled, SKIP test");
+ exit(0);
+}
+#endif /* #ifdef _ICONV_ENABLED */
+
newlib.iconv/iconvjp.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.iconv/iconvnm.c
===================================================================
--- newlib.iconv/iconvnm.c (nonexistent)
+++ newlib.iconv/iconvnm.c (revision 829)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
+ * Rights transferred to Franklin Electronic Publishers.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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 "check.h"
+
+#ifdef _ICONV_ENABLED
+
+char *good_names[] = {
+#ifdef _ICONV_CONVERTER_ISO_8859_5
+"iso_8859_5", "iso-8859-5", "iso-8859_5", "IsO-8859_5"
+#elif defined _ICONV_CONVERTER_US_ASCII
+"us_ascii", "US_ASCII", "us-ASCII", "US-ASCII"
+#elif defined _ICONV_CONVERTER_EUC_JP
+"euc-jp", "EUC_JP", "euc-JP", "EUC-JP"
+#elif defined _ICONV_CONVERTER_UTF_8
+"utf_8", "UTF_8", "uTf-8", "UTF-8"
+#else
+#endif
+};
+
+char *bad_names[] =
+{" ", "iso", "8", "iso_8859_5 ", " iso_8859_5", "csisolatincyrillic ",
+ " csisolatincyrillic", "euc-", "p", "euc_jp ", "euc-jp-",
+ "us_as", "us_", "us_ascii ", " us_ascii",
+ "CCCP", "", "-1", "-", "_", "---", "___", "-_-_-", "_-_-_", NULL};
+
+int main(int argc, char **argv)
+{
+ int i, failed = 0;
+ iconv_t cd;
+
+ puts("iconv names test");
+
+ CHECK(setenv("NLSPATH", "./", 0) != -1);
+
+ for (i = 0; i < sizeof(good_names)/sizeof(char *); i++)
+ {
+ printf("Trying iconv(%s, %s)", good_names[0], good_names[i]);
+ fflush(stdout);
+
+ cd = iconv_open(good_names[0], good_names[i]);
+
+ if (cd == (iconv_t)-1)
+ {
+ puts(" ... FAILED");
+ failed += 1;
+ }
+ else
+ {
+ puts(" ... PASSED");
+ CHECK(iconv_close(cd) != -1);
+ }
+ }
+
+ for (i = 0; i < sizeof(bad_names)/sizeof(char *); i++)
+ {
+ printf("Trying iconv(%s, \"%s\")", good_names[0], bad_names[i]);
+ fflush(stdout);
+
+ cd = iconv_open(good_names[0], bad_names[i]);
+
+ if (cd != (iconv_t)-1)
+ {
+ puts(" ... FAILED");
+ failed += 1;
+ }
+ else
+ puts(" ... PASSED");
+ }
+
+ if (failed)
+ {
+ printf("%d FAILTURES\n", failed);
+ abort();
+ }
+
+ exit(0);
+}
+#else
+int main(int argc, char **argv)
+{
+ puts("iconv library is disabled, skip name test");
+ exit(0);
+}
+#endif /* #ifdef _ICONV_ENABLED */
+
newlib.iconv/iconvnm.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.locale/UTF-8.c
===================================================================
--- newlib.locale/UTF-8.c (nonexistent)
+++ newlib.locale/UTF-8.c (revision 829)
@@ -0,0 +1,397 @@
+/*
+ * Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ *
+ * Tests gleaned from Markus Kuhn's UTF-8 and Unicode FAQ,
+ * and specifically, his UTF-8-test.txt decoder stress test file.
+ */
+
+#include
+#include
+#include
+
+#define MAX_BYTES 65
+
+int num_invalid(const char *s, int len);
+
+char first[6][6] = {
+ {0x0}, /* U-00000000 */
+ {0xc2, 0x80}, /* U-00000080 */
+ {0xe0, 0xa0, 0x80}, /* U-00000800 */
+ {0xf0, 0x90, 0x80, 0x80}, /* U-00010000 */
+ {0xf8, 0x88, 0x80, 0x80, 0x80}, /* U-00200000 */
+ {0xfc, 0x84, 0x80, 0x80, 0x80, 0x80} /* U-04000000 */
+};
+
+char last[6][6] = {
+ {0x7f}, /* U-0000007F */
+ {0xdf, 0xbf}, /* U-000007FF */
+ {0xef, 0xbf, 0xbf}, /* U-0000FFFF */
+ {0xf7, 0xbf, 0xbf, 0xbf}, /* U-001FFFFF */
+ {0xfb, 0xbf, 0xbf, 0xbf, 0xbf}, /* U-03FFFFFF */
+ {0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf} /* U-7FFFFFFF */
+};
+
+char boundary[5][6] = {
+ {0xed, 0x9f, 0xbf}, /* U-0000D7FF */
+ {0xee, 0x80, 0x80}, /* U-0000E000 */
+ {0xef, 0xbf, 0xbd}, /* U-0000FFFD */
+ {0xf4, 0x8f, 0xbf, 0xbf}, /* U-0010FFFF */
+ {0xf4, 0x90, 0x80, 0x80} /* U-00110000 */
+};
+
+char continuation_bytes[8][7] = {
+ {0x80},
+ {0xbf},
+ {0x80, 0xbf},
+ {0x80, 0xbf, 0x80},
+ {0x80, 0xbf, 0x80, 0xbf},
+ {0x80, 0xbf, 0x80, 0xbf, 0x80},
+ {0x80, 0xbf, 0x80, 0xbf, 0x80, 0xbf},
+ {0x80, 0xbf, 0x80, 0xbf, 0x80, 0xbf, 0x80}
+};
+
+char all_continuation_bytes[64];
+
+
+char all_two_byte_seq[32];
+char all_three_byte_seq[16];
+char all_four_byte_seq[8];
+char all_five_byte_seq[4];
+char all_six_byte_seq[2];
+
+char incomplete_seq[10][6] = {
+ {0xc2}, /* U-00000080 */
+ {0xe0, 0x80}, /* U-00000800 */
+ {0xf0, 0x80, 0x80}, /* U-00010000 */
+ {0xf8, 0x80, 0x80, 0x80}, /* U-00200000 */
+ {0xfc, 0x80, 0x80, 0x80, 0x80}, /* U-04000000 */
+ {0xdf}, /* U-000007FF */
+ {0xef, 0xbf}, /* U-0000FFFF */
+ {0xf7, 0xbf, 0xbf}, /* U-001FFFFF */
+ {0xfb, 0xbf, 0xbf, 0xbf}, /* U-03FFFFFF */
+ {0xfd, 0xbf, 0xbf, 0xbf, 0xbf} /* U-7FFFFFFF */
+};
+
+char incomplete_seq_concat[30];
+
+char impossible_bytes[3][4] = {
+ {0xfe},
+ {0xff},
+ {0xfe, 0xfe, 0xff, 0xff}
+};
+
+char overlong[5][6] = {
+ {0xc0, 0xaf},
+ {0xe0, 0x80, 0xaf},
+ {0xf0, 0x80, 0x80, 0xaf},
+ {0xf8, 0x80, 0x80, 0x80, 0xaf},
+ {0xfc, 0x80, 0x80, 0x80, 0x80, 0xaf}
+};
+
+char overlong_max[5][6] = {
+ {0xc1, 0xbf},
+ {0xe0, 0x9f, 0xbf},
+ {0xf0, 0x8f, 0xbf, 0xbf},
+ {0xf8, 0x87, 0xbf, 0xbf, 0xbf},
+ {0xfc, 0x83, 0xbf, 0xbf, 0xbf, 0xbf}
+};
+
+char overlong_nul[5][6] = {
+ {0xc0, 0x80},
+ {0xe0, 0x80, 0x80},
+ {0xf0, 0x80, 0x80, 0x80},
+ {0xf8, 0x80, 0x80, 0x80, 0x80},
+ {0xfc, 0x80, 0x80, 0x80, 0x80, 0x80}
+};
+
+char single_surrogates[7][3] = {
+ {0xed, 0xa0, 0x80},
+ {0xed, 0xad, 0xbf},
+ {0xed, 0xae, 0x80},
+ {0xed, 0xaf, 0xbf},
+ {0xed, 0xb0, 0x80},
+ {0xed, 0xbe, 0x80},
+ {0xed, 0xbf, 0xbf}
+};
+
+char paired_surrogates[8][6] = {
+ {0xed, 0xa0, 0x80, 0xed, 0xb0, 0x80},
+ {0xed, 0xa0, 0x80, 0xed, 0xbf, 0xbf},
+ {0xed, 0xad, 0xbf, 0xed, 0xb0, 0x80},
+ {0xed, 0xad, 0xbf, 0xed, 0xbf, 0xbf},
+ {0xed, 0xae, 0x80, 0xed, 0xb0, 0x80},
+ {0xed, 0xae, 0x80, 0xed, 0xbf, 0xbf},
+ {0xed, 0xaf, 0xbf, 0xed, 0xb0, 0x80},
+ {0xed, 0xaf, 0xbf, 0xed, 0xbf, 0xbf}
+};
+
+char illegal_pos[2][3] = {
+ {0xff, 0xfe},
+ {0xff, 0xff}
+};
+
+int main()
+ {
+ wchar_t wchar;
+ int retval;
+ int i;
+
+ if (!setlocale(LC_CTYPE, "C-UTF-8"))
+ {
+ printf("Failed to set C-UTF-8 locale.\n");
+ return 1;
+ }
+ else
+ printf("Set C-UTF-8 locale.\n");
+
+ /* 2 Boundary condition test cases */
+ /* 2.1 First possible sequence of a certain length */
+ retval = mbtowc(&wchar, first[0], MAX_BYTES);
+ if (retval == 0)
+ printf("2.1.1: U-%08d\n", wchar);
+ else
+ printf("2.1.1: Invalid\n");
+
+ for (i = 2; i < 7; i++)
+ {
+ retval = mbtowc (&wchar, first[i-1], MAX_BYTES);
+ if (retval == i)
+ printf("2.1.%d: U-%08x\n", i, wchar);
+ else
+ printf("2.1.%d: Invalid\n", i);
+ }
+
+ /* 2.2 Last possible sequence of a certain length */
+ for (i = 1; i < 7; i++)
+ {
+ retval = mbtowc (&wchar, last[i-1], MAX_BYTES);
+ if (retval == i)
+ printf("2.2.%d: U-%08x\n", i, wchar);
+ else
+ printf("2.2.%d: Invalid\n", i);
+ }
+
+ /* 2.3 Other boundary conditions */
+ for (i = 1; i < 6; i++)
+ {
+ retval = mbtowc (&wchar, boundary[i-1], MAX_BYTES);
+ if ((i < 4 && retval == 3) || (i > 3 && retval == 4))
+ printf("2.3.%d: U-%08x\n", i, wchar);
+ else
+ printf("2.3.%d: Invalid\n", i);
+ }
+
+ /* 3 Malformed sequences */
+ /* 3.1 Unexpected continuation bytes */
+ retval = mbtowc (&wchar, continuation_bytes[0], MAX_BYTES);
+ if (retval == 1)
+ printf("3.1.1: U-%08x\n", wchar);
+ else
+ printf("3.1.1: 1 Invalid\n");
+
+ retval = mbtowc (&wchar, continuation_bytes[1], MAX_BYTES);
+ if (retval == 1)
+ printf("3.1.2: U-%08x\n", wchar);
+ else
+ printf("3.1.2: 1 Invalid\n");
+
+ for(i=2; i< 8; i++)
+ {
+ retval = num_invalid(continuation_bytes[i], i);
+ if (retval == -1)
+ printf("3.1.%d: Valid Character Found\n", i+1);
+ else
+ printf("3.1.%d: %d Invalid\n", i+1, retval);
+ }
+
+ for(i = 0x80; i < 0xc0; i++)
+ all_continuation_bytes[i-0x80] = i;
+
+ retval = num_invalid(all_continuation_bytes, 0xc0 - 0x80);
+ if (retval == -1)
+ printf("3.1.9: Valid Character Found\n");
+ else
+ printf("3.1.9: %d Invalid\n", retval);
+
+ /* 3.2 Lonely start characters */
+ for(i = 0xc0; i < 0xe0; i++)
+ all_two_byte_seq[i-0xc0] = i;
+
+ retval = num_invalid(all_two_byte_seq, 0xe0 - 0xc0);
+ if (retval == -1)
+ printf("3.2.1: Valid Character Found\n");
+ else
+ printf("3.2.1: %d Invalid\n", retval);
+
+ for(i = 0xe0; i < 0xf0; i++)
+ all_three_byte_seq[i-0xe0] = i;
+
+ retval = num_invalid(all_three_byte_seq, 0xf0 - 0xe0);
+ if (retval == -1)
+ printf("3.2.2: Valid Character Found\n");
+ else
+ printf("3.2.2: %d Invalid\n", retval);
+
+ for(i = 0xf0; i < 0xf8; i++)
+ all_four_byte_seq[i-0xf0] = i;
+
+ retval = num_invalid(all_four_byte_seq, 0xf8 - 0xf0);
+ if (retval == -1)
+ printf("3.2.3: Valid Character Found\n");
+ else
+ printf("3.2.3: %d Invalid\n", retval);
+
+ for(i = 0xf8; i < 0xfc; i++)
+ all_five_byte_seq[i-0xf8] = i;
+
+ retval = num_invalid(all_five_byte_seq, 0xfc - 0xf8);
+ if (retval == -1)
+ printf("3.2.4: Valid Character Found\n");
+ else
+ printf("3.2.4: %d Invalid\n", retval);
+
+ for(i = 0xfc; i < 0xfe; i++)
+ all_six_byte_seq[i-0xfc] = i;
+
+ retval = num_invalid(all_six_byte_seq, 0xfe - 0xfc);
+ if (retval == -1)
+ printf("3.2.5: Valid Character Found\n");
+ else
+ printf("3.2.5: %d Invalid\n", retval);
+
+ /* 3.3 Sequences with last continuation byte missing */
+ for(i = 1; i < 6; i++)
+ {
+ retval = mbtowc(&wchar, incomplete_seq[i-1], i);
+ if(retval == -1)
+ printf("3.3.%d: 1 Invalid\n", i);
+ else
+ printf("3.3.%d: Valid Character Found\n", i);
+ }
+
+ for(i = 6; i < 11; i++)
+ {
+ retval = mbtowc(&wchar, incomplete_seq[i-1], i - 5);
+ if(retval == -1)
+ printf("3.3.%d: 1 Invalid\n", i);
+ else
+ printf("3.3.%d: Valid Character Found\n", i);
+ }
+
+ /* 3.4 Concatenation of incomplete sequences */
+ /* This test is excluded because the mbtowc function does not return the
+ number of bytes read in an invalid multi-byte sequence. */
+
+ /* 3.5 Impossible bytes */
+ retval = mbtowc(&wchar, impossible_bytes[0], 1);
+ if(retval == -1)
+ printf("3.5.1: 1 Invalid\n");
+ else
+ printf("3.5.1: Valid Character Found\n");
+
+ retval = mbtowc(&wchar, impossible_bytes[1], 1);
+ if(retval == -1)
+ printf("3.5.2: 1 Invalid\n");
+ else
+ printf("3.5.2: Valid Character Found\n");
+
+ retval = mbtowc(&wchar, impossible_bytes[2], 4);
+ if(retval == -1)
+ printf("3.5.3: 1 Invalid\n");
+ else
+ printf("3.5.3: Valid Character Found\n");
+
+ /* 4 Overlong sequences */
+ /* 4.1 Examples of an overlong ASCII character */
+ for(i = 2; i < 7; i++)
+ {
+ retval = mbtowc(&wchar, overlong[i-2], i);
+ if(retval == -1)
+ printf("4.1.%d: 1 Invalid\n", i-1);
+ else
+ printf("4.1.%d: Valid Character Found\n", i-1);
+ }
+
+ /* 4.2 Maximum overlong sequences */
+ for(i = 2; i < 7; i++)
+ {
+ retval = mbtowc(&wchar, overlong_max[i-2], i);
+ if(retval == -1)
+ printf("4.2.%d: 1 Invalid\n", i-1);
+ else
+ printf("4.2.%d: Valid Character Found\n", i-1);
+ }
+
+ /* 4.3 Overlong representation of the NUL character */
+ for(i = 2; i < 7; i++)
+ {
+ retval = mbtowc(&wchar, overlong_nul[i-2], i);
+ if(retval == -1)
+ printf("4.3.%d: 1 Invalid\n", i-1);
+ else
+ printf("4.3.%d: Valid Character Found\n", i-1);
+ }
+
+ /* 5 Illegal code positions */
+ /* 5.1 Single UTF-16 surrogates */
+ for (i = 1; i < 8; i++)
+ {
+ retval = mbtowc(&wchar, single_surrogates[i-1], 3);
+ if(retval == -1)
+ printf("5.1.%d: 1 Invalid\n", i);
+ else
+ printf("5.1.%d: Valid Character Found\n", i);
+ }
+
+ /* 5.2 Paired UTF-16 surrogates */
+ for (i = 1; i < 8; i++)
+ {
+ retval = mbtowc(&wchar, paired_surrogates[i-1], 6);
+ if(retval == -1)
+ printf("5.2.%d: 1 Invalid\n", i);
+ else
+ printf("5.2.%d: Valid Character Found\n", i);
+ }
+
+ /* 5.3 Other illegal code positions */
+ retval = mbtowc(&wchar, illegal_pos[0], 3);
+ if(retval == -1)
+ printf("5.3.1: 1 Invalid\n");
+ else
+ printf("5.3.1: Valid Character Found\n");
+
+ retval = mbtowc(&wchar, illegal_pos[1], 3);
+ if(retval == -1)
+ printf("5.3.2: 1 Invalid\n");
+ else
+ printf("5.3.2: Valid Character Found\n");
+
+ return 0;
+ }
+
+/* return number of invalid characters in string,
+ returns -1 if a valid character is found */
+int
+num_invalid(const char *s, int len)
+{
+ int retval = 0;
+ int i = 0;
+ int num_inv = 0;
+ wchar_t wchar;
+ const char *t;
+
+ t = s;
+
+ for(i=0; i
newlib.locale/UTF-8.c
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: newlib.locale/locale.exp
===================================================================
--- newlib.locale/locale.exp (nonexistent)
+++ newlib.locale/locale.exp (revision 829)
@@ -0,0 +1,13 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib passfail.exp
+
+set exclude_list {
+"UTF-8.c"
+}
+
+newlib_pass_fail_all -x $exclude_list
Index: newlib.locale/UTF-8.exp
===================================================================
--- newlib.locale/UTF-8.exp (nonexistent)
+++ newlib.locale/UTF-8.exp (revision 829)
@@ -0,0 +1,88 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+load_lib checkoutput.exp
+
+set expected_output {
+"Set C-UTF-8 locale."
+"* U-00000000"
+"* U-00000080"
+"* U-00000800"
+"* U-00010000"
+"* U-00200000"
+"* U-04000000"
+"* U-0000007f"
+"* U-000007ff"
+"* U-0000ffff"
+"* U-001fffff"
+"* U-03ffffff"
+"* U-7fffffff"
+"* U-0000d7ff"
+"* U-0000e000"
+"* U-0000fffd"
+"* U-0010ffff"
+"* U-00110000"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 2 Invalid"
+"* 3 Invalid"
+"* 4 Invalid"
+"* 5 Invalid"
+"* 6 Invalid"
+"* 7 Invalid"
+"* 64 Invalid"
+"* 32 Invalid"
+"* 16 Invalid"
+"* 8 Invalid"
+"* 4 Invalid"
+"* 2 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+"* 1 Invalid"
+}
+
+newlib_check_output UTF-8.c $expected_output